var RC=Object.defineProperty;var DC=(r,e,a)=>e in r?RC(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a;var BC=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Qe=(r,e,a)=>DC(r,typeof e!="symbol"?e+"":e,a);var SM=BC((RM,sv)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function a(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(s){if(s.ep)return;s.ep=!0;const c=a(s);fetch(s.href,c)}})();try{}catch(r){console.error("[wxt] Failed to initialize plugins",r)}function qi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function UC(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var a=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};a.prototype=e.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(r).forEach(function(i){var s=Object.getOwnPropertyDescriptor(r,i);Object.defineProperty(a,i,s.get?s:{enumerable:!0,get:function(){return r[i]}})}),a}var Rg={exports:{}},bl={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ay;function MC(){if(ay)return bl;ay=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function a(i,s,c){var d=null;if(c!==void 0&&(d=""+c),s.key!==void 0&&(d=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:r,type:i,key:d,ref:s!==void 0?s:null,props:c}}return bl.Fragment=e,bl.jsx=a,bl.jsxs=a,bl}var ny;function _C(){return ny||(ny=1,Rg.exports=MC()),Rg.exports}var l=_C(),Dg={exports:{}},Il={},Bg={exports:{}},Ug={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ry;function FC(){return ry||(ry=1,function(r){function e(q,re){var Ee=q.length;q.push(re);e:for(;0<Ee;){var pe=Ee-1>>>1,j=q[pe];if(0<s(j,re))q[pe]=re,q[Ee]=j,Ee=pe;else break e}}function a(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var re=q[0],Ee=q.pop();if(Ee!==re){q[0]=Ee;e:for(var pe=0,j=q.length,X=j>>>1;pe<X;){var ee=2*(pe+1)-1,ie=q[ee],ve=ee+1,Ne=q[ve];if(0>s(ie,Ee))ve<j&&0>s(Ne,ie)?(q[pe]=Ne,q[ve]=Ee,pe=ve):(q[pe]=ie,q[ee]=Ee,pe=ee);else if(ve<j&&0>s(Ne,Ee))q[pe]=Ne,q[ve]=Ee,pe=ve;else break e}}return re}function s(q,re){var Ee=q.sortIndex-re.sortIndex;return Ee!==0?Ee:q.id-re.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;r.unstable_now=function(){return c.now()}}else{var d=Date,m=d.now();r.unstable_now=function(){return d.now()-m}}var f=[],g=[],E=1,p=null,N=3,v=!1,x=!1,T=!1,k=!1,L=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function O(q){for(var re=a(g);re!==null;){if(re.callback===null)i(g);else if(re.startTime<=q)i(g),re.sortIndex=re.expirationTime,e(f,re);else break;re=a(g)}}function M(q){if(T=!1,O(q),!x)if(a(f)!==null)x=!0,P||(P=!0,$());else{var re=a(g);re!==null&&he(M,re.startTime-q)}}var P=!1,G=-1,H=5,z=-1;function V(){return k?!0:!(r.unstable_now()-z<H)}function K(){if(k=!1,P){var q=r.unstable_now();z=q;var re=!0;try{e:{x=!1,T&&(T=!1,B(G),G=-1),v=!0;var Ee=N;try{t:{for(O(q),p=a(f);p!==null&&!(p.expirationTime>q&&V());){var pe=p.callback;if(typeof pe=="function"){p.callback=null,N=p.priorityLevel;var j=pe(p.expirationTime<=q);if(q=r.unstable_now(),typeof j=="function"){p.callback=j,O(q),re=!0;break t}p===a(f)&&i(f),O(q)}else i(f);p=a(f)}if(p!==null)re=!0;else{var X=a(g);X!==null&&he(M,X.startTime-q),re=!1}}break e}finally{p=null,N=Ee,v=!1}re=void 0}}finally{re?$():P=!1}}}var $;if(typeof S=="function")$=function(){S(K)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,ne=W.port2;W.port1.onmessage=K,$=function(){ne.postMessage(null)}}else $=function(){L(K,0)};function he(q,re){G=L(function(){q(r.unstable_now())},re)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(q){q.callback=null},r.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<q?Math.floor(1e3/q):5},r.unstable_getCurrentPriorityLevel=function(){return N},r.unstable_next=function(q){switch(N){case 1:case 2:case 3:var re=3;break;default:re=N}var Ee=N;N=re;try{return q()}finally{N=Ee}},r.unstable_requestPaint=function(){k=!0},r.unstable_runWithPriority=function(q,re){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var Ee=N;N=q;try{return re()}finally{N=Ee}},r.unstable_scheduleCallback=function(q,re,Ee){var pe=r.unstable_now();switch(typeof Ee=="object"&&Ee!==null?(Ee=Ee.delay,Ee=typeof Ee=="number"&&0<Ee?pe+Ee:pe):Ee=pe,q){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=Ee+j,q={id:E++,callback:re,priorityLevel:q,startTime:Ee,expirationTime:j,sortIndex:-1},Ee>pe?(q.sortIndex=Ee,e(g,q),a(f)===null&&q===a(g)&&(T?(B(G),G=-1):T=!0,he(M,Ee-pe))):(q.sortIndex=j,e(f,q),x||v||(x=!0,P||(P=!0,$()))),q},r.unstable_shouldYield=V,r.unstable_wrapCallback=function(q){var re=N;return function(){var Ee=N;N=re;try{return q.apply(this,arguments)}finally{N=Ee}}}}(Ug)),Ug}var iy;function OC(){return iy||(iy=1,Bg.exports=FC()),Bg.exports}var Mg={exports:{}},Nt={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var sy;function jC(){if(sy)return Nt;sy=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),p=Symbol.iterator;function N(j){return j===null||typeof j!="object"?null:(j=p&&j[p]||j["@@iterator"],typeof j=="function"?j:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,T={};function k(j,X,ee){this.props=j,this.context=X,this.refs=T,this.updater=ee||v}k.prototype.isReactComponent={},k.prototype.setState=function(j,X){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,X,"setState")},k.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function L(){}L.prototype=k.prototype;function B(j,X,ee){this.props=j,this.context=X,this.refs=T,this.updater=ee||v}var S=B.prototype=new L;S.constructor=B,x(S,k.prototype),S.isPureReactComponent=!0;var O=Array.isArray,M={H:null,A:null,T:null,S:null,V:null},P=Object.prototype.hasOwnProperty;function G(j,X,ee,ie,ve,Ne){return ee=Ne.ref,{$$typeof:r,type:j,key:X,ref:ee!==void 0?ee:null,props:Ne}}function H(j,X){return G(j.type,X,void 0,void 0,void 0,j.props)}function z(j){return typeof j=="object"&&j!==null&&j.$$typeof===r}function V(j){var X={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ee){return X[ee]})}var K=/\/+/g;function $(j,X){return typeof j=="object"&&j!==null&&j.key!=null?V(""+j.key):X.toString(36)}function W(){}function ne(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(W,W):(j.status="pending",j.then(function(X){j.status==="pending"&&(j.status="fulfilled",j.value=X)},function(X){j.status==="pending"&&(j.status="rejected",j.reason=X)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function he(j,X,ee,ie,ve){var Ne=typeof j;(Ne==="undefined"||Ne==="boolean")&&(j=null);var Re=!1;if(j===null)Re=!0;else switch(Ne){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(j.$$typeof){case r:case e:Re=!0;break;case E:return Re=j._init,he(Re(j._payload),X,ee,ie,ve)}}if(Re)return ve=ve(j),Re=ie===""?"."+$(j,0):ie,O(ve)?(ee="",Re!=null&&(ee=Re.replace(K,"$&/")+"/"),he(ve,X,ee,"",function(Ve){return Ve})):ve!=null&&(z(ve)&&(ve=H(ve,ee+(ve.key==null||j&&j.key===ve.key?"":(""+ve.key).replace(K,"$&/")+"/")+Re)),X.push(ve)),1;Re=0;var Be=ie===""?".":ie+":";if(O(j))for(var ke=0;ke<j.length;ke++)ie=j[ke],Ne=Be+$(ie,ke),Re+=he(ie,X,ee,Ne,ve);else if(ke=N(j),typeof ke=="function")for(j=ke.call(j),ke=0;!(ie=j.next()).done;)ie=ie.value,Ne=Be+$(ie,ke++),Re+=he(ie,X,ee,Ne,ve);else if(Ne==="object"){if(typeof j.then=="function")return he(ne(j),X,ee,ie,ve);throw X=String(j),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Re}function q(j,X,ee){if(j==null)return j;var ie=[],ve=0;return he(j,ie,"","",function(Ne){return X.call(ee,Ne,ve++)}),ie}function re(j){if(j._status===-1){var X=j._result;X=X(),X.then(function(ee){(j._status===0||j._status===-1)&&(j._status=1,j._result=ee)},function(ee){(j._status===0||j._status===-1)&&(j._status=2,j._result=ee)}),j._status===-1&&(j._status=0,j._result=X)}if(j._status===1)return j._result.default;throw j._result}var Ee=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)};function pe(){}return Nt.Children={map:q,forEach:function(j,X,ee){q(j,function(){X.apply(this,arguments)},ee)},count:function(j){var X=0;return q(j,function(){X++}),X},toArray:function(j){return q(j,function(X){return X})||[]},only:function(j){if(!z(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},Nt.Component=k,Nt.Fragment=a,Nt.Profiler=s,Nt.PureComponent=B,Nt.StrictMode=i,Nt.Suspense=f,Nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Nt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return M.H.useMemoCache(j)}},Nt.cache=function(j){return function(){return j.apply(null,arguments)}},Nt.cloneElement=function(j,X,ee){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ie=x({},j.props),ve=j.key,Ne=void 0;if(X!=null)for(Re in X.ref!==void 0&&(Ne=void 0),X.key!==void 0&&(ve=""+X.key),X)!P.call(X,Re)||Re==="key"||Re==="__self"||Re==="__source"||Re==="ref"&&X.ref===void 0||(ie[Re]=X[Re]);var Re=arguments.length-2;if(Re===1)ie.children=ee;else if(1<Re){for(var Be=Array(Re),ke=0;ke<Re;ke++)Be[ke]=arguments[ke+2];ie.children=Be}return G(j.type,ve,void 0,void 0,Ne,ie)},Nt.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:c,_context:j},j},Nt.createElement=function(j,X,ee){var ie,ve={},Ne=null;if(X!=null)for(ie in X.key!==void 0&&(Ne=""+X.key),X)P.call(X,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ve[ie]=X[ie]);var Re=arguments.length-2;if(Re===1)ve.children=ee;else if(1<Re){for(var Be=Array(Re),ke=0;ke<Re;ke++)Be[ke]=arguments[ke+2];ve.children=Be}if(j&&j.defaultProps)for(ie in Re=j.defaultProps,Re)ve[ie]===void 0&&(ve[ie]=Re[ie]);return G(j,Ne,void 0,void 0,null,ve)},Nt.createRef=function(){return{current:null}},Nt.forwardRef=function(j){return{$$typeof:m,render:j}},Nt.isValidElement=z,Nt.lazy=function(j){return{$$typeof:E,_payload:{_status:-1,_result:j},_init:re}},Nt.memo=function(j,X){return{$$typeof:g,type:j,compare:X===void 0?null:X}},Nt.startTransition=function(j){var X=M.T,ee={};M.T=ee;try{var ie=j(),ve=M.S;ve!==null&&ve(ee,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(pe,Ee)}catch(Ne){Ee(Ne)}finally{M.T=X}},Nt.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Nt.use=function(j){return M.H.use(j)},Nt.useActionState=function(j,X,ee){return M.H.useActionState(j,X,ee)},Nt.useCallback=function(j,X){return M.H.useCallback(j,X)},Nt.useContext=function(j){return M.H.useContext(j)},Nt.useDebugValue=function(){},Nt.useDeferredValue=function(j,X){return M.H.useDeferredValue(j,X)},Nt.useEffect=function(j,X,ee){var ie=M.H;if(typeof ee=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ie.useEffect(j,X)},Nt.useId=function(){return M.H.useId()},Nt.useImperativeHandle=function(j,X,ee){return M.H.useImperativeHandle(j,X,ee)},Nt.useInsertionEffect=function(j,X){return M.H.useInsertionEffect(j,X)},Nt.useLayoutEffect=function(j,X){return M.H.useLayoutEffect(j,X)},Nt.useMemo=function(j,X){return M.H.useMemo(j,X)},Nt.useOptimistic=function(j,X){return M.H.useOptimistic(j,X)},Nt.useReducer=function(j,X,ee){return M.H.useReducer(j,X,ee)},Nt.useRef=function(j){return M.H.useRef(j)},Nt.useState=function(j){return M.H.useState(j)},Nt.useSyncExternalStore=function(j,X,ee){return M.H.useSyncExternalStore(j,X,ee)},Nt.useTransition=function(){return M.H.useTransition()},Nt.version="19.1.0",Nt}var oy;function fh(){return oy||(oy=1,Mg.exports=jC()),Mg.exports}var _g={exports:{}},sn={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ly;function PC(){if(ly)return sn;ly=1;var r=fh();function e(f){var g="https://react.dev/errors/"+f;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)g+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+f+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var i={d:{f:a,r:function(){throw Error(e(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(f,g,E){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:f,containerInfo:g,implementation:E}}var d=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(f,g){if(f==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,sn.createPortal=function(f,g){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return c(f,g,null,E)},sn.flushSync=function(f){var g=d.T,E=i.p;try{if(d.T=null,i.p=2,f)return f()}finally{d.T=g,i.p=E,i.d.f()}},sn.preconnect=function(f,g){typeof f=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(f,g))},sn.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},sn.preinit=function(f,g){if(typeof f=="string"&&g&&typeof g.as=="string"){var E=g.as,p=m(E,g.crossOrigin),N=typeof g.integrity=="string"?g.integrity:void 0,v=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;E==="style"?i.d.S(f,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:N,fetchPriority:v}):E==="script"&&i.d.X(f,{crossOrigin:p,integrity:N,fetchPriority:v,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},sn.preinitModule=function(f,g){if(typeof f=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var E=m(g.as,g.crossOrigin);i.d.M(f,{crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(f)},sn.preload=function(f,g){if(typeof f=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var E=g.as,p=m(E,g.crossOrigin);i.d.L(f,E,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},sn.preloadModule=function(f,g){if(typeof f=="string")if(g){var E=m(g.as,g.crossOrigin);i.d.m(f,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(f)},sn.requestFormReset=function(f){i.d.r(f)},sn.unstable_batchedUpdates=function(f,g){return f(g)},sn.useFormState=function(f,g,E){return d.H.useFormState(f,g,E)},sn.useFormStatus=function(){return d.H.useHostTransitionStatus()},sn.version="19.1.0",sn}var cy;function HC(){if(cy)return _g.exports;cy=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),_g.exports=PC(),_g.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var uy;function zC(){if(uy)return Il;uy=1;var r=OC(),e=fh(),a=HC();function i(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){var n=t,o=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(o=n.return),t=n.return;while(t)}return n.tag===3?o:null}function d(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function m(t){if(c(t)!==t)throw Error(i(188))}function f(t){var n=t.alternate;if(!n){if(n=c(t),n===null)throw Error(i(188));return n!==t?null:t}for(var o=t,u=n;;){var h=o.return;if(h===null)break;var y=h.alternate;if(y===null){if(u=h.return,u!==null){o=u;continue}break}if(h.child===y.child){for(y=h.child;y;){if(y===o)return m(h),t;if(y===u)return m(h),n;y=y.sibling}throw Error(i(188))}if(o.return!==u.return)o=h,u=y;else{for(var R=!1,_=h.child;_;){if(_===o){R=!0,o=h,u=y;break}if(_===u){R=!0,u=h,o=y;break}_=_.sibling}if(!R){for(_=y.child;_;){if(_===o){R=!0,o=y,u=h;break}if(_===u){R=!0,u=y,o=h;break}_=_.sibling}if(!R)throw Error(i(189))}}if(o.alternate!==u)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?t:n}function g(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=g(t),n!==null)return n;t=t.sibling}return null}var E=Object.assign,p=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),B=Symbol.for("react.consumer"),S=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function $(t){return t===null||typeof t!="object"?null:(t=K&&t[K]||t["@@iterator"],typeof t=="function"?t:null)}var W=Symbol.for("react.client.reference");function ne(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===W?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case x:return"Fragment";case k:return"Profiler";case T:return"StrictMode";case M:return"Suspense";case P:return"SuspenseList";case z:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case v:return"Portal";case S:return(t.displayName||"Context")+".Provider";case B:return(t._context.displayName||"Context")+".Consumer";case O:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case G:return n=t.displayName||null,n!==null?n:ne(t.type)||"Memo";case H:n=t._payload,t=t._init;try{return ne(t(n))}catch{}}return null}var he=Array.isArray,q=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee={pending:!1,data:null,method:null,action:null},pe=[],j=-1;function X(t){return{current:t}}function ee(t){0>j||(t.current=pe[j],pe[j]=null,j--)}function ie(t,n){j++,pe[j]=t.current,t.current=n}var ve=X(null),Ne=X(null),Re=X(null),Be=X(null);function ke(t,n){switch(ie(Re,n),ie(Ne,t),ie(ve,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?L0(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=L0(n),t=R0(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ee(ve),ie(ve,t)}function Ve(){ee(ve),ee(Ne),ee(Re)}function vt(t){t.memoizedState!==null&&ie(Be,t);var n=ve.current,o=R0(n,t.type);n!==o&&(ie(Ne,t),ie(ve,o))}function Ct(t){Ne.current===t&&(ee(ve),ee(Ne)),Be.current===t&&(ee(Be),hl._currentValue=Ee)}var Ut=Object.prototype.hasOwnProperty,tt=r.unstable_scheduleCallback,nt=r.unstable_cancelCallback,Te=r.unstable_shouldYield,me=r.unstable_requestPaint,De=r.unstable_now,Pe=r.unstable_getCurrentPriorityLevel,ze=r.unstable_ImmediatePriority,at=r.unstable_UserBlockingPriority,Ye=r.unstable_NormalPriority,dt=r.unstable_LowPriority,jt=r.unstable_IdlePriority,qt=r.log,Qt=r.unstable_setDisableYieldValue,na=null,U=null;function C(t){if(typeof qt=="function"&&Qt(t),U&&typeof U.setStrictMode=="function")try{U.setStrictMode(na,t)}catch{}}var w=Math.clz32?Math.clz32:fe,Q=Math.log,ae=Math.LN2;function fe(t){return t>>>=0,t===0?32:31-(Q(t)/ae|0)|0}var be=256,Ue=4194304;function ht(t){var n=t&42;if(n!==0)return n;switch(t&-t){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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Et(t,n,o){var u=t.pendingLanes;if(u===0)return 0;var h=0,y=t.suspendedLanes,R=t.pingedLanes;t=t.warmLanes;var _=u&134217727;return _!==0?(u=_&~y,u!==0?h=ht(u):(R&=_,R!==0?h=ht(R):o||(o=_&~t,o!==0&&(h=ht(o))))):(_=u&~y,_!==0?h=ht(_):R!==0?h=ht(R):o||(o=u&~t,o!==0&&(h=ht(o)))),h===0?0:n!==0&&n!==h&&(n&y)===0&&(y=h&-h,o=n&-n,y>=o||y===32&&(o&4194048)!==0)?n:h}function St(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function mt(t,n){switch(t){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32: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 n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gr(){var t=be;return be<<=1,(be&4194048)===0&&(be=256),t}function ra(){var t=Ue;return Ue<<=1,(Ue&62914560)===0&&(Ue=4194304),t}function an(t){for(var n=[],o=0;31>o;o++)n.push(t);return n}function On(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function jn(t,n,o,u,h,y){var R=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var _=t.entanglements,Y=t.expirationTimes,de=t.hiddenUpdates;for(o=R&~o;0<o;){var Ie=31-w(o),xe=1<<Ie;_[Ie]=0,Y[Ie]=-1;var ge=de[Ie];if(ge!==null)for(de[Ie]=null,Ie=0;Ie<ge.length;Ie++){var Ae=ge[Ie];Ae!==null&&(Ae.lane&=-536870913)}o&=~xe}u!==0&&Oe(t,u,0),y!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=y&~(R&~n))}function Oe(t,n,o){t.pendingLanes|=n,t.suspendedLanes&=~n;var u=31-w(n);t.entangledLanes|=n,t.entanglements[u]=t.entanglements[u]|1073741824|o&4194090}function ci(t,n){var o=t.entangledLanes|=n;for(t=t.entanglements;o;){var u=31-w(o),h=1<<u;h&n|t[u]&n&&(t[u]|=n),o&=~h}}function Zt(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function sa(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function tr(){var t=re.p;return t!==0?t:(t=window.event,t===void 0?32:J0(t.type))}function ar(t,n){var o=re.p;try{return re.p=t,n()}finally{re.p=o}}var Ra=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Ra,ya="__reactProps$"+Ra,Wt="__reactContainer$"+Ra,Da="__reactEvents$"+Ra,ja="__reactListeners$"+Ra,Rr="__reactHandles$"+Ra,oe="__reactResources$"+Ra,_e="__reactMarker$"+Ra;function Me(t){delete t[Vt],delete t[ya],delete t[Da],delete t[ja],delete t[Rr]}function Xe(t){var n=t[Vt];if(n)return n;for(var o=t.parentNode;o;){if(n=o[Wt]||o[Vt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(t=M0(t);t!==null;){if(o=t[Vt])return o;t=M0(t)}return n}t=o,o=t.parentNode}return null}function kt(t){if(t=t[Vt]||t[Wt]){var n=t.tag;if(n===5||n===6||n===13||n===26||n===27||n===3)return t}return null}function bt(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t.stateNode;throw Error(i(33))}function it(t){var n=t[oe];return n||(n=t[oe]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function st(t){t[_e]=!0}var cn=new Set,Fe={};function Z(t,n){we(t,n),we(t+"Capture",n)}function we(t,n){for(Fe[t]=n,t=0;t<n.length;t++)cn.add(n[t])}var He=RegExp("^[: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]*$"),Mt={},ca={};function oa(t){return Ut.call(ca,t)?!0:Ut.call(Mt,t)?!1:He.test(t)?ca[t]=!0:(Mt[t]=!0,!1)}function la(t,n,o){if(oa(n))if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(n);return}}t.setAttribute(n,""+o)}}function qa(t,n,o){if(o===null)t.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttribute(n,""+o)}}function va(t,n,o,u){if(u===null)t.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(n,o,""+u)}}var fr,ea;function xn(t){if(fr===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);fr=n&&n[1]||"",ea=-1<o.stack.indexOf(`
    at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
`+fr+t+ea}var Dr=!1;function ks(t,n){if(!t||Dr)return"";Dr=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(Ae){var ge=Ae}Reflect.construct(t,[],xe)}else{try{xe.call()}catch(Ae){ge=Ae}t.call(xe.prototype)}}else{try{throw Error()}catch(Ae){ge=Ae}(xe=t())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(Ae){if(Ae&&ge&&typeof Ae.stack=="string")return[Ae.stack,ge.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),R=y[0],_=y[1];if(R&&_){var Y=R.split(`
`),de=_.split(`
`);for(h=u=0;u<Y.length&&!Y[u].includes("DetermineComponentFrameRoot");)u++;for(;h<de.length&&!de[h].includes("DetermineComponentFrameRoot");)h++;if(u===Y.length||h===de.length)for(u=Y.length-1,h=de.length-1;1<=u&&0<=h&&Y[u]!==de[h];)h--;for(;1<=u&&0<=h;u--,h--)if(Y[u]!==de[h]){if(u!==1||h!==1)do if(u--,h--,0>h||Y[u]!==de[h]){var Ie=`
`+Y[u].replace(" at new "," at ");return t.displayName&&Ie.includes("<anonymous>")&&(Ie=Ie.replace("<anonymous>",t.displayName)),Ie}while(1<=u&&0<=h);break}}}finally{Dr=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?xn(o):""}function tc(t){switch(t.tag){case 26:case 27:case 5:return xn(t.type);case 16:return xn("Lazy");case 13:return xn("Suspense");case 19:return xn("SuspenseList");case 0:case 15:return ks(t.type,!1);case 11:return ks(t.type.render,!1);case 1:return ks(t.type,!0);case 31:return xn("Activity");default:return""}}function ac(t){try{var n="";do n+=tc(t),t=t.return;while(t);return n}catch(o){return`
Error generating stack: `+o.message+`
`+o.stack}}function Ca(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Yt(t){var n=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Br(t){var n=Yt(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,n),u=""+t[n];if(!t.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,y=o.set;return Object.defineProperty(t,n,{configurable:!0,get:function(){return h.call(this)},set:function(R){u=""+R,y.call(this,R)}}),Object.defineProperty(t,n,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(R){u=""+R},stopTracking:function(){t._valueTracker=null,delete t[n]}}}}function Ur(t){t._valueTracker||(t._valueTracker=Br(t))}function Wi(t){if(!t)return!1;var n=t._valueTracker;if(!n)return!0;var o=n.getValue(),u="";return t&&(u=Yt(t)?t.checked?"true":"false":t.value),t=u,t!==o?(n.setValue(t),!0):!1}function Mr(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var wo=/[\n"\\]/g;function An(t){return t.replace(wo,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function xo(t,n,o,u,h,y,R,_){t.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?t.type=R:t.removeAttribute("type"),n!=null?R==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+Ca(n)):t.value!==""+Ca(n)&&(t.value=""+Ca(n)):R!=="submit"&&R!=="reset"||t.removeAttribute("value"),n!=null?Ls(t,R,Ca(n)):o!=null?Ls(t,R,Ca(o)):u!=null&&t.removeAttribute("value"),h==null&&y!=null&&(t.defaultChecked=!!y),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?t.name=""+Ca(_):t.removeAttribute("name")}function ui(t,n,o,u,h,y,R,_){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.type=y),n!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||n!=null))return;o=o!=null?""+Ca(o):"",n=n!=null?""+Ca(n):o,_||n===t.value||(t.value=n),t.defaultValue=n}u=u??h,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=_?t.checked:!!u,t.defaultChecked=!!u,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(t.name=R)}function Ls(t,n,o){n==="number"&&Mr(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function di(t,n,o,u){if(t=t.options,n){n={};for(var h=0;h<o.length;h++)n["$"+o[h]]=!0;for(o=0;o<t.length;o++)h=n.hasOwnProperty("$"+t[o].value),t[o].selected!==h&&(t[o].selected=h),h&&u&&(t[o].defaultSelected=!0)}else{for(o=""+Ca(o),n=null,h=0;h<t.length;h++){if(t[h].value===o){t[h].selected=!0,u&&(t[h].defaultSelected=!0);return}n!==null||t[h].disabled||(n=t[h])}n!==null&&(n.selected=!0)}}function Rs(t,n,o){if(n!=null&&(n=""+Ca(n),n!==t.value&&(t.value=n),o==null)){t.defaultValue!==n&&(t.defaultValue=n);return}t.defaultValue=o!=null?""+Ca(o):""}function To(t,n,o,u){if(n==null){if(u!=null){if(o!=null)throw Error(i(92));if(he(u)){if(1<u.length)throw Error(i(93));u=u[0]}o=u}o==null&&(o=""),n=o}o=Ca(n),t.defaultValue=o,u=t.textContent,u===o&&u!==""&&u!==null&&(t.value=u)}function hr(t,n){if(n){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=n;return}}t.textContent=n}var So=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function nc(t,n,o){var u=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="":u?t.setProperty(n,o):typeof o!="number"||o===0||So.has(n)?n==="float"?t.cssFloat=o:t[n]=(""+o).trim():t[n]=o+"px"}function Yi(t,n,o){if(n!=null&&typeof n!="object")throw Error(i(62));if(t=t.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var h in n)u=n[h],n.hasOwnProperty(h)&&o[h]!==u&&nc(t,h,u)}else for(var y in n)n.hasOwnProperty(y)&&nc(t,y,n[y])}function mi(t){if(t.indexOf("-")===-1)return!1;switch(t){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 _r=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ko=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function pn(t){return ko.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Pn=null;function Fr(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var gi=null,Je=null;function Ds(t){var n=kt(t);if(n&&(t=n.stateNode)){var o=t[ya]||null;e:switch(t=n.stateNode,n.type){case"input":if(xo(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+An(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var u=o[n];if(u!==t&&u.form===t.form){var h=u[ya]||null;if(!h)throw Error(i(90));xo(u,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(n=0;n<o.length;n++)u=o[n],u.form===t.form&&Wi(u)}break e;case"textarea":Rs(t,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&di(t,!!o.multiple,n,!1)}}}var fi=!1;function Lo(t,n,o){if(fi)return t(n,o);fi=!0;try{var u=t(n);return u}finally{if(fi=!1,(gi!==null||Je!==null)&&(Qc(),gi&&(n=gi,t=Je,Je=gi=null,Ds(n),t)))for(n=0;n<t.length;n++)Ds(t[n])}}function hi(t,n){var o=t.stateNode;if(o===null)return null;var u=o[ya]||null;if(u===null)return null;o=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(i(231,n,typeof o));return o}var un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hn=!1;if(un)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){Hn=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{Hn=!1}var zn=null,A=null,b=null;function D(){if(b)return b;var t,n=A,o=n.length,u,h="value"in zn?zn.value:zn.textContent,y=h.length;for(t=0;t<o&&n[t]===h[t];t++);var R=o-t;for(u=1;u<=R&&n[o-u]===h[y-u];u++);return b=h.slice(t,1<u?1-u:void 0)}function F(t){var n=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&n===13&&(t=13)):t=n,t===10&&(t=13),32<=t||t===13?t:0}function J(){return!0}function ce(){return!1}function ye(t){function n(o,u,h,y,R){this._reactName=o,this._targetInst=h,this.type=u,this.nativeEvent=y,this.target=R,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(o=t[_],this[_]=o?o(y):y[_]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?J:ce,this.isPropagationStopped=ce,this}return E(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=J)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=J)},persist:function(){},isPersistent:J}),n}var Ge={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},It=ye(Ge),At=E({},Ge,{view:0,detail:0}),ua=ye(At),Pa,Bs,Ji,Xi=E({},At,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bo,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ji&&(Ji&&t.type==="mousemove"?(Pa=t.screenX-Ji.screenX,Bs=t.screenY-Ji.screenY):Bs=Pa=0,Ji=t),Pa)},movementY:function(t){return"movementY"in t?t.movementY:Bs}}),rc=ye(Xi),ic=E({},Xi,{dataTransfer:0}),Ed=ye(ic),bd=E({},At,{relatedTarget:0}),Ro=ye(bd),Id=E({},Ge,{animationName:0,elapsedTime:0,pseudoElement:0}),vd=ye(Id),Cd=E({},Ge,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Nd=ye(Cd),wd=E({},Ge,{data:0}),Do=ye(wd),xd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Td={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"},Sd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kd(t){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(t):(t=Sd[t])?!!n[t]:!1}function Bo(){return kd}var Ld=E({},At,{key:function(t){if(t.key){var n=xd[t.key]||t.key;if(n!=="Unidentified")return n}return t.type==="keypress"?(t=F(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Td[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bo,charCode:function(t){return t.type==="keypress"?F(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?F(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Rd=ye(Ld),sc=E({},Xi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oc=ye(sc),Dd=E({},At,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bo}),Bd=ye(Dd),Ud=E({},Ge,{propertyName:0,elapsedTime:0,pseudoElement:0}),Md=ye(Ud),_d=E({},Xi,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),lc=ye(_d),Fd=E({},Ge,{newState:0,oldState:0}),Od=ye(Fd),jd=[9,13,27,32],Ai=un&&"CompositionEvent"in window,pi=null;un&&"documentMode"in document&&(pi=document.documentMode);var cc=un&&"TextEvent"in window&&!pi,Uo=un&&(!Ai||pi&&8<pi&&11>=pi),le=" ",Le=!1;function Ke(t,n){switch(t){case"keyup":return jd.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rt(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var lt=!1;function Pt(t,n){switch(t){case"compositionend":return rt(n);case"keypress":return n.which!==32?null:(Le=!0,le);case"textInput":return t=n.data,t===le&&Le?null:t;default:return null}}function Tn(t,n){if(lt)return t==="compositionend"||!Ai&&Ke(t,n)?(t=D(),b=A=zn=null,lt=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Uo&&n.locale!=="ko"?null:n.data;default:return null}}var yn={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 nn(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n==="input"?!!yn[t.type]:n==="textarea"}function En(t,n,o,u){gi?Je?Je.push(u):Je=[u]:gi=u,n=Yc(n,"onChange"),0<n.length&&(o=new It("onChange","change",null,o,u),t.push({event:o,listeners:n}))}var Or=null,Sn=null;function Pd(t){w0(t,0)}function uc(t){var n=bt(t);if(Wi(n))return t}function Kh(t,n){if(t==="change")return n}var qh=!1;if(un){var Hd;if(un){var zd="oninput"in document;if(!zd){var Wh=document.createElement("div");Wh.setAttribute("oninput","return;"),zd=typeof Wh.oninput=="function"}Hd=zd}else Hd=!1;qh=Hd&&(!document.documentMode||9<document.documentMode)}function Yh(){Or&&(Or.detachEvent("onpropertychange",Jh),Sn=Or=null)}function Jh(t){if(t.propertyName==="value"&&uc(Sn)){var n=[];En(n,Sn,t,Fr(t)),Lo(Pd,n)}}function ov(t,n,o){t==="focusin"?(Yh(),Or=n,Sn=o,Or.attachEvent("onpropertychange",Jh)):t==="focusout"&&Yh()}function lv(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return uc(Sn)}function cv(t,n){if(t==="click")return uc(n)}function uv(t,n){if(t==="input"||t==="change")return uc(n)}function dv(t,n){return t===n&&(t!==0||1/t===1/n)||t!==t&&n!==n}var kn=typeof Object.is=="function"?Object.is:dv;function Mo(t,n){if(kn(t,n))return!0;if(typeof t!="object"||t===null||typeof n!="object"||n===null)return!1;var o=Object.keys(t),u=Object.keys(n);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var h=o[u];if(!Ut.call(n,h)||!kn(t[h],n[h]))return!1}return!0}function Xh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function $h(t,n){var o=Xh(t);t=0;for(var u;o;){if(o.nodeType===3){if(u=t+o.textContent.length,t<=n&&u>=n)return{node:o,offset:n-t};t=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Xh(o)}}function Zh(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?Zh(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function eA(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=Mr(t.document);n instanceof t.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)t=n.contentWindow;else break;n=Mr(t.document)}return n}function Qd(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var mv=un&&"documentMode"in document&&11>=document.documentMode,Us=null,Vd=null,_o=null,Gd=!1;function tA(t,n,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Gd||Us==null||Us!==Mr(u)||(u=Us,"selectionStart"in u&&Qd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),_o&&Mo(_o,u)||(_o=u,u=Yc(Vd,"onSelect"),0<u.length&&(n=new It("onSelect","select",null,n,o),t.push({event:n,listeners:u}),n.target=Us)))}function $i(t,n){var o={};return o[t.toLowerCase()]=n.toLowerCase(),o["Webkit"+t]="webkit"+n,o["Moz"+t]="moz"+n,o}var Ms={animationend:$i("Animation","AnimationEnd"),animationiteration:$i("Animation","AnimationIteration"),animationstart:$i("Animation","AnimationStart"),transitionrun:$i("Transition","TransitionRun"),transitionstart:$i("Transition","TransitionStart"),transitioncancel:$i("Transition","TransitionCancel"),transitionend:$i("Transition","TransitionEnd")},Kd={},aA={};un&&(aA=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function Zi(t){if(Kd[t])return Kd[t];if(!Ms[t])return t;var n=Ms[t],o;for(o in n)if(n.hasOwnProperty(o)&&o in aA)return Kd[t]=n[o];return t}var nA=Zi("animationend"),rA=Zi("animationiteration"),iA=Zi("animationstart"),gv=Zi("transitionrun"),fv=Zi("transitionstart"),hv=Zi("transitioncancel"),sA=Zi("transitionend"),oA=new Map,qd="abort auxClick beforeToggle 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(" ");qd.push("scrollEnd");function rr(t,n){oA.set(t,n),Z(n,[t])}var lA=new WeakMap;function Qn(t,n){if(typeof t=="object"&&t!==null){var o=lA.get(t);return o!==void 0?o:(n={value:t,source:n,stack:ac(n)},lA.set(t,n),n)}return{value:t,source:n,stack:ac(n)}}var Vn=[],_s=0,Wd=0;function dc(){for(var t=_s,n=Wd=_s=0;n<t;){var o=Vn[n];Vn[n++]=null;var u=Vn[n];Vn[n++]=null;var h=Vn[n];Vn[n++]=null;var y=Vn[n];if(Vn[n++]=null,u!==null&&h!==null){var R=u.pending;R===null?h.next=h:(h.next=R.next,R.next=h),u.pending=h}y!==0&&cA(o,h,y)}}function mc(t,n,o,u){Vn[_s++]=t,Vn[_s++]=n,Vn[_s++]=o,Vn[_s++]=u,Wd|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function Yd(t,n,o,u){return mc(t,n,o,u),gc(t)}function Fs(t,n){return mc(t,null,null,n),gc(t)}function cA(t,n,o){t.lanes|=o;var u=t.alternate;u!==null&&(u.lanes|=o);for(var h=!1,y=t.return;y!==null;)y.childLanes|=o,u=y.alternate,u!==null&&(u.childLanes|=o),y.tag===22&&(t=y.stateNode,t===null||t._visibility&1||(h=!0)),t=y,y=y.return;return t.tag===3?(y=t.stateNode,h&&n!==null&&(h=31-w(o),t=y.hiddenUpdates,u=t[h],u===null?t[h]=[n]:u.push(n),n.lane=o|536870912),y):null}function gc(t){if(50<ol)throw ol=0,tg=null,Error(i(185));for(var n=t.return;n!==null;)t=n,n=t.return;return t.tag===3?t.stateNode:null}var Os={};function Av(t,n,o,u){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(t,n,o,u){return new Av(t,n,o,u)}function Jd(t){return t=t.prototype,!(!t||!t.isReactComponent)}function jr(t,n){var o=t.alternate;return o===null?(o=Ln(t.tag,n,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=n,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,n=t.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function uA(t,n){t.flags&=65011714;var o=t.alternate;return o===null?(t.childLanes=0,t.lanes=n,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,n=o.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),t}function fc(t,n,o,u,h,y){var R=0;if(u=t,typeof t=="function")Jd(t)&&(R=1);else if(typeof t=="string")R=yC(t,o,ve.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case z:return t=Ln(31,o,n,h),t.elementType=z,t.lanes=y,t;case x:return es(o.children,h,y,n);case T:R=8,h|=24;break;case k:return t=Ln(12,o,n,h|2),t.elementType=k,t.lanes=y,t;case M:return t=Ln(13,o,n,h),t.elementType=M,t.lanes=y,t;case P:return t=Ln(19,o,n,h),t.elementType=P,t.lanes=y,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L:case S:R=10;break e;case B:R=9;break e;case O:R=11;break e;case G:R=14;break e;case H:R=16,u=null;break e}R=29,o=Error(i(130,t===null?"null":typeof t,"")),u=null}return n=Ln(R,o,n,h),n.elementType=t,n.type=u,n.lanes=y,n}function es(t,n,o,u){return t=Ln(7,t,u,n),t.lanes=o,t}function Xd(t,n,o){return t=Ln(6,t,null,n),t.lanes=o,t}function $d(t,n,o){return n=Ln(4,t.children!==null?t.children:[],t.key,n),n.lanes=o,n.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},n}var js=[],Ps=0,hc=null,Ac=0,Gn=[],Kn=0,ts=null,Pr=1,Hr="";function as(t,n){js[Ps++]=Ac,js[Ps++]=hc,hc=t,Ac=n}function dA(t,n,o){Gn[Kn++]=Pr,Gn[Kn++]=Hr,Gn[Kn++]=ts,ts=t;var u=Pr;t=Hr;var h=32-w(u)-1;u&=~(1<<h),o+=1;var y=32-w(n)+h;if(30<y){var R=h-h%5;y=(u&(1<<R)-1).toString(32),u>>=R,h-=R,Pr=1<<32-w(n)+h|o<<h|u,Hr=y+t}else Pr=1<<y|o<<h|u,Hr=t}function Zd(t){t.return!==null&&(as(t,1),dA(t,1,0))}function em(t){for(;t===hc;)hc=js[--Ps],js[Ps]=null,Ac=js[--Ps],js[Ps]=null;for(;t===ts;)ts=Gn[--Kn],Gn[Kn]=null,Hr=Gn[--Kn],Gn[Kn]=null,Pr=Gn[--Kn],Gn[Kn]=null}var dn=null,Ea=null,Ht=!1,ns=null,Ar=!1,tm=Error(i(519));function rs(t){var n=Error(i(418,""));throw jo(Qn(n,t)),tm}function mA(t){var n=t.stateNode,o=t.type,u=t.memoizedProps;switch(n[Vt]=t,n[ya]=u,o){case"dialog":Bt("cancel",n),Bt("close",n);break;case"iframe":case"object":case"embed":Bt("load",n);break;case"video":case"audio":for(o=0;o<cl.length;o++)Bt(cl[o],n);break;case"source":Bt("error",n);break;case"img":case"image":case"link":Bt("error",n),Bt("load",n);break;case"details":Bt("toggle",n);break;case"input":Bt("invalid",n),ui(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Ur(n);break;case"select":Bt("invalid",n);break;case"textarea":Bt("invalid",n),To(n,u.value,u.defaultValue,u.children),Ur(n)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||u.suppressHydrationWarning===!0||k0(n.textContent,o)?(u.popover!=null&&(Bt("beforetoggle",n),Bt("toggle",n)),u.onScroll!=null&&Bt("scroll",n),u.onScrollEnd!=null&&Bt("scrollend",n),u.onClick!=null&&(n.onclick=Jc),n=!0):n=!1,n||rs(t)}function gA(t){for(dn=t.return;dn;)switch(dn.tag){case 5:case 13:Ar=!1;return;case 27:case 3:Ar=!0;return;default:dn=dn.return}}function Fo(t){if(t!==dn)return!1;if(!Ht)return gA(t),Ht=!0,!1;var n=t.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||pg(t.type,t.memoizedProps)),o=!o),o&&Ea&&rs(t),gA(t),n===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(i(317));e:{for(t=t.nextSibling,n=0;t;){if(t.nodeType===8)if(o=t.data,o==="/$"){if(n===0){Ea=sr(t.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++;t=t.nextSibling}Ea=null}}else n===27?(n=Ea,Bi(t.type)?(t=Ig,Ig=null,Ea=t):Ea=n):Ea=dn?sr(t.stateNode.nextSibling):null;return!0}function Oo(){Ea=dn=null,Ht=!1}function fA(){var t=ns;return t!==null&&(vn===null?vn=t:vn.push.apply(vn,t),ns=null),t}function jo(t){ns===null?ns=[t]:ns.push(t)}var am=X(null),is=null,zr=null;function yi(t,n,o){ie(am,n._currentValue),n._currentValue=o}function Qr(t){t._currentValue=am.current,ee(am)}function nm(t,n,o){for(;t!==null;){var u=t.alternate;if((t.childLanes&n)!==n?(t.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),t===o)break;t=t.return}}function rm(t,n,o,u){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var y=h.dependencies;if(y!==null){var R=h.child;y=y.firstContext;e:for(;y!==null;){var _=y;y=h;for(var Y=0;Y<n.length;Y++)if(_.context===n[Y]){y.lanes|=o,_=y.alternate,_!==null&&(_.lanes|=o),nm(y.return,o,t),u||(R=null);break e}y=_.next}}else if(h.tag===18){if(R=h.return,R===null)throw Error(i(341));R.lanes|=o,y=R.alternate,y!==null&&(y.lanes|=o),nm(R,o,t),R=null}else R=h.child;if(R!==null)R.return=h;else for(R=h;R!==null;){if(R===t){R=null;break}if(h=R.sibling,h!==null){h.return=R.return,R=h;break}R=R.return}h=R}}function Po(t,n,o,u){t=null;for(var h=n,y=!1;h!==null;){if(!y){if((h.flags&524288)!==0)y=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var R=h.alternate;if(R===null)throw Error(i(387));if(R=R.memoizedProps,R!==null){var _=h.type;kn(h.pendingProps.value,R.value)||(t!==null?t.push(_):t=[_])}}else if(h===Be.current){if(R=h.alternate,R===null)throw Error(i(387));R.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(hl):t=[hl])}h=h.return}t!==null&&rm(n,t,o,u),n.flags|=262144}function pc(t){for(t=t.firstContext;t!==null;){if(!kn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ss(t){is=t,zr=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function rn(t){return hA(is,t)}function yc(t,n){return is===null&&ss(t),hA(t,n)}function hA(t,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},zr===null){if(t===null)throw Error(i(308));zr=n,t.dependencies={lanes:0,firstContext:n},t.flags|=524288}else zr=zr.next=n;return o}var pv=typeof AbortController<"u"?AbortController:function(){var t=[],n=this.signal={aborted:!1,addEventListener:function(o,u){t.push(u)}};this.abort=function(){n.aborted=!0,t.forEach(function(o){return o()})}},yv=r.unstable_scheduleCallback,Ev=r.unstable_NormalPriority,Ba={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function im(){return{controller:new pv,data:new Map,refCount:0}}function Ho(t){t.refCount--,t.refCount===0&&yv(Ev,function(){t.controller.abort()})}var zo=null,sm=0,Hs=0,zs=null;function bv(t,n){if(zo===null){var o=zo=[];sm=0,Hs=lg(),zs={status:"pending",value:void 0,then:function(u){o.push(u)}}}return sm++,n.then(AA,AA),n}function AA(){if(--sm===0&&zo!==null){zs!==null&&(zs.status="fulfilled");var t=zo;zo=null,Hs=0,zs=null;for(var n=0;n<t.length;n++)(0,t[n])()}}function Iv(t,n){var o=[],u={status:"pending",value:null,reason:null,then:function(h){o.push(h)}};return t.then(function(){u.status="fulfilled",u.value=n;for(var h=0;h<o.length;h++)(0,o[h])(n)},function(h){for(u.status="rejected",u.reason=h,h=0;h<o.length;h++)(0,o[h])(void 0)}),u}var pA=q.S;q.S=function(t,n){typeof n=="object"&&n!==null&&typeof n.then=="function"&&bv(t,n),pA!==null&&pA(t,n)};var os=X(null);function om(){var t=os.current;return t!==null?t:ia.pooledCache}function Ec(t,n){n===null?ie(os,os.current):ie(os,n.pool)}function yA(){var t=om();return t===null?null:{parent:Ba._currentValue,pool:t}}var Qo=Error(i(460)),EA=Error(i(474)),bc=Error(i(542)),lm={then:function(){}};function bA(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ic(){}function IA(t,n,o){switch(o=t[o],o===void 0?t.push(n):o!==n&&(n.then(Ic,Ic),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,CA(t),t;default:if(typeof n.status=="string")n.then(Ic,Ic);else{if(t=ia,t!==null&&100<t.shellSuspendCounter)throw Error(i(482));t=n,t.status="pending",t.then(function(u){if(n.status==="pending"){var h=n;h.status="fulfilled",h.value=u}},function(u){if(n.status==="pending"){var h=n;h.status="rejected",h.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw t=n.reason,CA(t),t}throw Vo=n,Qo}}var Vo=null;function vA(){if(Vo===null)throw Error(i(459));var t=Vo;return Vo=null,t}function CA(t){if(t===Qo||t===bc)throw Error(i(483))}var Ei=!1;function cm(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function um(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function bi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ii(t,n,o){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Gt&2)!==0){var h=u.pending;return h===null?n.next=n:(n.next=h.next,h.next=n),u.pending=n,n=gc(t),cA(t,null,o),n}return mc(t,u,n,o),gc(t)}function Go(t,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var u=n.lanes;u&=t.pendingLanes,o|=u,n.lanes=o,ci(t,o)}}function dm(t,n){var o=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var h=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var R={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?h=y=R:y=y.next=R,o=o.next}while(o!==null);y===null?h=y=n:y=y.next=n}else h=y=n;o={baseState:u.baseState,firstBaseUpdate:h,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=n:t.next=n,o.lastBaseUpdate=n}var mm=!1;function Ko(){if(mm){var t=zs;if(t!==null)throw t}}function qo(t,n,o,u){mm=!1;var h=t.updateQueue;Ei=!1;var y=h.firstBaseUpdate,R=h.lastBaseUpdate,_=h.shared.pending;if(_!==null){h.shared.pending=null;var Y=_,de=Y.next;Y.next=null,R===null?y=de:R.next=de,R=Y;var Ie=t.alternate;Ie!==null&&(Ie=Ie.updateQueue,_=Ie.lastBaseUpdate,_!==R&&(_===null?Ie.firstBaseUpdate=de:_.next=de,Ie.lastBaseUpdate=Y))}if(y!==null){var xe=h.baseState;R=0,Ie=de=Y=null,_=y;do{var ge=_.lane&-536870913,Ae=ge!==_.lane;if(Ae?(_t&ge)===ge:(u&ge)===ge){ge!==0&&ge===Hs&&(mm=!0),Ie!==null&&(Ie=Ie.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var gt=t,ot=_;ge=n;var $t=o;switch(ot.tag){case 1:if(gt=ot.payload,typeof gt=="function"){xe=gt.call($t,xe,ge);break e}xe=gt;break e;case 3:gt.flags=gt.flags&-65537|128;case 0:if(gt=ot.payload,ge=typeof gt=="function"?gt.call($t,xe,ge):gt,ge==null)break e;xe=E({},xe,ge);break e;case 2:Ei=!0}}ge=_.callback,ge!==null&&(t.flags|=64,Ae&&(t.flags|=8192),Ae=h.callbacks,Ae===null?h.callbacks=[ge]:Ae.push(ge))}else Ae={lane:ge,tag:_.tag,payload:_.payload,callback:_.callback,next:null},Ie===null?(de=Ie=Ae,Y=xe):Ie=Ie.next=Ae,R|=ge;if(_=_.next,_===null){if(_=h.shared.pending,_===null)break;Ae=_,_=Ae.next,Ae.next=null,h.lastBaseUpdate=Ae,h.shared.pending=null}}while(!0);Ie===null&&(Y=xe),h.baseState=Y,h.firstBaseUpdate=de,h.lastBaseUpdate=Ie,y===null&&(h.shared.lanes=0),ki|=R,t.lanes=R,t.memoizedState=xe}}function NA(t,n){if(typeof t!="function")throw Error(i(191,t));t.call(n)}function wA(t,n){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)NA(o[t],n)}var Qs=X(null),vc=X(0);function xA(t,n){t=Jr,ie(vc,t),ie(Qs,n),Jr=t|n.baseLanes}function gm(){ie(vc,Jr),ie(Qs,Qs.current)}function fm(){Jr=vc.current,ee(Qs),ee(vc)}var vi=0,Tt=null,Jt=null,xa=null,Cc=!1,Vs=!1,ls=!1,Nc=0,Wo=0,Gs=null,vv=0;function Na(){throw Error(i(321))}function hm(t,n){if(n===null)return!1;for(var o=0;o<n.length&&o<t.length;o++)if(!kn(t[o],n[o]))return!1;return!0}function Am(t,n,o,u,h,y){return vi=y,Tt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,q.H=t===null||t.memoizedState===null?cp:up,ls=!1,y=o(u,h),ls=!1,Vs&&(y=SA(n,o,u,h)),TA(t),y}function TA(t){q.H=Lc;var n=Jt!==null&&Jt.next!==null;if(vi=0,xa=Jt=Tt=null,Cc=!1,Wo=0,Gs=null,n)throw Error(i(300));t===null||Ha||(t=t.dependencies,t!==null&&pc(t)&&(Ha=!0))}function SA(t,n,o,u){Tt=t;var h=0;do{if(Vs&&(Gs=null),Wo=0,Vs=!1,25<=h)throw Error(i(301));if(h+=1,xa=Jt=null,t.updateQueue!=null){var y=t.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}q.H=kv,y=n(o,u)}while(Vs);return y}function Cv(){var t=q.H,n=t.useState()[0];return n=typeof n.then=="function"?Yo(n):n,t=t.useState()[0],(Jt!==null?Jt.memoizedState:null)!==t&&(Tt.flags|=1024),n}function pm(){var t=Nc!==0;return Nc=0,t}function ym(t,n,o){n.updateQueue=t.updateQueue,n.flags&=-2053,t.lanes&=~o}function Em(t){if(Cc){for(t=t.memoizedState;t!==null;){var n=t.queue;n!==null&&(n.pending=null),t=t.next}Cc=!1}vi=0,xa=Jt=Tt=null,Vs=!1,Wo=Nc=0,Gs=null}function bn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xa===null?Tt.memoizedState=xa=t:xa=xa.next=t,xa}function Ta(){if(Jt===null){var t=Tt.alternate;t=t!==null?t.memoizedState:null}else t=Jt.next;var n=xa===null?Tt.memoizedState:xa.next;if(n!==null)xa=n,Jt=t;else{if(t===null)throw Tt.alternate===null?Error(i(467)):Error(i(310));Jt=t,t={memoizedState:Jt.memoizedState,baseState:Jt.baseState,baseQueue:Jt.baseQueue,queue:Jt.queue,next:null},xa===null?Tt.memoizedState=xa=t:xa=xa.next=t}return xa}function bm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(t){var n=Wo;return Wo+=1,Gs===null&&(Gs=[]),t=IA(Gs,t,n),n=Tt,(xa===null?n.memoizedState:xa.next)===null&&(n=n.alternate,q.H=n===null||n.memoizedState===null?cp:up),t}function wc(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Yo(t);if(t.$$typeof===S)return rn(t)}throw Error(i(438,String(t)))}function Im(t){var n=null,o=Tt.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var u=Tt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(h){return h.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=bm(),Tt.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(t),u=0;u<t;u++)o[u]=V;return n.index++,o}function Vr(t,n){return typeof n=="function"?n(t):n}function xc(t){var n=Ta();return vm(n,Jt,t)}function vm(t,n,o){var u=t.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=o;var h=t.baseQueue,y=u.pending;if(y!==null){if(h!==null){var R=h.next;h.next=y.next,y.next=R}n.baseQueue=h=y,u.pending=null}if(y=t.baseState,h===null)t.memoizedState=y;else{n=h.next;var _=R=null,Y=null,de=n,Ie=!1;do{var xe=de.lane&-536870913;if(xe!==de.lane?(_t&xe)===xe:(vi&xe)===xe){var ge=de.revertLane;if(ge===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),xe===Hs&&(Ie=!0);else if((vi&ge)===ge){de=de.next,ge===Hs&&(Ie=!0);continue}else xe={lane:0,revertLane:de.revertLane,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Y===null?(_=Y=xe,R=y):Y=Y.next=xe,Tt.lanes|=ge,ki|=ge;xe=de.action,ls&&o(y,xe),y=de.hasEagerState?de.eagerState:o(y,xe)}else ge={lane:xe,revertLane:de.revertLane,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Y===null?(_=Y=ge,R=y):Y=Y.next=ge,Tt.lanes|=xe,ki|=xe;de=de.next}while(de!==null&&de!==n);if(Y===null?R=y:Y.next=_,!kn(y,t.memoizedState)&&(Ha=!0,Ie&&(o=zs,o!==null)))throw o;t.memoizedState=y,t.baseState=R,t.baseQueue=Y,u.lastRenderedState=y}return h===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function Cm(t){var n=Ta(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=t;var u=o.dispatch,h=o.pending,y=n.memoizedState;if(h!==null){o.pending=null;var R=h=h.next;do y=t(y,R.action),R=R.next;while(R!==h);kn(y,n.memoizedState)||(Ha=!0),n.memoizedState=y,n.baseQueue===null&&(n.baseState=y),o.lastRenderedState=y}return[y,u]}function kA(t,n,o){var u=Tt,h=Ta(),y=Ht;if(y){if(o===void 0)throw Error(i(407));o=o()}else o=n();var R=!kn((Jt||h).memoizedState,o);R&&(h.memoizedState=o,Ha=!0),h=h.queue;var _=DA.bind(null,u,h,t);if(Jo(2048,8,_,[t]),h.getSnapshot!==n||R||xa!==null&&xa.memoizedState.tag&1){if(u.flags|=2048,Ks(9,Tc(),RA.bind(null,u,h,o,n),null),ia===null)throw Error(i(349));y||(vi&124)!==0||LA(u,n,o)}return o}function LA(t,n,o){t.flags|=16384,t={getSnapshot:n,value:o},n=Tt.updateQueue,n===null?(n=bm(),Tt.updateQueue=n,n.stores=[t]):(o=n.stores,o===null?n.stores=[t]:o.push(t))}function RA(t,n,o,u){n.value=o,n.getSnapshot=u,BA(n)&&UA(t)}function DA(t,n,o){return o(function(){BA(n)&&UA(t)})}function BA(t){var n=t.getSnapshot;t=t.value;try{var o=n();return!kn(t,o)}catch{return!0}}function UA(t){var n=Fs(t,2);n!==null&&Mn(n,t,2)}function Nm(t){var n=bn();if(typeof t=="function"){var o=t;if(t=o(),ls){C(!0);try{o()}finally{C(!1)}}}return n.memoizedState=n.baseState=t,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:t},n}function MA(t,n,o,u){return t.baseState=o,vm(t,Jt,typeof u=="function"?u:Vr)}function Nv(t,n,o,u,h){if(kc(t))throw Error(i(485));if(t=n.action,t!==null){var y={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){y.listeners.push(R)}};q.T!==null?o(!0):y.isTransition=!1,u(y),o=n.pending,o===null?(y.next=n.pending=y,_A(n,y)):(y.next=o.next,n.pending=o.next=y)}}function _A(t,n){var o=n.action,u=n.payload,h=t.state;if(n.isTransition){var y=q.T,R={};q.T=R;try{var _=o(h,u),Y=q.S;Y!==null&&Y(R,_),FA(t,n,_)}catch(de){wm(t,n,de)}finally{q.T=y}}else try{y=o(h,u),FA(t,n,y)}catch(de){wm(t,n,de)}}function FA(t,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){OA(t,n,u)},function(u){return wm(t,n,u)}):OA(t,n,o)}function OA(t,n,o){n.status="fulfilled",n.value=o,jA(n),t.state=o,n=t.pending,n!==null&&(o=n.next,o===n?t.pending=null:(o=o.next,n.next=o,_A(t,o)))}function wm(t,n,o){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=o,jA(n),n=n.next;while(n!==u)}t.action=null}function jA(t){t=t.listeners;for(var n=0;n<t.length;n++)(0,t[n])()}function PA(t,n){return n}function HA(t,n){if(Ht){var o=ia.formState;if(o!==null){e:{var u=Tt;if(Ht){if(Ea){t:{for(var h=Ea,y=Ar;h.nodeType!==8;){if(!y){h=null;break t}if(h=sr(h.nextSibling),h===null){h=null;break t}}y=h.data,h=y==="F!"||y==="F"?h:null}if(h){Ea=sr(h.nextSibling),u=h.data==="F!";break e}}rs(u)}u=!1}u&&(n=o[0])}}return o=bn(),o.memoizedState=o.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:PA,lastRenderedState:n},o.queue=u,o=sp.bind(null,Tt,u),u.dispatch=o,u=Nm(!1),y=Lm.bind(null,Tt,!1,u.queue),u=bn(),h={state:n,dispatch:null,action:t,pending:null},u.queue=h,o=Nv.bind(null,Tt,h,y,o),h.dispatch=o,u.memoizedState=t,[n,o,!1]}function zA(t){var n=Ta();return QA(n,Jt,t)}function QA(t,n,o){if(n=vm(t,n,PA)[0],t=xc(Vr)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Yo(n)}catch(R){throw R===Qo?bc:R}else u=n;n=Ta();var h=n.queue,y=h.dispatch;return o!==n.memoizedState&&(Tt.flags|=2048,Ks(9,Tc(),wv.bind(null,h,o),null)),[u,y,t]}function wv(t,n){t.action=n}function VA(t){var n=Ta(),o=Jt;if(o!==null)return QA(n,o,t);Ta(),n=n.memoizedState,o=Ta();var u=o.queue.dispatch;return o.memoizedState=t,[n,u,!1]}function Ks(t,n,o,u){return t={tag:t,create:o,deps:u,inst:n,next:null},n=Tt.updateQueue,n===null&&(n=bm(),Tt.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=t.next=t:(u=o.next,o.next=t,t.next=u,n.lastEffect=t),t}function Tc(){return{destroy:void 0,resource:void 0}}function GA(){return Ta().memoizedState}function Sc(t,n,o,u){var h=bn();u=u===void 0?null:u,Tt.flags|=t,h.memoizedState=Ks(1|n,Tc(),o,u)}function Jo(t,n,o,u){var h=Ta();u=u===void 0?null:u;var y=h.memoizedState.inst;Jt!==null&&u!==null&&hm(u,Jt.memoizedState.deps)?h.memoizedState=Ks(n,y,o,u):(Tt.flags|=t,h.memoizedState=Ks(1|n,y,o,u))}function KA(t,n){Sc(8390656,8,t,n)}function qA(t,n){Jo(2048,8,t,n)}function WA(t,n){return Jo(4,2,t,n)}function YA(t,n){return Jo(4,4,t,n)}function JA(t,n){if(typeof n=="function"){t=t();var o=n(t);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return t=t(),n.current=t,function(){n.current=null}}function XA(t,n,o){o=o!=null?o.concat([t]):null,Jo(4,4,JA.bind(null,n,t),o)}function xm(){}function $A(t,n){var o=Ta();n=n===void 0?null:n;var u=o.memoizedState;return n!==null&&hm(n,u[1])?u[0]:(o.memoizedState=[t,n],t)}function ZA(t,n){var o=Ta();n=n===void 0?null:n;var u=o.memoizedState;if(n!==null&&hm(n,u[1]))return u[0];if(u=t(),ls){C(!0);try{t()}finally{C(!1)}}return o.memoizedState=[u,n],u}function Tm(t,n,o){return o===void 0||(vi&1073741824)!==0?t.memoizedState=n:(t.memoizedState=o,t=a0(),Tt.lanes|=t,ki|=t,o)}function ep(t,n,o,u){return kn(o,n)?o:Qs.current!==null?(t=Tm(t,o,u),kn(t,n)||(Ha=!0),t):(vi&42)===0?(Ha=!0,t.memoizedState=o):(t=a0(),Tt.lanes|=t,ki|=t,n)}function tp(t,n,o,u,h){var y=re.p;re.p=y!==0&&8>y?y:8;var R=q.T,_={};q.T=_,Lm(t,!1,n,o);try{var Y=h(),de=q.S;if(de!==null&&de(_,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var Ie=Iv(Y,u);Xo(t,n,Ie,Un(t))}else Xo(t,n,u,Un(t))}catch(xe){Xo(t,n,{then:function(){},status:"rejected",reason:xe},Un())}finally{re.p=y,q.T=R}}function xv(){}function Sm(t,n,o,u){if(t.tag!==5)throw Error(i(476));var h=ap(t).queue;tp(t,h,n,Ee,o===null?xv:function(){return np(t),o(u)})}function ap(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:Ee,baseState:Ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:Ee},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:o},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function np(t){var n=ap(t).next.queue;Xo(t,n,{},Un())}function km(){return rn(hl)}function rp(){return Ta().memoizedState}function ip(){return Ta().memoizedState}function Tv(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var o=Un();t=bi(o);var u=Ii(n,t,o);u!==null&&(Mn(u,n,o),Go(u,n,o)),n={cache:im()},t.payload=n;return}n=n.return}}function Sv(t,n,o){var u=Un();o={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},kc(t)?op(n,o):(o=Yd(t,n,o,u),o!==null&&(Mn(o,t,u),lp(o,n,u)))}function sp(t,n,o){var u=Un();Xo(t,n,o,u)}function Xo(t,n,o,u){var h={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(kc(t))op(n,h);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=n.lastRenderedReducer,y!==null))try{var R=n.lastRenderedState,_=y(R,o);if(h.hasEagerState=!0,h.eagerState=_,kn(_,R))return mc(t,n,h,0),ia===null&&dc(),!1}catch{}finally{}if(o=Yd(t,n,h,u),o!==null)return Mn(o,t,u),lp(o,n,u),!0}return!1}function Lm(t,n,o,u){if(u={lane:2,revertLane:lg(),action:u,hasEagerState:!1,eagerState:null,next:null},kc(t)){if(n)throw Error(i(479))}else n=Yd(t,o,u,2),n!==null&&Mn(n,t,2)}function kc(t){var n=t.alternate;return t===Tt||n!==null&&n===Tt}function op(t,n){Vs=Cc=!0;var o=t.pending;o===null?n.next=n:(n.next=o.next,o.next=n),t.pending=n}function lp(t,n,o){if((o&4194048)!==0){var u=n.lanes;u&=t.pendingLanes,o|=u,n.lanes=o,ci(t,o)}}var Lc={readContext:rn,use:wc,useCallback:Na,useContext:Na,useEffect:Na,useImperativeHandle:Na,useLayoutEffect:Na,useInsertionEffect:Na,useMemo:Na,useReducer:Na,useRef:Na,useState:Na,useDebugValue:Na,useDeferredValue:Na,useTransition:Na,useSyncExternalStore:Na,useId:Na,useHostTransitionStatus:Na,useFormState:Na,useActionState:Na,useOptimistic:Na,useMemoCache:Na,useCacheRefresh:Na},cp={readContext:rn,use:wc,useCallback:function(t,n){return bn().memoizedState=[t,n===void 0?null:n],t},useContext:rn,useEffect:KA,useImperativeHandle:function(t,n,o){o=o!=null?o.concat([t]):null,Sc(4194308,4,JA.bind(null,n,t),o)},useLayoutEffect:function(t,n){return Sc(4194308,4,t,n)},useInsertionEffect:function(t,n){Sc(4,2,t,n)},useMemo:function(t,n){var o=bn();n=n===void 0?null:n;var u=t();if(ls){C(!0);try{t()}finally{C(!1)}}return o.memoizedState=[u,n],u},useReducer:function(t,n,o){var u=bn();if(o!==void 0){var h=o(n);if(ls){C(!0);try{o(n)}finally{C(!1)}}}else h=n;return u.memoizedState=u.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},u.queue=t,t=t.dispatch=Sv.bind(null,Tt,t),[u.memoizedState,t]},useRef:function(t){var n=bn();return t={current:t},n.memoizedState=t},useState:function(t){t=Nm(t);var n=t.queue,o=sp.bind(null,Tt,n);return n.dispatch=o,[t.memoizedState,o]},useDebugValue:xm,useDeferredValue:function(t,n){var o=bn();return Tm(o,t,n)},useTransition:function(){var t=Nm(!1);return t=tp.bind(null,Tt,t.queue,!0,!1),bn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,o){var u=Tt,h=bn();if(Ht){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),ia===null)throw Error(i(349));(_t&124)!==0||LA(u,n,o)}h.memoizedState=o;var y={value:o,getSnapshot:n};return h.queue=y,KA(DA.bind(null,u,y,t),[t]),u.flags|=2048,Ks(9,Tc(),RA.bind(null,u,y,o,n),null),o},useId:function(){var t=bn(),n=ia.identifierPrefix;if(Ht){var o=Hr,u=Pr;o=(u&~(1<<32-w(u)-1)).toString(32)+o,n="«"+n+"R"+o,o=Nc++,0<o&&(n+="H"+o.toString(32)),n+="»"}else o=vv++,n="«"+n+"r"+o.toString(32)+"»";return t.memoizedState=n},useHostTransitionStatus:km,useFormState:HA,useActionState:HA,useOptimistic:function(t){var n=bn();n.memoizedState=n.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=Lm.bind(null,Tt,!0,o),o.dispatch=n,[t,n]},useMemoCache:Im,useCacheRefresh:function(){return bn().memoizedState=Tv.bind(null,Tt)}},up={readContext:rn,use:wc,useCallback:$A,useContext:rn,useEffect:qA,useImperativeHandle:XA,useInsertionEffect:WA,useLayoutEffect:YA,useMemo:ZA,useReducer:xc,useRef:GA,useState:function(){return xc(Vr)},useDebugValue:xm,useDeferredValue:function(t,n){var o=Ta();return ep(o,Jt.memoizedState,t,n)},useTransition:function(){var t=xc(Vr)[0],n=Ta().memoizedState;return[typeof t=="boolean"?t:Yo(t),n]},useSyncExternalStore:kA,useId:rp,useHostTransitionStatus:km,useFormState:zA,useActionState:zA,useOptimistic:function(t,n){var o=Ta();return MA(o,Jt,t,n)},useMemoCache:Im,useCacheRefresh:ip},kv={readContext:rn,use:wc,useCallback:$A,useContext:rn,useEffect:qA,useImperativeHandle:XA,useInsertionEffect:WA,useLayoutEffect:YA,useMemo:ZA,useReducer:Cm,useRef:GA,useState:function(){return Cm(Vr)},useDebugValue:xm,useDeferredValue:function(t,n){var o=Ta();return Jt===null?Tm(o,t,n):ep(o,Jt.memoizedState,t,n)},useTransition:function(){var t=Cm(Vr)[0],n=Ta().memoizedState;return[typeof t=="boolean"?t:Yo(t),n]},useSyncExternalStore:kA,useId:rp,useHostTransitionStatus:km,useFormState:VA,useActionState:VA,useOptimistic:function(t,n){var o=Ta();return Jt!==null?MA(o,Jt,t,n):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:Im,useCacheRefresh:ip},qs=null,$o=0;function Rc(t){var n=$o;return $o+=1,qs===null&&(qs=[]),IA(qs,t,n)}function Zo(t,n){n=n.props.ref,t.ref=n!==void 0?n:null}function Dc(t,n){throw n.$$typeof===p?Error(i(525)):(t=Object.prototype.toString.call(n),Error(i(31,t==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":t)))}function dp(t){var n=t._init;return n(t._payload)}function mp(t){function n(se,te){if(t){var ue=se.deletions;ue===null?(se.deletions=[te],se.flags|=16):ue.push(te)}}function o(se,te){if(!t)return null;for(;te!==null;)n(se,te),te=te.sibling;return null}function u(se){for(var te=new Map;se!==null;)se.key!==null?te.set(se.key,se):te.set(se.index,se),se=se.sibling;return te}function h(se,te){return se=jr(se,te),se.index=0,se.sibling=null,se}function y(se,te,ue){return se.index=ue,t?(ue=se.alternate,ue!==null?(ue=ue.index,ue<te?(se.flags|=67108866,te):ue):(se.flags|=67108866,te)):(se.flags|=1048576,te)}function R(se){return t&&se.alternate===null&&(se.flags|=67108866),se}function _(se,te,ue,Ce){return te===null||te.tag!==6?(te=Xd(ue,se.mode,Ce),te.return=se,te):(te=h(te,ue),te.return=se,te)}function Y(se,te,ue,Ce){var qe=ue.type;return qe===x?Ie(se,te,ue.props.children,Ce,ue.key):te!==null&&(te.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===H&&dp(qe)===te.type)?(te=h(te,ue.props),Zo(te,ue),te.return=se,te):(te=fc(ue.type,ue.key,ue.props,null,se.mode,Ce),Zo(te,ue),te.return=se,te)}function de(se,te,ue,Ce){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=$d(ue,se.mode,Ce),te.return=se,te):(te=h(te,ue.children||[]),te.return=se,te)}function Ie(se,te,ue,Ce,qe){return te===null||te.tag!==7?(te=es(ue,se.mode,Ce,qe),te.return=se,te):(te=h(te,ue),te.return=se,te)}function xe(se,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Xd(""+te,se.mode,ue),te.return=se,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case N:return ue=fc(te.type,te.key,te.props,null,se.mode,ue),Zo(ue,te),ue.return=se,ue;case v:return te=$d(te,se.mode,ue),te.return=se,te;case H:var Ce=te._init;return te=Ce(te._payload),xe(se,te,ue)}if(he(te)||$(te))return te=es(te,se.mode,ue,null),te.return=se,te;if(typeof te.then=="function")return xe(se,Rc(te),ue);if(te.$$typeof===S)return xe(se,yc(se,te),ue);Dc(se,te)}return null}function ge(se,te,ue,Ce){var qe=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return qe!==null?null:_(se,te,""+ue,Ce);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case N:return ue.key===qe?Y(se,te,ue,Ce):null;case v:return ue.key===qe?de(se,te,ue,Ce):null;case H:return qe=ue._init,ue=qe(ue._payload),ge(se,te,ue,Ce)}if(he(ue)||$(ue))return qe!==null?null:Ie(se,te,ue,Ce,null);if(typeof ue.then=="function")return ge(se,te,Rc(ue),Ce);if(ue.$$typeof===S)return ge(se,te,yc(se,ue),Ce);Dc(se,ue)}return null}function Ae(se,te,ue,Ce,qe){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return se=se.get(ue)||null,_(te,se,""+Ce,qe);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case N:return se=se.get(Ce.key===null?ue:Ce.key)||null,Y(te,se,Ce,qe);case v:return se=se.get(Ce.key===null?ue:Ce.key)||null,de(te,se,Ce,qe);case H:var Lt=Ce._init;return Ce=Lt(Ce._payload),Ae(se,te,ue,Ce,qe)}if(he(Ce)||$(Ce))return se=se.get(ue)||null,Ie(te,se,Ce,qe,null);if(typeof Ce.then=="function")return Ae(se,te,ue,Rc(Ce),qe);if(Ce.$$typeof===S)return Ae(se,te,ue,yc(te,Ce),qe);Dc(te,Ce)}return null}function gt(se,te,ue,Ce){for(var qe=null,Lt=null,et=te,ct=te=0,Qa=null;et!==null&&ct<ue.length;ct++){et.index>ct?(Qa=et,et=null):Qa=et.sibling;var Ot=ge(se,et,ue[ct],Ce);if(Ot===null){et===null&&(et=Qa);break}t&&et&&Ot.alternate===null&&n(se,et),te=y(Ot,te,ct),Lt===null?qe=Ot:Lt.sibling=Ot,Lt=Ot,et=Qa}if(ct===ue.length)return o(se,et),Ht&&as(se,ct),qe;if(et===null){for(;ct<ue.length;ct++)et=xe(se,ue[ct],Ce),et!==null&&(te=y(et,te,ct),Lt===null?qe=et:Lt.sibling=et,Lt=et);return Ht&&as(se,ct),qe}for(et=u(et);ct<ue.length;ct++)Qa=Ae(et,se,ct,ue[ct],Ce),Qa!==null&&(t&&Qa.alternate!==null&&et.delete(Qa.key===null?ct:Qa.key),te=y(Qa,te,ct),Lt===null?qe=Qa:Lt.sibling=Qa,Lt=Qa);return t&&et.forEach(function(Oi){return n(se,Oi)}),Ht&&as(se,ct),qe}function ot(se,te,ue,Ce){if(ue==null)throw Error(i(151));for(var qe=null,Lt=null,et=te,ct=te=0,Qa=null,Ot=ue.next();et!==null&&!Ot.done;ct++,Ot=ue.next()){et.index>ct?(Qa=et,et=null):Qa=et.sibling;var Oi=ge(se,et,Ot.value,Ce);if(Oi===null){et===null&&(et=Qa);break}t&&et&&Oi.alternate===null&&n(se,et),te=y(Oi,te,ct),Lt===null?qe=Oi:Lt.sibling=Oi,Lt=Oi,et=Qa}if(Ot.done)return o(se,et),Ht&&as(se,ct),qe;if(et===null){for(;!Ot.done;ct++,Ot=ue.next())Ot=xe(se,Ot.value,Ce),Ot!==null&&(te=y(Ot,te,ct),Lt===null?qe=Ot:Lt.sibling=Ot,Lt=Ot);return Ht&&as(se,ct),qe}for(et=u(et);!Ot.done;ct++,Ot=ue.next())Ot=Ae(et,se,ct,Ot.value,Ce),Ot!==null&&(t&&Ot.alternate!==null&&et.delete(Ot.key===null?ct:Ot.key),te=y(Ot,te,ct),Lt===null?qe=Ot:Lt.sibling=Ot,Lt=Ot);return t&&et.forEach(function(LC){return n(se,LC)}),Ht&&as(se,ct),qe}function $t(se,te,ue,Ce){if(typeof ue=="object"&&ue!==null&&ue.type===x&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case N:e:{for(var qe=ue.key;te!==null;){if(te.key===qe){if(qe=ue.type,qe===x){if(te.tag===7){o(se,te.sibling),Ce=h(te,ue.props.children),Ce.return=se,se=Ce;break e}}else if(te.elementType===qe||typeof qe=="object"&&qe!==null&&qe.$$typeof===H&&dp(qe)===te.type){o(se,te.sibling),Ce=h(te,ue.props),Zo(Ce,ue),Ce.return=se,se=Ce;break e}o(se,te);break}else n(se,te);te=te.sibling}ue.type===x?(Ce=es(ue.props.children,se.mode,Ce,ue.key),Ce.return=se,se=Ce):(Ce=fc(ue.type,ue.key,ue.props,null,se.mode,Ce),Zo(Ce,ue),Ce.return=se,se=Ce)}return R(se);case v:e:{for(qe=ue.key;te!==null;){if(te.key===qe)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){o(se,te.sibling),Ce=h(te,ue.children||[]),Ce.return=se,se=Ce;break e}else{o(se,te);break}else n(se,te);te=te.sibling}Ce=$d(ue,se.mode,Ce),Ce.return=se,se=Ce}return R(se);case H:return qe=ue._init,ue=qe(ue._payload),$t(se,te,ue,Ce)}if(he(ue))return gt(se,te,ue,Ce);if($(ue)){if(qe=$(ue),typeof qe!="function")throw Error(i(150));return ue=qe.call(ue),ot(se,te,ue,Ce)}if(typeof ue.then=="function")return $t(se,te,Rc(ue),Ce);if(ue.$$typeof===S)return $t(se,te,yc(se,ue),Ce);Dc(se,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,te!==null&&te.tag===6?(o(se,te.sibling),Ce=h(te,ue),Ce.return=se,se=Ce):(o(se,te),Ce=Xd(ue,se.mode,Ce),Ce.return=se,se=Ce),R(se)):o(se,te)}return function(se,te,ue,Ce){try{$o=0;var qe=$t(se,te,ue,Ce);return qs=null,qe}catch(et){if(et===Qo||et===bc)throw et;var Lt=Ln(29,et,null,se.mode);return Lt.lanes=Ce,Lt.return=se,Lt}finally{}}}var Ws=mp(!0),gp=mp(!1),qn=X(null),pr=null;function Ci(t){var n=t.alternate;ie(Ua,Ua.current&1),ie(qn,t),pr===null&&(n===null||Qs.current!==null||n.memoizedState!==null)&&(pr=t)}function fp(t){if(t.tag===22){if(ie(Ua,Ua.current),ie(qn,t),pr===null){var n=t.alternate;n!==null&&n.memoizedState!==null&&(pr=t)}}else Ni()}function Ni(){ie(Ua,Ua.current),ie(qn,qn.current)}function Gr(t){ee(qn),pr===t&&(pr=null),ee(Ua)}var Ua=X(0);function Bc(t){for(var n=t;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||bg(o)))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(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 null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function Rm(t,n,o,u){n=t.memoizedState,o=o(u,n),o=o==null?n:E({},n,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var Dm={enqueueSetState:function(t,n,o){t=t._reactInternals;var u=Un(),h=bi(u);h.payload=n,o!=null&&(h.callback=o),n=Ii(t,h,u),n!==null&&(Mn(n,t,u),Go(n,t,u))},enqueueReplaceState:function(t,n,o){t=t._reactInternals;var u=Un(),h=bi(u);h.tag=1,h.payload=n,o!=null&&(h.callback=o),n=Ii(t,h,u),n!==null&&(Mn(n,t,u),Go(n,t,u))},enqueueForceUpdate:function(t,n){t=t._reactInternals;var o=Un(),u=bi(o);u.tag=2,n!=null&&(u.callback=n),n=Ii(t,u,o),n!==null&&(Mn(n,t,o),Go(n,t,o))}};function hp(t,n,o,u,h,y,R){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,R):n.prototype&&n.prototype.isPureReactComponent?!Mo(o,u)||!Mo(h,y):!0}function Ap(t,n,o,u){t=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,u),n.state!==t&&Dm.enqueueReplaceState(n,n.state,null)}function cs(t,n){var o=n;if("ref"in n){o={};for(var u in n)u!=="ref"&&(o[u]=n[u])}if(t=t.defaultProps){o===n&&(o=E({},o));for(var h in t)o[h]===void 0&&(o[h]=t[h])}return o}var Uc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function pp(t){Uc(t)}function yp(t){console.error(t)}function Ep(t){Uc(t)}function Mc(t,n){try{var o=t.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function bp(t,n,o){try{var u=t.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Bm(t,n,o){return o=bi(o),o.tag=3,o.payload={element:null},o.callback=function(){Mc(t,n)},o}function Ip(t){return t=bi(t),t.tag=3,t}function vp(t,n,o,u){var h=o.type.getDerivedStateFromError;if(typeof h=="function"){var y=u.value;t.payload=function(){return h(y)},t.callback=function(){bp(n,o,u)}}var R=o.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(t.callback=function(){bp(n,o,u),typeof h!="function"&&(Li===null?Li=new Set([this]):Li.add(this));var _=u.stack;this.componentDidCatch(u.value,{componentStack:_!==null?_:""})})}function Lv(t,n,o,u,h){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=o.alternate,n!==null&&Po(n,o,h,!0),o=qn.current,o!==null){switch(o.tag){case 13:return pr===null?ng():o.alternate===null&&ba===0&&(ba=3),o.flags&=-257,o.flags|=65536,o.lanes=h,u===lm?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([u]):n.add(u),ig(t,u,h)),!1;case 22:return o.flags|=65536,u===lm?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([u]):o.add(u)),ig(t,u,h)),!1}throw Error(i(435,o.tag))}return ig(t,u,h),ng(),!1}if(Ht)return n=qn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=h,u!==tm&&(t=Error(i(422),{cause:u}),jo(Qn(t,o)))):(u!==tm&&(n=Error(i(423),{cause:u}),jo(Qn(n,o))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,u=Qn(u,o),h=Bm(t.stateNode,u,h),dm(t,h),ba!==4&&(ba=2)),!1;var y=Error(i(520),{cause:u});if(y=Qn(y,o),sl===null?sl=[y]:sl.push(y),ba!==4&&(ba=2),n===null)return!0;u=Qn(u,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,t=h&-h,o.lanes|=t,t=Bm(o.stateNode,u,t),dm(o,t),!1;case 1:if(n=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Li===null||!Li.has(y))))return o.flags|=65536,h&=-h,o.lanes|=h,h=Ip(h),vp(h,t,o,u),dm(o,h),!1}o=o.return}while(o!==null);return!1}var Cp=Error(i(461)),Ha=!1;function Wa(t,n,o,u){n.child=t===null?gp(n,null,o,u):Ws(n,t.child,o,u)}function Np(t,n,o,u,h){o=o.render;var y=n.ref;if("ref"in u){var R={};for(var _ in u)_!=="ref"&&(R[_]=u[_])}else R=u;return ss(n),u=Am(t,n,o,R,y,h),_=pm(),t!==null&&!Ha?(ym(t,n,h),Kr(t,n,h)):(Ht&&_&&Zd(n),n.flags|=1,Wa(t,n,u,h),n.child)}function wp(t,n,o,u,h){if(t===null){var y=o.type;return typeof y=="function"&&!Jd(y)&&y.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=y,xp(t,n,y,u,h)):(t=fc(o.type,null,u,n,n.mode,h),t.ref=n.ref,t.return=n,n.child=t)}if(y=t.child,!Hm(t,h)){var R=y.memoizedProps;if(o=o.compare,o=o!==null?o:Mo,o(R,u)&&t.ref===n.ref)return Kr(t,n,h)}return n.flags|=1,t=jr(y,u),t.ref=n.ref,t.return=n,n.child=t}function xp(t,n,o,u,h){if(t!==null){var y=t.memoizedProps;if(Mo(y,u)&&t.ref===n.ref)if(Ha=!1,n.pendingProps=u=y,Hm(t,h))(t.flags&131072)!==0&&(Ha=!0);else return n.lanes=t.lanes,Kr(t,n,h)}return Um(t,n,o,u,h)}function Tp(t,n,o){var u=n.pendingProps,h=u.children,y=t!==null?t.memoizedState:null;if(u.mode==="hidden"){if((n.flags&128)!==0){if(u=y!==null?y.baseLanes|o:o,t!==null){for(h=n.child=t.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;n.childLanes=y&~u}else n.childLanes=0,n.child=null;return Sp(t,n,u,o)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ec(n,y!==null?y.cachePool:null),y!==null?xA(n,y):gm(),fp(n);else return n.lanes=n.childLanes=536870912,Sp(t,n,y!==null?y.baseLanes|o:o,o)}else y!==null?(Ec(n,y.cachePool),xA(n,y),Ni(),n.memoizedState=null):(t!==null&&Ec(n,null),gm(),Ni());return Wa(t,n,h,o),n.child}function Sp(t,n,o,u){var h=om();return h=h===null?null:{parent:Ba._currentValue,pool:h},n.memoizedState={baseLanes:o,cachePool:h},t!==null&&Ec(n,null),gm(),fp(n),t!==null&&Po(t,n,u,!0),null}function _c(t,n){var o=n.ref;if(o===null)t!==null&&t.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(t===null||t.ref!==o)&&(n.flags|=4194816)}}function Um(t,n,o,u,h){return ss(n),o=Am(t,n,o,u,void 0,h),u=pm(),t!==null&&!Ha?(ym(t,n,h),Kr(t,n,h)):(Ht&&u&&Zd(n),n.flags|=1,Wa(t,n,o,h),n.child)}function kp(t,n,o,u,h,y){return ss(n),n.updateQueue=null,o=SA(n,u,o,h),TA(t),u=pm(),t!==null&&!Ha?(ym(t,n,y),Kr(t,n,y)):(Ht&&u&&Zd(n),n.flags|=1,Wa(t,n,o,y),n.child)}function Lp(t,n,o,u,h){if(ss(n),n.stateNode===null){var y=Os,R=o.contextType;typeof R=="object"&&R!==null&&(y=rn(R)),y=new o(u,y),n.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Dm,n.stateNode=y,y._reactInternals=n,y=n.stateNode,y.props=u,y.state=n.memoizedState,y.refs={},cm(n),R=o.contextType,y.context=typeof R=="object"&&R!==null?rn(R):Os,y.state=n.memoizedState,R=o.getDerivedStateFromProps,typeof R=="function"&&(Rm(n,o,R,u),y.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(R=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),R!==y.state&&Dm.enqueueReplaceState(y,y.state,null),qo(n,u,y,h),Ko(),y.state=n.memoizedState),typeof y.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(t===null){y=n.stateNode;var _=n.memoizedProps,Y=cs(o,_);y.props=Y;var de=y.context,Ie=o.contextType;R=Os,typeof Ie=="object"&&Ie!==null&&(R=rn(Ie));var xe=o.getDerivedStateFromProps;Ie=typeof xe=="function"||typeof y.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,Ie||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(_||de!==R)&&Ap(n,y,u,R),Ei=!1;var ge=n.memoizedState;y.state=ge,qo(n,u,y,h),Ko(),de=n.memoizedState,_||ge!==de||Ei?(typeof xe=="function"&&(Rm(n,o,xe,u),de=n.memoizedState),(Y=Ei||hp(n,o,Y,u,ge,de,R))?(Ie||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(n.flags|=4194308)):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=de),y.props=u,y.state=de,y.context=R,u=Y):(typeof y.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{y=n.stateNode,um(t,n),R=n.memoizedProps,Ie=cs(o,R),y.props=Ie,xe=n.pendingProps,ge=y.context,de=o.contextType,Y=Os,typeof de=="object"&&de!==null&&(Y=rn(de)),_=o.getDerivedStateFromProps,(de=typeof _=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(R!==xe||ge!==Y)&&Ap(n,y,u,Y),Ei=!1,ge=n.memoizedState,y.state=ge,qo(n,u,y,h),Ko();var Ae=n.memoizedState;R!==xe||ge!==Ae||Ei||t!==null&&t.dependencies!==null&&pc(t.dependencies)?(typeof _=="function"&&(Rm(n,o,_,u),Ae=n.memoizedState),(Ie=Ei||hp(n,o,Ie,u,ge,Ae,Y)||t!==null&&t.dependencies!==null&&pc(t.dependencies))?(de||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,Ae,Y),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,Ae,Y)),typeof y.componentDidUpdate=="function"&&(n.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof y.componentDidUpdate!="function"||R===t.memoizedProps&&ge===t.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&ge===t.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=Ae),y.props=u,y.state=Ae,y.context=Y,u=Ie):(typeof y.componentDidUpdate!="function"||R===t.memoizedProps&&ge===t.memoizedState||(n.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||R===t.memoizedProps&&ge===t.memoizedState||(n.flags|=1024),u=!1)}return y=u,_c(t,n),u=(n.flags&128)!==0,y||u?(y=n.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:y.render(),n.flags|=1,t!==null&&u?(n.child=Ws(n,t.child,null,h),n.child=Ws(n,null,o,h)):Wa(t,n,o,h),n.memoizedState=y.state,t=n.child):t=Kr(t,n,h),t}function Rp(t,n,o,u){return Oo(),n.flags|=256,Wa(t,n,o,u),n.child}var Mm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _m(t){return{baseLanes:t,cachePool:yA()}}function Fm(t,n,o){return t=t!==null?t.childLanes&~o:0,n&&(t|=Wn),t}function Dp(t,n,o){var u=n.pendingProps,h=!1,y=(n.flags&128)!==0,R;if((R=y)||(R=t!==null&&t.memoizedState===null?!1:(Ua.current&2)!==0),R&&(h=!0,n.flags&=-129),R=(n.flags&32)!==0,n.flags&=-33,t===null){if(Ht){if(h?Ci(n):Ni(),Ht){var _=Ea,Y;if(Y=_){e:{for(Y=_,_=Ar;Y.nodeType!==8;){if(!_){_=null;break e}if(Y=sr(Y.nextSibling),Y===null){_=null;break e}}_=Y}_!==null?(n.memoizedState={dehydrated:_,treeContext:ts!==null?{id:Pr,overflow:Hr}:null,retryLane:536870912,hydrationErrors:null},Y=Ln(18,null,null,0),Y.stateNode=_,Y.return=n,n.child=Y,dn=n,Ea=null,Y=!0):Y=!1}Y||rs(n)}if(_=n.memoizedState,_!==null&&(_=_.dehydrated,_!==null))return bg(_)?n.lanes=32:n.lanes=536870912,null;Gr(n)}return _=u.children,u=u.fallback,h?(Ni(),h=n.mode,_=Fc({mode:"hidden",children:_},h),u=es(u,h,o,null),_.return=n,u.return=n,_.sibling=u,n.child=_,h=n.child,h.memoizedState=_m(o),h.childLanes=Fm(t,R,o),n.memoizedState=Mm,u):(Ci(n),Om(n,_))}if(Y=t.memoizedState,Y!==null&&(_=Y.dehydrated,_!==null)){if(y)n.flags&256?(Ci(n),n.flags&=-257,n=jm(t,n,o)):n.memoizedState!==null?(Ni(),n.child=t.child,n.flags|=128,n=null):(Ni(),h=u.fallback,_=n.mode,u=Fc({mode:"visible",children:u.children},_),h=es(h,_,o,null),h.flags|=2,u.return=n,h.return=n,u.sibling=h,n.child=u,Ws(n,t.child,null,o),u=n.child,u.memoizedState=_m(o),u.childLanes=Fm(t,R,o),n.memoizedState=Mm,n=h);else if(Ci(n),bg(_)){if(R=_.nextSibling&&_.nextSibling.dataset,R)var de=R.dgst;R=de,u=Error(i(419)),u.stack="",u.digest=R,jo({value:u,source:null,stack:null}),n=jm(t,n,o)}else if(Ha||Po(t,n,o,!1),R=(o&t.childLanes)!==0,Ha||R){if(R=ia,R!==null&&(u=o&-o,u=(u&42)!==0?1:Zt(u),u=(u&(R.suspendedLanes|o))!==0?0:u,u!==0&&u!==Y.retryLane))throw Y.retryLane=u,Fs(t,u),Mn(R,t,u),Cp;_.data==="$?"||ng(),n=jm(t,n,o)}else _.data==="$?"?(n.flags|=192,n.child=t.child,n=null):(t=Y.treeContext,Ea=sr(_.nextSibling),dn=n,Ht=!0,ns=null,Ar=!1,t!==null&&(Gn[Kn++]=Pr,Gn[Kn++]=Hr,Gn[Kn++]=ts,Pr=t.id,Hr=t.overflow,ts=n),n=Om(n,u.children),n.flags|=4096);return n}return h?(Ni(),h=u.fallback,_=n.mode,Y=t.child,de=Y.sibling,u=jr(Y,{mode:"hidden",children:u.children}),u.subtreeFlags=Y.subtreeFlags&65011712,de!==null?h=jr(de,h):(h=es(h,_,o,null),h.flags|=2),h.return=n,u.return=n,u.sibling=h,n.child=u,u=h,h=n.child,_=t.child.memoizedState,_===null?_=_m(o):(Y=_.cachePool,Y!==null?(de=Ba._currentValue,Y=Y.parent!==de?{parent:de,pool:de}:Y):Y=yA(),_={baseLanes:_.baseLanes|o,cachePool:Y}),h.memoizedState=_,h.childLanes=Fm(t,R,o),n.memoizedState=Mm,u):(Ci(n),o=t.child,t=o.sibling,o=jr(o,{mode:"visible",children:u.children}),o.return=n,o.sibling=null,t!==null&&(R=n.deletions,R===null?(n.deletions=[t],n.flags|=16):R.push(t)),n.child=o,n.memoizedState=null,o)}function Om(t,n){return n=Fc({mode:"visible",children:n},t.mode),n.return=t,t.child=n}function Fc(t,n){return t=Ln(22,t,null,n),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function jm(t,n,o){return Ws(n,t.child,null,o),t=Om(n,n.pendingProps.children),t.flags|=2,n.memoizedState=null,t}function Bp(t,n,o){t.lanes|=n;var u=t.alternate;u!==null&&(u.lanes|=n),nm(t.return,n,o)}function Pm(t,n,o,u,h){var y=t.memoizedState;y===null?t.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:h}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=u,y.tail=o,y.tailMode=h)}function Up(t,n,o){var u=n.pendingProps,h=u.revealOrder,y=u.tail;if(Wa(t,n,u.children,o),u=Ua.current,(u&2)!==0)u=u&1|2,n.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=n.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Bp(t,o,n);else if(t.tag===19)Bp(t,o,n);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break e;for(;t.sibling===null;){if(t.return===null||t.return===n)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}u&=1}switch(ie(Ua,u),h){case"forwards":for(o=n.child,h=null;o!==null;)t=o.alternate,t!==null&&Bc(t)===null&&(h=o),o=o.sibling;o=h,o===null?(h=n.child,n.child=null):(h=o.sibling,o.sibling=null),Pm(n,!1,h,o,y);break;case"backwards":for(o=null,h=n.child,n.child=null;h!==null;){if(t=h.alternate,t!==null&&Bc(t)===null){n.child=h;break}t=h.sibling,h.sibling=o,o=h,h=t}Pm(n,!0,o,null,y);break;case"together":Pm(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Kr(t,n,o){if(t!==null&&(n.dependencies=t.dependencies),ki|=n.lanes,(o&n.childLanes)===0)if(t!==null){if(Po(t,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(t!==null&&n.child!==t.child)throw Error(i(153));if(n.child!==null){for(t=n.child,o=jr(t,t.pendingProps),n.child=o,o.return=n;t.sibling!==null;)t=t.sibling,o=o.sibling=jr(t,t.pendingProps),o.return=n;o.sibling=null}return n.child}function Hm(t,n){return(t.lanes&n)!==0?!0:(t=t.dependencies,!!(t!==null&&pc(t)))}function Rv(t,n,o){switch(n.tag){case 3:ke(n,n.stateNode.containerInfo),yi(n,Ba,t.memoizedState.cache),Oo();break;case 27:case 5:vt(n);break;case 4:ke(n,n.stateNode.containerInfo);break;case 10:yi(n,n.type,n.memoizedProps.value);break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Ci(n),n.flags|=128,null):(o&n.child.childLanes)!==0?Dp(t,n,o):(Ci(n),t=Kr(t,n,o),t!==null?t.sibling:null);Ci(n);break;case 19:var h=(t.flags&128)!==0;if(u=(o&n.childLanes)!==0,u||(Po(t,n,o,!1),u=(o&n.childLanes)!==0),h){if(u)return Up(t,n,o);n.flags|=128}if(h=n.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),ie(Ua,Ua.current),u)break;return null;case 22:case 23:return n.lanes=0,Tp(t,n,o);case 24:yi(n,Ba,t.memoizedState.cache)}return Kr(t,n,o)}function Mp(t,n,o){if(t!==null)if(t.memoizedProps!==n.pendingProps)Ha=!0;else{if(!Hm(t,o)&&(n.flags&128)===0)return Ha=!1,Rv(t,n,o);Ha=(t.flags&131072)!==0}else Ha=!1,Ht&&(n.flags&1048576)!==0&&dA(n,Ac,n.index);switch(n.lanes=0,n.tag){case 16:e:{t=n.pendingProps;var u=n.elementType,h=u._init;if(u=h(u._payload),n.type=u,typeof u=="function")Jd(u)?(t=cs(u,t),n.tag=1,n=Lp(null,n,u,t,o)):(n.tag=0,n=Um(null,n,u,t,o));else{if(u!=null){if(h=u.$$typeof,h===O){n.tag=11,n=Np(null,n,u,t,o);break e}else if(h===G){n.tag=14,n=wp(null,n,u,t,o);break e}}throw n=ne(u)||u,Error(i(306,n,""))}}return n;case 0:return Um(t,n,n.type,n.pendingProps,o);case 1:return u=n.type,h=cs(u,n.pendingProps),Lp(t,n,u,h,o);case 3:e:{if(ke(n,n.stateNode.containerInfo),t===null)throw Error(i(387));u=n.pendingProps;var y=n.memoizedState;h=y.element,um(t,n),qo(n,u,null,o);var R=n.memoizedState;if(u=R.cache,yi(n,Ba,u),u!==y.cache&&rm(n,[Ba],o,!0),Ko(),u=R.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:R.cache},n.updateQueue.baseState=y,n.memoizedState=y,n.flags&256){n=Rp(t,n,u,o);break e}else if(u!==h){h=Qn(Error(i(424)),n),jo(h),n=Rp(t,n,u,o);break e}else{switch(t=n.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Ea=sr(t.firstChild),dn=n,Ht=!0,ns=null,Ar=!0,o=gp(n,null,u,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Oo(),u===h){n=Kr(t,n,o);break e}Wa(t,n,u,o)}n=n.child}return n;case 26:return _c(t,n),t===null?(o=j0(n.type,null,n.pendingProps,null))?n.memoizedState=o:Ht||(o=n.type,t=n.pendingProps,u=Xc(Re.current).createElement(o),u[Vt]=n,u[ya]=t,Ja(u,o,t),st(u),n.stateNode=u):n.memoizedState=j0(n.type,t.memoizedProps,n.pendingProps,t.memoizedState),null;case 27:return vt(n),t===null&&Ht&&(u=n.stateNode=_0(n.type,n.pendingProps,Re.current),dn=n,Ar=!0,h=Ea,Bi(n.type)?(Ig=h,Ea=sr(u.firstChild)):Ea=h),Wa(t,n,n.pendingProps.children,o),_c(t,n),t===null&&(n.flags|=4194304),n.child;case 5:return t===null&&Ht&&((h=u=Ea)&&(u=iC(u,n.type,n.pendingProps,Ar),u!==null?(n.stateNode=u,dn=n,Ea=sr(u.firstChild),Ar=!1,h=!0):h=!1),h||rs(n)),vt(n),h=n.type,y=n.pendingProps,R=t!==null?t.memoizedProps:null,u=y.children,pg(h,y)?u=null:R!==null&&pg(h,R)&&(n.flags|=32),n.memoizedState!==null&&(h=Am(t,n,Cv,null,null,o),hl._currentValue=h),_c(t,n),Wa(t,n,u,o),n.child;case 6:return t===null&&Ht&&((t=o=Ea)&&(o=sC(o,n.pendingProps,Ar),o!==null?(n.stateNode=o,dn=n,Ea=null,t=!0):t=!1),t||rs(n)),null;case 13:return Dp(t,n,o);case 4:return ke(n,n.stateNode.containerInfo),u=n.pendingProps,t===null?n.child=Ws(n,null,u,o):Wa(t,n,u,o),n.child;case 11:return Np(t,n,n.type,n.pendingProps,o);case 7:return Wa(t,n,n.pendingProps,o),n.child;case 8:return Wa(t,n,n.pendingProps.children,o),n.child;case 12:return Wa(t,n,n.pendingProps.children,o),n.child;case 10:return u=n.pendingProps,yi(n,n.type,u.value),Wa(t,n,u.children,o),n.child;case 9:return h=n.type._context,u=n.pendingProps.children,ss(n),h=rn(h),u=u(h),n.flags|=1,Wa(t,n,u,o),n.child;case 14:return wp(t,n,n.type,n.pendingProps,o);case 15:return xp(t,n,n.type,n.pendingProps,o);case 19:return Up(t,n,o);case 31:return u=n.pendingProps,o=n.mode,u={mode:u.mode,children:u.children},t===null?(o=Fc(u,o),o.ref=n.ref,n.child=o,o.return=n,n=o):(o=jr(t.child,u),o.ref=n.ref,n.child=o,o.return=n,n=o),n;case 22:return Tp(t,n,o);case 24:return ss(n),u=rn(Ba),t===null?(h=om(),h===null&&(h=ia,y=im(),h.pooledCache=y,y.refCount++,y!==null&&(h.pooledCacheLanes|=o),h=y),n.memoizedState={parent:u,cache:h},cm(n),yi(n,Ba,h)):((t.lanes&o)!==0&&(um(t,n),qo(n,null,null,o),Ko()),h=t.memoizedState,y=n.memoizedState,h.parent!==u?(h={parent:u,cache:u},n.memoizedState=h,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=h),yi(n,Ba,u)):(u=y.cache,yi(n,Ba,u),u!==h.cache&&rm(n,[Ba],o,!0))),Wa(t,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(i(156,n.tag))}function qr(t){t.flags|=4}function _p(t,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!V0(n)){if(n=qn.current,n!==null&&((_t&4194048)===_t?pr!==null:(_t&62914560)!==_t&&(_t&536870912)===0||n!==pr))throw Vo=lm,EA;t.flags|=8192}}function Oc(t,n){n!==null&&(t.flags|=4),t.flags&16384&&(n=t.tag!==22?ra():536870912,t.lanes|=n,$s|=n)}function el(t,n){if(!Ht)switch(t.tailMode){case"hidden":n=t.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?n||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function ha(t){var n=t.alternate!==null&&t.alternate.child===t.child,o=0,u=0;if(n)for(var h=t.child;h!==null;)o|=h.lanes|h.childLanes,u|=h.subtreeFlags&65011712,u|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)o|=h.lanes|h.childLanes,u|=h.subtreeFlags,u|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=u,t.childLanes=o,n}function Dv(t,n,o){var u=n.pendingProps;switch(em(n),n.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ha(n),null;case 1:return ha(n),null;case 3:return o=n.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Qr(Ba),Ve(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(Fo(n)?qr(n):t===null||t.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,fA())),ha(n),null;case 26:return o=n.memoizedState,t===null?(qr(n),o!==null?(ha(n),_p(n,o)):(ha(n),n.flags&=-16777217)):o?o!==t.memoizedState?(qr(n),ha(n),_p(n,o)):(ha(n),n.flags&=-16777217):(t.memoizedProps!==u&&qr(n),ha(n),n.flags&=-16777217),null;case 27:Ct(n),o=Re.current;var h=n.type;if(t!==null&&n.stateNode!=null)t.memoizedProps!==u&&qr(n);else{if(!u){if(n.stateNode===null)throw Error(i(166));return ha(n),null}t=ve.current,Fo(n)?mA(n):(t=_0(h,u,o),n.stateNode=t,qr(n))}return ha(n),null;case 5:if(Ct(n),o=n.type,t!==null&&n.stateNode!=null)t.memoizedProps!==u&&qr(n);else{if(!u){if(n.stateNode===null)throw Error(i(166));return ha(n),null}if(t=ve.current,Fo(n))mA(n);else{switch(h=Xc(Re.current),t){case 1:t=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:t=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":t=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":t=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":t=h.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof u.is=="string"?h.createElement("select",{is:u.is}):h.createElement("select"),u.multiple?t.multiple=!0:u.size&&(t.size=u.size);break;default:t=typeof u.is=="string"?h.createElement(o,{is:u.is}):h.createElement(o)}}t[Vt]=n,t[ya]=u;e:for(h=n.child;h!==null;){if(h.tag===5||h.tag===6)t.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===n)break e;for(;h.sibling===null;){if(h.return===null||h.return===n)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}n.stateNode=t;e:switch(Ja(t,o,u),o){case"button":case"input":case"select":case"textarea":t=!!u.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&qr(n)}}return ha(n),n.flags&=-16777217,null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==u&&qr(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(i(166));if(t=Re.current,Fo(n)){if(t=n.stateNode,o=n.memoizedProps,u=null,h=dn,h!==null)switch(h.tag){case 27:case 5:u=h.memoizedProps}t[Vt]=n,t=!!(t.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||k0(t.nodeValue,o)),t||rs(n)}else t=Xc(t).createTextNode(u),t[Vt]=n,n.stateNode=t}return ha(n),null;case 13:if(u=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Fo(n),u!==null&&u.dehydrated!==null){if(t===null){if(!h)throw Error(i(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[Vt]=n}else Oo(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ha(n),h=!1}else h=fA(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return n.flags&256?(Gr(n),n):(Gr(n),null)}if(Gr(n),(n.flags&128)!==0)return n.lanes=o,n;if(o=u!==null,t=t!==null&&t.memoizedState!==null,o){u=n.child,h=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(h=u.alternate.memoizedState.cachePool.pool);var y=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==h&&(u.flags|=2048)}return o!==t&&o&&(n.child.flags|=8192),Oc(n,n.updateQueue),ha(n),null;case 4:return Ve(),t===null&&mg(n.stateNode.containerInfo),ha(n),null;case 10:return Qr(n.type),ha(n),null;case 19:if(ee(Ua),h=n.memoizedState,h===null)return ha(n),null;if(u=(n.flags&128)!==0,y=h.rendering,y===null)if(u)el(h,!1);else{if(ba!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(y=Bc(t),y!==null){for(n.flags|=128,el(h,!1),t=y.updateQueue,n.updateQueue=t,Oc(n,t),n.subtreeFlags=0,t=o,o=n.child;o!==null;)uA(o,t),o=o.sibling;return ie(Ua,Ua.current&1|2),n.child}t=t.sibling}h.tail!==null&&De()>Hc&&(n.flags|=128,u=!0,el(h,!1),n.lanes=4194304)}else{if(!u)if(t=Bc(y),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,Oc(n,t),el(h,!0),h.tail===null&&h.tailMode==="hidden"&&!y.alternate&&!Ht)return ha(n),null}else 2*De()-h.renderingStartTime>Hc&&o!==536870912&&(n.flags|=128,u=!0,el(h,!1),n.lanes=4194304);h.isBackwards?(y.sibling=n.child,n.child=y):(t=h.last,t!==null?t.sibling=y:n.child=y,h.last=y)}return h.tail!==null?(n=h.tail,h.rendering=n,h.tail=n.sibling,h.renderingStartTime=De(),n.sibling=null,t=Ua.current,ie(Ua,u?t&1|2:t&1),n):(ha(n),null);case 22:case 23:return Gr(n),fm(),u=n.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(o&536870912)!==0&&(n.flags&128)===0&&(ha(n),n.subtreeFlags&6&&(n.flags|=8192)):ha(n),o=n.updateQueue,o!==null&&Oc(n,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==o&&(n.flags|=2048),t!==null&&ee(os),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Qr(Ba),ha(n),null;case 25:return null;case 30:return null}throw Error(i(156,n.tag))}function Bv(t,n){switch(em(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return Qr(Ba),Ve(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return Ct(n),null;case 13:if(Gr(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Oo()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return ee(Ua),null;case 4:return Ve(),null;case 10:return Qr(n.type),null;case 22:case 23:return Gr(n),fm(),t!==null&&ee(os),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return Qr(Ba),null;case 25:return null;default:return null}}function Fp(t,n){switch(em(n),n.tag){case 3:Qr(Ba),Ve();break;case 26:case 27:case 5:Ct(n);break;case 4:Ve();break;case 13:Gr(n);break;case 19:ee(Ua);break;case 10:Qr(n.type);break;case 22:case 23:Gr(n),fm(),t!==null&&ee(os);break;case 24:Qr(Ba)}}function tl(t,n){try{var o=n.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var h=u.next;o=h;do{if((o.tag&t)===t){u=void 0;var y=o.create,R=o.inst;u=y(),R.destroy=u}o=o.next}while(o!==h)}}catch(_){ta(n,n.return,_)}}function wi(t,n,o){try{var u=n.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var y=h.next;u=y;do{if((u.tag&t)===t){var R=u.inst,_=R.destroy;if(_!==void 0){R.destroy=void 0,h=n;var Y=o,de=_;try{de()}catch(Ie){ta(h,Y,Ie)}}}u=u.next}while(u!==y)}}catch(Ie){ta(n,n.return,Ie)}}function Op(t){var n=t.updateQueue;if(n!==null){var o=t.stateNode;try{wA(n,o)}catch(u){ta(t,t.return,u)}}}function jp(t,n,o){o.props=cs(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(u){ta(t,n,u)}}function al(t,n){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof o=="function"?t.refCleanup=o(u):o.current=u}}catch(h){ta(t,n,h)}}function yr(t,n){var o=t.ref,u=t.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(h){ta(t,n,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(h){ta(t,n,h)}else o.current=null}function Pp(t){var n=t.type,o=t.memoizedProps,u=t.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&u.focus();break e;case"img":o.src?u.src=o.src:o.srcSet&&(u.srcset=o.srcSet)}}catch(h){ta(t,t.return,h)}}function zm(t,n,o){try{var u=t.stateNode;eC(u,t.type,o,n),u[ya]=n}catch(h){ta(t,t.return,h)}}function Hp(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Bi(t.type)||t.tag===4}function Qm(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Hp(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Bi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Vm(t,n,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(t),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=Jc));else if(u!==4&&(u===27&&Bi(t.type)&&(o=t.stateNode,n=null),t=t.child,t!==null))for(Vm(t,n,o),t=t.sibling;t!==null;)Vm(t,n,o),t=t.sibling}function jc(t,n,o){var u=t.tag;if(u===5||u===6)t=t.stateNode,n?o.insertBefore(t,n):o.appendChild(t);else if(u!==4&&(u===27&&Bi(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(jc(t,n,o),t=t.sibling;t!==null;)jc(t,n,o),t=t.sibling}function zp(t){var n=t.stateNode,o=t.memoizedProps;try{for(var u=t.type,h=n.attributes;h.length;)n.removeAttributeNode(h[0]);Ja(n,u,o),n[Vt]=t,n[ya]=o}catch(y){ta(t,t.return,y)}}var Wr=!1,wa=!1,Gm=!1,Qp=typeof WeakSet=="function"?WeakSet:Set,za=null;function Uv(t,n){if(t=t.containerInfo,hg=nu,t=eA(t),Qd(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var h=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{o.nodeType,y.nodeType}catch{o=null;break e}var R=0,_=-1,Y=-1,de=0,Ie=0,xe=t,ge=null;t:for(;;){for(var Ae;xe!==o||h!==0&&xe.nodeType!==3||(_=R+h),xe!==y||u!==0&&xe.nodeType!==3||(Y=R+u),xe.nodeType===3&&(R+=xe.nodeValue.length),(Ae=xe.firstChild)!==null;)ge=xe,xe=Ae;for(;;){if(xe===t)break t;if(ge===o&&++de===h&&(_=R),ge===y&&++Ie===u&&(Y=R),(Ae=xe.nextSibling)!==null)break;xe=ge,ge=xe.parentNode}xe=Ae}o=_===-1||Y===-1?null:{start:_,end:Y}}else o=null}o=o||{start:0,end:0}}else o=null;for(Ag={focusedElem:t,selectionRange:o},nu=!1,za=n;za!==null;)if(n=za,t=n.child,(n.subtreeFlags&1024)!==0&&t!==null)t.return=n,za=t;else for(;za!==null;){switch(n=za,y=n.alternate,t=n.flags,n.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&y!==null){t=void 0,o=n,h=y.memoizedProps,y=y.memoizedState,u=o.stateNode;try{var gt=cs(o.type,h,o.elementType===o.type);t=u.getSnapshotBeforeUpdate(gt,y),u.__reactInternalSnapshotBeforeUpdate=t}catch(ot){ta(o,o.return,ot)}}break;case 3:if((t&1024)!==0){if(t=n.stateNode.containerInfo,o=t.nodeType,o===9)Eg(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Eg(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(i(163))}if(t=n.sibling,t!==null){t.return=n.return,za=t;break}za=n.return}}function Vp(t,n,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:xi(t,o),u&4&&tl(5,o);break;case 1:if(xi(t,o),u&4)if(t=o.stateNode,n===null)try{t.componentDidMount()}catch(R){ta(o,o.return,R)}else{var h=cs(o.type,n.memoizedProps);n=n.memoizedState;try{t.componentDidUpdate(h,n,t.__reactInternalSnapshotBeforeUpdate)}catch(R){ta(o,o.return,R)}}u&64&&Op(o),u&512&&al(o,o.return);break;case 3:if(xi(t,o),u&64&&(t=o.updateQueue,t!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{wA(t,n)}catch(R){ta(o,o.return,R)}}break;case 27:n===null&&u&4&&zp(o);case 26:case 5:xi(t,o),n===null&&u&4&&Pp(o),u&512&&al(o,o.return);break;case 12:xi(t,o);break;case 13:xi(t,o),u&4&&qp(t,o),u&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=Qv.bind(null,o),oC(t,o))));break;case 22:if(u=o.memoizedState!==null||Wr,!u){n=n!==null&&n.memoizedState!==null||wa,h=Wr;var y=wa;Wr=u,(wa=n)&&!y?Ti(t,o,(o.subtreeFlags&8772)!==0):xi(t,o),Wr=h,wa=y}break;case 30:break;default:xi(t,o)}}function Gp(t){var n=t.alternate;n!==null&&(t.alternate=null,Gp(n)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(n=t.stateNode,n!==null&&Me(n)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var da=null,In=!1;function Yr(t,n,o){for(o=o.child;o!==null;)Kp(t,n,o),o=o.sibling}function Kp(t,n,o){if(U&&typeof U.onCommitFiberUnmount=="function")try{U.onCommitFiberUnmount(na,o)}catch{}switch(o.tag){case 26:wa||yr(o,n),Yr(t,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:wa||yr(o,n);var u=da,h=In;Bi(o.type)&&(da=o.stateNode,In=!1),Yr(t,n,o),dl(o.stateNode),da=u,In=h;break;case 5:wa||yr(o,n);case 6:if(u=da,h=In,da=null,Yr(t,n,o),da=u,In=h,da!==null)if(In)try{(da.nodeType===9?da.body:da.nodeName==="HTML"?da.ownerDocument.body:da).removeChild(o.stateNode)}catch(y){ta(o,n,y)}else try{da.removeChild(o.stateNode)}catch(y){ta(o,n,y)}break;case 18:da!==null&&(In?(t=da,U0(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),El(t)):U0(da,o.stateNode));break;case 4:u=da,h=In,da=o.stateNode.containerInfo,In=!0,Yr(t,n,o),da=u,In=h;break;case 0:case 11:case 14:case 15:wa||wi(2,o,n),wa||wi(4,o,n),Yr(t,n,o);break;case 1:wa||(yr(o,n),u=o.stateNode,typeof u.componentWillUnmount=="function"&&jp(o,n,u)),Yr(t,n,o);break;case 21:Yr(t,n,o);break;case 22:wa=(u=wa)||o.memoizedState!==null,Yr(t,n,o),wa=u;break;default:Yr(t,n,o)}}function qp(t,n){if(n.memoizedState===null&&(t=n.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{El(t)}catch(o){ta(n,n.return,o)}}function Mv(t){switch(t.tag){case 13:case 19:var n=t.stateNode;return n===null&&(n=t.stateNode=new Qp),n;case 22:return t=t.stateNode,n=t._retryCache,n===null&&(n=t._retryCache=new Qp),n;default:throw Error(i(435,t.tag))}}function Km(t,n){var o=Mv(t);n.forEach(function(u){var h=Vv.bind(null,t,u);o.has(u)||(o.add(u),u.then(h,h))})}function Rn(t,n){var o=n.deletions;if(o!==null)for(var u=0;u<o.length;u++){var h=o[u],y=t,R=n,_=R;e:for(;_!==null;){switch(_.tag){case 27:if(Bi(_.type)){da=_.stateNode,In=!1;break e}break;case 5:da=_.stateNode,In=!1;break e;case 3:case 4:da=_.stateNode.containerInfo,In=!0;break e}_=_.return}if(da===null)throw Error(i(160));Kp(y,R,h),da=null,In=!1,y=h.alternate,y!==null&&(y.return=null),h.return=null}if(n.subtreeFlags&13878)for(n=n.child;n!==null;)Wp(n,t),n=n.sibling}var ir=null;function Wp(t,n){var o=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Rn(n,t),Dn(t),u&4&&(wi(3,t,t.return),tl(3,t),wi(5,t,t.return));break;case 1:Rn(n,t),Dn(t),u&512&&(wa||o===null||yr(o,o.return)),u&64&&Wr&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var h=ir;if(Rn(n,t),Dn(t),u&512&&(wa||o===null||yr(o,o.return)),u&4){var y=o!==null?o.memoizedState:null;if(u=t.memoizedState,o===null)if(u===null)if(t.stateNode===null){e:{u=t.type,o=t.memoizedProps,h=h.ownerDocument||h;t:switch(u){case"title":y=h.getElementsByTagName("title")[0],(!y||y[_e]||y[Vt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=h.createElement(u),h.head.insertBefore(y,h.querySelector("head > title"))),Ja(y,u,o),y[Vt]=t,st(y),u=y;break e;case"link":var R=z0("link","href",h).get(u+(o.href||""));if(R){for(var _=0;_<R.length;_++)if(y=R[_],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){R.splice(_,1);break t}}y=h.createElement(u),Ja(y,u,o),h.head.appendChild(y);break;case"meta":if(R=z0("meta","content",h).get(u+(o.content||""))){for(_=0;_<R.length;_++)if(y=R[_],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){R.splice(_,1);break t}}y=h.createElement(u),Ja(y,u,o),h.head.appendChild(y);break;default:throw Error(i(468,u))}y[Vt]=t,st(y),u=y}t.stateNode=u}else Q0(h,t.type,t.stateNode);else t.stateNode=H0(h,u,t.memoizedProps);else y!==u?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,u===null?Q0(h,t.type,t.stateNode):H0(h,u,t.memoizedProps)):u===null&&t.stateNode!==null&&zm(t,t.memoizedProps,o.memoizedProps)}break;case 27:Rn(n,t),Dn(t),u&512&&(wa||o===null||yr(o,o.return)),o!==null&&u&4&&zm(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Rn(n,t),Dn(t),u&512&&(wa||o===null||yr(o,o.return)),t.flags&32){h=t.stateNode;try{hr(h,"")}catch(Ae){ta(t,t.return,Ae)}}u&4&&t.stateNode!=null&&(h=t.memoizedProps,zm(t,h,o!==null?o.memoizedProps:h)),u&1024&&(Gm=!0);break;case 6:if(Rn(n,t),Dn(t),u&4){if(t.stateNode===null)throw Error(i(162));u=t.memoizedProps,o=t.stateNode;try{o.nodeValue=u}catch(Ae){ta(t,t.return,Ae)}}break;case 3:if(eu=null,h=ir,ir=$c(n.containerInfo),Rn(n,t),ir=h,Dn(t),u&4&&o!==null&&o.memoizedState.isDehydrated)try{El(n.containerInfo)}catch(Ae){ta(t,t.return,Ae)}Gm&&(Gm=!1,Yp(t));break;case 4:u=ir,ir=$c(t.stateNode.containerInfo),Rn(n,t),Dn(t),ir=u;break;case 12:Rn(n,t),Dn(t);break;case 13:Rn(n,t),Dn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&($m=De()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Km(t,u)));break;case 22:h=t.memoizedState!==null;var Y=o!==null&&o.memoizedState!==null,de=Wr,Ie=wa;if(Wr=de||h,wa=Ie||Y,Rn(n,t),wa=Ie,Wr=de,Dn(t),u&8192)e:for(n=t.stateNode,n._visibility=h?n._visibility&-2:n._visibility|1,h&&(o===null||Y||Wr||wa||us(t)),o=null,n=t;;){if(n.tag===5||n.tag===26){if(o===null){Y=o=n;try{if(y=Y.stateNode,h)R=y.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{_=Y.stateNode;var xe=Y.memoizedProps.style,ge=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;_.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(Ae){ta(Y,Y.return,Ae)}}}else if(n.tag===6){if(o===null){Y=n;try{Y.stateNode.nodeValue=h?"":Y.memoizedProps}catch(Ae){ta(Y,Y.return,Ae)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===t)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break e;for(;n.sibling===null;){if(n.return===null||n.return===t)break e;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=t.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Km(t,o))));break;case 19:Rn(n,t),Dn(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Km(t,u)));break;case 30:break;case 21:break;default:Rn(n,t),Dn(t)}}function Dn(t){var n=t.flags;if(n&2){try{for(var o,u=t.return;u!==null;){if(Hp(u)){o=u;break}u=u.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var h=o.stateNode,y=Qm(t);jc(t,y,h);break;case 5:var R=o.stateNode;o.flags&32&&(hr(R,""),o.flags&=-33);var _=Qm(t);jc(t,_,R);break;case 3:case 4:var Y=o.stateNode.containerInfo,de=Qm(t);Vm(t,de,Y);break;default:throw Error(i(161))}}catch(Ie){ta(t,t.return,Ie)}t.flags&=-3}n&4096&&(t.flags&=-4097)}function Yp(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var n=t;Yp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),t=t.sibling}}function xi(t,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Vp(t,n.alternate,n),n=n.sibling}function us(t){for(t=t.child;t!==null;){var n=t;switch(n.tag){case 0:case 11:case 14:case 15:wi(4,n,n.return),us(n);break;case 1:yr(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&jp(n,n.return,o),us(n);break;case 27:dl(n.stateNode);case 26:case 5:yr(n,n.return),us(n);break;case 22:n.memoizedState===null&&us(n);break;case 30:us(n);break;default:us(n)}t=t.sibling}}function Ti(t,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,h=t,y=n,R=y.flags;switch(y.tag){case 0:case 11:case 15:Ti(h,y,o),tl(4,y);break;case 1:if(Ti(h,y,o),u=y,h=u.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(de){ta(u,u.return,de)}if(u=y,h=u.updateQueue,h!==null){var _=u.stateNode;try{var Y=h.shared.hiddenCallbacks;if(Y!==null)for(h.shared.hiddenCallbacks=null,h=0;h<Y.length;h++)NA(Y[h],_)}catch(de){ta(u,u.return,de)}}o&&R&64&&Op(y),al(y,y.return);break;case 27:zp(y);case 26:case 5:Ti(h,y,o),o&&u===null&&R&4&&Pp(y),al(y,y.return);break;case 12:Ti(h,y,o);break;case 13:Ti(h,y,o),o&&R&4&&qp(h,y);break;case 22:y.memoizedState===null&&Ti(h,y,o),al(y,y.return);break;case 30:break;default:Ti(h,y,o)}n=n.sibling}}function qm(t,n){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(t=n.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Ho(o))}function Wm(t,n){t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ho(t))}function Er(t,n,o,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Jp(t,n,o,u),n=n.sibling}function Jp(t,n,o,u){var h=n.flags;switch(n.tag){case 0:case 11:case 15:Er(t,n,o,u),h&2048&&tl(9,n);break;case 1:Er(t,n,o,u);break;case 3:Er(t,n,o,u),h&2048&&(t=null,n.alternate!==null&&(t=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==t&&(n.refCount++,t!=null&&Ho(t)));break;case 12:if(h&2048){Er(t,n,o,u),t=n.stateNode;try{var y=n.memoizedProps,R=y.id,_=y.onPostCommit;typeof _=="function"&&_(R,n.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(Y){ta(n,n.return,Y)}}else Er(t,n,o,u);break;case 13:Er(t,n,o,u);break;case 23:break;case 22:y=n.stateNode,R=n.alternate,n.memoizedState!==null?y._visibility&2?Er(t,n,o,u):nl(t,n):y._visibility&2?Er(t,n,o,u):(y._visibility|=2,Ys(t,n,o,u,(n.subtreeFlags&10256)!==0)),h&2048&&qm(R,n);break;case 24:Er(t,n,o,u),h&2048&&Wm(n.alternate,n);break;default:Er(t,n,o,u)}}function Ys(t,n,o,u,h){for(h=h&&(n.subtreeFlags&10256)!==0,n=n.child;n!==null;){var y=t,R=n,_=o,Y=u,de=R.flags;switch(R.tag){case 0:case 11:case 15:Ys(y,R,_,Y,h),tl(8,R);break;case 23:break;case 22:var Ie=R.stateNode;R.memoizedState!==null?Ie._visibility&2?Ys(y,R,_,Y,h):nl(y,R):(Ie._visibility|=2,Ys(y,R,_,Y,h)),h&&de&2048&&qm(R.alternate,R);break;case 24:Ys(y,R,_,Y,h),h&&de&2048&&Wm(R.alternate,R);break;default:Ys(y,R,_,Y,h)}n=n.sibling}}function nl(t,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=t,u=n,h=u.flags;switch(u.tag){case 22:nl(o,u),h&2048&&qm(u.alternate,u);break;case 24:nl(o,u),h&2048&&Wm(u.alternate,u);break;default:nl(o,u)}n=n.sibling}}var rl=8192;function Js(t){if(t.subtreeFlags&rl)for(t=t.child;t!==null;)Xp(t),t=t.sibling}function Xp(t){switch(t.tag){case 26:Js(t),t.flags&rl&&t.memoizedState!==null&&bC(ir,t.memoizedState,t.memoizedProps);break;case 5:Js(t);break;case 3:case 4:var n=ir;ir=$c(t.stateNode.containerInfo),Js(t),ir=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=rl,rl=16777216,Js(t),rl=n):Js(t));break;default:Js(t)}}function $p(t){var n=t.alternate;if(n!==null&&(t=n.child,t!==null)){n.child=null;do n=t.sibling,t.sibling=null,t=n;while(t!==null)}}function il(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];za=u,e0(u,t)}$p(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Zp(t),t=t.sibling}function Zp(t){switch(t.tag){case 0:case 11:case 15:il(t),t.flags&2048&&wi(9,t,t.return);break;case 3:il(t);break;case 12:il(t);break;case 22:var n=t.stateNode;t.memoizedState!==null&&n._visibility&2&&(t.return===null||t.return.tag!==13)?(n._visibility&=-3,Pc(t)):il(t);break;default:il(t)}}function Pc(t){var n=t.deletions;if((t.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var u=n[o];za=u,e0(u,t)}$p(t)}for(t=t.child;t!==null;){switch(n=t,n.tag){case 0:case 11:case 15:wi(8,n,n.return),Pc(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Pc(n));break;default:Pc(n)}t=t.sibling}}function e0(t,n){for(;za!==null;){var o=za;switch(o.tag){case 0:case 11:case 15:wi(8,o,n);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var u=o.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ho(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,za=u;else e:for(o=t;za!==null;){u=za;var h=u.sibling,y=u.return;if(Gp(u),u===o){za=null;break e}if(h!==null){h.return=y,za=h;break e}za=y}}}var _v={getCacheForType:function(t){var n=rn(Ba),o=n.data.get(t);return o===void 0&&(o=t(),n.data.set(t,o)),o}},Fv=typeof WeakMap=="function"?WeakMap:Map,Gt=0,ia=null,Dt=null,_t=0,Kt=0,Bn=null,Si=!1,Xs=!1,Ym=!1,Jr=0,ba=0,ki=0,ds=0,Jm=0,Wn=0,$s=0,sl=null,vn=null,Xm=!1,$m=0,Hc=1/0,zc=null,Li=null,Ya=0,Ri=null,Zs=null,eo=0,Zm=0,eg=null,t0=null,ol=0,tg=null;function Un(){if((Gt&2)!==0&&_t!==0)return _t&-_t;if(q.T!==null){var t=Hs;return t!==0?t:lg()}return tr()}function a0(){Wn===0&&(Wn=(_t&536870912)===0||Ht?gr():536870912);var t=qn.current;return t!==null&&(t.flags|=32),Wn}function Mn(t,n,o){(t===ia&&(Kt===2||Kt===9)||t.cancelPendingCommit!==null)&&(to(t,0),Di(t,_t,Wn,!1)),On(t,o),((Gt&2)===0||t!==ia)&&(t===ia&&((Gt&2)===0&&(ds|=o),ba===4&&Di(t,_t,Wn,!1)),br(t))}function n0(t,n,o){if((Gt&6)!==0)throw Error(i(327));var u=!o&&(n&124)===0&&(n&t.expiredLanes)===0||St(t,n),h=u?Pv(t,n):rg(t,n,!0),y=u;do{if(h===0){Xs&&!u&&Di(t,n,0,!1);break}else{if(o=t.current.alternate,y&&!Ov(o)){h=rg(t,n,!1),y=!1;continue}if(h===2){if(y=n,t.errorRecoveryDisabledLanes&y)var R=0;else R=t.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){n=R;e:{var _=t;h=sl;var Y=_.current.memoizedState.isDehydrated;if(Y&&(to(_,R).flags|=256),R=rg(_,R,!1),R!==2){if(Ym&&!Y){_.errorRecoveryDisabledLanes|=y,ds|=y,h=4;break e}y=vn,vn=h,y!==null&&(vn===null?vn=y:vn.push.apply(vn,y))}h=R}if(y=!1,h!==2)continue}}if(h===1){to(t,0),Di(t,n,0,!0);break}e:{switch(u=t,y=h,y){case 0:case 1:throw Error(i(345));case 4:if((n&4194048)!==n)break;case 6:Di(u,n,Wn,!Si);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((n&62914560)===n&&(h=$m+300-De(),10<h)){if(Di(u,n,Wn,!Si),Et(u,0,!0)!==0)break e;u.timeoutHandle=D0(r0.bind(null,u,o,vn,zc,Xm,n,Wn,ds,$s,Si,y,2,-0,0),h);break e}r0(u,o,vn,zc,Xm,n,Wn,ds,$s,Si,y,0,-0,0)}}break}while(!0);br(t)}function r0(t,n,o,u,h,y,R,_,Y,de,Ie,xe,ge,Ae){if(t.timeoutHandle=-1,xe=n.subtreeFlags,(xe&8192||(xe&16785408)===16785408)&&(fl={stylesheets:null,count:0,unsuspend:EC},Xp(n),xe=IC(),xe!==null)){t.cancelPendingCommit=xe(d0.bind(null,t,n,y,o,u,h,R,_,Y,Ie,1,ge,Ae)),Di(t,y,R,!de);return}d0(t,n,y,o,u,h,R,_,Y)}function Ov(t){for(var n=t;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var h=o[u],y=h.getSnapshot;h=h.value;try{if(!kn(y(),h))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Di(t,n,o,u){n&=~Jm,n&=~ds,t.suspendedLanes|=n,t.pingedLanes&=~n,u&&(t.warmLanes|=n),u=t.expirationTimes;for(var h=n;0<h;){var y=31-w(h),R=1<<y;u[y]=-1,h&=~R}o!==0&&Oe(t,o,n)}function Qc(){return(Gt&6)===0?(ll(0),!1):!0}function ag(){if(Dt!==null){if(Kt===0)var t=Dt.return;else t=Dt,zr=is=null,Em(t),qs=null,$o=0,t=Dt;for(;t!==null;)Fp(t.alternate,t),t=t.return;Dt=null}}function to(t,n){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,aC(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),ag(),ia=t,Dt=o=jr(t.current,null),_t=n,Kt=0,Bn=null,Si=!1,Xs=St(t,n),Ym=!1,$s=Wn=Jm=ds=ki=ba=0,vn=sl=null,Xm=!1,(n&8)!==0&&(n|=n&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=n;0<u;){var h=31-w(u),y=1<<h;n|=t[h],u&=~y}return Jr=n,dc(),o}function i0(t,n){Tt=null,q.H=Lc,n===Qo||n===bc?(n=vA(),Kt=3):n===EA?(n=vA(),Kt=4):Kt=n===Cp?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Bn=n,Dt===null&&(ba=1,Mc(t,Qn(n,t.current)))}function s0(){var t=q.H;return q.H=Lc,t===null?Lc:t}function o0(){var t=q.A;return q.A=_v,t}function ng(){ba=4,Si||(_t&4194048)!==_t&&qn.current!==null||(Xs=!0),(ki&134217727)===0&&(ds&134217727)===0||ia===null||Di(ia,_t,Wn,!1)}function rg(t,n,o){var u=Gt;Gt|=2;var h=s0(),y=o0();(ia!==t||_t!==n)&&(zc=null,to(t,n)),n=!1;var R=ba;e:do try{if(Kt!==0&&Dt!==null){var _=Dt,Y=Bn;switch(Kt){case 8:ag(),R=6;break e;case 3:case 2:case 9:case 6:qn.current===null&&(n=!0);var de=Kt;if(Kt=0,Bn=null,ao(t,_,Y,de),o&&Xs){R=0;break e}break;default:de=Kt,Kt=0,Bn=null,ao(t,_,Y,de)}}jv(),R=ba;break}catch(Ie){i0(t,Ie)}while(!0);return n&&t.shellSuspendCounter++,zr=is=null,Gt=u,q.H=h,q.A=y,Dt===null&&(ia=null,_t=0,dc()),R}function jv(){for(;Dt!==null;)l0(Dt)}function Pv(t,n){var o=Gt;Gt|=2;var u=s0(),h=o0();ia!==t||_t!==n?(zc=null,Hc=De()+500,to(t,n)):Xs=St(t,n);e:do try{if(Kt!==0&&Dt!==null){n=Dt;var y=Bn;t:switch(Kt){case 1:Kt=0,Bn=null,ao(t,n,y,1);break;case 2:case 9:if(bA(y)){Kt=0,Bn=null,c0(n);break}n=function(){Kt!==2&&Kt!==9||ia!==t||(Kt=7),br(t)},y.then(n,n);break e;case 3:Kt=7;break e;case 4:Kt=5;break e;case 7:bA(y)?(Kt=0,Bn=null,c0(n)):(Kt=0,Bn=null,ao(t,n,y,7));break;case 5:var R=null;switch(Dt.tag){case 26:R=Dt.memoizedState;case 5:case 27:var _=Dt;if(!R||V0(R)){Kt=0,Bn=null;var Y=_.sibling;if(Y!==null)Dt=Y;else{var de=_.return;de!==null?(Dt=de,Vc(de)):Dt=null}break t}}Kt=0,Bn=null,ao(t,n,y,5);break;case 6:Kt=0,Bn=null,ao(t,n,y,6);break;case 8:ag(),ba=6;break e;default:throw Error(i(462))}}Hv();break}catch(Ie){i0(t,Ie)}while(!0);return zr=is=null,q.H=u,q.A=h,Gt=o,Dt!==null?0:(ia=null,_t=0,dc(),ba)}function Hv(){for(;Dt!==null&&!Te();)l0(Dt)}function l0(t){var n=Mp(t.alternate,t,Jr);t.memoizedProps=t.pendingProps,n===null?Vc(t):Dt=n}function c0(t){var n=t,o=n.alternate;switch(n.tag){case 15:case 0:n=kp(o,n,n.pendingProps,n.type,void 0,_t);break;case 11:n=kp(o,n,n.pendingProps,n.type.render,n.ref,_t);break;case 5:Em(n);default:Fp(o,n),n=Dt=uA(n,Jr),n=Mp(o,n,Jr)}t.memoizedProps=t.pendingProps,n===null?Vc(t):Dt=n}function ao(t,n,o,u){zr=is=null,Em(n),qs=null,$o=0;var h=n.return;try{if(Lv(t,h,n,o,_t)){ba=1,Mc(t,Qn(o,t.current)),Dt=null;return}}catch(y){if(h!==null)throw Dt=h,y;ba=1,Mc(t,Qn(o,t.current)),Dt=null;return}n.flags&32768?(Ht||u===1?t=!0:Xs||(_t&536870912)!==0?t=!1:(Si=t=!0,(u===2||u===9||u===3||u===6)&&(u=qn.current,u!==null&&u.tag===13&&(u.flags|=16384))),u0(n,t)):Vc(n)}function Vc(t){var n=t;do{if((n.flags&32768)!==0){u0(n,Si);return}t=n.return;var o=Dv(n.alternate,n,Jr);if(o!==null){Dt=o;return}if(n=n.sibling,n!==null){Dt=n;return}Dt=n=t}while(n!==null);ba===0&&(ba=5)}function u0(t,n){do{var o=Bv(t.alternate,t);if(o!==null){o.flags&=32767,Dt=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(t=t.sibling,t!==null)){Dt=t;return}Dt=t=o}while(t!==null);ba=6,Dt=null}function d0(t,n,o,u,h,y,R,_,Y){t.cancelPendingCommit=null;do Gc();while(Ya!==0);if((Gt&6)!==0)throw Error(i(327));if(n!==null){if(n===t.current)throw Error(i(177));if(y=n.lanes|n.childLanes,y|=Wd,jn(t,o,y,R,_,Y),t===ia&&(Dt=ia=null,_t=0),Zs=n,Ri=t,eo=o,Zm=y,eg=h,t0=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Gv(Ye,function(){return A0(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=q.T,q.T=null,h=re.p,re.p=2,R=Gt,Gt|=4;try{Uv(t,n,o)}finally{Gt=R,re.p=h,q.T=u}}Ya=1,m0(),g0(),f0()}}function m0(){if(Ya===1){Ya=0;var t=Ri,n=Zs,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=q.T,q.T=null;var u=re.p;re.p=2;var h=Gt;Gt|=4;try{Wp(n,t);var y=Ag,R=eA(t.containerInfo),_=y.focusedElem,Y=y.selectionRange;if(R!==_&&_&&_.ownerDocument&&Zh(_.ownerDocument.documentElement,_)){if(Y!==null&&Qd(_)){var de=Y.start,Ie=Y.end;if(Ie===void 0&&(Ie=de),"selectionStart"in _)_.selectionStart=de,_.selectionEnd=Math.min(Ie,_.value.length);else{var xe=_.ownerDocument||document,ge=xe&&xe.defaultView||window;if(ge.getSelection){var Ae=ge.getSelection(),gt=_.textContent.length,ot=Math.min(Y.start,gt),$t=Y.end===void 0?ot:Math.min(Y.end,gt);!Ae.extend&&ot>$t&&(R=$t,$t=ot,ot=R);var se=$h(_,ot),te=$h(_,$t);if(se&&te&&(Ae.rangeCount!==1||Ae.anchorNode!==se.node||Ae.anchorOffset!==se.offset||Ae.focusNode!==te.node||Ae.focusOffset!==te.offset)){var ue=xe.createRange();ue.setStart(se.node,se.offset),Ae.removeAllRanges(),ot>$t?(Ae.addRange(ue),Ae.extend(te.node,te.offset)):(ue.setEnd(te.node,te.offset),Ae.addRange(ue))}}}}for(xe=[],Ae=_;Ae=Ae.parentNode;)Ae.nodeType===1&&xe.push({element:Ae,left:Ae.scrollLeft,top:Ae.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<xe.length;_++){var Ce=xe[_];Ce.element.scrollLeft=Ce.left,Ce.element.scrollTop=Ce.top}}nu=!!hg,Ag=hg=null}finally{Gt=h,re.p=u,q.T=o}}t.current=n,Ya=2}}function g0(){if(Ya===2){Ya=0;var t=Ri,n=Zs,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=q.T,q.T=null;var u=re.p;re.p=2;var h=Gt;Gt|=4;try{Vp(t,n.alternate,n)}finally{Gt=h,re.p=u,q.T=o}}Ya=3}}function f0(){if(Ya===4||Ya===3){Ya=0,me();var t=Ri,n=Zs,o=eo,u=t0;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ya=5:(Ya=0,Zs=Ri=null,h0(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(Li=null),sa(o),n=n.stateNode,U&&typeof U.onCommitFiberRoot=="function")try{U.onCommitFiberRoot(na,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=q.T,h=re.p,re.p=2,q.T=null;try{for(var y=t.onRecoverableError,R=0;R<u.length;R++){var _=u[R];y(_.value,{componentStack:_.stack})}}finally{q.T=n,re.p=h}}(eo&3)!==0&&Gc(),br(t),h=t.pendingLanes,(o&4194090)!==0&&(h&42)!==0?t===tg?ol++:(ol=0,tg=t):ol=0,ll(0)}}function h0(t,n){(t.pooledCacheLanes&=n)===0&&(n=t.pooledCache,n!=null&&(t.pooledCache=null,Ho(n)))}function Gc(t){return m0(),g0(),f0(),A0()}function A0(){if(Ya!==5)return!1;var t=Ri,n=Zm;Zm=0;var o=sa(eo),u=q.T,h=re.p;try{re.p=32>o?32:o,q.T=null,o=eg,eg=null;var y=Ri,R=eo;if(Ya=0,Zs=Ri=null,eo=0,(Gt&6)!==0)throw Error(i(331));var _=Gt;if(Gt|=4,Zp(y.current),Jp(y,y.current,R,o),Gt=_,ll(0,!1),U&&typeof U.onPostCommitFiberRoot=="function")try{U.onPostCommitFiberRoot(na,y)}catch{}return!0}finally{re.p=h,q.T=u,h0(t,n)}}function p0(t,n,o){n=Qn(o,n),n=Bm(t.stateNode,n,2),t=Ii(t,n,2),t!==null&&(On(t,2),br(t))}function ta(t,n,o){if(t.tag===3)p0(t,t,o);else for(;n!==null;){if(n.tag===3){p0(n,t,o);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Li===null||!Li.has(u))){t=Qn(o,t),o=Ip(2),u=Ii(n,o,2),u!==null&&(vp(o,u,n,t),On(u,2),br(u));break}}n=n.return}}function ig(t,n,o){var u=t.pingCache;if(u===null){u=t.pingCache=new Fv;var h=new Set;u.set(n,h)}else h=u.get(n),h===void 0&&(h=new Set,u.set(n,h));h.has(o)||(Ym=!0,h.add(o),t=zv.bind(null,t,n,o),n.then(t,t))}function zv(t,n,o){var u=t.pingCache;u!==null&&u.delete(n),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,ia===t&&(_t&o)===o&&(ba===4||ba===3&&(_t&62914560)===_t&&300>De()-$m?(Gt&2)===0&&to(t,0):Jm|=o,$s===_t&&($s=0)),br(t)}function y0(t,n){n===0&&(n=ra()),t=Fs(t,n),t!==null&&(On(t,n),br(t))}function Qv(t){var n=t.memoizedState,o=0;n!==null&&(o=n.retryLane),y0(t,o)}function Vv(t,n){var o=0;switch(t.tag){case 13:var u=t.stateNode,h=t.memoizedState;h!==null&&(o=h.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(i(314))}u!==null&&u.delete(n),y0(t,o)}function Gv(t,n){return tt(t,n)}var Kc=null,no=null,sg=!1,qc=!1,og=!1,ms=0;function br(t){t!==no&&t.next===null&&(no===null?Kc=no=t:no=no.next=t),qc=!0,sg||(sg=!0,qv())}function ll(t,n){if(!og&&qc){og=!0;do for(var o=!1,u=Kc;u!==null;){if(t!==0){var h=u.pendingLanes;if(h===0)var y=0;else{var R=u.suspendedLanes,_=u.pingedLanes;y=(1<<31-w(42|t)+1)-1,y&=h&~(R&~_),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,v0(u,y))}else y=_t,y=Et(u,u===ia?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||St(u,y)||(o=!0,v0(u,y));u=u.next}while(o);og=!1}}function Kv(){E0()}function E0(){qc=sg=!1;var t=0;ms!==0&&(tC()&&(t=ms),ms=0);for(var n=De(),o=null,u=Kc;u!==null;){var h=u.next,y=b0(u,n);y===0?(u.next=null,o===null?Kc=h:o.next=h,h===null&&(no=o)):(o=u,(t!==0||(y&3)!==0)&&(qc=!0)),u=h}ll(t)}function b0(t,n){for(var o=t.suspendedLanes,u=t.pingedLanes,h=t.expirationTimes,y=t.pendingLanes&-62914561;0<y;){var R=31-w(y),_=1<<R,Y=h[R];Y===-1?((_&o)===0||(_&u)!==0)&&(h[R]=mt(_,n)):Y<=n&&(t.expiredLanes|=_),y&=~_}if(n=ia,o=_t,o=Et(t,t===n?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,o===0||t===n&&(Kt===2||Kt===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&nt(u),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||St(t,o)){if(n=o&-o,n===t.callbackPriority)return n;switch(u!==null&&nt(u),sa(o)){case 2:case 8:o=at;break;case 32:o=Ye;break;case 268435456:o=jt;break;default:o=Ye}return u=I0.bind(null,t),o=tt(o,u),t.callbackPriority=n,t.callbackNode=o,n}return u!==null&&u!==null&&nt(u),t.callbackPriority=2,t.callbackNode=null,2}function I0(t,n){if(Ya!==0&&Ya!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(Gc()&&t.callbackNode!==o)return null;var u=_t;return u=Et(t,t===ia?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(n0(t,u,n),b0(t,De()),t.callbackNode!=null&&t.callbackNode===o?I0.bind(null,t):null)}function v0(t,n){if(Gc())return null;n0(t,n,!0)}function qv(){nC(function(){(Gt&6)!==0?tt(ze,Kv):E0()})}function lg(){return ms===0&&(ms=gr()),ms}function C0(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:pn(""+t)}function N0(t,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,t.id&&o.setAttribute("form",t.id),n.parentNode.insertBefore(o,n),t=new FormData(t),o.parentNode.removeChild(o),t}function Wv(t,n,o,u,h){if(n==="submit"&&o&&o.stateNode===h){var y=C0((h[ya]||null).action),R=u.submitter;R&&(n=(n=R[ya]||null)?C0(n.formAction):R.getAttribute("formAction"),n!==null&&(y=n,R=null));var _=new It("action","action",null,u,h);t.push({event:_,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(ms!==0){var Y=R?N0(h,R):new FormData(h);Sm(o,{pending:!0,data:Y,method:h.method,action:y},null,Y)}}else typeof y=="function"&&(_.preventDefault(),Y=R?N0(h,R):new FormData(h),Sm(o,{pending:!0,data:Y,method:h.method,action:y},y,Y))},currentTarget:h}]})}}for(var cg=0;cg<qd.length;cg++){var ug=qd[cg],Yv=ug.toLowerCase(),Jv=ug[0].toUpperCase()+ug.slice(1);rr(Yv,"on"+Jv)}rr(nA,"onAnimationEnd"),rr(rA,"onAnimationIteration"),rr(iA,"onAnimationStart"),rr("dblclick","onDoubleClick"),rr("focusin","onFocus"),rr("focusout","onBlur"),rr(gv,"onTransitionRun"),rr(fv,"onTransitionStart"),rr(hv,"onTransitionCancel"),rr(sA,"onTransitionEnd"),we("onMouseEnter",["mouseout","mouseover"]),we("onMouseLeave",["mouseout","mouseover"]),we("onPointerEnter",["pointerout","pointerover"]),we("onPointerLeave",["pointerout","pointerover"]),Z("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Z("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Z("onBeforeInput",["compositionend","keypress","textInput","paste"]),Z("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Z("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cl="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(" "),Xv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cl));function w0(t,n){n=(n&4)!==0;for(var o=0;o<t.length;o++){var u=t[o],h=u.event;u=u.listeners;e:{var y=void 0;if(n)for(var R=u.length-1;0<=R;R--){var _=u[R],Y=_.instance,de=_.currentTarget;if(_=_.listener,Y!==y&&h.isPropagationStopped())break e;y=_,h.currentTarget=de;try{y(h)}catch(Ie){Uc(Ie)}h.currentTarget=null,y=Y}else for(R=0;R<u.length;R++){if(_=u[R],Y=_.instance,de=_.currentTarget,_=_.listener,Y!==y&&h.isPropagationStopped())break e;y=_,h.currentTarget=de;try{y(h)}catch(Ie){Uc(Ie)}h.currentTarget=null,y=Y}}}}function Bt(t,n){var o=n[Da];o===void 0&&(o=n[Da]=new Set);var u=t+"__bubble";o.has(u)||(x0(n,t,2,!1),o.add(u))}function dg(t,n,o){var u=0;n&&(u|=4),x0(o,t,u,n)}var Wc="_reactListening"+Math.random().toString(36).slice(2);function mg(t){if(!t[Wc]){t[Wc]=!0,cn.forEach(function(o){o!=="selectionchange"&&(Xv.has(o)||dg(o,!1,t),dg(o,!0,t))});var n=t.nodeType===9?t:t.ownerDocument;n===null||n[Wc]||(n[Wc]=!0,dg("selectionchange",!1,n))}}function x0(t,n,o,u){switch(J0(n)){case 2:var h=NC;break;case 8:h=wC;break;default:h=xg}o=h.bind(null,n,o,t),h=void 0,!Hn||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(h=!0),u?h!==void 0?t.addEventListener(n,o,{capture:!0,passive:h}):t.addEventListener(n,o,!0):h!==void 0?t.addEventListener(n,o,{passive:h}):t.addEventListener(n,o,!1)}function gg(t,n,o,u,h){var y=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var R=u.tag;if(R===3||R===4){var _=u.stateNode.containerInfo;if(_===h)break;if(R===4)for(R=u.return;R!==null;){var Y=R.tag;if((Y===3||Y===4)&&R.stateNode.containerInfo===h)return;R=R.return}for(;_!==null;){if(R=Xe(_),R===null)return;if(Y=R.tag,Y===5||Y===6||Y===26||Y===27){u=y=R;continue e}_=_.parentNode}}u=u.return}Lo(function(){var de=y,Ie=Fr(o),xe=[];e:{var ge=oA.get(t);if(ge!==void 0){var Ae=It,gt=t;switch(t){case"keypress":if(F(o)===0)break e;case"keydown":case"keyup":Ae=Rd;break;case"focusin":gt="focus",Ae=Ro;break;case"focusout":gt="blur",Ae=Ro;break;case"beforeblur":case"afterblur":Ae=Ro;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ae=rc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=Ed;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=Bd;break;case nA:case rA:case iA:Ae=vd;break;case sA:Ae=Md;break;case"scroll":case"scrollend":Ae=ua;break;case"wheel":Ae=lc;break;case"copy":case"cut":case"paste":Ae=Nd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=oc;break;case"toggle":case"beforetoggle":Ae=Od}var ot=(n&4)!==0,$t=!ot&&(t==="scroll"||t==="scrollend"),se=ot?ge!==null?ge+"Capture":null:ge;ot=[];for(var te=de,ue;te!==null;){var Ce=te;if(ue=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||ue===null||se===null||(Ce=hi(te,se),Ce!=null&&ot.push(ul(te,Ce,ue))),$t)break;te=te.return}0<ot.length&&(ge=new Ae(ge,gt,null,o,Ie),xe.push({event:ge,listeners:ot}))}}if((n&7)===0){e:{if(ge=t==="mouseover"||t==="pointerover",Ae=t==="mouseout"||t==="pointerout",ge&&o!==Pn&&(gt=o.relatedTarget||o.fromElement)&&(Xe(gt)||gt[Wt]))break e;if((Ae||ge)&&(ge=Ie.window===Ie?Ie:(ge=Ie.ownerDocument)?ge.defaultView||ge.parentWindow:window,Ae?(gt=o.relatedTarget||o.toElement,Ae=de,gt=gt?Xe(gt):null,gt!==null&&($t=c(gt),ot=gt.tag,gt!==$t||ot!==5&&ot!==27&&ot!==6)&&(gt=null)):(Ae=null,gt=de),Ae!==gt)){if(ot=rc,Ce="onMouseLeave",se="onMouseEnter",te="mouse",(t==="pointerout"||t==="pointerover")&&(ot=oc,Ce="onPointerLeave",se="onPointerEnter",te="pointer"),$t=Ae==null?ge:bt(Ae),ue=gt==null?ge:bt(gt),ge=new ot(Ce,te+"leave",Ae,o,Ie),ge.target=$t,ge.relatedTarget=ue,Ce=null,Xe(Ie)===de&&(ot=new ot(se,te+"enter",gt,o,Ie),ot.target=ue,ot.relatedTarget=$t,Ce=ot),$t=Ce,Ae&&gt)t:{for(ot=Ae,se=gt,te=0,ue=ot;ue;ue=ro(ue))te++;for(ue=0,Ce=se;Ce;Ce=ro(Ce))ue++;for(;0<te-ue;)ot=ro(ot),te--;for(;0<ue-te;)se=ro(se),ue--;for(;te--;){if(ot===se||se!==null&&ot===se.alternate)break t;ot=ro(ot),se=ro(se)}ot=null}else ot=null;Ae!==null&&T0(xe,ge,Ae,ot,!1),gt!==null&&$t!==null&&T0(xe,$t,gt,ot,!0)}}e:{if(ge=de?bt(de):window,Ae=ge.nodeName&&ge.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ge.type==="file")var qe=Kh;else if(nn(ge))if(qh)qe=uv;else{qe=lv;var Lt=ov}else Ae=ge.nodeName,!Ae||Ae.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?de&&mi(de.elementType)&&(qe=Kh):qe=cv;if(qe&&(qe=qe(t,de))){En(xe,qe,o,Ie);break e}Lt&&Lt(t,ge,de),t==="focusout"&&de&&ge.type==="number"&&de.memoizedProps.value!=null&&Ls(ge,"number",ge.value)}switch(Lt=de?bt(de):window,t){case"focusin":(nn(Lt)||Lt.contentEditable==="true")&&(Us=Lt,Vd=de,_o=null);break;case"focusout":_o=Vd=Us=null;break;case"mousedown":Gd=!0;break;case"contextmenu":case"mouseup":case"dragend":Gd=!1,tA(xe,o,Ie);break;case"selectionchange":if(mv)break;case"keydown":case"keyup":tA(xe,o,Ie)}var et;if(Ai)e:{switch(t){case"compositionstart":var ct="onCompositionStart";break e;case"compositionend":ct="onCompositionEnd";break e;case"compositionupdate":ct="onCompositionUpdate";break e}ct=void 0}else lt?Ke(t,o)&&(ct="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(ct="onCompositionStart");ct&&(Uo&&o.locale!=="ko"&&(lt||ct!=="onCompositionStart"?ct==="onCompositionEnd"&&lt&&(et=D()):(zn=Ie,A="value"in zn?zn.value:zn.textContent,lt=!0)),Lt=Yc(de,ct),0<Lt.length&&(ct=new Do(ct,t,null,o,Ie),xe.push({event:ct,listeners:Lt}),et?ct.data=et:(et=rt(o),et!==null&&(ct.data=et)))),(et=cc?Pt(t,o):Tn(t,o))&&(ct=Yc(de,"onBeforeInput"),0<ct.length&&(Lt=new Do("onBeforeInput","beforeinput",null,o,Ie),xe.push({event:Lt,listeners:ct}),Lt.data=et)),Wv(xe,t,de,o,Ie)}w0(xe,n)})}function ul(t,n,o){return{instance:t,listener:n,currentTarget:o}}function Yc(t,n){for(var o=n+"Capture",u=[];t!==null;){var h=t,y=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||y===null||(h=hi(t,o),h!=null&&u.unshift(ul(t,h,y)),h=hi(t,n),h!=null&&u.push(ul(t,h,y))),t.tag===3)return u;t=t.return}return[]}function ro(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function T0(t,n,o,u,h){for(var y=n._reactName,R=[];o!==null&&o!==u;){var _=o,Y=_.alternate,de=_.stateNode;if(_=_.tag,Y!==null&&Y===u)break;_!==5&&_!==26&&_!==27||de===null||(Y=de,h?(de=hi(o,y),de!=null&&R.unshift(ul(o,de,Y))):h||(de=hi(o,y),de!=null&&R.push(ul(o,de,Y)))),o=o.return}R.length!==0&&t.push({event:n,listeners:R})}var $v=/\r\n?/g,Zv=/\u0000|\uFFFD/g;function S0(t){return(typeof t=="string"?t:""+t).replace($v,`
`).replace(Zv,"")}function k0(t,n){return n=S0(n),S0(t)===n}function Jc(){}function Xt(t,n,o,u,h,y){switch(o){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||hr(t,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&hr(t,""+u);break;case"className":qa(t,"class",u);break;case"tabIndex":qa(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":qa(t,o,u);break;case"style":Yi(t,u,y);break;case"data":if(n!=="object"){qa(t,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||o!=="href")){t.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=pn(""+u),t.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(o==="formAction"?(n!=="input"&&Xt(t,n,"name",h.name,h,null),Xt(t,n,"formEncType",h.formEncType,h,null),Xt(t,n,"formMethod",h.formMethod,h,null),Xt(t,n,"formTarget",h.formTarget,h,null)):(Xt(t,n,"encType",h.encType,h,null),Xt(t,n,"method",h.method,h,null),Xt(t,n,"target",h.target,h,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(o);break}u=pn(""+u),t.setAttribute(o,u);break;case"onClick":u!=null&&(t.onclick=Jc);break;case"onScroll":u!=null&&Bt("scroll",t);break;case"onScrollEnd":u!=null&&Bt("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(h.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}o=pn(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""+u):t.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":u===!0?t.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(o,u):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(o,u):t.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(o):t.setAttribute(o,u);break;case"popover":Bt("beforetoggle",t),Bt("toggle",t),la(t,"popover",u);break;case"xlinkActuate":va(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":va(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":va(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":va(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":va(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":va(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":va(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":va(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":va(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":la(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=_r.get(o)||o,la(t,o,u))}}function fg(t,n,o,u,h,y){switch(o){case"style":Yi(t,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(i(61));if(o=u.__html,o!=null){if(h.children!=null)throw Error(i(60));t.innerHTML=o}}break;case"children":typeof u=="string"?hr(t,u):(typeof u=="number"||typeof u=="bigint")&&hr(t,""+u);break;case"onScroll":u!=null&&Bt("scroll",t);break;case"onScrollEnd":u!=null&&Bt("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Jc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fe.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(h=o.endsWith("Capture"),n=o.slice(2,h?o.length-7:void 0),y=t[ya]||null,y=y!=null?y[o]:null,typeof y=="function"&&t.removeEventListener(n,y,h),typeof u=="function")){typeof y!="function"&&y!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(n,u,h);break e}o in t?t[o]=u:u===!0?t.setAttribute(o,""):la(t,o,u)}}}function Ja(t,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Bt("error",t),Bt("load",t);var u=!1,h=!1,y;for(y in o)if(o.hasOwnProperty(y)){var R=o[y];if(R!=null)switch(y){case"src":u=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:Xt(t,n,y,R,o,null)}}h&&Xt(t,n,"srcSet",o.srcSet,o,null),u&&Xt(t,n,"src",o.src,o,null);return;case"input":Bt("invalid",t);var _=y=R=h=null,Y=null,de=null;for(u in o)if(o.hasOwnProperty(u)){var Ie=o[u];if(Ie!=null)switch(u){case"name":h=Ie;break;case"type":R=Ie;break;case"checked":Y=Ie;break;case"defaultChecked":de=Ie;break;case"value":y=Ie;break;case"defaultValue":_=Ie;break;case"children":case"dangerouslySetInnerHTML":if(Ie!=null)throw Error(i(137,n));break;default:Xt(t,n,u,Ie,o,null)}}ui(t,y,_,Y,de,R,h,!1),Ur(t);return;case"select":Bt("invalid",t),u=R=y=null;for(h in o)if(o.hasOwnProperty(h)&&(_=o[h],_!=null))switch(h){case"value":y=_;break;case"defaultValue":R=_;break;case"multiple":u=_;default:Xt(t,n,h,_,o,null)}n=y,o=R,t.multiple=!!u,n!=null?di(t,!!u,n,!1):o!=null&&di(t,!!u,o,!0);return;case"textarea":Bt("invalid",t),y=h=u=null;for(R in o)if(o.hasOwnProperty(R)&&(_=o[R],_!=null))switch(R){case"value":u=_;break;case"defaultValue":h=_;break;case"children":y=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(i(91));break;default:Xt(t,n,R,_,o,null)}To(t,u,h,y),Ur(t);return;case"option":for(Y in o)if(o.hasOwnProperty(Y)&&(u=o[Y],u!=null))switch(Y){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:Xt(t,n,Y,u,o,null)}return;case"dialog":Bt("beforetoggle",t),Bt("toggle",t),Bt("cancel",t),Bt("close",t);break;case"iframe":case"object":Bt("load",t);break;case"video":case"audio":for(u=0;u<cl.length;u++)Bt(cl[u],t);break;case"image":Bt("error",t),Bt("load",t);break;case"details":Bt("toggle",t);break;case"embed":case"source":case"link":Bt("error",t),Bt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in o)if(o.hasOwnProperty(de)&&(u=o[de],u!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,n));default:Xt(t,n,de,u,o,null)}return;default:if(mi(n)){for(Ie in o)o.hasOwnProperty(Ie)&&(u=o[Ie],u!==void 0&&fg(t,n,Ie,u,o,void 0));return}}for(_ in o)o.hasOwnProperty(_)&&(u=o[_],u!=null&&Xt(t,n,_,u,o,null))}function eC(t,n,o,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,y=null,R=null,_=null,Y=null,de=null,Ie=null;for(Ae in o){var xe=o[Ae];if(o.hasOwnProperty(Ae)&&xe!=null)switch(Ae){case"checked":break;case"value":break;case"defaultValue":Y=xe;default:u.hasOwnProperty(Ae)||Xt(t,n,Ae,null,u,xe)}}for(var ge in u){var Ae=u[ge];if(xe=o[ge],u.hasOwnProperty(ge)&&(Ae!=null||xe!=null))switch(ge){case"type":y=Ae;break;case"name":h=Ae;break;case"checked":de=Ae;break;case"defaultChecked":Ie=Ae;break;case"value":R=Ae;break;case"defaultValue":_=Ae;break;case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(i(137,n));break;default:Ae!==xe&&Xt(t,n,ge,Ae,u,xe)}}xo(t,R,_,Y,de,Ie,y,h);return;case"select":Ae=R=_=ge=null;for(y in o)if(Y=o[y],o.hasOwnProperty(y)&&Y!=null)switch(y){case"value":break;case"multiple":Ae=Y;default:u.hasOwnProperty(y)||Xt(t,n,y,null,u,Y)}for(h in u)if(y=u[h],Y=o[h],u.hasOwnProperty(h)&&(y!=null||Y!=null))switch(h){case"value":ge=y;break;case"defaultValue":_=y;break;case"multiple":R=y;default:y!==Y&&Xt(t,n,h,y,u,Y)}n=_,o=R,u=Ae,ge!=null?di(t,!!o,ge,!1):!!u!=!!o&&(n!=null?di(t,!!o,n,!0):di(t,!!o,o?[]:"",!1));return;case"textarea":Ae=ge=null;for(_ in o)if(h=o[_],o.hasOwnProperty(_)&&h!=null&&!u.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Xt(t,n,_,null,u,h)}for(R in u)if(h=u[R],y=o[R],u.hasOwnProperty(R)&&(h!=null||y!=null))switch(R){case"value":ge=h;break;case"defaultValue":Ae=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==y&&Xt(t,n,R,h,u,y)}Rs(t,ge,Ae);return;case"option":for(var gt in o)if(ge=o[gt],o.hasOwnProperty(gt)&&ge!=null&&!u.hasOwnProperty(gt))switch(gt){case"selected":t.selected=!1;break;default:Xt(t,n,gt,null,u,ge)}for(Y in u)if(ge=u[Y],Ae=o[Y],u.hasOwnProperty(Y)&&ge!==Ae&&(ge!=null||Ae!=null))switch(Y){case"selected":t.selected=ge&&typeof ge!="function"&&typeof ge!="symbol";break;default:Xt(t,n,Y,ge,u,Ae)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ot in o)ge=o[ot],o.hasOwnProperty(ot)&&ge!=null&&!u.hasOwnProperty(ot)&&Xt(t,n,ot,null,u,ge);for(de in u)if(ge=u[de],Ae=o[de],u.hasOwnProperty(de)&&ge!==Ae&&(ge!=null||Ae!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(i(137,n));break;default:Xt(t,n,de,ge,u,Ae)}return;default:if(mi(n)){for(var $t in o)ge=o[$t],o.hasOwnProperty($t)&&ge!==void 0&&!u.hasOwnProperty($t)&&fg(t,n,$t,void 0,u,ge);for(Ie in u)ge=u[Ie],Ae=o[Ie],!u.hasOwnProperty(Ie)||ge===Ae||ge===void 0&&Ae===void 0||fg(t,n,Ie,ge,u,Ae);return}}for(var se in o)ge=o[se],o.hasOwnProperty(se)&&ge!=null&&!u.hasOwnProperty(se)&&Xt(t,n,se,null,u,ge);for(xe in u)ge=u[xe],Ae=o[xe],!u.hasOwnProperty(xe)||ge===Ae||ge==null&&Ae==null||Xt(t,n,xe,ge,u,Ae)}var hg=null,Ag=null;function Xc(t){return t.nodeType===9?t:t.ownerDocument}function L0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function R0(t,n){if(t===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&n==="foreignObject"?0:t}function pg(t,n){return t==="textarea"||t==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var yg=null;function tC(){var t=window.event;return t&&t.type==="popstate"?t===yg?!1:(yg=t,!0):(yg=null,!1)}var D0=typeof setTimeout=="function"?setTimeout:void 0,aC=typeof clearTimeout=="function"?clearTimeout:void 0,B0=typeof Promise=="function"?Promise:void 0,nC=typeof queueMicrotask=="function"?queueMicrotask:typeof B0<"u"?function(t){return B0.resolve(null).then(t).catch(rC)}:D0;function rC(t){setTimeout(function(){throw t})}function Bi(t){return t==="head"}function U0(t,n){var o=n,u=0,h=0;do{var y=o.nextSibling;if(t.removeChild(o),y&&y.nodeType===8)if(o=y.data,o==="/$"){if(0<u&&8>u){o=u;var R=t.ownerDocument;if(o&1&&dl(R.documentElement),o&2&&dl(R.body),o&4)for(o=R.head,dl(o),R=o.firstChild;R;){var _=R.nextSibling,Y=R.nodeName;R[_e]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&R.rel.toLowerCase()==="stylesheet"||o.removeChild(R),R=_}}if(h===0){t.removeChild(y),El(n);return}h--}else o==="$"||o==="$?"||o==="$!"?h++:u=o.charCodeAt(0)-48;else u=0;o=y}while(o);El(n)}function Eg(t){var n=t.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Eg(o),Me(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function iC(t,n,o,u){for(;t.nodeType===1;){var h=o;if(t.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[_e])switch(n){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(y=t.getAttribute("rel"),y==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(y!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(y=t.getAttribute("src"),(y!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&y&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(n==="input"&&t.type==="hidden"){var y=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===y)return t}else return t;if(t=sr(t.nextSibling),t===null)break}return null}function sC(t,n,o){if(n==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=sr(t.nextSibling),t===null))return null;return t}function bg(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function oC(t,n){var o=t.ownerDocument;if(t.data!=="$?"||o.readyState==="complete")n();else{var u=function(){n(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function sr(t){for(;t!=null;t=t.nextSibling){var n=t.nodeType;if(n===1||n===3)break;if(n===8){if(n=t.data,n==="$"||n==="$!"||n==="$?"||n==="F!"||n==="F")break;if(n==="/$")return null}}return t}var Ig=null;function M0(t){t=t.previousSibling;for(var n=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return t;n--}else o==="/$"&&n++}t=t.previousSibling}return null}function _0(t,n,o){switch(n=Xc(o),t){case"html":if(t=n.documentElement,!t)throw Error(i(452));return t;case"head":if(t=n.head,!t)throw Error(i(453));return t;case"body":if(t=n.body,!t)throw Error(i(454));return t;default:throw Error(i(451))}}function dl(t){for(var n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Me(t)}var Yn=new Map,F0=new Set;function $c(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Xr=re.d;re.d={f:lC,r:cC,D:uC,C:dC,L:mC,m:gC,X:hC,S:fC,M:AC};function lC(){var t=Xr.f(),n=Qc();return t||n}function cC(t){var n=kt(t);n!==null&&n.tag===5&&n.type==="form"?np(n):Xr.r(t)}var io=typeof document>"u"?null:document;function O0(t,n,o){var u=io;if(u&&typeof n=="string"&&n){var h=An(n);h='link[rel="'+t+'"][href="'+h+'"]',typeof o=="string"&&(h+='[crossorigin="'+o+'"]'),F0.has(h)||(F0.add(h),t={rel:t,crossOrigin:o,href:n},u.querySelector(h)===null&&(n=u.createElement("link"),Ja(n,"link",t),st(n),u.head.appendChild(n)))}}function uC(t){Xr.D(t),O0("dns-prefetch",t,null)}function dC(t,n){Xr.C(t,n),O0("preconnect",t,n)}function mC(t,n,o){Xr.L(t,n,o);var u=io;if(u&&t&&n){var h='link[rel="preload"][as="'+An(n)+'"]';n==="image"&&o&&o.imageSrcSet?(h+='[imagesrcset="'+An(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(h+='[imagesizes="'+An(o.imageSizes)+'"]')):h+='[href="'+An(t)+'"]';var y=h;switch(n){case"style":y=so(t);break;case"script":y=oo(t)}Yn.has(y)||(t=E({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:t,as:n},o),Yn.set(y,t),u.querySelector(h)!==null||n==="style"&&u.querySelector(ml(y))||n==="script"&&u.querySelector(gl(y))||(n=u.createElement("link"),Ja(n,"link",t),st(n),u.head.appendChild(n)))}}function gC(t,n){Xr.m(t,n);var o=io;if(o&&t){var u=n&&typeof n.as=="string"?n.as:"script",h='link[rel="modulepreload"][as="'+An(u)+'"][href="'+An(t)+'"]',y=h;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=oo(t)}if(!Yn.has(y)&&(t=E({rel:"modulepreload",href:t},n),Yn.set(y,t),o.querySelector(h)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(gl(y)))return}u=o.createElement("link"),Ja(u,"link",t),st(u),o.head.appendChild(u)}}}function fC(t,n,o){Xr.S(t,n,o);var u=io;if(u&&t){var h=it(u).hoistableStyles,y=so(t);n=n||"default";var R=h.get(y);if(!R){var _={loading:0,preload:null};if(R=u.querySelector(ml(y)))_.loading=5;else{t=E({rel:"stylesheet",href:t,"data-precedence":n},o),(o=Yn.get(y))&&vg(t,o);var Y=R=u.createElement("link");st(Y),Ja(Y,"link",t),Y._p=new Promise(function(de,Ie){Y.onload=de,Y.onerror=Ie}),Y.addEventListener("load",function(){_.loading|=1}),Y.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Zc(R,n,u)}R={type:"stylesheet",instance:R,count:1,state:_},h.set(y,R)}}}function hC(t,n){Xr.X(t,n);var o=io;if(o&&t){var u=it(o).hoistableScripts,h=oo(t),y=u.get(h);y||(y=o.querySelector(gl(h)),y||(t=E({src:t,async:!0},n),(n=Yn.get(h))&&Cg(t,n),y=o.createElement("script"),st(y),Ja(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(h,y))}}function AC(t,n){Xr.M(t,n);var o=io;if(o&&t){var u=it(o).hoistableScripts,h=oo(t),y=u.get(h);y||(y=o.querySelector(gl(h)),y||(t=E({src:t,async:!0,type:"module"},n),(n=Yn.get(h))&&Cg(t,n),y=o.createElement("script"),st(y),Ja(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(h,y))}}function j0(t,n,o,u){var h=(h=Re.current)?$c(h):null;if(!h)throw Error(i(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(n=so(o.href),o=it(h).hoistableStyles,u=o.get(n),u||(u={type:"style",instance:null,count:0,state:null},o.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=so(o.href);var y=it(h).hoistableStyles,R=y.get(t);if(R||(h=h.ownerDocument||h,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(t,R),(y=h.querySelector(ml(t)))&&!y._p&&(R.instance=y,R.state.loading=5),Yn.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Yn.set(t,o),y||pC(h,t,o,R.state))),n&&u===null)throw Error(i(528,""));return R}if(n&&u!==null)throw Error(i(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=oo(o),o=it(h).hoistableScripts,u=o.get(n),u||(u={type:"script",instance:null,count:0,state:null},o.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,t))}}function so(t){return'href="'+An(t)+'"'}function ml(t){return'link[rel="stylesheet"]['+t+"]"}function P0(t){return E({},t,{"data-precedence":t.precedence,precedence:null})}function pC(t,n,o,u){t.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=t.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Ja(n,"link",o),st(n),t.head.appendChild(n))}function oo(t){return'[src="'+An(t)+'"]'}function gl(t){return"script[async]"+t}function H0(t,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var u=t.querySelector('style[data-href~="'+An(o.href)+'"]');if(u)return n.instance=u,st(u),u;var h=E({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),st(u),Ja(u,"style",h),Zc(u,o.precedence,t),n.instance=u;case"stylesheet":h=so(o.href);var y=t.querySelector(ml(h));if(y)return n.state.loading|=4,n.instance=y,st(y),y;u=P0(o),(h=Yn.get(h))&&vg(u,h),y=(t.ownerDocument||t).createElement("link"),st(y);var R=y;return R._p=new Promise(function(_,Y){R.onload=_,R.onerror=Y}),Ja(y,"link",u),n.state.loading|=4,Zc(y,o.precedence,t),n.instance=y;case"script":return y=oo(o.src),(h=t.querySelector(gl(y)))?(n.instance=h,st(h),h):(u=o,(h=Yn.get(y))&&(u=E({},o),Cg(u,h)),t=t.ownerDocument||t,h=t.createElement("script"),st(h),Ja(h,"link",u),t.head.appendChild(h),n.instance=h);case"void":return null;default:throw Error(i(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Zc(u,o.precedence,t));return n.instance}function Zc(t,n,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=u.length?u[u.length-1]:null,y=h,R=0;R<u.length;R++){var _=u[R];if(_.dataset.precedence===n)y=_;else if(y!==h)break}y?y.parentNode.insertBefore(t,y.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(t,n.firstChild))}function vg(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.title==null&&(t.title=n.title)}function Cg(t,n){t.crossOrigin==null&&(t.crossOrigin=n.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=n.referrerPolicy),t.integrity==null&&(t.integrity=n.integrity)}var eu=null;function z0(t,n,o){if(eu===null){var u=new Map,h=eu=new Map;h.set(o,u)}else h=eu,u=h.get(o),u||(u=new Map,h.set(o,u));if(u.has(t))return u;for(u.set(t,null),o=o.getElementsByTagName(t),h=0;h<o.length;h++){var y=o[h];if(!(y[_e]||y[Vt]||t==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var R=y.getAttribute(n)||"";R=t+R;var _=u.get(R);_?_.push(y):u.set(R,[y])}}return u}function Q0(t,n,o){t=t.ownerDocument||t,t.head.insertBefore(o,n==="title"?t.querySelector("head > title"):null)}function yC(t,n,o){if(o===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return t=n.disabled,typeof n.precedence=="string"&&t==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function V0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var fl=null;function EC(){}function bC(t,n,o){if(fl===null)throw Error(i(475));var u=fl;if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var h=so(o.href),y=t.querySelector(ml(h));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(u.count++,u=tu.bind(u),t.then(u,u)),n.state.loading|=4,n.instance=y,st(y);return}y=t.ownerDocument||t,o=P0(o),(h=Yn.get(h))&&vg(o,h),y=y.createElement("link"),st(y);var R=y;R._p=new Promise(function(_,Y){R.onload=_,R.onerror=Y}),Ja(y,"link",o),n.instance=y}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(u.count++,n=tu.bind(u),t.addEventListener("load",n),t.addEventListener("error",n))}}function IC(){if(fl===null)throw Error(i(475));var t=fl;return t.stylesheets&&t.count===0&&Ng(t,t.stylesheets),0<t.count?function(n){var o=setTimeout(function(){if(t.stylesheets&&Ng(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(o)}}:null}function tu(){if(this.count--,this.count===0){if(this.stylesheets)Ng(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var au=null;function Ng(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,au=new Map,n.forEach(vC,t),au=null,tu.call(t))}function vC(t,n){if(!(n.state.loading&4)){var o=au.get(t);if(o)var u=o.get(null);else{o=new Map,au.set(t,o);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<h.length;y++){var R=h[y];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(o.set(R.dataset.precedence,R),u=R)}u&&o.set(null,u)}h=n.instance,R=h.getAttribute("data-precedence"),y=o.get(R)||u,y===u&&o.set(null,h),o.set(R,h),this.count++,u=tu.bind(this),h.addEventListener("load",u),h.addEventListener("error",u),y?y.parentNode.insertBefore(h,y.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),n.state.loading|=4}}var hl={$$typeof:S,Provider:null,Consumer:null,_currentValue:Ee,_currentValue2:Ee,_threadCount:0};function CC(t,n,o,u,h,y,R,_){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=an(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.hiddenUpdates=an(null),this.identifierPrefix=u,this.onUncaughtError=h,this.onCaughtError=y,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function G0(t,n,o,u,h,y,R,_,Y,de,Ie,xe){return t=new CC(t,n,o,R,_,Y,de,xe),n=1,y===!0&&(n|=24),y=Ln(3,null,null,n),t.current=y,y.stateNode=t,n=im(),n.refCount++,t.pooledCache=n,n.refCount++,y.memoizedState={element:u,isDehydrated:o,cache:n},cm(y),t}function K0(t){return t?(t=Os,t):Os}function q0(t,n,o,u,h,y){h=K0(h),u.context===null?u.context=h:u.pendingContext=h,u=bi(n),u.payload={element:o},y=y===void 0?null:y,y!==null&&(u.callback=y),o=Ii(t,u,n),o!==null&&(Mn(o,t,n),Go(o,t,n))}function W0(t,n){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<n?o:n}}function wg(t,n){W0(t,n),(t=t.alternate)&&W0(t,n)}function Y0(t){if(t.tag===13){var n=Fs(t,67108864);n!==null&&Mn(n,t,67108864),wg(t,67108864)}}var nu=!0;function NC(t,n,o,u){var h=q.T;q.T=null;var y=re.p;try{re.p=2,xg(t,n,o,u)}finally{re.p=y,q.T=h}}function wC(t,n,o,u){var h=q.T;q.T=null;var y=re.p;try{re.p=8,xg(t,n,o,u)}finally{re.p=y,q.T=h}}function xg(t,n,o,u){if(nu){var h=Tg(u);if(h===null)gg(t,n,u,ru,o),X0(t,u);else if(TC(h,t,n,o,u))u.stopPropagation();else if(X0(t,u),n&4&&-1<xC.indexOf(t)){for(;h!==null;){var y=kt(h);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var R=ht(y.pendingLanes);if(R!==0){var _=y;for(_.pendingLanes|=2,_.entangledLanes|=2;R;){var Y=1<<31-w(R);_.entanglements[1]|=Y,R&=~Y}br(y),(Gt&6)===0&&(Hc=De()+500,ll(0))}}break;case 13:_=Fs(y,2),_!==null&&Mn(_,y,2),Qc(),wg(y,2)}if(y=Tg(u),y===null&&gg(t,n,u,ru,o),y===h)break;h=y}h!==null&&u.stopPropagation()}else gg(t,n,u,null,o)}}function Tg(t){return t=Fr(t),Sg(t)}var ru=null;function Sg(t){if(ru=null,t=Xe(t),t!==null){var n=c(t);if(n===null)t=null;else{var o=n.tag;if(o===13){if(t=d(n),t!==null)return t;t=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;t=null}else n!==t&&(t=null)}}return ru=t,null}function J0(t){switch(t){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Pe()){case ze:return 2;case at:return 8;case Ye:case dt:return 32;case jt:return 268435456;default:return 32}default:return 32}}var kg=!1,Ui=null,Mi=null,_i=null,Al=new Map,pl=new Map,Fi=[],xC="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".split(" ");function X0(t,n){switch(t){case"focusin":case"focusout":Ui=null;break;case"dragenter":case"dragleave":Mi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":Al.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(n.pointerId)}}function yl(t,n,o,u,h,y){return t===null||t.nativeEvent!==y?(t={blockedOn:n,domEventName:o,eventSystemFlags:u,nativeEvent:y,targetContainers:[h]},n!==null&&(n=kt(n),n!==null&&Y0(n)),t):(t.eventSystemFlags|=u,n=t.targetContainers,h!==null&&n.indexOf(h)===-1&&n.push(h),t)}function TC(t,n,o,u,h){switch(n){case"focusin":return Ui=yl(Ui,t,n,o,u,h),!0;case"dragenter":return Mi=yl(Mi,t,n,o,u,h),!0;case"mouseover":return _i=yl(_i,t,n,o,u,h),!0;case"pointerover":var y=h.pointerId;return Al.set(y,yl(Al.get(y)||null,t,n,o,u,h)),!0;case"gotpointercapture":return y=h.pointerId,pl.set(y,yl(pl.get(y)||null,t,n,o,u,h)),!0}return!1}function $0(t){var n=Xe(t.target);if(n!==null){var o=c(n);if(o!==null){if(n=o.tag,n===13){if(n=d(o),n!==null){t.blockedOn=n,ar(t.priority,function(){if(o.tag===13){var u=Un();u=Zt(u);var h=Fs(o,u);h!==null&&Mn(h,o,u),wg(o,u)}});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function iu(t){if(t.blockedOn!==null)return!1;for(var n=t.targetContainers;0<n.length;){var o=Tg(t.nativeEvent);if(o===null){o=t.nativeEvent;var u=new o.constructor(o.type,o);Pn=u,o.target.dispatchEvent(u),Pn=null}else return n=kt(o),n!==null&&Y0(n),t.blockedOn=o,!1;n.shift()}return!0}function Z0(t,n,o){iu(t)&&o.delete(n)}function SC(){kg=!1,Ui!==null&&iu(Ui)&&(Ui=null),Mi!==null&&iu(Mi)&&(Mi=null),_i!==null&&iu(_i)&&(_i=null),Al.forEach(Z0),pl.forEach(Z0)}function su(t,n){t.blockedOn===n&&(t.blockedOn=null,kg||(kg=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,SC)))}var ou=null;function ey(t){ou!==t&&(ou=t,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){ou===t&&(ou=null);for(var n=0;n<t.length;n+=3){var o=t[n],u=t[n+1],h=t[n+2];if(typeof u!="function"){if(Sg(u||o)===null)continue;break}var y=kt(o);y!==null&&(t.splice(n,3),n-=3,Sm(y,{pending:!0,data:h,method:o.method,action:u},u,h))}}))}function El(t){function n(Y){return su(Y,t)}Ui!==null&&su(Ui,t),Mi!==null&&su(Mi,t),_i!==null&&su(_i,t),Al.forEach(n),pl.forEach(n);for(var o=0;o<Fi.length;o++){var u=Fi[o];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Fi.length&&(o=Fi[0],o.blockedOn===null);)$0(o),o.blockedOn===null&&Fi.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var h=o[u],y=o[u+1],R=h[ya]||null;if(typeof y=="function")R||ey(o);else if(R){var _=null;if(y&&y.hasAttribute("formAction")){if(h=y,R=y[ya]||null)_=R.formAction;else if(Sg(h)!==null)continue}else _=R.action;typeof _=="function"?o[u+1]=_:(o.splice(u,3),u-=3),ey(o)}}}function Lg(t){this._internalRoot=t}lu.prototype.render=Lg.prototype.render=function(t){var n=this._internalRoot;if(n===null)throw Error(i(409));var o=n.current,u=Un();q0(o,u,t,n,null,null)},lu.prototype.unmount=Lg.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var n=t.containerInfo;q0(t.current,2,null,t,null,null),Qc(),n[Wt]=null}};function lu(t){this._internalRoot=t}lu.prototype.unstable_scheduleHydration=function(t){if(t){var n=tr();t={blockedOn:null,target:t,priority:n};for(var o=0;o<Fi.length&&n!==0&&n<Fi[o].priority;o++);Fi.splice(o,0,t),o===0&&$0(t)}};var ty=e.version;if(ty!=="19.1.0")throw Error(i(527,ty,"19.1.0"));re.findDOMNode=function(t){var n=t._reactInternals;if(n===void 0)throw typeof t.render=="function"?Error(i(188)):(t=Object.keys(t).join(","),Error(i(268,t)));return t=f(n),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var kC={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cu.isDisabled&&cu.supportsFiber)try{na=cu.inject(kC),U=cu}catch{}}return Il.createRoot=function(t,n){if(!s(t))throw Error(i(299));var o=!1,u="",h=pp,y=yp,R=Ep,_=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(h=n.onUncaughtError),n.onCaughtError!==void 0&&(y=n.onCaughtError),n.onRecoverableError!==void 0&&(R=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(_=n.unstable_transitionCallbacks)),n=G0(t,1,!1,null,null,o,u,h,y,R,_,null),t[Wt]=n.current,mg(t),new Lg(n)},Il.hydrateRoot=function(t,n,o){if(!s(t))throw Error(i(299));var u=!1,h="",y=pp,R=yp,_=Ep,Y=null,de=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(R=o.onCaughtError),o.onRecoverableError!==void 0&&(_=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&(Y=o.unstable_transitionCallbacks),o.formState!==void 0&&(de=o.formState)),n=G0(t,1,!0,n,o??null,u,h,y,R,_,Y,de),n.context=K0(null),o=n.current,u=Un(),u=Zt(u),h=bi(u),h.callback=null,Ii(o,h,u),o=u,n.current.lanes=o,On(n,o),br(n),t[Wt]=n.current,mg(t),new lu(n)},Il.version="19.1.0",Il}var dy;function QC(){if(dy)return Dg.exports;dy=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),Dg.exports=zC(),Dg.exports}var VC=QC();const GC=qi(VC);var I=fh();const sd=qi(I),KC=(r,e,a,i)=>{var c,d,m,f;const s=[a,{code:e,...i||{}}];if((d=(c=r==null?void 0:r.services)==null?void 0:c.logger)!=null&&d.forward)return r.services.logger.forward(s,"warn","react-i18next::",!0);Es(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(f=(m=r==null?void 0:r.services)==null?void 0:m.logger)!=null&&f.warn?r.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},my={},Pf=(r,e,a,i)=>{Es(a)&&my[a]||(Es(a)&&(my[a]=new Date),KC(r,e,a,i))},xb=(r,e)=>()=>{if(r.isInitialized)e();else{const a=()=>{setTimeout(()=>{r.off("initialized",a)},0),e()};r.on("initialized",a)}},Hf=(r,e,a)=>{r.loadNamespaces(e,xb(r,a))},gy=(r,e,a,i)=>{if(Es(a)&&(a=[a]),r.options.preload&&r.options.preload.indexOf(e)>-1)return Hf(r,a,i);a.forEach(s=>{r.options.ns.indexOf(s)<0&&r.options.ns.push(s)}),r.loadLanguages(e,xb(r,i))},qC=(r,e,a={})=>!e.languages||!e.languages.length?(Pf(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(r,{lng:a.lng,precheck:(i,s)=>{var c;if(((c=a.bindI18n)==null?void 0:c.indexOf("languageChanging"))>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!s(i.isLanguageChangingTo,r))return!1}}),Es=r=>typeof r=="string",WC=r=>typeof r=="object"&&r!==null,YC=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,JC={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},XC=r=>JC[r],$C=r=>r.replace(YC,XC);let zf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:$C};const ZC=(r={})=>{zf={...zf,...r}},eN=()=>zf;let Tb;const tN=r=>{Tb=r},aN=()=>Tb,nN={type:"3rdParty",init(r){ZC(r.options.react),tN(r)}},rN=I.createContext();class iN{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const sN=(r,e)=>{const a=I.useRef();return I.useEffect(()=>{a.current=r},[r,e]),a.current},Sb=(r,e,a,i)=>r.getFixedT(e,a,i),oN=(r,e,a,i)=>I.useCallback(Sb(r,e,a,i),[r,e,a,i]),Ze=(r,e={})=>{var O,M,P,G;const{i18n:a}=e,{i18n:i,defaultNS:s}=I.useContext(rN)||{},c=a||i||aN();if(c&&!c.reportNamespaces&&(c.reportNamespaces=new iN),!c){Pf(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const H=(V,K)=>Es(K)?K:WC(K)&&Es(K.defaultValue)?K.defaultValue:Array.isArray(V)?V[V.length-1]:V,z=[H,{},!1];return z.t=H,z.i18n={},z.ready=!1,z}(O=c.options.react)!=null&&O.wait&&Pf(c,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const d={...eN(),...c.options.react,...e},{useSuspense:m,keyPrefix:f}=d;let g=s||((M=c.options)==null?void 0:M.defaultNS);g=Es(g)?[g]:g||["translation"],(G=(P=c.reportNamespaces).addUsedNamespaces)==null||G.call(P,g);const E=(c.isInitialized||c.initializedStoreOnce)&&g.every(H=>qC(H,c,d)),p=oN(c,e.lng||null,d.nsMode==="fallback"?g:g[0],f),N=()=>p,v=()=>Sb(c,e.lng||null,d.nsMode==="fallback"?g:g[0],f),[x,T]=I.useState(N);let k=g.join();e.lng&&(k=`${e.lng}${k}`);const L=sN(k),B=I.useRef(!0);I.useEffect(()=>{const{bindI18n:H,bindI18nStore:z}=d;B.current=!0,!E&&!m&&(e.lng?gy(c,e.lng,g,()=>{B.current&&T(v)}):Hf(c,g,()=>{B.current&&T(v)})),E&&L&&L!==k&&B.current&&T(v);const V=()=>{B.current&&T(v)};return H&&(c==null||c.on(H,V)),z&&(c==null||c.store.on(z,V)),()=>{B.current=!1,c&&(H==null||H.split(" ").forEach(K=>c.off(K,V))),z&&c&&z.split(" ").forEach(K=>c.store.off(K,V))}},[c,k]),I.useEffect(()=>{B.current&&E&&T(N)},[c,f,E]);const S=[x,c,E];if(S.t=x,S.i18n=c,S.ready=E,E||!E&&!m)return S;throw new Promise(H=>{e.lng?gy(c,e.lng,g,()=>H()):Hf(c,g,()=>H())})};/**
 * react-router v7.12.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var fy="popstate";function lN(r={}){function e(s,c){let{pathname:d="/",search:m="",hash:f=""}=Cs(s.location.hash.substring(1));return!d.startsWith("/")&&!d.startsWith(".")&&(d="/"+d),Qf("",{pathname:d,search:m,hash:f},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function a(s,c){let d=s.document.querySelector("base"),m="";if(d&&d.getAttribute("href")){let f=s.location.href,g=f.indexOf("#");m=g===-1?f:f.slice(0,g)}return m+"#"+(typeof c=="string"?c:Kl(c))}function i(s,c){Nn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(c)})`)}return uN(e,a,i,r)}function ga(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function Nn(r,e){if(!r){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function cN(){return Math.random().toString(36).substring(2,10)}function hy(r,e){return{usr:r.state,key:r.key,idx:e}}function Qf(r,e,a=null,i){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof e=="string"?Cs(e):e,state:a,key:e&&e.key||i||cN()}}function Kl({pathname:r="/",search:e="",hash:a=""}){return e&&e!=="?"&&(r+=e.charAt(0)==="?"?e:"?"+e),a&&a!=="#"&&(r+=a.charAt(0)==="#"?a:"#"+a),r}function Cs(r){let e={};if(r){let a=r.indexOf("#");a>=0&&(e.hash=r.substring(a),r=r.substring(0,a));let i=r.indexOf("?");i>=0&&(e.search=r.substring(i),r=r.substring(0,i)),r&&(e.pathname=r)}return e}function uN(r,e,a,i={}){let{window:s=document.defaultView,v5Compat:c=!1}=i,d=s.history,m="POP",f=null,g=E();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function E(){return(d.state||{idx:null}).idx}function p(){m="POP";let k=E(),L=k==null?null:k-g;g=k,f&&f({action:m,location:T.location,delta:L})}function N(k,L){m="PUSH";let B=Qf(T.location,k,L);a&&a(B,k),g=E()+1;let S=hy(B,g),O=T.createHref(B);try{d.pushState(S,"",O)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;s.location.assign(O)}c&&f&&f({action:m,location:T.location,delta:1})}function v(k,L){m="REPLACE";let B=Qf(T.location,k,L);a&&a(B,k),g=E();let S=hy(B,g),O=T.createHref(B);d.replaceState(S,"",O),c&&f&&f({action:m,location:T.location,delta:0})}function x(k){return dN(k)}let T={get action(){return m},get location(){return r(s,d)},listen(k){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(fy,p),f=k,()=>{s.removeEventListener(fy,p),f=null}},createHref(k){return e(s,k)},createURL:x,encodeLocation(k){let L=x(k);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:N,replace:v,go(k){return d.go(k)}};return T}function dN(r,e=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),ga(a,"No window.location.(origin|href) available to create URL");let i=typeof r=="string"?r:Kl(r);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=a+i),new URL(i,a)}function kb(r,e,a="/"){return mN(r,e,a,!1)}function mN(r,e,a,i){let s=typeof e=="string"?Cs(e):e,c=oi(s.pathname||"/",a);if(c==null)return null;let d=Lb(r);gN(d);let m=null;for(let f=0;m==null&&f<d.length;++f){let g=NN(c);m=vN(d[f],g,i)}return m}function Lb(r,e=[],a=[],i="",s=!1){let c=(d,m,f=s,g)=>{let E={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(i)&&f)return;ga(E.relativePath.startsWith(i),`Absolute route path "${E.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(i.length)}let p=ii([i,E.relativePath]),N=a.concat(E);d.children&&d.children.length>0&&(ga(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Lb(d.children,e,N,p,f)),!(d.path==null&&!d.index)&&e.push({path:p,score:bN(p,d.index),routesMeta:N})};return r.forEach((d,m)=>{var f;if(d.path===""||!((f=d.path)!=null&&f.includes("?")))c(d,m);else for(let g of Rb(d.path))c(d,m,!0,g)}),e}function Rb(r){let e=r.split("/");if(e.length===0)return[];let[a,...i]=e,s=a.endsWith("?"),c=a.replace(/\?$/,"");if(i.length===0)return s?[c,""]:[c];let d=Rb(i.join("/")),m=[];return m.push(...d.map(f=>f===""?c:[c,f].join("/"))),s&&m.push(...d),m.map(f=>r.startsWith("/")&&f===""?"/":f)}function gN(r){r.sort((e,a)=>e.score!==a.score?a.score-e.score:IN(e.routesMeta.map(i=>i.childrenIndex),a.routesMeta.map(i=>i.childrenIndex)))}var fN=/^:[\w-]+$/,hN=3,AN=2,pN=1,yN=10,EN=-2,Ay=r=>r==="*";function bN(r,e){let a=r.split("/"),i=a.length;return a.some(Ay)&&(i+=EN),e&&(i+=AN),a.filter(s=>!Ay(s)).reduce((s,c)=>s+(fN.test(c)?hN:c===""?pN:yN),i)}function IN(r,e){return r.length===e.length&&r.slice(0,-1).every((i,s)=>i===e[s])?r[r.length-1]-e[e.length-1]:0}function vN(r,e,a=!1){let{routesMeta:i}=r,s={},c="/",d=[];for(let m=0;m<i.length;++m){let f=i[m],g=m===i.length-1,E=c==="/"?e:e.slice(c.length)||"/",p=Vu({path:f.relativePath,caseSensitive:f.caseSensitive,end:g},E),N=f.route;if(!p&&g&&a&&!i[i.length-1].route.index&&(p=Vu({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},E)),!p)return null;Object.assign(s,p.params),d.push({params:s,pathname:ii([c,p.pathname]),pathnameBase:SN(ii([c,p.pathnameBase])),route:N}),p.pathnameBase!=="/"&&(c=ii([c,p.pathnameBase]))}return d}function Vu(r,e){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[a,i]=CN(r.path,r.caseSensitive,r.end),s=e.match(a);if(!s)return null;let c=s[0],d=c.replace(/(.)\/+$/,"$1"),m=s.slice(1);return{params:i.reduce((g,{paramName:E,isOptional:p},N)=>{if(E==="*"){let x=m[N]||"";d=c.slice(0,c.length-x.length).replace(/(.)\/+$/,"$1")}const v=m[N];return p&&!v?g[E]=void 0:g[E]=(v||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:r}}function CN(r,e=!1,a=!0){Nn(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let i=[],s="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,f)=>(i.push({paramName:m,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(i.push({paramName:"*"}),s+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?s+="\\/*$":r!==""&&r!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),i]}function NN(r){try{return r.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Nn(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),r}}function oi(r,e){if(e==="/")return r;if(!r.toLowerCase().startsWith(e.toLowerCase()))return null;let a=e.endsWith("/")?e.length-1:e.length,i=r.charAt(a);return i&&i!=="/"?null:r.slice(a)||"/"}var Db=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wN=r=>Db.test(r);function xN(r,e="/"){let{pathname:a,search:i="",hash:s=""}=typeof r=="string"?Cs(r):r,c;if(a)if(wN(a))c=a;else{if(a.includes("//")){let d=a;a=a.replace(/\/\/+/g,"/"),Nn(!1,`Pathnames cannot have embedded double slashes - normalizing ${d} -> ${a}`)}a.startsWith("/")?c=py(a.substring(1),"/"):c=py(a,e)}else c=e;return{pathname:c,search:kN(i),hash:LN(s)}}function py(r,e){let a=e.replace(/\/+$/,"").split("/");return r.split("/").forEach(s=>{s===".."?a.length>1&&a.pop():s!=="."&&a.push(s)}),a.length>1?a.join("/"):"/"}function Fg(r,e,a,i){return`Cannot include a '${r}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}].  Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function TN(r){return r.filter((e,a)=>a===0||e.route.path&&e.route.path.length>0)}function hh(r){let e=TN(r);return e.map((a,i)=>i===e.length-1?a.pathname:a.pathnameBase)}function Ah(r,e,a,i=!1){let s;typeof r=="string"?s=Cs(r):(s={...r},ga(!s.pathname||!s.pathname.includes("?"),Fg("?","pathname","search",s)),ga(!s.pathname||!s.pathname.includes("#"),Fg("#","pathname","hash",s)),ga(!s.search||!s.search.includes("#"),Fg("#","search","hash",s)));let c=r===""||s.pathname==="",d=c?"/":s.pathname,m;if(d==null)m=a;else{let p=e.length-1;if(!i&&d.startsWith("..")){let N=d.split("/");for(;N[0]==="..";)N.shift(),p-=1;s.pathname=N.join("/")}m=p>=0?e[p]:"/"}let f=xN(s,m),g=d&&d!=="/"&&d.endsWith("/"),E=(c||d===".")&&a.endsWith("/");return!f.pathname.endsWith("/")&&(g||E)&&(f.pathname+="/"),f}var ii=r=>r.join("/").replace(/\/\/+/g,"/"),SN=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),kN=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,LN=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,RN=class{constructor(r,e,a,i=!1){this.status=r,this.statusText=e||"",this.internal=i,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function DN(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function BN(r){return r.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Bb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ub(r,e){let a=r;if(typeof a!="string"||!Db.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let i=a,s=!1;if(Bb)try{let c=new URL(window.location.href),d=a.startsWith("//")?new URL(c.protocol+a):new URL(a),m=oi(d.pathname,e);d.origin===c.origin&&m!=null?a=m+d.search+d.hash:s=!0}catch{Nn(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Mb=["POST","PUT","PATCH","DELETE"];new Set(Mb);var UN=["GET",...Mb];new Set(UN);var vo=I.createContext(null);vo.displayName="DataRouter";var od=I.createContext(null);od.displayName="DataRouterState";var MN=I.createContext(!1),_b=I.createContext({isTransitioning:!1});_b.displayName="ViewTransition";var _N=I.createContext(new Map);_N.displayName="Fetchers";var FN=I.createContext(null);FN.displayName="Await";var Fn=I.createContext(null);Fn.displayName="Navigation";var Jl=I.createContext(null);Jl.displayName="Location";var cr=I.createContext({outlet:null,matches:[],isDataRoute:!1});cr.displayName="Route";var ph=I.createContext(null);ph.displayName="RouteError";var Fb="REACT_ROUTER_ERROR",ON="REDIRECT",jN="ROUTE_ERROR_RESPONSE";function PN(r){if(r.startsWith(`${Fb}:${ON}:{`))try{let e=JSON.parse(r.slice(28));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.location=="string"&&typeof e.reloadDocument=="boolean"&&typeof e.replace=="boolean")return e}catch{}}function HN(r){if(r.startsWith(`${Fb}:${jN}:{`))try{let e=JSON.parse(r.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new RN(e.status,e.statusText,e.data)}catch{}}function zN(r,{relative:e}={}){ga(Co(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:i}=I.useContext(Fn),{hash:s,pathname:c,search:d}=Xl(r,{relative:e}),m=c;return a!=="/"&&(m=c==="/"?a:ii([a,c])),i.createHref({pathname:m,search:d,hash:s})}function Co(){return I.useContext(Jl)!=null}function Ka(){return ga(Co(),"useLocation() may be used only in the context of a <Router> component."),I.useContext(Jl).location}var Ob="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function jb(r){I.useContext(Fn).static||I.useLayoutEffect(r)}function La(){let{isDataRoute:r}=I.useContext(cr);return r?tw():QN()}function QN(){ga(Co(),"useNavigate() may be used only in the context of a <Router> component.");let r=I.useContext(vo),{basename:e,navigator:a}=I.useContext(Fn),{matches:i}=I.useContext(cr),{pathname:s}=Ka(),c=JSON.stringify(hh(i)),d=I.useRef(!1);return jb(()=>{d.current=!0}),I.useCallback((f,g={})=>{if(Nn(d.current,Ob),!d.current)return;if(typeof f=="number"){a.go(f);return}let E=Ah(f,JSON.parse(c),s,g.relative==="path");r==null&&e!=="/"&&(E.pathname=E.pathname==="/"?e:ii([e,E.pathname])),(g.replace?a.replace:a.push)(E,g.state,g)},[e,a,c,s,r])}I.createContext(null);function ld(){let{matches:r}=I.useContext(cr),e=r[r.length-1];return e?e.params:{}}function Xl(r,{relative:e}={}){let{matches:a}=I.useContext(cr),{pathname:i}=Ka(),s=JSON.stringify(hh(a));return I.useMemo(()=>Ah(r,JSON.parse(s),i,e==="path"),[r,s,i,e])}function VN(r,e){return Pb(r,e)}function Pb(r,e,a,i,s){var B;ga(Co(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=I.useContext(Fn),{matches:d}=I.useContext(cr),m=d[d.length-1],f=m?m.params:{},g=m?m.pathname:"/",E=m?m.pathnameBase:"/",p=m&&m.route;{let S=p&&p.path||"";zb(g,!p||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let N=Ka(),v;if(e){let S=typeof e=="string"?Cs(e):e;ga(E==="/"||((B=S.pathname)==null?void 0:B.startsWith(E)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${S.pathname}" was given in the \`location\` prop.`),v=S}else v=N;let x=v.pathname||"/",T=x;if(E!=="/"){let S=E.replace(/^\//,"").split("/");T="/"+x.replace(/^\//,"").split("/").slice(S.length).join("/")}let k=kb(r,{pathname:T});Nn(p||k!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Nn(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let L=YN(k&&k.map(S=>Object.assign({},S,{params:Object.assign({},f,S.params),pathname:ii([E,c.encodeLocation?c.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?E:ii([E,c.encodeLocation?c.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),d,a,i,s);return e&&L?I.createElement(Jl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},L):L}function GN(){let r=ew(),e=DN(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),a=r instanceof Error?r.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},c={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",r),d=I.createElement(I.Fragment,null,I.createElement("p",null,"💿 Hey developer 👋"),I.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",I.createElement("code",{style:c},"ErrorBoundary")," or"," ",I.createElement("code",{style:c},"errorElement")," prop on your route.")),I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},e),a?I.createElement("pre",{style:s},a):null,d)}var KN=I.createElement(GN,null),Hb=class extends I.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,e){return e.location!==r.location||e.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:e.error,location:e.location,revalidation:r.revalidation||e.revalidation}}componentDidCatch(r,e){this.props.onError?this.props.onError(r,e):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const a=HN(r.digest);a&&(r=a)}let e=r!==void 0?I.createElement(cr.Provider,{value:this.props.routeContext},I.createElement(ph.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?I.createElement(qN,{error:r},e):e}};Hb.contextType=MN;var Og=new WeakMap;function qN({children:r,error:e}){let{basename:a}=I.useContext(Fn);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=PN(e.digest);if(i){let s=Og.get(e);if(s)throw s;let c=Ub(i.location,a);if(Bb&&!Og.get(e))if(c.isExternal||i.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:i.replace}));throw Og.set(e,d),d}return I.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return r}function WN({routeContext:r,match:e,children:a}){let i=I.useContext(vo);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),I.createElement(cr.Provider,{value:r},a)}function YN(r,e=[],a=null,i=null,s=null){if(r==null){if(!a)return null;if(a.errors)r=a.matches;else if(e.length===0&&!a.initialized&&a.matches.length>0)r=a.matches;else return null}let c=r,d=a==null?void 0:a.errors;if(d!=null){let E=c.findIndex(p=>p.route.id&&(d==null?void 0:d[p.route.id])!==void 0);ga(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),c=c.slice(0,Math.min(c.length,E+1))}let m=!1,f=-1;if(a)for(let E=0;E<c.length;E++){let p=c[E];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=E),p.route.id){let{loaderData:N,errors:v}=a,x=p.route.loader&&!N.hasOwnProperty(p.route.id)&&(!v||v[p.route.id]===void 0);if(p.route.lazy||x){m=!0,f>=0?c=c.slice(0,f+1):c=[c[0]];break}}}let g=a&&i?(E,p)=>{var N,v;i(E,{location:a.location,params:((v=(N=a.matches)==null?void 0:N[0])==null?void 0:v.params)??{},unstable_pattern:BN(a.matches),errorInfo:p})}:void 0;return c.reduceRight((E,p,N)=>{let v,x=!1,T=null,k=null;a&&(v=d&&p.route.id?d[p.route.id]:void 0,T=p.route.errorElement||KN,m&&(f<0&&N===0?(zb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,k=null):f===N&&(x=!0,k=p.route.hydrateFallbackElement||null)));let L=e.concat(c.slice(0,N+1)),B=()=>{let S;return v?S=T:x?S=k:p.route.Component?S=I.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=E,I.createElement(WN,{match:p,routeContext:{outlet:E,matches:L,isDataRoute:a!=null},children:S})};return a&&(p.route.ErrorBoundary||p.route.errorElement||N===0)?I.createElement(Hb,{location:a.location,revalidation:a.revalidation,component:T,error:v,children:B(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:g}):B()},null)}function yh(r){return`${r} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function JN(r){let e=I.useContext(vo);return ga(e,yh(r)),e}function XN(r){let e=I.useContext(od);return ga(e,yh(r)),e}function $N(r){let e=I.useContext(cr);return ga(e,yh(r)),e}function Eh(r){let e=$N(r),a=e.matches[e.matches.length-1];return ga(a.route.id,`${r} can only be used on routes that contain a unique "id"`),a.route.id}function ZN(){return Eh("useRouteId")}function ew(){var i;let r=I.useContext(ph),e=XN("useRouteError"),a=Eh("useRouteError");return r!==void 0?r:(i=e.errors)==null?void 0:i[a]}function tw(){let{router:r}=JN("useNavigate"),e=Eh("useNavigate"),a=I.useRef(!1);return jb(()=>{a.current=!0}),I.useCallback(async(s,c={})=>{Nn(a.current,Ob),a.current&&(typeof s=="number"?await r.navigate(s):await r.navigate(s,{fromRouteId:e,...c}))},[r,e])}var yy={};function zb(r,e,a){!e&&!yy[r]&&(yy[r]=!0,Nn(!1,a))}I.memo(aw);function aw({routes:r,future:e,state:a,onError:i}){return Pb(r,void 0,a,i,e)}function nw({to:r,replace:e,state:a,relative:i}){ga(Co(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=I.useContext(Fn);Nn(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:c}=I.useContext(cr),{pathname:d}=Ka(),m=La(),f=Ah(r,hh(c),d,i==="path"),g=JSON.stringify(f);return I.useEffect(()=>{m(JSON.parse(g),{replace:e,state:a,relative:i})},[m,g,i,e,a]),null}function bh(r){ga(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function rw({basename:r="/",children:e=null,location:a,navigationType:i="POP",navigator:s,static:c=!1,unstable_useTransitions:d}){ga(!Co(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=r.replace(/^\/*/,"/"),f=I.useMemo(()=>({basename:m,navigator:s,static:c,unstable_useTransitions:d,future:{}}),[m,s,c,d]);typeof a=="string"&&(a=Cs(a));let{pathname:g="/",search:E="",hash:p="",state:N=null,key:v="default"}=a,x=I.useMemo(()=>{let T=oi(g,m);return T==null?null:{location:{pathname:T,search:E,hash:p,state:N,key:v},navigationType:i}},[m,g,E,p,N,v,i]);return Nn(x!=null,`<Router basename="${m}"> is not able to match the URL "${g}${E}${p}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:I.createElement(Fn.Provider,{value:f},I.createElement(Jl.Provider,{children:e,value:x}))}function Qb({children:r,location:e}){return VN(Vf(r),e)}function Vf(r,e=[]){let a=[];return I.Children.forEach(r,(i,s)=>{if(!I.isValidElement(i))return;let c=[...e,s];if(i.type===I.Fragment){a.push.apply(a,Vf(i.props.children,c));return}ga(i.type===bh,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ga(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||c.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=Vf(i.props.children,c)),a.push(d)}),a}var Ru="get",Du="application/x-www-form-urlencoded";function cd(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function iw(r){return cd(r)&&r.tagName.toLowerCase()==="button"}function sw(r){return cd(r)&&r.tagName.toLowerCase()==="form"}function ow(r){return cd(r)&&r.tagName.toLowerCase()==="input"}function lw(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function cw(r,e){return r.button===0&&(!e||e==="_self")&&!lw(r)}function Gf(r=""){return new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((e,a)=>{let i=r[a];return e.concat(Array.isArray(i)?i.map(s=>[a,s]):[[a,i]])},[]))}function uw(r,e){let a=Gf(r);return e&&e.forEach((i,s)=>{a.has(s)||e.getAll(s).forEach(c=>{a.append(s,c)})}),a}var uu=null;function dw(){if(uu===null)try{new FormData(document.createElement("form"),0),uu=!1}catch{uu=!0}return uu}var mw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function jg(r){return r!=null&&!mw.has(r)?(Nn(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Du}"`),null):r}function gw(r,e){let a,i,s,c,d;if(sw(r)){let m=r.getAttribute("action");i=m?oi(m,e):null,a=r.getAttribute("method")||Ru,s=jg(r.getAttribute("enctype"))||Du,c=new FormData(r)}else if(iw(r)||ow(r)&&(r.type==="submit"||r.type==="image")){let m=r.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=r.getAttribute("formaction")||m.getAttribute("action");if(i=f?oi(f,e):null,a=r.getAttribute("formmethod")||m.getAttribute("method")||Ru,s=jg(r.getAttribute("formenctype"))||jg(m.getAttribute("enctype"))||Du,c=new FormData(m,r),!dw()){let{name:g,type:E,value:p}=r;if(E==="image"){let N=g?`${g}.`:"";c.append(`${N}x`,"0"),c.append(`${N}y`,"0")}else g&&c.append(g,p)}}else{if(cd(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Ru,i=null,s=Du,d=r}return c&&s==="text/plain"&&(d=c,c=void 0),{action:i,method:a.toLowerCase(),encType:s,formData:c,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ih(r,e){if(r===!1||r===null||typeof r>"u")throw new Error(e)}function fw(r,e,a,i){let s=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return a?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:e&&oi(s.pathname,e)==="/"?s.pathname=`${e.replace(/\/$/,"")}/_root.${i}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${i}`,s}async function hw(r,e){if(r.id in e)return e[r.id];try{let a=await import(r.module);return e[r.id]=a,a}catch(a){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Aw(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function pw(r,e,a){let i=await Promise.all(r.map(async s=>{let c=e.routes[s.route.id];if(c){let d=await hw(c,a);return d.links?d.links():[]}return[]}));return Iw(i.flat(1).filter(Aw).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Ey(r,e,a,i,s,c){let d=(f,g)=>a[g]?f.route.id!==a[g].route.id:!0,m=(f,g)=>{var E;return a[g].pathname!==f.pathname||((E=a[g].route.path)==null?void 0:E.endsWith("*"))&&a[g].params["*"]!==f.params["*"]};return c==="assets"?e.filter((f,g)=>d(f,g)||m(f,g)):c==="data"?e.filter((f,g)=>{var p;let E=i.routes[f.route.id];if(!E||!E.hasLoader)return!1;if(d(f,g)||m(f,g))return!0;if(f.route.shouldRevalidate){let N=f.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((p=a[0])==null?void 0:p.params)||{},nextUrl:new URL(r,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof N=="boolean")return N}return!0}):[]}function yw(r,e,{includeHydrateFallback:a}={}){return Ew(r.map(i=>{let s=e.routes[i.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),a&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function Ew(r){return[...new Set(r)]}function bw(r){let e={},a=Object.keys(r).sort();for(let i of a)e[i]=r[i];return e}function Iw(r,e){let a=new Set;return new Set(e),r.reduce((i,s)=>{let c=JSON.stringify(bw(s));return a.has(c)||(a.add(c),i.push({key:c,link:s})),i},[])}function Vb(){let r=I.useContext(vo);return Ih(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function vw(){let r=I.useContext(od);return Ih(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var vh=I.createContext(void 0);vh.displayName="FrameworkContext";function Gb(){let r=I.useContext(vh);return Ih(r,"You must render this element inside a <HydratedRouter> element"),r}function Cw(r,e){let a=I.useContext(vh),[i,s]=I.useState(!1),[c,d]=I.useState(!1),{onFocus:m,onBlur:f,onMouseEnter:g,onMouseLeave:E,onTouchStart:p}=e,N=I.useRef(null);I.useEffect(()=>{if(r==="render"&&d(!0),r==="viewport"){let T=L=>{L.forEach(B=>{d(B.isIntersecting)})},k=new IntersectionObserver(T,{threshold:.5});return N.current&&k.observe(N.current),()=>{k.disconnect()}}},[r]),I.useEffect(()=>{if(i){let T=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(T)}}},[i]);let v=()=>{s(!0)},x=()=>{s(!1),d(!1)};return a?r!=="intent"?[c,N,{}]:[c,N,{onFocus:vl(m,v),onBlur:vl(f,x),onMouseEnter:vl(g,v),onMouseLeave:vl(E,x),onTouchStart:vl(p,v)}]:[!1,N,{}]}function vl(r,e){return a=>{r&&r(a),a.defaultPrevented||e(a)}}function Nw({page:r,...e}){let{router:a}=Vb(),i=I.useMemo(()=>kb(a.routes,r,a.basename),[a.routes,r,a.basename]);return i?I.createElement(xw,{page:r,matches:i,...e}):null}function ww(r){let{manifest:e,routeModules:a}=Gb(),[i,s]=I.useState([]);return I.useEffect(()=>{let c=!1;return pw(r,e,a).then(d=>{c||s(d)}),()=>{c=!0}},[r,e,a]),i}function xw({page:r,matches:e,...a}){let i=Ka(),{future:s,manifest:c,routeModules:d}=Gb(),{basename:m}=Vb(),{loaderData:f,matches:g}=vw(),E=I.useMemo(()=>Ey(r,e,g,c,i,"data"),[r,e,g,c,i]),p=I.useMemo(()=>Ey(r,e,g,c,i,"assets"),[r,e,g,c,i]),N=I.useMemo(()=>{if(r===i.pathname+i.search+i.hash)return[];let T=new Set,k=!1;if(e.forEach(B=>{var O;let S=c.routes[B.route.id];!S||!S.hasLoader||(!E.some(M=>M.route.id===B.route.id)&&B.route.id in f&&((O=d[B.route.id])!=null&&O.shouldRevalidate)||S.hasClientLoader?k=!0:T.add(B.route.id))}),T.size===0)return[];let L=fw(r,m,s.unstable_trailingSlashAwareDataRequests,"data");return k&&T.size>0&&L.searchParams.set("_routes",e.filter(B=>T.has(B.route.id)).map(B=>B.route.id).join(",")),[L.pathname+L.search]},[m,s.unstable_trailingSlashAwareDataRequests,f,i,c,E,e,r,d]),v=I.useMemo(()=>yw(p,c),[p,c]),x=ww(p);return I.createElement(I.Fragment,null,N.map(T=>I.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...a})),v.map(T=>I.createElement("link",{key:T,rel:"modulepreload",href:T,...a})),x.map(({key:T,link:k})=>I.createElement("link",{key:T,nonce:a.nonce,...k})))}function Tw(...r){return e=>{r.forEach(a=>{typeof a=="function"?a(e):a!=null&&(a.current=e)})}}var Sw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Sw&&(window.__reactRouterVersion="7.12.0")}catch{}function kw({basename:r,children:e,unstable_useTransitions:a,window:i}){let s=I.useRef();s.current==null&&(s.current=lN({window:i,v5Compat:!0}));let c=s.current,[d,m]=I.useState({action:c.action,location:c.location}),f=I.useCallback(g=>{a===!1?m(g):I.startTransition(()=>m(g))},[a]);return I.useLayoutEffect(()=>c.listen(f),[c,f]),I.createElement(rw,{basename:r,children:e,location:d.location,navigationType:d.action,navigator:c,unstable_useTransitions:a})}var Kb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ud=I.forwardRef(function({onClick:e,discover:a="render",prefetch:i="none",relative:s,reloadDocument:c,replace:d,state:m,target:f,to:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:N,...v},x){let{basename:T,unstable_useTransitions:k}=I.useContext(Fn),L=typeof g=="string"&&Kb.test(g),B=Ub(g,T);g=B.to;let S=zN(g,{relative:s}),[O,M,P]=Cw(i,v),G=Bw(g,{replace:d,state:m,target:f,preventScrollReset:E,relative:s,viewTransition:p,unstable_defaultShouldRevalidate:N,unstable_useTransitions:k});function H(V){e&&e(V),V.defaultPrevented||G(V)}let z=I.createElement("a",{...v,...P,href:B.absoluteURL||S,onClick:B.isExternal||c?e:H,ref:Tw(x,M),target:f,"data-discover":!L&&a==="render"?"true":void 0});return O&&!L?I.createElement(I.Fragment,null,z,I.createElement(Nw,{page:S})):z});ud.displayName="Link";var Lw=I.forwardRef(function({"aria-current":e="page",caseSensitive:a=!1,className:i="",end:s=!1,style:c,to:d,viewTransition:m,children:f,...g},E){let p=Xl(d,{relative:g.relative}),N=Ka(),v=I.useContext(od),{navigator:x,basename:T}=I.useContext(Fn),k=v!=null&&Ow(p)&&m===!0,L=x.encodeLocation?x.encodeLocation(p).pathname:p.pathname,B=N.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;a||(B=B.toLowerCase(),S=S?S.toLowerCase():null,L=L.toLowerCase()),S&&T&&(S=oi(S,T)||S);const O=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let M=B===L||!s&&B.startsWith(L)&&B.charAt(O)==="/",P=S!=null&&(S===L||!s&&S.startsWith(L)&&S.charAt(L.length)==="/"),G={isActive:M,isPending:P,isTransitioning:k},H=M?e:void 0,z;typeof i=="function"?z=i(G):z=[i,M?"active":null,P?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let V=typeof c=="function"?c(G):c;return I.createElement(ud,{...g,"aria-current":H,className:z,ref:E,style:V,to:d,viewTransition:m},typeof f=="function"?f(G):f)});Lw.displayName="NavLink";var Rw=I.forwardRef(({discover:r="render",fetcherKey:e,navigate:a,reloadDocument:i,replace:s,state:c,method:d=Ru,action:m,onSubmit:f,relative:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:N,...v},x)=>{let{unstable_useTransitions:T}=I.useContext(Fn),k=_w(),L=Fw(m,{relative:g}),B=d.toLowerCase()==="get"?"get":"post",S=typeof m=="string"&&Kb.test(m),O=M=>{if(f&&f(M),M.defaultPrevented)return;M.preventDefault();let P=M.nativeEvent.submitter,G=(P==null?void 0:P.getAttribute("formmethod"))||d,H=()=>k(P||M.currentTarget,{fetcherKey:e,method:G,navigate:a,replace:s,state:c,relative:g,preventScrollReset:E,viewTransition:p,unstable_defaultShouldRevalidate:N});T&&a!==!1?I.startTransition(()=>H()):H()};return I.createElement("form",{ref:x,method:B,action:L,onSubmit:i?f:O,...v,"data-discover":!S&&r==="render"?"true":void 0})});Rw.displayName="Form";function Dw(r){return`${r} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function qb(r){let e=I.useContext(vo);return ga(e,Dw(r)),e}function Bw(r,{target:e,replace:a,state:i,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:f}={}){let g=La(),E=Ka(),p=Xl(r,{relative:c});return I.useCallback(N=>{if(cw(N,e)){N.preventDefault();let v=a!==void 0?a:Kl(E)===Kl(p),x=()=>g(r,{replace:v,state:i,preventScrollReset:s,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:m});f?I.startTransition(()=>x()):x()}},[E,g,p,a,i,e,r,s,c,d,m,f])}function Wb(r){Nn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let e=I.useRef(Gf(r)),a=I.useRef(!1),i=Ka(),s=I.useMemo(()=>uw(i.search,a.current?null:e.current),[i.search]),c=La(),d=I.useCallback((m,f)=>{const g=Gf(typeof m=="function"?m(new URLSearchParams(s)):m);a.current=!0,c("?"+g,f)},[c,s]);return[s,d]}var Uw=0,Mw=()=>`__${String(++Uw)}__`;function _w(){let{router:r}=qb("useSubmit"),{basename:e}=I.useContext(Fn),a=ZN(),i=r.fetch,s=r.navigate;return I.useCallback(async(c,d={})=>{let{action:m,method:f,encType:g,formData:E,body:p}=gw(c,e);if(d.navigate===!1){let N=d.fetcherKey||Mw();await i(N,a,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:E,body:p,formMethod:d.method||f,formEncType:d.encType||g,flushSync:d.flushSync})}else await s(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:E,body:p,formMethod:d.method||f,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:a,flushSync:d.flushSync,viewTransition:d.viewTransition})},[i,s,e,a])}function Fw(r,{relative:e}={}){let{basename:a}=I.useContext(Fn),i=I.useContext(cr);ga(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),c={...Xl(r||".",{relative:e})},d=Ka();if(r==null){c.search=d.search;let m=new URLSearchParams(c.search),f=m.getAll("index");if(f.some(E=>E==="")){m.delete("index"),f.filter(p=>p).forEach(p=>m.append("index",p));let E=m.toString();c.search=E?`?${E}`:""}}return(!r||r===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(c.pathname=c.pathname==="/"?a:ii([a,c.pathname])),Kl(c)}function Ow(r,{relative:e}={}){let a=I.useContext(_b);ga(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=qb("useViewTransitionState"),s=Xl(r,{relative:e});if(!a.isTransitioning)return!1;let c=oi(a.currentLocation.pathname,i)||a.currentLocation.pathname,d=oi(a.nextLocation.pathname,i)||a.nextLocation.pathname;return Vu(s.pathname,d)!=null||Vu(s.pathname,c)!=null}var du={exports:{}},by;function jw(){if(by)return du.exports;by=1;const r=a=>typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>{const i=crypto.getRandomValues(new Uint8Array(1))[0];return(i>=a?i%a:i).toString(a)}:()=>Math.floor(Math.random()*a).toString(a),e=(a=7,i=!1)=>Array.from({length:a},r(i?16:36)).join("");return du.exports=e,du.exports.default=e,du.exports}var Pw=jw();const Gu=qi(Pw);var Hw=()=>`uid::${Gu(7)}`,zw=(r,e=["endpointName","fingerprint"])=>typeof r=="object"&&r!==null&&e.every(a=>a in r),Qw=r=>{if(!zw(r))throw new TypeError("Invalid connection args");return JSON.stringify(r)},Vw=()=>{let r=[];return{add:(...e)=>{r=[...r,...e]},remove:e=>{r=typeof e=="string"?r.filter(a=>a.message.transactionId!==e):r.filter(a=>!e.includes(a))},entries:()=>r}},Pg=class{static toBackground(r,e){return r.postMessage(e)}static toExtensionContext(r,e){return r.postMessage(e)}},Bu={exports:{}},Gw=Bu.exports,Iy;function Kw(){return Iy||(Iy=1,function(r,e){(function(a,i){i(r)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Gw,function(a){if(typeof globalThis!="object"||typeof chrome!="object"||!chrome||!chrome.runtime||!chrome.runtime.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){const i="The message port closed before a response was received.",s="Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage)",c=d=>{const m={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(m).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class f extends WeakMap{constructor(z,V=void 0){super(V),this.createItem=z}get(z){return this.has(z)||this.set(z,this.createItem(z)),super.get(z)}}const g=H=>H&&typeof H=="object"&&typeof H.then=="function",E=(H,z)=>(...V)=>{d.runtime.lastError?H.reject(new Error(d.runtime.lastError.message)):z.singleCallbackArg||V.length<=1&&z.singleCallbackArg!==!1?H.resolve(V[0]):H.resolve(V)},p=H=>H==1?"argument":"arguments",N=(H,z)=>function(K,...$){if($.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${p(z.minArgs)} for ${H}(), got ${$.length}`);if($.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${p(z.maxArgs)} for ${H}(), got ${$.length}`);return new Promise((W,ne)=>{if(z.fallbackToNoCallback)try{K[H](...$,E({resolve:W,reject:ne},z))}catch(he){console.warn(`${H} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,he),K[H](...$),z.fallbackToNoCallback=!1,z.noCallback=!0,W()}else z.noCallback?(K[H](...$),W()):K[H](...$,E({resolve:W,reject:ne},z))})},v=(H,z,V)=>new Proxy(z,{apply(K,$,W){return V.call($,H,...W)}});let x=Function.call.bind(Object.prototype.hasOwnProperty);const T=(H,z={},V={})=>{let K=Object.create(null),$={has(ne,he){return he in H||he in K},get(ne,he,q){if(he in K)return K[he];if(!(he in H))return;let re=H[he];if(typeof re=="function")if(typeof z[he]=="function")re=v(H,H[he],z[he]);else if(x(V,he)){let Ee=N(he,V[he]);re=v(H,H[he],Ee)}else re=re.bind(H);else if(typeof re=="object"&&re!==null&&(x(z,he)||x(V,he)))re=T(re,z[he],V[he]);else if(x(V,"*"))re=T(re,z[he],V["*"]);else return Object.defineProperty(K,he,{configurable:!0,enumerable:!0,get(){return H[he]},set(Ee){H[he]=Ee}}),re;return K[he]=re,re},set(ne,he,q,re){return he in K?K[he]=q:H[he]=q,!0},defineProperty(ne,he,q){return Reflect.defineProperty(K,he,q)},deleteProperty(ne,he){return Reflect.deleteProperty(K,he)}},W=Object.create(H);return new Proxy(W,$)},k=H=>({addListener(z,V,...K){z.addListener(H.get(V),...K)},hasListener(z,V){return z.hasListener(H.get(V))},removeListener(z,V){z.removeListener(H.get(V))}}),L=new f(H=>typeof H!="function"?H:function(V){const K=T(V,{},{getContent:{minArgs:0,maxArgs:0}});H(K)});let B=!1;const S=new f(H=>typeof H!="function"?H:function(V,K,$){let W=!1,ne,he=new Promise(pe=>{ne=function(j){B||(console.warn(s,new Error().stack),B=!0),W=!0,pe(j)}}),q;try{q=H(V,K,ne)}catch(pe){q=Promise.reject(pe)}const re=q!==!0&&g(q);if(q!==!0&&!re&&!W)return!1;const Ee=pe=>{pe.then(j=>{$(j)},j=>{let X;j&&(j instanceof Error||typeof j.message=="string")?X=j.message:X="An unexpected error occurred",$({__mozWebExtensionPolyfillReject__:!0,message:X})}).catch(j=>{console.error("Failed to send onMessage rejected reply",j)})};return Ee(re?q:he),!0}),O=({reject:H,resolve:z},V)=>{d.runtime.lastError?d.runtime.lastError.message===i?z():H(new Error(d.runtime.lastError.message)):V&&V.__mozWebExtensionPolyfillReject__?H(new Error(V.message)):z(V)},M=(H,z,V,...K)=>{if(K.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${p(z.minArgs)} for ${H}(), got ${K.length}`);if(K.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${p(z.maxArgs)} for ${H}(), got ${K.length}`);return new Promise(($,W)=>{const ne=O.bind(null,{resolve:$,reject:W});K.push(ne),V.sendMessage(...K)})},P={devtools:{network:{onRequestFinished:k(L)}},runtime:{onMessage:k(S),onMessageExternal:k(S),sendMessage:M.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:M.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},G={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return m.privacy={network:{"*":G},services:{"*":G},websites:{"*":G}},T(d,P,m)};a.exports=c(chrome)}else a.exports=globalThis.browser})}(Bu)),Bu.exports}var qw=Kw();const Ww=qi(qw);var Yw=(r="")=>{const e=Hw();let a,i=[];const s=Vw(),c=new Set,d=new Set,m=(g,E)=>{switch(g.status){case"undeliverable":i.some(p=>p.message.messageID===g.message.messageID)||(i=[...i,{message:g.message,resolvedDestination:g.resolvedDestination}]);return;case"deliverable":i=i.reduce((p,N)=>N.resolvedDestination===g.deliverableTo?(Pg.toBackground(E,{type:"deliver",message:N.message}),p):[...p,N],[]);return;case"delivered":g.receipt.message.messageType==="message"&&s.add(g.receipt);return;case"incoming":g.message.messageType==="reply"&&s.remove(g.message.messageID),c.forEach(p=>p(g.message,E));return;case"terminated":{const p=s.entries().filter(N=>g.fingerprint===N.to);s.remove(p),p.forEach(({message:N})=>d.forEach(v=>v(N)))}}},f=()=>{a=Ww.runtime.connect({name:Qw({endpointName:r,fingerprint:e})}),a.onMessage.addListener(m),a.onDisconnect.addListener(f),Pg.toBackground(a,{type:"sync",pendingResponses:s.entries(),pendingDeliveries:[...new Set(i.map(({resolvedDestination:g})=>g))]})};return f(),{onFailure(g){d.add(g)},onMessage(g){c.add(g)},postMessage(g){Pg.toBackground(a,{type:"deliver",message:g})}}},Jw=Object.defineProperty,Xw=Object.defineProperties,$w=Object.getOwnPropertyDescriptors,vy=Object.getOwnPropertySymbols,Zw=Object.prototype.hasOwnProperty,ex=Object.prototype.propertyIsEnumerable,Cy=(r,e,a)=>e in r?Jw(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a,Yb=(r,e)=>{for(var a in e||(e={}))Zw.call(e,a)&&Cy(r,a,e[a]);if(vy)for(var a of vy(e))ex.call(e,a)&&Cy(r,a,e[a]);return r},Jb=(r,e)=>Xw(r,$w(e)),tx=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,Xb=r=>{const[,e,a,i]=r.match(tx)||[];return{context:e,tabId:+a,frameId:i?+i:void 0}};const ax=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],Kf=Symbol(".toJSON was called"),nx=r=>{r[Kf]=!0;const e=r.toJSON();return delete r[Kf],e},$b=({from:r,seen:e,to_:a,forceEnumerable:i,maxDepth:s,depth:c})=>{const d=a||(Array.isArray(r)?[]:{});if(e.push(r),c>=s)return d;if(typeof r.toJSON=="function"&&r[Kf]!==!0)return nx(r);for(const[m,f]of Object.entries(r)){if(typeof Buffer=="function"&&Buffer.isBuffer(f)){d[m]="[object Buffer]";continue}if(f!==null&&typeof f=="object"&&typeof f.pipe=="function"){d[m]="[object Stream]";continue}if(typeof f!="function"){if(!f||typeof f!="object"){d[m]=f;continue}if(!e.includes(r[m])){c++,d[m]=$b({from:r[m],seen:[...e],forceEnumerable:i,maxDepth:s,depth:c});continue}d[m]="[Circular]"}}for(const{property:m,enumerable:f}of ax)typeof r[m]=="string"&&Object.defineProperty(d,m,{value:r[m],enumerable:!0,configurable:!0,writable:!0});return d};function rx(r,e={}){const{maxDepth:a=Number.POSITIVE_INFINITY}=e;return typeof r=="object"&&r!==null?$b({from:r,seen:[],forceEnumerable:!0,maxDepth:a,depth:0}):typeof r=="function"?`[Function: ${r.name||"anonymous"}]`:r}let Zb=()=>({events:{},emit(r,...e){(this.events[r]||[]).forEach(a=>a(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(a=>a!==e)}});var ix=(r,e,a)=>{const i=Gu(),s=new Map,c=new Map,d=m=>{if(m.destination.context===r&&!m.destination.frameId&&!m.destination.tabId){const{transactionId:f,messageID:g,messageType:E}=m,p=()=>{const v=s.get(f);if(v){const{err:x,data:T}=m;if(x){const k=x,L=self[k.name],B=new(typeof L=="function"?L:Error)(k.message);for(const S in k)B[S]=k[S];v.reject(B)}else v.resolve(T);s.delete(f)}},N=async()=>{let v,x,T=!1;try{const k=c.get(g);if(typeof k=="function")v=await k({sender:m.origin,id:g,data:m.data,timestamp:m.timestamp});else throw T=!0,new Error(`[webext-bridge] No handler registered in '${r}' to accept messages with id '${g}'`)}catch(k){x=k}finally{if(x&&(m.err=rx(x)),d(Jb(Yb({},m),{messageType:"reply",data:v,origin:{context:r,tabId:null},destination:m.origin,hops:[]})),x&&!T)throw v}};switch(E){case"reply":return p();case"message":return N()}}return m.hops.push(`${r}::${i}`),e(m)};return{handleMessage:d,endTransaction:m=>{const f=s.get(m);f==null||f.reject("Transaction was ended before it could complete"),s.delete(m)},sendMessage:(m,f,g="background")=>{const E=typeof g=="string"?Xb(g):g,p="Bridge#sendMessage ->";if(!E.context)throw new TypeError(`${p} Destination must be any one of known destinations`);return new Promise((N,v)=>{const x={messageID:m,data:f,destination:E,messageType:"message",transactionId:Gu(),origin:{context:r,tabId:null},hops:[],timestamp:Date.now()};s.set(x.transactionId,{resolve:N,reject:v});try{d(x)}catch(T){s.delete(x.transactionId),v(T)}})},onMessage:(m,f)=>(c.set(m,f),()=>c.delete(m))}},go=class{constructor(r,e){this.endpointRuntime=r,this.streamInfo=e,this.emitter=Zb(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},go.initDone||(r.onMessage("__crx_bridge_stream_transfer__",a=>{const{streamId:i,streamTransfer:s,action:c}=a.data,d=go.openStreams.get(i);d&&!d.isClosed&&(c==="transfer"&&d.emitter.emit("message",s),c==="close"&&(go.openStreams.delete(i),d.handleStreamClose()))}),go.initDone=!0),go.openStreams.set(this.streamInfo.streamId,this)}get info(){return this.streamInfo}send(r){if(this.isClosed)throw new Error("Attempting to send a message over closed stream. Use stream.onClose(<callback>) to keep an eye on stream status");this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:r,action:"transfer"},this.streamInfo.endpoint)}close(r){r&&this.send(r),this.handleStreamClose(),this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:null,action:"close"},this.streamInfo.endpoint)}onMessage(r){return this.getDisposable("message",r)}onClose(r){return this.getDisposable("closed",r)}getDisposable(r,e){const a=this.emitter.on(r,e);return Object.assign(a,{dispose:a,close:a})}},Ku=go;Ku.initDone=!1;Ku.openStreams=new Map;var sx=r=>{const e=new Map,a=new Map,i=Zb();r.onMessage("__crx_bridge_stream_open__",d=>new Promise(m=>{const{sender:f,data:g}=d,{channel:E}=g;let p=!1,N=()=>{};const v=()=>{const x=a.get(E);typeof x=="function"?(x(new Ku(r,Jb(Yb({},g),{endpoint:f}))),p&&N(),m(!0)):p||(p=!0,N=i.on("did-change-stream-callbacks",v))};v()}));async function s(d,m){if(e.has(d))throw new Error("webext-bridge: A Stream is already open at this channel");const f=typeof m=="string"?Xb(m):m,g={streamId:Gu(),channel:d,endpoint:f},E=new Ku(r,g);return E.onClose(()=>e.delete(d)),await r.sendMessage("__crx_bridge_stream_open__",g,f),e.set(d,E),E}function c(d,m){if(a.has(d))throw new Error("webext-bridge: This channel has already been claimed. Stream allows only one-on-one communication");a.set(d,m),i.emit("did-change-stream-callbacks")}return{openStream:s,onOpenStreamChannel:c}},eI=Yw("popup"),Ch=ix("popup",r=>eI.postMessage(r));eI.onMessage(Ch.handleMessage);var{sendMessage:ft,onMessage:Hg}=Ch;sx(Ch);const ox=()=>{const[r,e]=I.useState(!1),a=I.useRef(null),i=I.useRef(0),s=(c,d)=>{setTimeout(()=>{if(a.current){const m=c/d*100;a.current.style.transition="none",a.current.style.width=`${m}%`,a.current.offsetHeight,requestAnimationFrame(()=>{a.current&&(a.current.style.transition=`width ${c}s linear`,a.current.style.width="0%")})}},10)};return I.useEffect(()=>{ft("GET_CLIPBOARD_COUNTDOWN_STATE",{},"background").then(f=>{const g=f;g&&g.remaining>0&&(i.current=g.id,e(!0),s(g.remaining,g.total))}).catch(()=>{});const c=Hg("CLIPBOARD_COUNTDOWN",({data:f})=>{const{remaining:g,total:E,id:p}=f;e(g>0),p!==i.current&&g>0&&(i.current=p,s(g,E))}),d=Hg("CLIPBOARD_CLEARED",()=>{e(!1),i.current=0,a.current&&(a.current.style.transition="none",a.current.style.width="0%")}),m=Hg("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{e(!1),i.current=0,a.current&&(a.current.style.transition="none",a.current.style.width="0%")});return()=>{c(),d(),m()}},[]),r?l.jsx("div",{className:"fixed top-0 left-0 right-0 z-[60] h-1 bg-gray-200 dark:bg-gray-700",children:l.jsx("div",{ref:a,className:"h-full bg-orange-500",style:{width:"100%",transition:"none"}})}):null},lx=()=>{const{t:r}=Ze(),e=La(),a=Ka(),[i,s]=I.useState("items");I.useEffect(()=>{const E=a.pathname.substring(1),N=["items","emails","settings"].find(v=>E===v||E.startsWith(`${v}/`));N&&s(N)},[a]);const c=E=>{s(E),E==="items"?e(`/${E}`,{state:{resetFilters:!0}}):e(`/${E}`)};return["/","/login","/auth-settings","/unlock","/unlock-success","/upgrade"].includes(a.pathname)||new URLSearchParams(window.location.search).get("mode")==="inline_unlock"?null:l.jsx("div",{className:"fixed bottom-0 left-0 right-0 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"flex justify-around items-center h-14",children:[l.jsxs("button",{onClick:()=>c("items"),id:"nav-vault",className:`flex flex-col items-center justify-center w-1/3 h-full ${i==="items"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[l.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),l.jsx("span",{className:"text-sm mt-1",children:r("menu.vault")})]}),l.jsxs("button",{onClick:()=>c("emails"),id:"nav-emails",className:`flex flex-col items-center justify-center w-1/3 h-full ${i==="emails"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[l.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})}),l.jsx("span",{className:"text-sm mt-1",children:r("menu.emails")})]}),l.jsxs("button",{onClick:()=>c("settings"),id:"nav-settings",className:`flex flex-col items-center justify-center w-1/3 h-full ${i==="settings"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[l.jsxs("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),l.jsx("span",{className:"text-sm mt-1",children:r("common.settings")})]})]})})},tI=({className:r="",width:e=200,height:a=50,showText:i=!0,color:s="currentColor"})=>l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",version:"1.1",viewBox:"0 0 2000 500",width:e,height:a,className:r,children:[l.jsx("path",{d:"m459.87 294.95c0.016205 5.4005 0.03241 10.801-0.35022 16.873-1.111 6.3392-1.1941 12.173-2.6351 17.649-10.922 41.508-36.731 69.481-77.351 83.408-7.2157 2.4739-14.972 3.3702-22.479 4.995-23.629 0.042205-47.257 0.11453-70.886 0.12027-46.762 0.011322-93.523-0.01416-140.95-0.43411-8.59-2.0024-16.766-2.8352-24.398-5.3326-21.595-7.0666-39.523-19.656-53.708-37.552-10.227-12.903-17.579-27.17-21.28-43.221-1.475-6.3967-2.4711-12.904-3.6852-19.361-0.051849-5.747-0.1037-11.494 0.26915-17.886 4.159-42.973 27.68-71.638 63.562-92.153 0-0.70761-0.001961-1.6988 3.12e-4 -2.69 0.022484-9.8293-1.3071-19.894 0.35664-29.438 3.2391-18.579 11.08-35.272 23.763-49.773 12.098-13.832 26.457-23.989 43.609-30.029 7.813-2.7512 16.14-4.0417 24.234-5.9948 7.392-0.025734 14.784-0.05146 22.835 0.32253 4.1959 0.95392 7.7946 1.2538 11.258 2.1053 17.16 4.2192 32.287 12.176 45.469 24.104 2.2558 2.0411 4.372 6.6241 9.621 3.868 16.839-8.8419 34.718-11.597 53.603-8.594 16.791 2.6699 31.602 9.4308 44.236 20.636 11.531 10.227 19.84 22.841 25.393 37.236 6.3436 16.445 10.389 33.163 6.0798 49.389 7.9587 8.9321 15.807 16.704 22.421 25.414 9.162 12.065 15.33 25.746 18.144 40.776 0.97046 5.1848 1.9111 10.375 2.8654 15.563m-71.597 71.012c5.5615-5.2284 12.002-9.7986 16.508-15.817 10.474-13.992 14.333-29.916 11.288-47.446-2.2496-12.95-8.1973-24.076-17.243-33.063-12.746-12.663-28.865-18.614-46.786-18.569-69.912 0.17712-139.82 0.56831-209.74 0.96176-15.922 0.089599-29.168 7.4209-39.685 18.296-14.45 14.944-20.408 33.343-16.655 54.368 2.2763 12.754 8.2167 23.748 17.158 32.66 13.299 13.255 30.097 18.653 48.728 18.651 59.321-0.005188 118.64 0.042358 177.96-0.046601 9.5912-0.014374 19.181-0.86588 28.773-0.88855 10.649-0.025146 19.978-3.825 29.687-9.1074z",fill:"#EEC170"}),l.jsx("path",{d:"m162.77 293c15.654 4.3883 20.627 22.967 10.304 34.98-5.3104 6.1795-14.817 8.3208-24.278 5.0472-7.0723-2.4471-12.332-10.362-12.876-17.933-1.0451-14.542 11.089-23.176 21.705-23.046 1.5794 0.019287 3.1517 0.61566 5.1461 0.95184z",fill:"#EEC170"}),l.jsx("path",{d:"m227.18 293.64c7.8499 2.3973 11.938 8.2143 13.524 15.077 1.8591 8.0439-0.44817 15.706-7.1588 21.121-6.7633 5.4572-14.417 6.8794-22.578 3.1483-8.2972-3.7933-12.836-10.849-12.736-19.438 0.1687-14.497 14.13-25.368 28.948-19.908z",fill:"#EEC170"}),l.jsx("path",{d:"m261.57 319.07c-2.495-14.418 4.6853-22.603 14.596-26.108 9.8945-3.4995 23.181 3.4303 26.267 13.779 4.6504 15.591-7.1651 29.064-21.665 28.161-8.5254-0.53088-17.202-6.5094-19.198-15.831z",fill:"#EEC170"}),l.jsx("path",{d:"m336.91 333.41c-9.0175-4.2491-15.337-14.349-13.829-21.682 3.0825-14.989 13.341-20.304 23.018-19.585 10.653 0.79141 17.93 7.407 19.765 17.547 1.9588 10.824-4.1171 19.939-13.494 23.703-5.272 2.1162-10.091 1.5086-15.46 0.017883z",fill:"#EEC170"}),i&&l.jsx("text",{x:"550",y:"355",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"700",fontSize:"290",letterSpacing:"-7",fill:s,children:"AliasVault"})]});var Ny=Object.prototype.hasOwnProperty;function qf(r,e){var a,i;if(r===e)return!0;if(r&&e&&(a=r.constructor)===e.constructor){if(a===Date)return r.getTime()===e.getTime();if(a===RegExp)return r.toString()===e.toString();if(a===Array){if((i=r.length)===e.length)for(;i--&&qf(r[i],e[i]););return i===-1}if(!a||typeof r=="object"){i=0;for(a in r)if(Ny.call(r,a)&&++i&&!Ny.call(e,a)||!(a in e)||!qf(r[a],e[a]))return!1;return Object.keys(e).length===i}}return r!==r&&e!==e}const cx=new Error("request for lock canceled");var ux=function(r,e,a,i){function s(c){return c instanceof a?c:new a(function(d){d(c)})}return new(a||(a=Promise))(function(c,d){function m(E){try{g(i.next(E))}catch(p){d(p)}}function f(E){try{g(i.throw(E))}catch(p){d(p)}}function g(E){E.done?c(E.value):s(E.value).then(m,f)}g((i=i.apply(r,e||[])).next())})};class dx{constructor(e,a=cx){this._value=e,this._cancelError=a,this._queue=[],this._weightedWaiters=[]}acquire(e=1,a=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((i,s)=>{const c={resolve:i,reject:s,weight:e,priority:a},d=aI(this._queue,m=>a<=m.priority);d===-1&&e<=this._value?this._dispatchItem(c):this._queue.splice(d+1,0,c)})}runExclusive(e){return ux(this,arguments,void 0,function*(a,i=1,s=0){const[c,d]=yield this.acquire(i,s);try{return yield a(c)}finally{d()}})}waitForUnlock(e=1,a=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,a)?Promise.resolve():new Promise(i=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),mx(this._weightedWaiters[e-1],{resolve:i,priority:a})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const a=this._value;this._value-=e.weight,e.resolve([a,this._newReleaser(e.weight)])}_newReleaser(e){let a=!1;return()=>{a||(a=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const a=this._weightedWaiters[e-1];a&&(a.forEach(i=>i.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let a=this._value;a>0;a--){const i=this._weightedWaiters[a-1];if(!i)continue;const s=i.findIndex(c=>c.priority<=e);(s===-1?i:i.splice(0,s)).forEach(c=>c.resolve())}}}_couldLockImmediately(e,a){return(this._queue.length===0||this._queue[0].priority<a)&&e<=this._value}}function mx(r,e){const a=aI(r,i=>e.priority<=i.priority);r.splice(a+1,0,e)}function aI(r,e){for(let a=r.length-1;a>=0;a--)if(e(r[a]))return a;return-1}var gx=function(r,e,a,i){function s(c){return c instanceof a?c:new a(function(d){d(c)})}return new(a||(a=Promise))(function(c,d){function m(E){try{g(i.next(E))}catch(p){d(p)}}function f(E){try{g(i.throw(E))}catch(p){d(p)}}function g(E){E.done?c(E.value):s(E.value).then(m,f)}g((i=i.apply(r,e||[])).next())})};class fx{constructor(e){this._semaphore=new dx(1,e)}acquire(){return gx(this,arguments,void 0,function*(e=0){const[,a]=yield this._semaphore.acquire(1,e);return a})}runExclusive(e,a=0){return this._semaphore.runExclusive(()=>e(),1,a)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var vb,Cb;const Uu=((Cb=(vb=globalThis.browser)==null?void 0:vb.runtime)==null?void 0:Cb.id)==null?globalThis.chrome:globalThis.browser,Se=hx();function hx(){const r={local:mu("local"),session:mu("session"),sync:mu("sync"),managed:mu("managed")},e=T=>{const k=r[T];if(k==null){const L=Object.keys(r).join(", ");throw Error(`Invalid area "${T}". Options: ${L}`)}return k},a=T=>{const k=T.indexOf(":"),L=T.substring(0,k),B=T.substring(k+1);if(B==null)throw Error(`Storage key should be in the form of "area:key", but received "${T}"`);return{driverArea:L,driverKey:B,driver:e(L)}},i=T=>T+"$",s=(T,k)=>{const L={...T};return Object.entries(k).forEach(([B,S])=>{S==null?delete L[B]:L[B]=S}),L},c=(T,k)=>T??k??null,d=T=>typeof T=="object"&&!Array.isArray(T)?T:{},m=async(T,k,L)=>{const B=await T.getItem(k);return c(B,(L==null?void 0:L.fallback)??(L==null?void 0:L.defaultValue))},f=async(T,k)=>{const L=i(k),B=await T.getItem(L);return d(B)},g=async(T,k,L)=>{await T.setItem(k,L??null)},E=async(T,k,L)=>{const B=i(k),S=d(await T.getItem(B));await T.setItem(B,s(S,L))},p=async(T,k,L)=>{if(await T.removeItem(k),L!=null&&L.removeMeta){const B=i(k);await T.removeItem(B)}},N=async(T,k,L)=>{const B=i(k);if(L==null)await T.removeItem(B);else{const S=d(await T.getItem(B));[L].flat().forEach(O=>delete S[O]),await T.setItem(B,S)}},v=(T,k,L)=>T.watch(k,L);return{getItem:async(T,k)=>{const{driver:L,driverKey:B}=a(T);return await m(L,B,k)},getItems:async T=>{const k=new Map,L=new Map,B=[];T.forEach(O=>{let M,P;typeof O=="string"?M=O:"getValue"in O?(M=O.key,P={fallback:O.fallback}):(M=O.key,P=O.options),B.push(M);const{driverArea:G,driverKey:H}=a(M),z=k.get(G)??[];k.set(G,z.concat(H)),L.set(M,P)});const S=new Map;return await Promise.all(Array.from(k.entries()).map(async([O,M])=>{(await r[O].getItems(M)).forEach(G=>{const H=`${O}:${G.key}`,z=L.get(H),V=c(G.value,(z==null?void 0:z.fallback)??(z==null?void 0:z.defaultValue));S.set(H,V)})})),B.map(O=>({key:O,value:S.get(O)}))},getMeta:async T=>{const{driver:k,driverKey:L}=a(T);return await f(k,L)},getMetas:async T=>{const k=T.map(S=>{const O=typeof S=="string"?S:S.key,{driverArea:M,driverKey:P}=a(O);return{key:O,driverArea:M,driverKey:P,driverMetaKey:i(P)}}),L=k.reduce((S,O)=>{var M;return S[M=O.driverArea]??(S[M]=[]),S[O.driverArea].push(O),S},{}),B={};return await Promise.all(Object.entries(L).map(async([S,O])=>{const M=await Uu.storage[S].get(O.map(P=>P.driverMetaKey));O.forEach(P=>{B[P.key]=M[P.driverMetaKey]??{}})})),k.map(S=>({key:S.key,meta:B[S.key]}))},setItem:async(T,k)=>{const{driver:L,driverKey:B}=a(T);await g(L,B,k)},setItems:async T=>{const k={};T.forEach(L=>{const{driverArea:B,driverKey:S}=a("key"in L?L.key:L.item.key);k[B]??(k[B]=[]),k[B].push({key:S,value:L.value})}),await Promise.all(Object.entries(k).map(async([L,B])=>{await e(L).setItems(B)}))},setMeta:async(T,k)=>{const{driver:L,driverKey:B}=a(T);await E(L,B,k)},setMetas:async T=>{const k={};T.forEach(L=>{const{driverArea:B,driverKey:S}=a("key"in L?L.key:L.item.key);k[B]??(k[B]=[]),k[B].push({key:S,properties:L.meta})}),await Promise.all(Object.entries(k).map(async([L,B])=>{const S=e(L),O=B.map(({key:H})=>i(H));console.log(L,O);const M=await S.getItems(O),P=Object.fromEntries(M.map(({key:H,value:z})=>[H,d(z)])),G=B.map(({key:H,properties:z})=>{const V=i(H);return{key:V,value:s(P[V]??{},z)}});await S.setItems(G)}))},removeItem:async(T,k)=>{const{driver:L,driverKey:B}=a(T);await p(L,B,k)},removeItems:async T=>{const k={};T.forEach(L=>{let B,S;typeof L=="string"?B=L:"getValue"in L?B=L.key:"item"in L?(B=L.item.key,S=L.options):(B=L.key,S=L.options);const{driverArea:O,driverKey:M}=a(B);k[O]??(k[O]=[]),k[O].push(M),S!=null&&S.removeMeta&&k[O].push(i(M))}),await Promise.all(Object.entries(k).map(async([L,B])=>{await e(L).removeItems(B)}))},clear:async T=>{await e(T).clear()},removeMeta:async(T,k)=>{const{driver:L,driverKey:B}=a(T);await N(L,B,k)},snapshot:async(T,k)=>{var S;const B=await e(T).snapshot();return(S=k==null?void 0:k.excludeKeys)==null||S.forEach(O=>{delete B[O],delete B[i(O)]}),B},restoreSnapshot:async(T,k)=>{await e(T).restoreSnapshot(k)},watch:(T,k)=>{const{driver:L,driverKey:B}=a(T);return v(L,B,k)},unwatch(){Object.values(r).forEach(T=>{T.unwatch()})},defineItem:(T,k)=>{const{driver:L,driverKey:B}=a(T),{version:S=1,migrations:O={}}=k??{};if(S<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const M=async()=>{var q;const V=i(B),[{value:K},{value:$}]=await L.getItems([B,V]);if(K==null)return;const W=($==null?void 0:$.v)??1;if(W>S)throw Error(`Version downgrade detected (v${W} -> v${S}) for "${T}"`);if(W===S)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${T}: v${W} -> v${S}`);const ne=Array.from({length:S-W},(re,Ee)=>W+Ee+1);let he=K;for(const re of ne)try{he=await((q=O==null?void 0:O[re])==null?void 0:q.call(O,he))??he}catch(Ee){throw new Ax(T,re,{cause:Ee})}await L.setItems([{key:B,value:he},{key:V,value:{...$,v:S}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${T} v${S}`,{migratedValue:he})},P=(k==null?void 0:k.migrations)==null?Promise.resolve():M().catch(V=>{console.error(`[@wxt-dev/storage] Migration failed for ${T}`,V)}),G=new fx,H=()=>(k==null?void 0:k.fallback)??(k==null?void 0:k.defaultValue)??null,z=()=>G.runExclusive(async()=>{const V=await L.getItem(B);if(V!=null||(k==null?void 0:k.init)==null)return V;const K=await k.init();return await L.setItem(B,K),K});return P.then(z),{key:T,get defaultValue(){return H()},get fallback(){return H()},getValue:async()=>(await P,k!=null&&k.init?await z():await m(L,B,k)),getMeta:async()=>(await P,await f(L,B)),setValue:async V=>(await P,await g(L,B,V)),setMeta:async V=>(await P,await E(L,B,V)),removeValue:async V=>(await P,await p(L,B,V)),removeMeta:async V=>(await P,await N(L,B,V)),watch:V=>v(L,B,(K,$)=>V(K??H(),$??H())),migrate:M}}}}function mu(r){const e=()=>{if(Uu.runtime==null)throw Error(["'wxt/storage' must be loaded in a web extension environment",`
 - If thrown during a build, see https://github.com/wxt-dev/wxt/issues/371`,` - If thrown during tests, mock 'wxt/browser' correctly. See https://wxt.dev/guide/go-further/testing.html
`].join(`
`));if(Uu.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const i=Uu.storage[r];if(i==null)throw Error(`"browser.storage.${r}" is undefined`);return i},a=new Set;return{getItem:async i=>(await e().get(i))[i],getItems:async i=>{const s=await e().get(i);return i.map(c=>({key:c,value:s[c]??null}))},setItem:async(i,s)=>{s==null?await e().remove(i):await e().set({[i]:s})},setItems:async i=>{const s=i.reduce((c,{key:d,value:m})=>(c[d]=m,c),{});await e().set(s)},removeItem:async i=>{await e().remove(i)},removeItems:async i=>{await e().remove(i)},clear:async()=>{await e().clear()},snapshot:async()=>await e().get(),restoreSnapshot:async i=>{await e().set(i)},watch(i,s){const c=d=>{const m=d[i];m!=null&&(qf(m.newValue,m.oldValue)||s(m.newValue??null,m.oldValue??null))};return e().onChanged.addListener(c),a.add(c),()=>{e().onChanged.removeListener(c),a.delete(c)}},unwatch(){a.forEach(i=>{e().onChanged.removeListener(i)}),a.clear()}}}class Ax extends Error{constructor(e,a,i){super(`v${a} migration failed for "${e}"`,i),this.key=e,this.version=a}}var zg={exports:{}};const px={},yx=Object.freeze(Object.defineProperty({__proto__:null,default:px},Symbol.toStringTag,{value:"Module"})),wy=UC(yx);var xy;function Ex(){return xy||(xy=1,function(r,e){var a=void 0,i=function(s){return a||(a=new Promise(function(c,d){var m=typeof s<"u"?s:{},f=m.onAbort;m.onAbort=function(A){d(new Error(A)),f&&f(A)},m.postRun=m.postRun||[],m.postRun.push(function(){c(m)}),r=void 0;var g;g||(g=typeof m<"u"?m:{});var E=typeof window=="object",p=typeof WorkerGlobalScope<"u",N=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";g.onRuntimeInitialized=function(){function A(le,Le){switch(typeof Le){case"boolean":jd(le,Le?1:0);break;case"number":_d(le,Le);break;case"string":Fd(le,Le,-1,-1);break;case"object":if(Le===null)lc(le);else if(Le.length!=null){var Ke=mi(Le,Yi);Od(le,Ke,Le.length,-1),fi(Ke)}else Ai(le,"Wrong API use : tried to return a value of an unknown type ("+Le+").",-1);break;default:lc(le)}}function b(le,Le){for(var Ke=[],rt=0;rt<le;rt+=1){var lt=Ut(Le+4*rt,"i32"),Pt=oc(lt);if(Pt===1||Pt===2)lt=Md(lt);else if(Pt===3)lt=Bd(lt);else if(Pt===4){Pt=lt,lt=Dd(Pt),Pt=Ud(Pt);for(var Tn=new Uint8Array(lt),yn=0;yn<lt;yn+=1)Tn[yn]=V[Pt+yn];lt=Tn}else lt=null;Ke.push(lt)}return Ke}function D(le,Le){this.Qa=le,this.db=Le,this.Oa=1,this.lb=[]}function F(le,Le){if(this.db=Le,Le=na(le)+1,this.eb=Ds(Le),this.eb===null)throw Error("Unable to allocate memory for the SQL string");U(le,K,this.eb,Le),this.kb=this.eb,this.Za=this.pb=null}function J(le){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),le!=null){var Le=this.filename,Ke="/",rt=Le;if(Ke&&(Ke=typeof Ke=="string"?Ke:tr(Ke),rt=Le?ze(Ke+"/"+Le):Ke),Le=ht(!0,!0),rt=Z(rt,Le),le){if(typeof le=="string"){Ke=Array(le.length);for(var lt=0,Pt=le.length;lt<Pt;++lt)Ke[lt]=le.charCodeAt(lt);le=Ke}va(rt,Le|146),Ke=ea(rt,577),tc(Ke,le,0,le.length,0),xn(Ke),va(rt,Le)}}this.handleError(Ge(this.filename,ce)),this.db=Ut(ce,"i32"),cc(this.db),this.fb={},this.Sa={}}var ce=Hn(4),ye=g.cwrap,Ge=ye("sqlite3_open","number",["string","number"]),It=ye("sqlite3_close_v2","number",["number"]),At=ye("sqlite3_exec","number",["number","string","number","number","number"]),ua=ye("sqlite3_changes","number",["number"]),Pa=ye("sqlite3_prepare_v2","number",["number","string","number","number","number"]),Bs=ye("sqlite3_sql","string",["number"]),Ji=ye("sqlite3_normalized_sql","string",["number"]),Xi=ye("sqlite3_prepare_v2","number",["number","number","number","number","number"]),rc=ye("sqlite3_bind_text","number",["number","number","number","number","number"]),ic=ye("sqlite3_bind_blob","number",["number","number","number","number","number"]),Ed=ye("sqlite3_bind_double","number",["number","number","number"]),bd=ye("sqlite3_bind_int","number",["number","number","number"]),Ro=ye("sqlite3_bind_parameter_index","number",["number","string"]),Id=ye("sqlite3_step","number",["number"]),vd=ye("sqlite3_errmsg","string",["number"]),Cd=ye("sqlite3_column_count","number",["number"]),Nd=ye("sqlite3_data_count","number",["number"]),wd=ye("sqlite3_column_double","number",["number","number"]),Do=ye("sqlite3_column_text","string",["number","number"]),xd=ye("sqlite3_column_blob","number",["number","number"]),Td=ye("sqlite3_column_bytes","number",["number","number"]),Sd=ye("sqlite3_column_type","number",["number","number"]),kd=ye("sqlite3_column_name","string",["number","number"]),Bo=ye("sqlite3_reset","number",["number"]),Ld=ye("sqlite3_clear_bindings","number",["number"]),Rd=ye("sqlite3_finalize","number",["number"]),sc=ye("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),oc=ye("sqlite3_value_type","number",["number"]),Dd=ye("sqlite3_value_bytes","number",["number"]),Bd=ye("sqlite3_value_text","string",["number"]),Ud=ye("sqlite3_value_blob","number",["number"]),Md=ye("sqlite3_value_double","number",["number"]),_d=ye("sqlite3_result_double","",["number","number"]),lc=ye("sqlite3_result_null","",["number"]),Fd=ye("sqlite3_result_text","",["number","string","number","number"]),Od=ye("sqlite3_result_blob","",["number","number","number","number"]),jd=ye("sqlite3_result_int","",["number","number"]),Ai=ye("sqlite3_result_error","",["number","string","number"]),pi=ye("sqlite3_aggregate_context","number",["number","number"]),cc=ye("RegisterExtensionFunctions","number",["number"]),Uo=ye("sqlite3_update_hook","number",["number","number","number"]);D.prototype.bind=function(le){if(!this.Qa)throw"Statement closed";return this.reset(),Array.isArray(le)?this.Cb(le):le!=null&&typeof le=="object"?this.Db(le):!0},D.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var le=Id(this.Qa);switch(le){case 100:return!0;case 101:return!1;default:throw this.db.handleError(le)}},D.prototype.wb=function(le){return le==null&&(le=this.Oa,this.Oa+=1),wd(this.Qa,le)},D.prototype.Gb=function(le){if(le==null&&(le=this.Oa,this.Oa+=1),le=Do(this.Qa,le),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(le)},D.prototype.Hb=function(le){return le==null&&(le=this.Oa,this.Oa+=1),Do(this.Qa,le)},D.prototype.getBlob=function(le){le==null&&(le=this.Oa,this.Oa+=1);var Le=Td(this.Qa,le);le=xd(this.Qa,le);for(var Ke=new Uint8Array(Le),rt=0;rt<Le;rt+=1)Ke[rt]=V[le+rt];return Ke},D.prototype.get=function(le,Le){Le=Le||{},le!=null&&this.bind(le)&&this.step(),le=[];for(var Ke=Nd(this.Qa),rt=0;rt<Ke;rt+=1)switch(Sd(this.Qa,rt)){case 1:var lt=Le.useBigInt?this.Gb(rt):this.wb(rt);le.push(lt);break;case 2:le.push(this.wb(rt));break;case 3:le.push(this.Hb(rt));break;case 4:le.push(this.getBlob(rt));break;default:le.push(null)}return le},D.prototype.getColumnNames=function(){for(var le=[],Le=Cd(this.Qa),Ke=0;Ke<Le;Ke+=1)le.push(kd(this.Qa,Ke));return le},D.prototype.getAsObject=function(le,Le){le=this.get(le,Le),Le=this.getColumnNames();for(var Ke={},rt=0;rt<Le.length;rt+=1)Ke[Le[rt]]=le[rt];return Ke},D.prototype.getSQL=function(){return Bs(this.Qa)},D.prototype.getNormalizedSQL=function(){return Ji(this.Qa)},D.prototype.run=function(le){return le!=null&&this.bind(le),this.step(),this.reset()},D.prototype.sb=function(le,Le){Le==null&&(Le=this.Oa,this.Oa+=1),le=C(le);var Ke=mi(le,Yi);this.lb.push(Ke),this.db.handleError(rc(this.Qa,Le,Ke,le.length-1,0))},D.prototype.Bb=function(le,Le){Le==null&&(Le=this.Oa,this.Oa+=1);var Ke=mi(le,Yi);this.lb.push(Ke),this.db.handleError(ic(this.Qa,Le,Ke,le.length,0))},D.prototype.rb=function(le,Le){Le==null&&(Le=this.Oa,this.Oa+=1),this.db.handleError((le===(le|0)?bd:Ed)(this.Qa,Le,le))},D.prototype.Eb=function(le){le==null&&(le=this.Oa,this.Oa+=1),ic(this.Qa,le,0,0,0)},D.prototype.tb=function(le,Le){switch(Le==null&&(Le=this.Oa,this.Oa+=1),typeof le){case"string":this.sb(le,Le);return;case"number":this.rb(le,Le);return;case"bigint":this.sb(le.toString(),Le);return;case"boolean":this.rb(le+0,Le);return;case"object":if(le===null){this.Eb(Le);return}if(le.length!=null){this.Bb(le,Le);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+le+")."},D.prototype.Db=function(le){var Le=this;return Object.keys(le).forEach(function(Ke){var rt=Ro(Le.Qa,Ke);rt!==0&&Le.tb(le[Ke],rt)}),!0},D.prototype.Cb=function(le){for(var Le=0;Le<le.length;Le+=1)this.tb(le[Le],Le+1);return!0},D.prototype.reset=function(){return this.freemem(),Ld(this.Qa)===0&&Bo(this.Qa)===0},D.prototype.freemem=function(){for(var le;(le=this.lb.pop())!==void 0;)fi(le)},D.prototype.free=function(){this.freemem();var le=Rd(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,le},F.prototype.next=function(){if(this.eb===null)return{done:!0};if(this.Za!==null&&(this.Za.free(),this.Za=null),!this.db.db)throw this.mb(),Error("Database closed");var le=nr(),Le=Hn(4);nt(ce),nt(Le);try{this.db.handleError(Xi(this.db.db,this.kb,-1,ce,Le)),this.kb=Ut(Le,"i32");var Ke=Ut(ce,"i32");return Ke===0?(this.mb(),{done:!0}):(this.Za=new D(Ke,this.db),this.db.fb[Ke]=this.Za,{value:this.Za,done:!1})}catch(rt){throw this.pb=De(this.kb),this.mb(),rt}finally{un(le)}},F.prototype.mb=function(){fi(this.eb),this.eb=null},F.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:De(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(F.prototype[Symbol.iterator]=function(){return this}),J.prototype.run=function(le,Le){if(!this.db)throw"Database closed";if(Le){le=this.prepare(le,Le);try{le.step()}finally{le.free()}}else this.handleError(At(this.db,le,0,0,ce));return this},J.prototype.exec=function(le,Le,Ke){if(!this.db)throw"Database closed";var rt=nr(),lt=null;try{var Pt=So(le),Tn=Hn(4);for(le=[];Ut(Pt,"i8")!==0;){nt(ce),nt(Tn),this.handleError(Xi(this.db,Pt,-1,ce,Tn));var yn=Ut(ce,"i32");if(Pt=Ut(Tn,"i32"),yn!==0){var nn=null;for(lt=new D(yn,this),Le!=null&&lt.bind(Le);lt.step();)nn===null&&(nn={columns:lt.getColumnNames(),values:[]},le.push(nn)),nn.values.push(lt.get(null,Ke));lt.free()}}return le}catch(En){throw lt&&lt.free(),En}finally{un(rt)}},J.prototype.each=function(le,Le,Ke,rt,lt){typeof Le=="function"&&(rt=Ke,Ke=Le,Le=void 0),le=this.prepare(le,Le);try{for(;le.step();)Ke(le.getAsObject(null,lt))}finally{le.free()}if(typeof rt=="function")return rt()},J.prototype.prepare=function(le,Le){if(nt(ce),this.handleError(Pa(this.db,le,-1,ce,0)),le=Ut(ce,"i32"),le===0)throw"Nothing to prepare";var Ke=new D(le,this);return Le!=null&&Ke.bind(Le),this.fb[le]=Ke},J.prototype.iterateStatements=function(le){return new F(le,this)},J.prototype.export=function(){Object.values(this.fb).forEach(function(Le){Le.free()}),Object.values(this.Sa).forEach(Pn),this.Sa={},this.handleError(It(this.db));var le=ac(this.filename);return this.handleError(Ge(this.filename,ce)),this.db=Ut(ce,"i32"),cc(this.db),le},J.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(le){le.free()}),Object.values(this.Sa).forEach(Pn),this.Sa={},this.Ya&&(Pn(this.Ya),this.Ya=void 0),this.handleError(It(this.db)),oa("/"+this.filename),this.db=null)},J.prototype.handleError=function(le){if(le===0)return null;throw le=vd(this.db),Error(le)},J.prototype.getRowsModified=function(){return ua(this.db)},J.prototype.create_function=function(le,Le){Object.prototype.hasOwnProperty.call(this.Sa,le)&&(Pn(this.Sa[le]),delete this.Sa[le]);var Ke=Fr(function(rt,lt,Pt){lt=b(lt,Pt);try{var Tn=Le.apply(null,lt)}catch(yn){Ai(rt,yn,-1);return}A(rt,Tn)},"viii");return this.Sa[le]=Ke,this.handleError(sc(this.db,le,Le.length,1,0,Ke,0,0,0)),this},J.prototype.create_aggregate=function(le,Le){var Ke=Le.init||function(){return null},rt=Le.finalize||function(nn){return nn},lt=Le.step;if(!lt)throw"An aggregate function must have a step function in "+le;var Pt={};Object.hasOwnProperty.call(this.Sa,le)&&(Pn(this.Sa[le]),delete this.Sa[le]),Le=le+"__finalize",Object.hasOwnProperty.call(this.Sa,Le)&&(Pn(this.Sa[Le]),delete this.Sa[Le]);var Tn=Fr(function(nn,En,Or){var Sn=pi(nn,1);Object.hasOwnProperty.call(Pt,Sn)||(Pt[Sn]=Ke()),En=b(En,Or),En=[Pt[Sn]].concat(En);try{Pt[Sn]=lt.apply(null,En)}catch(Pd){delete Pt[Sn],Ai(nn,Pd,-1)}},"viii"),yn=Fr(function(nn){var En=pi(nn,1);try{var Or=rt(Pt[En])}catch(Sn){delete Pt[En],Ai(nn,Sn,-1);return}A(nn,Or),delete Pt[En]},"vi");return this.Sa[le]=Tn,this.Sa[Le]=yn,this.handleError(sc(this.db,le,lt.length-1,1,0,0,Tn,yn,0)),this},J.prototype.updateHook=function(le){this.Ya&&(Uo(this.db,0,0),Pn(this.Ya),this.Ya=void 0),le&&(this.Ya=Fr(function(Le,Ke,rt,lt,Pt){switch(Ke){case 18:Le="insert";break;case 23:Le="update";break;case 9:Le="delete";break;default:throw"unknown operationCode in updateHook callback: "+Ke}if(rt=rt?me(K,rt):"",lt=lt?me(K,lt):"",Pt>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";le(Le,rt,lt,Number(Pt))},"viiiij"),Uo(this.db,this.Ya,0))},g.Database=J};var v={...g},x="./this.program",T=(A,b)=>{throw b},k="",L,B;if(N){var S=wy;k=__dirname+"/",B=A=>(A=Ee(A)?new URL(A):A,S.readFileSync(A)),L=async A=>(A=Ee(A)?new URL(A):A,S.readFileSync(A,void 0)),!g.thisProgram&&1<process.argv.length&&(x=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),r.exports=g,T=(A,b)=>{throw process.exitCode=A,b}}else(E||p)&&(p?k=self.location.href:typeof document<"u"&&document.currentScript&&(k=document.currentScript.src),k=k.startsWith("blob:")?"":k.slice(0,k.replace(/[?#].*/,"").lastIndexOf("/")+1),p&&(B=A=>{var b=new XMLHttpRequest;return b.open("GET",A,!1),b.responseType="arraybuffer",b.send(null),new Uint8Array(b.response)}),L=async A=>{if(Ee(A))return new Promise((D,F)=>{var J=new XMLHttpRequest;J.open("GET",A,!0),J.responseType="arraybuffer",J.onload=()=>{J.status==200||J.status==0&&J.response?D(J.response):F(J.status)},J.onerror=F,J.send(null)});var b=await fetch(A,{credentials:"same-origin"});if(b.ok)return b.arrayBuffer();throw Error(b.status+" : "+b.url)});var O=g.print||console.log.bind(console),M=g.printErr||console.error.bind(console);Object.assign(g,v),v=null,g.thisProgram&&(x=g.thisProgram);var P=g.wasmBinary,G,H=!1,z,V,K,$,W,ne,he,q,re,Ee=A=>A.startsWith("file://");function pe(){var A=G.buffer;g.HEAP8=V=new Int8Array(A),g.HEAP16=$=new Int16Array(A),g.HEAPU8=K=new Uint8Array(A),g.HEAPU16=new Uint16Array(A),g.HEAP32=W=new Int32Array(A),g.HEAPU32=ne=new Uint32Array(A),g.HEAPF32=he=new Float32Array(A),g.HEAPF64=re=new Float64Array(A),g.HEAP64=q=new BigInt64Array(A),g.HEAPU64=new BigUint64Array(A)}var j=0,X=null;function ee(A){var b;throw(b=g.onAbort)==null||b.call(g,A),A="Aborted("+A+")",M(A),H=!0,new WebAssembly.RuntimeError(A+". Build with -sASSERTIONS for more info.")}var ie;async function ve(A){if(!P)try{var b=await L(A);return new Uint8Array(b)}catch{}if(A==ie&&P)A=new Uint8Array(P);else if(B)A=B(A);else throw"both async and sync fetching of the wasm failed";return A}async function Ne(A,b){try{var D=await ve(A);return await WebAssembly.instantiate(D,b)}catch(F){M(`failed to asynchronously prepare wasm: ${F}`),ee(F)}}async function Re(A){var b=ie;if(!P&&typeof WebAssembly.instantiateStreaming=="function"&&!Ee(b)&&!N)try{var D=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(D,A)}catch(F){M(`wasm streaming compile failed: ${F}`),M("falling back to ArrayBuffer instantiation")}return Ne(b,A)}class Be{constructor(b){Qe(this,"name","ExitStatus");this.message=`Program terminated with exit(${b})`,this.status=b}}var ke=A=>{for(;0<A.length;)A.shift()(g)},Ve=[],vt=[],Ct=()=>{var A=g.preRun.shift();vt.unshift(A)};function Ut(A,b="i8"){switch(b.endsWith("*")&&(b="*"),b){case"i1":return V[A];case"i8":return V[A];case"i16":return $[A>>1];case"i32":return W[A>>2];case"i64":return q[A>>3];case"float":return he[A>>2];case"double":return re[A>>3];case"*":return ne[A>>2];default:ee(`invalid type for getValue: ${b}`)}}var tt=g.noExitRuntime||!0;function nt(A){var b="i32";switch(b.endsWith("*")&&(b="*"),b){case"i1":V[A]=0;break;case"i8":V[A]=0;break;case"i16":$[A>>1]=0;break;case"i32":W[A>>2]=0;break;case"i64":q[A>>3]=BigInt(0);break;case"float":he[A>>2]=0;break;case"double":re[A>>3]=0;break;case"*":ne[A>>2]=0;break;default:ee(`invalid type for setValue: ${b}`)}}var Te=typeof TextDecoder<"u"?new TextDecoder:void 0,me=(A,b=0,D=NaN)=>{var F=b+D;for(D=b;A[D]&&!(D>=F);)++D;if(16<D-b&&A.buffer&&Te)return Te.decode(A.subarray(b,D));for(F="";b<D;){var J=A[b++];if(J&128){var ce=A[b++]&63;if((J&224)==192)F+=String.fromCharCode((J&31)<<6|ce);else{var ye=A[b++]&63;J=(J&240)==224?(J&15)<<12|ce<<6|ye:(J&7)<<18|ce<<12|ye<<6|A[b++]&63,65536>J?F+=String.fromCharCode(J):(J-=65536,F+=String.fromCharCode(55296|J>>10,56320|J&1023))}}else F+=String.fromCharCode(J)}return F},De=(A,b)=>A?me(K,A,b):"",Pe=(A,b)=>{for(var D=0,F=A.length-1;0<=F;F--){var J=A[F];J==="."?A.splice(F,1):J===".."?(A.splice(F,1),D++):D&&(A.splice(F,1),D--)}if(b)for(;D;D--)A.unshift("..");return A},ze=A=>{var b=A.charAt(0)==="/",D=A.slice(-1)==="/";return(A=Pe(A.split("/").filter(F=>!!F),!b).join("/"))||b||(A="."),A&&D&&(A+="/"),(b?"/":"")+A},at=A=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(A).slice(1);return A=b[0],b=b[1],!A&&!b?".":(b&&(b=b.slice(0,-1)),A+b)},Ye=A=>A&&A.match(/([^\/]+|\/)\/*$/)[1],dt=()=>{if(N){var A=wy;return b=>A.randomFillSync(b)}return b=>crypto.getRandomValues(b)},jt=A=>{(jt=dt())(A)},qt=(...A)=>{for(var b="",D=!1,F=A.length-1;-1<=F&&!D;F--){if(D=0<=F?A[F]:"/",typeof D!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!D)return"";b=D+"/"+b,D=D.charAt(0)==="/"}return b=Pe(b.split("/").filter(J=>!!J),!D).join("/"),(D?"/":"")+b||"."},Qt=[],na=A=>{for(var b=0,D=0;D<A.length;++D){var F=A.charCodeAt(D);127>=F?b++:2047>=F?b+=2:55296<=F&&57343>=F?(b+=4,++D):b+=3}return b},U=(A,b,D,F)=>{if(!(0<F))return 0;var J=D;F=D+F-1;for(var ce=0;ce<A.length;++ce){var ye=A.charCodeAt(ce);if(55296<=ye&&57343>=ye){var Ge=A.charCodeAt(++ce);ye=65536+((ye&1023)<<10)|Ge&1023}if(127>=ye){if(D>=F)break;b[D++]=ye}else{if(2047>=ye){if(D+1>=F)break;b[D++]=192|ye>>6}else{if(65535>=ye){if(D+2>=F)break;b[D++]=224|ye>>12}else{if(D+3>=F)break;b[D++]=240|ye>>18,b[D++]=128|ye>>12&63}b[D++]=128|ye>>6&63}b[D++]=128|ye&63}}return b[D]=0,D-J},C=(A,b)=>{var D=Array(na(A)+1);return A=U(A,D,0,D.length),b&&(D.length=A),D},w=[];function Q(A,b){w[A]={input:[],output:[],cb:b},st(A,ae)}var ae={open(A){var b=w[A.node.rdev];if(!b)throw new Oe(43);A.tty=b,A.seekable=!1},close(A){A.tty.cb.fsync(A.tty)},fsync(A){A.tty.cb.fsync(A.tty)},read(A,b,D,F){if(!A.tty||!A.tty.cb.xb)throw new Oe(60);for(var J=0,ce=0;ce<F;ce++){try{var ye=A.tty.cb.xb(A.tty)}catch{throw new Oe(29)}if(ye===void 0&&J===0)throw new Oe(6);if(ye==null)break;J++,b[D+ce]=ye}return J&&(A.node.atime=Date.now()),J},write(A,b,D,F){if(!A.tty||!A.tty.cb.qb)throw new Oe(60);try{for(var J=0;J<F;J++)A.tty.cb.qb(A.tty,b[D+J])}catch{throw new Oe(29)}return F&&(A.node.mtime=A.node.ctime=Date.now()),J}},fe={xb(){e:{if(!Qt.length){var A=null;if(N){var b=Buffer.alloc(256),D=0,F=process.stdin.fd;try{D=S.readSync(F,b,0,256)}catch(J){if(J.toString().includes("EOF"))D=0;else throw J}0<D&&(A=b.slice(0,D).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(A=window.prompt("Input: "),A!==null&&(A+=`
`));if(!A){A=null;break e}Qt=C(A,!0)}A=Qt.shift()}return A},qb(A,b){b===null||b===10?(O(me(A.output)),A.output=[]):b!=0&&A.output.push(b)},fsync(A){var b;0<((b=A.output)==null?void 0:b.length)&&(O(me(A.output)),A.output=[])},Tb(){return{Ob:25856,Qb:5,Nb:191,Pb:35387,Mb:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Ub(){return 0},Vb(){return[24,80]}},be={qb(A,b){b===null||b===10?(M(me(A.output)),A.output=[]):b!=0&&A.output.push(b)},fsync(A){var b;0<((b=A.output)==null?void 0:b.length)&&(M(me(A.output)),A.output=[])}},Ue={Wa:null,Xa(){return Ue.createNode(null,"/",16895,0)},createNode(A,b,D,F){if((D&61440)===24576||(D&61440)===4096)throw new Oe(63);return Ue.Wa||(Ue.Wa={dir:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua,lookup:Ue.La.lookup,hb:Ue.La.hb,rename:Ue.La.rename,unlink:Ue.La.unlink,rmdir:Ue.La.rmdir,readdir:Ue.La.readdir,symlink:Ue.La.symlink},stream:{Va:Ue.Ma.Va}},file:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua},stream:{Va:Ue.Ma.Va,read:Ue.Ma.read,write:Ue.Ma.write,ib:Ue.Ma.ib,jb:Ue.Ma.jb}},link:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua,readlink:Ue.La.readlink},stream:{}},ub:{node:{Ta:Ue.La.Ta,Ua:Ue.La.Ua},stream:it}}),D=ya(A,b,D,F),Wt(D.mode)?(D.La=Ue.Wa.dir.node,D.Ma=Ue.Wa.dir.stream,D.Na={}):(D.mode&61440)===32768?(D.La=Ue.Wa.file.node,D.Ma=Ue.Wa.file.stream,D.Ra=0,D.Na=null):(D.mode&61440)===40960?(D.La=Ue.Wa.link.node,D.Ma=Ue.Wa.link.stream):(D.mode&61440)===8192&&(D.La=Ue.Wa.ub.node,D.Ma=Ue.Wa.ub.stream),D.atime=D.mtime=D.ctime=Date.now(),A&&(A.Na[b]=D,A.atime=A.mtime=A.ctime=D.atime),D},Sb(A){return A.Na?A.Na.subarray?A.Na.subarray(0,A.Ra):new Uint8Array(A.Na):new Uint8Array(0)},La:{Ta(A){var b={};return b.dev=(A.mode&61440)===8192?A.id:1,b.ino=A.id,b.mode=A.mode,b.nlink=1,b.uid=0,b.gid=0,b.rdev=A.rdev,Wt(A.mode)?b.size=4096:(A.mode&61440)===32768?b.size=A.Ra:(A.mode&61440)===40960?b.size=A.link.length:b.size=0,b.atime=new Date(A.atime),b.mtime=new Date(A.mtime),b.ctime=new Date(A.ctime),b.blksize=4096,b.blocks=Math.ceil(b.size/b.blksize),b},Ua(A,b){for(var D of["mode","atime","mtime","ctime"])b[D]!=null&&(A[D]=b[D]);b.size!==void 0&&(b=b.size,A.Ra!=b&&(b==0?(A.Na=null,A.Ra=0):(D=A.Na,A.Na=new Uint8Array(b),D&&A.Na.set(D.subarray(0,Math.min(b,A.Ra))),A.Ra=b)))},lookup(){throw Ue.vb},hb(A,b,D,F){return Ue.createNode(A,b,D,F)},rename(A,b,D){try{var F=Vt(b,D)}catch{}if(F){if(Wt(A.mode))for(var J in F.Na)throw new Oe(55);Ra(F)}delete A.parent.Na[A.name],b.Na[D]=A,A.name=D,b.ctime=b.mtime=A.parent.ctime=A.parent.mtime=Date.now()},unlink(A,b){delete A.Na[b],A.ctime=A.mtime=Date.now()},rmdir(A,b){var D=Vt(A,b),F;for(F in D.Na)throw new Oe(55);delete A.Na[b],A.ctime=A.mtime=Date.now()},readdir(A){return[".","..",...Object.keys(A.Na)]},symlink(A,b,D){return A=Ue.createNode(A,b,41471,0),A.link=D,A},readlink(A){if((A.mode&61440)!==40960)throw new Oe(28);return A.link}},Ma:{read(A,b,D,F,J){var ce=A.node.Na;if(J>=A.node.Ra)return 0;if(A=Math.min(A.node.Ra-J,F),8<A&&ce.subarray)b.set(ce.subarray(J,J+A),D);else for(F=0;F<A;F++)b[D+F]=ce[J+F];return A},write(A,b,D,F,J,ce){if(b.buffer===V.buffer&&(ce=!1),!F)return 0;if(A=A.node,A.mtime=A.ctime=Date.now(),b.subarray&&(!A.Na||A.Na.subarray)){if(ce)return A.Na=b.subarray(D,D+F),A.Ra=F;if(A.Ra===0&&J===0)return A.Na=b.slice(D,D+F),A.Ra=F;if(J+F<=A.Ra)return A.Na.set(b.subarray(D,D+F),J),F}ce=J+F;var ye=A.Na?A.Na.length:0;if(ye>=ce||(ce=Math.max(ce,ye*(1048576>ye?2:1.125)>>>0),ye!=0&&(ce=Math.max(ce,256)),ye=A.Na,A.Na=new Uint8Array(ce),0<A.Ra&&A.Na.set(ye.subarray(0,A.Ra),0)),A.Na.subarray&&b.subarray)A.Na.set(b.subarray(D,D+F),J);else for(ce=0;ce<F;ce++)A.Na[J+ce]=b[D+ce];return A.Ra=Math.max(A.Ra,J+F),F},Va(A,b,D){if(D===1?b+=A.position:D===2&&(A.node.mode&61440)===32768&&(b+=A.node.Ra),0>b)throw new Oe(28);return b},ib(A,b,D,F,J){if((A.node.mode&61440)!==32768)throw new Oe(43);if(A=A.node.Na,J&2||!A||A.buffer!==V.buffer){J=!0,F=65536*Math.ceil(b/65536);var ce=Lo(65536,F);if(ce&&K.fill(0,ce,ce+F),F=ce,!F)throw new Oe(48);A&&((0<D||D+b<A.length)&&(A.subarray?A=A.subarray(D,D+b):A=Array.prototype.slice.call(A,D,D+b)),V.set(A,F))}else J=!1,F=A.byteOffset;return{Kb:F,Ab:J}},jb(A,b,D,F){return Ue.Ma.write(A,b,0,F,D,!1),0}}},ht=(A,b)=>{var D=0;return A&&(D|=365),b&&(D|=146),D},Et=null,St={},mt=[],gr=1,ra=null,an=!1,On=!0,jn={},Oe=class{constructor(A){Qe(this,"name","ErrnoError");this.Pa=A}},ci=class{constructor(){Qe(this,"gb",{});Qe(this,"node",null)}get flags(){return this.gb.flags}set flags(A){this.gb.flags=A}get position(){return this.gb.position}set position(A){this.gb.position=A}},Zt=class{constructor(A,b,D,F){Qe(this,"La",{});Qe(this,"Ma",{});Qe(this,"ab",null);A||(A=this),this.parent=A,this.Xa=A.Xa,this.id=gr++,this.name=b,this.mode=D,this.rdev=F,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(A){A?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(A){A?this.mode|=146:this.mode&=-147}};function sa(A,b={}){if(!A)throw new Oe(44);b.nb??(b.nb=!0),A.charAt(0)==="/"||(A="//"+A);var D=0;e:for(;40>D;D++){A=A.split("/").filter(Ge=>!!Ge);for(var F=Et,J="/",ce=0;ce<A.length;ce++){var ye=ce===A.length-1;if(ye&&b.parent)break;if(A[ce]!==".")if(A[ce]==="..")J=at(J),F=F.parent;else{J=ze(J+"/"+A[ce]);try{F=Vt(F,A[ce])}catch(Ge){if((Ge==null?void 0:Ge.Pa)===44&&ye&&b.Jb)return{path:J};throw Ge}if(!F.ab||ye&&!b.nb||(F=F.ab.root),(F.mode&61440)===40960&&(!ye||b.$a)){if(!F.La.readlink)throw new Oe(52);F=F.La.readlink(F),F.charAt(0)==="/"||(F=at(J)+"/"+F),A=F+"/"+A.slice(ce+1).join("/");continue e}}}return{path:J,node:F}}throw new Oe(32)}function tr(A){for(var b;;){if(A===A.parent)return A=A.Xa.zb,b?A[A.length-1]!=="/"?`${A}/${b}`:A+b:A;b=b?`${A.name}/${b}`:A.name,A=A.parent}}function ar(A,b){for(var D=0,F=0;F<b.length;F++)D=(D<<5)-D+b.charCodeAt(F)|0;return(A+D>>>0)%ra.length}function Ra(A){var b=ar(A.parent.id,A.name);if(ra[b]===A)ra[b]=A.bb;else for(b=ra[b];b;){if(b.bb===A){b.bb=A.bb;break}b=b.bb}}function Vt(A,b){var D=Wt(A.mode)?(D=ja(A,"x"))?D:A.La.lookup?0:2:54;if(D)throw new Oe(D);for(D=ra[ar(A.id,b)];D;D=D.bb){var F=D.name;if(D.parent.id===A.id&&F===b)return D}return A.La.lookup(A,b)}function ya(A,b,D,F){return A=new Zt(A,b,D,F),b=ar(A.parent.id,A.name),A.bb=ra[b],ra[b]=A}function Wt(A){return(A&61440)===16384}function Da(A){var b=["r","w","rw"][A&3];return A&512&&(b+="w"),b}function ja(A,b){if(On)return 0;if(!b.includes("r")||A.mode&292){if(b.includes("w")&&!(A.mode&146)||b.includes("x")&&!(A.mode&73))return 2}else return 2;return 0}function Rr(A,b){if(!Wt(A.mode))return 54;try{return Vt(A,b),20}catch{}return ja(A,"wx")}function oe(A,b,D){try{var F=Vt(A,b)}catch(J){return J.Pa}if(A=ja(A,"wx"))return A;if(D){if(!Wt(F.mode))return 54;if(F===F.parent||tr(F)==="/")return 10}else if(Wt(F.mode))return 31;return 0}function _e(A){if(!A)throw new Oe(63);return A}function Me(A){if(A=mt[A],!A)throw new Oe(8);return A}function Xe(A,b=-1){if(A=Object.assign(new ci,A),b==-1)e:{for(b=0;4096>=b;b++)if(!mt[b])break e;throw new Oe(33)}return A.fd=b,mt[b]=A}function kt(A,b=-1){var D,F;return A=Xe(A,b),(F=(D=A.Ma)==null?void 0:D.Rb)==null||F.call(D,A),A}function bt(A,b,D){var F=A==null?void 0:A.Ma.Ua;A=F?A:b,F??(F=b.La.Ua),_e(F),F(A,D)}var it={open(A){var b,D;A.Ma=St[A.node.rdev].Ma,(D=(b=A.Ma).open)==null||D.call(b,A)},Va(){throw new Oe(70)}};function st(A,b){St[A]={Ma:b}}function cn(A,b){var D=b==="/";if(D&&Et)throw new Oe(10);if(!D&&b){var F=sa(b,{nb:!1});if(b=F.path,F=F.node,F.ab)throw new Oe(10);if(!Wt(F.mode))throw new Oe(54)}b={type:A,Wb:{},zb:b,Ib:[]},A=A.Xa(b),A.Xa=b,b.root=A,D?Et=A:F&&(F.ab=b,F.Xa&&F.Xa.Ib.push(b))}function Fe(A,b,D){var F=sa(A,{parent:!0}).node;if(A=Ye(A),!A)throw new Oe(28);if(A==="."||A==="..")throw new Oe(20);var J=Rr(F,A);if(J)throw new Oe(J);if(!F.La.hb)throw new Oe(63);return F.La.hb(F,A,b,D)}function Z(A,b=438){return Fe(A,b&4095|32768,0)}function we(A,b=511){return Fe(A,b&1023|16384,0)}function He(A,b,D){typeof D>"u"&&(D=b,b=438),Fe(A,b|8192,D)}function Mt(A,b){if(!qt(A))throw new Oe(44);var D=sa(b,{parent:!0}).node;if(!D)throw new Oe(44);b=Ye(b);var F=Rr(D,b);if(F)throw new Oe(F);if(!D.La.symlink)throw new Oe(63);D.La.symlink(D,b,A)}function ca(A){var b=sa(A,{parent:!0}).node;A=Ye(A);var D=Vt(b,A),F=oe(b,A,!0);if(F)throw new Oe(F);if(!b.La.rmdir)throw new Oe(63);if(D.ab)throw new Oe(10);b.La.rmdir(b,A),Ra(D)}function oa(A){var b=sa(A,{parent:!0}).node;if(!b)throw new Oe(44);A=Ye(A);var D=Vt(b,A),F=oe(b,A,!1);if(F)throw new Oe(F);if(!b.La.unlink)throw new Oe(63);if(D.ab)throw new Oe(10);b.La.unlink(b,A),Ra(D)}function la(A,b){return A=sa(A,{$a:!b}).node,_e(A.La.Ta)(A)}function qa(A,b,D,F){bt(A,b,{mode:D&4095|b.mode&-4096,ctime:Date.now(),Fb:F})}function va(A,b){A=typeof A=="string"?sa(A,{$a:!0}).node:A,qa(null,A,b)}function fr(A,b,D){if(Wt(b.mode))throw new Oe(31);if((b.mode&61440)!==32768)throw new Oe(28);var F=ja(b,"w");if(F)throw new Oe(F);bt(A,b,{size:D,timestamp:Date.now()})}function ea(A,b,D=438){if(A==="")throw new Oe(44);if(typeof b=="string"){var F={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if(typeof F>"u")throw Error(`Unknown file open mode: ${b}`);b=F}if(D=b&64?D&4095|32768:0,typeof A=="object")F=A;else{var J=A.endsWith("/");A=sa(A,{$a:!(b&131072),Jb:!0}),F=A.node,A=A.path}var ce=!1;if(b&64)if(F){if(b&128)throw new Oe(20)}else{if(J)throw new Oe(31);F=Fe(A,D|511,0),ce=!0}if(!F)throw new Oe(44);if((F.mode&61440)===8192&&(b&=-513),b&65536&&!Wt(F.mode))throw new Oe(54);if(!ce&&(J=F?(F.mode&61440)===40960?32:Wt(F.mode)&&(Da(b)!=="r"||b&576)?31:ja(F,Da(b)):44))throw new Oe(J);return b&512&&!ce&&(J=F,J=typeof J=="string"?sa(J,{$a:!0}).node:J,fr(null,J,0)),b&=-131713,J=Xe({node:F,path:tr(F),flags:b,seekable:!0,position:0,Ma:F.Ma,Lb:[],error:!1}),J.Ma.open&&J.Ma.open(J),ce&&va(F,D&511),!g.logReadFiles||b&1||A in jn||(jn[A]=1),J}function xn(A){if(A.fd===null)throw new Oe(8);A.ob&&(A.ob=null);try{A.Ma.close&&A.Ma.close(A)}catch(b){throw b}finally{mt[A.fd]=null}A.fd=null}function Dr(A,b,D){if(A.fd===null)throw new Oe(8);if(!A.seekable||!A.Ma.Va)throw new Oe(70);if(D!=0&&D!=1&&D!=2)throw new Oe(28);A.position=A.Ma.Va(A,b,D),A.Lb=[]}function ks(A,b,D,F,J){if(0>F||0>J)throw new Oe(28);if(A.fd===null)throw new Oe(8);if((A.flags&2097155)===1)throw new Oe(8);if(Wt(A.node.mode))throw new Oe(31);if(!A.Ma.read)throw new Oe(28);var ce=typeof J<"u";if(!ce)J=A.position;else if(!A.seekable)throw new Oe(70);return b=A.Ma.read(A,b,D,F,J),ce||(A.position+=b),b}function tc(A,b,D,F,J){if(0>F||0>J)throw new Oe(28);if(A.fd===null)throw new Oe(8);if((A.flags&2097155)===0)throw new Oe(8);if(Wt(A.node.mode))throw new Oe(31);if(!A.Ma.write)throw new Oe(28);A.seekable&&A.flags&1024&&Dr(A,0,2);var ce=typeof J<"u";if(!ce)J=A.position;else if(!A.seekable)throw new Oe(70);return b=A.Ma.write(A,b,D,F,J,void 0),ce||(A.position+=b),b}function ac(A){var b,D=ea(A,D||0);A=la(A).size;var F=new Uint8Array(A);return ks(D,F,0,A,0),b=F,xn(D),b}function Ca(A,b,D){A=ze("/dev/"+A);var F=ht(!!b,!!D);Ca.yb??(Ca.yb=64);var J=Ca.yb++<<8|0;st(J,{open(ce){ce.seekable=!1},close(){var ce;(ce=D==null?void 0:D.buffer)!=null&&ce.length&&D(10)},read(ce,ye,Ge,It){for(var At=0,ua=0;ua<It;ua++){try{var Pa=b()}catch{throw new Oe(29)}if(Pa===void 0&&At===0)throw new Oe(6);if(Pa==null)break;At++,ye[Ge+ua]=Pa}return At&&(ce.node.atime=Date.now()),At},write(ce,ye,Ge,It){for(var At=0;At<It;At++)try{D(ye[Ge+At])}catch{throw new Oe(29)}return It&&(ce.node.mtime=ce.node.ctime=Date.now()),At}}),He(A,F,J)}var Yt={};function Br(A,b,D){if(b.charAt(0)==="/")return b;if(A=A===-100?"/":Me(A).path,b.length==0){if(!D)throw new Oe(44);return A}return A+"/"+b}function Ur(A,b){W[A>>2]=b.dev,W[A+4>>2]=b.mode,ne[A+8>>2]=b.nlink,W[A+12>>2]=b.uid,W[A+16>>2]=b.gid,W[A+20>>2]=b.rdev,q[A+24>>3]=BigInt(b.size),W[A+32>>2]=4096,W[A+36>>2]=b.blocks;var D=b.atime.getTime(),F=b.mtime.getTime(),J=b.ctime.getTime();return q[A+40>>3]=BigInt(Math.floor(D/1e3)),ne[A+48>>2]=D%1e3*1e6,q[A+56>>3]=BigInt(Math.floor(F/1e3)),ne[A+64>>2]=F%1e3*1e6,q[A+72>>3]=BigInt(Math.floor(J/1e3)),ne[A+80>>2]=J%1e3*1e6,q[A+88>>3]=BigInt(b.ino),0}var Wi=void 0,Mr=()=>{var A=W[+Wi>>2];return Wi+=4,A},wo=0,An=[0,31,60,91,121,152,182,213,244,274,305,335],xo=[0,31,59,90,120,151,181,212,243,273,304,334],ui={},Ls=A=>{var b;z=A,tt||0<wo||((b=g.onExit)==null||b.call(g,A),H=!0),T(A,new Be(A))},di=A=>{if(!H)try{if(A(),!(tt||0<wo))try{z=A=z,Ls(A)}catch(b){b instanceof Be||b=="unwind"||T(1,b)}}catch(b){b instanceof Be||b=="unwind"||T(1,b)}},Rs={},To=()=>{if(!hr){var A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:x||"./this.program"},b;for(b in Rs)Rs[b]===void 0?delete A[b]:A[b]=Rs[b];var D=[];for(b in A)D.push(`${b}=${A[b]}`);hr=D}return hr},hr,So=A=>{var b=na(A)+1,D=Hn(b);return U(A,K,D,b),D},nc=(A,b,D,F)=>{var J={string:At=>{var ua=0;return At!=null&&At!==0&&(ua=So(At)),ua},array:At=>{var ua=Hn(At.length);return V.set(At,ua),ua}};A=g["_"+A];var ce=[],ye=0;if(F)for(var Ge=0;Ge<F.length;Ge++){var It=J[D[Ge]];It?(ye===0&&(ye=nr()),ce[Ge]=It(F[Ge])):ce[Ge]=F[Ge]}return D=A(...ce),D=function(At){return ye!==0&&un(ye),b==="string"?At?me(K,At):"":b==="boolean"?!!At:At}(D)},Yi=0,mi=(A,b)=>(b=b==1?Hn(A.length):Ds(A.length),A.subarray||A.slice||(A=new Uint8Array(A)),K.set(A,b),b),_r,ko=[],pn,Pn=A=>{_r.delete(pn.get(A)),pn.set(A,null),ko.push(A)},Fr=(A,b)=>{if(!_r){_r=new WeakMap;var D=pn.length;if(_r)for(var F=0;F<0+D;F++){var J=pn.get(F);J&&_r.set(J,F)}}if(D=_r.get(A)||0)return D;if(ko.length)D=ko.pop();else{try{pn.grow(1)}catch(It){throw It instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":It}D=pn.length-1}try{pn.set(D,A)}catch(It){if(!(It instanceof TypeError))throw It;if(typeof WebAssembly.Function=="function"){var ce=WebAssembly.Function;F={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},J={parameters:[],results:b[0]=="v"?[]:[F[b[0]]]};for(var ye=1;ye<b.length;++ye)J.parameters.push(F[b[ye]]);b=new ce(J,A)}else{F=[1],J=b.slice(0,1),b=b.slice(1),ye={i:127,p:127,j:126,f:125,d:124,e:111},F.push(96);var Ge=b.length;128>Ge?F.push(Ge):F.push(Ge%128|128,Ge>>7);for(ce of b)F.push(ye[ce]);J=="v"?F.push(0):F.push(1,ye[J]),b=[0,97,115,109,1,0,0,0,1],ce=F.length,128>ce?b.push(ce):b.push(ce%128|128,ce>>7),b.push(...F),b.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),b=new WebAssembly.Module(new Uint8Array(b)),b=new WebAssembly.Instance(b,{e:{f:A}}).exports.f}pn.set(D,b)}return _r.set(A,D),D};ra=Array(4096),cn(Ue,"/"),we("/tmp"),we("/home"),we("/home/web_user"),function(){we("/dev"),st(259,{read:()=>0,write:(F,J,ce,ye)=>ye,Va:()=>0}),He("/dev/null",259),Q(1280,fe),Q(1536,be),He("/dev/tty",1280),He("/dev/tty1",1536);var A=new Uint8Array(1024),b=0,D=()=>(b===0&&(jt(A),b=A.byteLength),A[--b]);Ca("random",D),Ca("urandom",D),we("/dev/shm"),we("/dev/shm/tmp")}(),function(){we("/proc");var A=we("/proc/self");we("/proc/self/fd"),cn({Xa(){var b=ya(A,"fd",16895,73);return b.Ma={Va:Ue.Ma.Va},b.La={lookup(D,F){D=+F;var J=Me(D);return D={parent:null,Xa:{zb:"fake"},La:{readlink:()=>J.path},id:D+1},D.parent=D},readdir(){return Array.from(mt.entries()).filter(([,D])=>D).map(([D])=>D.toString())}},b}},"/proc/self/fd")}(),Ue.vb=new Oe(44),Ue.vb.stack="<generic error, no stack>";var gi={a:(A,b,D,F)=>ee(`Assertion failed: ${A?me(K,A):""}, at: `+[b?b?me(K,b):"":"unknown filename",D,F?F?me(K,F):"":"unknown function"]),i:function(A,b){try{return A=A?me(K,A):"",va(A,b),0}catch(D){if(typeof Yt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},L:function(A,b,D){try{if(b=b?me(K,b):"",b=Br(A,b),D&-8)return-28;var F=sa(b,{$a:!0}).node;return F?(A="",D&4&&(A+="r"),D&2&&(A+="w"),D&1&&(A+="x"),A&&ja(F,A)?-2:0):-44}catch(J){if(typeof Yt>"u"||J.name!=="ErrnoError")throw J;return-J.Pa}},j:function(A,b){try{var D=Me(A);return qa(D,D.node,b,!1),0}catch(F){if(typeof Yt>"u"||F.name!=="ErrnoError")throw F;return-F.Pa}},h:function(A){try{var b=Me(A);return bt(b,b.node,{timestamp:Date.now(),Fb:!1}),0}catch(D){if(typeof Yt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},b:function(A,b,D){Wi=D;try{var F=Me(A);switch(b){case 0:var J=Mr();if(0>J)break;for(;mt[J];)J++;return kt(F,J).fd;case 1:case 2:return 0;case 3:return F.flags;case 4:return J=Mr(),F.flags|=J,0;case 12:return J=Mr(),$[J+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(ce){if(typeof Yt>"u"||ce.name!=="ErrnoError")throw ce;return-ce.Pa}},g:function(A,b){try{var D=Me(A),F=D.node,J=D.Ma.Ta;A=J?D:F,J??(J=F.La.Ta),_e(J);var ce=J(A);return Ur(b,ce)}catch(ye){if(typeof Yt>"u"||ye.name!=="ErrnoError")throw ye;return-ye.Pa}},H:function(A,b){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var D=Me(A);if(0>b||(D.flags&2097155)===0)throw new Oe(28);return fr(D,D.node,b),0}catch(F){if(typeof Yt>"u"||F.name!=="ErrnoError")throw F;return-F.Pa}},G:function(A,b){try{if(b===0)return-28;var D=na("/")+1;return b<D?-68:(U("/",K,A,b),D)}catch(F){if(typeof Yt>"u"||F.name!=="ErrnoError")throw F;return-F.Pa}},K:function(A,b){try{return A=A?me(K,A):"",Ur(b,la(A,!0))}catch(D){if(typeof Yt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},C:function(A,b,D){try{return b=b?me(K,b):"",b=Br(A,b),we(b,D),0}catch(F){if(typeof Yt>"u"||F.name!=="ErrnoError")throw F;return-F.Pa}},J:function(A,b,D,F){try{b=b?me(K,b):"";var J=F&256;return b=Br(A,b,F&4096),Ur(D,J?la(b,!0):la(b))}catch(ce){if(typeof Yt>"u"||ce.name!=="ErrnoError")throw ce;return-ce.Pa}},x:function(A,b,D,F){Wi=F;try{b=b?me(K,b):"",b=Br(A,b);var J=F?Mr():0;return ea(b,D,J).fd}catch(ce){if(typeof Yt>"u"||ce.name!=="ErrnoError")throw ce;return-ce.Pa}},v:function(A,b,D,F){try{if(b=b?me(K,b):"",b=Br(A,b),0>=F)return-28;var J=sa(b).node;if(!J)throw new Oe(44);if(!J.La.readlink)throw new Oe(28);var ce=J.La.readlink(J),ye=Math.min(F,na(ce)),Ge=V[D+ye];return U(ce,K,D,F+1),V[D+ye]=Ge,ye}catch(It){if(typeof Yt>"u"||It.name!=="ErrnoError")throw It;return-It.Pa}},u:function(A){try{return A=A?me(K,A):"",ca(A),0}catch(b){if(typeof Yt>"u"||b.name!=="ErrnoError")throw b;return-b.Pa}},f:function(A,b){try{return A=A?me(K,A):"",Ur(b,la(A))}catch(D){if(typeof Yt>"u"||D.name!=="ErrnoError")throw D;return-D.Pa}},r:function(A,b,D){try{return b=b?me(K,b):"",b=Br(A,b),D===0?oa(b):D===512?ca(b):ee("Invalid flags passed to unlinkat"),0}catch(F){if(typeof Yt>"u"||F.name!=="ErrnoError")throw F;return-F.Pa}},q:function(A,b,D){try{b=b?me(K,b):"",b=Br(A,b,!0);var F=Date.now(),J,ce;if(D){var ye=ne[D>>2]+4294967296*W[D+4>>2],Ge=W[D+8>>2];Ge==1073741823?J=F:Ge==1073741822?J=null:J=1e3*ye+Ge/1e6,D+=16,ye=ne[D>>2]+4294967296*W[D+4>>2],Ge=W[D+8>>2],Ge==1073741823?ce=F:Ge==1073741822?ce=null:ce=1e3*ye+Ge/1e6}else ce=J=F;if((ce??J)!==null){A=J;var It=sa(b,{$a:!0}).node;_e(It.La.Ua)(It,{atime:A,mtime:ce})}return 0}catch(At){if(typeof Yt>"u"||At.name!=="ErrnoError")throw At;return-At.Pa}},m:()=>ee(""),l:()=>{tt=!1,wo=0},A:function(A,b){A=-9007199254740992>A||9007199254740992<A?NaN:Number(A),A=new Date(1e3*A),W[b>>2]=A.getSeconds(),W[b+4>>2]=A.getMinutes(),W[b+8>>2]=A.getHours(),W[b+12>>2]=A.getDate(),W[b+16>>2]=A.getMonth(),W[b+20>>2]=A.getFullYear()-1900,W[b+24>>2]=A.getDay();var D=A.getFullYear();W[b+28>>2]=(D%4!==0||D%100===0&&D%400!==0?xo:An)[A.getMonth()]+A.getDate()-1|0,W[b+36>>2]=-(60*A.getTimezoneOffset()),D=new Date(A.getFullYear(),6,1).getTimezoneOffset();var F=new Date(A.getFullYear(),0,1).getTimezoneOffset();W[b+32>>2]=(D!=F&&A.getTimezoneOffset()==Math.min(F,D))|0},y:function(A,b,D,F,J,ce,ye){J=-9007199254740992>J||9007199254740992<J?NaN:Number(J);try{if(isNaN(J))return 61;var Ge=Me(F);if((b&2)!==0&&(D&2)===0&&(Ge.flags&2097155)!==2)throw new Oe(2);if((Ge.flags&2097155)===1)throw new Oe(2);if(!Ge.Ma.ib)throw new Oe(43);if(!A)throw new Oe(28);var It=Ge.Ma.ib(Ge,A,J,b,D),At=It.Kb;return W[ce>>2]=It.Ab,ne[ye>>2]=At,0}catch(ua){if(typeof Yt>"u"||ua.name!=="ErrnoError")throw ua;return-ua.Pa}},z:function(A,b,D,F,J,ce){ce=-9007199254740992>ce||9007199254740992<ce?NaN:Number(ce);try{var ye=Me(J);if(D&2){if(D=ce,(ye.node.mode&61440)!==32768)throw new Oe(43);if(!(F&2)){var Ge=K.slice(A,A+b);ye.Ma.jb&&ye.Ma.jb(ye,Ge,D,b,F)}}}catch(It){if(typeof Yt>"u"||It.name!=="ErrnoError")throw It;return-It.Pa}},n:(A,b)=>{if(ui[A]&&(clearTimeout(ui[A].id),delete ui[A]),!b)return 0;var D=setTimeout(()=>{delete ui[A],di(()=>hi(A,performance.now()))},b);return ui[A]={id:D,Xb:b},0},B:(A,b,D,F)=>{var J=new Date().getFullYear(),ce=new Date(J,0,1).getTimezoneOffset();J=new Date(J,6,1).getTimezoneOffset(),ne[A>>2]=60*Math.max(ce,J),W[b>>2]=+(ce!=J),b=ye=>{var Ge=Math.abs(ye);return`UTC${0<=ye?"-":"+"}${String(Math.floor(Ge/60)).padStart(2,"0")}${String(Ge%60).padStart(2,"0")}`},A=b(ce),b=b(J),J<ce?(U(A,K,D,17),U(b,K,F,17)):(U(A,K,F,17),U(b,K,D,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:A=>{var b=K.length;if(A>>>=0,2147483648<A)return!1;for(var D=1;4>=D;D*=2){var F=b*(1+.2/D);F=Math.min(F,A+100663296);e:{F=(Math.min(2147483648,65536*Math.ceil(Math.max(A,F)/65536))-G.buffer.byteLength+65535)/65536|0;try{G.grow(F),pe();var J=1;break e}catch{}J=void 0}if(J)return!0}return!1},E:(A,b)=>{var D=0;return To().forEach((F,J)=>{var ce=b+D;for(J=ne[A+4*J>>2]=ce,ce=0;ce<F.length;++ce)V[J++]=F.charCodeAt(ce);V[J]=0,D+=F.length+1}),0},F:(A,b)=>{var D=To();ne[A>>2]=D.length;var F=0;return D.forEach(J=>F+=J.length+1),ne[b>>2]=F,0},e:function(A){try{var b=Me(A);return xn(b),0}catch(D){if(typeof Yt>"u"||D.name!=="ErrnoError")throw D;return D.Pa}},p:function(A,b){try{var D=Me(A);return V[b]=D.tty?2:Wt(D.mode)?3:(D.mode&61440)===40960?7:4,$[b+2>>1]=0,q[b+8>>3]=BigInt(0),q[b+16>>3]=BigInt(0),0}catch(F){if(typeof Yt>"u"||F.name!=="ErrnoError")throw F;return F.Pa}},w:function(A,b,D,F){try{e:{var J=Me(A);A=b;for(var ce,ye=b=0;ye<D;ye++){var Ge=ne[A>>2],It=ne[A+4>>2];A+=8;var At=ks(J,V,Ge,It,ce);if(0>At){var ua=-1;break e}if(b+=At,At<It)break;typeof ce<"u"&&(ce+=At)}ua=b}return ne[F>>2]=ua,0}catch(Pa){if(typeof Yt>"u"||Pa.name!=="ErrnoError")throw Pa;return Pa.Pa}},D:function(A,b,D,F){b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var J=Me(A);return Dr(J,b,D),q[F>>3]=BigInt(J.position),J.ob&&b===0&&D===0&&(J.ob=null),0}catch(ce){if(typeof Yt>"u"||ce.name!=="ErrnoError")throw ce;return ce.Pa}},I:function(A){var D;try{var b=Me(A);return(D=b.Ma)!=null&&D.fsync?b.Ma.fsync(b):0}catch(F){if(typeof Yt>"u"||F.name!=="ErrnoError")throw F;return F.Pa}},t:function(A,b,D,F){try{e:{var J=Me(A);A=b;for(var ce,ye=b=0;ye<D;ye++){var Ge=ne[A>>2],It=ne[A+4>>2];A+=8;var At=tc(J,V,Ge,It,ce);if(0>At){var ua=-1;break e}if(b+=At,At<It)break;typeof ce<"u"&&(ce+=At)}ua=b}return ne[F>>2]=ua,0}catch(Pa){if(typeof Yt>"u"||Pa.name!=="ErrnoError")throw Pa;return Pa.Pa}},k:Ls},Je;(async function(){var D;function A(F){var J;return Je=F.exports,G=Je.M,pe(),pn=Je.O,j--,(J=g.monitorRunDependencies)==null||J.call(g,j),j==0&&X&&(F=X,X=null,F()),Je}j++,(D=g.monitorRunDependencies)==null||D.call(g,j);var b={a:gi};return g.instantiateWasm?new Promise(F=>{g.instantiateWasm(b,(J,ce)=>{A(J),F(J.exports)})}):(ie??(ie=g.locateFile?g.locateFile("sql-wasm.wasm",k):k+"sql-wasm.wasm"),A((await Re(b)).instance))})(),g._sqlite3_free=A=>(g._sqlite3_free=Je.P)(A),g._sqlite3_value_text=A=>(g._sqlite3_value_text=Je.Q)(A),g._sqlite3_prepare_v2=(A,b,D,F,J)=>(g._sqlite3_prepare_v2=Je.R)(A,b,D,F,J),g._sqlite3_step=A=>(g._sqlite3_step=Je.S)(A),g._sqlite3_reset=A=>(g._sqlite3_reset=Je.T)(A),g._sqlite3_exec=(A,b,D,F,J)=>(g._sqlite3_exec=Je.U)(A,b,D,F,J),g._sqlite3_finalize=A=>(g._sqlite3_finalize=Je.V)(A),g._sqlite3_column_name=(A,b)=>(g._sqlite3_column_name=Je.W)(A,b),g._sqlite3_column_text=(A,b)=>(g._sqlite3_column_text=Je.X)(A,b),g._sqlite3_column_type=(A,b)=>(g._sqlite3_column_type=Je.Y)(A,b),g._sqlite3_errmsg=A=>(g._sqlite3_errmsg=Je.Z)(A),g._sqlite3_clear_bindings=A=>(g._sqlite3_clear_bindings=Je._)(A),g._sqlite3_value_blob=A=>(g._sqlite3_value_blob=Je.$)(A),g._sqlite3_value_bytes=A=>(g._sqlite3_value_bytes=Je.aa)(A),g._sqlite3_value_double=A=>(g._sqlite3_value_double=Je.ba)(A),g._sqlite3_value_int=A=>(g._sqlite3_value_int=Je.ca)(A),g._sqlite3_value_type=A=>(g._sqlite3_value_type=Je.da)(A),g._sqlite3_result_blob=(A,b,D,F)=>(g._sqlite3_result_blob=Je.ea)(A,b,D,F),g._sqlite3_result_double=(A,b)=>(g._sqlite3_result_double=Je.fa)(A,b),g._sqlite3_result_error=(A,b,D)=>(g._sqlite3_result_error=Je.ga)(A,b,D),g._sqlite3_result_int=(A,b)=>(g._sqlite3_result_int=Je.ha)(A,b),g._sqlite3_result_int64=(A,b)=>(g._sqlite3_result_int64=Je.ia)(A,b),g._sqlite3_result_null=A=>(g._sqlite3_result_null=Je.ja)(A),g._sqlite3_result_text=(A,b,D,F)=>(g._sqlite3_result_text=Je.ka)(A,b,D,F),g._sqlite3_aggregate_context=(A,b)=>(g._sqlite3_aggregate_context=Je.la)(A,b),g._sqlite3_column_count=A=>(g._sqlite3_column_count=Je.ma)(A),g._sqlite3_data_count=A=>(g._sqlite3_data_count=Je.na)(A),g._sqlite3_column_blob=(A,b)=>(g._sqlite3_column_blob=Je.oa)(A,b),g._sqlite3_column_bytes=(A,b)=>(g._sqlite3_column_bytes=Je.pa)(A,b),g._sqlite3_column_double=(A,b)=>(g._sqlite3_column_double=Je.qa)(A,b),g._sqlite3_bind_blob=(A,b,D,F,J)=>(g._sqlite3_bind_blob=Je.ra)(A,b,D,F,J),g._sqlite3_bind_double=(A,b,D)=>(g._sqlite3_bind_double=Je.sa)(A,b,D),g._sqlite3_bind_int=(A,b,D)=>(g._sqlite3_bind_int=Je.ta)(A,b,D),g._sqlite3_bind_text=(A,b,D,F,J)=>(g._sqlite3_bind_text=Je.ua)(A,b,D,F,J),g._sqlite3_bind_parameter_index=(A,b)=>(g._sqlite3_bind_parameter_index=Je.va)(A,b),g._sqlite3_sql=A=>(g._sqlite3_sql=Je.wa)(A),g._sqlite3_normalized_sql=A=>(g._sqlite3_normalized_sql=Je.xa)(A),g._sqlite3_changes=A=>(g._sqlite3_changes=Je.ya)(A),g._sqlite3_close_v2=A=>(g._sqlite3_close_v2=Je.za)(A),g._sqlite3_create_function_v2=(A,b,D,F,J,ce,ye,Ge,It)=>(g._sqlite3_create_function_v2=Je.Aa)(A,b,D,F,J,ce,ye,Ge,It),g._sqlite3_update_hook=(A,b,D)=>(g._sqlite3_update_hook=Je.Ba)(A,b,D),g._sqlite3_open=(A,b)=>(g._sqlite3_open=Je.Ca)(A,b);var Ds=g._malloc=A=>(Ds=g._malloc=Je.Da)(A),fi=g._free=A=>(fi=g._free=Je.Ea)(A);g._RegisterExtensionFunctions=A=>(g._RegisterExtensionFunctions=Je.Fa)(A);var Lo=(A,b)=>(Lo=Je.Ga)(A,b),hi=(A,b)=>(hi=Je.Ha)(A,b),un=A=>(un=Je.Ia)(A),Hn=A=>(Hn=Je.Ja)(A),nr=()=>(nr=Je.Ka)();g.stackSave=()=>nr(),g.stackRestore=A=>un(A),g.stackAlloc=A=>Hn(A),g.cwrap=(A,b,D,F)=>{var J=!D||D.every(ce=>ce==="number"||ce==="boolean");return b!=="string"&&J&&!F?g["_"+A]:(...ce)=>nc(A,b,D,ce)},g.addFunction=Fr,g.removeFunction=Pn,g.UTF8ToString=De,g.ALLOC_NORMAL=Yi,g.allocate=mi,g.allocateUTF8OnStack=So;function zn(){function A(){var J;if(g.calledRun=!0,!H){if(!g.noFSInit&&!an){var b,D;an=!0,F??(F=g.stdin),b??(b=g.stdout),D??(D=g.stderr),F?Ca("stdin",F):Mt("/dev/tty","/dev/stdin"),b?Ca("stdout",null,b):Mt("/dev/tty","/dev/stdout"),D?Ca("stderr",null,D):Mt("/dev/tty1","/dev/stderr"),ea("/dev/stdin",0),ea("/dev/stdout",1),ea("/dev/stderr",1)}if(Je.N(),On=!1,(J=g.onRuntimeInitialized)==null||J.call(g),g.postRun)for(typeof g.postRun=="function"&&(g.postRun=[g.postRun]);g.postRun.length;){var F=g.postRun.shift();Ve.unshift(F)}ke(Ve)}}if(0<j)X=zn;else{if(g.preRun)for(typeof g.preRun=="function"&&(g.preRun=[g.preRun]);g.preRun.length;)Ct();ke(vt),0<j?X=zn:g.setStatus?(g.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>g.setStatus(""),1),A()},1)):A()}}if(g.preInit)for(typeof g.preInit=="function"&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.pop()();return zn(),m}),a)};r.exports=i,r.exports.default=i}(zg)),zg.exports}var bx=Ex();const Wf=qi(bx);var Ty=`
\uFEFFCREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
    "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
    "ProductVersion" TEXT NOT NULL
);

BEGIN TRANSACTION;
CREATE TABLE "Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "Gender" VARCHAR NULL,
    "FirstName" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "BirthDate" TEXT NOT NULL,
    "AddressStreet" VARCHAR NULL,
    "AddressCity" VARCHAR NULL,
    "AddressState" VARCHAR NULL,
    "AddressZipCode" VARCHAR NULL,
    "AddressCountry" VARCHAR NULL,
    "Hobbies" TEXT NULL,
    "EmailPrefix" TEXT NULL,
    "PhoneMobile" TEXT NULL,
    "BankAccountIBAN" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

CREATE TABLE "Services" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Services" PRIMARY KEY,
    "Name" TEXT NULL,
    "Url" TEXT NULL,
    "Logo" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

CREATE TABLE "Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "Username" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "ServiceId" TEXT NOT NULL,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Attachment" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachment" PRIMARY KEY,
    "Filename" TEXT NOT NULL,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    CONSTRAINT "FK_Attachment_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Passwords" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passwords" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    CONSTRAINT "FK_Passwords_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_Attachment_CredentialId" ON "Attachment" ("CredentialId");

CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");

CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");

CREATE INDEX "IX_Passwords_CredentialId" ON "Passwords" ("CredentialId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240708094944_1.0.0-InitialMigration', '9.0.4');

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240708224522_1.0.1-EmptyTestMigration', '9.0.4');

ALTER TABLE "Aliases" RENAME COLUMN "EmailPrefix" TO "Email";

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240711204207_1.0.2-ChangeEmailColumn', '9.0.4');

CREATE TABLE "EncryptionKeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_EncryptionKeys" PRIMARY KEY,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "IsPrimary" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240729105618_1.1.0-AddPkiTables', '9.0.4');

CREATE TABLE "Settings" (
    "Key" TEXT NOT NULL CONSTRAINT "PK_Settings" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805073413_1.2.0-AddSettingsTable', '9.0.4');

CREATE TABLE "ef_temp_Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "BirthDate" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Email" TEXT NULL,
    "FirstName" VARCHAR NULL,
    "Gender" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "ef_temp_Aliases" ("Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt")
SELECT "Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt"
FROM "Aliases";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Aliases";

ALTER TABLE "ef_temp_Aliases" RENAME TO "Aliases";

COMMIT;

PRAGMA foreign_keys = 1;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805122422_1.3.0-UpdateIdentityStructure', '9.0.4');

BEGIN TRANSACTION;
CREATE TABLE "ef_temp_Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "ServiceId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "Username" TEXT NULL,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Credentials" ("Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username")
SELECT "Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username"
FROM "Credentials";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Credentials";

ALTER TABLE "ef_temp_Credentials" RENAME TO "Credentials";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");

CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240812141727_1.3.1-MakeUsernameOptional', '9.0.4');

BEGIN TRANSACTION;
ALTER TABLE "Settings" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Services" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Passwords" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "EncryptionKeys" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Credentials" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Attachment" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Aliases" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240916105320_1.4.0-AddSyncSupport', '9.0.4');

ALTER TABLE "Attachment" RENAME TO "Attachments";

CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Attachments" ("Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt")
SELECT "Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt"
FROM "Attachments";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240917191243_1.4.1-RenameAttachmentsPlural', '9.0.4');

BEGIN TRANSACTION;
CREATE TABLE "TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20250310131554_1.5.0-AddTotpCodes', '9.0.4');


PRAGMA foreign_keys = OFF;

-- Clean up any existing temp tables first
DROP TABLE IF EXISTS "__EFMigrationsHistory_temp";
DROP TABLE IF EXISTS "Aliases_temp";
DROP TABLE IF EXISTS "Services_temp";
DROP TABLE IF EXISTS "EncryptionKeys_temp";
DROP TABLE IF EXISTS "Settings_temp";
DROP TABLE IF EXISTS "Credentials_temp";
DROP TABLE IF EXISTS "Attachments_temp";
DROP TABLE IF EXISTS "Passwords_temp";
DROP TABLE IF EXISTS "TotpCodes_temp";

-- Create backup tables for all data
CREATE TABLE "__EFMigrationsHistory_temp" AS SELECT * FROM "__EFMigrationsHistory";
CREATE TABLE "Aliases_temp" AS SELECT * FROM "Aliases";
CREATE TABLE "Services_temp" AS SELECT * FROM "Services";
CREATE TABLE "EncryptionKeys_temp" AS SELECT * FROM "EncryptionKeys";
CREATE TABLE "Settings_temp" AS SELECT * FROM "Settings";
CREATE TABLE "Credentials_temp" AS SELECT * FROM "Credentials";
CREATE TABLE "Attachments_temp" AS SELECT * FROM "Attachments";
CREATE TABLE "Passwords_temp" AS SELECT * FROM "Passwords";
CREATE TABLE "TotpCodes_temp" AS SELECT * FROM "TotpCodes";

-- Delete orphaned records that do not have a valid FK to the credential object
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Delete orphaned credentials that do not have valid FKs to alias or service objects
DELETE FROM "Credentials_temp" WHERE "AliasId" NOT IN (SELECT "Id" FROM "Aliases_temp");
DELETE FROM "Credentials_temp" WHERE "ServiceId" NOT IN (SELECT "Id" FROM "Services_temp");

-- After cleaning credentials, clean dependent tables again in case we removed credentials
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Drop all existing tables
DROP TABLE "TotpCodes";
DROP TABLE "Passwords";
DROP TABLE "Attachments";
DROP TABLE "Credentials";
DROP TABLE "Settings";
DROP TABLE "EncryptionKeys";
DROP TABLE "Services";
DROP TABLE "Aliases";
DROP TABLE "__EFMigrationsHistory";

-- Recreate tables with proper constraints (no dependencies first)
CREATE TABLE "__EFMigrationsHistory" (
    "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
    "ProductVersion" TEXT NOT NULL
);

CREATE TABLE "Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "BirthDate" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Email" TEXT NULL,
    "FirstName" VARCHAR NULL,
    "Gender" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

CREATE TABLE "Services" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Services" PRIMARY KEY,
    "Name" TEXT NULL,
    "Url" TEXT NULL,
    "Logo" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

CREATE TABLE "EncryptionKeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_EncryptionKeys" PRIMARY KEY,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "IsPrimary" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

CREATE TABLE "Settings" (
    "Key" TEXT NOT NULL CONSTRAINT "PK_Settings" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

-- Tables with foreign keys
CREATE TABLE "Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "ServiceId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "Username" TEXT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Passwords" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passwords" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_Passwords_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE TABLE "TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);


-- Restore data from temp tables
INSERT INTO "__EFMigrationsHistory" SELECT * FROM "__EFMigrationsHistory_temp";
INSERT INTO "Aliases" SELECT * FROM "Aliases_temp";
INSERT INTO "Services" SELECT * FROM "Services_temp";
INSERT INTO "EncryptionKeys" SELECT * FROM "EncryptionKeys_temp";
INSERT INTO "Settings" SELECT * FROM "Settings_temp";
INSERT INTO "Credentials" SELECT * FROM "Credentials_temp";
INSERT INTO "Attachments" SELECT * FROM "Attachments_temp";
INSERT INTO "Passwords" SELECT * FROM "Passwords_temp";
INSERT INTO "TotpCodes" SELECT * FROM "TotpCodes_temp";

-- =====================================================================================
-- Date Format Normalization Migration
-- =====================================================================================
-- This migration normalizes ALL date fields to the standard format: 'yyyy-MM-dd HH:mm:ss.fff'
-- Previously the different clients used different date formats which complicate date parsing.
-- From version 0.24.0 onwards, all new dates are stored in this standard format.

-- Update Aliases table (CreatedAt, UpdatedAt, BirthDate)
UPDATE "Aliases" SET "CreatedAt" =
    CASE
        -- Already in correct format (yyyy-MM-dd HH:mm:ss.fff) - no change
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"

        -- ISO 8601 with milliseconds (yyyy-MM-ddTHH:mm:ss.fffZ) -> Replace T with space, remove Z and everything after .fff
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)

        -- Without milliseconds (yyyy-MM-dd HH:mm:ss or yyyy-MM-ddTHH:mm:ssZ) -> Add .000
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'

        -- Fallback: if none match, keep as-is (edge case)
        ELSE "CreatedAt"
    END;

UPDATE "Aliases" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- BirthDate: Always set time to 00:00:00 (no milliseconds for birth dates)
UPDATE "Aliases" SET "BirthDate" =
    CASE
        -- If empty or already '0001-01-01 00:00:00', keep as-is
        WHEN "BirthDate" = '' OR "BirthDate" = '0001-01-01 00:00:00'
            THEN "BirthDate"

        -- If already in correct format (yyyy-MM-dd 00:00:00), keep as-is
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] 00:00:00'
            THEN "BirthDate"

        -- Extract date part and set time to 00:00:00
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*'
            THEN substr("BirthDate", 1, 10) || ' 00:00:00'

        -- Fallback
        ELSE "BirthDate"
    END;

-- Update Services table (CreatedAt, UpdatedAt)
UPDATE "Services" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Services" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update EncryptionKeys table (CreatedAt, UpdatedAt)
UPDATE "EncryptionKeys" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "EncryptionKeys" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Settings table (CreatedAt, UpdatedAt)
UPDATE "Settings" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Settings" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Credentials table (CreatedAt, UpdatedAt)
UPDATE "Credentials" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Credentials" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Attachments table (CreatedAt, UpdatedAt)
UPDATE "Attachments" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Attachments" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Passwords table (CreatedAt, UpdatedAt)
UPDATE "Passwords" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Passwords" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update TotpCodes table (CreatedAt, UpdatedAt)
UPDATE "TotpCodes" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "TotpCodes" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- =====================================================================================
-- End of Date Format Normalization Migration
-- =====================================================================================

-- Recreate indexes
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");
CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");
CREATE INDEX "IX_Passwords_CredentialId" ON "Passwords" ("CredentialId");
CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

-- Clean up temp tables
DROP TABLE "__EFMigrationsHistory_temp";
DROP TABLE "Aliases_temp";
DROP TABLE "Services_temp";
DROP TABLE "EncryptionKeys_temp";
DROP TABLE "Settings_temp";
DROP TABLE "Credentials_temp";
DROP TABLE "Attachments_temp";
DROP TABLE "Passwords_temp";
DROP TABLE "TotpCodes_temp";

PRAGMA foreign_keys = ON;


CREATE TABLE "Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UserHandle" BLOB NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "DisplayName" TEXT NOT NULL,
    "AdditionalData" BLOB NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Passkeys_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_Passkeys_CredentialId" ON "Passkeys" ("CredentialId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251014122838_1.6.0-AddPasskeys', '9.0.4');

COMMIT;

PRAGMA foreign_keys = OFF;

BEGIN TRANSACTION;
ALTER TABLE "TotpCodes" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_TotpCodes_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

ALTER TABLE "Passkeys" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Passkeys_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

ALTER TABLE "Attachments" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Attachments_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE TABLE "FieldDefinitions" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldDefinitions" PRIMARY KEY,
    "FieldType" TEXT NOT NULL,
    "Label" TEXT NOT NULL,
    "IsMultiValue" INTEGER NOT NULL,
    "IsHidden" INTEGER NOT NULL,
    "EnableHistory" INTEGER NOT NULL,
    "Weight" INTEGER NOT NULL,
    "ApplicableToTypes" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Folders" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Folders" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "ParentFolderId" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Folders_Folders_ParentFolderId" FOREIGN KEY ("ParentFolderId") REFERENCES "Folders" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Logos" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Logos" PRIMARY KEY,
    "Source" TEXT NOT NULL,
    "FileData" BLOB NULL,
    "MimeType" TEXT NULL,
    "FetchedAt" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Tags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Tags" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "Color" TEXT NULL,
    "DisplayOrder" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Items" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Items" PRIMARY KEY,
    "Name" TEXT NULL,
    "ItemType" TEXT NOT NULL,
    "LogoId" TEXT NULL,
    "DeletedAt" TEXT NULL,
    "FolderId" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Items_Folders_FolderId" FOREIGN KEY ("FolderId") REFERENCES "Folders" ("Id") ON DELETE SET NULL,
    CONSTRAINT "FK_Items_Logos_LogoId" FOREIGN KEY ("LogoId") REFERENCES "Logos" ("Id") ON DELETE SET NULL
);

CREATE TABLE "FieldHistories" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldHistories" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "ValueSnapshot" TEXT NOT NULL,
    "ChangedAt" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldHistories_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldHistories_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "FieldValues" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldValues" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "Value" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldValues_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldValues_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "ItemTags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_ItemTags" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "TagId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_ItemTags_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_ItemTags_Tags_TagId" FOREIGN KEY ("TagId") REFERENCES "Tags" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_FieldHistories_FieldDefinitionId" ON "FieldHistories" ("FieldDefinitionId");

CREATE INDEX "IX_FieldHistories_ItemId" ON "FieldHistories" ("ItemId");

CREATE INDEX "IX_FieldValues_FieldDefinitionId" ON "FieldValues" ("FieldDefinitionId");

CREATE INDEX "IX_FieldValues_FieldKey" ON "FieldValues" ("FieldKey");

CREATE INDEX "IX_FieldValues_ItemId" ON "FieldValues" ("ItemId");

CREATE INDEX "IX_FieldValues_ItemId_FieldDefinitionId_Weight" ON "FieldValues" ("ItemId", "FieldDefinitionId", "Weight");

CREATE INDEX "IX_FieldValues_ItemId_FieldKey" ON "FieldValues" ("ItemId", "FieldKey");

CREATE INDEX "IX_Folders_ParentFolderId" ON "Folders" ("ParentFolderId");

CREATE INDEX "IX_Items_FolderId" ON "Items" ("FolderId");

CREATE INDEX "IX_Items_LogoId" ON "Items" ("LogoId");

CREATE INDEX "IX_ItemTags_ItemId" ON "ItemTags" ("ItemId");

CREATE UNIQUE INDEX "IX_ItemTags_ItemId_TagId" ON "ItemTags" ("ItemId", "TagId");

CREATE INDEX "IX_ItemTags_TagId" ON "ItemTags" ("TagId");

CREATE UNIQUE INDEX "IX_Logos_Source" ON "Logos" ("Source");

CREATE INDEX "IX_Tags_Name" ON "Tags" ("Name");


                INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  c.Id,
                  s.Name AS Name,
                  CASE
                    WHEN a.Id IS NOT NULL AND (
                      (a.FirstName IS NOT NULL AND a.FirstName != '') OR
                      (a.LastName IS NOT NULL AND a.LastName != '') OR
                      (a.Gender IS NOT NULL AND a.Gender != '') OR
                      (a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%')
                    ) THEN 'Alias'
                    ELSE 'Login'
                  END AS ItemType,
                  NULL AS LogoId,
                  NULL AS FolderId,
                  c.CreatedAt,
                  c.UpdatedAt,
                  c.IsDeleted
                FROM Credentials c
                LEFT JOIN Services s ON s.Id = c.ServiceId
                LEFT JOIN Aliases a ON a.Id = c.AliasId;
            


                INSERT INTO Logos (Id, Source, FileData, MimeType, FetchedAt, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  -- Extract and normalize hostname: remove protocol, path, lowercase, and www. prefix
                  REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) AS Source,
                  s.Logo AS FileData,
                  'image/png' AS MimeType,
                  NULL AS FetchedAt,
                  MIN(s.CreatedAt) AS CreatedAt,
                  MAX(s.UpdatedAt) AS UpdatedAt,
                  0 AS IsDeleted
                FROM Services s
                WHERE s.Logo IS NOT NULL AND s.Url IS NOT NULL AND s.Url != ''
                GROUP BY REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  );
            


                UPDATE Items
                SET LogoId = (
                  SELECT l.Id FROM Logos l
                  INNER JOIN Services s ON REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) = l.Source
                  INNER JOIN Credentials c ON c.ServiceId = s.Id
                  WHERE c.Id = Items.Id
                  LIMIT 1
                )
                WHERE EXISTS (
                  SELECT 1 FROM Credentials c
                  INNER JOIN Services s ON s.Id = c.ServiceId
                  WHERE c.Id = Items.Id AND s.Logo IS NOT NULL
                );
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.url' AS FieldKey,
                  s.Url AS Value,
                  0 AS Weight,
                  s.UpdatedAt AS CreatedAt,
                  s.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Services s ON s.Id = c.ServiceId
                WHERE s.Url IS NOT NULL AND s.Url != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.username' AS FieldKey,
                  c.Username AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Username IS NOT NULL AND c.Username != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'notes.content' AS FieldKey,
                  c.Notes AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Notes IS NOT NULL AND c.Notes != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  p.CredentialId AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.password' AS FieldKey,
                  p.Value AS Value,
                  0 AS Weight,
                  p.UpdatedAt AS CreatedAt,
                  p.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Passwords p
                INNER JOIN (
                  SELECT CredentialId, MAX(UpdatedAt) AS MaxUpdated, MAX(Id) AS MaxId
                  FROM Passwords
                  WHERE IsDeleted = 0
                  GROUP BY CredentialId
                ) pm ON p.CredentialId = pm.CredentialId AND p.UpdatedAt = pm.MaxUpdated AND p.Id = pm.MaxId
                WHERE p.IsDeleted = 0;
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.email' AS FieldKey,
                  a.Email AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Email IS NOT NULL AND a.Email != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.first_name' AS FieldKey,
                  a.FirstName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.FirstName IS NOT NULL AND a.FirstName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.last_name' AS FieldKey,
                  a.LastName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.LastName IS NOT NULL AND a.LastName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.gender' AS FieldKey,
                  a.Gender AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Gender IS NOT NULL AND a.Gender != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.birthdate' AS FieldKey,
                  SUBSTR(a.BirthDate, 1, 10) AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%';
            

DROP TABLE "Passwords";

DROP TABLE "Credentials";

DROP TABLE "Aliases";

DROP TABLE "Services";

COMMIT;

PRAGMA foreign_keys = ON;

BEGIN TRANSACTION;
CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Attachments" ("Id", "Blob", "CreatedAt", "Filename", "IsDeleted", "ItemId", "UpdatedAt")
SELECT "Id", "Blob", "CreatedAt", "Filename", "IsDeleted", "ItemId", "UpdatedAt"
FROM "Attachments";

CREATE TABLE "ef_temp_Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "AdditionalData" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "DisplayName" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "PrivateKey" TEXT NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "UserHandle" BLOB NOT NULL,
    CONSTRAINT "FK_Passkeys_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Passkeys" ("Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle")
SELECT "Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle"
FROM "Passkeys";

CREATE TABLE "ef_temp_TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "CreatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_TotpCodes_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_TotpCodes" ("Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt")
SELECT "Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt"
FROM "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

DROP TABLE "Passkeys";

ALTER TABLE "ef_temp_Passkeys" RENAME TO "Passkeys";

DROP TABLE "TotpCodes";

ALTER TABLE "ef_temp_TotpCodes" RENAME TO "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE INDEX "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

CREATE INDEX "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251213111207_1.7.0-FieldBasedDataModelUpdate', '9.0.4');

BEGIN TRANSACTION;
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20260130221620_2.0.0-MajorVersionBump', '9.0.4');

COMMIT;
`,Sy={1:`\uFEFFBEGIN TRANSACTION;
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240708224522_1.0.1-EmptyTestMigration', '9.0.4');

COMMIT;`,2:`\uFEFFBEGIN TRANSACTION;
ALTER TABLE "Aliases" RENAME COLUMN "EmailPrefix" TO "Email";

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240711204207_1.0.2-ChangeEmailColumn', '9.0.4');

COMMIT;`,3:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "EncryptionKeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_EncryptionKeys" PRIMARY KEY,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "IsPrimary" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240729105618_1.1.0-AddPkiTables', '9.0.4');

COMMIT;`,4:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "Settings" (
    "Key" TEXT NOT NULL CONSTRAINT "PK_Settings" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805073413_1.2.0-AddSettingsTable', '9.0.4');

COMMIT;`,5:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "ef_temp_Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "BirthDate" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Email" TEXT NULL,
    "FirstName" VARCHAR NULL,
    "Gender" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "UpdatedAt" TEXT NOT NULL
);

INSERT INTO "ef_temp_Aliases" ("Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt")
SELECT "Id", "BirthDate", "CreatedAt", "Email", "FirstName", "Gender", "LastName", "NickName", "UpdatedAt"
FROM "Aliases";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Aliases";

ALTER TABLE "ef_temp_Aliases" RENAME TO "Aliases";

COMMIT;

PRAGMA foreign_keys = 1;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240805122422_1.3.0-UpdateIdentityStructure', '9.0.4');`,6:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "ef_temp_Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "ServiceId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "Username" TEXT NULL,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Credentials" ("Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username")
SELECT "Id", "AliasId", "CreatedAt", "Notes", "ServiceId", "UpdatedAt", "Username"
FROM "Credentials";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Credentials";

ALTER TABLE "ef_temp_Credentials" RENAME TO "Credentials";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");

CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240812141727_1.3.1-MakeUsernameOptional', '9.0.4');`,7:`\uFEFFBEGIN TRANSACTION;
ALTER TABLE "Settings" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Services" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Passwords" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "EncryptionKeys" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Credentials" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Attachment" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

ALTER TABLE "Aliases" ADD "IsDeleted" INTEGER NOT NULL DEFAULT 0;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240916105320_1.4.0-AddSyncSupport', '9.0.4');

COMMIT;`,8:`\uFEFFBEGIN TRANSACTION;
ALTER TABLE "Attachment" RENAME TO "Attachments";

CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Attachments" ("Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt")
SELECT "Id", "Blob", "CreatedAt", "CredentialId", "Filename", "IsDeleted", "UpdatedAt"
FROM "Attachments";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20240917191243_1.4.1-RenameAttachmentsPlural', '9.0.4');`,9:`\uFEFFBEGIN TRANSACTION;
CREATE TABLE "TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20250310131554_1.5.0-AddTotpCodes', '9.0.4');

COMMIT;`,10:`\uFEFFBEGIN TRANSACTION;

PRAGMA foreign_keys = OFF;

-- Clean up any existing temp tables first
DROP TABLE IF EXISTS "__EFMigrationsHistory_temp";
DROP TABLE IF EXISTS "Aliases_temp";
DROP TABLE IF EXISTS "Services_temp";
DROP TABLE IF EXISTS "EncryptionKeys_temp";
DROP TABLE IF EXISTS "Settings_temp";
DROP TABLE IF EXISTS "Credentials_temp";
DROP TABLE IF EXISTS "Attachments_temp";
DROP TABLE IF EXISTS "Passwords_temp";
DROP TABLE IF EXISTS "TotpCodes_temp";

-- Create backup tables for all data
CREATE TABLE "__EFMigrationsHistory_temp" AS SELECT * FROM "__EFMigrationsHistory";
CREATE TABLE "Aliases_temp" AS SELECT * FROM "Aliases";
CREATE TABLE "Services_temp" AS SELECT * FROM "Services";
CREATE TABLE "EncryptionKeys_temp" AS SELECT * FROM "EncryptionKeys";
CREATE TABLE "Settings_temp" AS SELECT * FROM "Settings";
CREATE TABLE "Credentials_temp" AS SELECT * FROM "Credentials";
CREATE TABLE "Attachments_temp" AS SELECT * FROM "Attachments";
CREATE TABLE "Passwords_temp" AS SELECT * FROM "Passwords";
CREATE TABLE "TotpCodes_temp" AS SELECT * FROM "TotpCodes";

-- Delete orphaned records that do not have a valid FK to the credential object
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Delete orphaned credentials that do not have valid FKs to alias or service objects
DELETE FROM "Credentials_temp" WHERE "AliasId" NOT IN (SELECT "Id" FROM "Aliases_temp");
DELETE FROM "Credentials_temp" WHERE "ServiceId" NOT IN (SELECT "Id" FROM "Services_temp");

-- After cleaning credentials, clean dependent tables again in case we removed credentials
DELETE FROM "Attachments_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "Passwords_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");
DELETE FROM "TotpCodes_temp" WHERE "CredentialId" NOT IN (SELECT "Id" FROM "Credentials_temp");

-- Drop all existing tables
DROP TABLE "TotpCodes";
DROP TABLE "Passwords";
DROP TABLE "Attachments";
DROP TABLE "Credentials";
DROP TABLE "Settings";
DROP TABLE "EncryptionKeys";
DROP TABLE "Services";
DROP TABLE "Aliases";
DROP TABLE "__EFMigrationsHistory";

-- Recreate tables with proper constraints (no dependencies first)
CREATE TABLE "__EFMigrationsHistory" (
    "MigrationId" TEXT NOT NULL CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY,
    "ProductVersion" TEXT NOT NULL
);

CREATE TABLE "Aliases" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Aliases" PRIMARY KEY,
    "BirthDate" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Email" TEXT NULL,
    "FirstName" VARCHAR NULL,
    "Gender" VARCHAR NULL,
    "LastName" VARCHAR NULL,
    "NickName" VARCHAR NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

CREATE TABLE "Services" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Services" PRIMARY KEY,
    "Name" TEXT NULL,
    "Url" TEXT NULL,
    "Logo" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

CREATE TABLE "EncryptionKeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_EncryptionKeys" PRIMARY KEY,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "IsPrimary" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

CREATE TABLE "Settings" (
    "Key" TEXT NOT NULL CONSTRAINT "PK_Settings" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0
);

-- Tables with foreign keys
CREATE TABLE "Credentials" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Credentials" PRIMARY KEY,
    "AliasId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Notes" TEXT NULL,
    "ServiceId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "Username" TEXT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_Credentials_Aliases_AliasId" FOREIGN KEY ("AliasId") REFERENCES "Aliases" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_Credentials_Services_ServiceId" FOREIGN KEY ("ServiceId") REFERENCES "Services" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Passwords" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passwords" PRIMARY KEY,
    "Value" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_Passwords_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE TABLE "TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL DEFAULT 0,
    CONSTRAINT "FK_TotpCodes_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);


-- Restore data from temp tables
INSERT INTO "__EFMigrationsHistory" SELECT * FROM "__EFMigrationsHistory_temp";
INSERT INTO "Aliases" SELECT * FROM "Aliases_temp";
INSERT INTO "Services" SELECT * FROM "Services_temp";
INSERT INTO "EncryptionKeys" SELECT * FROM "EncryptionKeys_temp";
INSERT INTO "Settings" SELECT * FROM "Settings_temp";
INSERT INTO "Credentials" SELECT * FROM "Credentials_temp";
INSERT INTO "Attachments" SELECT * FROM "Attachments_temp";
INSERT INTO "Passwords" SELECT * FROM "Passwords_temp";
INSERT INTO "TotpCodes" SELECT * FROM "TotpCodes_temp";

-- =====================================================================================
-- Date Format Normalization Migration
-- =====================================================================================
-- This migration normalizes ALL date fields to the standard format: 'yyyy-MM-dd HH:mm:ss.fff'
-- Previously the different clients used different date formats which complicate date parsing.
-- From version 0.24.0 onwards, all new dates are stored in this standard format.

-- Update Aliases table (CreatedAt, UpdatedAt, BirthDate)
UPDATE "Aliases" SET "CreatedAt" =
    CASE
        -- Already in correct format (yyyy-MM-dd HH:mm:ss.fff) - no change
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"

        -- ISO 8601 with milliseconds (yyyy-MM-ddTHH:mm:ss.fffZ) -> Replace T with space, remove Z and everything after .fff
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)

        -- Without milliseconds (yyyy-MM-dd HH:mm:ss or yyyy-MM-ddTHH:mm:ssZ) -> Add .000
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'

        -- Fallback: if none match, keep as-is (edge case)
        ELSE "CreatedAt"
    END;

UPDATE "Aliases" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- BirthDate: Always set time to 00:00:00 (no milliseconds for birth dates)
UPDATE "Aliases" SET "BirthDate" =
    CASE
        -- If empty or already '0001-01-01 00:00:00', keep as-is
        WHEN "BirthDate" = '' OR "BirthDate" = '0001-01-01 00:00:00'
            THEN "BirthDate"

        -- If already in correct format (yyyy-MM-dd 00:00:00), keep as-is
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] 00:00:00'
            THEN "BirthDate"

        -- Extract date part and set time to 00:00:00
        WHEN "BirthDate" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*'
            THEN substr("BirthDate", 1, 10) || ' 00:00:00'

        -- Fallback
        ELSE "BirthDate"
    END;

-- Update Services table (CreatedAt, UpdatedAt)
UPDATE "Services" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Services" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update EncryptionKeys table (CreatedAt, UpdatedAt)
UPDATE "EncryptionKeys" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "EncryptionKeys" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Settings table (CreatedAt, UpdatedAt)
UPDATE "Settings" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Settings" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Credentials table (CreatedAt, UpdatedAt)
UPDATE "Credentials" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Credentials" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Attachments table (CreatedAt, UpdatedAt)
UPDATE "Attachments" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Attachments" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update Passwords table (CreatedAt, UpdatedAt)
UPDATE "Passwords" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "Passwords" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- Update TotpCodes table (CreatedAt, UpdatedAt)
UPDATE "TotpCodes" SET "CreatedAt" =
    CASE
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "CreatedAt"
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr("CreatedAt", 12, 12)
        WHEN "CreatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("CreatedAt", 1, 10) || ' ' || substr(replace("CreatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "CreatedAt"
    END;

UPDATE "TotpCodes" SET "UpdatedAt" =
    CASE
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]'
            THEN "UpdatedAt"
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr("UpdatedAt", 12, 12)
        WHEN "UpdatedAt" GLOB '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][T ][0-9][0-9]:[0-9][0-9]:[0-9][0-9]*'
            THEN substr("UpdatedAt", 1, 10) || ' ' || substr(replace("UpdatedAt", 'T', ' '), 12, 8) || '.000'
        ELSE "UpdatedAt"
    END;

-- =====================================================================================
-- End of Date Format Normalization Migration
-- =====================================================================================

-- Recreate indexes
CREATE INDEX "IX_Credentials_AliasId" ON "Credentials" ("AliasId");
CREATE INDEX "IX_Credentials_ServiceId" ON "Credentials" ("ServiceId");
CREATE INDEX "IX_Attachments_CredentialId" ON "Attachments" ("CredentialId");
CREATE INDEX "IX_Passwords_CredentialId" ON "Passwords" ("CredentialId");
CREATE INDEX "IX_TotpCodes_CredentialId" ON "TotpCodes" ("CredentialId");

-- Clean up temp tables
DROP TABLE "__EFMigrationsHistory_temp";
DROP TABLE "Aliases_temp";
DROP TABLE "Services_temp";
DROP TABLE "EncryptionKeys_temp";
DROP TABLE "Settings_temp";
DROP TABLE "Credentials_temp";
DROP TABLE "Attachments_temp";
DROP TABLE "Passwords_temp";
DROP TABLE "TotpCodes_temp";

PRAGMA foreign_keys = ON;


CREATE TABLE "Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UserHandle" BLOB NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "PrivateKey" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "DisplayName" TEXT NOT NULL,
    "AdditionalData" BLOB NULL,
    "CredentialId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Passkeys_Credentials_CredentialId" FOREIGN KEY ("CredentialId") REFERENCES "Credentials" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_Passkeys_CredentialId" ON "Passkeys" ("CredentialId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251014122838_1.6.0-AddPasskeys', '9.0.4');

COMMIT;`,11:`\uFEFFPRAGMA foreign_keys = OFF;

BEGIN TRANSACTION;
ALTER TABLE "TotpCodes" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_TotpCodes_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

ALTER TABLE "Passkeys" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Passkeys_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

ALTER TABLE "Attachments" RENAME COLUMN "CredentialId" TO "ItemId";

DROP INDEX IF EXISTS "IX_Attachments_CredentialId";

CREATE INDEX IF NOT EXISTS "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE TABLE "FieldDefinitions" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldDefinitions" PRIMARY KEY,
    "FieldType" TEXT NOT NULL,
    "Label" TEXT NOT NULL,
    "IsMultiValue" INTEGER NOT NULL,
    "IsHidden" INTEGER NOT NULL,
    "EnableHistory" INTEGER NOT NULL,
    "Weight" INTEGER NOT NULL,
    "ApplicableToTypes" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Folders" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Folders" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "ParentFolderId" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Folders_Folders_ParentFolderId" FOREIGN KEY ("ParentFolderId") REFERENCES "Folders" ("Id") ON DELETE CASCADE
);

CREATE TABLE "Logos" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Logos" PRIMARY KEY,
    "Source" TEXT NOT NULL,
    "FileData" BLOB NULL,
    "MimeType" TEXT NULL,
    "FetchedAt" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Tags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Tags" PRIMARY KEY,
    "Name" TEXT NOT NULL,
    "Color" TEXT NULL,
    "DisplayOrder" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL
);

CREATE TABLE "Items" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Items" PRIMARY KEY,
    "Name" TEXT NULL,
    "ItemType" TEXT NOT NULL,
    "LogoId" TEXT NULL,
    "DeletedAt" TEXT NULL,
    "FolderId" TEXT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_Items_Folders_FolderId" FOREIGN KEY ("FolderId") REFERENCES "Folders" ("Id") ON DELETE SET NULL,
    CONSTRAINT "FK_Items_Logos_LogoId" FOREIGN KEY ("LogoId") REFERENCES "Logos" ("Id") ON DELETE SET NULL
);

CREATE TABLE "FieldHistories" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldHistories" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "ValueSnapshot" TEXT NOT NULL,
    "ChangedAt" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldHistories_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldHistories_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "FieldValues" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_FieldValues" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "FieldDefinitionId" TEXT NULL,
    "FieldKey" TEXT NULL,
    "Value" TEXT NULL,
    "Weight" INTEGER NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_FieldValues_FieldDefinitions_FieldDefinitionId" FOREIGN KEY ("FieldDefinitionId") REFERENCES "FieldDefinitions" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_FieldValues_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

CREATE TABLE "ItemTags" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_ItemTags" PRIMARY KEY,
    "ItemId" TEXT NOT NULL,
    "TagId" TEXT NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    CONSTRAINT "FK_ItemTags_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE,
    CONSTRAINT "FK_ItemTags_Tags_TagId" FOREIGN KEY ("TagId") REFERENCES "Tags" ("Id") ON DELETE CASCADE
);

CREATE INDEX "IX_FieldHistories_FieldDefinitionId" ON "FieldHistories" ("FieldDefinitionId");

CREATE INDEX "IX_FieldHistories_ItemId" ON "FieldHistories" ("ItemId");

CREATE INDEX "IX_FieldValues_FieldDefinitionId" ON "FieldValues" ("FieldDefinitionId");

CREATE INDEX "IX_FieldValues_FieldKey" ON "FieldValues" ("FieldKey");

CREATE INDEX "IX_FieldValues_ItemId" ON "FieldValues" ("ItemId");

CREATE INDEX "IX_FieldValues_ItemId_FieldDefinitionId_Weight" ON "FieldValues" ("ItemId", "FieldDefinitionId", "Weight");

CREATE INDEX "IX_FieldValues_ItemId_FieldKey" ON "FieldValues" ("ItemId", "FieldKey");

CREATE INDEX "IX_Folders_ParentFolderId" ON "Folders" ("ParentFolderId");

CREATE INDEX "IX_Items_FolderId" ON "Items" ("FolderId");

CREATE INDEX "IX_Items_LogoId" ON "Items" ("LogoId");

CREATE INDEX "IX_ItemTags_ItemId" ON "ItemTags" ("ItemId");

CREATE UNIQUE INDEX "IX_ItemTags_ItemId_TagId" ON "ItemTags" ("ItemId", "TagId");

CREATE INDEX "IX_ItemTags_TagId" ON "ItemTags" ("TagId");

CREATE UNIQUE INDEX "IX_Logos_Source" ON "Logos" ("Source");

CREATE INDEX "IX_Tags_Name" ON "Tags" ("Name");


                INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  c.Id,
                  s.Name AS Name,
                  CASE
                    WHEN a.Id IS NOT NULL AND (
                      (a.FirstName IS NOT NULL AND a.FirstName != '') OR
                      (a.LastName IS NOT NULL AND a.LastName != '') OR
                      (a.Gender IS NOT NULL AND a.Gender != '') OR
                      (a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%')
                    ) THEN 'Alias'
                    ELSE 'Login'
                  END AS ItemType,
                  NULL AS LogoId,
                  NULL AS FolderId,
                  c.CreatedAt,
                  c.UpdatedAt,
                  c.IsDeleted
                FROM Credentials c
                LEFT JOIN Services s ON s.Id = c.ServiceId
                LEFT JOIN Aliases a ON a.Id = c.AliasId;
            


                INSERT INTO Logos (Id, Source, FileData, MimeType, FetchedAt, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  -- Extract and normalize hostname: remove protocol, path, lowercase, and www. prefix
                  REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) AS Source,
                  s.Logo AS FileData,
                  'image/png' AS MimeType,
                  NULL AS FetchedAt,
                  MIN(s.CreatedAt) AS CreatedAt,
                  MAX(s.UpdatedAt) AS UpdatedAt,
                  0 AS IsDeleted
                FROM Services s
                WHERE s.Logo IS NOT NULL AND s.Url IS NOT NULL AND s.Url != ''
                GROUP BY REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  );
            


                UPDATE Items
                SET LogoId = (
                  SELECT l.Id FROM Logos l
                  INNER JOIN Services s ON REPLACE(
                    LOWER(
                      SUBSTR(
                        CASE
                          WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                          WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                          ELSE s.Url
                        END,
                        1,
                        CASE
                          WHEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') > 0
                          THEN INSTR(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END, '/') - 1
                          ELSE LENGTH(
                            CASE
                              WHEN s.Url LIKE 'https://%' THEN SUBSTR(s.Url, 9)
                              WHEN s.Url LIKE 'http://%' THEN SUBSTR(s.Url, 8)
                              ELSE s.Url
                            END)
                        END
                      )
                    ),
                    'www.', ''
                  ) = l.Source
                  INNER JOIN Credentials c ON c.ServiceId = s.Id
                  WHERE c.Id = Items.Id
                  LIMIT 1
                )
                WHERE EXISTS (
                  SELECT 1 FROM Credentials c
                  INNER JOIN Services s ON s.Id = c.ServiceId
                  WHERE c.Id = Items.Id AND s.Logo IS NOT NULL
                );
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.url' AS FieldKey,
                  s.Url AS Value,
                  0 AS Weight,
                  s.UpdatedAt AS CreatedAt,
                  s.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Services s ON s.Id = c.ServiceId
                WHERE s.Url IS NOT NULL AND s.Url != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.username' AS FieldKey,
                  c.Username AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Username IS NOT NULL AND c.Username != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'notes.content' AS FieldKey,
                  c.Notes AS Value,
                  0 AS Weight,
                  c.UpdatedAt AS CreatedAt,
                  c.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                WHERE c.Notes IS NOT NULL AND c.Notes != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  p.CredentialId AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.password' AS FieldKey,
                  p.Value AS Value,
                  0 AS Weight,
                  p.UpdatedAt AS CreatedAt,
                  p.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Passwords p
                INNER JOIN (
                  SELECT CredentialId, MAX(UpdatedAt) AS MaxUpdated, MAX(Id) AS MaxId
                  FROM Passwords
                  WHERE IsDeleted = 0
                  GROUP BY CredentialId
                ) pm ON p.CredentialId = pm.CredentialId AND p.UpdatedAt = pm.MaxUpdated AND p.Id = pm.MaxId
                WHERE p.IsDeleted = 0;
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'login.email' AS FieldKey,
                  a.Email AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Email IS NOT NULL AND a.Email != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.first_name' AS FieldKey,
                  a.FirstName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.FirstName IS NOT NULL AND a.FirstName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.last_name' AS FieldKey,
                  a.LastName AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.LastName IS NOT NULL AND a.LastName != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.gender' AS FieldKey,
                  a.Gender AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.Gender IS NOT NULL AND a.Gender != '';
            


                INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
                SELECT
                  UPPER(SUBSTR(hex(randomblob(4)), 1, 8) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(2)), 1, 4) || '-' ||
                        SUBSTR(hex(randomblob(6)), 1, 12)) AS Id,
                  c.Id AS ItemId,
                  NULL AS FieldDefinitionId,
                  'alias.birthdate' AS FieldKey,
                  SUBSTR(a.BirthDate, 1, 10) AS Value,
                  0 AS Weight,
                  a.UpdatedAt AS CreatedAt,
                  a.UpdatedAt AS UpdatedAt,
                  0 AS IsDeleted
                FROM Credentials c
                INNER JOIN Aliases a ON a.Id = c.AliasId
                WHERE a.BirthDate IS NOT NULL AND a.BirthDate != '' AND a.BirthDate NOT LIKE '0001-%';
            

DROP TABLE "Passwords";

DROP TABLE "Credentials";

DROP TABLE "Aliases";

DROP TABLE "Services";

COMMIT;

PRAGMA foreign_keys = ON;

BEGIN TRANSACTION;
CREATE TABLE "ef_temp_Attachments" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Attachments" PRIMARY KEY,
    "Blob" BLOB NOT NULL,
    "CreatedAt" TEXT NOT NULL,
    "Filename" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_Attachments_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Attachments" ("Id", "Blob", "CreatedAt", "Filename", "IsDeleted", "ItemId", "UpdatedAt")
SELECT "Id", "Blob", "CreatedAt", "Filename", "IsDeleted", "ItemId", "UpdatedAt"
FROM "Attachments";

CREATE TABLE "ef_temp_Passkeys" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_Passkeys" PRIMARY KEY,
    "AdditionalData" BLOB NULL,
    "CreatedAt" TEXT NOT NULL,
    "DisplayName" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "PrfKey" BLOB NULL,
    "PrivateKey" TEXT NOT NULL,
    "PublicKey" TEXT NOT NULL,
    "RpId" TEXT COLLATE NOCASE NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    "UserHandle" BLOB NOT NULL,
    CONSTRAINT "FK_Passkeys_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_Passkeys" ("Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle")
SELECT "Id", "AdditionalData", "CreatedAt", "DisplayName", "IsDeleted", "ItemId", "PrfKey", "PrivateKey", "PublicKey", "RpId", "UpdatedAt", "UserHandle"
FROM "Passkeys";

CREATE TABLE "ef_temp_TotpCodes" (
    "Id" TEXT NOT NULL CONSTRAINT "PK_TotpCodes" PRIMARY KEY,
    "CreatedAt" TEXT NOT NULL,
    "IsDeleted" INTEGER NOT NULL,
    "ItemId" TEXT NOT NULL,
    "Name" TEXT NOT NULL,
    "SecretKey" TEXT NOT NULL,
    "UpdatedAt" TEXT NOT NULL,
    CONSTRAINT "FK_TotpCodes_Items_ItemId" FOREIGN KEY ("ItemId") REFERENCES "Items" ("Id") ON DELETE CASCADE
);

INSERT INTO "ef_temp_TotpCodes" ("Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt")
SELECT "Id", "CreatedAt", "IsDeleted", "ItemId", "Name", "SecretKey", "UpdatedAt"
FROM "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 0;

BEGIN TRANSACTION;
DROP TABLE "Attachments";

ALTER TABLE "ef_temp_Attachments" RENAME TO "Attachments";

DROP TABLE "Passkeys";

ALTER TABLE "ef_temp_Passkeys" RENAME TO "Passkeys";

DROP TABLE "TotpCodes";

ALTER TABLE "ef_temp_TotpCodes" RENAME TO "TotpCodes";

COMMIT;

PRAGMA foreign_keys = 1;

BEGIN TRANSACTION;
CREATE INDEX "IX_Attachments_ItemId" ON "Attachments" ("ItemId");

CREATE INDEX "IX_Passkeys_ItemId" ON "Passkeys" ("ItemId");

CREATE INDEX "IX_Passkeys_RpId" ON "Passkeys" ("RpId");

CREATE INDEX "IX_TotpCodes_ItemId" ON "TotpCodes" ("ItemId");

COMMIT;

INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20251213111207_1.7.0-FieldBasedDataModelUpdate', '9.0.4');`,12:`\uFEFFBEGIN TRANSACTION;
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20260130221620_2.0.0-MajorVersionBump', '9.0.4');

COMMIT;`},_a=[{revision:1,version:"1.0.0",description:"Initial Migration",releaseVersion:"0.1.0",compatibleUpToVersion:"0.0.0"},{revision:2,version:"1.0.1",description:"Empty Test Migration",releaseVersion:"0.2.0",compatibleUpToVersion:"0.1.0"},{revision:3,version:"1.0.2",description:"Change Email Column",releaseVersion:"0.3.0",compatibleUpToVersion:"0.2.0"},{revision:4,version:"1.1.0",description:"Add Pki Tables",releaseVersion:"0.4.0",compatibleUpToVersion:"0.3.0"},{revision:5,version:"1.2.0",description:"Add Settings Table",releaseVersion:"0.4.0",compatibleUpToVersion:"0.3.0"},{revision:6,version:"1.3.0",description:"Update Identity Structure",releaseVersion:"0.5.0",compatibleUpToVersion:"0.4.0"},{revision:7,version:"1.3.1",description:"Make Username Optional",releaseVersion:"0.5.0",compatibleUpToVersion:"0.4.0"},{revision:8,version:"1.4.0",description:"Add Sync Support",releaseVersion:"0.6.0",compatibleUpToVersion:"0.5.0"},{revision:9,version:"1.4.1",description:"Rename Attachments Plural",releaseVersion:"0.6.0",compatibleUpToVersion:"0.13.0"},{revision:10,version:"1.5.0",description:"Add 2FA Tokens to credentials",releaseVersion:"0.14.0",compatibleUpToVersion:"0.23.0"},{revision:11,version:"1.6.0",description:"Add Passkey support",releaseVersion:"0.24.0",compatibleUpToVersion:"0.25.0"},{revision:12,version:"1.7.0",description:"Update to Field-Based Data Model",releaseVersion:"0.26.0",compatibleUpToVersion:"0.25.0"},{revision:13,version:"2.0.0",description:"Update to Field-Based Data Model",releaseVersion:"0.26.1",compatibleUpToVersion:"0.25.0"}],Yf=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[Ty],version:_a[_a.length-1].version,migrationNumber:_a[_a.length-1].revision}}catch(r){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:r instanceof Error?r.message:"Unknown error creating vault SQL"}}}getUpgradeVaultSql(r,e){try{const a=e??_a[_a.length-1].revision,i=_a.find(d=>d.revision===a);if(!i)return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target migration number ${a} not found`};if(r>=a)return{success:!0,sqlCommands:[],version:i.version,migrationNumber:a};const s=_a.filter(d=>d.revision>r&&d.revision<=a),c=[];for(const d of s){const m=d.revision-1,f=Sy[m];f&&c.push(f)}return{success:!0,sqlCommands:c,version:i.version,migrationNumber:a}}catch(a){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:a instanceof Error?a.message:"Unknown error generating upgrade SQL"}}}getUpgradeToLatestSql(r){return this.getUpgradeVaultSql(r)}getUpgradeToVersionSql(r,e){const a=_a.find(i=>i.version===e);return a?this.getUpgradeVaultSql(r,a.revision):{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target version ${e} not found`}}getVersionCheckSql(){return["SELECT name FROM sqlite_master WHERE type='table' AND name='Settings';","SELECT Value FROM Settings WHERE Key = 'vault_version' AND IsDeleted = 0 LIMIT 1;","SELECT Value FROM Settings WHERE Key = 'vault_migration_number' AND IsDeleted = 0 LIMIT 1;"]}getVaultValidationSql(){return`SELECT name FROM sqlite_master WHERE type='table' AND name IN
            ('Aliases', 'Services', 'Credentials', 'Passwords', 'Attachments', 'EncryptionKeys', 'Settings', 'TotpCodes');`}parseVaultVersionInfo(r,e,a){let i="0.0.0",s=0;r&&(e?i=e:(i="1.0.0",s=1),a&&(s=parseInt(a,10)));const c=_a[_a.length-1],d=s<c.revision,m=_a.filter(f=>f.revision>s);return{currentVersion:i,currentMigrationNumber:s,targetVersion:c.version,targetMigrationNumber:c.revision,needsUpgrade:d,availableUpgrades:m}}validateVaultStructure(r){const e=["Aliases","Services","Credentials","Passwords","Attachments","EncryptionKeys","Settings","TotpCodes"];return r.filter(i=>e.includes(i)).length>=5}getAllVersions(){return[..._a]}getLatestVersion(){return _a[_a.length-1]}getMigrationSql(r){return Sy[r]}getCompleteSchemaSql(){return Ty}};function ky(r){const a=/^(\d+)\.(\d+)\.(\d+)$/.exec(r);return a?{major:parseInt(a[1],10),minor:parseInt(a[2],10),patch:parseInt(a[3],10)}:null}function Ix(r,e){const a=ky(r);if(!a)return{isCompatible:!1,databaseVersion:r,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const i=_a.find(g=>g.version===r);if(i)return{isCompatible:!0,databaseVersion:r,clientVersion:i,isKnownVersion:!0,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const s=e?_a.find(g=>g.version===e)??Ly():Ly(),c=ky(s.version);if(!c)return{isCompatible:!1,databaseVersion:r,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const d=a.major!==c.major,m=!d&&(a.minor!==c.minor||a.patch!==c.patch);return{isCompatible:!d,databaseVersion:r,clientVersion:s,isKnownVersion:!1,isMajorVersionDifference:d,isMinorVersionDifference:m}}function Ly(){return _a[_a.length-1]}function vx(r){const a=/_(\d+\.\d+\.\d+)-/.exec(r);return(a==null?void 0:a[1])??null}class vs extends Error{constructor(e){super(e),this.name="VaultVersionIncompatibleError",Object.setPrototypeOf(this,vs.prototype)}}const Cx={loginTitle:"Bei AliasVault anmelden",username:"Benutzername oder E-Mail-Adresse",usernamePlaceholder:"Name / name@unternehmen.com",passwordPlaceholder:"Gib Dein Passwort ein",rememberMe:"Angemeldet bleiben",loginButton:"Anmelden",noAccount:"Noch kein Konto?",createVault:"Neuen Tresor erstellen",twoFactorTitle:"Bitte gib den Sicherheits-Code aus Deiner Authentifizierungs-App ein.",authCode:"Sicherheits-Code",authCodePlaceholder:"Gib den 6-stelligen Sicherheits-Code ein.",verify:"Bestätige",twoFactorNote:"Hinweis: Wenn Du keinen Zugriff auf Dein Authentifizierungsgerät hast, kannst Du Deine Zwei-Faktor-Authentifizierung (2FA) mit einem Wiederherstellungscode zurücksetzen, indem Du Dich über die Website anmeldest.",masterPassword:"Master-Passwort",unlockVault:"Entsperren",unlockWithPin:"Mit PIN entsperren",enterPinToUnlock:"Bitte gib Deine PIN zum Entsperren des Tresors ein",useMasterPassword:"Master-Passwort benutzen",unlockTitle:"Entsperre Deinen Tresor",logoutConfirm:"Bist Du sicher, dass Du Dich abmelden möchtest?",unlockSuccessTitle:"Ihr Tresor wurde erfolgreich entsperrt",unlockSuccessDescription:"Du kannst jetzt die Autofill-Funktion in Anmeldeformularen in Deinem Browser nutzen.",closePopup:"Popup schließen",browseVault:"Tresor durchsuchen",connectingTo:"Verbinde zu",switchAccounts:"Konto wechseln?",loginWithMobile:"Mit mobiler App anmelden",unlockWithMobile:"Mit mobiler App entsperren",scanQrCode:"Scanne diesen QR-Code mit Deiner AliasVault-App, um Dich anzumelden und Deinen Tresor zu entsperren.",errors:{invalidCode:"Bitte gib einen gültigen 6-stelligen Sicherheits-Code ein.",serverError:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",wrongPassword:"Falsches Passwort. Bitte versuche es erneut.",sessionExpired:"Deine Sitzung ist abgelaufen. Bitte melde Dich erneut an.",mobileLoginRequestExpired:"Zeitüberschreitung für mobile Anmeldeanforderungen. Bitte lade die Seite neu und versuche es erneut."}},Nx={vault:"Tresor",emails:"E-Mails"},wx={loading:"Laden...",notice:"Hinweis",error:"Fehler",cancel:"Abbrechen",confirm:"Bestätigen",back:"Zurück",next:"Weiter",use:"Benutzen",add:"Hinzufügen",delete:"Löschen",undo:"Rückgängig machen",save:"Speichern",saving:"Wird gespeichert ...",create:"Erstellen",or:"Oder",close:"Schließen",logout:"Abmelden",copied:"Kopiert!",openInNewWindow:"In neuem Fenster öffnen",enabled:"Aktiviert",disabled:"Deaktiviert",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",showDetails:"Details anzeigen",hideDetails:"Details ausblenden",copyToClipboard:"In die Zwischenablage kopieren",loadingEmails:"E-Mails werden geladen...",loadingTotpCodes:"TOTP-Codes werden geladen...",attachments:"Anhänge",loadingAttachments:"Anhänge werden geladen...",settings:"Einstellungen",recentEmails:"Neueste E-Mails",credentials:"Zugangsdaten",customFields:"Benutzerdefinierte Felder",twoFactorAuthentication:"Zwei-Faktor-Authentifizierung",alias:"Alias",notes:"Notizen",email:"E-Mail-Adresse",username:"Benutzername",password:"Passwort",generate:"Generieren",serviceName:"Name des Dienstes",loggedIn:"Angemeldet",syncingVault:"Tresor wird synchronisiert",checkingVaultUpdates:"Prüfe auf Tresor-Updates",syncingUpdatedVault:"Aktualisierter Tresor wird synchronisiert",loadMore:"Mehr laden",offline:"Offline",offlineMode:"Im Offline-Modus arbeiten",pendingSync:"Synchronisierung läuft...",mergingVaultChanges:"Tresor Änderungen zusammenführen...",uploadingVault:"Tresor wird gespeichert...",errors:{serverNotAvailable:"Der AliasVault-Server konnte nicht erreicht werden. Bitte versuche es später noch einmal oder kontaktiere den Support, falls das Problem weiterhin besteht.",clientVersionNotSupported:"Diese Version der AliasVault-Browser-Erweiterung wird vom Server nicht mehr unterstützt. Bitte aktualisiere Deine Browser-Erweiterung auf die neueste Version.",browserExtensionOutdated:"Diese Browser-Erweiterung ist veraltet und kann nicht verwendet werden, um auf diesen Tresor zuzugreifen. Bitte aktualisiere die Browser-Erweiterung, um fortzufahren.",serverVersionNotSupported:"Der AliasVault-Server muss auf eine neuere Version aktualisiert werden, um diese Browser-Erweiterung nutzen zu können. Bitte kontaktiere den Support, falls Du Hilfe benötigst.",serverVersionTooOld:"Der AliasVault-Server muss auf eine neuere Version aktualisiert werden, um dieses Feature nutzen zu können. Bitte kontaktiere den Administrator des Servers, falls Du Hilfe benötigst.",unknownError:"Ein unbekannter Fehler ist aufgetreten",unknownErrorTryAgain:"Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut.",vaultNotAvailable:"Tresor nicht verfügbar",vaultIsLocked:"Der Tresor ist gesperrt.",passwordChanged:"Dein Passwort hat sich seit Deiner letzten Anmeldung geändert. Bitte melden Dich aus Sicherheitsgründen erneut an.",syncConflictMaxRetries:"Tresor konnte nach mehreren Versuchen nicht synchronisiert werden. Bitte versuche es später erneut.",mergeFailed:"Fehler beim Zusammenführen der Tresoränderungen. Bitte versuchen Sie es erneut."},apiErrors:{UNKNOWN_ERROR:"Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut.",ACCOUNT_LOCKED:"Das Konto wurde wegen zu vieler fehlgeschlagener Anmeldeversuche vorübergehend gesperrt. Bitte versuche es später erneut.",ACCOUNT_BLOCKED:"Dein Konto wurde deaktiviert. Wenn Du glaubst, dass dies ein Fehler ist, kontaktiere bitte den Support.",USER_NOT_FOUND:"Ungültiger Benutzername oder Passwort. Bitte versuche es erneut.",INVALID_AUTHENTICATOR_CODE:"Ungültiger Sicherheits-Code. Bitte versuche es erneut.",INVALID_RECOVERY_CODE:"Ungültiger Wiederherstellungscode. Bitte versuche es erneut.",REFRESH_TOKEN_REQUIRED:"Aktualisierungstoken ist erforderlich.",INVALID_REFRESH_TOKEN:"Ungültiger Aktualisierungstoken.",PUBLIC_REGISTRATION_DISABLED:"Die Registrierung eines neuen Kontos ist auf diesem Server derzeit deaktiviert. Bitte kontaktiere den Administrator.",USERNAME_REQUIRED:"Der Benutzername ist erforderlich.",USERNAME_ALREADY_IN_USE:"Benutzername ist bereits vergeben.",USERNAME_AVAILABLE:"Der Benutzername ist verfügbar.",USERNAME_MISMATCH:"Der Benutzername stimmt nicht mit dem aktuellen Benutzer überein.",PASSWORD_MISMATCH:"Das angegebene Passwort stimmt nicht mit Deinem aktuellen Passwort überein.",ACCOUNT_SUCCESSFULLY_DELETED:"Konto erfolgreich gelöscht.",USERNAME_EMPTY_OR_WHITESPACE:"Der Benutzername darf nicht leer sein.",USERNAME_TOO_SHORT:"Der Benutzername ist zu kurz. Er muss mindestens 3 Zeichen lang sein.",USERNAME_TOO_LONG:"Der Benutzername ist zu lang. Er darf höchstens 40 Zeichen lang sein.",USERNAME_INVALID_EMAIL:"Ungültige E-Mail-Adresse.",USERNAME_INVALID_CHARACTERS:"Der Benutzername ist ungültig. Er darf nur aus Buchstaben oder Ziffern bestehen.",VAULT_NOT_UP_TO_DATE:"Dein Tresor ist nicht aktuell. Bitte synchronisiere Deinen Tresor und versuche es erneut.",INTERNAL_SERVER_ERROR:"Internal server error.",VAULT_ERROR:"Der lokale Tresor ist nicht aktuell. Bitte synchronisiere Deinen Tresor, indem Du die Seite aktualisierst, und versuche es erneut."}},xx={or:"oder",new:"Neu",vaultLocked:"AliasVault ist gesperrt.",creatingNewAlias:"Neuen Alias erstellen...",noMatchesFound:"Keine Treffer gefunden",searchVault:"Tresor durchsuchen...",enterServiceName:"Name des Dienstes eingeben",enterEmailAddress:"E-Mail-Adresse eingeben",enterUsername:"Benutzername eingeben",hideFor1Hour:"Für 1 Stunde ausblenden (aktuelle Seite)",hidePermanently:"Dauerhaft ausblenden (aktuelle Seite)",createRandomAlias:"Zufälligen Alias generieren",createUsernamePassword:"Benutzername/Passwort erstellen",randomAlias:"Zufälliger Alias",usernamePassword:"Benutzername/Passwort",createAndSaveAlias:"Alias erstellen und speichern",createAndSaveCredential:"Zugang erstellen und speichern",randomIdentityDescription:"Generiere eine zufällige Identität mit einer zufälligen E-Mail-Adresse von AliasVault.",randomIdentityDescriptionDropdown:"Zufällige Identität mit zufälliger E-Mail-Adresse",manualCredentialDescription:"Gebe Deine eigene E-Mail-Adresse und Benutzernamen an.",manualCredentialDescriptionDropdown:"Manueller Benutzername und Passwort",failedToCreateIdentity:"Das Erstellen der Identität ist fehlgeschlagen. Bitte versuche es erneut.",enterEmailAndOrUsername:"E-Mail-Adresse und/oder Benutzername eingeben",autofillWithAliasVault:"Autofill mit AliasVault",generateRandomPassword:"Zufälliges Passwort erzeugen (wird in die Zwischenablage kopiert)",generateNewPassword:"Neues Passwort erzeugen",togglePasswordVisibility:"Passwort ein-/ausblenden",passwordCopiedToClipboard:"Passwort in die Zwischenablage kopiert",openAliasVaultToUpgrade:"Zum Aktualisieren AliasVault öffnen ",vaultUpgradeRequired:"Aktualisierung des Tresors erforderlich.",dismissPopup:"Popup schliessen"},Tx={title:"Titel",itemName:"Name",loginCredentials:"Zugangsdaten",cardInformation:"Karteninformationen",addItem:"Eintrag hinzufügen",addNewItem:"Neues Element hinzufügen",saveItem:"Element speichern",itemDetails:"Details",editItem:"Element bearbeiten",untitled:"Untitled",newFolder:"Neuer Ordner",createFolder:"Ordner erstellen",editFolder:"Ordner bearbeiten",folderName:"Ordnername",folderNameRequired:"Ordnername ist erforderlich",folder:"Ordner",welcomeTitle:"Welcome to AliasVault!",welcomeDescription:"Du möchtest die AliasVault-Browser-Erweiterung verwenden? Navigiere zu einer Website und verwende das AliasVault-Popup-Fenster um einen neuen Zugang zu erstellen.",noPasskeysFound:"Es wurden noch kein Passkey erstellt. Ein Passkey wird durch den Besuch einer Website erzeugt, die Passkeys als Authentifizierungsmethode anbietet.",noAttachmentsFound:"Keine Elemente mit Anhängen gefunden",noItemsOfTypeFound:"Keine {{type}} Elemente gefunden",noMatchingItems:"Kein passendes Element gefunden",noMatchingItemsSearch:'Keine passenden Elemente "{{search}}"',noMatchingItemsWithFilter:'Keine {{filter}} Elemente passend zu "{{search}}"',clearSearch:"Suche löschen",clearFilter:"Filter löschen",emptyFolderHint:"Dieser Ordner ist leer. Um Elemente in diesen Ordner zu verschieben, bearbeiten Sie das Element und wählen Sie diesen Ordner.",allItemsInFolders:"Alle Ihre Einträge sind in Ordnern organisiert. Tippen Sie auf einen Ordner oben, um Ihre Anmeldedaten anzuzeigen, oder verwenden Sie die Suche, um bestimmte Einträge zu finden.",deleteFolder:"Ordner löschen",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{all:"(Alle) Elemente",passkeys:"Passkeys"},sort:{title:"Sortieren nach",oldestFirst:"Älteste zuerst",newestFirst:"Neuste zuerst",alphabetical:"Alphabetisch (A-Z)"},deleteItemTitle:"Eintrag löschen",deleteItemConfirm:"Bist Du sicher, dass Du diesen Eintrag löschen möchtest?",viewHistory:"Historie ansehen",history:"Historie",noHistoryAvailable:"Keine Historie verfügbar",tags:"Schlagwörter",changePasswordComplexity:"Komplexität des Passworts ändern",passwordLength:"Passwortlänge",includeLowercase:"Kleinbuchstaben (a-z)",includeUppercase:"Großbuchstaben (A-Z)",includeNumbers:"Ziffern (0-9)",includeSpecialChars:"Sonderzeichen (!@#$%^&*)",avoidAmbiguousChars:"Mehrdeutige Zeichen (1, l, I, 0, O, etc.) vermeiden",privateEmailTitle:"Private E-Mail-Adresse",privateEmailAliasVaultServer:"AliasVault-Server",privateEmailDescription:"Ende-zu-Ende verschlüsselt, vollständig privat.",publicEmailTitle:"Öffentliche Temp-E-Mail-Anbieter",publicEmailDescription:"Anonyme, aber beschränkte Privatsphäre. E-Mail-Inhalt ist für jeden lesbar, der die Adresse kennt.",validation:{required:"Dieses Feld ist ein Pflichtfeld"}},Sx={selectType:"Add New Item",typeLabel:"Item Type",creating:"Wird erstellt",editing:"Bearbeiten",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Feldbezeichnung",enterFieldName:"Feldnamen eingeben",fieldType:"Feldtyp",fieldTypes:{text:"Text",hidden:"Hidden (masked text)",email:"E-Mail",url:"URL",phone:"Telefon",number:"Nummer",date:"Date",textArea:"Mehrzeiliger Text"},login:{title:"Anmelden"},alias:{title:"Alias"},creditCard:{title:"Kreditkarte"},note:{title:"Secure Note"}},kx={"login.url":"Website URL","login.username":"Username","login.password":"Passwort","alias.first_name":"Vorname","alias.last_name":"Nachname","alias.gender":"Geschlecht","alias.birthdate":"Geburtsdatum","login.email":"E-Mail","notes.content":"Notizen","card.cardholder_name":"Name des Karteninhabers","card.number":"Kartennummer","card.expiry_month":"Ablaufmonat","card.expiry_year":"Ablaufjahr","card.cvv":"Sicherheitscode","card.pin":"PIN"},Lx={addCode:"2FA-Code hinzufügen",instructions:"Gib den Secret-Key ein, der von der Website angezeigt wird, bei der Du die Zwei-Faktor-Authentifizierung hinzufügen möchtest.",nameOptional:"Name (optional)",secretKey:"Secret-Key",saveToViewCode:"Speichern, um den Code anzuzeigen",defaultName:"Authenticator",errors:{invalidSecretKey:"Ungültiges Format des Secret-Key"}},Rx={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Dx={title:"E-Mails",deleteEmailTitle:"E-Mail löschen",deleteEmailConfirm:"Bist Du sicher, dass Du diese E-Mail unwiderruflich löschen möchtest?",from:"Von",to:"An",date:"Datum",emailContent:"Inhalt der E-Mail",emailNotFound:"E-Mail nicht gefunden",noEmails:"Keine E-Mails gefunden",noEmailsDescription:"Du hast bisher keine E-Mails an Deine privaten E-Mail-Adressen erhalten. Neue E-Mails werden hier angezeigt, sobald sie eintreffen.",offlineMessage:"Keine Verbindung. Bitte verbinde Dich mit dem Internet, um Deine E-Mails zu laden.",dateFormat:{justNow:"gerade eben",minutesAgo_single:"vor {{count}} Minute",minutesAgo_plural:"vor {{count}} Minuten",hoursAgo_single:"vor {{count}} Stunde",hoursAgo_plural:"vor {{count}} Stunden",yesterday:"gestern"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Die aktuell gewählte E-Mail-Adresse wird bereits verwendet. Bitte ändere die E-Mail-Adresse, indem Du diese Zugangsdaten bearbeitest.",CLAIM_DOES_NOT_EXIST:"Beim Laden der E-Mails ist ein Fehler aufgetreten. Bitte bearbeite und speichere den Eintrag, um die Datenbank zu synchronisieren, und versuche es dann erneut."}},Bx={serverUrl:"URL des Servers",language:"Sprache",autofillEnabled:"Autofill aktivieren",version:"Version",openWebApp:"Web-App öffnen",lock:"Sperren",globalSettings:"Allgemeine Einstellungen",autofillPopup:"Autofill-Popup",activeOnAllSites:"Auf allen Seiten aktiv (sofern nicht unten deaktiviert)",disabledOnAllSites:"Auf allen Seiten deaktiviert",rightClickContextMenu:"Kontextmenü mit Rechtsklick",autofillMatching:"Autofill-Übereinstimmung",autofillMatchingMode:"Autofill-Übereinstimmungs-Modus",autofillMatchingModeDescription:"Legt fest, welche Zugangsdaten als Übereinstimmung angesehen werden und wird als Vorschlag im Autofill-Popup für eine bestimmte Website angezeigt.",autofillMatchingDefault:"URL + Subdomain + Wildcard-Name",autofillMatchingUrlSubdomain:"URL + Subdomain",autofillMatchingUrlExact:"Nur exakte URL-Domain",siteSpecificSettings:"Seitenspezifische Einstellungen",autofillPopupOn:"Autofill-Popup auf: ",enabledForThisSite:"Für diese Seite aktiviert",disabledForThisSite:"Für diese Seite deaktivieren",temporarilyDisabledUntil:"Vorübergehend deaktiviert bis ",resetAllSiteSettings:"Alle seitenspezifischen Einstellungen zurücksetzen",appearance:"Erscheinungsbild",theme:"Thema",useDefault:"Standard verwenden",light:"Hell",dark:"Dunkel",keyboardShortcuts:"Tastaturkürzel",configureKeyboardShortcuts:"Tastaturkürzel konfigurieren",configure:"Konfigurieren",clipboardClearTimeout:"Zwischenablage nach dem Kopieren automatisch löschen",clipboardClearTimeoutDescription:"Zwischenablage nach dem Kopieren sensibler Daten automatisch löschen",clipboardClearDisabled:"Niemals löschen",clipboardClear5Seconds:"Nach 5 Sekunden löschen",clipboardClear10Seconds:"Nach 10 Sekunden löschen",clipboardClear15Seconds:"Nach 15 Sekunden löschen",autoLockTimeout:"Sperr-Timeout",autoLockTimeoutDescription:"Tresor bei Inaktivität automatisch sperren",autoLockTimeoutHelp:"Der Tresor wird erst nach dem angegebenen Zeitraum der Inaktivität gesperrt (keine Nutzung von Autofill oder Öffnen des Erweiterungs-Popups). Der Tresor wird immer gesperrt, wenn der Browser geschlossen wird, unabhängig von dieser Einstellung.",autoLockNever:"Niemals",autoLock15Seconds:"15 Sekunden",autoLock1Minute:"1 Minute",autoLock5Minutes:"5 Minuten",autoLock15Minutes:"15 Minuten",autoLock30Minutes:"30 Minuten",autoLock1Hour:"1 Stunde",autoLock4Hours:"4 Stunden",autoLock8Hours:"8 Stunden",autoLock24Hours:"24 Stunden",versionPrefix:"Version ",autofillSettings:"Autofill-Einstellungen",clipboardSettings:"Zwischenablage-Einstellungen",contextMenuSettings:"Kontextmenü-Einstellungen",passkeySettings:"Passkey-Einstellungen",contextMenu:"Kontextmenü",contextMenuEnabled:"Kontextmenü ist aktiviert",contextMenuDisabled:"Kontextmenü ist deaktiviert",contextMenuDescription:"Rechtsklicke auf Eingabefelder, um auf AliasVault-Optionen zuzugreifen",selectLanguage:"Sprache auswählen",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"AliasVault-Server-URL für selbstgehostete Instanzen konfigurieren",customApiUrl:"API-URL",customClientUrl:"Client-URL",apiUrlHint:"Die API-Endpunkt-URL (normalerweise Client-URL + /api)",clientUrlHint:"Die URL der Webschnittstelle Deiner selbst gehosteten Instanz",autofillSettingsDescription:"Aktiviere oder deaktiviere das Autofill-Popup auf Webseiten",autofillEnabledDescription:"Autofill-Vorschläge werden auf den Anmeldeformularen angezeigt",autofillDisabledDescription:"Autofill-Vorschläge sind global deaktiviert",languageSettings:"Sprache",validation:{apiUrlRequired:"API-URL ist erforderlich",apiUrlInvalid:"Bitte gib eine gültige API-URL ein",clientUrlRequired:"Client-URL ist erforderlich",clientUrlInvalid:"Bitte gib eine gültige Client-URL ein"},identityGenerator:"Identitätsgenerator",identityGeneratorSettings:{description:"Lege die Standardsprache und Geschlechtspräferenz für die Erstellung neuer Identitäten fest.",languageSection:"Sprache",languageDescription:"Lege die Sprache fest, die bei der Erstellung neuer Identitäten verwendet wird.",genderSection:"Geschlecht",genderDescription:"Lege die Geschlechtspräferenz für die Erstellung neuer Identitäten fest.",ageRangeSection:"Altersspanne",ageRangeDescription:"Lege die Altersspanne für die Erstellung neuer Identitäten fest.",genderOptions:{random:"Zufällig",male:"Männlich",female:"Weiblich"}},unlockMethod:{title:"Methode zum Entsperren des Tresors",introText:"Wähle, wie Du Deinen Tresor entsperren möchtest. Du kannst Dein Master-Passwort verwenden (immer verfügbar) oder einen PIN-Code für einen schnelleren Zugriff einrichten. Nach drei fehlgeschlagenen PIN-Versuchen musst Du Dein Master-Passwort verwenden.",password:"Master-Passwort",pin:"PIN-Code",pinDescription:"Tresor mit PIN entsperren",setupPin:"PIN-Code einrichten",enterNewPinDescription:"PIN-Code aus mindestens 6 Ziffern eingeben",confirmPin:"PIN bestätigen",confirmPinDescription:"Zur Bestätigung PIN erneut eingeben",invalidPinFormat:"Ungültiges PIN-Format",pinMismatch:"PINs stimmen nicht überein",incorrectPin:"Falsche PIN. {{attemptsRemaining}} verbleibende Versuche.",incorrectPinSingular:"Falsche PIN. Ein Versuch übrig.",enableSuccess:"PIN-Sperre erfolgreich aktiviert!",pinLocked:"Die PIN-Sperre wurde deaktiviert. Bitte nutze Dein Master-Passwort, um Deinen Tresor zu entsperren.",pinSecurityWarning:"Die PIN-Entsperre in der Browser-Erweiterung kann weniger sicher Dein Master-Passwort sein, da PINs typischerweise eine niedrigere Entropie haben und möglicherweise gebruteforced werden können, wenn Dein Gerät kompromittiert wird. Benutze es nur auf Geräten, denen Du vollkommen vertraust."}},Ux={passkey:"Passkey",site:"Seite",helpText:"Passkeys werden auf der Webseite erzeugt. Sie können nicht manuell erstellt oder bearbeitet werden. Um diesen Passkey zu entfernen, kannst Du ihn von diesem Zugang löschen. Um einen Passkey zu ersetzen oder neu zu erstellen, rufe die entsprechende Webseite auf und folge den dortigen Anweisungen.",passkeyMarkedForDeletion:"Passkey zum Löschen vorgemerkt",passkeyWillBeDeleted:"Dieser Passkey wird gelöscht, wenn Du den Zugang speicherst.",useBrowserPasskey:"Browser-Passkey verwenden",bypass:{description:"Wie lange möchtest Du den Passkey-Anbieter des Browsers für {{origin}} verwenden?",thisTimeOnly:"Nur dieses Mal",alwaysForSite:"Für diese Seite immer"},authenticate:{title:"Mit Passkey anmelden",signInFor:"Mit Passkey anmelden für",selectPasskey:"Wähle einen Passkey zum Anmelden aus:",noPasskeysFound:"Kein Passkey für diese Seite gefunden"},create:{title:"Passkey erstellen",createFor:"Neuen Passkey erstellen für",titleLabel:"Titel",titlePlaceholder:"Gib einen Namen für diesen Passkey ein",createButton:"Passkey erstellen",selectPasskeyToReplace:"Wähle einen Passkey zum Ersetzen:",createNewPasskey:"Neuen Passkey erstellen",replacingPasskey:"Ersetzen des Passkeys: {{displayName}}",confirmReplace:"Ersetzen bestätigen",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Passkey-Anbieter",passkeyProviderOn:"Passkey-Anbieter an "}},Mx={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"Noch {{count}} Tage",expiringSoon:"Läuft bald ab",confirmDeleteTitle:"Dauerhaft löschen?",confirmDeleteMessage:"Dieses Element wird dauerhaft gelöscht und kann nicht wiederhergestellt werden.",confirmEmptyAllTitle:"Zuletzt gelöscht leeren?",confirmEmptyAllMessage:"Alle {{count}} Elemente werden dauerhaft gelöscht und können nicht wiederhergestellt werden."},_x={title:"Tresor aktualisieren",subtitle:"AliasVault wurde aktualisiert. Dadurch muss auch Dein Tresor aktualisiert werden. Dies sollte nur wenige Sekunden dauern.",versionInformation:"Versionsinformationen",yourVault:"Version Deines Tresors:",newVersion:"Neue verfügbare Version:",upgrade:"Tresor aktualisieren",upgrading:"Aktualisieren...",whatsNew:"Neu in dieser Version",whatsNewDescription:"Eine Aktualisierung ist erforderlich, um die folgenden Änderungen zu unterstützen:",noDescriptionAvailable:"Für diese Version ist keine Beschreibung vorhanden.",alerts:{unableToGetVersionInfo:"Versionsinformationen konnten nicht abgerufen werden. Bitte versuche es erneut.",selfHostedServer:"Selbstgehosteter Server",selfHostedWarning:"Nutzt Du einen selbst gehosteten Server, musst Du Deine Instanz ebenfalls updaten. Andernfalls kannst Du Dich im Web-Client nicht mehr anmelden.",continueUpgrade:"Aktualisierung fortsetzen",upgradeFailed:"Aktualisierung fehlgeschlagen",failedToApplyMigration:"Migration fehlgeschlagen ({{current}} von {{total}})"}},Fx={unsyncedChangesTitle:"Nicht synchronisierte Änderungen",unsyncedChangesWarning:"Sie haben nicht synchronisierte Änderungen, die verloren gehen, wenn Sie sich jetzt abmelden. Sind Sie sicher, dass Sie fortfahren möchten?",logoutAnyway:"Trotzdem abmelden"},Ox={auth:Cx,menu:Nx,common:wx,content:xx,items:Tx,itemTypes:Sx,fieldLabels:kx,totp:Lx,attachmentUploader:Rx,emails:Dx,settings:Bx,passkeys:Ux,recentlyDeleted:Mx,upgrade:_x,logout:Fx},jx={loginTitle:"Log in to AliasVault",username:"Username or email",usernamePlaceholder:"name / name@company.com",passwordPlaceholder:"Enter your password",rememberMe:"Remember me",loginButton:"Log in",noAccount:"No account yet?",createVault:"Create new vault",twoFactorTitle:"Please enter the authentication code from your authenticator app.",authCode:"Authentication Code",authCodePlaceholder:"Enter 6-digit code",verify:"Verify",twoFactorNote:"Note: if you don't have access to your authenticator device, you can reset your 2FA with a recovery code by logging in via the website.",masterPassword:"Master Password",unlockVault:"Unlock",unlockWithPin:"Unlock with PIN",enterPinToUnlock:"Enter your PIN to unlock your vault",useMasterPassword:"Use Master Password",unlockTitle:"Unlock Your Vault",logoutConfirm:"Are you sure you want to logout?",unlockSuccessTitle:"Your vault is successfully unlocked",unlockSuccessDescription:"You can now use autofill in login forms in your browser.",closePopup:"Close this popup",browseVault:"Browse vault contents",connectingTo:"Connecting to",switchAccounts:"Switch accounts?",loginWithMobile:"Log in using Mobile App",unlockWithMobile:"Unlock using Mobile App",scanQrCode:"Scan this QR code with your AliasVault mobile app to log in and unlock your vault.",errors:{invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Could not reach AliasVault server. Please try again later or contact support if the problem persists.",wrongPassword:"Incorrect password. Please try again.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."}},Px={vault:"Vault",emails:"Emails"},Hx={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",back:"Back",next:"Next",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",create:"Create",or:"Or",close:"Close",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",showDetails:"Show details",hideDetails:"Hide details",copyToClipboard:"Copy to clipboard",loadingEmails:"Loading emails...",loadingTotpCodes:"Loading TOTP codes...",attachments:"Attachments",loadingAttachments:"Loading attachments...",settings:"Settings",recentEmails:"Recent emails",credentials:"Credentials",customFields:"Custom Fields",twoFactorAuthentication:"Two-factor authentication",alias:"Alias",notes:"Notes",email:"Email",username:"Username",password:"Password",generate:"Generate",serviceName:"Service Name",loggedIn:"Logged in",syncingVault:"Syncing vault",checkingVaultUpdates:"Checking for vault updates",syncingUpdatedVault:"Syncing updated vault",loadMore:"Load more",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"The AliasVault server is not available. Please try again later or contact support if the problem persists.",clientVersionNotSupported:"This version of the AliasVault browser extension is not supported by the server anymore. Please update your browser extension to the latest version.",browserExtensionOutdated:"This browser extension is outdated and cannot be used to access this vault. Please update this browser extension to continue.",serverVersionNotSupported:"The AliasVault server needs to be updated to a newer version in order to use this browser extension. Please contact support if you need help.",serverVersionTooOld:"The AliasVault server needs to be updated to a newer version in order to use this feature. Please contact the server admin if you need help.",unknownError:"An unknown error occurred",unknownErrorTryAgain:"An unknown error occurred. Please try again.",vaultNotAvailable:"Vault not available",vaultIsLocked:"Vault is locked",passwordChanged:"Your password has changed since the last time you logged in. Please login again for security reasons.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again."},apiErrors:{UNKNOWN_ERROR:"An unknown error occurred. Please try again.",ACCOUNT_LOCKED:"Account temporarily locked due to too many failed attempts. Please try again later.",ACCOUNT_BLOCKED:"Your account has been disabled. If you believe this is a mistake, please contact support.",USER_NOT_FOUND:"Invalid username or password. Please try again.",INVALID_AUTHENTICATOR_CODE:"Invalid authenticator code. Please try again.",INVALID_RECOVERY_CODE:"Invalid recovery code. Please try again.",REFRESH_TOKEN_REQUIRED:"Refresh token is required.",INVALID_REFRESH_TOKEN:"Invalid refresh token.",PUBLIC_REGISTRATION_DISABLED:"New account registration is currently disabled on this server. Please contact the administrator.",USERNAME_REQUIRED:"Username is required.",USERNAME_ALREADY_IN_USE:"Username is already in use.",USERNAME_AVAILABLE:"Username is available.",USERNAME_MISMATCH:"Username does not match the current user.",PASSWORD_MISMATCH:"The provided password does not match your current password.",ACCOUNT_SUCCESSFULLY_DELETED:"Account successfully deleted.",USERNAME_EMPTY_OR_WHITESPACE:"Username cannot be empty or whitespace.",USERNAME_TOO_SHORT:"Username too short: must be at least 3 characters long.",USERNAME_TOO_LONG:"Username too long: cannot be longer than 40 characters.",USERNAME_INVALID_EMAIL:"Invalid email address.",USERNAME_INVALID_CHARACTERS:"Username is invalid, can only contain letters or digits.",VAULT_NOT_UP_TO_DATE:"Your vault is not up-to-date. Please synchronize your vault and try again.",INTERNAL_SERVER_ERROR:"Internal server error.",VAULT_ERROR:"The local vault is not up-to-date. Please synchronize your vault by refreshing the page and try again."}},zx={or:"or",new:"New",vaultLocked:"AliasVault is locked.",creatingNewAlias:"Creating new alias...",noMatchesFound:"No matches found",searchVault:"Search vault...",enterServiceName:"Enter service name",enterEmailAddress:"Enter email address",enterUsername:"Enter username",hideFor1Hour:"Hide for 1 hour (current site)",hidePermanently:"Hide permanently (current site)",createRandomAlias:"Create random alias",createUsernamePassword:"Create username/password",randomAlias:"Random alias",usernamePassword:"Username/password",createAndSaveAlias:"Create and save alias",createAndSaveCredential:"Create and save credential",randomIdentityDescription:"Generate a random identity with a random email address accessible in AliasVault.",randomIdentityDescriptionDropdown:"Random identity with random email",manualCredentialDescription:"Specify your own email address and username.",manualCredentialDescriptionDropdown:"Manual username and password",failedToCreateIdentity:"Failed to create identity. Please try again.",enterEmailAndOrUsername:"Enter email and/or username",autofillWithAliasVault:"Autofill with AliasVault",generateRandomPassword:"Generate random password (copy to clipboard)",generateNewPassword:"Generate new password",togglePasswordVisibility:"Toggle password visibility",passwordCopiedToClipboard:"Password copied to clipboard",openAliasVaultToUpgrade:"Open AliasVault to upgrade",vaultUpgradeRequired:"Vault upgrade required.",dismissPopup:"Dismiss popup"},Qx={title:"Items",itemName:"Name",loginCredentials:"Login Credentials",cardInformation:"Card Information",addItem:"Add Item",addNewItem:"Add new item",saveItem:"Save Item",itemDetails:"Item Details",editItem:"Edit Item",untitled:"Untitled",newFolder:"New Folder",createFolder:"Create Folder",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"Folder",welcomeTitle:"Welcome to AliasVault!",welcomeDescription:"To use the AliasVault browser extension: navigate to a website and use the AliasVault autofill popup to create a new credential.",noPasskeysFound:"No passkeys have been created yet. Passkeys are created by visiting a website that offers passkeys as an authentication method.",noAttachmentsFound:"No items with attachments found",noItemsOfTypeFound:"No {{type}} items found",noMatchingItems:"No matching items found",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{all:"(All) Items",passkeys:"Passkeys"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Delete Item",deleteItemConfirm:"Are you sure you want to delete this item?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"Tags",changePasswordComplexity:"Change password complexity",passwordLength:"Password length",includeLowercase:"Include lowercase letters",includeUppercase:"Include uppercase letters",includeNumbers:"Include numbers",includeSpecialChars:"Include special characters",avoidAmbiguousChars:"Avoid ambiguous characters (o, 0, etc.)",privateEmailTitle:"Private Email",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E encrypted, fully private.",publicEmailTitle:"Public Temp Email Providers",publicEmailDescription:"Anonymous but limited privacy. Email content is readable by anyone that knows the address.",validation:{required:"This field is required"}},Vx={selectType:"Add New Item",typeLabel:"Item Type",creating:"Creating",editing:"Editing",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Field Label",enterFieldName:"Enter field name",fieldType:"Field Type",fieldTypes:{text:"Text",hidden:"Hidden (masked text)",email:"Email",url:"URL",phone:"Phone",number:"Number",date:"Date",textArea:"Text Area"},login:{title:"Login"},alias:{title:"Alias"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},Gx={"login.url":"Website URL","login.username":"Username","login.password":"Password","alias.first_name":"First Name","alias.last_name":"Last Name","alias.gender":"Gender","alias.birthdate":"Birthdate","login.email":"Email","notes.content":"Notes","card.cardholder_name":"Cardholder Name","card.number":"Card Number","card.expiry_month":"Expiry Month","card.expiry_year":"Expiry Year","card.cvv":"CVV","card.pin":"PIN"},Kx={addCode:"Add 2FA Code",instructions:"Enter the secret key shown by the website where you want to add two-factor authentication.",nameOptional:"Name (optional)",secretKey:"Secret Key",saveToViewCode:"Save to view code",defaultName:"Authenticator",errors:{invalidSecretKey:"Invalid secret key format."}},qx={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Wx={title:"Emails",deleteEmailTitle:"Delete Email",deleteEmailConfirm:"Are you sure you want to permanently delete this email?",from:"From",to:"To",date:"Date",emailContent:"Email content",emailNotFound:"Email not found",noEmails:"No emails found",noEmailsDescription:"You have not received any emails at your private email addresses yet. When you receive a new email, it will appear here.",offlineMessage:"You are offline. Please connect to the internet to load your emails.",dateFormat:{justNow:"just now",minutesAgo_single:"{{count}} min ago",minutesAgo_plural:"{{count}} mins ago",hoursAgo_single:"{{count}} hr ago",hoursAgo_plural:"{{count}} hrs ago",yesterday:"yesterday"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"The current chosen email address is already in use. Please change the email address by editing this credential.",CLAIM_DOES_NOT_EXIST:"An error occurred while trying to load the emails. Please try to edit and save the credential entry to synchronize the database, then try again."}},Yx={serverUrl:"Server URL",language:"Language",autofillEnabled:"Enable Autofill",version:"Version",openWebApp:"Open web app",lock:"Lock",globalSettings:"Global Settings",autofillPopup:"Autofill popup",activeOnAllSites:"Active on all sites (unless disabled below)",disabledOnAllSites:"Disabled on all sites",rightClickContextMenu:"Right-click context menu",autofillMatching:"Autofill Matching",autofillMatchingMode:"Autofill matching mode",autofillMatchingModeDescription:"Determines which credentials are considered a match and shown as suggestions in the autofill popup for a given website.",autofillMatchingDefault:"URL + subdomain + name wildcard",autofillMatchingUrlSubdomain:"URL + subdomain",autofillMatchingUrlExact:"Exact URL domain only",siteSpecificSettings:"Site-Specific Settings",autofillPopupOn:"Autofill popup on: ",enabledForThisSite:"Enabled for this site",disabledForThisSite:"Disabled for this site",temporarilyDisabledUntil:"Temporarily disabled until ",resetAllSiteSettings:"Reset all site-specific settings",appearance:"Appearance",theme:"Theme",useDefault:"Use default",light:"Light",dark:"Dark",keyboardShortcuts:"Keyboard Shortcuts",configureKeyboardShortcuts:"Configure keyboard shortcuts",configure:"Configure",clipboardClearTimeout:"Clear clipboard after copying",clipboardClearTimeoutDescription:"Automatically clear the clipboard after copying sensitive data",clipboardClearDisabled:"Never clear",clipboardClear5Seconds:"Clear after 5 seconds",clipboardClear10Seconds:"Clear after 10 seconds",clipboardClear15Seconds:"Clear after 15 seconds",autoLockTimeout:"Auto-lock Timeout",autoLockTimeoutDescription:"Automatically lock the vault after a period of inactivity",autoLockTimeoutHelp:"The vault will only lock after the specified period of inactivity (no autofill usage or extension popup opened). The vault will always lock when the browser is closed, regardless of this setting.",autoLockNever:"Never",autoLock15Seconds:"15 seconds",autoLock1Minute:"1 minute",autoLock5Minutes:"5 minutes",autoLock15Minutes:"15 minutes",autoLock30Minutes:"30 minutes",autoLock1Hour:"1 hour",autoLock4Hours:"4 hours",autoLock8Hours:"8 hours",autoLock24Hours:"24 hours",versionPrefix:"Version ",autofillSettings:"Autofill Settings",clipboardSettings:"Clipboard Settings",contextMenuSettings:"Context Menu Settings",passkeySettings:"Passkey Settings",contextMenu:"Context Menu",contextMenuEnabled:"Context menu is enabled",contextMenuDisabled:"Context menu is disabled",contextMenuDescription:"Right-click on input fields to access AliasVault options",selectLanguage:"Select Language",serverConfiguration:"Server Configuration",serverConfigurationDescription:"Configure the AliasVault server URL for self-hosted instances",customApiUrl:"API URL",customClientUrl:"Client URL",apiUrlHint:"The API endpoint URL (usually client URL + /api)",clientUrlHint:"The web interface URL of your self-hosted instance",autofillSettingsDescription:"Enable or disable the autofill popup on web pages",autofillEnabledDescription:"Autofill suggestions will appear on login forms",autofillDisabledDescription:"Autofill suggestions are disabled globally",languageSettings:"Language",validation:{apiUrlRequired:"API URL is required",apiUrlInvalid:"Please enter a valid API URL",clientUrlRequired:"Client URL is required",clientUrlInvalid:"Please enter a valid client URL"},identityGenerator:"Identity Generator",identityGeneratorSettings:{description:"Configure the default language and gender preference for generating new identities.",languageSection:"Language",languageDescription:"Set the language that will be used when generating new identities.",genderSection:"Gender",genderDescription:"Set the gender preference for generating new identities.",ageRangeSection:"Age Range",ageRangeDescription:"Set the age range for generating new identities.",genderOptions:{random:"Random",male:"Male",female:"Female"}},unlockMethod:{title:"Vault Unlock Method",introText:"Choose how you want to unlock your vault. You can use your master password (always available) or set up a PIN code for faster access. After 3 failed PIN attempts, you'll need to use your master password.",password:"Master Password",pin:"PIN Code",pinDescription:"Unlock vault with PIN code",setupPin:"Setup PIN Code",enterNewPinDescription:"Enter a PIN code consisting of minimum 6 digits",confirmPin:"Confirm PIN",confirmPinDescription:"Enter your PIN again to confirm",invalidPinFormat:"Invalid PIN format",pinMismatch:"PINs do not match",incorrectPin:"Incorrect PIN. {{attemptsRemaining}} attempts remaining.",incorrectPinSingular:"Incorrect PIN. 1 attempt remaining.",enableSuccess:"PIN unlock enabled successfully!",pinLocked:"PIN unlock has been disabled. Please use your master password to unlock your vault.",pinSecurityWarning:"PIN unlock in the browser extension can be less secure than your master password, as PINs typically have lower entropy and may be brute-forced if your device is compromised. Use it only on devices you fully trust."}},Jx={passkey:"Passkey",site:"Site",helpText:"Passkeys are created on the website when prompted. They cannot be manually edited. To remove this passkey, you can delete it from this credential. To replace this passkey or create a new one, visit the website and follow its prompts.",passkeyMarkedForDeletion:"Passkey marked for deletion",passkeyWillBeDeleted:"This passkey will be deleted when you save this credential.",useBrowserPasskey:"Use Browser Passkey",bypass:{description:"How long would you like to use the browser's passkey provider for {{origin}}?",thisTimeOnly:"This time only",alwaysForSite:"Always for this site"},authenticate:{title:"Sign in with Passkey",signInFor:"Sign in with passkey for",selectPasskey:"Select a passkey to sign in:",noPasskeysFound:"No passkeys found for this site"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"Title",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"Confirm Replace",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},Xx={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},$x={title:"Upgrade Vault",subtitle:"AliasVault has updated and your vault needs to be upgraded. This should only take a few seconds.",versionInformation:"Version Information",yourVault:"Your vault version:",newVersion:"New available version:",upgrade:"Upgrade Vault",upgrading:"Upgrading...",whatsNew:"What's New",whatsNewDescription:"An upgrade is required to support the following changes:",noDescriptionAvailable:"No description available for this version.",alerts:{unableToGetVersionInfo:"Unable to get version information. Please try again.",selfHostedServer:"Self-Hosted Server",selfHostedWarning:"If you're using a self-hosted server, make sure to also update your self-hosted instance as otherwise logging in to the web client will stop working.",continueUpgrade:"Continue Upgrade",upgradeFailed:"Upgrade Failed",failedToApplyMigration:"Failed to apply migration ({{current}} of {{total}})"}},Zx={unsyncedChangesTitle:"Unsynced Changes",unsyncedChangesWarning:"You have unsynced changes that will be lost if you log out now. Are you sure you want to continue?",logoutAnyway:"Log out anyway"},eT={auth:jx,menu:Px,common:Hx,content:zx,items:Qx,itemTypes:Vx,fieldLabels:Gx,totp:Kx,attachmentUploader:qx,emails:Wx,settings:Yx,passkeys:Jx,recentlyDeleted:Xx,upgrade:$x,logout:Zx},tT={loginTitle:"Iniciar sesión en AliasVault",username:"Nombre de usuario o correo electrónico",usernamePlaceholder:"nombre / nombre@empresa.com",passwordPlaceholder:"Introduzca su contraseña",rememberMe:"Recordar mis datos",loginButton:"Iniciar sesión",noAccount:"¿Sin cuenta todavía?",createVault:"Crear nueva bóveda",twoFactorTitle:"Por favor, introduzca el código de autenticación de su aplicación de autenticación.",authCode:"Código de autenticación",authCodePlaceholder:"Introduzca código de 6 dígitos",verify:"Verificar",twoFactorNote:"Nota: si no tiene acceso a su dispositivo de autenticación, puede restablecer su 2FA con un código de recuperación iniciando sesión a través del sitio web.",masterPassword:"Contraseña Maestra",unlockVault:"Desbloquear",unlockWithPin:"Desbloquear con PIN",enterPinToUnlock:"Introduzca su PIN para desbloquear su bóveda",useMasterPassword:"Usar Contraseña Maestra",unlockTitle:"Desbloquear tu Bóveda",logoutConfirm:"¿Estás seguro de que quieres cerrar sesión?",unlockSuccessTitle:"Tu bóveda se ha desbloqueado correctamente",unlockSuccessDescription:"Ahora puede utilizar el autocompletado en los formularios de inicio de sesión en su navegador.",closePopup:"Cerrar esta ventana emergente",browseVault:"Navegar en el contenido de la bóveda",connectingTo:"Conectando con",switchAccounts:"¿Cambiar de cuenta?",loginWithMobile:"Iniciar sesión con la aplicación móvil",unlockWithMobile:"Desbloquear con la aplicación móvil",scanQrCode:"Escanea este código QR con tu aplicación móvil de AliasVault para iniciar sesión y desbloquear tu bóveda.",errors:{invalidCode:"Por favor, introduzca un código de autenticación de 6 dígitos válido.",serverError:"No se pudo llegar al servidor AliasVault. Por favor, inténtelo de nuevo más tarde o póngase en contacto con el soporte si el problema persiste.",wrongPassword:"Contraseña incorrecta. Por favor, inténtelo de nuevo.",sessionExpired:"Su sesión ha caducado. Por favor, inicie sesión de nuevo.",mobileLoginRequestExpired:"Se ha agotado el tiempo de inicio de sesión del móvil. Por favor, vuelva a cargar la página e inténtelo de nuevo."}},aT={vault:"Bóveda",emails:"Correos electrónicos"},nT={loading:"Cargando...",notice:"Aviso",error:"Error",cancel:"Cancelar",confirm:"Confirmar",back:"Atrás",next:"Siguiente",use:"Usar",add:"Añadir",delete:"Borrar",undo:"Deshacer",save:"Guardar",saving:"Guardando...",create:"Crear",or:"O",close:"Cerrar",logout:"Cerrar sesión",copied:"¡Copiado!",openInNewWindow:"Abrir en una ventana nueva",enabled:"Habilitado",disabled:"Desactivado",showPassword:"Mostrar contraseña",hidePassword:"Ocultar contraseña",showDetails:"Mostrar detalles",hideDetails:"Ocultar detalles",copyToClipboard:"Copiar al portapapeles",loadingEmails:"Cargando email...",loadingTotpCodes:"Cargando códigos TOTP...",attachments:"Archivos adjuntos",loadingAttachments:"Cargando archivos adjuntos...",settings:"Configuración",recentEmails:"Correos recientes",credentials:"Credenciales",customFields:"Campos Personalizados",twoFactorAuthentication:"Autenticación de doble factor",alias:"Alias",notes:"Notas",email:"Email",username:"Nombre de usuario",password:"Contraseña",generate:"Generar",serviceName:"Nombre del servicio",loggedIn:"Sesión iniciada",syncingVault:"Sincronizando bóveda",checkingVaultUpdates:"Comprobando actualizaciones de bóveda",syncingUpdatedVault:"Sincronizando bóveda actualizada",loadMore:"Cargar más",offline:"Desconectado",offlineMode:"Funcionando en modo sin conexión",pendingSync:"Sincronizando...",mergingVaultChanges:"Combinando cambios en la bóveda...",uploadingVault:"Subiendo bóveda...",errors:{serverNotAvailable:"El servidor AliasVault no está disponible. Por favor, inténtelo de nuevo más tarde o póngase en contacto con el soporte técnico si el problema persiste.",clientVersionNotSupported:"Esta versión de la extensión del navegador AliasVault ya no es compatible con el servidor. Por favor, actualice la extensión de su navegador a la última versión.",browserExtensionOutdated:"Esta extensión del navegador está desactualizada y no se puede utilizar para acceder a esta bóveda. Por favor, actualice esta extensión del navegador para continuar.",serverVersionNotSupported:"El servidor AliasVault necesita ser actualizado a una versión más reciente para poder usar esta extensión del navegador. Póngase en contacto con el soporte si necesita ayuda.",serverVersionTooOld:"El servidor AliasVault necesita ser actualizado a una versión más reciente para poder utilizar esta característica. Por favor, contacte con el administrador del servidor si necesita ayuda.",unknownError:"Se produjo un error desconocido",unknownErrorTryAgain:"Se ha producido un error desconocido. Por favor, inténtelo de nuevo.",vaultNotAvailable:"Bóveda no disponible",vaultIsLocked:"La bóveda está bloqueada",passwordChanged:"Tu contraseña ha cambiado desde la última vez que iniciaste sesión. Por favor, inicia sesión de nuevo por razones de seguridad.",syncConflictMaxRetries:"No se pudo sincronizar la bóveda después de múltiples intentos. Inténtalo de nuevo más tarde.",mergeFailed:"Error al combinar cambios en la bóveda. Por favor, inténtalo de nuevo."},apiErrors:{UNKNOWN_ERROR:"Se ha producido un error desconocido. Por favor, inténtelo de nuevo.",ACCOUNT_LOCKED:"Cuenta bloqueada temporalmente debido a demasiados intentos fallidos. Por favor, inténtelo de nuevo.",ACCOUNT_BLOCKED:"Tu cuenta ha sido desactivada. Si crees que esto es un error, ponte en contacto con soporte.",USER_NOT_FOUND:"Nombre de usuario o contraseña no válidos. Por favor, inténtelo de nuevo.",INVALID_AUTHENTICATOR_CODE:"Código de autenticación inválido. Por favor, inténtelo de nuevo.",INVALID_RECOVERY_CODE:"Código de recuperación inválido. Por favor, inténtelo de nuevo.",REFRESH_TOKEN_REQUIRED:"Se requiere un token de actualización.",INVALID_REFRESH_TOKEN:"Token de actualización inválido.",PUBLIC_REGISTRATION_DISABLED:"El registro de nueva cuenta está actualmente deshabilitado en este servidor. Por favor, contacte con el administrador.",USERNAME_REQUIRED:"Se requiere un nombre de usuario.",USERNAME_ALREADY_IN_USE:"El nombre de usuario ya está en uso.",USERNAME_AVAILABLE:"El nombre de usuario está disponible.",USERNAME_MISMATCH:"El nombre de usuario no coincide con el usuario actual.",PASSWORD_MISMATCH:"La contraseña proporcionada no coincide con su contraseña actual.",ACCOUNT_SUCCESSFULLY_DELETED:"Cuenta eliminada con éxito.",USERNAME_EMPTY_OR_WHITESPACE:"El nombre de usuario no puede estar vacío o en blanco.",USERNAME_TOO_SHORT:"Nombre de usuario demasiado corto: debe tener al menos 3 caracteres.",USERNAME_TOO_LONG:"Nombre de usuario demasiado largo: no puede tener más de 40 caracteres.",USERNAME_INVALID_EMAIL:"Dirección de correo electrónico inválida.",USERNAME_INVALID_CHARACTERS:"El nombre de usuario inválido, solo puede contener letras o dígitos.",VAULT_NOT_UP_TO_DATE:"Su bóveda no está actualizada. Por favor, sincronice su bóveda e inténtelo de nuevo.",INTERNAL_SERVER_ERROR:"Error interno del servidor.",VAULT_ERROR:"La bóveda local no está actualizada. Por favor, sincronice su bóveda actualizando la página e inténtelo de nuevo."}},rT={or:"o",new:"Nuevo",vaultLocked:"AliasVault está bloqueado.",creatingNewAlias:"Creando nuevo alias...",noMatchesFound:"No se han encontrado resultados",searchVault:"Buscar bóveda...",enterServiceName:"Introduzca el nombre del servicio",enterEmailAddress:"Introduzca la dirección de correo electrónico",enterUsername:"Introduzca nombre de usuario",hideFor1Hour:"Ocultar durante 1 hora (sitio actual)",hidePermanently:"Ocultar permanentemente (sitio actual)",createRandomAlias:"Crear alias aleatorio",createUsernamePassword:"Crear nombre de usuario / contraseña",randomAlias:"Alias aleatorio",usernamePassword:"Nombre de usuario/Contraseña",createAndSaveAlias:"Crear y guardar alias",createAndSaveCredential:"Crear y guardar credencial",randomIdentityDescription:"Generar una identidad aleatoria con una dirección de correo electrónico aleatoria accesible en AliasVault.",randomIdentityDescriptionDropdown:"Identidad aleatoria con correo electrónico aleatorio",manualCredentialDescription:"Especifique su propia dirección de correo electrónico y nombre de usuario.",manualCredentialDescriptionDropdown:"Nombre de usuario y contraseña manual",failedToCreateIdentity:"Error al crear la identidad. Por favor, inténtalo de nuevo.",enterEmailAndOrUsername:"Introduzca email y/o nombre de usuario",autofillWithAliasVault:"AutoFill con AliasVault",generateRandomPassword:"Generar contraseña aleatoria (copiar al portapapeles)",generateNewPassword:"Generar nueva contraseña",togglePasswordVisibility:"Cambiar la visibilidad de la contraseña",passwordCopiedToClipboard:"Contraseña copiada al portapapeles",openAliasVaultToUpgrade:"Abrir AliasVault para actualizar",vaultUpgradeRequired:"Actualización de bóveda requerida.",dismissPopup:"Descartar aviso"},iT={title:"Elementos",itemName:"Nombre",loginCredentials:"Credenciales de inicio de sesión",cardInformation:"Información de la tarjeta",addItem:"Añadir elemento",addNewItem:"Añadir nuevo elemento",saveItem:"Guardar elemento",itemDetails:"Detalles del elemento",editItem:"Editar elemento",untitled:"Untitled",newFolder:"Nueva carpeta",createFolder:"Create Folder",editFolder:"Editar carpeta",folderName:"Nombre de la carpeta",folderNameRequired:"El nombre de la carpeta es obligatorio",folder:"Folder",welcomeTitle:"¡Bienvenido a AliasVault!",welcomeDescription:"Para utilizar la extensión del navegador AliasVault: vaya a un sitio web y utilice la ventana de autocompletado de AliasVault para crear una nueva credencial.",noPasskeysFound:"No se han creado llaves de acceso todavía. Las llaves se crean visitando un sitio web que ofrece llaves de acceso como método de autenticación.",noAttachmentsFound:"No hay elementos con archivos adjuntos",noItemsOfTypeFound:"No se encontraron elementos {{type}}",noMatchingItems:"No hay elementos coincidentes",noMatchingItemsSearch:'No hay elementos que coincidan con "{{search}}"',noMatchingItemsWithFilter:'No hay elementos {{filter}} que coincidan con "{{search}}"',clearSearch:"Limpiar búsqueda",clearFilter:"Eliminar filtros",emptyFolderHint:"Esta carpeta está vacía. Para mover elementos a esta carpeta, edite el elemento y pulse el icono de la carpeta en el campo nombre.",allItemsInFolders:"Todos sus elementos están organizados en carpetas. Haga clic en una carpeta para ver sus credenciales o utilice la búsqueda para encontrar elementos específicos.",deleteFolder:"Borrar carpeta",deleteFolderKeepItems:"Eliminar solo la carpeta",deleteFolderKeepItemsDescription:"Los elementos se moverán de nuevo a la lista principal.",deleteFolderAndItems:"Eliminar carpeta y todos los elementos",deleteFolderAndItemsDescription:"{{count}} elemento(s) serán movidos a Borrados Recientemente.",filters:{all:"(Todos) Elementos",passkeys:"Llaves de acceso"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Eliminar elemento",deleteItemConfirm:"¿Está seguro de querer borrar este ítem?",viewHistory:"Ver historial",history:"Historial",noHistoryAvailable:"Sin historial disponible",tags:"Tags",changePasswordComplexity:"Cambiar complejidad de contraseña",passwordLength:"Longitud de la contraseña",includeLowercase:"Incluye letras minúsculas",includeUppercase:"Incluye letras mayúsculas",includeNumbers:"Incluye números",includeSpecialChars:"Incluye caracteres especiales",avoidAmbiguousChars:"Evita caracteres ambiguos (o, 0, etc.)",privateEmailTitle:"Correo electrónico privado",privateEmailAliasVaultServer:"Servidor AliasVault",privateEmailDescription:"E2E cifrado, totalmente privado.",publicEmailTitle:"Proveedores de Correo Temporal Públicos",publicEmailDescription:"Privacidad anónima pero limitada. Contenido de correo electrónico puede ser leído por cualquiera que conozca la dirección.",validation:{required:"Se requiere este campo"}},sT={selectType:"Añadir nuevo elemento",typeLabel:"Tipo de elemento",creating:"Creando",editing:"Editando",regenerateAlias:"Regenerar alias",addCustomField:"Añadir campo personalizado",fieldLabel:"Etiqueta del campo",enterFieldName:"Introduzca el nombre del campo",fieldType:"Tipo de campo",fieldTypes:{text:"Texto",hidden:"Oculto (texto enmascarado)",email:"Correo",url:"URL",phone:"Teléfono",number:"Número",date:"Date",textArea:"Área de texto"},login:{title:"Iniciar sesión"},alias:{title:"Alias"},creditCard:{title:"Tarjeta de crédito"},note:{title:"Nota segura"}},oT={"login.url":"URL de la web","login.username":"Nombre de usuario","login.password":"Contraseña","alias.first_name":"Nombre","alias.last_name":"Apellido","alias.gender":"Género","alias.birthdate":"Fecha de nacimiento","login.email":"Correo","notes.content":"Notas","card.cardholder_name":"Nombre titular","card.number":"Número de Tarjeta","card.expiry_month":"Mes de expiración","card.expiry_year":"Año de expiración","card.cvv":"CVV","card.pin":"PIN"},lT={addCode:"Añadir código 2FA",instructions:"Introduzca la clave secreta mostrada por el sitio web donde desea añadir autenticación de dos factores.",nameOptional:"Nombre (Opcional)",secretKey:"Clave secreta",saveToViewCode:"Guardar para ver el código",defaultName:"Autentificador",errors:{invalidSecretKey:"Formato de clave secreta inválida."}},cT={uploading:"Subiendo...",uploadSuccess:"Archivos subidos con éxito.",deleteSuccess:"Adjunto eliminado correctamente.",firefoxExpandRequired:"Para subir archivos, utilice la ventana ampliada.",openExpandedWindow:"Abrir ventana ampliada"},uT={title:"Correos electrónicos",deleteEmailTitle:"Eliminar correo",deleteEmailConfirm:"¿Está seguro que desea eliminar permanentemente este correo electrónico?",from:"De",to:"Para",date:"Fecha",emailContent:"Contenido del correo electrónico",emailNotFound:"Correo electrónico no encontrado",noEmails:"No se han encontrado correos electrónicos",noEmailsDescription:"No has recibido ningún correo electrónico en tus direcciones privadas todavía. Cuando recibas un nuevo correo electrónico, aparecerá aquí.",offlineMessage:"Está desconectado. Por favor, conéctese a Internet para cargar sus correos electrónicos.",dateFormat:{justNow:"ahora mismo",minutesAgo_single:"Hace {{count}} min",minutesAgo_plural:"Hace {{count}} min",hoursAgo_single:"Hace {{count}} h",hoursAgo_plural:"Hace {{count}} h",yesterday:"ayer"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"La dirección de correo electrónico elegida actualmente ya está en uso. Por favor, cambie la dirección de correo electrónico editando esta credencial.",CLAIM_DOES_NOT_EXIST:"Ocurrió un error mientras se trataba de cargar los correos electrónicos. Por favor, intente editar y guardar la entrada de credenciales para sincronizar la base de datos, y vuelva a intentarlo."}},dT={serverUrl:"URL del servidor",language:"Idioma",autofillEnabled:"Activar autocompletado",version:"Versión",openWebApp:"Abrir la aplicación web",lock:"Bloquear",globalSettings:"Ajustes globales",autofillPopup:"Ventana de autorrellenado",activeOnAllSites:"Activo en todos los sitios (a menos que se deshabilite debajo)",disabledOnAllSites:"Deshabilitado en todos los sitios",rightClickContextMenu:"Menú contextual del clic derecho",autofillMatching:"Coincidencia de autocompletado",autofillMatchingMode:"Modo de coincidencia de autocompletado",autofillMatchingModeDescription:"Determina qué credenciales se consideran coincidentes y se muestran como sugerencias en el popup de autorrelleno de un sitio web determinado.",autofillMatchingDefault:"URL + subdominio + nombre wildcard",autofillMatchingUrlSubdomain:"URL + subdominio",autofillMatchingUrlExact:"Solo URL exacta",siteSpecificSettings:"Ajustes específicos del sitio",autofillPopupOn:"Ventana de autorrelleno ",enabledForThisSite:"Habilitado para este sitio",disabledForThisSite:"Deshabilitado para este sitio",temporarilyDisabledUntil:"Deshabilitado temporalmente hasta ",resetAllSiteSettings:"Reiniciar todos los ajustes específicos del sitio",appearance:"Apariencia",theme:"Tema",useDefault:"Uso por defecto",light:"Claro",dark:"Oscuro",keyboardShortcuts:"Atajos de teclado",configureKeyboardShortcuts:"Configurar atajos de teclado",configure:"Configurar",clipboardClearTimeout:"Limpiar portapapeles después de copiar",clipboardClearTimeoutDescription:"Limpiar automáticamente el portapapeles después de copiar datos sensibles",clipboardClearDisabled:"Nunca limpiar",clipboardClear5Seconds:"Limpiar después 5 segundos",clipboardClear10Seconds:"Limpiar después 10 segundos",clipboardClear15Seconds:"Limpiar después 15 segundos",autoLockTimeout:"Tiempo de bloqueo automático",autoLockTimeoutDescription:"Bloquear automáticamente la bóveda después de un período de inactividad",autoLockTimeoutHelp:"La bóveda sólo se bloqueará después del período especificado de inactividad (no se abrirá el uso de autocompletado o la ventana emergente). La bóveda siempre se bloqueará cuando el navegador esté cerrado, independientemente de esta configuración.",autoLockNever:"Nunca",autoLock15Seconds:"15 segundos",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minutos",autoLock15Minutes:"15 minutos",autoLock30Minutes:"30 minutos",autoLock1Hour:"1 hora",autoLock4Hours:"4 horas",autoLock8Hours:"8 horas",autoLock24Hours:"24 horas",versionPrefix:"Versión ",autofillSettings:"Ajustes de autocompletado",clipboardSettings:"Ajustes del portapapeles",contextMenuSettings:"Ajustes del menú contextual",passkeySettings:"Ajustes de llaves de acceso",contextMenu:"Menú Contextual",contextMenuEnabled:"El menú contextual está activado",contextMenuDisabled:"El menú contextual está desactivado",contextMenuDescription:"Haga clic derecho en los campos de entrada para acceder a las opciones de AliasVault",selectLanguage:"Seleccionar idioma",serverConfiguration:"Configuración del servidor",serverConfigurationDescription:"Configurar la URL del servidor AliasVault para instancias self-hosted",customApiUrl:"API URL",customClientUrl:"URL de Cliente",apiUrlHint:"La URL del endpoint de la API (generalmente URL del cliente + /api)",clientUrlHint:"La URL de la interfaz web de su instancia self-hosted",autofillSettingsDescription:"Activar o desactivar la ventana emergente de autorrelleno en páginas web",autofillEnabledDescription:"Las sugerencias de autorrelleno aparecerán en los formularios de inicio de sesión",autofillDisabledDescription:"Las sugerencias de autorrelleno están desactivadas globalmente",languageSettings:"Idioma",validation:{apiUrlRequired:"La URL de la API es necesaria",apiUrlInvalid:"Por favor, introduzca una URL de API válida",clientUrlRequired:"La URL de cliente es necesaria",clientUrlInvalid:"Por favor, introduzca una URL de cliente válida"},identityGenerator:"Generador de identidad",identityGeneratorSettings:{description:"Configurar el idioma por defecto y la preferencia de género para generar nuevas identidades.",languageSection:"Idioma",languageDescription:"Establece el idioma que se utilizará al generar nuevas identidades.",genderSection:"Género",genderDescription:"Establecer la preferencia de género para generar nuevas identidades.",ageRangeSection:"Rango de edad",ageRangeDescription:"Establecer el rango de edad para generar nuevas identidades.",genderOptions:{random:"Aleatorio",male:"Hombre",female:"Mujer"}},unlockMethod:{title:"Método de desbloqueo de la bóveda",introText:"Elija cómo desea desbloquear su bóveda. Puede utilizar su contraseña maestra (siempre disponible) o configurar un código PIN para un acceso más rápido. Después de 3 intentos fallidos de PIN, necesitarás usar tu contraseña maestra.",password:"Contraseña Maestra",pin:"Código PIN",pinDescription:"Desbloquear bóveda con código PIN",setupPin:"Configurar código PIN",enterNewPinDescription:"Introduzca un código PIN que contenga un mínimo de 6 dígitos",confirmPin:"Confirmar PIN",confirmPinDescription:"Introduzca su PIN de nuevo para confirmar",invalidPinFormat:"Formato PIN inválido",pinMismatch:"Los PINs no coinciden",incorrectPin:"PIN incorrecto, {{attemptsRemaining}} intentos restantes.",incorrectPinSingular:"PIN incorrecto. 1 intento restante.",enableSuccess:"¡PIN activado con éxito!",pinLocked:"El desbloqueo con PIN ha sido deshabilitado. Por favor, utiliza tu contraseña maestra para desbloquear tu bóveda.",pinSecurityWarning:"El PIN de desbloqueo en la extensión del navegador puede ser menos seguro que su contraseña maestra, ya que los PIN típicamente tienen menos entropía y se pueden obtener por fuerza bruta si su dispositivo está en peligro. Úselo sólo en dispositivos en los que confíe plenamente."}},mT={passkey:"Llave de acceso",site:"Sitio",helpText:"Las llaves de acceso se crean en el sitio web cuando se le solicite. No pueden ser editadas manualmente. Para eliminar esta clave, puede eliminarla de esta credencial. Para reemplazar esta clave de acceso o crear una nueva, visite el sitio web y siga sus indicaciones.",passkeyMarkedForDeletion:"Llave de acceso marcada para eliminar",passkeyWillBeDeleted:"Esta llave de acceso se eliminará cuando guarde esta credencial.",useBrowserPasskey:"Usar llave de acceso del navegador",bypass:{description:"¿Cuánto tiempo quieres usar el proveedor de llaves de acceso del navegador para {{origin}}?",thisTimeOnly:"Solo esta vez",alwaysForSite:"Siempre para este sitio"},authenticate:{title:"Iniciar sesión con llave de acceso",signInFor:"Iniciar sesión con llave para",selectPasskey:"Seleccione una llave de acceso para iniciar sesión:",noPasskeysFound:"No se encontraron llaves de acceso para este sitio"},create:{title:"Crear llave de acceso",createFor:"Crear nueva llave de acceso para",titleLabel:"Título",titlePlaceholder:"Introduzca un nombre para esta llave de acceso",createButton:"Crear llave de acceso",selectPasskeyToReplace:"Seleccione una llave de acceso para reemplazar:",createNewPasskey:"Crear nueva llave de acceso",replacingPasskey:"Reemplazando llave de acceso: {{displayName}}",confirmReplace:"Confirmar reemplazo",selectExistingLogin:"Añadir al inicio de sesión existente:",selectExistingLoginDescription:"Adjuntar esta llave a una credencial de inicio de sesión existente para este sitio.",attachingToCredential:"Añadiendo llave a: {{serviceName}}",attachPasskey:"Añadir llave de acceso"},settings:{passkeyProvider:"Proveedor de llave de acceso",passkeyProviderOn:"Proveedor de llave de acceso en "}},gT={title:"Eliminados recientemente",noItems:"No hay elementos eliminados",noItemsDescription:"Los elementos que elimines aparecerán aquí durante 30 días antes de ser eliminados permanentemente.",description:"Estos elementos se eliminarán permanentemente después de 30 días. Puede restaurarlos o eliminarlos inmediatamente.",restore:"Restaurar",deletePermanently:"Eliminar permanentemente",emptyAll:"Vaciar todo",daysRemaining_one:"{{count}} día restante",daysRemaining_other:"{{count}} días restantes",expiringSoon:"Caduca pronto",confirmDeleteTitle:"¿Eliminar permanentemente?",confirmDeleteMessage:"Este elemento se eliminará permanentemente y no se puede recuperar.",confirmEmptyAllTitle:"¿Vaciar los recientemente eliminados?",confirmEmptyAllMessage:"Todos los elementos {{count}} se eliminarán permanentemente y no se podrán recuperar."},fT={title:"Actualizar bóveda",subtitle:"AliasVault se ha actualizado y tu bóveda necesita ser actualizada. Esto solo debería tardar unos segundos.",versionInformation:"Información de versión",yourVault:"Tu versión de bóveda:",newVersion:"Nueva versión disponible:",upgrade:"Actualizar bóveda",upgrading:"Actualizando...",whatsNew:"Novedades",whatsNewDescription:"Se requiere una actualización para soportar los siguientes cambios:",noDescriptionAvailable:"Ninguna descripción disponible para esta versión.",alerts:{unableToGetVersionInfo:"No se pudo obtener información de la versión. Por favor, inténtalo de nuevo.",selfHostedServer:"Servidor autoalojado",selfHostedWarning:"Si está utilizando un servidor autoalojado, asegúrese de actualizar su instancia autoalojada, ya que de lo contrario iniciar sesión en el cliente web dejará de funcionar.",continueUpgrade:"Continuar actualización",upgradeFailed:"Actualización fallida",failedToApplyMigration:"Error al migrar de ({{current}} a {{total}})"}},hT={unsyncedChangesTitle:"Cambios no sincronizados",unsyncedChangesWarning:"Tienes cambios no sincronizados que se perderán si te desconectas ahora. ¿Estás seguro de que quieres continuar?",logoutAnyway:"Cerrar sesión de todos modos"},AT={auth:tT,menu:aT,common:nT,content:rT,items:iT,itemTypes:sT,fieldLabels:oT,totp:lT,attachmentUploader:cT,emails:uT,settings:dT,passkeys:mT,recentlyDeleted:gT,upgrade:fT,logout:hT},pT={loginTitle:"Kirjaudu sisään AliasVaultiin",username:"Käyttäjänimi tai sähköposti",usernamePlaceholder:"nimi / nimi@yritys.fi",passwordPlaceholder:"Syötä salasanasi",rememberMe:"Muista minut",loginButton:"Kirjaudu sisään",noAccount:"Eikö tiliä vielä ole?",createVault:"Luo uusi holvi",twoFactorTitle:"Syötä tunnistautumiskoodi tunnistautumissovelluksestasi.",authCode:"Tunnistautumiskoodi",authCodePlaceholder:"Syötä 6-numeroinen koodi",verify:"Vahvista",twoFactorNote:"Huomautus: jos sinulla ei ole pääsyä tunnistautumislaitteeseen, voit palauttaa 2FA:n palautuskoodilla kirjautumalla sisään sivuston kautta.",masterPassword:"Pääsalasana",unlockVault:"Avaa lukitus",unlockWithPin:"Avaa PIN-koodilla",enterPinToUnlock:"Syötä PIN-koodi avataksesi holvisi",useMasterPassword:"Käytä pääsalasanaa",unlockTitle:"Avaa holvisi lukitus",logoutConfirm:"Oletko varma, että haluat kirjautua ulos?",unlockSuccessTitle:"Holvisi lukitus on avattu",unlockSuccessDescription:"Voit nyt käyttää automaattista täyttöä sisäänkirjautumislomakkeissa selaimessasi.",closePopup:"Sulje tämä ponnahdusikkuna",browseVault:"Selaa holvin sisältöä",connectingTo:"Yhdistetään kohteeseen",switchAccounts:"Vaihdetaanko tiliä?",loginWithMobile:"Kirjaudu sisään mobiilisovelluksella",unlockWithMobile:"Avaa käyttämällä mobiilisovellusta",scanQrCode:"Skannaa tämä QR-koodi AliasVault-mobiilisovelluksellasi kirjautuaksesi sisään ja avataksesi holvisi.",errors:{invalidCode:"Syötä kelvollinen 6-numeroinen tunnistautumiskoodi.",serverError:"AliasVault-palvelimeen ei saatu yhteyttä. Yritä myöhemmin uudelleen tai ota yhteyttä tukeen, jos ongelma jatkuu.",wrongPassword:"Virheellinen salasana. Yritä uudelleen.",sessionExpired:"Istuntosi on vanhentunut. Kirjaudu sisään uudelleen.",mobileLoginRequestExpired:"Mobiilikirjautumispyyntö aikakatkaistiin. Lataa sivu uudelleen ja yritä uudelleen."}},yT={vault:"Holvi",emails:"Sähköpostit"},ET={loading:"Ladataan...",notice:"Huomautus",error:"Virhe",cancel:"Peruuta",confirm:"Vahvista",back:"Takaisin",next:"Seuraava",use:"Käytä",add:"Lisää",delete:"Poista",undo:"Kumoa",save:"Tallenna",saving:"Saving...",create:"Luo",or:"Tai",close:"Sulje",logout:"Uloskirjautuminen",copied:"Kopioitu!",openInNewWindow:"Avaa uudessa ikkunassa",enabled:"Otettu käyttöön",disabled:"Pois käytöstä",showPassword:"Näytä salasana",hidePassword:"Piilota salasana",showDetails:"Näytä tiedot",hideDetails:"Piilota tiedot",copyToClipboard:"Kopioi leikepöydälle",loadingEmails:"Ladataan sähköposteja...",loadingTotpCodes:"Ladataan TOTP-koodeja...",attachments:"Liitteet",loadingAttachments:"Ladataan liitteitä...",settings:"Asetukset",recentEmails:"Viimeaikaiset sähköpostit",credentials:"Tunnistetiedot",customFields:"Räätälöidyt kentät",twoFactorAuthentication:"Kaksivaiheinen tunnistautuminen",alias:"Alias",notes:"Huomautukset",email:"Sähköposti",username:"Käyttäjänimi",password:"Salasana",generate:"Generate",serviceName:"Palvelun nimi",loggedIn:"Sisäänkirjautuneena",syncingVault:"Synkronoidaan holvia",checkingVaultUpdates:"Tarkistetaan holvin päivitysten varalta",syncingUpdatedVault:"Synkronoidaan päivitettyä holvia",loadMore:"Lataa lisää",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Yhdistetään holvin muutoksia...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"AliasVault-palvelin ei ole käytettävissä. Yritä myöhemmin uudelleen tai ota yhteyttä tukeen, jos ongelma jatkuu.",clientVersionNotSupported:"Palvelin ei enää tue tätä AliasVault-selainlaajennuksen versiota. Päivitä selaimen laajennus uusimpaan versioon.",browserExtensionOutdated:"Tämä selainlaajennus on vanhentunut, eikä sillä voi saada pääsyä tähän holviin. Päivitä tämä selainlaajennus jatkaaksesi.",serverVersionNotSupported:"AliasVault-palvelin on päivitettävä uudempaan versioon, jotta voit käyttää tätä selainlaajennusta. Ota yhteyttä tukeen, jos tarvitset apua.",serverVersionTooOld:"AliasVault-palvelin on päivitettävä uudempaan versioon, jotta se voi käyttää tätä ominaisuutta. Ota yhteyttä palvelimen ylläpitäjään jos tarvitset apua.",unknownError:"Tapahtui tuntematon virhe",unknownErrorTryAgain:"Tapahtui tuntematon virhe. Yritä uudelleen.",vaultNotAvailable:"Holvi ei käytettävissä",vaultIsLocked:"Holvi on lukittu",passwordChanged:"Salasanasi on muuttunut edellisen sisäänkirjautumisen jälkeen. Kirjaudu sisään uudelleen turvallisuussyistä.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again."},apiErrors:{UNKNOWN_ERROR:"Tapahtui tuntematon virhe. Yritä uudelleen.",ACCOUNT_LOCKED:"Tili tilapäisesti lukittu liian monen epäonnistuneen yrityksen vuoksi. Yritä myöhemmin uudelleen.",ACCOUNT_BLOCKED:"Tilisi on poistettu käytöstä. Jos uskot, että tämä on virhe, ota yhteyttä tukeen.",USER_NOT_FOUND:"Virheellinen käyttäjänimi tai salasana. Yritä uudelleen.",INVALID_AUTHENTICATOR_CODE:"Virheellinen tunnistautumiskoodi. Yritä uudelleen.",INVALID_RECOVERY_CODE:"Virheellinen palautuskoodi. Yritä uudelleen.",REFRESH_TOKEN_REQUIRED:"Virkistyspoletti vaaditaan.",INVALID_REFRESH_TOKEN:"Virheellinen virkistyspoletti.",PUBLIC_REGISTRATION_DISABLED:"Uuden tilin rekisteröinti on tällä hetkellä poistettu käytöstä tällä palvelimella. Ota yhteyttä järjestelmänvalvojaan.",USERNAME_REQUIRED:"Käyttäjänimi vaaditaan.",USERNAME_ALREADY_IN_USE:"Käyttäjänimi on jo käytössä.",USERNAME_AVAILABLE:"Käyttäjänimi on saatavilla.",USERNAME_MISMATCH:"Käyttäjänimi ei vastaa nykyistä käyttäjää.",PASSWORD_MISMATCH:"Annettu salasana ei vastaa nykyistä salasanaasi.",ACCOUNT_SUCCESSFULLY_DELETED:"Tili poistettu.",USERNAME_EMPTY_OR_WHITESPACE:"Käyttäjänimi ei voi olla tyhjä eikä siinä voi olla välilyöntejä.",USERNAME_TOO_SHORT:"Käyttäjänimi liian lyhyt: sen on oltava vähintään 3 merkkiä pitkä.",USERNAME_TOO_LONG:"Käyttäjänimi liian pitkä: ei saa olla yli 40 merkkiä pidempi.",USERNAME_INVALID_EMAIL:"Virheellinen sähköpostiosoite.",USERNAME_INVALID_CHARACTERS:"Käyttäjänimi on virheellinen, voi sisältää vain kirjaimia tai numeroita.",VAULT_NOT_UP_TO_DATE:"Holvisi ei ole ajan tasalla. Synkronoi holvisi ja yritä uudelleen.",INTERNAL_SERVER_ERROR:"Sisäinen palvelinvirhe.",VAULT_ERROR:"Paikallinen holvi ei ole ajan tasalla. Synkronoi holvisi virkistämällä sivu ja yritä uudelleen."}},bT={or:"tai",new:"Uusi",vaultLocked:"AliasVault on lukittu.",creatingNewAlias:"Luodaan uutta aliasta...",noMatchesFound:"Osumia ei löytynyt",searchVault:"Etsi holvi...",enterServiceName:"Syötä palvelun nimi",enterEmailAddress:"Syötä sähköpostiosoite",enterUsername:"Syötä käyttäjänimi",hideFor1Hour:"Piilota tunnin ajan (nykyinen sivusto)",hidePermanently:"Piilota pysyvästi (nykyinen sivu)",createRandomAlias:"Luo sattumanvarainen alias",createUsernamePassword:"Luo käyttäjänimi/salasana",randomAlias:"Sattumanvarainen alias",usernamePassword:"Käyttäjänimi/Salasana",createAndSaveAlias:"Luo ja tallenna alias",createAndSaveCredential:"Luo ja tallenna tunnistetieto",randomIdentityDescription:"Luo satunnainen identiteetti, jolla on satunnainen sähköpostiosoite, johon on pääsy AliasVaultissa.",randomIdentityDescriptionDropdown:"Satunnainen identiteetti satunnaisen sähköpostiosoitteen kanssa",manualCredentialDescription:"Määritä oma sähköpostiosoitteesi ja käyttäjänimesi.",manualCredentialDescriptionDropdown:"Manuaalinen käyttäjänimi ja salasana",failedToCreateIdentity:"Identiteetin luominen epäonnistui. Yritä uudelleen.",enterEmailAndOrUsername:"Syötä sähköpostiosoite ja/tai käyttäjänimi",autofillWithAliasVault:"Automaattinen täyttö AliasVaultilla",generateRandomPassword:"Luo sattumanvarainen salasana (kopioi leikepöydälle)",generateNewPassword:"Luo uusi salasana",togglePasswordVisibility:"Salasanan näkyvyyden päälle/pois päältä kytkeminen",passwordCopiedToClipboard:"Salasana kopioitu leikepöydälle",openAliasVaultToUpgrade:"Avaa AliasVault päivittääksesi",vaultUpgradeRequired:"Holvin päivitys vaaditaan.",dismissPopup:"Hylkää ponnahdusikkuna"},IT={title:"Tiedot",itemName:"Nimi",loginCredentials:"Sisäänkirjautumistunnistetiedot",cardInformation:"Korttitiedot",addItem:"Lisää tieto",addNewItem:"Lisää uusi tieto",saveItem:"Tallenna tieto",itemDetails:"Näytä yksityiskohdat",editItem:"Muokkaa tietoa",untitled:"Nimetön",newFolder:"New Folder",createFolder:"Luo kansio",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"Kansio",welcomeTitle:"Tervetuloa AliasVaultiin!",welcomeDescription:"Käyttääksesi AliasVault-selainlaajennusta, siirry jollekin verkkosivustolle ja käytä AliasVaultin automaattisen täytön ponnahdusikkunaa luodaksesi uuden tunnistetiedon.",noPasskeysFound:"Todennusavaimia ei ole vielä luotu. Todennusavaimet on luotu vierailemalla verkkosivustolla, joka tarjoaa todennusavaimia todennusmenetelmänä.",noAttachmentsFound:"Liitteitä sisältäviä tietoja ei löytynyt",noItemsOfTypeFound:"No {{type}} tietoja ei löydy",noMatchingItems:"Vastaavia tietoja ei löytynyt",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{all:"(Kaikki) tiedot",passkeys:"Sala-avaimet"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Poista kohde",deleteItemConfirm:"Haluatko varmasti poistaa tämän kohteen?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"Tunnisteet",changePasswordComplexity:"Muuta salasanan monimutkaisuutta",passwordLength:"Salasanan pituus",includeLowercase:"Sisällytä pienet kirjaimet",includeUppercase:"Sisällytä isot kirjaimet",includeNumbers:"Sisällytä numerot",includeSpecialChars:"Sisällytä erikoismerkit",avoidAmbiguousChars:"Vältä epäselviä merkkejä (o, 0, jne.)",privateEmailTitle:"Yksityinen sähköposti",privateEmailAliasVaultServer:"AliasVault-palvelin",privateEmailDescription:"Päästä päähän (E2E) salattu, täysin yksityinen.",publicEmailTitle:"Julkiset väliaikaisten sähköpostiosoitteiden tarjoajat (PTEP)",publicEmailDescription:"Anonyymi, mutta rajoitettu yksityisyys. Sähköpostin sisällön voi lukea kuka tahansa, joka tietää osoitteen.",validation:{required:"Tämä kenttä on pakollinen"}},vT={selectType:"Add New Item",typeLabel:"Item Type",creating:"Luodaan",editing:"Muokaataan",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Kentän otsikko",enterFieldName:"Anna kentän nimi",fieldType:"Kentän tyyppi",fieldTypes:{text:"Teksti",hidden:"Hidden (masked text)",email:"Sähköposti",url:"URL",phone:"Puhelin",number:"Numero",date:"Päivämäärä",textArea:"Tekstialue"},login:{title:"Kirjaudu sisään"},alias:{title:"Alias"},creditCard:{title:"Luottokortti"},note:{title:"Secure Note"}},CT={"login.url":"Web-sivuston URL-osoite","login.username":"Käyttäjänimi","login.password":"Salasana","alias.first_name":"Etunimi","alias.last_name":"Sukunimi","alias.gender":"Sukupuoli","alias.birthdate":"Syntymäpäivä","login.email":"Sähköposti","notes.content":"Huomautukset","card.cardholder_name":"Kortinhaltijan nimi","card.number":"Kortin numero","card.expiry_month":"Vanhenemiskuukausi","card.expiry_year":"Vanhenemisvuosi","card.cvv":"CVV","card.pin":"PIN-koodi"},NT={addCode:"Lisää 2FA TOTP -koodi",instructions:"Syötä salainen avain, joka näkyy sivustossa, jossa haluat lisätä kaksivaiheisen tunnistautumisen",nameOptional:"Nimi (valinnainen)",secretKey:"Salainen avain",saveToViewCode:"Tallenna nähdäksesi koodin",defaultName:"Authenticator",errors:{invalidSecretKey:"Virheellinen salatun avaimen muoto."}},wT={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},xT={title:"Sähköpostit",deleteEmailTitle:"Poista sähköposti",deleteEmailConfirm:"Oletko varma, että haluat poistaa tämän sähköpostin pysyvästi?",from:"Lähettäjä",to:"Vastaanottaja",date:"Päivämäärä",emailContent:"Sähköpostin sisältö",emailNotFound:"Sähköpostia ei löytynyt",noEmails:"Sähköposteja ei löytynyt",noEmailsDescription:"Et ole vielä vastaanottanut sähköposteja yksityisissä sähköpostiosoitteissasi. Kun saat uuden sähköpostiviestin, se näkyy täällä.",offlineMessage:"Olet offline-tilassa. Ole hyvä ja yhdistä internetiin ladataksesi sähköpostiosoitteesi.",dateFormat:{justNow:"juuri nyt",minutesAgo_single:"{{count}} min sitten",minutesAgo_plural:"{{count}} minuuttia sitten",hoursAgo_single:"{{count}} tunti sitten",hoursAgo_plural:"{{count}} tuntia sitten",yesterday:"eilen"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Nykyinen valittu sähköpostiosoite on jo käytössä. Vaihda sähköpostiosoite muokkaamalla tätä tunnistetietoa.",CLAIM_DOES_NOT_EXIST:"Tapahtui virhe ladattaessa sähköposteja. Yritä muokata ja tallentaa tunnistetiedot synkronoidaksesi tietokannan, ja yritä sitten uudelleen."}},TT={serverUrl:"Palvelimen URL-osoite",language:"Kieli",autofillEnabled:"Ota automaattinen täyttö käyttöön",version:"Versio",openWebApp:"Avaa verkkosovellus",lock:"Lukitse",globalSettings:"Yleisesti pätevät asetukset",autofillPopup:"Automaattisen täytön ponnahdusikkuna",activeOnAllSites:"Aktiivisena kaikilla sivustoilla (ellei sitä ole poistettu käytöstä alla)",disabledOnAllSites:"Pois käytöstä kaikilla sivustoilla",rightClickContextMenu:"Oikea-napsauta kontekstivalikkoa",autofillMatching:"Automaattisen täytön täsmäytys",autofillMatchingMode:"Automaattisen täytön täsmäytystila",autofillMatchingModeDescription:"Määrittää, mitkä tunnistetiedot katsotaan osumiksi ja näytetään ehdotuksina tietyn verkkosivuston automaattisen täytön ponnahdusikkunassa.",autofillMatchingDefault:"URL + aliverkkotunnus + nimi jokerimerkki",autofillMatchingUrlSubdomain:"URL + aliverkkotunnus",autofillMatchingUrlExact:"Tarkka URL-verkkotunnus vain",siteSpecificSettings:"Sivustokohtaiset asetukset",autofillPopupOn:"Automaattisen täytön ponnahdusikkuna päällä: ",enabledForThisSite:"Otettu käyttöön tällä sivustolla",disabledForThisSite:"Poistettu käytöstä tällä sivustolla",temporarilyDisabledUntil:"Väliaikaisesti pois käytöstä, kunnes ",resetAllSiteSettings:"Nollaa kaikki sivustokohtaiset asetukset",appearance:"Ulkoasu",theme:"Teema",useDefault:"Käytä oletusta",light:"Vaalea",dark:"Tumma",keyboardShortcuts:"Näppäimistön pikanppäimet",configureKeyboardShortcuts:"Määritä näppäimistön pikanäppäimet",configure:"Määritä",clipboardClearTimeout:"Tyhjennä leikepöytä kopioimisen jälkeen",clipboardClearTimeoutDescription:"Tyhjennä leikepöytä automaattisesti arkaluonteisten tietojen kopioimisen jälkeen",clipboardClearDisabled:"Älä koskaan tyhjennä",clipboardClear5Seconds:"Tyhjennä 5 sekunnin jälkeen",clipboardClear10Seconds:"Tyhjennä 10 sekunnin jälkeen",clipboardClear15Seconds:"Tyhjennä 15 sekunnin jälkeen",autoLockTimeout:"Automaattisen lukituksen aikakatkaisu",autoLockTimeoutDescription:"Lukitse holvi automaattisesti käyttämättömyysjakson jälkeen",autoLockTimeoutHelp:"Holvi lukittuu vasta määritetyn käyttämättömyysjakson jälkeen (ei automaattista täyttöä tai laajennusten ponnahdusikkunoita ole avattu). Holvi lukittuu aina, kun selain suljetaan, tästä asetuksesta riippumatta.",autoLockNever:"Ei koskaan",autoLock15Seconds:"15 sekuntia",autoLock1Minute:"1 minuutti",autoLock5Minutes:"5 minuuttia",autoLock15Minutes:"15 minuuttia",autoLock30Minutes:"30 minuuttia",autoLock1Hour:"1 tunti",autoLock4Hours:"4 tuntia",autoLock8Hours:"8 tuntia",autoLock24Hours:"24 tuntia",versionPrefix:"Versio",autofillSettings:"Automaatisen täytön asetukset",clipboardSettings:"Leikepöydän asetukset",contextMenuSettings:"Kontekstivalikon asetukset",passkeySettings:"Todennusavainten asetukset",contextMenu:"Sisältövalikko",contextMenuEnabled:"Kontekstivalikko on otettu käyttöön",contextMenuDisabled:"Kontekstivalikko on poistettu käytöstä",contextMenuDescription:"Oikea-napsauta syöttökenttiä päästäksesi AliasVaultin vaihtoehtoihin",selectLanguage:"Valitse kieli",serverConfiguration:"Palvelimen asetukset",serverConfigurationDescription:"Määritä AliasVault-palvelimen URL-osoite itse isännöityille instanssille",customApiUrl:"API-URL-osoite",customClientUrl:"Asiakas-URL-osoite",apiUrlHint:"API päätepisteen URL (yleensä asiakkaan URL + /api)",clientUrlHint:"Web-käyttöliittymän URL-osoite itse isännöidyssä instanssissa",autofillSettingsDescription:"Ota käyttöön tai poista käytöstä automaattisen täytön ponnahdusikkuna verkkosivuilta",autofillEnabledDescription:"Automaattisen täytön ehdotukset näkyvät kirjautumislomakkeissa",autofillDisabledDescription:"Automaattitäyttöehdotukset on poistettu käytöstä kaikkialla",languageSettings:"Keili",validation:{apiUrlRequired:"API-URL-osoite vaaditaan",apiUrlInvalid:"Syötä kelvollinen API-URL-osoite",clientUrlRequired:"Asiakkaan URL-osoite vaaditaan",clientUrlInvalid:"Syötä kelvollinen asiakas-URL-osoite"},identityGenerator:"Identiteetin luonti",identityGeneratorSettings:{description:"Määritä oletuskieli- ja sukupuoliasetukset uusien käyttäjätunnusten luontia varten.",languageSection:"Kieli",languageDescription:"Aseta kieli, jota käytetään luotaessa uusia henkilöllisyyksiä.",genderSection:"Sukupuoli",genderDescription:"Aseta oletussukupuoli uusien henkilöllisyyksien luomiseksi. ",ageRangeSection:"Ikähaarukka",ageRangeDescription:"Aseta ikähaarukka uusia henkilöllisyyksien luomisessa",genderOptions:{random:"Satunnainen",male:"Mies",female:"Nainen"}},unlockMethod:{title:"Holvin lukituksen avausmenetelmä",introText:"Valitse, miten haluat avata holvisi. Voit käyttää pääsalasanaa (aina saatavilla) tai määrittää nopean 4-8 numeroisen PIN-koodin nopeampaa käyttöä varten. Kolmen epäonnistuneen PIN-yrityksen jälkeen sinun on käytettävä pääsalasanaa.",password:"Pääsalasana",pin:"PIN-koodi",pinDescription:"Avaa holvi PIN-koodilla",setupPin:"PIN-koodin määrittäminen",enterNewPinDescription:"Syötä PIN-koodi, jossa on vähintään 6 numeroa",confirmPin:"Vahvista PIN",confirmPinDescription:"Syötä PIN-koodi uudelleen vahvistaaksesi",invalidPinFormat:"Virheellinen PIN-muoto",pinMismatch:"PIN-koodit eivät täsmää",incorrectPin:"Väärä PIN-koodi. {{attemptsRemaining}} yritystä jäljellä.",incorrectPinSingular:"Virheellinen PIN-koodi. 1 yritys jäljellä.",enableSuccess:"PIN-lukituksen avaus käytössä onnistuneesti!",pinLocked:"PIN-lukituksen avaus on poistettu käytöstä. Ole hyvä ja käytä pääsalasanaa avataksesi holvisi.",pinSecurityWarning:"PIN-koodin lukituksen poisto selaimen laajennuksessa voi olla vähemmän turvallista kuin pääsalasana, koska PIN-koodit ovat tyypillisesti alempia entropia ja voi olla brute-pakko jos laite on vaarassa. Käytä sitä vain laitteissa, joihin täysin luotat."}},ST={passkey:"Sala-avain",site:"Sivusto",helpText:"Todennusavaimet, Passkeys, luodaan sivustolle pyydettäessä. Niitä ei voi manuaalisesti muokata. Voit poistaa tämän salasanan, voit poistaa sen tästä käyttäjätunnuksesta. Voit korvata tämän salasanan tai luoda uuden, käy verkkosivuilla ja seuraa sen kehotuksia.",passkeyMarkedForDeletion:"Todennusavain merkitty poistettavaksi",passkeyWillBeDeleted:"Tämä todennusavain poistetaan, kun tallennat tämän käyttäjätiedon.",useBrowserPasskey:"Käytä selaimen sala-avainta",bypass:{description:"Kuinka kauan haluat käyttää selaimen todennusavaimen tarjoajaa {{origin}}?",thisTimeOnly:"Vain tällä kertaa",alwaysForSite:"Aina tällä sivustolla"},authenticate:{title:"Kirjaudu sisään todennusavaimella",signInFor:"Kirjaudu sisään todennusavaimella saadaksesi",selectPasskey:"Valitse todennusavain jolla kirjaudutaan",noPasskeysFound:"Tällä sivustolla ei löytynyt todennusavaimia"},create:{title:"Luo Passkey, todennusavain",createFor:"Luo uusi Passkey, todennusavain",titleLabel:"Otsikko",titlePlaceholder:"Anna nimi tälle todennusavaimelle",createButton:"Luo todennusavain, Passkey",selectPasskeyToReplace:"Valitse todennusavain, johon korvataan",createNewPasskey:"Luo uusi sala-avain",replacingPasskey:"Korvaava todennusavain: {{displayName}}",confirmReplace:"Vahvista korvaaminen",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Todennusavaimen toimittaja",passkeyProviderOn:"Todennusavaimen toimittaja käytössä "}},kT={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},LT={title:"Päivitä holvi",subtitle:"AliasVault on päivitetty ja holvisi on päivitettävä. Tämän pitäisi kestää vain muutama sekunti.",versionInformation:"Versiotiedot",yourVault:"Holvisi versio:",newVersion:"Uusi saatavilla oleva versio:",upgrade:"Päivitä holvi",upgrading:"Päivitetään...",whatsNew:"Mitä uutta?",whatsNewDescription:"Päivitys vaaditaan seuraavien muutosten tukemiseksi:",noDescriptionAvailable:"Tälle versiolle ei ole saatavilla kuvausta.",alerts:{unableToGetVersionInfo:"Versiotietojen hakeminen epäonnistui. Yritä uudelleen.",selfHostedServer:"Itseisännöity palvelin",selfHostedWarning:"Jos käytät itseisännöityä palvelinta, muista päivittää myös itseisännöity instanssisi, koska muuten verkkoasiakassovellukseen kirjautuminen lakkaa toimimasta.",continueUpgrade:"Jatka päivitystä",upgradeFailed:"Päivitys epäonnistui",failedToApplyMigration:"Siirron käyttöönotto epäonnistui ({{current}} / {{total}})"}},RT={unsyncedChangesTitle:"Synkronoimattomat muutokset",unsyncedChangesWarning:"Sinulla on synkronoimattomia muutoksia, jotka menetetään, jos kirjaudut ulos nyt. Oletko varma, että haluat jatkaa?",logoutAnyway:"Kirjaudu ulos joka tapauksessa"},DT={auth:pT,menu:yT,common:ET,content:bT,items:IT,itemTypes:vT,fieldLabels:CT,totp:NT,attachmentUploader:wT,emails:xT,settings:TT,passkeys:ST,recentlyDeleted:kT,upgrade:LT,logout:RT},BT={loginTitle:"Se connecter à AliasVault",username:"Nom d'utilisateur ou email",usernamePlaceholder:"nom / nom@entreprise.com",passwordPlaceholder:"Saisissez votre mot de passe",rememberMe:"Se souvenir de moi",loginButton:"Se connecter",noAccount:"Pas de compte ?",createVault:"Créer un nouveau coffre",twoFactorTitle:"Veuillez entrer le code d'authentification de votre application d'authentification.",authCode:"Code d'authentification",authCodePlaceholder:"Saisissez le code à 6 chiffres",verify:"Vérifier",twoFactorNote:"Remarque : si vous n'avez pas accès à votre appareil d'authentification, vous pouvez réinitialiser votre authentification à double facteur avec un code de récupération en vous connectant via le site web.",masterPassword:"Mot de passe principal",unlockVault:"Déverrouiller",unlockWithPin:"Déverrouiller avec un code PIN",enterPinToUnlock:"Entrez votre code PIN pour déverrouiller votre coffre",useMasterPassword:"Utiliser le mot de passe principal",unlockTitle:"Déverrouiller votre coffre",logoutConfirm:"Êtes-vous sûr de vouloir vous déconnecter ?",unlockSuccessTitle:"Votre coffre a été déverrouillé avec succès",unlockSuccessDescription:"Vous pouvez maintenant utiliser le remplissage automatique des formulaires de connexion dans votre navigateur.",closePopup:"Fermer cette popup",browseVault:"Parcourir le contenu du coffre",connectingTo:"Connexion à",switchAccounts:"Changer de compte ?",loginWithMobile:"Se connecter à l'aide de l'application mobile",unlockWithMobile:"Déverrouiller en utilisant l'application mobile",scanQrCode:"Scannez ce code QR avec votre application mobile AliasVault pour vous connecter et déverrouiller votre coffre.",errors:{invalidCode:"Veuillez entrer un code d'authentification valide à 6 chiffres.",serverError:"Impossible d'accéder au serveur AliasVault. Veuillez réessayer plus tard ou contacter le support si le problème persiste.",wrongPassword:"Mot de passe incorrect, veuillez réessayer.",sessionExpired:"Votre session a expiré. Veuillez vous reconnecter.",mobileLoginRequestExpired:"La demande de connexion de l'application mobile a expiré. Veuillez recharger la page et réessayer."}},UT={vault:"Coffre-fort",emails:"Emails"},MT={loading:"Chargement...",notice:"Notification",error:"Erreur",cancel:"Annuler",confirm:"Confirmer",back:"Retour",next:"Suivant",use:"Utiliser",add:"Ajouter",delete:"Supprimer",undo:"Annuler",save:"Sauvegarder",saving:"Sauvegarde...",create:"Créer",or:"Ou",close:"Fermer",logout:"Déconnexion",copied:"Copié !",openInNewWindow:"Ouvrir dans une nouvelle fenêtre",enabled:"Activé",disabled:"Désactivé",showPassword:"Afficher le mot de passe",hidePassword:"Cacher le mot de passe",showDetails:"Afficher les détails",hideDetails:"Masquer les détails",copyToClipboard:"Copier dans le presse-papiers",loadingEmails:"Chargement des emails...",loadingTotpCodes:"Chargement des codes TOTP...",attachments:"Pièces jointes",loadingAttachments:"Chargement des pièces jointes...",settings:"Réglages",recentEmails:"Emails récents",credentials:"Identifiants",customFields:"Champs Personnalisés",twoFactorAuthentication:"Authentification à double facteur",alias:"Alias",notes:"Notes",email:"Email",username:"Nom d'utilisateur",password:"Mot de passe",generate:"Générer",serviceName:"Nom du service",loggedIn:"Connecté(e)",syncingVault:"Synchronisation du coffre",checkingVaultUpdates:"Vérification des mises à jour du coffre",syncingUpdatedVault:"Synchronisation du coffre mis à jour",loadMore:"Voir plus",offline:"Hors ligne",offlineMode:"Fonctionnement en mode hors ligne",pendingSync:"Synchronisation...",mergingVaultChanges:"Fusion des modifications du coffre...",uploadingVault:"Envoi du coffre...",errors:{serverNotAvailable:"Le serveur d'AliasVault n'est pas disponible. Veuillez réessayer plus tard ou contacter le support si le problème persiste.",clientVersionNotSupported:"Cette version de l'extension de navigateur AliasVault n'est plus prise en charge par le serveur. Veuillez mettre à jour votre extension de navigateur à la dernière version.",browserExtensionOutdated:"Cette extension de navigateur est obsolète et ne peut pas être utilisée pour accéder à ce coffre-fort. Veuillez la mettre à jour pour continuer.",serverVersionNotSupported:"Le serveur d'AliasVault doit être mis à jour vers une version plus récente afin d'utiliser cette extension de navigateur. Veuillez contacter le support si vous avez besoin d'aide.",serverVersionTooOld:"Le serveur AliasVault doit être mis à jour vers une version plus récente pour pouvoir utiliser cette fonctionnalité. Veuillez contacter l'administrateur du serveur si vous avez besoin d'aide.",unknownError:"Une erreur inconnue s'est produite",unknownErrorTryAgain:"Une erreur inconnue s'est produite. Merci de réessayer.",vaultNotAvailable:"Coffre non disponible",vaultIsLocked:"Le coffre est verrouillé",passwordChanged:"Votre mot de passe a changé depuis la dernière fois que vous vous êtes connecté. Veuillez vous reconnecter pour des raisons de sécurité.",syncConflictMaxRetries:"Impossible de synchroniser le coffre après plusieurs tentatives. Veuillez réessayer plus tard.",mergeFailed:"Impossible de fusionner les modifications du coffre. Veuillez réessayer."},apiErrors:{UNKNOWN_ERROR:"Une erreur inconnue s'est produite. Merci de réessayer.",ACCOUNT_LOCKED:"Compte temporairement verrouillé en raison d'un trop grand nombre de tentatives infructueuses. Veuillez réessayer plus tard.",ACCOUNT_BLOCKED:"Votre compte a été désactivé. Si vous pensez que c'est une erreur, veuillez contacter le support.",USER_NOT_FOUND:"Nom d'utilisateur ou mot de passe invalide. Veuillez réessayer.",INVALID_AUTHENTICATOR_CODE:"Code d'authentification invalide. Veuillez réessayer.",INVALID_RECOVERY_CODE:"Code de récupération invalide. Veuillez réessayer.",REFRESH_TOKEN_REQUIRED:"Un jeton d'actualisation est requis.",INVALID_REFRESH_TOKEN:"Jeton d'actualisation invalide.",PUBLIC_REGISTRATION_DISABLED:"L'enregistrement d'un nouveau compte est actuellement désactivé sur ce serveur. Veuillez contacter l'administrateur.",USERNAME_REQUIRED:"Nom d’utilisateur requis.",USERNAME_ALREADY_IN_USE:"Nom d'utilisateur déjà utilisé.",USERNAME_AVAILABLE:"Ce nom d'utilisateur est disponible.",USERNAME_MISMATCH:"Le nom d'utilisateur ne correspond pas à l'utilisateur actuel.",PASSWORD_MISMATCH:"Le mot de passe indiqué ne correspond pas à votre mot de passe actuel.",ACCOUNT_SUCCESSFULLY_DELETED:"Compte supprimé avec succès.",USERNAME_EMPTY_OR_WHITESPACE:"Le nom d'utilisateur ne peut pas être vide ou contenir un espace.",USERNAME_TOO_SHORT:"Le nom d'utilisateur est trop court : il doit comporter au moins 3 caractères.",USERNAME_TOO_LONG:"Le nom d'utilisateur est trop long : il ne peut pas contenir plus de 40 caractères.",USERNAME_INVALID_EMAIL:"Adresse e-mail invalide.",USERNAME_INVALID_CHARACTERS:"Le nom d'utilisateur n'est pas valide, il ne peut contenir que des lettres ou des chiffres.",VAULT_NOT_UP_TO_DATE:"Votre coffre n'est pas à jour. Veuillez synchroniser votre coffre et réessayer.",INTERNAL_SERVER_ERROR:"Erreur interne du serveur.",VAULT_ERROR:"Le coffre local n'est pas à jour. Veuillez synchroniser votre coffre en rafraîchissant la page et réessayez."}},_T={or:"ou",new:"Nouveautés",vaultLocked:"AliasVault est verrouillé.",creatingNewAlias:"Création de nouveaux alias...",noMatchesFound:"Aucun résultat trouvé",searchVault:"Rechercher dans le coffre...",enterServiceName:"Entrez le nom du service",enterEmailAddress:"Entrer l'adresse email",enterUsername:"Entrez le nom d'utilisateur",hideFor1Hour:"Cacher pendant 1 heure (site actuel)",hidePermanently:"Masquer définitivement (site actuel)",createRandomAlias:"Créer un alias aléatoire",createUsernamePassword:"Créer un nom d'utilisateur/mot de passe",randomAlias:"Alias aléatoire",usernamePassword:"Nom d’utilisateur / mot de passe",createAndSaveAlias:"Créer et enregistrer l'alias",createAndSaveCredential:"Créer et enregistrer les identifiants",randomIdentityDescription:"Générer une identité aléatoire avec une adresse email aléatoire accessible dans AliasVault.",randomIdentityDescriptionDropdown:"Identité aléatoire avec email aléatoire",manualCredentialDescription:"Spécifiez votre propre adresse email et nom d'utilisateur.",manualCredentialDescriptionDropdown:"Identifiant et mot de passe manuels",failedToCreateIdentity:"Échec de la création de l'identité. Veuillez réessayer.",enterEmailAndOrUsername:"Entrez l'adresse email et/ou le nom d'utilisateur",autofillWithAliasVault:"Remplissage automatique avec AliasVault",generateRandomPassword:"Générer un mot de passe aléatoire (copier dans le presse-papier)",generateNewPassword:"Générer un nouveau mot de passe",togglePasswordVisibility:"Afficher ou masquer le mot de passe",passwordCopiedToClipboard:"Mot de passe copié dans le presse-papiers",openAliasVaultToUpgrade:"Ouvrez AliasVault pour améliorer",vaultUpgradeRequired:"Mise à niveau du coffre requise.",dismissPopup:"Fermer"},FT={title:"Éléments",itemName:"Nom",loginCredentials:"Identifiants de connexion",cardInformation:"Informations de la carte",addItem:"Ajouter un élément",addNewItem:"Ajouter un nouvel élément",saveItem:"Enregistrer l'élément",itemDetails:"Détails de l’élément",editItem:"Editer l'élément",untitled:"Untitled",newFolder:"Nouveau dossier",createFolder:"Nouveau dossier",editFolder:"Éditer le dossier",folderName:"Nom du dossier",folderNameRequired:"Le nom du dossier est requis",folder:"Dossier",welcomeTitle:"Bienvenue dans AliasVault !",welcomeDescription:"Pour utiliser l'extension de navigateur AliasVault : accédez à un site web et utilisez la fenêtre de saisie automatique AliasVault pour créer un nouvel identifiant.",noPasskeysFound:"Aucune clé d'accès n'a encore été créée. Les clés d'accès sont créés en visitant un site Web qui propose des clés d'accès comme méthode d'authentification.",noAttachmentsFound:"Aucun élément avec pièces jointes trouvé",noItemsOfTypeFound:"Aucun élément {{type}} trouvé",noMatchingItems:"Aucun élément correspondant trouvé",noMatchingItemsSearch:'Aucun élément correspondant à "{{search}}"',noMatchingItemsWithFilter:'Aucun élément {{filter}} correspondant à "{{search}}"',clearSearch:"Effacer la recherche",clearFilter:"Effacer le filtre",emptyFolderHint:"Ce dossier est vide. Pour déplacer des éléments vers ce dossier, éditez l'élément et appuyez sur l'icône du dossier dans le champ nom.",allItemsInFolders:"Tous vos éléments sont organisés dans des dossiers. Appuyez sur un dossier ci-dessus pour voir vos identifiants, ou utilisez la recherche pour trouver des éléments spécifiques.",deleteFolder:"Supprimer le dossier",deleteFolderKeepItems:"Supprimer le dossier uniquement",deleteFolderKeepItemsDescription:"Les éléments seront déplacés dans la liste principale.",deleteFolderAndItems:"Supprimer le dossier et tous les éléments",deleteFolderAndItemsDescription:"{{count}} élément(s) vont être déplacés vers Récemment supprimés.",filters:{all:"(Tous) Éléments",passkeys:"Clés d'accès"},sort:{title:"Trier par",oldestFirst:"Plus anciens en premier",newestFirst:"Les plus récents en premier",alphabetical:"Alphabétique (A-Z)"},deleteItemTitle:"Supprimer l'élement",deleteItemConfirm:"Êtes-vous certain de vouloir supprimer cet élément?",viewHistory:"Voir l'historique",history:"Historique",noHistoryAvailable:"Pas d'historique disponible",tags:"Mots-clés",changePasswordComplexity:"Changer la complexité du mot de passe",passwordLength:"Longueur du mot de passe",includeLowercase:"Inclure les lettres minuscules",includeUppercase:"Inclure les lettres majuscules",includeNumbers:"Inclure des chiffres",includeSpecialChars:"Inclure des caractères spéciaux",avoidAmbiguousChars:"Éviter les caractères ambigus (o, 0, etc.)",privateEmailTitle:"E-mail privé",privateEmailAliasVaultServer:"Serveur AliasVault",privateEmailDescription:"E2E chiffré, entièrement privé.",publicEmailTitle:"Fournisseurs d'email public temporaires",publicEmailDescription:"Anonyme mais confidentiel limitée. Le contenu des e-mails est lisible par toute personne qui connaît l'adresse.",validation:{required:"Ce champ est requis"}},OT={selectType:"Ajouter un nouvel élément",typeLabel:"Type d'élément",creating:"Création",editing:"Édition",regenerateAlias:"Régénérer l'alias",addCustomField:"Ajouter un champ personnalisé",fieldLabel:"Intitulé du champ",enterFieldName:"Entrez le nom du champ",fieldType:"Type de champ",fieldTypes:{text:"Texte",hidden:"Caché (texte masqué)",email:"Email",url:"URL",phone:"Téléphone",number:"Numéro",date:"Date",textArea:"Zone de texte"},login:{title:"Se connecter"},alias:{title:"Alias"},creditCard:{title:"Carte de crédit"},note:{title:"Note sécurisée"}},jT={"login.url":"URL du site","login.username":"Username","login.password":"Mot de passe","alias.first_name":"Prénom","alias.last_name":"Nom","alias.gender":"Genre","alias.birthdate":"Date de naissance","login.email":"Email","notes.content":"Notes","card.cardholder_name":"Nom du titulaire de la carte","card.number":"Numéro de la carte","card.expiry_month":"Mois d'expiration","card.expiry_year":"Année d'expiration","card.cvv":"CVV","card.pin":"PIN"},PT={addCode:"Ajouter un code 2FA",instructions:"Entrez la clé secrète affichée par le site Web où vous souhaitez ajouter l'authentification à deux facteurs.",nameOptional:"Nom (facultatif)",secretKey:"Clé secrète",saveToViewCode:"Enregistrer pour afficher le code",defaultName:"Authentificateur",errors:{invalidSecretKey:"Format de clé secrète invalide."}},HT={uploading:"Envoi...",uploadSuccess:"Fichiers envoyés avec succès.",deleteSuccess:"Pièce jointe supprimée avec succès.",firefoxExpandRequired:"Pour envoyer des fichiers, utilisez la fenêtre étendue.",openExpandedWindow:"Ouvrir la fenêtre étendue"},zT={title:"Emails",deleteEmailTitle:"Supprimer l'email",deleteEmailConfirm:"Êtes-vous sûr de vouloir supprimer définitivement cet email ?",from:"De",to:"À",date:"Date",emailContent:"Contenu de l'email",emailNotFound:"Email introuvable",noEmails:"Aucun email trouvé",noEmailsDescription:"Vous n'avez pas encore reçu d'emails dans vos adresses email privées. Quand vous recevez un nouvel email, il apparaîtra ici.",offlineMessage:"Vous êtes déconnecté. Veuillez vous connecter à internet pour charger vos e-mails.",dateFormat:{justNow:"maintenant",minutesAgo_single:"Il y a {{count}} minute",minutesAgo_plural:"Il y a {{count}} minutes",hoursAgo_single:"Il y a {{count}} heure",hoursAgo_plural:"Il y a {{count}} heures",yesterday:"hier"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"L'adresse email actuelle est déjà utilisée. Veuillez modifier l'adresse email en modifiant cet identifiant.",CLAIM_DOES_NOT_EXIST:"Une erreur s'est produite en essayant de charger les emails. Veuillez essayer de modifier et enregistrer les informations d'identification pour synchroniser la base de données, puis réessayez."}},QT={serverUrl:"URL du serveur",language:"Langue",autofillEnabled:"Activer le remplissage automatique",version:"Version",openWebApp:"Ouvrir l’application web",lock:"Verrouiller",globalSettings:"Paramètres généraux",autofillPopup:"Remplissage automatique de la popup",activeOnAllSites:"Activé sur tous les sites (sauf si désactivé ci-dessous)",disabledOnAllSites:"Désactivé sur tous les sites",rightClickContextMenu:"Clic-droit sur le menu contextuel",autofillMatching:"Correspondance de remplissage automatique",autofillMatchingMode:"Remplir automatiquement le mode correspondant",autofillMatchingModeDescription:"Détermine quels identifiants sont considérés comme une correspondance et sont affichés comme des suggestions dans la fenêtre de saisie automatique pour un site web donné.",autofillMatchingDefault:"URL + sous-domaine + nom générique",autofillMatchingUrlSubdomain:"URL + sous-domaine",autofillMatchingUrlExact:"Domaine d'URL exact uniquement",siteSpecificSettings:"Paramètres spécifiques au site",autofillPopupOn:"Popup de saisie automatique sur:  ",enabledForThisSite:"Activé pour ce site",disabledForThisSite:"Désactivé pour ce site",temporarilyDisabledUntil:"Temporairement désactivé jusqu'au ",resetAllSiteSettings:"Réinitialiser tous les paramètres spécifiques au site",appearance:"Apparence",theme:"Thème",useDefault:"Utiliser par défaut",light:"Clair",dark:"Sombre",keyboardShortcuts:"Raccourcis clavier",configureKeyboardShortcuts:"Configurer les raccourcis clavier",configure:"Configurer",clipboardClearTimeout:"Effacer le presse-papiers après copie",clipboardClearTimeoutDescription:"Effacer automatiquement le presse-papiers après copie des données sensibles",clipboardClearDisabled:"Ne jamais effacer",clipboardClear5Seconds:"Effacer après 5 secondes",clipboardClear10Seconds:"Effacer après 10 secondes",clipboardClear15Seconds:"Effacer après 15 secondes",autoLockTimeout:"Délai de verrouillage automatique",autoLockTimeoutDescription:"Verrouiller automatiquement le coffre après une période d'inactivité",autoLockTimeoutHelp:"Le coffre ne se verrouille qu'après la période d'inactivité spécifiée (aucune fenêtre pop-up de saisie automatique ou d'extension). Le coffre sera toujours verrouillé lorsque le navigateur sera fermé, quel que soit ce paramètre.",autoLockNever:"Jamais",autoLock15Seconds:"15 secondes",autoLock1Minute:"1 minute",autoLock5Minutes:"5 minutes",autoLock15Minutes:"15 minutes",autoLock30Minutes:"30 minutes",autoLock1Hour:"1 heure",autoLock4Hours:"4 heures",autoLock8Hours:"8 heures",autoLock24Hours:"24 heures",versionPrefix:"Version ",autofillSettings:"Paramètres du remplissage automatique",clipboardSettings:"Paramètres du presse-papiers",contextMenuSettings:"Paramètres du menu contextuel",passkeySettings:"Paramètres de la clé d'accès",contextMenu:"Menu contextuel",contextMenuEnabled:"Le menu contextuel est activé",contextMenuDisabled:"Le menu contextuel est désactivé",contextMenuDescription:"Faites un clic droit sur les champs de saisie pour accéder aux options d'AliasVault",selectLanguage:"Sélectionner une langue",serverConfiguration:"Configuration du serveur",serverConfigurationDescription:"Configurer l'URL du serveur AliasVault pour les instances auto-hébergées",customApiUrl:"URL de l'API",customClientUrl:"URL du client",apiUrlHint:"L'URL du point de terminaison de l'API (généralement l'URL du client + /api)",clientUrlHint:"L'URL de l'interface web de votre instance auto-hébergée",autofillSettingsDescription:"Activer ou désactiver la popup de saisie automatique sur les pages web",autofillEnabledDescription:"Les suggestions de saisie automatique apparaîtront dans les formulaires de connexion",autofillDisabledDescription:"Les suggestions de saisie automatique sont désactivées globalement",languageSettings:"Langue",validation:{apiUrlRequired:"L'URL de l'API est requise",apiUrlInvalid:"Veuillez entrer une URL d'API valide",clientUrlRequired:"L'URL du client est requise",clientUrlInvalid:"Veuillez entrer une URL de client valide"},identityGenerator:"Générateur d'identité",identityGeneratorSettings:{description:"Configurer la langue par défaut et la préférence de genre pour la génération de nouvelles identités.",languageSection:"Langue",languageDescription:"Définit la langue qui sera utilisée lors de la génération de nouvelles identités.",genderSection:"Genre",genderDescription:"Définissez la préférence de genre pour la génération de nouvelles identités.",ageRangeSection:"Tranche d'âge",ageRangeDescription:"Définit la tranche d'âge pour la génération de nouvelles identités.",genderOptions:{random:"Aléatoire",male:"Homme",female:"Femme"}},unlockMethod:{title:"Méthode de déverrouillage du coffre",introText:"Choisissez comment vous voulez déverrouiller votre coffre. Vous pouvez utiliser votre mot de passe principal (toujours disponible) ou configurer un code PIN pour un accès rapide. Après 3 tentatives de PIN échouées, vous devrez utiliser votre mot de passe maître.",password:"Mot de passe maître",pin:"Code PIN",pinDescription:"Déverrouiller le coffre avec le code PIN",setupPin:"Configurer le code PIN",enterNewPinDescription:"Entrez un code PIN composé d'au moins 6 chiffres",confirmPin:"Confirmer le code PIN",confirmPinDescription:"Saisissez à nouveau votre code PIN pour confirmer",invalidPinFormat:"Format de code PIN invalide",pinMismatch:"Les codes PIN ne correspondent pas",incorrectPin:"Code PIN incorrect, {{attemptsRemaining}} tentatives restantes.",incorrectPinSingular:"Code PIN incorrect. 1 tentative restante.",enableSuccess:"Déverrouillage par code PIN activé avec succès!",pinLocked:"Le déverrouillage par code PIN a été désactivé. Veuillez utiliser votre mot de passe maître pour déverrouiller votre coffre.",pinSecurityWarning:"Le déverrouillage par code PIN dans l'extension du navigateur peut être moins sécurisé que votre mot de passe principal, car les codes PIN ont généralement une entropie plus faible et peuvent être trouvés par brute force si votre appareil est compromis. Ne l'utilisez que sur les appareils de confiance totale."}},VT={passkey:"Clé d'accès",site:"Site",helpText:"Les clés d'accès sont créées sur le site Web lorsque vous y êtes invité. Elles ne peuvent pas être modifiées manuellement. Pour supprimer cette clé d'accès, vous pouvez la supprimer de cet identifiant. Pour remplacer cette clé d'accès ou en créer une nouvelle, visitez le site Web et suivez ses instructions.",passkeyMarkedForDeletion:"Clé d'accès marquée pour suppression",passkeyWillBeDeleted:"Cette clé d'accès sera supprimée lorsque vous enregistrerez cet identifiant.",useBrowserPasskey:"Utiliser la clé d'accès du navigateur",bypass:{description:"Combien de temps souhaitez-vous utiliser le fournisseur de clé d'accès du navigateur pour {{origin}}?",thisTimeOnly:"Cette fois seulement",alwaysForSite:"Toujours pour ce site"},authenticate:{title:"Se connecter avec une clé d’accès",signInFor:"Se connecter avec une clé d’accès pour",selectPasskey:"Sélectionnez une clé d'accès pour vous connecter:",noPasskeysFound:"Aucune clé d'accès trouvée pour ce site"},create:{title:"Créer une clé d'accès",createFor:"Créer une nouvelle clé d'accès pour",titleLabel:"Titre",titlePlaceholder:"Entrez un nom pour cette clé d'accès",createButton:"Créer clé d'accès",selectPasskeyToReplace:"Sélectionnez une clé d'accès à remplacer:",createNewPasskey:"Créer une nouvelle clé d'accès",replacingPasskey:"Remplacement de la clé d'accès : {{displayName}}",confirmReplace:"Confirmer le remplacement",selectExistingLogin:"Ajouter à l'identifiant existant :",selectExistingLoginDescription:"Joindre cette clé d'accès à un identifiant de connexion existant pour ce site.",attachingToCredential:"Ajout de la clé d'accès à : {{serviceName}}",attachPasskey:"Ajouter une clé d'accès"},settings:{passkeyProvider:"Fournisseur de clés d'accès",passkeyProviderOn:"Fournisseur de clé d'accès activé "}},GT={title:"Supprimé récemment",noItems:"Aucun élément supprimé",noItemsDescription:"Les éléments que vous supprimez apparaîtront ici pendant 30 jours avant d'être définitivement supprimés.",description:"Ces éléments seront définitivement supprimés après 30 jours. Vous pouvez les restaurer ou les supprimer immédiatement.",restore:"Restaurer",deletePermanently:"Supprimer définitivement",emptyAll:"Vider tout",daysRemaining_one:"{{count}} jour restant",daysRemaining_other:"{{count}} jours restants",expiringSoon:"Expirant bientôt",confirmDeleteTitle:"Supprimer définitivement?",confirmDeleteMessage:"Cet élément sera définitivement supprimé et ne pourra pas être récupéré.",confirmEmptyAllTitle:"Vider récemment supprimé ?",confirmEmptyAllMessage:"Tous les {{count}} éléments seront définitivement supprimés et ne pourront pas être récupérés."},KT={title:"Mettre à niveau le coffre",subtitle:"AliasVault a mis à jour et votre coffre doit être mis à niveau. Cela ne devrait prendre que quelques secondes.",versionInformation:"Informations de version",yourVault:"Votre version de coffre-fort :",newVersion:"Nouvelle version valable :",upgrade:"Mettre le coffre à niveau",upgrading:"Mise à niveau...",whatsNew:"Nouveautés",whatsNewDescription:"Une mise à niveau est nécessaire pour prendre en charge les modifications suivantes :",noDescriptionAvailable:"Aucune description disponible pour cette version.",alerts:{unableToGetVersionInfo:"Impossible d'obtenir les informations de version. Veuillez réessayer.",selfHostedServer:"Serveur auto-hébergé",selfHostedWarning:"Si vous utilisez un serveur auto-hébergé, assurez-vous également de mettre à jour votre instance auto-hébergée, sinon la connexion au client web cessera de fonctionner.",continueUpgrade:"Continuer la mise à jour",upgradeFailed:"Échec de la mise à niveau",failedToApplyMigration:"Impossible d'appliquer la migration ({{current}} sur {{total}})"}},qT={unsyncedChangesTitle:"Changements non synchronisés",unsyncedChangesWarning:"Vous avez des modifications non synchronisées qui seront perdues si vous vous déconnectez maintenant. Êtes-vous sûr de vouloir continuer ?",logoutAnyway:"Se déconnecter quand même"},WT={auth:BT,menu:UT,common:MT,content:_T,items:FT,itemTypes:OT,fieldLabels:jT,totp:PT,attachmentUploader:HT,emails:zT,settings:QT,passkeys:VT,recentlyDeleted:GT,upgrade:KT,logout:qT},YT={loginTitle:"כניסה ל־AliasVault",username:"שם משתמש או דוא״ל",usernamePlaceholder:"שם / name@company.com",passwordPlaceholder:"נא למלא את הסיסמה שלך",rememberMe:"לזכור אותי",loginButton:"כניסה",noAccount:"אין לך חשבון עדיין?",createVault:"יצירת כספת חדשה",twoFactorTitle:"נא למלא את קוד האימות מיישומון המאמת שלך.",authCode:"קוד אימות",authCodePlaceholder:"נא למלא קוד באורך 6 ספרות",verify:"אימות",twoFactorNote:"לתשומת ליבך: אם אין לך גישה להתקן המאמת (authenticator) שלך, אפשר לאפס אימות דו־שלבי עם קוד שחזור על ידי כניסה דרך האתר.",masterPassword:"סיסמת על",unlockVault:"שחרור נעילה",unlockWithPin:"שחרור נעילה עם קוד אישי",enterPinToUnlock:"נא למלא את הקוד האישי שלך כדי לשחרר את הכספת שלך",useMasterPassword:"להשתמש בסיסמה על",unlockTitle:"שחרור נעילת הכספת שלך",logoutConfirm:"לצאת?",unlockSuccessTitle:"נעילת הכספת שלך נפתחה בהצלחה",unlockSuccessDescription:"מעתה ניתן להשתמש בהשלמה אוטומטית בטופסי כניסה בדפדפן שלך.",closePopup:"סגירת החלונית הצצה הזאת",browseVault:"עיון בתוכן הכספת",connectingTo:"מתבצעת התחברות אל",switchAccounts:"להחליף חשבונות?",loginWithMobile:"Log in using Mobile App",unlockWithMobile:"Unlock using Mobile App",scanQrCode:"Scan this QR code with your AliasVault mobile app to log in and unlock your vault.",errors:{invalidCode:"נא למלא קוד אימות באורך 6 ספרות.",serverError:"לא ניתן ליצור קשר עם השרת של AliasVault. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",wrongPassword:"סיסמה שגויה. נא לנסות שוב.",sessionExpired:"תוקף ההפעלה שלך פג. נא להיכנס מחדש.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and try again."}},JT={vault:"Vault",emails:"הודעות דוא״ל"},XT={loading:"בטעינה…",notice:"לתשומת ליבך",error:"שגיאה",cancel:"ביטול",confirm:"אישור",back:"חזרה",next:"הבא",use:"להשתמש",add:"Add",delete:"מחיקה",undo:"הסגה",save:"שמירה",saving:"Saving...",create:"יצירה",or:"או",close:"סגירה",logout:"יציאה",copied:"הועתק!",openInNewWindow:"פתיחה בחלון חדש",enabled:"פעיל",disabled:"כבוי",showPassword:"הצגת סיסמה",hidePassword:"הסתרת סיסמה",showDetails:"הצגת פרטים",hideDetails:"הסתרת פרטים",copyToClipboard:"העתקה ללוח הגזירים",loadingEmails:"הודעות הדוא״ל נטענות…",loadingTotpCodes:"הקודים החד־פעמיים הזמניים נטענים…",attachments:"צרופות",loadingAttachments:"הצרופות נטענות…",settings:"הגדרות",recentEmails:"הודעות דוא״ל אחרונות",credentials:"פרטי גישה",customFields:"Custom Fields",twoFactorAuthentication:"אימות דו־שלבי",alias:"כינוי",notes:"הערות",email:"דוא״ל",username:"שם משתמש",password:"סיסמה",generate:"Generate",serviceName:"שם השירות",loggedIn:"נכנסת",syncingVault:"הכספת מסתנכרת",checkingVaultUpdates:"מתבצעת בדיקה לשינויים בכספת",syncingUpdatedVault:"הכספת העדכנית מסתנכרת",loadMore:"לטעון עוד",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"שרת ה־AliasVault לא זמין. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",clientVersionNotSupported:"הגרסה הזאת של הרחבת הדפדפן של AliasVault לא נתמכת עוד על ידי השרת. נא לעדכן את הרחבת הדפדפן שלך לגרסה העדכנית ביותר.",browserExtensionOutdated:"הרחבת הדפדפן הזאת לא עדכנית ואי אפשר להשתמש בה כדי לגשת לכספת הזאת. נא לעדכן את הרחבת הדפדפן הזאת כדי להמשיך.",serverVersionNotSupported:"יש לעדכן את שרת AliasVault לגרסה חדשה יותר כדי להשתמש בהרחבת הדפדפן הזאת. נא ליצור קשר עם התמיכה לקבלת עזרה.",serverVersionTooOld:"The AliasVault server needs to be updated to a newer version in order to use this feature. Please contact the server admin if you need help.",unknownError:"אירעה שגיאה לא ידועה",unknownErrorTryAgain:"אירעה שגיאה לא ידועה, נא לנסות שוב.",vaultNotAvailable:"הכספת לא זמינה",vaultIsLocked:"הכספת נעולה",passwordChanged:"הסיסמה שלך השתנתה מאז הפעם האחרונה שנכנסת למערכת. נא להיכנס שוב מטעמי אבטחת מידע.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again."},apiErrors:{UNKNOWN_ERROR:"אירעה שגיאה לא ידועה, נא לנסות שוב.",ACCOUNT_LOCKED:"החשבון נעול זמנית עקב ריבוי ניסיונות כושלים. נא לנסות שוב מאוחר יותר.",ACCOUNT_BLOCKED:"החשבון שלך הושבת. אם לדעתך מדובר בטעות, נא ליצור קשר עם התמיכה.",USER_NOT_FOUND:"שם המשתמש או הסיסמה שגויים. נא לנסות שוב.",INVALID_AUTHENTICATOR_CODE:"קוד מאמת שגוי. נא לנסות שוב.",INVALID_RECOVERY_CODE:"קוד שחזור שגוי. נא לנסות שוב.",REFRESH_TOKEN_REQUIRED:"אסימון ריענון חובה.",INVALID_REFRESH_TOKEN:"אסימון ריענון שגוי.",PUBLIC_REGISTRATION_DISABLED:"רישום חשבון חדש מושבת כרגע בשרת הזה. נא ליצור קשר עם ההנהלה.",USERNAME_REQUIRED:"שם משתמש חובה.",USERNAME_ALREADY_IN_USE:"שם המשתמש כבר תפוס.",USERNAME_AVAILABLE:"שם המשתמש פנוי.",USERNAME_MISMATCH:"שם המשתמש לא מתאים למשתמש הנוכחי.",PASSWORD_MISMATCH:"הסיסמה שסופקה לא תואמת לסיסמה הנוכחית שלך.",ACCOUNT_SUCCESSFULLY_DELETED:"החשבון נמחק בהצלחה.",USERNAME_EMPTY_OR_WHITESPACE:"שם המשתמש לא יכול להיות ריק או מורכב מרווחים בלבד.",USERNAME_TOO_SHORT:"שם המשתמש קצר מדי: חייב להיות באורך 3 תווים לפחות.",USERNAME_TOO_LONG:"שם המשתמש ארוך מדי: לא יכול להיות ארוך מ־40 תווים.",USERNAME_INVALID_EMAIL:"כתובת דוא״ל שגויה.",USERNAME_INVALID_CHARACTERS:"שם המשתמש שגוי, יכול להכיל רק תווים או ספרות.",VAULT_NOT_UP_TO_DATE:"הכספת שלך אינה עדכנית. נא לסנכרן את הכספת שלך ולנסות שוב.",INTERNAL_SERVER_ERROR:"שגיאת שרת פנימית.",VAULT_ERROR:"הכספת המקומית אינה עדכנית. נא לסנכרן את הכספת שלך על ידי ריענון העמוד ולנסות שוב."}},$T={or:"או",new:"חדש",vaultLocked:"AliasVault נעול.",creatingNewAlias:"נוצר כינוי חדש...",noMatchesFound:"לא נמצאו תוצאות",searchVault:"חיפוש בכספת…",enterServiceName:"נא למלא את שם השירות",enterEmailAddress:"נא למלא כתובת דוא״ל",enterUsername:"נא למלא שם משתמש",hideFor1Hour:"הסתרה למשך שעה (האתר הנוכחי)",hidePermanently:"הסתרה לצמיתות (האתר הנוכחי)",createRandomAlias:"יצירת כינוי אקראי",createUsernamePassword:"יצירת שם משתמש/סיסמה",randomAlias:"כינוי אקראי",usernamePassword:"שם משתמש/סיסמה",createAndSaveAlias:"יצירה ושמירה של כינוי",createAndSaveCredential:"יצירה ושמירה של פרטי גישה",randomIdentityDescription:"יצירת זהות אקראית עם כתובת דוא״ל אקראית שנגישה דרך AliasVault.",randomIdentityDescriptionDropdown:"זהות אקראיות עם דוא״ל אקראי",manualCredentialDescription:"נא לציין כתובת דוא״ל ושם משתמש משלך.",manualCredentialDescriptionDropdown:"שם משתמש וסיסמה ידניים",failedToCreateIdentity:"יצירת הזהות נכשלה. נא לנסות שוב.",enterEmailAndOrUsername:"נא למלא דוא״ל ו/או שם משתמש",autofillWithAliasVault:"השלמה אוטומטית עם AliasVault",generateRandomPassword:"יצירת סיסמה אקראית (העתקה ללוח הגזירים)",generateNewPassword:"יצירת סיסמה חדשה",togglePasswordVisibility:"הצגת/הסתרת סיסמה",passwordCopiedToClipboard:"הסיסמה הועתקה ללוח הגזירים",openAliasVaultToUpgrade:"יש לפתוח את AliasVault כדי לשדרג",vaultUpgradeRequired:"יש לשדרג את הכספת.",dismissPopup:"התעלמות מחלונית"},ZT={title:"Items",itemName:"שם",loginCredentials:"פרטי הגישה",cardInformation:"Card Information",addItem:"Add Item",addNewItem:"Add new item",saveItem:"Save Item",itemDetails:"Item Details",editItem:"Edit Item",untitled:"Untitled",newFolder:"New Folder",createFolder:"יצירת תיקייה",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"תיקייה",welcomeTitle:"ברוך בואך ל־AliasVault!",welcomeDescription:"כדי להשתמש בהרחבת הדפדפן של AliasVault: יש לנווט לאתר ולהשתמש בחלונית ההשלמה האוטומטית של AliasVault כדי ליצור פרטי גישה חדשים.",noPasskeysFound:"No passkeys have been created yet. Passkeys are created by visiting a website that offers passkeys as an authentication method.",noAttachmentsFound:"No items with attachments found",noItemsOfTypeFound:"No {{type}} items found",noMatchingItems:"No matching items found",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{all:"(All) Items",passkeys:"Passkeys"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Delete Item",deleteItemConfirm:"Are you sure you want to delete this item?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"תגיות",changePasswordComplexity:"החלפת מורכבת הסיסמה",passwordLength:"אורך הסיסמה",includeLowercase:"לכלול אותיות קטנות",includeUppercase:"לכלול אותיות גדולות",includeNumbers:"לכלול מספרים",includeSpecialChars:"לכלול תווים מיוחדים",avoidAmbiguousChars:"עדיף להימנע מאותיות וספרות שדומים זה לזה (o,‏ 0 וכו׳)",privateEmailTitle:"כתובת דוא״ל פרטית",privateEmailAliasVaultServer:"שרת AliasVault",privateEmailDescription:"הצפנה מקצה לקצה, פרטיות מלאה.",publicEmailTitle:"ספקי תיבת דוא״ל זמנית ציבוריים",publicEmailDescription:"פרטיות אלמונית אך מוגבלת. תוכן הדוא״ל נגיש לכל מי שיודע את הכתובת.",validation:{required:"שדה חובה"}},eS={selectType:"Add New Item",typeLabel:"Item Type",creating:"Creating",editing:"Editing",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Field Label",enterFieldName:"Enter field name",fieldType:"Field Type",fieldTypes:{text:"Text",hidden:"Hidden (masked text)",email:"דוא״ל",url:"URL",phone:"Phone",number:"Number",date:"תאריך",textArea:"Text Area"},login:{title:"כניסה"},alias:{title:"כינוי"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},tS={"login.url":"Website URL","login.username":"שם משתמש","login.password":"סיסמה","alias.first_name":"שם פרטי","alias.last_name":"שם משפחה","alias.gender":"מגדר","alias.birthdate":"תאריך לידה","login.email":"דוא״ל","notes.content":"הערות","card.cardholder_name":"Cardholder Name","card.number":"Card Number","card.expiry_month":"Expiry Month","card.expiry_year":"Expiry Year","card.cvv":"CVV","card.pin":"PIN"},aS={addCode:"Add 2FA Code",instructions:"Enter the secret key shown by the website where you want to add two-factor authentication.",nameOptional:"שם (רשות)",secretKey:"מפתח סודי",saveToViewCode:"יש לשמור כדי לצפות בקוד",defaultName:"Authenticator",errors:{invalidSecretKey:"Invalid secret key format."}},nS={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},rS={title:"הודעות דוא״ל",deleteEmailTitle:"מחיקת הודעת דוא״ל",deleteEmailConfirm:"למחוק את הודעת הדוא״ל הזאת לצמיתות?",from:"מאת",to:"אל",date:"תאריך",emailContent:"תוכן הודעת דוא״ל",emailNotFound:"הודעת הדוא״ל לא נמצאה",noEmails:"לא נמצאו הודעות דוא״ל",noEmailsDescription:"לא קיבלת הודעות דוא״ל כלשהן לכתובות הדוא״ל הפרטיות שלך עדיין. כשמגיעה הודעה חדשה היא תופיע כאן.",offlineMessage:"החיבור שלך מנותק. נא להתחבר לאינטרנט כדי לטעון את הודעות הדוא״ל שלך.",dateFormat:{justNow:"ממש הרגע",minutesAgo_single:"לפני דקה",minutesAgo_plural:"לפני {{count}} דקות",hoursAgo_single:"לפני שעה",hoursAgo_plural:"לפני {{count}} שעות",yesterday:"אתמול"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"כתובת הדוא״ל שנבחרה תפוסה. נא לשנות את כתובת הדוא״ל על ידי עריכת פרטי הגישה.",CLAIM_DOES_NOT_EXIST:"אירעה שגיאה בניסיון לטעון את הודעות הדוא״ל. נא לנסות לערוך ולשמור את רשומת פרטי הקשר כדי לסנכרן את מסד הנתונים ואז לנסות שוב."}},iS={serverUrl:"כתובת שרת",language:"שפה",autofillEnabled:"הפעלת השלמה אוטומטית",version:"גרסה",openWebApp:"פתיחת אתר",lock:"נעילה",globalSettings:"הגדרות מקיפות",autofillPopup:"חלונית השלמה אוטומטית",activeOnAllSites:"פעיל בכל האתרים (למעט אם נכבה להלן)",disabledOnAllSites:"כבוי בכל האתרים",rightClickContextMenu:"תפריט הקשר בלחיצה ימנית",autofillMatching:"התאמת השלמה אוטומטית",autofillMatchingMode:"מצב התאמת השלמה אוטומטית",autofillMatchingModeDescription:"הגדרה אילו פרטי גישה נחשבים תואמים ויופיעו כהצעות בחלונית ההשלמה האוטומטית לאתר מסוים.",autofillMatchingDefault:"כתובת + שם תת־תחום + תו כל על שם",autofillMatchingUrlSubdomain:"כתובת + שם תת־תחום",autofillMatchingUrlExact:"תחום כתובת מדויקת בלבד",siteSpecificSettings:"הגדרות תואמות אתר",autofillPopupOn:"חלונית השלמה אוטומטית ב־: ",enabledForThisSite:"פעיל לאתר הזה",disabledForThisSite:"כבוי לאתר הזה",temporarilyDisabledUntil:"כבוי זמנית עד ",resetAllSiteSettings:"איפוס כל ההגדרות הנקודתיות לאתרים",appearance:"מראה",theme:"ערכת עיצוב",useDefault:"להשתמש בברירת המחדל",light:"בהירה",dark:"כהה",keyboardShortcuts:"קיצורי מקלדת",configureKeyboardShortcuts:"הגדרת קיצורי מקלדת",configure:"הגדרה",clipboardClearTimeout:"לפנות את לוח הגזירים לאחר העתקה",clipboardClearTimeoutDescription:"לפנות את לוח הגזירים אוטומטית לאחר העתקת נתונים רגישים",clipboardClearDisabled:"אף פעם לא לפנות",clipboardClear5Seconds:"לפנות אחרי 5 שניות",clipboardClear10Seconds:"לפנות אחרי 10 שניות",clipboardClear15Seconds:"לפנות אחרי 15 שניות",autoLockTimeout:"תום המתנה לנעילה אוטומטית",autoLockTimeoutDescription:"לנעול את הכספת אוטומטית לאחר פרק זמן של חוסר פעילות",autoLockTimeoutHelp:"הכספת תינעל רק לאחר משך זמן של חוסר פעילות (אין שימוש בהשלמה אוטומטית או פתיחת חלונית הרחבה). הכספת תמיד תינעל עם סגירת הדפדפן, ללא תלות בהגדרה הזאת.",autoLockNever:"אף פעם",autoLock15Seconds:"15 שניות",autoLock1Minute:"דקה",autoLock5Minutes:"5 דקות",autoLock15Minutes:"15 דקות",autoLock30Minutes:"30 דקות",autoLock1Hour:"שעה",autoLock4Hours:"4 שעות",autoLock8Hours:"8 שעות",autoLock24Hours:"24 שעות",versionPrefix:"גרסה ",autofillSettings:"הגדרות השלמה אוטומטית",clipboardSettings:"הגדרות לוח הגזירים",contextMenuSettings:"הגדרות תפריט הקשר",passkeySettings:"Passkey Settings",contextMenu:"תפריט הקשר",contextMenuEnabled:"תפריט הקשר פעיל",contextMenuDisabled:"תפריט הקשר כבוי",contextMenuDescription:"ניתן ללחוץ על שדה עם הלחצן הימני כדי לגשת לאפשרויות AliasVault",selectLanguage:"בחירת שפה",serverConfiguration:"הגדרות שרת",serverConfigurationDescription:"הגדרת כתובת שרת AliasVault לעותקים באירוח עצמי",customApiUrl:"כתובת API",customClientUrl:"כתובת לקוח",apiUrlHint:"נקודת הקצה של ה־API (בדרך כלל כתובת לקוח + ‎/api)",clientUrlHint:"כתובת ממשק המשתמש הדפדפני של העותק באירוע העצמי שלך",autofillSettingsDescription:"הפעלת או כיבוי חלוניות השלמה אוטומטית בעמודי אתרים",autofillEnabledDescription:"הצעות השלמה אוטומטית בטופסי כניסה למערכות",autofillDisabledDescription:"הצעות השלמה אוטומטית כבויות באופן מקיף",languageSettings:"שפה",validation:{apiUrlRequired:"כתובת API חובה",apiUrlInvalid:"נא למלא כתובת API תקפה",clientUrlRequired:"כתובת לקוח חובה",clientUrlInvalid:"נא למלא כתובת לקוח תקפה"},identityGenerator:"מייצר זהויות",identityGeneratorSettings:{description:"להגדיר את העדפת השפה והמגדר ליצירת זהויות חדשות כברירת מחדל.",languageSection:"שפה",languageDescription:"נא להגדיר את השפה שתשמש ליצירת זהויות חדשות.",genderSection:"מגדר",genderDescription:"להגדיר את אפשרויות המגדר ליצירת זהויות חדשות.",ageRangeSection:"טווח גילים",ageRangeDescription:"הגדרת טווח גילים ליצירת זהויות חדשות.",genderOptions:{random:"אקראי",male:"זכר",female:"נקבה"}},unlockMethod:{title:"שיטת שחרור נעילת כספת",introText:"Choose how you want to unlock your vault. You can use your master password (always available) or set up a PIN code for faster access. After 3 failed PIN attempts, you'll need to use your master password.",password:"סיסמת על",pin:"קוד אישי",pinDescription:"שחרור כספת עם קוד אישי",setupPin:"הגדרת קוד גישה אישי",enterNewPinDescription:"נא למלא קוד אישי שמורכב מ־6 ספרות לפחות",confirmPin:"אישור קוד אישי",confirmPinDescription:"נא למלא את הקוד האישי שלך שוב לאישור",invalidPinFormat:"תבנית הקוד האישי שגויה",pinMismatch:"הקודים האישיים לא תואמים",incorrectPin:"קוד אישי שגוי. נותרו {{attemptsRemaining}} ניסיונות.",incorrectPinSingular:"קוד אישי שגוי. נותר עוד ניסיון.",enableSuccess:"שחרור קוד אישי הופעל בהצלחה!",pinLocked:"שחרור נעילה עם קוד אישי הושבתה. נא להשתמש בסיסמת העל שלך כדי לשחרר את הכספת שלך.",pinSecurityWarning:"PIN unlock in the browser extension can be less secure than your master password, as PINs typically have lower entropy and may be brute-forced if your device is compromised. Use it only on devices you fully trust."}},sS={passkey:"Passkey",site:"אתר",helpText:"Passkeys are created on the website when prompted. They cannot be manually edited. To remove this passkey, you can delete it from this credential. To replace this passkey or create a new one, visit the website and follow its prompts.",passkeyMarkedForDeletion:"Passkey marked for deletion",passkeyWillBeDeleted:"This passkey will be deleted when you save this credential.",useBrowserPasskey:"Use Browser Passkey",bypass:{description:"How long would you like to use the browser's passkey provider for {{origin}}?",thisTimeOnly:"בפעם הזאת בלבד",alwaysForSite:"תמיד לאתר הזה"},authenticate:{title:"Sign in with Passkey",signInFor:"Sign in with passkey for",selectPasskey:"Select a passkey to sign in:",noPasskeysFound:"No passkeys found for this site"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"כותרת",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"אישור החלפה",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},oS={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},lS={title:"שדרוג כספת",subtitle:"AliasVault התעדכן וצריך לשדרג את הכספת שלך. הפעולה הזאת אמורה לארוך מספר שניות.",versionInformation:"פרטי גרסה",yourVault:"גרסת הכספת שלך:",newVersion:"הגרסה החדשה הזמינה:",upgrade:"שדרוג כספת",upgrading:"משתדרגת…",whatsNew:"מה חדש",whatsNewDescription:"יש לשדרג כדי שתהיה תמיכה בשינויים הבאים:",noDescriptionAvailable:"אין תיאור זמין לגרסה הזאת.",alerts:{unableToGetVersionInfo:"לא ניתן לקבל את פרטי הגרסה. נא לנסות שוב מאוחר יותר.",selfHostedServer:"שרת באירוח עצמי",selfHostedWarning:"אם מדובר בשרת שמתארח עצמאית, נא לוודא שהעותק שמתארח אצלך גם כן מתעדכן כי אחרת הכניסה לאתר תפסיק לעבוד.",continueUpgrade:"להמשיך בשדרוג",upgradeFailed:"השדרוג נכשל",failedToApplyMigration:"החלת ההסבה נכשלה ({{current}} מתוך {{total}})"}},cS={unsyncedChangesTitle:"Unsynced Changes",unsyncedChangesWarning:"You have unsynced changes that will be lost if you log out now. Are you sure you want to continue?",logoutAnyway:"Log out anyway"},uS={auth:YT,menu:JT,common:XT,content:$T,items:ZT,itemTypes:eS,fieldLabels:tS,totp:aS,attachmentUploader:nS,emails:rS,settings:iS,passkeys:sS,recentlyDeleted:oS,upgrade:lS,logout:cS},dS={loginTitle:"Accedi ad AliasVaultriem",username:"Nome utente o mail",usernamePlaceholder:"nome / nome@azienda.com",passwordPlaceholder:"Inserisci la tua password",rememberMe:"Ricordati di me",loginButton:"Accedi",noAccount:"Non hai ancora un account?",createVault:"Crea una nuova cassaforte",twoFactorTitle:"Inserisci il codice di autenticazione dalla tua app di autenticazione.",authCode:"Codice di Autenticazione",authCodePlaceholder:"Inserisci il codice a 6 cifre",verify:"Verifica",twoFactorNote:"Nota: se non hai accesso al tuo dispositivo di autenticazione, puoi reimpostare il tuo 2FA con un codice di recupero accedendo tramite il sito web.",masterPassword:"Password principale",unlockVault:"Sblocca",unlockWithPin:"Sblocca con PIN",enterPinToUnlock:"Inserisci il PIN per sbloccare la cassaforte",useMasterPassword:"Usa La Password Principale",unlockTitle:"Sblocca la tua cassaforte",logoutConfirm:"Sei sicuro di volerti disconnettere?",unlockSuccessTitle:"La cassaforte è stata sbloccata con successo",unlockSuccessDescription:"Ora puoi usare l'auto-riempimento nei moduli di accesso nel tuo browser.",closePopup:"Chiudi questo popup",browseVault:"Sfoglia i contenuti della cassaforte",connectingTo:"Connessione a",switchAccounts:"Cambia account",loginWithMobile:"Accedi con l'App Mobile",unlockWithMobile:"Sblocca con l'App Mobile",scanQrCode:"Scansiona questo codice QR con l'app mobile di AliasVault per accedere e sbloccare la cassaforte.",errors:{invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile connettersi al server di AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",wrongPassword:"Password non corretta. Riprova nuovamente.",sessionExpired:"La tua sessione è scaduta. Effettua di nuovo il login.",mobileLoginRequestExpired:"Richiesta di accesso mobile scaduta. Per favore ricarica la pagina e riprova."}},mS={vault:"Cassaforte",emails:"E-Mail"},gS={loading:"Caricamento in corso...",notice:"Avviso",error:"Errore",cancel:"Annulla",confirm:"Conferma",back:"Indietro",next:"Avanti",use:"Usa",add:"Aggiungi",delete:"Elimina",undo:"Annulla",save:"Salva",saving:"Salvataggio...",create:"Creare",or:"O",close:"Chiudi",logout:"Esci",copied:"Copiato!",openInNewWindow:"Apri in una nuova finestra",enabled:"Abilitato",disabled:"Disabilitato",showPassword:"Mostra password",hidePassword:"Nascondi password",showDetails:"Mostra dettagli",hideDetails:"Nascondi dettagli",copyToClipboard:"Copia negli appunti",loadingEmails:"Caricamento e-mail in corso...",loadingTotpCodes:"Caricamento codici TOTP in corso...",attachments:"Allegati",loadingAttachments:"Caricamento allegati in corso...",settings:"Impostazioni",recentEmails:"E-mail recenti",credentials:"Credenziali",customFields:"Campi Personalizzati",twoFactorAuthentication:"Autenticazione a due fattori",alias:"Alias",notes:"Note",email:"E-mail",username:"Nome utente",password:"Password",generate:"Genera",serviceName:"Nome Servizio",loggedIn:"Accesso effettuato",syncingVault:"Sincronizzazione cassaforte",checkingVaultUpdates:"Controllo aggiornamenti cassaforte",syncingUpdatedVault:"Sincronizzazione cassaforte aggiornata",loadMore:"Carica altro",offline:"Offline",offlineMode:"Funzionamento in modalità offline",pendingSync:"Sincronizzazione...",mergingVaultChanges:"Sincronizzzazione modifiche della cassaforte...",uploadingVault:"Caricamento cassaforte in corso...",errors:{serverNotAvailable:"Il server di AliasVault non è disponibile. Riprova più tardi o contatta il supporto se il problema persiste.",clientVersionNotSupported:"Questa versione dell'estensione del browser AliasVault non è più supportata dal server. Aggiorna l'estensione alla versione più recente.",browserExtensionOutdated:"Questa estensione del browser è obsoleta e non può essere utilizzata per accedere a questa cassaforte. Si prega di aggiornare questa estensione per continuare.",serverVersionNotSupported:"Il server di AliasVault necessita un aggiornamento a una versione più recente per poter usare questa estensione. Contatta il supporto se hai bisogno di assistenza.",serverVersionTooOld:"Il server AliasVault deve essere aggiornato a una versione più recente per poter utilizzare questa app mobile. Se hai bisogno di aiuto, contatta il supporto.",unknownError:"Si è verificato un errore sconosciuto",unknownErrorTryAgain:"Si è verificato un errore sconosciuto. Riprova.",vaultNotAvailable:"Cassaforte non disponibile",vaultIsLocked:"La cassaforte è bloccata",passwordChanged:"La tua password è cambiata dall'ultima volta che hai effettuato l'accesso. Effettua nuovamente l'accesso per motivi di sicurezza.",syncConflictMaxRetries:"Impossibile sincronizzare la cassaforte dopo più tentativi. Riprova più tardi.",mergeFailed:"Sincronizzazione della cassaforte non riuscita. Riprovare."},apiErrors:{UNKNOWN_ERROR:"Si è verificato un errore sconosciuto. Riprova.",ACCOUNT_LOCKED:"Account temporaneamente bloccato a causa di troppi tentativi falliti. Riprova più tardi.",ACCOUNT_BLOCKED:"Il tuo account è stato disabilitato. Se ritieni che sia un errore, contatta il supporto.",USER_NOT_FOUND:"Nome utente o password non validi. Riprova.",INVALID_AUTHENTICATOR_CODE:"Codice di autenticazione non valido. Riprova.",INVALID_RECOVERY_CODE:"Codice di recupero non valido. Riprova.",REFRESH_TOKEN_REQUIRED:"È necessario aggiornare il token.",INVALID_REFRESH_TOKEN:"Token di aggiornamento non valido",PUBLIC_REGISTRATION_DISABLED:"La registrazione di nuovi account è attualmente disabilitata su questo server. Contatta l'amministratore.",USERNAME_REQUIRED:"È richiesto il nome utente.",USERNAME_ALREADY_IN_USE:"Il nome utente è già in uso.",USERNAME_AVAILABLE:"Il nome utente è disponibile.",USERNAME_MISMATCH:"Il nome utente non corrisponde all'utente corrente.",PASSWORD_MISMATCH:"La password fornita non corrisponde alla password attuale.",ACCOUNT_SUCCESSFULLY_DELETED:"Account eliminato con successo.",USERNAME_EMPTY_OR_WHITESPACE:"Il nome utente non può essere vuoto o contenere spazi.",USERNAME_TOO_SHORT:"Nome utente troppo corto: deve contenere almeno 3 caratteri.",USERNAME_TOO_LONG:"Nome utente troppo lungo: non può superare i 40 caratteri.",USERNAME_INVALID_EMAIL:"Indirizzo email non valido.",USERNAME_INVALID_CHARACTERS:"Il nome utente non è valido, può contenere solo lettere o cifre.",VAULT_NOT_UP_TO_DATE:"La tua cassaforte non è aggiornata. Sincronizzala e riprova.",INTERNAL_SERVER_ERROR:"Errore interno del server.",VAULT_ERROR:"La cassaforte locale non è aggiornata. Sincronizzala ricaricando la pagina e riprova."}},fS={or:"o",new:"Nuovo",vaultLocked:"AliasVault è bloccato.",creatingNewAlias:"Creazione nuovo alias...",noMatchesFound:"Nessun risultato trovato",searchVault:"Cerca nella cassaforte...",enterServiceName:"Inserisci nome servizio",enterEmailAddress:"Inserisci indirizzo email",enterUsername:"Inserisci nome utente",hideFor1Hour:"Nascondi per 1 ora (sito corrente)",hidePermanently:"Nascondi permanentemente (sito corrente)",createRandomAlias:"Crea alias casuale",createUsernamePassword:"Crea nome utente/password",randomAlias:"Alias casuale",usernamePassword:"Nome utente/password",createAndSaveAlias:"Crea e salva alias",createAndSaveCredential:"Crea e salva credenziali",randomIdentityDescription:"Genera un'identità casuale con un indirizzo email casuale accessibile in AliasVault.",randomIdentityDescriptionDropdown:"Identità casuale con email casuale",manualCredentialDescription:"Specifica il tuo indirizzo email e nome utente.",manualCredentialDescriptionDropdown:"Nome utente e password manuali",failedToCreateIdentity:"Impossibile creare identità. Riprova.",enterEmailAndOrUsername:"Inserisci email e/o nome utente",autofillWithAliasVault:"Compilazione automatica con AliasVault",generateRandomPassword:"Genera password casuale (copia negli appunti)",generateNewPassword:"Genera nuova password",togglePasswordVisibility:"Mostra/Nascondi password",passwordCopiedToClipboard:"Password copiata negli appunti",openAliasVaultToUpgrade:"Apri AliasVault per aggiornare",vaultUpgradeRequired:"Aggiornamento della cassaforte richiesto.",dismissPopup:"Chiudi finestra"},hS={title:"Elementi",itemName:"Nome",loginCredentials:"Credenziali di accesso",cardInformation:"Informazioni sulla scheda",addItem:"Aggiungi Elemento",addNewItem:"Aggiungi nuovo elemento",saveItem:"Salva Elemento",itemDetails:"Dettagli Elemento",editItem:"Modifica Elemento",untitled:"Senza titolo",newFolder:"Nuova Cartella",createFolder:"Crea cartella",editFolder:"Modifica Cartella",folderName:"Nome Cartella",folderNameRequired:"Il nome della cartella è obbligatorio",folder:"Cartella",welcomeTitle:"Benvenuto in AliasVault!",welcomeDescription:"Per usare l'estensione browser AliasVault: naviga su un sito e usa la finestra di compilazione automatica per creare una nuova credenziale.",noPasskeysFound:"Non sono state ancora create passkey. Le passkey vengono create visitando un sito web che offre le passkey come metodo di autenticazione.",noAttachmentsFound:"Nessun elemento con allegati trovato",noItemsOfTypeFound:"Nessun elemento {{type}} trovato",noMatchingItems:"Nessun elemento corrispondente trovato",noMatchingItemsSearch:'Nessun elemento corrispondente "{{search}}"',noMatchingItemsWithFilter:'Nessun elemento {{filter}} corrispondente "{{search}}"',clearSearch:"Cancella ricerca",clearFilter:"Cancella filtro",emptyFolderHint:"Questa cartella è vuota. Per spostare gli elementi in questa cartella, modificare l'elemento e toccare l'icona della cartella nel campo nome.",allItemsInFolders:"Tutti gli elementi sono organizzati in cartelle. Fare clic su una cartella qui sopra per visualizzare le credenziali o utilizzare la ricerca per trovare elementi specifici.",deleteFolder:"Elimina Cartella",deleteFolderKeepItems:"Elimina solo la cartella",deleteFolderKeepItemsDescription:"Gli elementi verranno spostati nella lista principale.",deleteFolderAndItems:"Elimina cartella e tutti gli elementi",deleteFolderAndItemsDescription:"{{count}} oggetto(i) verrà spostato in Eliminato Recentemente.",filters:{all:"(Tutti) Elementi",passkeys:"Passkey"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Elimina elemento",deleteItemConfirm:"Sei sicuro di voler rimuovere questo elemento?",viewHistory:"Visualizza cronologia",history:"Cronologia",noHistoryAvailable:"Nessuna cronologia disponibile",tags:"Tags",changePasswordComplexity:"Modifica complessità password",passwordLength:"Lunghezza password",includeLowercase:"Includi lettere minuscole",includeUppercase:"Includi lettere maiuscole",includeNumbers:"Includi numeri",includeSpecialChars:"Includi caratteri speciali",avoidAmbiguousChars:"Evita caratteri ambigui (o, 0, ecc.)",privateEmailTitle:"Email Privata",privateEmailAliasVaultServer:"Server AliasVault",privateEmailDescription:"E2E crittografato, completamente privato.",publicEmailTitle:"Fornitori Pubblici di Email Temporanee",publicEmailDescription:"Anonimi ma con privacy ridotta. Accessibile a chiunque conosca l'indirizzo.",validation:{required:"Campo obbligatorio"}},AS={selectType:"Aggiungi Nuovo Elemento",typeLabel:"Tipo Elemento",creating:"Creazione in corso",editing:"Modifica",regenerateAlias:"Rigenera alias",addCustomField:"Aggiungere un campo personalizzato",fieldLabel:"Etichetta del campo",enterFieldName:"Inserisci il nome del campo",fieldType:"Tipo di campo",fieldTypes:{text:"Testo",hidden:"Nascosto (testo mascherato)",email:"Email",url:"URL",phone:"Telefono",number:"Numero",date:"Data",textArea:"Area di testo"},login:{title:"Accesso"},alias:{title:"Alias"},creditCard:{title:"Carta Di Credito"},note:{title:"Nota sicura"}},pS={"login.url":"URL del sito","login.username":"Nome Utente","login.password":"Password","alias.first_name":"Nome","alias.last_name":"Cognome","alias.gender":"Genere","alias.birthdate":"Data di nascita","login.email":"Email","notes.content":"Note","card.cardholder_name":"Nome del titolare della carta","card.number":"Numero della Carta","card.expiry_month":"Mese di Scadenza","card.expiry_year":"Anno di Scadenza","card.cvv":"CVV","card.pin":"PIN"},yS={addCode:"Aggiungi Codice 2FA",instructions:"Inserisci la chiave segreta mostrata dal sito in cui vuoi aggiungere un'autenticazione a due fattori.",nameOptional:"Nome (facoltativo)",secretKey:"Chiave segreta",saveToViewCode:"Salva per visualizzare il codice",defaultName:"Autenticazione",errors:{invalidSecretKey:"Formato chiave segreta non valido."}},ES={uploading:"Caricamento...",uploadSuccess:"File caricati correttamente",deleteSuccess:"Allegato eliminato con successo.",firefoxExpandRequired:"Per caricare i file, usa la finestra estesa.",openExpandedWindow:"Apri Finestra Estesa"},bS={title:"Email",deleteEmailTitle:"Elimina Email",deleteEmailConfirm:"Sei sicuro di voler eliminare definitivamente questa email?",from:"Da",to:"A",date:"Data",emailContent:"Contenuto email",emailNotFound:"Email non trovata",noEmails:"Nessuna email trovata",noEmailsDescription:"Non hai ancora ricevuto email ai tuoi indirizzi email privati. Quando ne riceverai una nuova, apparirà qui.",offlineMessage:"Sei offline. Collegati a internet per caricare le email.",dateFormat:{justNow:"proprio ora",minutesAgo_single:"{{count}} min fa",minutesAgo_plural:"{{count}} min fa",hoursAgo_single:"{{count}} ora fa",hoursAgo_plural:"{{count}} ore fa",yesterday:"ieri"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"L'indirizzo email attualmente scelto è già in uso. Cambia l'indirizzo modificando queste credenziali.",CLAIM_DOES_NOT_EXIST:"Si è verificato un errore durante il caricamento delle email. Prova a modificare e salvare le credenziali per sincronizzare il database, poi riprova."}},IS={serverUrl:"URL del server",language:"Lingua",autofillEnabled:"Abilita compilazione automatica",version:"Versione",openWebApp:"Apri app web",lock:"Blocca",globalSettings:"Impostazioni globali",autofillPopup:"Popup compilazione automatica",activeOnAllSites:"Attivo su tutti i siti (a meno che non sia disabilitato sotto)",disabledOnAllSites:"Disabilitato su tutti i siti",rightClickContextMenu:"Menu contestuale clic destro",autofillMatching:"Riconoscimento campi automatica.",autofillMatchingMode:"Modalità riconoscimento capi automatica",autofillMatchingModeDescription:"Determina quali credenziali vengono considerate corrispondenti e mostrate come suggerimenti nel popup di compilazione automatica per un determinato sito web.",autofillMatchingDefault:"URL + sottodominio + nome wildcard",autofillMatchingUrlSubdomain:"URL + sottodominio",autofillMatchingUrlExact:"Solo dominio URL esatto",siteSpecificSettings:"Impostazioni specifiche per sito",autofillPopupOn:"Finestra compilazione automatica su: ",enabledForThisSite:"Abilitato per questo sito",disabledForThisSite:"Disabilitato per questo sito",temporarilyDisabledUntil:"Disabilitato temporaneamente fino a ",resetAllSiteSettings:"Reimposta tutte le impostazioni specifiche per sito",appearance:"Aspetto",theme:"Tema",useDefault:"Usa predefinito",light:"Chiaro",dark:"Scuro",keyboardShortcuts:"Scorciatoie da tastiera",configureKeyboardShortcuts:"Configura scorciatoie da tastiera",configure:"Configura",clipboardClearTimeout:"Cancella appunti dopo la copia",clipboardClearTimeoutDescription:"Cancella automaticamente gli appunti dopo aver copiato i dati sensibili",clipboardClearDisabled:"Non pulire mai",clipboardClear5Seconds:"Cancella dopo 5 secondi",clipboardClear10Seconds:"Cancella dopo 10 secondi",clipboardClear15Seconds:"Cancella dopo 15 secondi",autoLockTimeout:"Timeout Blocco Automatico",autoLockTimeoutDescription:"Blocca automaticamente la cassaforte dopo un periodo di inattività",autoLockTimeoutHelp:"La cassaforte si bloccherà solo dopo il periodo specificato di inattività (nessun utilizzo di riempimento automatico o estensione popup aperto). La cassaforte si bloccherà sempre quando il browser è chiuso, indipendentemente da questa impostazione.",autoLockNever:"Mai",autoLock15Seconds:"15 secondi",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minuti",autoLock15Minutes:"15 minuti",autoLock30Minutes:"30 minuti",autoLock1Hour:"1 ora",autoLock4Hours:"4 ore",autoLock8Hours:"8 ore",autoLock24Hours:"24 ore",versionPrefix:"Versione ",autofillSettings:"Impostazioni di riempimento automatico",clipboardSettings:"Impostazioni appunti",contextMenuSettings:"Preferenze menu contestuale",passkeySettings:"Impostazioni Passkey",contextMenu:"Menu contestuale",contextMenuEnabled:"Il menu contestuale è attivato",contextMenuDisabled:"Il menu contestuale è disabilitato",contextMenuDescription:"Click destro sui campi di input per accedere alle opzioni di AliasVault",selectLanguage:"Seleziona la lingua",serverConfiguration:"Configurazione del server",serverConfigurationDescription:"Configurare l'URL del server AliasVault per le istanze self-hosted",customApiUrl:"API URL",customClientUrl:"Url Client",apiUrlHint:"L'URL endpoint API (di solito URL client + /api)",clientUrlHint:"L'URL dell'interfaccia web della tua istanza self-hosted",autofillSettingsDescription:"Abilita o disabilita il popup di riempimento automatico sulle pagine web",autofillEnabledDescription:"I suggerimenti di riempimento automatico appariranno nei moduli di accesso",autofillDisabledDescription:"I suggerimenti di riempimento automatico sono disabilitati",languageSettings:"Lingua",validation:{apiUrlRequired:"L'URL API è obbligatorio",apiUrlInvalid:"Inserisci un URL API valido",clientUrlRequired:"L'URL del client è obbligatorio",clientUrlInvalid:"Inserisci un URL del client valido"},identityGenerator:"Generatore di identità",identityGeneratorSettings:{description:"Configura lingua e preferenze di genere per la generazione di nuove identità.",languageSection:"Lingua",languageDescription:"Imposta la lingua usata per generare nuove identità.",genderSection:"Genere",genderDescription:"Imposta la preferenza di genere per generare nuove identità.",ageRangeSection:"Fascia d'età",ageRangeDescription:"Imposta la fascia di età per generare nuove identità.",genderOptions:{random:"Casuale",male:"Maschio",female:"Femmina"}},unlockMethod:{title:"Metodo di sblocco cassaforte",introText:"Scegli come sbloccare la cassaforte. Puoi usare la tua password principale (sempre disponibile) o impostare un codice PIN per un accesso più veloce. Dopo 3 tentativi di PIN falliti, è necessario utilizzare la password principale.",password:"Password Principale",pin:"Codice PIN",pinDescription:"Sblocca la cassaforte con codice PIN",setupPin:"Imposta Codice Pin",enterNewPinDescription:"Inserisci un codice PIN composto da almeno 6 cifre",confirmPin:"Conferma PIN",confirmPinDescription:"Inserisci di nuovo il tuo PIN per confermare",invalidPinFormat:"Formato PIN non valido",pinMismatch:"I PIN non corrispondono",incorrectPin:"PIN errato. {{attemptsRemaining}} tentativi rimanenti.",incorrectPinSingular:"Pin non corretto. 1 tentativo rimanente.",enableSuccess:"Sblocco PIN abilitato con successo!",pinLocked:"Il PIN sblocco è stato disabilitato. Utilizza la tua password principale per sbloccare la cassaforte.",pinSecurityWarning:"Lo sblocco PIN nell'estensione del browser può essere meno sicuro della tua password principale, poichè i PIN hanno tipicamente entropia inferiore e possono essere brutalmente forzati se il dispositivo è compromesso. Usalo solo su dispositivi che ti fidi completamente."}},vS={passkey:"Passkey",site:"Sito",helpText:"Le chiavi di accesso vengono create sul sito web quando richiesto. Non possono essere modificate manualmente. Per rimuovere questa chiave di accesso, è possibile eliminarla da questa credenziale. Per sostituire questa passkey o crearne una nuova, visitare il sito web e seguire i relativi suggerimenti.",passkeyMarkedForDeletion:"Passkey contrassegnata per l'eliminazione",passkeyWillBeDeleted:"Questa passkey verrà eliminata quando si salva questa credenziale.",useBrowserPasskey:"Usa Browser Passkey",bypass:{description:"Per quanto tempo vorresti usare il provider di chiavi di accesso del browser per {{origin}}?",thisTimeOnly:"Solo questa volta",alwaysForSite:"Sempre per questo sito"},authenticate:{title:"Accedi con Passkey",signInFor:"Accedi con passkey per",selectPasskey:"Selezionare una passkey per accedere:",noPasskeysFound:"Nessuna passkey trovata per questo sito"},create:{title:"Crea Passkey",createFor:"Crea una nuova passkey per",titleLabel:"Titolo",titlePlaceholder:"Inserisci un nome per questa passkey",createButton:"Crea Passkey",selectPasskeyToReplace:"Selezionare una chiave di accesso da sostituire:",createNewPasskey:"Crea Nuova Passkey",replacingPasskey:"Sostituzione passkey: {{displayName}}",confirmReplace:"Conferma la sostituzione",selectExistingLogin:"Aggiungere al login esistente:",selectExistingLoginDescription:"Allega questa passkey a una credenziale di accesso esistente per questo sito.",attachingToCredential:"Aggiunta passkey a: {{serviceName}}",attachPasskey:"Aggiungi Passkey"},settings:{passkeyProvider:"Provider Passkey",passkeyProviderOn:"Passkey Provider attivo"}},CS={title:"Eliminato di Recente",noItems:"Nessun elemento eliminato",noItemsDescription:"Gli elementi cancellati appariranno qui per 30 giorni prima di essere rimossi definitivamente.",description:"Questi elementi verranno eliminati definitivamente dopo 30 giorni. È possibile ripristinarli o eliminarli immediatamente.",restore:"Ripristina",deletePermanently:"Elimina Definitivamente",emptyAll:"Svuota Tutto",daysRemaining_one:"{{count}} giorno rimanente",daysRemaining_other:"{{count}} giorni rimanenti",expiringSoon:"In scadenza a breve",confirmDeleteTitle:"Elimina definitivamente?",confirmDeleteMessage:"Questo elemento verrà eliminato definitivamente e non può essere recuperato.",confirmEmptyAllTitle:'Svuotare "Eliminati di recente"?',confirmEmptyAllMessage:"Questi {{count}} elementi verranno eliminati permanentemente e non potranno essere recuperati."},NS={title:"Aggiorna Cassaforte",subtitle:"AliasVault è stato aggiornato e la tua cassaforte deve essere aggiornata. Dovrebbe richiedere solo pochi secondi.",versionInformation:"Informazioni sulla versione",yourVault:"Versione della tua cassaforte:",newVersion:"Nuova versione disponibile:",upgrade:"Aggiorna cassaforte",upgrading:"Aggiornamento in corso...",whatsNew:"Novità",whatsNewDescription:"È richiesto un aggiornamento per supportare le seguenti modifiche:",noDescriptionAvailable:"Nessuna descrizione disponibile per questa versione.",alerts:{unableToGetVersionInfo:"Impossibile ottenere informazioni sulla versione. Riprova.",selfHostedServer:"Server Autospitato",selfHostedWarning:"Se usi un server autospitato, assicurati di aggiornare anche la tua istanza, altrimenti l'accesso al client web smetterà di funzionare.",continueUpgrade:"Continua aggiornamento",upgradeFailed:"Aggiornamento non riuscito",failedToApplyMigration:"Impossibile eseguire la migrazione ({{current}} di {{total}})"}},wS={unsyncedChangesTitle:"Modifiche non Sincronizzate",unsyncedChangesWarning:"Hai delle modifiche non sincronizzate che andranno perse se ti disconnetti ora. Sei sicuro di voler continuare?",logoutAnyway:"Esci comunque"},xS={auth:dS,menu:mS,common:gS,content:fS,items:hS,itemTypes:AS,fieldLabels:pS,totp:yS,attachmentUploader:ES,emails:bS,settings:IS,passkeys:vS,recentlyDeleted:CS,upgrade:NS,logout:wS},TS={loginTitle:"Inloggen bij AliasVault",username:"Gebruikersnaam of e-mail",usernamePlaceholder:"naam / naam@bedrijf.com",passwordPlaceholder:"Voer je wachtwoord in",rememberMe:"Onthoud mij",loginButton:"Inloggen",noAccount:"Nog geen account?",createVault:"Nieuwe vault aanmaken",twoFactorTitle:"Voer de authenticatiecode van je authenticator-app in.",authCode:"Authenticatiecode",authCodePlaceholder:"Voer 6-cijferige code in",verify:"Verifiëren",twoFactorNote:"Opmerking: als je geen toegang hebt tot je authenticator, kunt je je 2FA resetten door met een in te loggen via de website.",masterPassword:"Hoofdwachtwoord",unlockVault:"Ontgrendelen",unlockWithPin:"Ontgrendelen met PIN",enterPinToUnlock:"Voer je pincode in om je vault te ontgrendelen",useMasterPassword:"Gebruik hoofdwachtwoord",unlockTitle:"Ontgrendel je vault",logoutConfirm:"Weet je zeker dat je wilt uitloggen?",unlockSuccessTitle:"Je vault is succesvol ontgrendeld",unlockSuccessDescription:"Je kunt nu automatisch invullen gebruiken in inlogformulieren in je browser.",closePopup:"Sluit deze popup",browseVault:"Bekijk vault inhoud",connectingTo:"Verbinden met",switchAccounts:"Wisselen van account?",loginWithMobile:"Log in via de mobiele app",unlockWithMobile:"Ontgrendel met mobiele app",scanQrCode:"Scan deze QR-code met de AliasVault mobiele app om in te loggen en je kluis te ontgrendelen.",errors:{invalidCode:"Voer een geldige 6-cijferige code in.",serverError:"Kon de AliasVault server niet bereiken. Probeer het later opnieuw of neem contact op met support als het probleem aanhoudt.",wrongPassword:"Onjuist wachtwoord. Probeer het opnieuw.",sessionExpired:"Je sessie is verlopen. Log opnieuw in.",mobileLoginRequestExpired:"Time-out van de mobiele inlogaanvraag. Herlaad de pagina en probeer opnieuw."}},SS={vault:"Vault",emails:"E-mails"},kS={loading:"Laden...",notice:"Melding",error:"Fout",cancel:"Annuleren",confirm:"Bevestigen",back:"Terug",next:"Volgende",use:"Gebruik",add:"Toevoegen",delete:"Verwijderen",undo:"Ongedaan maken",save:"Opslaan",saving:"Opslaan...",create:"Aanmaken",or:"Of",close:"Sluiten",logout:"Uitloggen",copied:"Gekopieerd!",openInNewWindow:"Openen in nieuw venster",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",showDetails:"Toon details",hideDetails:"Verberg details",copyToClipboard:"Naar klembord kopiëren",loadingEmails:"E-mails laden...",loadingTotpCodes:"TOTP-codes laden...",attachments:"Bijlagen",loadingAttachments:"Bijlagen laden...",settings:"Instellingen",recentEmails:"Recente e-mails",credentials:"Credentials",customFields:"Extra velden",twoFactorAuthentication:"Tweestapsverificatie",alias:"Alias",notes:"Notities",email:"E-mail",username:"Gebruikersnaam",password:"Wachtwoord",generate:"Genereren",serviceName:"Naam",loggedIn:"Ingelogd",syncingVault:"Vault synchroniseren",checkingVaultUpdates:"Controleren op vault updates",syncingUpdatedVault:"Bijgewerkte vault synchroniseren",loadMore:"Laad meer",offline:"Offline",offlineMode:"Offline modus",pendingSync:"Synchroniseren...",mergingVaultChanges:"Vault wijzigingen mergen...",uploadingVault:"Vault opslaan...",errors:{serverNotAvailable:"De AliasVault server is niet beschikbaar. Probeer het later opnieuw of neem contact op met de ondersteuning als het probleem aanhoudt.",clientVersionNotSupported:"Deze versie van de AliasVault browserextensie wordt niet meer ondersteund door de server. Update je browserextensie naar de nieuwste versie.",browserExtensionOutdated:"Deze browserextensie is verouderd en kan niet worden gebruikt om toegang te krijgen tot deze vault. Update deze browserextensie om door te gaan.",serverVersionNotSupported:"De AliasVault server moet worden bijgewerkt naar een nieuwere versie om deze browserextensie te kunnen gebruiken. Neem contact op met support als je hulp nodig hebt.",serverVersionTooOld:"De AliasVault server moet bijgewerkt worden naar een nieuwere versie om deze functie te kunnen gebruiken. Neem contact op met support als je hulp nodig hebt.",unknownError:"Er is een onbekende fout opgetreden",unknownErrorTryAgain:"Er is een onbekende fout opgetreden. Probeer het opnieuw.",vaultNotAvailable:"Vault niet beschikbaar",vaultIsLocked:"Vault is vergrendeld",passwordChanged:"Je wachtwoord is veranderd sinds de laatste keer dat je bent ingelogd. Log opnieuw in.",syncConflictMaxRetries:"Kan de vault niet synchroniseren na meerdere pogingen. Probeer het later opnieuw.",mergeFailed:"Samenvoegen vault wijzigingen mislukt. Probeer het opnieuw."},apiErrors:{UNKNOWN_ERROR:"Er is een onbekende fout opgetreden. Probeer het opnieuw.",ACCOUNT_LOCKED:"Account tijdelijk vergrendeld vanwege te veel mislukte pogingen. Probeer het later opnieuw.",ACCOUNT_BLOCKED:"Je account is uitgeschakeld. Als je denkt dat dit een vergissing is, neem dan contact op met support.",USER_NOT_FOUND:"Gebruikersnaam of wachtwoord is onjuist. Probeer het opnieuw.",INVALID_AUTHENTICATOR_CODE:"Ongeldige authenticator code. Probeer het opnieuw.",INVALID_RECOVERY_CODE:"Ongeldige herstelcode. Probeer het opnieuw.",REFRESH_TOKEN_REQUIRED:"Refresh token is vereist.",INVALID_REFRESH_TOKEN:"Ongeldig refresh token.",PUBLIC_REGISTRATION_DISABLED:"Registratie van nieuwe accounts is momenteel uitgeschakeld op deze server. Neem contact op met de beheerder.",USERNAME_REQUIRED:"Gebruikersnaam is vereist.",USERNAME_ALREADY_IN_USE:"Gebruikersnaam is al in gebruik.",USERNAME_AVAILABLE:"Gebruikersnaam is beschikbaar.",USERNAME_MISMATCH:"Gebruikersnaam komt niet overeen met de huidige gebruiker.",PASSWORD_MISMATCH:"Het opgegeven wachtwoord komt niet overeen met je huidige wachtwoord.",ACCOUNT_SUCCESSFULLY_DELETED:"Account succesvol verwijderd.",USERNAME_EMPTY_OR_WHITESPACE:"Gebruikersnaam mag niet leeg zijn of alleen uit spaties bestaan.",USERNAME_TOO_SHORT:"Gebruikersnaam te kort: moet minimaal 3 tekens lang zijn.",USERNAME_TOO_LONG:"Gebruikersnaam te lang: mag niet langer zijn dan 40 tekens.",USERNAME_INVALID_EMAIL:"Ongeldig e-mailadres.",USERNAME_INVALID_CHARACTERS:"Gebruikersnaam is ongeldig, mag alleen letters of cijfers bevatten.",VAULT_NOT_UP_TO_DATE:"Je vault is niet up-to-date. Synchroniseer je vault en probeer het opnieuw.",INTERNAL_SERVER_ERROR:"Interne serverfout.",VAULT_ERROR:"Je lokale vault is niet up-to-date. Synchroniseer je vault door de pagina te vernieuwen en probeer het opnieuw."}},LS={or:"of",new:"Nieuw",vaultLocked:"AliasVault is vergrendeld.",creatingNewAlias:"Nieuwe alias aanmaken...",noMatchesFound:"Geen resultaten gevonden",searchVault:"Vault doorzoeken...",enterServiceName:"Voer servicenaam in",enterEmailAddress:"Voer e-mailadres in",enterUsername:"Voer gebruikersnaam in",hideFor1Hour:"Verberg voor 1 uur (huidige site)",hidePermanently:"Permanent verbergen (huidige site)",createRandomAlias:"Willekeurige alias aanmaken",createUsernamePassword:"Gebruikersnaam/wachtwoord aanmaken",randomAlias:"Alias",usernamePassword:"Gebruikersnaam/wachtwoord",createAndSaveAlias:"Alias aanmaken",createAndSaveCredential:"Credential aanmaken",randomIdentityDescription:"Genereer een willekeurige identiteit met een willekeurig e-mailadres toegankelijk in AliasVault.",randomIdentityDescriptionDropdown:"Willekeurige identiteit met willekeurige e-mail",manualCredentialDescription:"Specificeer je eigen e-mailadres en/of gebruikersnaam.",manualCredentialDescriptionDropdown:"Handmatige gebruikersnaam en wachtwoord",failedToCreateIdentity:"Identiteit aanmaken mislukt. Probeer opnieuw.",enterEmailAndOrUsername:"Voer e-mail en/of gebruikersnaam in",autofillWithAliasVault:"Autofill met AliasVault",generateRandomPassword:"Willekeurig wachtwoord genereren (kopiëren naar klembord)",generateNewPassword:"Genereer nieuw wachtwoord",togglePasswordVisibility:"Schakel zichtbaarheid van wachtwoord in/uit",passwordCopiedToClipboard:"Wachtwoord gekopieerd naar klembord",openAliasVaultToUpgrade:"Open AliasVault om te upgraden",vaultUpgradeRequired:"Update is vereist.",dismissPopup:"Pop-up sluiten"},RS={title:"Items",itemName:"Naam",loginCredentials:"Inloggegevens",cardInformation:"Kaartgegevens",addItem:"Item toevoegen",addNewItem:"Nieuw item toevoegen",saveItem:"Item opslaan",itemDetails:"Item details",editItem:"Item bewerken",untitled:"Naamloos",newFolder:"Nieuwe map",createFolder:"Map aanmaken",editFolder:"Map bewerken",folderName:"Mapnaam",folderNameRequired:"Mapnaam is verplicht",folder:"Map",welcomeTitle:"Welkom bij AliasVault!",welcomeDescription:"Om de AliasVault browser extensie te gebruiken: navigeer naar een website en gebruik de AliasVault autofill popup om nieuwe credentials aan te maken.",noPasskeysFound:"Er zijn nog geen passkeys aangemaakt. Passkeys worden gemaakt door een website te bezoeken die passkeys als een authenticatiemethode biedt.",noAttachmentsFound:"Geen items gevonden met bijlagen",noItemsOfTypeFound:"Geen {{type}} items gevonden",noMatchingItems:"Geen items gevonden",noMatchingItemsSearch:'Geen items die overeenkomen met "{{search}}"',noMatchingItemsWithFilter:'Geen {{filter}} items die overeenkomen met "{{search}}"',clearSearch:"Wis zoekopdracht",clearFilter:"Wis filter",emptyFolderHint:"Deze map is leeg. Om items naar deze map te verplaatsen, wijzig het item en selecteer deze map.",allItemsInFolders:"Al je items zijn georganiseerd in mappen. Klik op een map hierboven om je gegevens te bekijken, of gebruik de zoekopdracht om specifieke items te vinden.",deleteFolder:"Map verwijderen",deleteFolderKeepItems:"Verwijder alleen map",deleteFolderKeepItemsDescription:"Items zullen terug worden verplaatst naar de hoofdlijst.",deleteFolderAndItems:"Verwijder map en alle items",deleteFolderAndItemsDescription:"{{count}} item(s) zullen worden verplaatst naar recent verwijderd.",filters:{all:"(Alle) Items",passkeys:"Passkeys"},sort:{title:"Sorteren op",oldestFirst:"Oudste eerst",newestFirst:"Nieuwste eerst",alphabetical:"Alfabetisch (A-Z)"},deleteItemTitle:"Verwijder item",deleteItemConfirm:"Weet je zeker dat je dit item wilt verwijderen?",viewHistory:"Toon geschiedenis",history:"Geschiedenis",noHistoryAvailable:"Nog geen geschiedenis",tags:"Labels",changePasswordComplexity:"Wijzig wachtwoord complexiteit",passwordLength:"Wachtwoordlengte",includeLowercase:"Inclusief kleine letters",includeUppercase:"Inclusief hoofdletters",includeNumbers:"Inclusief cijfers",includeSpecialChars:"Inclusief speciale karakters",avoidAmbiguousChars:"Onduidelijke tekens vermijden (o, 0, etc.)",privateEmailTitle:"Privé e-mail",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E versleuteld, volledig privé.",publicEmailTitle:"Publieke tijdelijke e-mailproviders",publicEmailDescription:"Anoniem maar beperkte privacy. E-mail inhoud is leesbaar door iedereen die het adres kent.",validation:{required:"Dit veld is verplicht"}},DS={selectType:"Nieuw item toevoegen",typeLabel:"Itemtype",creating:"Aanmaken",editing:"Bewerken",regenerateAlias:"Alias opnieuw genereren",addCustomField:"Voeg eigen veld toe",fieldLabel:"Veldlabel",enterFieldName:"Voer de veldnaam in",fieldType:"Veldtype",fieldTypes:{text:"Tekst",hidden:"Verborgen (gemaskeerde tekst)",email:"E-mail",url:"URL",phone:"Telefoon",number:"Nummer",date:"Datum",textArea:"Tekstvak"},login:{title:"Login"},alias:{title:"Alias"},creditCard:{title:"Creditcard"},note:{title:"Veilige notitie"}},BS={"login.url":"Website URL","login.username":"Gebruikersnaam","login.password":"Wachtwoord","alias.first_name":"Voornaam","alias.last_name":"Achternaam","alias.gender":"Geslacht","alias.birthdate":"Geboortedatum","login.email":"E-mail","notes.content":"Notities","card.cardholder_name":"Naam kaarthouder","card.number":"Kaartnummer","card.expiry_month":"Vervalmaand","card.expiry_year":"Vervaljaar","card.cvv":"CVV","card.pin":"Pincode"},US={addCode:"2FA-code toevoegen",instructions:"Voer de secret key in die door de website wordt weergegeven waar je tweestapsverificatie wilt toevoegen.",nameOptional:"Naam (optioneel)",secretKey:"Secret key",saveToViewCode:"Opslaan om code te bekijken",defaultName:"Authenticator",errors:{invalidSecretKey:"Ongeldig formaat."}},MS={uploading:"Uploaden...",uploadSuccess:"Bestand succesvol geüpload.",deleteSuccess:"Bijlage is succesvol verwijderd.",firefoxExpandRequired:"Gebruik het grote venster om bestanden te uploaden.",openExpandedWindow:"Open groot venster"},_S={title:"E-mails",deleteEmailTitle:"E-mail verwijderen",deleteEmailConfirm:"Weet je zeker dat je deze e-mail definitief wilt verwijderen?",from:"Van",to:"Naar",date:"Datum",emailContent:"E-mailinhoud",emailNotFound:"E-mail niet gevonden",noEmails:"Geen e-mails gevonden",noEmailsDescription:"Je hebt nog geen e-mails ontvangen op je privé e-mailadressen. Wanneer je een nieuwe e-mail ontvangt, zal deze hier verschijnen.",offlineMessage:"Je bent offline. Maak verbinding met het internet om je e-mails te laden.",dateFormat:{justNow:"zojuist",minutesAgo_single:"{{count}} min geleden",minutesAgo_plural:"{{count}} min. geleden",hoursAgo_single:"{{count}} uur geleden",hoursAgo_plural:"{{count}} uur geleden",yesterday:"gisteren"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Het huidige gekozen e-mailadres is al in gebruik. Wijzig het e-mailadres door deze credential te bewerken.",CLAIM_DOES_NOT_EXIST:"Er is een fout opgetreden bij het laden van e-mails. Probeer de credential te bewerken en op te slaan om de database te synchroniseren, en probeer het opnieuw."}},FS={serverUrl:"Server URL",language:"Taal",autofillEnabled:"Autofill",version:"Versie",openWebApp:"Web-app openen",lock:"Vergrendelen",globalSettings:"Globale Instellingen",autofillPopup:"Autofill popup",activeOnAllSites:"Actief voor alle sites (tenzij hieronder uitgeschakeld)",disabledOnAllSites:"Uitgeschakeld op alle sites",rightClickContextMenu:"Rechtermuisknop menu",autofillMatching:"Autofill matching",autofillMatchingMode:"Autofill matching modus",autofillMatchingModeDescription:"Bepaalt op welke manier credentials worden beschouwd als matches en worden getoond als suggestie in de autofill popup voor een bepaalde website.",autofillMatchingDefault:"URL + subdomein + naam wildcard",autofillMatchingUrlSubdomain:"URL + subdomein",autofillMatchingUrlExact:"Exacte URL-domein",siteSpecificSettings:"Site-specifieke Instellingen",autofillPopupOn:"Autofill popup op: ",enabledForThisSite:"Ingeschakeld voor deze site",disabledForThisSite:"Uitgeschakeld voor deze site",temporarilyDisabledUntil:"Tijdelijk uitgeschakeld tot ",resetAllSiteSettings:"Alle site-specifieke instellingen resetten",appearance:"Uiterlijk",theme:"Thema",useDefault:"Standaard gebruiken",light:"Licht",dark:"Donker",keyboardShortcuts:"Snelkoppelingen",configureKeyboardShortcuts:"Snelkoppelingen configureren",configure:"Configureren",clipboardClearTimeout:"Automatisch klembord wissen na kopiëren",clipboardClearTimeoutDescription:"Automatisch het klembord wissen na kopiëren van gevoelige gegevens",clipboardClearDisabled:"Nooit wissen",clipboardClear5Seconds:"Wis na 5 seconden",clipboardClear10Seconds:"Wis na 10 seconden",clipboardClear15Seconds:"Wis na 15 seconden",autoLockTimeout:"Automatisch vergrendelen",autoLockTimeoutDescription:"Vergrendel de vault automatisch na inactiviteit",autoLockTimeoutHelp:"De vault zal alleen vergrendelen na de opgegeven periode van inactiviteit (geen automatisch invullen of extensie geopend). De vault wordt altijd vergrendeld wanneer de browser wordt afgesloten, ongeacht deze instelling.",autoLockNever:"Nooit",autoLock15Seconds:"15 seconden",autoLock1Minute:"1 minuut",autoLock5Minutes:"5 minuten",autoLock15Minutes:"15 minuten",autoLock30Minutes:"30 minuten",autoLock1Hour:"1 uur",autoLock4Hours:"4 uur",autoLock8Hours:"8 uur",autoLock24Hours:"24 uur",versionPrefix:"Versie ",autofillSettings:"Autofill instellingen",clipboardSettings:"Klembord instellingen",contextMenuSettings:"Context menu instellingen",passkeySettings:"Passkey instellingen",contextMenu:"Context menu",contextMenuEnabled:"Context menu is ingeschakeld",contextMenuDisabled:"Context menu is uitgeschakeld",contextMenuDescription:"Klik met de rechtermuisknop op invoervelden om AliasVault opties te zien",selectLanguage:"Selecteer taal",serverConfiguration:"Serverconfiguratie",serverConfigurationDescription:"Configureer de AliasVault server URL voor self-hosted omgevingen",customApiUrl:"API URL",customClientUrl:"Client URL",apiUrlHint:"De API endpoint URL (meestal client URL + /api)",clientUrlHint:"De webinterface URL van je self-hosted omgeving",autofillSettingsDescription:"Schakel de autofill pop-up in of uit op webpagina's",autofillEnabledDescription:"Autofill suggesties verschijnen op login formulieren",autofillDisabledDescription:"Autofill suggesties zijn uitgeschakeld",languageSettings:"Taal",validation:{apiUrlRequired:"API URL is vereist",apiUrlInvalid:"Voer een geldige API URL in",clientUrlRequired:"Client URL is vereist",clientUrlInvalid:"Voer een geldige client URL in"},identityGenerator:"Identiteit generator",identityGeneratorSettings:{description:"Configureer de standaardtaal en geslachtsvoorkeur voor het genereren van nieuwe identiteiten.",languageSection:"Taal",languageDescription:"Stel de taal in die wordt gebruikt bij het genereren van nieuwe identiteiten.",genderSection:"Geslacht",genderDescription:"Stel de geslachtsvoorkeur in voor het genereren van nieuwe identiteiten.",ageRangeSection:"Leeftijdsrange",ageRangeDescription:"Stel de standaard leeftijdsrange in voor het genereren van nieuwe identiteiten.",genderOptions:{random:"Willekeurig",male:"Mannelijk",female:"Vrouwelijk"}},unlockMethod:{title:"Vault ontgrendelmethode",introText:"Kies hoe je je vault wilt ontgrendelen. Je kunt je hoofdwachtwoord gebruiken (altijd beschikbaar) of een pincode instellen voor snellere toegang. Na 3 mislukte PIN-pogingen moet je je hoofdwachtwoord gebruiken.",password:"Hoofdwachtwoord",pin:"Pincode",pinDescription:"Ontgrendel vault met pincode",setupPin:"Pincode instellen",enterNewPinDescription:"Voer een pincode in van minimaal 6 cijfers",confirmPin:"Bevestig pincode",confirmPinDescription:"Voer je pincode nogmaals in om te bevestigen",invalidPinFormat:"Ongeldige pincode",pinMismatch:"Pincodes komen niet overeen",incorrectPin:"Onjuiste PIN. {{attemptsRemaining}} pogingen resterend.",incorrectPinSingular:"Onjuiste PIN. 1 poging resterend.",enableSuccess:"Pincode succesvol ingeschakeld!",pinLocked:"Pincode is uitgeschakeld. Gebruik je hoofdwachtwoord om je kluis te ontgrendelen.",pinSecurityWarning:"Pincode ontgrendeling in de browserextensie kan minder veilig zijn dan je hoofdwachtwoord, omdat een pincode makkelijker kan worden gebruteforced als iemand toegang heeft tot je apparaat. Gebruik deze optie daarom alleen op apparaten die je volledig vertrouwt."}},OS={passkey:"Passkey",site:"Website",helpText:"Passkeys worden aangemaakt op de website wanneer er om wordt gevraagd. Ze kunnen niet handmatig worden bewerkt. Om deze toegangssleutel te verwijderen, kun je deze verwijderen uit deze credential. Om deze passkey te vervangen of een nieuwe te maken, bezoek de website in kwestie en volg de instructies.",passkeyMarkedForDeletion:"Passkey gemarkeerd om te verwijderen",passkeyWillBeDeleted:"Deze passkey zal worden verwijderd wanneer je deze credential opslaat.",useBrowserPasskey:"Gebruik browser passkey",bypass:{description:"Hoe lang wilt je de browser passkey voor {{origin}} gebruiken?",thisTimeOnly:"Alleen deze keer",alwaysForSite:"Altijd voor deze site"},authenticate:{title:"Inloggen met passkey",signInFor:"Inloggen met passkey voor",selectPasskey:"Selecteer een passkey om in te loggen:",noPasskeysFound:"Geen passkeys gevonden voor deze site"},create:{title:"Passkey aanmaken",createFor:"Maak een nieuwe passkey voor",titleLabel:"Titel",titlePlaceholder:"Voer een naam in voor deze passkey",createButton:"Passkey aanmaken",selectPasskeyToReplace:"Selecteer een passkey om te vervangen:",createNewPasskey:"Passkey aanmaken",replacingPasskey:"Passkey vervangen: {{displayName}}",confirmReplace:"Bevestig vervanging",selectExistingLogin:"Toevoegen aan bestaande login:",selectExistingLoginDescription:"Deze passkey toevoegen aan een bestaande inloggegevens voor deze site.",attachingToCredential:"Passkey toevoegen aan: {{serviceName}}",attachPasskey:"Passkey toevoegen"},settings:{passkeyProvider:"Passkey provider",passkeyProviderOn:"Passkey provider ingeschakeld"}},jS={title:"Recent verwijderd",noItems:"Geen verwijderde items",noItemsDescription:"Items die je verwijdert verschijnen hier gedurende 30 dagen voordat ze definitief verwijderd worden.",description:"Deze items zullen na 30 dagen permanent verwijderd worden. Je kunt ze herstellen of ze direct verwijderen.",restore:"Herstel",deletePermanently:"Permanent verwijderen",emptyAll:"Alles verwijderen",daysRemaining_one:"{{count}} dag resterend",daysRemaining_other:"{{count}} dagen resterend",expiringSoon:"Vervalt binnenkort",confirmDeleteTitle:"Permanent verwijderen?",confirmDeleteMessage:"Dit item zal permanent worden verwijderd en kan niet worden hersteld.",confirmEmptyAllTitle:"Recent verwijderd leegmaken?",confirmEmptyAllMessage:"Alle {{count}} items zullen permanent worden verwijderd en kunnen niet worden hersteld."},PS={title:"Vault upgraden",subtitle:"AliasVault is vernieuwd en je vault moet worden bijgewerkt. Dit kan enkele seconden duren.",versionInformation:"Versie-informatie",yourVault:"Jouw vault versie:",newVersion:"Nieuwe beschikbare versie:",upgrade:"Vault upgraden",upgrading:"Aan het upgraden...",whatsNew:"Wat is er nieuw",whatsNewDescription:"Een upgrade is vereist vanwege de volgende wijzigingen:",noDescriptionAvailable:"Voor deze versie is geen beschrijving beschikbaar.",alerts:{unableToGetVersionInfo:"Kan versie-informatie niet ophalen. Probeer het opnieuw.",selfHostedServer:"Self-hosted server",selfHostedWarning:"Als je een self-hosted server gebruikt, zorg er dan voor dat je ook je eigen self-hosted instantie bijwerkt, omdat anders het inloggen via de web client niet meer zal werken.",continueUpgrade:"Verdergaan",upgradeFailed:"Upgrade mislukt",failedToApplyMigration:"Kon migratie niet toepassen ({{current}} van {{total}})"}},HS={unsyncedChangesTitle:"Niet-gesynchroniseerde wijzigingen",unsyncedChangesWarning:"Er zijn niet gesynchroniseerde wijzigingen die verloren zullen gaan als je nu uitlogt. Weet je zeker dat je wilt doorgaan?",logoutAnyway:"Toch uitloggen"},zS={auth:TS,menu:SS,common:kS,content:LS,items:RS,itemTypes:DS,fieldLabels:BS,totp:US,attachmentUploader:MS,emails:_S,settings:FS,passkeys:OS,recentlyDeleted:jS,upgrade:PS,logout:HS},QS={loginTitle:"Zaloguj się do AliasVault",username:"Nazwa użytkownika lub e-mail",usernamePlaceholder:"nazwa / nazwa@firma.com",passwordPlaceholder:"Wprowadź swoje hasło ",rememberMe:"Zapamiętaj mnie",loginButton:"Zaloguj się",noAccount:"Nie masz jeszcze konta?",createVault:"Utwórz nowy sejf",twoFactorTitle:"Wprowadź kod uwierzytelniający z aplikacji uwierzytelniającej.",authCode:"Kod uwierzytelniania",authCodePlaceholder:"Wpisz 6-cyfrowy kod",verify:"Potwierdź",twoFactorNote:"Uwaga: Jeśli nie masz dostępu do swojego urządzenia uwierzytelniającego, możesz zresetować swój kod 2FA za pomocą kodu odzyskiwania, logując się za pośrednictwem strony internetowej.",masterPassword:"Hasło główne",unlockVault:"Odblokuj",unlockWithPin:"Odblokuj za pomocą kodu PIN",enterPinToUnlock:"Wprowadź swój kod PIN, aby odblokować sejf",useMasterPassword:"Użyj hasła głównego",unlockTitle:"Odblokuj swój sejf",logoutConfirm:"Czy na pewno chcesz się wylogować?",unlockSuccessTitle:"Twój sejf został pomyślnie odblokowany.",unlockSuccessDescription:"Możesz teraz używać automatycznego uzupełniania w formularzach logowania w przeglądarce.",closePopup:"Zamknij to okno.",browseVault:"Przeglądaj zawartość sejfu",connectingTo:"Łączenie z",switchAccounts:"Przełącz konto",loginWithMobile:"Zaloguj się za pomocą aplikacji mobilnej",unlockWithMobile:"Odblokuj za pomocą aplikacji mobilnej",scanQrCode:"Zeskanuj ten kod QR za pomocą aplikacji mobilnej AliasVault, aby się zalogować i odblokować sejf.",errors:{invalidCode:"Wprowadź prawidłowy 6-cyfrowy kod uwierzytelniający.",serverError:"Nie można połączyć się z serwerem AliasVault. Spróbuj ponownie później lub skontaktuj się z pomocą techniczną, jeśli problem będzie się powtarzał.",wrongPassword:"Hasło jest nieprawidłowe. Spróbuj ponownie.",sessionExpired:"Twoja sesja wygasła. Prosimy o zalogowanie się ponownie.",mobileLoginRequestExpired:"Limit czasu logowania upłynął. Proszę odświeżyć stronę i spróbować ponownie."}},VS={vault:"Sejf",emails:"Skrzynka odbiorcza"},GS={loading:"Wczytywanie…",notice:"Uwaga",error:"Błąd",cancel:"Anuluj",confirm:"Potwierdź",back:"Powrót",next:"Dalej",use:"Użyj",add:"Dodaj",delete:"Usuń",undo:"Cofnij",save:"Zapisz",saving:"Zapisywanie...",create:"Utwórz",or:"lub",close:"Zamknąć",logout:"Wyloguj się",copied:"Skopiowano",openInNewWindow:"Otwórz w nowym oknie.",enabled:"Aktywne",disabled:"Nie aktywne",showPassword:"Pokaż hasło",hidePassword:"Ukryj hasło",showDetails:"Pokaż szczegóły",hideDetails:"Ukryj szczegóły",copyToClipboard:"Skopiuj do schowka",loadingEmails:"Ładowanie wiadomości e-mail...",loadingTotpCodes:"Ładowanie kodów TOTP...",attachments:"Załączniki",loadingAttachments:"Ładowanie załączników...",settings:"Ustawienia",recentEmails:"Ostatnie wiadomości e-mail",credentials:"Dane logowania",customFields:"Pola niestandardowe",twoFactorAuthentication:"Weryfikacja dwuetapowa (2FA)",alias:"Alias",notes:"Notatki",email:"Adres e-mail",username:"Nazwa użytkownika",password:"Hasło",generate:"Wygeneruj",serviceName:"Nazwa usługi",loggedIn:"Zalogowano",syncingVault:"Synchronizacja sejfu",checkingVaultUpdates:"Sprawdzanie aktualizacji sejfu",syncingUpdatedVault:"Synchronizacja zaktualizowanego sejfu",loadMore:"Załaduj więcej",offline:"Jesteś w trybie offline",offlineMode:"Praca w trybie offline",pendingSync:"Synchronizowanie...",mergingVaultChanges:"Łączenie zmian w sejfie...",uploadingVault:"Ładowanie sejfu...",errors:{serverNotAvailable:"Serwer AliasVault jest niedostępny. Spróbuj ponownie później lub skontaktuj się z pomocą techniczną, jeśli problem nadal występuje.",clientVersionNotSupported:"Ta wersja rozszerzenia przeglądarki AliasVault nie jest już obsługiwana przez serwer. Zaktualizuj rozszerzenie przeglądarki do najnowszej wersji.",browserExtensionOutdated:"To rozszerzenie przeglądarki jest nieaktualne i nie można go używać do uzyskania dostępu do tego sejfu. Aby kontynuować, zaktualizuj to rozszerzenie przeglądarki.",serverVersionNotSupported:"Aby korzystać z tego rozszerzenia przeglądarki, należy zaktualizować serwer AliasVault do nowszej wersji. Jeśli potrzebujesz pomocy, skontaktuj się z działem pomocy technicznej.",serverVersionTooOld:"Aby korzystać z tej funkcji, serwer AliasVault musi zostać zaktualizowany do nowszej wersji. Jeśli potrzebujesz pomocy, skontaktuj się z administratorem serwera.",unknownError:"Wystąpił nieznany błąd",unknownErrorTryAgain:"Wystąpił nieznany błąd. Spróbuj ponownie.",vaultNotAvailable:"Sejf niedostępny",vaultIsLocked:"Sejf jest zablokowany",passwordChanged:"Twoje hasło uległo zmianie od czasu ostatniego logowania. Ze względów bezpieczeństwa prosimy o ponowne zalogowanie się.",syncConflictMaxRetries:"Nie można zsynchronizować sejfu po wielu próbach. Spróbuj ponownie później.",mergeFailed:"Nie udało się scalić zmian w sejfie. Spróbuj ponownie."},apiErrors:{UNKNOWN_ERROR:"Wystąpił nieznany błąd. Spróbuj ponownie.",ACCOUNT_LOCKED:"Konto zostało tymczasowo zablokowane z powodu zbyt wielu nieudanych prób. Spróbuj ponownie później.",ACCOUNT_BLOCKED:"Twoje konto zostało zablokowane. Jeśli uważasz, że to pomyłka, skontaktuj się z pomocą techniczną.",USER_NOT_FOUND:"Nieprawidłowa nazwa użytkownika lub hasło. Spróbuj ponownie.",INVALID_AUTHENTICATOR_CODE:"Nieprawidłowy kod uwierzytelniający. Spróbuj ponownie.",INVALID_RECOVERY_CODE:"Nieprawidłowy kod odzyskiwania. Spróbuj ponownie.",REFRESH_TOKEN_REQUIRED:"Wymagany jest token odświeżania.",INVALID_REFRESH_TOKEN:"Nieprawidłowy token odświeżania.",PUBLIC_REGISTRATION_DISABLED:"Rejestracja nowych kont jest obecnie wyłączona na tym serwerze. Skontaktuj się z administratorem.",USERNAME_REQUIRED:"Wymagane jest podanie nazwy użytkownika.",USERNAME_ALREADY_IN_USE:"Nazwa użytkownika jest już używana.",USERNAME_AVAILABLE:"Nazwa użytkownika jest już używana.",USERNAME_MISMATCH:"Nazwa użytkownika nie pasuje do aktualnego użytkownika.",PASSWORD_MISMATCH:"Podane hasło nie zgadza się z Twoim aktualnym hasłem.",ACCOUNT_SUCCESSFULLY_DELETED:"Konto zostało pomyślnie usunięte.",USERNAME_EMPTY_OR_WHITESPACE:"Nazwa użytkownika nie może być pusta ani zawierać spacji.",USERNAME_TOO_SHORT:"Nazwa użytkownika jest zbyt krótka: musi mieć co najmniej 3 znaki.",USERNAME_TOO_LONG:"Nazwa użytkownika jest zbyt długa: nie może przekraczać 40 znaków.",USERNAME_INVALID_EMAIL:"Nieprawidłowy adres e-mail.",USERNAME_INVALID_CHARACTERS:"Nazwa użytkownika jest nieprawidłowa, może zawierać tylko litery lub cyfry.",VAULT_NOT_UP_TO_DATE:"Twój sejf nie jest aktualny. Zsynchronizuj sejf i spróbuj ponownie.",INTERNAL_SERVER_ERROR:"Wewnętrzny błąd serwera.",VAULT_ERROR:"Lokalny sejf nie jest aktualny. Zsynchronizuj sejf, odświeżając stronę, i spróbuj ponownie."}},KS={or:"lub",new:"Nowy",vaultLocked:"AliasVault jest zablokowany.",creatingNewAlias:"Tworzenie nowego aliasu...",noMatchesFound:"Nie znaleziono żadnych wyników",searchVault:"Przeszukaj sejf...",enterServiceName:"Wprowadź nazwę usługi",enterEmailAddress:"Wprowadź adres e-mail",enterUsername:"Wprowadź nazwę użytkownika",hideFor1Hour:"Ukryj na 1 godzinę (bieżąca strona)",hidePermanently:"Ukryj na stałe (bieżąca strona)",createRandomAlias:"Utwórz losowy alias",createUsernamePassword:"Utwórz nazwę użytkownika/hasło",randomAlias:"Losowy alias",usernamePassword:"Nazwa użytkownika/hasło",createAndSaveAlias:"Utwórz i zapisz alias",createAndSaveCredential:"Utwórz i zapisz dane uwierzytelniające",randomIdentityDescription:"Wygeneruj losową tożsamość z losowym adresem e-mail dostępnym w AliasVault.",randomIdentityDescriptionDropdown:"Losowa tożsamość z losowym adresem e-mail",manualCredentialDescription:"Określ swój adres e-mail i nazwę użytkownika.",manualCredentialDescriptionDropdown:"Ręczne wprowadzanie nazwy użytkownika i hasła",failedToCreateIdentity:"Nie udało się utworzyć tożsamości. Spróbuj ponownie.",enterEmailAndOrUsername:"Wprowadź adres e-mail i/lub nazwę użytkownika",autofillWithAliasVault:"Autouzupełnianie za pomocą AliasVault",generateRandomPassword:"Wygeneruj losowe hasło (skopiuj do schowka)",generateNewPassword:"Wygeneruj nowe hasło",togglePasswordVisibility:"Przełącz widoczność hasła",passwordCopiedToClipboard:"Hasło skopiowane do schowka",openAliasVaultToUpgrade:"Otwórz AliasVault, aby dokonać aktualizacji",vaultUpgradeRequired:"Wymagana aktualizacja sejfu.",dismissPopup:"Zamknij wyskakujące okienko"},qS={title:"Elementy",itemName:"Nazwa",loginCredentials:"Dane logowania",cardInformation:"Informacje o karcie",addItem:"Dodaj element",addNewItem:"Dodaj nowy element",saveItem:"Zapisz element",itemDetails:"Szczegóły produktu",editItem:"Edytuj element",untitled:"Bez tytułu",newFolder:"Nowy folder",createFolder:"Utwórz folder",editFolder:"Edytuj folder",folderName:"Nazwa folderu",folderNameRequired:"Nazwa folderu jest wymagana",folder:"Katalog",welcomeTitle:"Witamy w AliasVault!",welcomeDescription:"Aby skorzystać z rozszerzenia przeglądarki AliasVault - przejdź do strony internetowej i użyj okienka autozupelniania, aby utworzyć nowa tożsamość.",noPasskeysFound:"Nie utworzono jeszcze żadnych kluczy dostępu. Klucze dostępu tworzy się, odwiedzając stronę internetową, która oferuje klucze dostępu jako metodę uwierzytelniania.",noAttachmentsFound:"Nie znaleziono żadnych elementów z załącznikami.",noItemsOfTypeFound:"Nie znaleziono elementów {{type}}",noMatchingItems:"Nie znaleziono pasujących elementów",noMatchingItemsSearch:"Nie znaleziono żadnych elementów pasujących do „{{search}}”",noMatchingItemsWithFilter:"Brak elementów {{filter}} pasujących do „{{search}}”",clearSearch:"Wyczyść wyszukiwanie",clearFilter:"Usuń filtr",emptyFolderHint:"Ten folder jest pusty. Aby przenieść elementy do tego folderu, edytuj element i wybierz ten folder.",allItemsInFolders:"Wszystkie Twoje elementy są uporządkowane w folderach. Kliknij folder powyżej, aby wyświetlić swoje dane logowania, lub skorzystaj z wyszukiwarki, aby znaleźć konkretne elementy.",deleteFolder:"Usuń folder",deleteFolderKeepItems:"Usuń tylko folder",deleteFolderKeepItemsDescription:"Elementy zostaną przeniesione z powrotem do listy głównej.",deleteFolderAndItems:"Usuń folder i wszystkie elementy",deleteFolderAndItemsDescription:"{{count}} element(ów) zostaną przeniesione do Ostatnio usunięte.",filters:{all:"(Wszystkie) pozycje",passkeys:"Klucze dostępu"},sort:{title:"Sortuj według",oldestFirst:"Od najstarszych",newestFirst:"Od najnowszych",alphabetical:"Alfabetycznie (A-Z)"},deleteItemTitle:"Usuń element",deleteItemConfirm:"Czy na pewno chcesz usunąć ten element?",viewHistory:"Pokaż historię",history:"Historia",noHistoryAvailable:"Brak dostępnej historii",tags:"Znaczniki",changePasswordComplexity:"Zmień komplikację hasła",passwordLength:"Długość hasła",includeLowercase:"Uwzględnij małe litery",includeUppercase:"Uwzględnij wielkie litery",includeNumbers:"Uwzględnij numery",includeSpecialChars:"Uwzględnij znaki specjalne",avoidAmbiguousChars:"Unikaj dwuznacznych znaków (o, 0, itp.)",privateEmailTitle:"Prywatny adres e-mail",privateEmailAliasVaultServer:"Serwer AliasVault",privateEmailDescription:"Szyfrowane E2E, w pełni prywatne.",publicEmailTitle:"Publiczni dostawcy tymczasowych adresów e-mail",publicEmailDescription:"Anonimowe, ale ograniczają prywatność. Treść wiadomości e-mail jest dostępna dla każdego, kto zna adres.",validation:{required:"To pole jest wymagane"}},WS={selectType:"Dodaj nowy element",typeLabel:"Typ elementu",creating:"Tworzenie",editing:"Edytowanie",regenerateAlias:"Ponownie wygeneruj alias",addCustomField:"Dodaj pole niestandardowe",fieldLabel:"Etykieta pola",enterFieldName:"Wprowadź nazwę pola",fieldType:"Typ pola",fieldTypes:{text:"Tekst",hidden:"Ukryty (zamaskowany tekst)",email:"Skrzynka odbiorcza",url:"adres URL",phone:"Numer telefonu",number:"Numer",date:"Data",textArea:"Obszar tekst"},login:{title:"Zaloguj się"},alias:{title:"Tożsamość (Alias)"},creditCard:{title:"Karta płatnicza"},note:{title:"Bezpieczna notatka"}},YS={"login.url":"URL strony internetowej","login.username":"Nazwa użytkownika","login.password":"Hasło","alias.first_name":"Imię","alias.last_name":"Nazwisko","alias.gender":"Płeć","alias.birthdate":"Data urodzenia","login.email":"Skrzynka odbiorcza","notes.content":"Notatki","card.cardholder_name":"Imię i nazwisko posiadacza karty","card.number":"Numer karty","card.expiry_month":"Miesiąc wygaśnięcia","card.expiry_year":"Rok wygaśnięcia","card.cvv":"Kod CVV","card.pin":"Kod PIN"},JS={addCode:"Dodaj kod 2FA",instructions:"Wprowadź tajny klucz wyświetlony na stronie internetowej, na której chcesz dodać uwierzytelnianie dwuskładnikowe.",nameOptional:"Nazwa (opcjonalnie)",secretKey:"Tajny klucz",saveToViewCode:"Zapisz, aby wyświetlić kod",defaultName:"Uwierzytelnianie",errors:{invalidSecretKey:"Nieprawidłowy format tajnego klucza."}},XS={uploading:"Przesyłanie...",uploadSuccess:"Plik został przesłany pomyślnie.",deleteSuccess:"Element został pomyślnie usunięty.",firefoxExpandRequired:"Aby przesłać pliki, użyj rozszerzonego okna.",openExpandedWindow:"Otwórz rozszerzone okno"},$S={title:"Skrzynka odbiorcza",deleteEmailTitle:"Usuń e-mail",deleteEmailConfirm:"Czy na pewno chcesz trwale usunąć ten e-mail?",from:"Od",to:"Do",date:"Data",emailContent:"Treść wiadomości e-mail",emailNotFound:"Nie znaleziono wiadomości e-mail",noEmails:"Nie znaleziono wiadomości e-mail",noEmailsDescription:"Nie otrzymałeś jeszcze żadnych wiadomości e-mail na prywatne adresy e-mail. Kiedy otrzymasz nowy e-mail, pojawi się on tutaj.",offlineMessage:"Jesteś offline. Połącz się z Internetem, aby załadować wiadomości e-mail.",dateFormat:{justNow:"w tej chwili",minutesAgo_single:"{{count}} minut temu",minutesAgo_plural:"{{count}} minut temu",hoursAgo_single:"{{count}} godzinę temu",hoursAgo_plural:"{{count}} godzin temu",yesterday:"wczoraj"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Wybrany adres e-mail jest już w użyciu. Proszę zmienić adres e-mail poprzez edycję danych logowania.",CLAIM_DOES_NOT_EXIST:"Wystąpił błąd podczas próby załadowania wiadomości e-mail. Spróbuj edytować i zapisać wpis logowania, aby zsynchronizować bazę danych, a następnie spróbuj ponownie."}},ZS={serverUrl:"Adres URL serwera",language:"Język",autofillEnabled:"Włącz autouzupełnianie",version:"Wersja",openWebApp:"Otwórz aplikację internetową",lock:"Zablokuj",globalSettings:"Ustawienia ogólne",autofillPopup:"Okno autouzupełniania",activeOnAllSites:"Aktywne we wszystkich witrynach (chyba że jest wyłączone)",disabledOnAllSites:"Wyłączone na wszystkich witrynach",rightClickContextMenu:"Aktywacja menu kontekstowego",autofillMatching:"Dopasowanie autouzupełniania",autofillMatchingMode:"Tryb dopasowania autouzupełniania",autofillMatchingModeDescription:"Określa, które dane logowania są uważane za dopasowane i wyświetlane jako sugestie w oknie autouzupełniania dla danej strony internetowej.",autofillMatchingDefault:"Adres URL + subdomena + nazwa wieloznaczna",autofillMatchingUrlSubdomain:"Adres URL + subdomena",autofillMatchingUrlExact:"Dokładna domena adresu URL",siteSpecificSettings:"Ustawienia dotyczące witryny",autofillPopupOn:"Wyskakujące okno autouzupełniania: ",enabledForThisSite:"Włączone dla tej witryny",disabledForThisSite:"Wyłączone dla tej witryny",temporarilyDisabledUntil:"Tymczasowo nieaktywne do ",resetAllSiteSettings:"Zresetuj wszystkie ustawienia witryny",appearance:"Wygląd",theme:"Motyw",useDefault:"Użyj domyślnego",light:"Jasny",dark:"Ciemny",keyboardShortcuts:"Skróty klawiaturowe",configureKeyboardShortcuts:"Skonfiguruj skróty klawiaturowe",configure:"Konfiguracja",clipboardClearTimeout:"Wyczyść schowek po skopiowaniu",clipboardClearTimeoutDescription:"Automatycznie wyczyść schowek po skopiowaniu poufnych danych",clipboardClearDisabled:"Nigdy nie czyść",clipboardClear5Seconds:"Wyczyść po 5 sekundach",clipboardClear10Seconds:"Wyczyść po 10 sekundach",clipboardClear15Seconds:"Wyczyść po 15 sekundach",autoLockTimeout:"Blokada rozszerzenia",autoLockTimeoutDescription:"Automatycznie zablokuj sejf po okresie bezczynności",autoLockTimeoutHelp:"Sejf zostanie zablokowany dopiero po określonym okresie nieaktywności (żadne użycie autouzupełniania lub okienko rozszerzenia nie zostało otwarte). Sejf zostanie zablokowany, gdy przeglądarka zostanie zamknięta, niezależnie od tego ustawienia.",autoLockNever:"Nigdy",autoLock15Seconds:"15 sekund",autoLock1Minute:"1 minuta",autoLock5Minutes:"5 minut",autoLock15Minutes:"15 minut",autoLock30Minutes:"30 minut",autoLock1Hour:"1 godzina",autoLock4Hours:"4 godziny",autoLock8Hours:"8 godzin",autoLock24Hours:"24 godziny",versionPrefix:"Wersja ",autofillSettings:"Ustawienia autouzupełniania",clipboardSettings:"Ustawienia schowka",contextMenuSettings:"Ustawienia menu kontekstowego",passkeySettings:"Ustawienia kluczy dostępu",contextMenu:"Menu kontekstowe",contextMenuEnabled:"Menu kontekstowe jest włączone",contextMenuDisabled:"Menu kontekstowe jest wyłączone",contextMenuDescription:"Kliknij prawym przyciskiem myszy na pola wejściowe, aby uzyskać dostęp do opcji AliasVault",selectLanguage:"Wybierz język",serverConfiguration:"Konfiguracja serwera",serverConfigurationDescription:"Skonfiguruj adres URL serwera sejfu AliasVault",customApiUrl:"Adres URL interfejsu API",customClientUrl:"Adresy URL klienta",apiUrlHint:"Adres URL punktu końcowego API (zazwyczaj adres URL klienta + /api)",clientUrlHint:"Adres URL interfejsu sieci web dla twojej samodzielnej instancji",autofillSettingsDescription:"Włącz lub wyłącz okno autouzupełniania na stronach internetowych",autofillEnabledDescription:"Sugestie autouzupełniania pojawią się na formularzach logowania",autofillDisabledDescription:"Podpowiedzi wyłączone we wszystkich polach",languageSettings:"Język",validation:{apiUrlRequired:"API URL jest wymagane",apiUrlInvalid:"Wprowadź poprawny adres URL API",clientUrlRequired:"Adres URL klienta jest wymagany",clientUrlInvalid:"Wprowadź prawidłowy adres URL klienta"},identityGenerator:"Generator tożsamości",identityGeneratorSettings:{description:"Skonfiguruj domyślny język i preferencje dotyczące płci dla generowania nowych tożsamości.",languageSection:"Wybierz język",languageDescription:"Ustaw język, który będzie używany podczas generowania nowych tożsamości.",genderSection:"Płeć",genderDescription:"Ustaw preferencje dotyczące płci dla generowania nowych tożsamości.",ageRangeSection:"Zakres wieku",ageRangeDescription:"Ustaw zakres wieku dla generowania nowych tożsamości.",genderOptions:{random:"Losowy",male:"Mężczyzna",female:"Kobieta"}},unlockMethod:{title:"Metoda odblokowania skarbca",introText:"Wybierz sposób odblokowania sejfu. Możesz użyć hasła głównego (zawsze dostępnego) lub skonfigurować kod PIN, aby uzyskać szybszy dostęp. Po 3 nieudanych próbach wprowadzenia kodu PIN konieczne będzie użycie hasła głównego.",password:"Hasło główne",pin:"Kod PIN",pinDescription:"Odblokuj sejf za pomocą kodu PIN",setupPin:"Ustaw kod PIN",enterNewPinDescription:"Wprowadź kod PIN składający się z co najmniej 6 cyfr",confirmPin:"Potwierdź kod PIN",confirmPinDescription:"Wprowadź ponownie swój kod PIN, aby potwierdzić",invalidPinFormat:"Nieprawidłowy format kodu PIN",pinMismatch:"Kody PIN nie są zgodne",incorrectPin:"Nieprawidłowy kod PIN. Pozostało {{attemptsRemaining}} prób.",incorrectPinSingular:"Nieprawidłowy kod PIN. Pozostała 1 próba.",enableSuccess:"Odblokowanie za pomocą kodu PIN zostało aktywowane!",pinLocked:"Odblokowanie za pomocą kodu PIN zostało wyłączone. Aby odblokować sejf, użyj hasła głównego.",pinSecurityWarning:"Odblokowanie za pomocą kodu PIN w rozszerzeniu przeglądarki może być mniej bezpieczne niż hasło główne, ponieważ kody PIN mają zazwyczaj niższą entropię i mogą zostać złamane metodą Brute-Force, jeśli urządzenie zostanie naruszone. Używaj tej funkcji tylko na urządzeniach, którym w pełni ufasz."}},e1={passkey:"Kod dostępu",site:"Strona internetowa",helpText:"Klucze dostępu są tworzone na stronie internetowej po wyświetleniu monitu. Nie można ich edytować ręcznie. Aby usunąć ten klucz dostępu, można go usunąć z tych poświadczeń. Aby zastąpić ten klucz dostępu lub utworzyć nowy, należy odwiedzić stronę internetową i postępować zgodnie z wyświetlanymi instrukcjami.",passkeyMarkedForDeletion:"Klucz dostępu oznaczony do usunięcia",passkeyWillBeDeleted:"To hasło zostanie usunięte po zapisaniu tych danych logowania.",useBrowserPasskey:"Użyj klucza dostępu przeglądarki",bypass:{description:"Jak długo chcesz korzystać z dostawcy kluczy przeglądarki dla {{origin}}?",thisTimeOnly:"Tylko tym razem",alwaysForSite:"Zawsze dla tej witryny"},authenticate:{title:"Zaloguj się za pomocą klucza bezpieczeństwa",signInFor:"Zaloguj się za pomocą klucza bezpieczeństwa dla",selectPasskey:"Wybierz klucz dostępu, aby się zalogować:",noPasskeysFound:"Nie znaleziono kluczy dostępu dla tej witryny"},create:{title:"Utwórz klucz dostępu",createFor:"Utwórz nowy klucz dostępu dla",titleLabel:"Tytuł",titlePlaceholder:"Wprowadź nazwę dla tego klucza dostępu",createButton:"Utwórz klucz dostępu",selectPasskeyToReplace:"Wybierz klucz dostępu, który chcesz zastąpić:",createNewPasskey:"Utwórz nowy klucz dostępu",replacingPasskey:"Zamiana klucza dostępu: {{displayName}}",confirmReplace:"Potwierdź zamianę",selectExistingLogin:"Dodaj do istniejącego loginu:",selectExistingLoginDescription:"Dołącz ten klucz dostępu do istniejącego logowania dla tej witryny.",attachingToCredential:"Dodawanie klucza dostępu do: {{serviceName}}",attachPasskey:"Dodaj klucz dostępu"},settings:{passkeyProvider:"Dostawca klucza dostępu",passkeyProviderOn:"Dostawca klucza dostępu włączony "}},t1={title:"Ostatnio usunięte",noItems:"Brak usuniętych elementów",noItemsDescription:"Usunięte elementy pojawią się tutaj na 30 dni, zanim zostaną trwale usunięte.",description:"Te elementy zostaną trwale usunięte po 30 dniach. Możesz je przywrócić lub natychmiast usunąć.",restore:"Przywróć",deletePermanently:"Usuń bezpowrotnie",emptyAll:"Opróżnij wszystkie",daysRemaining_one:"Pozostało {{count}} dni",daysRemaining_other:"Pozostało {{count}} dni",expiringSoon:"Wkrótce wygasa",confirmDeleteTitle:"Usunąć trwale?",confirmDeleteMessage:"Ten element zostanie trwale usunięty i nie będzie można go odzyskać.",confirmEmptyAllTitle:"Opróżnij ostatnio usunięte?",confirmEmptyAllMessage:"Wszystkie elementy {{count}} zostaną trwale usunięte i nie mogą zostać odzyskane."},a1={title:"Aktualizacja sejfu",subtitle:"Wersja AliasVault jest nieaktualna i konieczna jest aktualizacja Twojego sejfu. Zajmie to tylko kilka sekund.",versionInformation:"Informacje o wersji",yourVault:"Twoja wersja sejfu:",newVersion:"Nowa dostępna wersja:",upgrade:"Aktualizuj sejf",upgrading:"Aktualizacja...",whatsNew:"Co nowego",whatsNewDescription:"Uaktualnienie jest wymagane do obsługi następujących zmian:",noDescriptionAvailable:"Brak dostępnego opisu dla tej wersji.",alerts:{unableToGetVersionInfo:"Nie można uzyskać informacji o wersji. Spróbuj ponownie.",selfHostedServer:"Serwer własny",selfHostedWarning:"Jeśli używasz własnego serwera, upewnij się, że zaktualizujesz swoją samodzielną instancję, ponieważ w przeciwnym razie logowanie się do klienta internetowego przestanie działać.",continueUpgrade:"Kontynuuj aktualizację",upgradeFailed:"Aktualizacja nie powiodła się",failedToApplyMigration:"Nie udało się zastosować migracji ({{current}} of {{total}})"}},n1={unsyncedChangesTitle:"Zmiany niesynchronizowane",unsyncedChangesWarning:"Masz niezsynchronizowane zmiany, które zostaną utracone, jeśli się teraz wylogujesz. Czy na pewno chcesz kontynuować?",logoutAnyway:"Wyloguj się mimo wszystko"},r1={auth:QS,menu:VS,common:GS,content:KS,items:qS,itemTypes:WS,fieldLabels:YS,totp:JS,attachmentUploader:XS,emails:$S,settings:ZS,passkeys:e1,recentlyDeleted:t1,upgrade:a1,logout:n1},i1={loginTitle:"Fazer login no AliasVault",username:"Nome de usuário ou e-mai",usernamePlaceholder:"nome / nome@empresa.com",passwordPlaceholder:"Digite sua senha",rememberMe:"Lembrar-me",loginButton:"Entrar",noAccount:"Não possui conta?",createVault:"Criar novo cofre",twoFactorTitle:"Por favor, insira o código de autenticação do seu aplicativo de autenticação.",authCode:"Código de Autenticação",authCodePlaceholder:"Digite o código de 6 dígitos",verify:"Verificar",twoFactorNote:"Nota: se você não tem acesso ao seu aparelho de verificação, você pode resetar seu 2FA com um código de recuperação fazendo login no site.",masterPassword:"Senha Mestre",unlockVault:"Desbloquear",unlockWithPin:"Desbloquear com PIN",enterPinToUnlock:"Digite seu PIN para desbloquear seu cofre",useMasterPassword:"Utilizar Senha Mestre",unlockTitle:"Desbloquear Seu Cofre",logoutConfirm:"Tem certeza que deseja sair?",unlockSuccessTitle:"O seu cofre foi desbloqueado com sucesso",unlockSuccessDescription:"Agora você pode utilizar o preenchimento automático nos formulários de login no seu navegador.",closePopup:"Fechar este pop-up",browseVault:"Navegar por conteúdo do cofre",connectingTo:"Conectando à",switchAccounts:"Mudar de conta?",loginWithMobile:"Entrar utilizado Dispositivo Móvel",unlockWithMobile:"Desbloquear utilizando Dispositivo Móvel",scanQrCode:"Escaneie este código QR com seu aplicativo AliasVault para dispositivo móvel para entrar e desbloquear seu cofre.",errors:{invalidCode:"Por favor digite o código de autenticação de 6 dígitos.",serverError:"Não foi possível conectar ao servidor do AliasVault. Por favor tente novamente mais tarde ou entre em contato com o suporte caso o problema persista.",wrongPassword:"Senha incorreta. Por favor tente novamente.",sessionExpired:"Sua sessão expirou. Por favor, faça login novamente.",mobileLoginRequestExpired:"Requisição de login pelo dispositivo móvel demorou muito. Por favor, atualize a página e tente novamente."}},s1={vault:"Cofre",emails:"E-mails"},o1={loading:"Carregando...",notice:"Aviso",error:"Erro",cancel:"Cancelar",confirm:"Confirmar",back:"Voltar",next:"Próximo",use:"Utilizar",add:"Adicionar",delete:"Excluir",undo:"Desfazer",save:"Salvar",saving:"Salvando...",create:"Criar",or:"Ou",close:"Fechar",logout:"Sair",copied:"Copiado!",openInNewWindow:"Abrir em uma nova janela",enabled:"Habilitado",disabled:"Desabilitado",showPassword:"Mostrar senha",hidePassword:"Ocultar senha",showDetails:"Exibir detalhes",hideDetails:"Esconder detalhes",copyToClipboard:"Copiar para a área de transferência",loadingEmails:"Carregando e-mails...",loadingTotpCodes:"Carregando códigos TOTP...",attachments:"Anexos",loadingAttachments:"Carregando anexos...",settings:"Configurações",recentEmails:"E-mails recentes",credentials:"Credenciais",customFields:"Campos Personalizados",twoFactorAuthentication:"Autenticação de dois fatores",alias:"Alias",notes:"Notas",email:"E-mail",username:"Nome de Usuário",password:"Senha",generate:"Gerar",serviceName:"Nome do Serviço",loggedIn:"Logado",syncingVault:"Sincronizando cofre",checkingVaultUpdates:"Verificando atualizações do cofre",syncingUpdatedVault:"Sincronizando cofre atualizado",loadMore:"Carregar mais",offline:"Offline",offlineMode:"Operando em modo offline",pendingSync:"Sincronizando...",mergingVaultChanges:"Integrando mudanças do cofre...",uploadingVault:"Fazendo upload do cofre...",errors:{serverNotAvailable:"O servidor AliasVault não está disponível. Por favor, tente novamente mais tarde ou entre em contato com o suporte caso o problema persista.",clientVersionNotSupported:"Esta versão da extensão AliasVault para o navegador não é mais suportada pelo servidor. Por favor, atualize sua extensão para a última versão.",browserExtensionOutdated:"Esta extensão do navegador está desatualizada e não pode ser utilizada para acessar este cofre. Por favor, atualize esta extensão para continuar.",serverVersionNotSupported:"O servidor AliasVault precisa ser atualizado para uma nova versão para poder utilizar esta extensão de navegador. Por favor, entre em contato com o suporte caso precise de ajuda.",serverVersionTooOld:"O servidor do AliasVault deve ser atualizado para uma versão mais recente para utilizar esta função. Por favor, entre em contato com o administrador do servidor se precisar de ajuda.",unknownError:"Ocorreu um erro desconhecido",unknownErrorTryAgain:"Ocorreu um erro inesperado. Por favor, tente novamente.",vaultNotAvailable:"Cofre não disponível",vaultIsLocked:"O cofre está bloqueado",passwordChanged:"Sua senha mudou desde o último login. Por favor, realize login novamente por questões de segurança.",syncConflictMaxRetries:"Não foi possível sincronizar seu cofre após várias tentativas. Por favor, tente novamente mais tarde.",mergeFailed:"Falha ao combinar mudanças do cofre. Por favor, tente novamente."},apiErrors:{UNKNOWN_ERROR:"Um erro desconhecido ocorreu. Por favor, tente novamente.",ACCOUNT_LOCKED:"Conta temporariamente bloqueada por muitas tentativas de login falhas. Por favor, tente novamente mais tarde.",ACCOUNT_BLOCKED:"Sua conta foi desabilitada. Se você acredita que isto foi um erro, por favor, entre em contato com o suporte.",USER_NOT_FOUND:"Usuário ou senha incorretos. Por favor, tente novamente.",INVALID_AUTHENTICATOR_CODE:"Código de autenticação incorreto. Por favor, tente novamente.",INVALID_RECOVERY_CODE:"Código de recuperação inválido. Por favor, tente novamente.",REFRESH_TOKEN_REQUIRED:"Token de atualização é obrigatório.",INVALID_REFRESH_TOKEN:"Token de atualização inválido.",PUBLIC_REGISTRATION_DISABLED:"Registro de novas contas está atualmente desabilitado neste servidor. Por favor entre em contato com o administrador.",USERNAME_REQUIRED:"Nome de usuário é obrigatório.",USERNAME_ALREADY_IN_USE:"Nome de usuário já está em uso.",USERNAME_AVAILABLE:"Nome de usuário está disponível.",USERNAME_MISMATCH:"Nome de usuário não corresponde ao usuário atual.",PASSWORD_MISMATCH:"A senha digitada não corresponde á sua senha atual.",ACCOUNT_SUCCESSFULLY_DELETED:"Conta excluída com sucesso.",USERNAME_EMPTY_OR_WHITESPACE:"Nome de usuário não pode estar vazio ou em branco.",USERNAME_TOO_SHORT:"Nome de usuário muito curto: deve ter pelo menos 3 caracteres.",USERNAME_TOO_LONG:"Nome de usuário muito longo: não pode conter mais de 40 caracteres.",USERNAME_INVALID_EMAIL:"Endereço de e-mail inválido.",USERNAME_INVALID_CHARACTERS:"Nome de usuário é inválido, deve conter apenas letras ou números.",VAULT_NOT_UP_TO_DATE:"Seu cofre não está atualizado. Por favor, sincronize seu cofre e tente novamente.",INTERNAL_SERVER_ERROR:"Erro intero do servidor.",VAULT_ERROR:"O cofre local não está atualizado. Por favor, sincronize seu cofre recarregando a página e tente novamente."}},l1={or:"ou",new:"Novo",vaultLocked:"AliasVault está bloqueado.",creatingNewAlias:"Criando novo alias...",noMatchesFound:"Nenhum resultado encontrado",searchVault:"Pesquisar cofre...",enterServiceName:"Digite o nome do serviço",enterEmailAddress:"Digite o endereço de e-mail",enterUsername:"Digite o nome de usuário",hideFor1Hour:"Ocultar por 1 hora (site atual)",hidePermanently:"Ocultar permanentemente (site atual)",createRandomAlias:"Criar alias aleatório",createUsernamePassword:"Criar nome de usuário/senha",randomAlias:"Alias aleatório",usernamePassword:"Nome de usuário/senha",createAndSaveAlias:"Criar e salvar alias",createAndSaveCredential:"Criar e salvar credencial",randomIdentityDescription:"Gerar uma identidade aleatória com um endereço de e-mail aleatório acessível pelo AliasVault.",randomIdentityDescriptionDropdown:"Identidade aleatória com e-mail aleatório",manualCredentialDescription:"Especifique seu próprio endereço de e-mail e nome de usuário.",manualCredentialDescriptionDropdown:"Nome de usuário e senha manuais",failedToCreateIdentity:"Falha ao criar identidade. Por favor, tente novamente.",enterEmailAndOrUsername:"Digite o e-mail e/ou nome de usuário",autofillWithAliasVault:"Preenchimento Automático com AliasVault",generateRandomPassword:"Gerar senha aleatória (copiar para a área de transferência)",generateNewPassword:"Gerar nova senha",togglePasswordVisibility:"Alternar visibilidade da senha",passwordCopiedToClipboard:"Senha copiada para a área de transferência",openAliasVaultToUpgrade:"Abra o AliasVault para atualizar",vaultUpgradeRequired:"Atualização de cofre necessária.",dismissPopup:"Ignorar pop-up"},c1={title:"Itens",itemName:"Nome",loginCredentials:"Credenciais de Login",cardInformation:"Informações do Cartão",addItem:"Adicionar Item",addNewItem:"Adicionar novo item",saveItem:"Salvar Item",itemDetails:"Detalhes do Item",editItem:"Editar Item",untitled:"Sem Título",newFolder:"Nova Pasta",createFolder:"Criar Pasta",editFolder:"Editar Pasta",folderName:"Nome da Pasta",folderNameRequired:"Nome da pasta é obrigatório",folder:"Pasta",welcomeTitle:"Boas-vindas ao AliasVault!",welcomeDescription:"Para utilizar a extensão de navegador do AliasVault: navegue para um site e utilize o pop-up de preenchimento automático do AliasVault para criar uma nova credencial.",noPasskeysFound:"Nenhuma passkey foi criada ainda. Passkeys são veiadas visitando um website que ofereça passkey como método de autenticação.",noAttachmentsFound:"Nenhum item com anexos foi encontrado",noItemsOfTypeFound:"Nenhum item do tipo {{type}} foi encontrado",noMatchingItems:"Nenhum ítem correspondente encontrado",noMatchingItemsSearch:'Nenhum item corresponde à "{{search}}"',noMatchingItemsWithFilter:'Nenhum item com o filtro {{filter}} corresponde à "{{search}}"',clearSearch:"Limpar pesquisa",clearFilter:"Limpar filtro",emptyFolderHint:"Esta pasta está vazia. Para mover itens para esta pasta, edite o item e toque no ícone da pasta no campo de nome.",allItemsInFolders:"Todos os seus itens estão organizados em pastas. Clique em uma pasta acima para ver suas credenciais, ou utilize a busca para encontrar itens específicos.",deleteFolder:"Excluir Pasta",deleteFolderKeepItems:"Excluir apenas a pasta",deleteFolderKeepItemsDescription:"Itens serão movidos de volta para a lista principal.",deleteFolderAndItems:"Excluir pasta e todos os itens",deleteFolderAndItemsDescription:"{{count}} item(s) será(ão) movido(s) para Recentemente Excluídos.",filters:{all:"(Todos os) Itens",passkeys:"Passkeys"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Excluir Item",deleteItemConfirm:"Tem certeza que deseja excluir este item?",viewHistory:"Visualizar histórico",history:"Histórico",noHistoryAvailable:"Histórico não disponível",tags:"Tags",changePasswordComplexity:"Alterar complexidade de senha",passwordLength:"Tamanho da senha",includeLowercase:"Incluir letras minúsculas",includeUppercase:"Incluir letras maiúsculas",includeNumbers:"Incluir números",includeSpecialChars:"Incluir caracteres especiais",avoidAmbiguousChars:"Evitar caracteres ambíguos (o, 0, etc.)",privateEmailTitle:"E-mail Privado",privateEmailAliasVaultServer:"Servidor AliasVault",privateEmailDescription:"Criptografia E2E, totalmente privado.",publicEmailTitle:"Provedores Públicos de E-mail Temporário",publicEmailDescription:"Anônimo mas com privacidade limitada. Conteúdo do e-mail pode ser lido por qualquer um que souber o endereço.",validation:{required:"Este campo é obrigatório"}},u1={selectType:"Adicionar Novo Item",typeLabel:"Tipo do Item",creating:"Criando",editing:"Editando",regenerateAlias:"Gerar alias novamente",addCustomField:"Adicionar campo personalizado",fieldLabel:"Nome do Campo",enterFieldName:"Digite o nome do campo",fieldType:"Tipo do Campo",fieldTypes:{text:"Texto",hidden:"Escondido (texto mascarado)",email:"E-mail",url:"URL",phone:"Telefone",number:"Número",date:"Data",textArea:"Área de Texto"},login:{title:"Login"},alias:{title:"Alias"},creditCard:{title:"Cartão de Crédito"},note:{title:"Nota Segura"}},d1={"login.url":"URL do Website","login.username":"Nome de usuário","login.password":"Senha","alias.first_name":"Primeiro Nome","alias.last_name":"Sobrenome","alias.gender":"Gênero","alias.birthdate":"Data de nascimento","login.email":"E-mail","notes.content":"Notas","card.cardholder_name":"Nome do Titular do Cartão","card.number":"Número do Cartão","card.expiry_month":"Mês de Expiração","card.expiry_year":"Ano de Expiração","card.cvv":"CVV","card.pin":"Senha"},m1={addCode:"Adicionar Código de Autenticação de Dois Fatores",instructions:"Digite a chave secreta exibida pelo website que você quer adicionar a autenticação de dois fatores.",nameOptional:"Nome (opcional)",secretKey:"Chave Secreta",saveToViewCode:"Salvar para ver código",defaultName:"Autenticador",errors:{invalidSecretKey:"Formato de chave secreta inválido."}},g1={uploading:"Fazendo upload...",uploadSuccess:"Arquivos enviados com sucesso.",deleteSuccess:"Anexo excluído com sucesso.",firefoxExpandRequired:"Para fazer o upload dr arquivos, use a tela expandida.",openExpandedWindow:"Abrir Tela Expandida"},f1={title:"E-mails",deleteEmailTitle:"Excluir E-mail",deleteEmailConfirm:"Tem certeza de que deseja excluir permanentemente este e-mail?",from:"De",to:"Para",date:"Data",emailContent:"Conteúdo do email",emailNotFound:"E-mail não encontrado",noEmails:"Nenhum e-mail encontrado",noEmailsDescription:"Você ainda não recebeu nenhum e-mail em seus endereços de e-mail privados. Quando receber um novo e-mail, ele aparecerá aqui.",offlineMessage:"Você está offline. Por favor, conecte-se à internet para carregar seus e-mails.",dateFormat:{justNow:"agora",minutesAgo_single:"há {{count}} minuto",minutesAgo_plural:"há {{count}} minutos",hoursAgo_single:"há {{count}} hora",hoursAgo_plural:"há {{count}} horas",yesterday:"ontem"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"O e-mail escolhido já está em uso. Por favor, altere o endereço de e-mail editando esta credencial.",CLAIM_DOES_NOT_EXIST:"Ocorreu um erro ao tentar carregar os e-mails. Por favor, tente editar e salvar a credencial para sincronizar com o banco de dados, e tente novamente."}},h1={serverUrl:"URL do servidor",language:"Idioma",autofillEnabled:"Ativar o Preenchimento Automático",version:"Versão",openWebApp:"Abrir aplicativo web",lock:"Bloquear",globalSettings:"Configurações Gerais",autofillPopup:"Pop-up de preenchimento automático",activeOnAllSites:"Ativado em todos os sites (a menos que esteja desabilitado abaixo)",disabledOnAllSites:"Desativado em todos os sites",rightClickContextMenu:"Menu do botão direito",autofillMatching:"Correspondência de Preenchimento Automático",autofillMatchingMode:"Modo de correspondência de preenchimento automático",autofillMatchingModeDescription:"Determina quais credenciais são consideradas uma correspondência e mostradas como sugestões no pop-up de preenchimento automático para um determinado site.",autofillMatchingDefault:"Wildcard URL + subdomínio + nome",autofillMatchingUrlSubdomain:"URL + subdomínio",autofillMatchingUrlExact:"Apenas URL exato do domínio",siteSpecificSettings:"Configurações Específicas do Site",autofillPopupOn:"Pop-up de preenchimento automático em: ",enabledForThisSite:"Habilitado para este site",disabledForThisSite:"Desabilitado para este site",temporarilyDisabledUntil:"Temporariamente desabilitado até ",resetAllSiteSettings:"Redefinir todas as configurações específicas do site",appearance:"Aparência",theme:"Tema",useDefault:"Utilizar padrão",light:"Claro",dark:"Escuro",keyboardShortcuts:"Atalhos do Teclado",configureKeyboardShortcuts:"Configurar atalhos do teclado",configure:"Configurar",clipboardClearTimeout:"Limpar área de transferência após copiar",clipboardClearTimeoutDescription:"Limpar automaticamente a área de transferência após copiar dados sensíveis",clipboardClearDisabled:"Nunca limpar",clipboardClear5Seconds:"Limpar após 5 segundos",clipboardClear10Seconds:"Limpar após 10 segundos",clipboardClear15Seconds:"Limpar após 15 segundos",autoLockTimeout:"Tempo para bloqueio automático",autoLockTimeoutDescription:"Bloquear o cofre automaticamente após período de inatividade",autoLockTimeoutHelp:"O cofre será bloqueado apenas após o período de inatividade especificado (nenhuma utilização de preenchimento automático ou pop-up da extensão abertos). O cofre sempre será bloqueado quando o navegador for fechado, independentemente desta configuração.",autoLockNever:"Nunca",autoLock15Seconds:"15 segundos",autoLock1Minute:"1 minuto",autoLock5Minutes:"5 minutos",autoLock15Minutes:"15 minutos",autoLock30Minutes:"30 minutos",autoLock1Hour:"1 hora",autoLock4Hours:"4 horas",autoLock8Hours:"8 horas",autoLock24Hours:"24 horas",versionPrefix:"Versão ",autofillSettings:"Configurações de Preenchimento Automático",clipboardSettings:"Configurações da Área de Transferência",contextMenuSettings:"Configurações do Menu de Contexto",passkeySettings:"Configurações de Passkey",contextMenu:"Menu de Contexto",contextMenuEnabled:"Menu de contexto está habilitado",contextMenuDisabled:"Menu de contexto está desabilitado",contextMenuDescription:"Clique com o botão direito nos campos para acessar as opções do AliasVault",selectLanguage:"Selecionar Idioma",serverConfiguration:"Configurações do Servidor",serverConfigurationDescription:"Configure o URL do servidor do AliasVault para instâncias self-hosted",customApiUrl:"URL da API",customClientUrl:"URL do Cliente",apiUrlHint:"O URL do endpoint da API (geralmente o URL do cliente + /api)",clientUrlHint:"O URL da interface web da sua instância self-hosted",autofillSettingsDescription:"Habilite ou desabilite o popup de autopreenchimento em páginas web",autofillEnabledDescription:"Sugestões de autopreenchimento aparecerão em formulários de login",autofillDisabledDescription:"Sugestões de autopreenchimento estão desabilitadas globalmente",languageSettings:"Idioma",validation:{apiUrlRequired:"URL de API é obrigatório",apiUrlInvalid:"Por favor, digite um URL de API válido",clientUrlRequired:"URL de Cliente é obrigatório",clientUrlInvalid:"Por favor, digite um URL de cliente válido"},identityGenerator:"Gerador de Identidade",identityGeneratorSettings:{description:"Configure o idioma padrão e preferência de gênero para geração de novas identidades.",languageSection:"Idioma",languageDescription:"Defina o idioma que será utilizado ao gerar novas identidades.",genderSection:"Gênero",genderDescription:"Defina a preferência de gênero para geração de novas identidades.",ageRangeSection:"Faixa Etária",ageRangeDescription:"Selecione a faixa etária para geração de novas identidades.",genderOptions:{random:"Aleatório",male:"Masculino",female:"Feminino"}},unlockMethod:{title:"Método de Desbloqueio do Cofre",introText:"Escolha como você quer desbloquear seu cofre. Você pode utilizar sua senha mestre (sempre disponível), ou configurar um PIN para facilitar o acesso. Após 3 tentativas incorretas de PIN, você deverá utilizar sua senha mestre.",password:"Senha Mestre",pin:"Código PIN",pinDescription:"Desbloquear cofre com código PIN",setupPin:"Configurar Código PIN",enterNewPinDescription:"Digite um PIN que consista de, pelo menos, 6 dígitos",confirmPin:"Confirmar PIN",confirmPinDescription:"Digite seu PIN novamente para confirmar",invalidPinFormat:"Formato de PIN inválido",pinMismatch:"PINs não correspondem",incorrectPin:"PIN incorreto. {{attemptsRemaining}} tentativas restantes.",incorrectPinSingular:"PIN incorreto. 1 tentativa restante.",enableSuccess:"Desbloqueio por PIN habilitado com sucesso!",pinLocked:"Desbloqueio por PIN foi desabilitado. Por favor, utilize sua senha mestre para desbloquear o cofre.",pinSecurityWarning:"Desbloqueio por PIN na extensão de navegador pode ser menos segura que sua senha mestre, uma vez que PINs geralmente tem uma entropia menor e podem ser vulneráveis à tentativas forçadas caso seu dispositivo esteja comprometido. Utilize apenas em dispositivos que tenha total confiança."}},A1={passkey:"Passkey",site:"Site",helpText:"Passkeys são criadas no website quando solicitado. Elas não podem ser editadas manualmente. Para remover esta passkey, você pode excluí-la desta credencial. Para trocar esta passkey ou gerar uma nova, visite o website e siga as instruções.",passkeyMarkedForDeletion:"Passkey marcada para ser excluída",passkeyWillBeDeleted:"Esta passkey será excluída quando você salvar esta credencial.",useBrowserPasskey:"Utilizar Passkey do Navegador",bypass:{description:"Por quanto tempo você deseja utilizar o provedor de passkey do navegador para {{origin}}?",thisTimeOnly:"Apenas desta vez",alwaysForSite:"Sempre para este site"},authenticate:{title:"Fazer login com uma Passkey",signInFor:"Fazer login com uma passkey para",selectPasskey:"Selecione uma passkey para fazer login:",noPasskeysFound:"Nenhuma passkey foi encontrada para este site"},create:{title:"Criar Passkey",createFor:"Criar nova passkey para",titleLabel:"Título",titlePlaceholder:"Digite um nome para esta passkey",createButton:"Criar Passkey",selectPasskeyToReplace:"Selecione uma passkey para alterar:",createNewPasskey:"Criar Nova Passkey",replacingPasskey:"Alternado passkey: {{displayName}}",confirmReplace:"Confirmar Alterações",selectExistingLogin:"Adicionar à login existente:",selectExistingLoginDescription:"Adicionar este passkey em uma credencial de login para este site.",attachingToCredential:"Adicionando passkey em: {{serviceName}}",attachPasskey:"Adicionar Passkey"},settings:{passkeyProvider:"Provedor de Passkey",passkeyProviderOn:"Provedor de Passkey em "}},p1={title:"Recentemente Excluídos",noItems:"Nenhum item excluído",noItemsDescription:"Itens que você excluir aparecerão aqui por 30 dias, antes de serem removidos permanentemente.",description:"Estes itens serão excluídos permanentemente após 30 dias. Você pode restaurá-los ou excluí-los imediatamente.",restore:"Restaurar",deletePermanently:"Excluir Permanentemente",emptyAll:"Esvaziar Tudo",daysRemaining_one:"{{count}} dia restante",daysRemaining_other:"{{count}} dias restantes",expiringSoon:"Expirando em breve",confirmDeleteTitle:"Excluir Permanentemente?",confirmDeleteMessage:"Este item será excluído permanentemente, e não poderá ser restaurado.",confirmEmptyAllTitle:"Esvaziar Recentemente Excluídos?",confirmEmptyAllMessage:"Todos os {{count}} itens serão excluídos permanentemente, e não poderão ser restaurados."},y1={title:"Atualizar Cofre",subtitle:"AliasVault foi atualizado e seu cofre precisa ser atualizado. Isso deve levar apenas alguns segundos.",versionInformation:"Informação de Versão",yourVault:"Versão do seu cofre:",newVersion:"Nova versão disponível:",upgrade:"Atualizar Cofre",upgrading:"Atualizando...",whatsNew:"O Que Há de Novo",whatsNewDescription:"Uma atualização é necessária para utilizar as seguintes mudanças:",noDescriptionAvailable:"Nenhuma descrição disponível para esta versão.",alerts:{unableToGetVersionInfo:"Não foi possível solicitar informações da versão. Por favor, tente novamente.",selfHostedServer:"Servidor Self-Hosted",selfHostedWarning:"Se você está utilizando um servidor self-hosted, faça também a atualização da instância self-hosted, caso contrário o login no cliente web vai parar de funcionar.",continueUpgrade:"Continuar Atualização",upgradeFailed:"Atualização Falhou",failedToApplyMigration:"Falha ao aplicar migração ({{current}} de {{total}})"}},E1={unsyncedChangesTitle:"Alterações Dessincronizadas",unsyncedChangesWarning:"Você tem alterações dessincronizadas que serão perdidas caso você saia da sua conta agora. Têm certeza que deseja continuar?",logoutAnyway:"Sair assim mesmo"},b1={auth:i1,menu:s1,common:o1,content:l1,items:c1,itemTypes:u1,fieldLabels:d1,totp:m1,attachmentUploader:g1,emails:f1,settings:h1,passkeys:A1,recentlyDeleted:p1,upgrade:y1,logout:E1},I1={loginTitle:"Autentificare în AliasVault",username:"Numele de utilizator sau adresa de e-mail",usernamePlaceholder:"nume / nume@companie.com",passwordPlaceholder:"Introdu parola",rememberMe:"Ține-mă minte",loginButton:"Autentificare",noAccount:"Nu ai încă un cont?",createVault:"Creează un seif nou",twoFactorTitle:"Introdu codul de autentificare din aplicația ta de autentificare.",authCode:"Cod de autentificare",authCodePlaceholder:"Introdu codul din 6 cifre",verify:"Verifică",twoFactorNote:"Notă: dacă nu ai acces la dispozitivul de autentificare, poți reseta 2FA cu un cod de recuperare autentificându-te prin intermediul site-ului web.",masterPassword:"Parolă principală",unlockVault:"Deblochează",unlockWithPin:"Deblochează cu PIN",enterPinToUnlock:"Introdu codul PIN pentru a debloca seiful",useMasterPassword:"Folosește parola principală",unlockTitle:"Deblochează seiful",logoutConfirm:"Sigur vrei să te deconectezi?",unlockSuccessTitle:"Seiful a fost deblocat cu succes",unlockSuccessDescription:"Acum poți folosi completarea automată pentru câmpurile cu date de autentificare în browserul tău.",closePopup:"Închide această fereastră",browseVault:"Răsfoiește conținutul seifului",connectingTo:"Conectare la",switchAccounts:"Treci la alt cont?",loginWithMobile:"Autentificare prin aplicația mobilă",unlockWithMobile:"Deblochează prin aplicația mobilă",scanQrCode:"Scanează acest cod QR cu aplicația mobilă AliasVault pentru a te autentifica și debloca seiful.",errors:{invalidCode:"Introdu un cod de autentificare valid din 6 cifre.",serverError:"Conexiunea la serverul AliasVault a eșuat. Încearcă mai târziu sau contactează asistența dacă problema persistă.",wrongPassword:"Parolă incorectă. Încearcă din nou.",sessionExpired:"Sesiunea a expirat. Autentifică-te din nou.",mobileLoginRequestExpired:"Cererea de autentificare mobilă a expirat. Reîncarcă pagina și încearcă din nou."}},v1={vault:"Seif",emails:"E-mailuri"},C1={loading:"Se încarcă...",notice:"Notificare",error:"Eroare",cancel:"Anulează",confirm:"Confirmă",back:"Înapoi",next:"Înainte",use:"Folosește",add:"Adaugă",delete:"Șterge",undo:"Revocă",save:"Salvează",saving:"Se salvează...",create:"Creează",or:"Sau",close:"Închide",logout:"Deconectare",copied:"Copiat!",openInNewWindow:"Deschide în fereastră nouă",enabled:"Activat",disabled:"Dezactivat",showPassword:"Afișează parola",hidePassword:"Ascunde parola",showDetails:"Afișează detalii",hideDetails:"Ascunde detalii",copyToClipboard:"Copiază în clipboard",loadingEmails:"Se încarcă e-mailurile...",loadingTotpCodes:"Se încarcă codurile TOTP...",attachments:"Atașamente",loadingAttachments:"Se încarcă atașamentele...",settings:"Setări",recentEmails:"E-mailuri recente",credentials:"Date de autentificare",customFields:"Câmpuri personalizate",twoFactorAuthentication:"Autentificare cu doi factori",alias:"Alias",notes:"Note",email:"E-mail",username:"Utilizator",password:"Parolă",generate:"Generează",serviceName:"Nume Serviciu",loggedIn:"Autentificat",syncingVault:"Se sincronizează seiful",checkingVaultUpdates:"Se verifică actualizările seifului",syncingUpdatedVault:"Se sincronizează seiful actualizat",loadMore:"Încarcă mai multe",offline:"Deconectat",offlineMode:"Funcționează în modul offline",pendingSync:"Se sincronizează...",mergingVaultChanges:"Se îmbină modificările seifului...",uploadingVault:"Se încarcă seiful...",errors:{serverNotAvailable:"Serverul AliasVault nu este disponibil. Încearcă mai târziu sau contactează asistența.",clientVersionNotSupported:"Această versiune a extensiei AliasVault nu mai este compatibilă cu serverul. Actualizează extensia la cea mai recentă versiune.",browserExtensionOutdated:"Versiune extensie incompatibilă. Pentru a accesa seiful, actualizează extensia AliasVault la ultima versiune disponibilă.",serverVersionNotSupported:"Serverul AliasVault trebuie actualizat la o versiune mai nouă pentru a folosi această extensie. Contactează asistența pentru ajutor.",serverVersionTooOld:"Serverul AliasVault trebuie actualizat la o versiune mai nouă pentru a folosi această funcție. Contactează administratorul serverului.",unknownError:"A apărut o eroare necunoscută",unknownErrorTryAgain:"A apărut o eroare necunoscută. Încearcă din nou.",vaultNotAvailable:"Seiful nu este disponibil",vaultIsLocked:"Seiful este blocat",passwordChanged:"Parola ta a fost schimbată de la ultima autentificare. Autentifică-te din nou din motive de securitate.",syncConflictMaxRetries:"Sincronizarea seifului a eșuat după mai multe încercări. Reîncearcă mai târziu.",mergeFailed:"Îmbinarea modificărilor seifului a eșuat. Încearcă din nou."},apiErrors:{UNKNOWN_ERROR:"A apărut o eroare necunoscută. Încearcă din nou.",ACCOUNT_LOCKED:"Cont blocat temporar din cauza prea multor încercări eșuate. Reîncearcă mai târziu.",ACCOUNT_BLOCKED:"Contul tău a fost dezactivat. Dacă crezi că este o greșeală, contactează asistența.",USER_NOT_FOUND:"Utilizator sau parolă invalidă. Încearcă din nou.",INVALID_AUTHENTICATOR_CODE:"Cod de autentificare invalid. Încearcă din nou.",INVALID_RECOVERY_CODE:"Cod de recuperare invalid. Încearcă din nou.",REFRESH_TOKEN_REQUIRED:"Este necesar un token de actualizare.",INVALID_REFRESH_TOKEN:"Token de actualizare nevalid.",PUBLIC_REGISTRATION_DISABLED:"Înregistrarea conturilor noi este dezactivată pe acest server. Contactează administratorul.",USERNAME_REQUIRED:"Numele de utilizator este obligatoriu.",USERNAME_ALREADY_IN_USE:"Numele de utilizator este deja folosit.",USERNAME_AVAILABLE:"Numele de utilizator este disponibil.",USERNAME_MISMATCH:"Numele de utilizator nu se potrivește cu utilizatorul curent.",PASSWORD_MISMATCH:"Parola furnizată nu se potrivește cu parola ta curentă.",ACCOUNT_SUCCESSFULLY_DELETED:"Cont șters cu succes.",USERNAME_EMPTY_OR_WHITESPACE:"Numele de utilizator nu poate fi necompletat sau format doar din spații.",USERNAME_TOO_SHORT:"Nume prea scurt: trebuie să aibă cel puțin 3 caractere.",USERNAME_TOO_LONG:"Nume prea lung: nu poate depăși 40 de caractere.",USERNAME_INVALID_EMAIL:"Adresă de e-mail invalidă.",USERNAME_INVALID_CHARACTERS:"Numele de utilizator este invalid, poate conține doar litere sau cifre.",VAULT_NOT_UP_TO_DATE:"Seiful nu este la zi. Sincronizează seiful și încearcă din nou.",INTERNAL_SERVER_ERROR:"Eroare internă de server.",VAULT_ERROR:"Seiful local nu este la zi. Sincronizează seiful reîncărcând pagina."}},N1={or:"sau",new:"Nou",vaultLocked:"AliasVault este blocat.",creatingNewAlias:"Se creează un alias nou...",noMatchesFound:"Nicio potrivire găsită",searchVault:"Caută în seif...",enterServiceName:"Introdu numele serviciului",enterEmailAddress:"Introdu adresa de e-mail",enterUsername:"Introdu numele de utilizator",hideFor1Hour:"Ascunde pentru 1 oră (site-ul curent)",hidePermanently:"Ascunde definitiv (site-ul curent)",createRandomAlias:"Creează un alias aleatoriu",createUsernamePassword:"Creează utilizator/parolă",randomAlias:"Alias aleatoriu",usernamePassword:"Utilizator/parolă",createAndSaveAlias:"Creează și salvează alias",createAndSaveCredential:"Creează și salvează datele de autentificare",randomIdentityDescription:"Generează o identitate aleatorie cu o adresă de e-mail aleatorie accesibilă în AliasVault.",randomIdentityDescriptionDropdown:"Identitate aleatorie cu e-mail aleatoriu",manualCredentialDescription:"Specifică propria adresă de e-mail și numele de utilizator.",manualCredentialDescriptionDropdown:"Nume de utilizator și parolă introduse manual",failedToCreateIdentity:"Eșec la crearea identității. Încearcă din nou.",enterEmailAndOrUsername:"Introdu adresa de e-mail și/sau numele de utilizator",autofillWithAliasVault:"Completare automată cu AliasVault",generateRandomPassword:"Generează parolă aleatorie (copiază în clipboard)",generateNewPassword:"Generează parolă nouă",togglePasswordVisibility:"Comută vizibilitatea parolei",passwordCopiedToClipboard:"Parolă copiată în clipboard",openAliasVaultToUpgrade:"Deschide AliasVault pentru actualizare",vaultUpgradeRequired:"Este necesară actualizarea seifului.",dismissPopup:"Închide fereastra"},w1={title:"Elemente",itemName:"Nume",loginCredentials:"Date de autentificare",cardInformation:"Informații Card",addItem:"Adaugă element",addNewItem:"Adaugă element nou",saveItem:"Salvează element",itemDetails:"Detalii element",editItem:"Editează element",untitled:"Fără titlu",newFolder:"Dosar nou",createFolder:"Creează dosar",editFolder:"Editează dosarul",folderName:"Nume dosar",folderNameRequired:"Numele dosarului este obligatoriu",folder:"Dosar",welcomeTitle:"Bun venit în AliasVault!",welcomeDescription:"Pentru a utiliza extensia de browser AliasVault: accesează un site web și folosește fereastra pop-up de completare automată AliasVault pentru a crea noi date de autentificare.",noPasskeysFound:"Nu a fost creat niciun passkey încă. Passkey-urile sunt create vizitând site-uri care oferă această metodă de autentificare.",noAttachmentsFound:"Nu s-au găsit elemente cu atașamente",noItemsOfTypeFound:"Nu s-au găsit elemente de tip {{type}}",noMatchingItems:"Nu s-au găsit elemente care să se potrivească",noMatchingItemsSearch:"Nu s-au găsit elemente pentru „{{search}}”",noMatchingItemsWithFilter:"Niciun element {{filter}} nu se potrivește cu „{{search}}”",clearSearch:"Șterge căutarea",clearFilter:"Șterge filtrul",emptyFolderHint:"Acest dosar este gol. Pentru a muta elemente aici, editează elementul și apasă pe pictograma folderului din câmpul de nume.",allItemsInFolders:"Toate elementele tale sunt organizate în dosare. Apasă pe un dosar de mai sus pentru a vizualiza datele de autentificare sau folosește căutarea pentru a găsi elemente specifice.",deleteFolder:"Șterge dosarul",deleteFolderKeepItems:"Șterge doar dosarul",deleteFolderKeepItemsDescription:"Elementele vor fi mutate înapoi în lista principală.",deleteFolderAndItems:"Șterge dosarul și toate elementele",deleteFolderAndItemsDescription:"{{count}} element(e) vor fi mutate la Șterse Recent.",filters:{all:"(Toate) Elementele",passkeys:"Passkeys"},sort:{title:"Filtrează după",oldestFirst:"Cele mai vechi primele",newestFirst:"Cele mai noi primele",alphabetical:"Alfabetic (A-Z)"},deleteItemTitle:"Șterge element",deleteItemConfirm:"Sigur vrei să ștergi acest element?",viewHistory:"Vezi istoric",history:"Istoric",noHistoryAvailable:"Niciun istoric disponibil",tags:"Etichete",changePasswordComplexity:"Schimbă complexitatea parolei",passwordLength:"Lungime parolă",includeLowercase:"Include litere mici",includeUppercase:"Include litere mari",includeNumbers:"Include cifre",includeSpecialChars:"Include caractere speciale",avoidAmbiguousChars:"Evită caracterele ambigue (o, 0, etc.)",privateEmailTitle:"E-mail Privat",privateEmailAliasVaultServer:"Server AliasVault",privateEmailDescription:"Criptat E2E, complet privat.",publicEmailTitle:"Furnizori Publici de E-mail Temporar",publicEmailDescription:"Anonim, dar cu confidențialitate limitată. Conținutul poate fi citit de oricine cunoaște adresa.",validation:{required:"Acest câmp este obligatoriu"}},x1={selectType:"Adaugă element nou",typeLabel:"Tip element",creating:"Creare",editing:"Editare",regenerateAlias:"Regenerează alias",addCustomField:"Adaugă câmp personalizat",fieldLabel:"Etichetă câmp",enterFieldName:"Introdu numele câmpului",fieldType:"Tip câmp",fieldTypes:{text:"Text",hidden:"Ascuns (text mascat)",email:"E-mail",url:"URL",phone:"Telefon",number:"Număr",date:"Dată",textArea:"Zonă text"},login:{title:"Autentificare"},alias:{title:"Alias"},creditCard:{title:"Card de credit"},note:{title:"Notă securizată"}},T1={"login.url":"URL Website","login.username":"Utilizator","login.password":"Parolă","alias.first_name":"Prenume","alias.last_name":"Nume","alias.gender":"Gen","alias.birthdate":"Data nașterii","login.email":"E-mail","notes.content":"Note","card.cardholder_name":"Nume Titular","card.number":"Număr card","card.expiry_month":"Lună expirare","card.expiry_year":"An expirare","card.cvv":"CVV","card.pin":"PIN"},S1={addCode:"Adaugă cod 2FA",instructions:"Introdu cheia secretă afișată de site-ul unde dorești să activezi autentificarea cu doi factori.",nameOptional:"Nume (opțional)",secretKey:"Cheie Secretă",saveToViewCode:"Salvează pentru a vedea codul",defaultName:"Authenticator",errors:{invalidSecretKey:"Format cheie secretă invalid."}},k1={uploading:"Se încarcă...",uploadSuccess:"Fișiere încărcate cu succes.",deleteSuccess:"Atașament șters cu succes.",firefoxExpandRequired:"Pentru a încărca fișiere, folosește fereastra extinsă.",openExpandedWindow:"Deschide fereastra extinsă"},L1={title:"E-mailuri",deleteEmailTitle:"Șterge e-mail",deleteEmailConfirm:"Sigur vrei să ștergi definitiv acest e-mail?",from:"De la",to:"Către",date:"Data",emailContent:"Conținut e-mail",emailNotFound:"E-mailul nu a fost găsit",noEmails:"Nu s-au găsit e-mailuri",noEmailsDescription:"Nu ai primit încă niciun e-mail pe adresele tale private. Atunci când vei primi un e-mail nou, acesta va apărea aici.",offlineMessage:"Sunteți offline. Conectează-te la internet pentru a încărca e-mailurile.",dateFormat:{justNow:"acum",minutesAgo_single:"{{count}} minut în urmă",minutesAgo_plural:"{{count}} minute în urmă",hoursAgo_single:"{{count}} oră în urmă",hoursAgo_plural:"{{count}} ore în urmă",yesterday:"ieri"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Adresa de e-mail aleasă este deja utilizată. Schimbă adresa de e-mail prin editarea acestor date de autentificare.",CLAIM_DOES_NOT_EXIST:"A apărut o eroare la încărcarea e-mailurilor. Editează și salvează datele de autentificare pentru a sincroniza baza de date, apoi încearcă din nou."}},R1={serverUrl:"URL Server",language:"Limbă",autofillEnabled:"Activează completarea automată",version:"Versiune",openWebApp:"Deschide aplicația web",lock:"Blochează",globalSettings:"Setări Globale",autofillPopup:"Fereastra de completare automată",activeOnAllSites:"Activă pe toate site-urile (cu excepțiile de mai jos)",disabledOnAllSites:"Dezactivat pe toate site-urile",rightClickContextMenu:"Meniu contextual (clic dreapta)",autofillMatching:"Potrivire completare automată",autofillMatchingMode:"Mod de potrivire a completării automate",autofillMatchingModeDescription:"Determină care date de autentificare sunt considerate potrivite și afișate ca sugestii în fereastra de completare automată pentru un anumit site web.",autofillMatchingDefault:"URL + subdomeniu + nume (wildcard)",autofillMatchingUrlSubdomain:"URL + subdomeniu",autofillMatchingUrlExact:"Doar domeniul exact al URL-ului",siteSpecificSettings:"Setări specifice site-ului",autofillPopupOn:"Fereastra de completare automată pe: ",enabledForThisSite:"Activat pentru acest site",disabledForThisSite:"Dezactivat pentru acest site",temporarilyDisabledUntil:"Dezactivat temporar până la ",resetAllSiteSettings:"Resetează toate setările specifice site-ului",appearance:"Aspect",theme:"Temă",useDefault:"Implicită",light:"Luminoasă",dark:"Întunecată",keyboardShortcuts:"Comenzi rapide de tastatură",configureKeyboardShortcuts:"Configurează comenzile rapide de la tastatură",configure:"Configurează",clipboardClearTimeout:"Golește clipboardul după copiere",clipboardClearTimeoutDescription:"Golește automat clipboardul după copierea datelor sensibile",clipboardClearDisabled:"Niciodată",clipboardClear5Seconds:"După 5 secunde",clipboardClear10Seconds:"După 10 secunde",clipboardClear15Seconds:"După 15 secunde",autoLockTimeout:"Interval auto-blocare",autoLockTimeoutDescription:"Blochează automat seiful după o perioadă de inactivitate",autoLockTimeoutHelp:"Seiful se va bloca doar după perioada de inactivitate specificată (fără completare automată sau deschiderea extensiei). Seiful se va bloca întotdeauna la închiderea browserului.",autoLockNever:"Niciodată",autoLock15Seconds:"15 secunde",autoLock1Minute:"1 minut",autoLock5Minutes:"5 minute",autoLock15Minutes:"15 minute",autoLock30Minutes:"30 minute",autoLock1Hour:"1 oră",autoLock4Hours:"4 ore",autoLock8Hours:"8 ore",autoLock24Hours:"24 ore",versionPrefix:"Versiune ",autofillSettings:"Setări completare automată",clipboardSettings:"Setări clipboard",contextMenuSettings:"Setări meniu contextual",passkeySettings:"Setări passkey",contextMenu:"Meniu Contextual",contextMenuEnabled:"Meniul contextual este activat",contextMenuDisabled:"Meniul contextual este dezactivat",contextMenuDescription:"Clic dreapta pe câmpurile de introducere pentru a accesa opțiunile AliasVault",selectLanguage:"Selectează limba",serverConfiguration:"Configurare Server",serverConfigurationDescription:"Configurează URL-ul serverului AliasVault pentru instanțele self-hosted",customApiUrl:"URL API",customClientUrl:"URL Client",apiUrlHint:"URL-ul endpoint-ului API (de obicei URL client + /api)",clientUrlHint:"URL-ul interfeței web a instanței tale",autofillSettingsDescription:"Activează sau dezactivează fereastra de completare automată",autofillEnabledDescription:"Sugestiile de completare automată vor apărea în câmpurile de autentificare",autofillDisabledDescription:"Sugestiile sunt dezactivate global",languageSettings:"Limbă",validation:{apiUrlRequired:"URL-ul API este obligatoriu",apiUrlInvalid:"Introdu un URL API valid",clientUrlRequired:"URL-ul Client este obligatoriu",clientUrlInvalid:"Introdu un URL Client valid"},identityGenerator:"Generator de Identitate",identityGeneratorSettings:{description:"Configurează limba și genul implicit pentru generarea de noi identități.",languageSection:"Limbă",languageDescription:"Setează limba care va fi utilizată la generarea noilor identități.",genderSection:"Gen",genderDescription:"Setează preferința de gen pentru generarea noilor identități.",ageRangeSection:"Interval de vârstă",ageRangeDescription:"Setează intervalul de vârstă pentru generarea noilor identități.",genderOptions:{random:"Aleatoriu",male:"Masculin",female:"Feminin"}},unlockMethod:{title:"Metodă deblocare seif",introText:"Alege cum dorești să îți deblochezi seiful. Poți folosi parola principală (întotdeauna disponibilă) sau poți configura un cod PIN pentru acces rapid. După 3 încercări eșuate ale PIN-ului, va trebui să folosești parola principală.",password:"Parolă principală",pin:"Cod PIN",pinDescription:"Deblochează seiful cu codul PIN",setupPin:"Configurează Cod PIN",enterNewPinDescription:"Introdu un cod PIN de cel puțin 6 cifre",confirmPin:"Confirmă PIN",confirmPinDescription:"Introdu PIN-ul din nou pentru confirmare",invalidPinFormat:"Format PIN invalid",pinMismatch:"PIN-urile nu se potrivesc",incorrectPin:"PIN incorect. {{attemptsRemaining}} încercări rămase.",incorrectPinSingular:"PIN incorect. 1 încercare rămasă.",enableSuccess:"Deblocarea prin PIN a fost activată!",pinLocked:"Deblocarea prin PIN a fost dezactivată. Folosește parola principală.",pinSecurityWarning:"Deblocarea prin PIN în extensia de browser poate fi mai puțin sigură decât parola principală. PIN-urile au o entropie mai scăzută, fiind vulnerabile la atacuri de tip brute-force dacă dispozitivul este compromis. Folosește-o doar pe dispozitive în care ai încredere deplină."}},D1={passkey:"Passkey",site:"Site",helpText:"Passkey-urile sunt create pe site-uri când este solicitat. Nu pot fi editate manual. Pentru a înlocui un passkey, vizitează site-ul respectiv.",passkeyMarkedForDeletion:"Passkey marcat pentru ștergere",passkeyWillBeDeleted:"Acest passkey va fi șters atunci când salvezi aceste date de autentificare.",useBrowserPasskey:"Folosește Passkey-ul Browserului",bypass:{description:"Cât timp dorești să folosești furnizorul de passkey al browserului pentru {{origin}}?",thisTimeOnly:"Doar de data aceasta",alwaysForSite:"Întotdeauna pentru acest site"},authenticate:{title:"Autentificare cu Passkey",signInFor:"Autentificare cu passkey pentru",selectPasskey:"Selectează un passkey pentru autentificare:",noPasskeysFound:"Nu s-au găsit passkey-uri pentru acest site"},create:{title:"Creează Passkey",createFor:"Creează un passkey nou pentru",titleLabel:"Titlu",titlePlaceholder:"Introdu un nume pentru acest passkey",createButton:"Creează Passkey",selectPasskeyToReplace:"Selectează un passkey pentru a-l înlocui:",createNewPasskey:"Creează Passkey Nou",replacingPasskey:"Se înlocuiește passkey-ul: {{displayName}}",confirmReplace:"Confirmă Înlocuirea",selectExistingLogin:"Adaugă la o autentificare existentă:",selectExistingLoginDescription:"Atașează acest passkey unor date de autentificare existente pentru acest site.",attachingToCredential:"Se adaugă passkey-ul la: {{serviceName}}",attachPasskey:"Adaugă Passkey"},settings:{passkeyProvider:"Furnizor Passkey",passkeyProviderOn:"Furnizor Passkey pe "}},B1={title:"Șterse Recent",noItems:"Niciun element șters",noItemsDescription:"Elementele șterse vor apărea aici timp de 30 de zile înainte de a fi eliminate definitiv.",description:"Aceste elemente vor fi șterse definitiv după 30 de zile. Le poți restaura sau șterge imediat.",restore:"Restaurează",deletePermanently:"Șterge Definitiv",emptyAll:"Golește tot",daysRemaining_one:"{{count}} zi rămasă",daysRemaining_other:"{{count}} zile rămase",expiringSoon:"Expiră curând",confirmDeleteTitle:"Ștergi Definitiv?",confirmDeleteMessage:"Acest element va fi șters definitiv și nu va putea fi recuperat.",confirmEmptyAllTitle:"Golești elementele șterse recent?",confirmEmptyAllMessage:"Toate cele {{count}} elemente vor fi șterse definitiv și nu vor putea fi recuperate."},U1={title:"Actualizare Seif",subtitle:"AliasVault s-a actualizat și seiful tău trebuie actualizat. Aceasta va dura doar câteva secunde.",versionInformation:"Informații Versiune",yourVault:"Versiunea seifului tău:",newVersion:"Versiune nouă disponibilă:",upgrade:"Actualizează Seiful",upgrading:"Se actualizează...",whatsNew:"Ce este nou",whatsNewDescription:"Este necesară o actualizare pentru a permite următoarele modificări:",noDescriptionAvailable:"Nicio descriere disponibilă pentru această versiune.",alerts:{unableToGetVersionInfo:"Informațiile despre versiune nu au putut fi obținute. Reîncearcă.",selfHostedServer:"Server Self-Hosted",selfHostedWarning:"Dacă folosești un server self-hosted, asigură-te că actualizezi și instanța serverului, altfel autentificarea în clientul web nu va mai funcționa.",continueUpgrade:"Continuă Actualizarea",upgradeFailed:"Actualizare Eșuată",failedToApplyMigration:"Eșec la aplicarea migrării ({{current}} din {{total}})"}},M1={unsyncedChangesTitle:"Modificări Nesincronizate",unsyncedChangesWarning:"Ai modificări nesincronizate care se vor pierde dacă te deconectezi acum. Sigur vrei să continui?",logoutAnyway:"Deconectează-te oricum"},_1={auth:I1,menu:v1,common:C1,content:N1,items:w1,itemTypes:x1,fieldLabels:T1,totp:S1,attachmentUploader:k1,emails:L1,settings:R1,passkeys:D1,recentlyDeleted:B1,upgrade:U1,logout:M1},F1={loginTitle:"Войдите в AliasVault",username:"Имя пользователя или почта",usernamePlaceholder:"имя / имя@company.com",passwordPlaceholder:"Введите ваш пароль",rememberMe:"Запомнить меня",loginButton:"Войти",noAccount:"Нет аккаунта?",createVault:"Создать новое хранилище",twoFactorTitle:"Пожалуйста, введите код аутентификации из вашего приложения-аутентификатора.",authCode:"Код аутентификации",authCodePlaceholder:"Введите 6-значный код",verify:"Проверить",twoFactorNote:"Примечание: если у вас нет доступа к устройству аутентификации, вы можете сбросить ваш 2FA с помощью кода восстановления, войдя в систему через сайт.",masterPassword:"Мастер пароль",unlockVault:"Разблокировать",unlockWithPin:"Разблокировать ПИН-кодом\uFEFF",enterPinToUnlock:"Введите ПИН-код для разблокировки хранилища",useMasterPassword:"Использовать мастер-пароль",unlockTitle:"Разблокировать ваше хранилище",logoutConfirm:"Вы уверены, что хотите выйти?",unlockSuccessTitle:"Ваше хранилище успешно разблокировано",unlockSuccessDescription:"Теперь вы можете использовать автозаполнение форм входа в Вашем браузере.",closePopup:"Закрыть окно",browseVault:"Обзор содержимого хранилища",connectingTo:"Подключение к",switchAccounts:"Переключить аккаунт?",loginWithMobile:"Войти с помощью мобильного приложения",unlockWithMobile:"Разблокировать через мобильное приложение",scanQrCode:"Сканируйте QR-код в приложении AliasVault, чтобы войти.",errors:{invalidCode:"Пожалуйста, введите правильный 6-значный код аутентификации.",serverError:"Не удалось подключиться к серверу AliasVault. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",wrongPassword:"Неверный пароль. Пожалуйста, повторите попытку.",sessionExpired:"Время сеанса истекло. Пожалуйста, войдите снова.",mobileLoginRequestExpired:"Истекло время ожидания входа. Перезагрузите страницу и повторите попытку."}},O1={vault:"Хранилище",emails:"Почта"},j1={loading:"Загрузка...",notice:"Примечание",error:"Ошибка",cancel:"Отмена",confirm:"Подтвердить",back:"Назад",next:"Далее",use:"Использовать",add:"Добавить",delete:"Удалить",undo:"Отменить",save:"Сохранить",saving:"Сохраняем...",create:"Создать",or:"Или",close:"Закрыть",logout:"Выйти",copied:"Скопировано!",openInNewWindow:"Открыть в новом окне",enabled:"Включено",disabled:"Отключено",showPassword:"Показать пароль",hidePassword:"Скрыть пароль",showDetails:"Показать подробности",hideDetails:"Скрыть подробности",copyToClipboard:"Скопировать в буфер обмена",loadingEmails:"Загрузка писем...",loadingTotpCodes:"Загрузка TOTP кодов...",attachments:"Вложения",loadingAttachments:"Загрузка вложений...",settings:"Настройки",recentEmails:"Последние письма",credentials:"Учетные записи",customFields:"Пользовательские поля",twoFactorAuthentication:"Двухфакторная аутентификация",alias:"Псевдоним",notes:"Заметки",email:"Электронная почта",username:"Имя пользователя",password:"Пароль",generate:"Сгенерировать",serviceName:"Название сервиса",loggedIn:"Вход выполнен",syncingVault:"Синхронизация хранилища",checkingVaultUpdates:"Проверка наличия обновлений в хранилище",syncingUpdatedVault:"Синхронизация обновленного хранилища",loadMore:"Загрузить ещё",offline:"Офлайн",offlineMode:"Работа в автономном режиме",pendingSync:"Синхронизация...",mergingVaultChanges:"Объединение изменений в хранилище...",uploadingVault:"Загрузка хранилища...",errors:{serverNotAvailable:"Сервер AliasVault недоступен. Пожалуйста, повторите попытку позже или обратитесь в службу поддержки, если проблема не устранится.",clientVersionNotSupported:"Эта версия браузерного расширения AliasVault больше не поддерживается сервером. Пожалуйста, обновите расширение вашего браузера до последней версии.",browserExtensionOutdated:"Это расширение браузера устарело и не может быть использовано для доступа к этому хранилищу. Пожалуйста, обновите расширение, чтобы продолжить.",serverVersionNotSupported:"Чтобы использовать это расширение для браузера, сервер AliasVault необходимо обновить до более новой версии. Пожалуйста, обратитесь в службу поддержки, если вам нужна помощь.",serverVersionTooOld:"Сервер AliasVault необходимо обновить до более новой версии, чтобы использовать эту функцию. Если вам нужна помощь, обратитесь к администратору сервера.",unknownError:"Произошла неизвестная ошибка",unknownErrorTryAgain:"Произошла неизвестная ошибка. Попробуйте снова.",vaultNotAvailable:"Хранилище недоступно",vaultIsLocked:"Хранилище заблокировано",passwordChanged:"С момента вашего последнего входа ваш пароль изменился. Пожалуйста, войдите еще раз в целях безопасности.",syncConflictMaxRetries:"Ошибка синхронизации хранилища. Повторите попытку позже.",mergeFailed:"Не удалось объединить изменения. Попробуйте снова."},apiErrors:{UNKNOWN_ERROR:"Произошла неизвестная ошибка. Пожалуйста, попробуйте снова.",ACCOUNT_LOCKED:"Учетная запись временно заблокирована из-за слишком большого количества неудачных попыток. Пожалуйста, повторите попытку позже.",ACCOUNT_BLOCKED:"Ваша учетная запись была заблокирована. Если вы считаете, что это ошибка, пожалуйста, свяжитесь со службой поддержки.",USER_NOT_FOUND:"Неверное имя пользователя или пароль. Пожалуйста, попробуйте снова.",INVALID_AUTHENTICATOR_CODE:"Неверный код аутентификатора. Пожалуйста, попробуйте снова.",INVALID_RECOVERY_CODE:"Неверный код восстановления. Пожалуйста, попробуйте снова.",REFRESH_TOKEN_REQUIRED:"Требуется токен обновления.",INVALID_REFRESH_TOKEN:"Недопустимый токен обновления.",PUBLIC_REGISTRATION_DISABLED:"В настоящее время регистрация новой учетной записи на этом сервере отключена. Пожалуйста, свяжитесь с администратором.",USERNAME_REQUIRED:"Требуется ввести имя пользователя.",USERNAME_ALREADY_IN_USE:"Имя пользователя уже используется.",USERNAME_AVAILABLE:"Имя пользователя доступно.",USERNAME_MISMATCH:"Имя пользователя не соответствует текущему пользователю.",PASSWORD_MISMATCH:"Указанный пароль не совпадает с вашим текущим паролем.",ACCOUNT_SUCCESSFULLY_DELETED:"Аккаунт успешно удалена.",USERNAME_EMPTY_OR_WHITESPACE:"Имя пользователя не может быть пустым или через пробел.",USERNAME_TOO_SHORT:"Слишком короткое имя пользователя: должно быть не менее 3-х символов.",USERNAME_TOO_LONG:"Слишком длинное имя пользователя: оно не может быть длиннее 40 символов.",USERNAME_INVALID_EMAIL:"Неверный адрес электронной почты.",USERNAME_INVALID_CHARACTERS:"Имя пользователя неверно, может содержать только буквы или цифры.",VAULT_NOT_UP_TO_DATE:"Ваше хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище и повторите попытку.",INTERNAL_SERVER_ERROR:"Внутренняя ошибка сервера.",VAULT_ERROR:"Локальное хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище, обновив страницу, и повторите попытку."}},P1={or:"или",new:"Новый",vaultLocked:"AliasVault заблокирован.",creatingNewAlias:"Создание нового псевдонима...",noMatchesFound:"Совпадений не найдено",searchVault:"Поиск хранилища...",enterServiceName:"Введите имя сервиса",enterEmailAddress:"Введите адрес электронной почты",enterUsername:"Введите имя пользователя",hideFor1Hour:"Скрыть на 1 час (текущий сайт)",hidePermanently:"Скрыть навсегда (текущий сайт)",createRandomAlias:"Создать случайный псевдоним",createUsernamePassword:"Создайте имя пользователя/пароль",randomAlias:"Случайный псевдоним",usernamePassword:"Имя пользователя/пароль",createAndSaveAlias:"Создать и сохранить псевдоним",createAndSaveCredential:"Создать и сохранить учетные данные",randomIdentityDescription:"Сгенерировать случайную личность со случайным адресом электронной почты, доступным в AliasVault.",randomIdentityDescriptionDropdown:"Случайная личность со случайным адресом электронной почты",manualCredentialDescription:"Укажите свой собственный адрес электронной почты и имя пользователя.",manualCredentialDescriptionDropdown:"Ручной ввод имени пользователя и пароля",failedToCreateIdentity:"Не удалось создать личность. Пожалуйста, попробуйте снова.",enterEmailAndOrUsername:"Введите адрес электронной почты и/или имя пользователя",autofillWithAliasVault:"Автозаполнение с помощью AliasVault",generateRandomPassword:"Сгенерировать случайный пароль (скопировать в буфер обмена)",generateNewPassword:"Сгенерировать новый пароль",togglePasswordVisibility:"Переключение видимости пароля",passwordCopiedToClipboard:"Пароль скопирован в буфер обмена",openAliasVaultToUpgrade:"Откройте AliasVault для обновления",vaultUpgradeRequired:"Требуется обновление хранилища.",dismissPopup:"Закрыть окно"},H1={title:"Записи",itemName:"Имя",loginCredentials:"Учетные данные для авторизации",cardInformation:"Данные карты",addItem:"Добавить запись",addNewItem:"Добавить запись",saveItem:"Сохранить запись",itemDetails:"Детали записи",editItem:"Редактировать запись",untitled:"Без названия",newFolder:"Новая папка",createFolder:"Создать папку",editFolder:"Изменить папку",folderName:"Название папки",folderNameRequired:"Название папки обязательно",folder:"Папка",welcomeTitle:"Добро пожаловать в AliasVault!",welcomeDescription:"Чтобы использовать браузерное расширение AliasVault: перейдите на сайт и используйте всплывающее окно автозаполнения AliasVault для создания новых учетных данных.",noPasskeysFound:"Ключи доступа еще не созданы. Ключи доступа создаются при посещении веб-сайта, который предлагает их в качестве метода аутентификации.",noAttachmentsFound:"Элементы с вложениями не найдены",noItemsOfTypeFound:"Элементы типа «{{type}}» не найдены",noMatchingItems:"Совпадений не найдено",noMatchingItemsSearch:'По запросу "{{search}}" ничего не найдено',noMatchingItemsWithFilter:'Ничего не найдено в "{{filter}}" по запросу "{{search}}"',clearSearch:"Очистить поиск",clearFilter:"Сбросить фильтр",emptyFolderHint:"Эта папка пуста. Чтобы переместить сюда записи, перейдите в режим редактирования записи и нажмите на иконку папки в поле имени.",allItemsInFolders:"Все ваши данные разложены по папкам. Выберите нужную папку выше или воспользуйтесь поиском, чтобы найти конкретную запись.",deleteFolder:"Удалить папку",deleteFolderKeepItems:"Удалить только папку",deleteFolderKeepItemsDescription:"Элементы будут перемещены обратно в основной список.",deleteFolderAndItems:"Удалить папку и все элементы",deleteFolderAndItemsDescription:"{{count}} объект(ов) будет перемещено в раздел «Недавно удалённые».",filters:{all:"(Все) Записи",passkeys:"Ключи доступа"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Удалить элемент",deleteItemConfirm:"Вы уверены, что хотите удалить этот элемент?",viewHistory:"Посмотреть историю",history:"История",noHistoryAvailable:"История пока пуста",tags:"Теги",changePasswordComplexity:"Изменить сложность пароля",passwordLength:"Длина пароля",includeLowercase:"Включить строчные буквы",includeUppercase:"Включить заглавные буквы",includeNumbers:"Включить числа",includeSpecialChars:"Включить специальные символы",avoidAmbiguousChars:"Избегать двусмысленных символов (o, 0 и т.д.)",privateEmailTitle:"Личная электронная почта",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Шифрование E2E, полностью приватный.",publicEmailTitle:"Общедоступные временные поставщики электронной почты",publicEmailDescription:"Анонимность, но ограниченная конфиденциальность. Содержимое письма может прочитать любой, кому известен адрес.",validation:{required:"Это поле является обязательным"}},z1={selectType:"Добавить новую запись",typeLabel:"Тип записи",creating:"Создание",editing:"Редактирование",regenerateAlias:"Перегенерировать псевдоним",addCustomField:"Добавить свое поле",fieldLabel:"Название поля",enterFieldName:"Введите название поля",fieldType:"Тип поля",fieldTypes:{text:"Текст",hidden:"Скрыто (маскированный текст)",email:"Почта",url:"URL",phone:"Телефон",number:"Номер",date:"Дата",textArea:"Текстовая область"},login:{title:"Логин"},alias:{title:"Псевдоним"},creditCard:{title:"Банковская карта"},note:{title:"Защищенная заметка"}},Q1={"login.url":"URL веб-сайта","login.username":"Логин","login.password":"Пароль","alias.first_name":"Имя","alias.last_name":"Фамилия","alias.gender":"Пол","alias.birthdate":"Дата рождения","login.email":"Почта","notes.content":"Примечание","card.cardholder_name":"Имя держателя карты","card.number":"Номер карты","card.expiry_month":"Месяц окончания","card.expiry_year":"Год окончания","card.cvv":"CVV-код","card.pin":"PIN"},V1={addCode:"Добавить код 2FA",instructions:"Введите секретный ключ, указанный на веб-сайте, где вы хотите добавить двухфакторную аутентификацию.",nameOptional:"Имя (необязательно)",secretKey:"Секретный ключ",saveToViewCode:"Сохранить для просмотра кода",defaultName:"Аутентификатор",errors:{invalidSecretKey:"Неверный формат секретного ключа."}},G1={uploading:"Загрузка...",uploadSuccess:"Файлы успешно загружены.",deleteSuccess:"Вложение успешно удалено.",firefoxExpandRequired:"Для загрузки файлов используйте расширенное окно.",openExpandedWindow:"Открыть расширенное окно"},K1={title:"Письма",deleteEmailTitle:"Удалить письмо",deleteEmailConfirm:"Вы уверены, что хотите навсегда удалить это письмо?",from:"От",to:"К",date:"Дата",emailContent:"Содержимое письма",emailNotFound:"Адрес электронной почты не найден",noEmails:"Электронные письма не найдены",noEmailsDescription:"Вы еще не получали никаких электронных писем на свои личные адреса электронной почты. Когда вы получите новое электронное письмо, оно появится здесь.",offlineMessage:"Вы не в сети. Пожалуйста, подключитесь к Интернету, чтобы загрузить свои электронные письма.",dateFormat:{justNow:"прямо сейчас",minutesAgo_single:"{{count}} мин назад",minutesAgo_plural:"{{count}} минут назад",hoursAgo_single:"{{count}} часов назад",hoursAgo_plural:"{{count}} часов назад",yesterday:"вчера"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Текущий выбранный адрес электронной почты уже используется. Пожалуйста, измените адрес электронной почты, отредактировав эти учетные данные.",CLAIM_DOES_NOT_EXIST:"При попытке загрузить письма произошла ошибка. Пожалуйста, попробуйте отредактировать и сохранить данные для синхронизации базы данных, затем повторите попытку."}},q1={serverUrl:"URL-адрес сервера",language:"Язык",autofillEnabled:"Включить автозаполнение",version:"Версия",openWebApp:"Открыть веб-приложение",lock:"Заблокировать",globalSettings:"Глобальные настройки",autofillPopup:"Всплывающее окно автозаполнения",activeOnAllSites:"Активен на всех сайтах (если не отключен ниже)",disabledOnAllSites:"Отключено на всех сайтах",rightClickContextMenu:"Контекстное меню правым щелчком мыши",autofillMatching:"Соответствие автозаполнения",autofillMatchingMode:"Режим сопоставления автозаполнения",autofillMatchingModeDescription:"Определяет, какие учетные данные считаются соответствующими и отображаются в качестве предложений во всплывающем окне автозаполнения для данного веб-сайта.",autofillMatchingDefault:"URL + поддомен + подстановочный знак в названии",autofillMatchingUrlSubdomain:"URL + поддомен",autofillMatchingUrlExact:"Только точный URL-адрес домена",siteSpecificSettings:"Настройки для конкретного сайта",autofillPopupOn:"Всплывающее окно автозаполнения: ",enabledForThisSite:"Включено для этого сайта",disabledForThisSite:"Отключено для этого сайта",temporarilyDisabledUntil:"Временно отключен до тех пор, пока",resetAllSiteSettings:"Сбросить все настройки для сайтов",appearance:"Внешний вид",theme:"Тема",useDefault:"Использовать по умолчанию",light:"Светлая",dark:"Темная",keyboardShortcuts:"Горячие клавиши",configureKeyboardShortcuts:"Настройка горячих клавиш",configure:"Настройка",clipboardClearTimeout:"Очистить буфер обмена после копирования",clipboardClearTimeoutDescription:"Автоматическая очистка буфера обмена после копирования конфиденциальных данных",clipboardClearDisabled:"Никогда не очищать",clipboardClear5Seconds:"Очистка через 5 секунд",clipboardClear10Seconds:"Очистка через 10 секунд",clipboardClear15Seconds:"Очистка через 15 секунд",autoLockTimeout:"Тайм-аут автоматической блокировки",autoLockTimeoutDescription:"Автоматическая блокировка хранилища после некоторого периода бездействия",autoLockTimeoutHelp:"Хранилище будет заблокировано только по истечении указанного периода бездействия (не будет использоваться функция автозаполнения или не откроется всплывающее окно с расширением). Хранилище всегда будет заблокировано при закрытии браузера, независимо от этого параметра.",autoLockNever:"Никогда",autoLock15Seconds:"15 секунд",autoLock1Minute:"1 минута",autoLock5Minutes:"5 минут",autoLock15Minutes:"15 минут",autoLock30Minutes:"30 минут",autoLock1Hour:"1 час",autoLock4Hours:"4 часа",autoLock8Hours:"8 часов",autoLock24Hours:"24 часов",versionPrefix:"Версия ",autofillSettings:"Настройки автозаполнения",clipboardSettings:"Настройки буфера обмена",contextMenuSettings:"Настройки контекстного меню",passkeySettings:"Настройки ключа доступа",contextMenu:"Контекстное меню",contextMenuEnabled:"Контекстное меню включено",contextMenuDisabled:"Контекстное меню отключено",contextMenuDescription:"Щелкните правой кнопкой мыши на полях ввода, чтобы получить доступ к параметрам AliasVault",selectLanguage:"Выбрать язык",serverConfiguration:"Конфигурация сервера",serverConfigurationDescription:"Настройте URL-адрес сервера AliasVault для самостоятельно размещенных экземпляров",customApiUrl:"URL-адрес API",customClientUrl:"URL-адрес клиента\uFEFF",apiUrlHint:"URL-адрес конечной точки API (обычно URL-адрес клиента + /api)\uFEFF",clientUrlHint:"URL-адрес веб-интерфейса вашего самостоятельно размещенного экземпляра",autofillSettingsDescription:"Включить или отключить всплывающее окно автозаполнения на веб-страницах",autofillEnabledDescription:"В формах входа будут появляться подсказки для автозаполнения",autofillDisabledDescription:"Подсказки автозаполнения отключены глобально",languageSettings:"Язык",validation:{apiUrlRequired:"Требуется URL-адрес API",apiUrlInvalid:"Пожалуйста, введите корректный URL-адрес API",clientUrlRequired:"Требуется URL-адрес клиента",clientUrlInvalid:"Пожалуйста, введите корректный URL-адрес клиента"},identityGenerator:"Генератор личности",identityGeneratorSettings:{description:"Настройте язык и гендерные предпочтения по умолчанию для создания новых личностей.",languageSection:"Язык",languageDescription:"Установите язык, который будет использоваться при создании новых личностей.",genderSection:"Пол",genderDescription:"Установите гендерные предпочтения для создания новых личностей.",ageRangeSection:"Возрастной диапазон",ageRangeDescription:"Установите диапазон возраста для генерации новых личностей.",genderOptions:{random:"Случайный",male:"Мужской",female:"Женский"}},unlockMethod:{title:"Способ разблокировки хранилища",introText:"Выберите способ разблокировки хранилища. Вы можете использовать свой мастер-пароль (он доступен всегда) или установить ПИН-код для быстрого доступа. После 3 неудачных попыток ввода ПИН-кода необходимо будет ввести мастер-пароль.",password:"Мастер-пароль",pin:"ПИН-код",pinDescription:"Разблокировать хранилище ПИН-кодом",setupPin:"Установить ПИН-код",enterNewPinDescription:"Введите ПИН-код, состоящий как минимум из 6 цифр",confirmPin:"Подтвердите ПИН-код\uFEFF",confirmPinDescription:"Повторите ПИН-код для подтверждения",invalidPinFormat:"Неверный формат ПИН-кода\uFEFF",pinMismatch:"ПИН-коды не совпадают",incorrectPin:"Неверный ПИН-код. Осталось {{attemptsRemaining}} попытки.",incorrectPinSingular:"Неверный ПИН-код. Осталась 1 попытка.",enableSuccess:"Разблокировка по ПИН-коду успешно включена",pinLocked:"Разблокировка по ПИН-коду отключена. Пожалуйста, используйте ваш мастер-пароль для разблокировки хранилища.",pinSecurityWarning:"Разблокировка с помощью ПИН-кода в расширении для браузера может быть менее безопасной, чем использование вашего мастер-пароля, поскольку ПИН-коды обычно имеют более низкую энтропию и могут быть подобраны методом перебора (брутфорс), если ваше устройство будет скомпрометировано. Используйте этот способ только на устройствах, которым вы полностью доверяете."}},W1={passkey:"Ключ доступа",site:"Сайт",helpText:"Ключи доступа создаются на веб-сайте по запросу. Их нельзя редактировать вручную. Чтобы удалить этот ключ доступа, вы можете удалить его из этой учетной записи. Чтобы заменить этот ключ доступа или создать новый, посетите веб-сайт и следуйте его инструкциям.",passkeyMarkedForDeletion:"Ключ доступа помечен на удаление\uFEFF",passkeyWillBeDeleted:"Этот ключ доступа будет удален при сохранении этой учетной записи.",useBrowserPasskey:"Использовать ключ доступа из браузера\uFEFF",bypass:{description:"На какой срок вы хотите предоставить сайту {{origin}} доступ к ключам, сохраненным в браузере?",thisTimeOnly:"Только в этот раз",alwaysForSite:"Всегда для этого сайта"},authenticate:{title:"Вход с помощью ключа доступа",signInFor:"Вход с ключом доступа для",selectPasskey:"Выберите ключ доступа для входа:",noPasskeysFound:"Ключи доступа для этого сайта не найдены"},create:{title:"Создание ключа доступа",createFor:"Создайте новый ключ доступа для",titleLabel:"Название",titlePlaceholder:"Укажите название для этого ключа доступа",createButton:"Создать ключ доступа",selectPasskeyToReplace:"Выберите ключ доступа для замены:",createNewPasskey:"Создать новый ключ доступа",replacingPasskey:"Замена ключа доступа: {{displayName}}",confirmReplace:"Подтвердить замену",selectExistingLogin:"Привязать к логину:",selectExistingLoginDescription:"Привяжите этот ключ доступа к существующей учетной записи для этого сайта.",attachingToCredential:"Добавление ключа доступа для: {{serviceName}}",attachPasskey:"Добавить ключ доступа"},settings:{passkeyProvider:"Провайдер ключей доступа",passkeyProviderOn:"Провайдер ключей доступа включен "}},Y1={title:"Недавно удаленные",noItems:"Нет удаленных элементов",noItemsDescription:"Удаленные элементы будут храниться здесь 30 дней, после чего они будут удалены безвозвратно.",description:"Эти элементы будут безвозвратно удалены через 30 дней. Вы можете восстановить их или удалить немедленно.",restore:"Восстановить",deletePermanently:"Удалить безвозвратно",emptyAll:"Очистить все",daysRemaining_one:"Остался {{count}} день",daysRemaining_other:"Осталось {{count}} дней",expiringSoon:"Скоро будут удалены",confirmDeleteTitle:"Удалить безвозвратно?",confirmDeleteMessage:"Этот элемент будет удален навсегда без возможности восстановления.",confirmEmptyAllTitle:"Очистить «Недавно удалённые»?",confirmEmptyAllMessage:"Все элементы {{count}} будут удалены навсегда без возможности восстановления."},J1={title:"Обновить хранилище",subtitle:"AliasVault обновился, и ваше хранилище необходимо обновить. Это займет всего несколько секунд.",versionInformation:"Информация о версии",yourVault:"Версия вашего хранилища:",newVersion:"Доступна новая версия:",upgrade:"Обновить хранилище",upgrading:"Обновление...",whatsNew:"Что нового",whatsNewDescription:"Для поддержки следующих изменений требуется обновление:",noDescriptionAvailable:"Описание для этой версии недоступно.",alerts:{unableToGetVersionInfo:"Не удалось получить информацию о версии. Пожалуйста, попробуйте снова.",selfHostedServer:"Автономный сервер",selfHostedWarning:"Если вы используете автономный сервер, обязательно обновите свой автономный экземпляр, так как в противном случае вход в веб-клиент перестанет работать.",continueUpgrade:"Продолжить обновление",upgradeFailed:"Ошибка обновления",failedToApplyMigration:"Не удалось применить перенос ({{current}} из {{total}})"}},X1={unsyncedChangesTitle:"Несинхронизированные изменения",unsyncedChangesWarning:"У вас есть несинхронизированные изменения, которые будут потеряны, если вы выйдете из аккаунта сейчас. Вы уверены, что хотите продолжить?",logoutAnyway:"Все равно выйти"},$1={auth:F1,menu:O1,common:j1,content:P1,items:H1,itemTypes:z1,fieldLabels:Q1,totp:V1,attachmentUploader:G1,emails:K1,settings:q1,passkeys:W1,recentlyDeleted:Y1,upgrade:J1,logout:X1},Z1={loginTitle:"Увійти до AliasVault",username:"Ім'я користувача або електронна пошта",usernamePlaceholder:"ім'я / name@company.com",passwordPlaceholder:"Введіть ваш пароль",rememberMe:"Запам'ятати мене",loginButton:"Увійти",noAccount:"Ще не маєте облікового запису?",createVault:"Створити нове сховище",twoFactorTitle:"Будь ласка, введіть код автентифікації з вашого застосунку для автентифікації.",authCode:"Код автентифікації",authCodePlaceholder:"Введіть 6-значний код",verify:"Перевірка",twoFactorNote:"Примітка: якщо у вас немає доступу до вашого пристрою автентифікатора, ви можете скинути налаштування 2FA за допомогою коду відновлення, увійшовши через вебсайт.",masterPassword:"Головний пароль",unlockVault:"Розблокувати",unlockWithPin:"Розблокувати за допомогою ПІН-коду",enterPinToUnlock:"Введіть свій ПІН-код, щоб розблокувати сховище",useMasterPassword:"Використовуйте головний пароль",unlockTitle:"Розблокувати своє сховище",logoutConfirm:"Ви впевнені, що хочете вийти?",unlockSuccessTitle:"Ваше сховище успішно розблоковано",unlockSuccessDescription:"Тепер ви можете використовувати автозаповнення форм входу у вашому браузері.",closePopup:"Закрити цю підказку",browseVault:"Переглянути вміст сховища",connectingTo:"Підключення до",switchAccounts:"Змінити обліковий запис?",loginWithMobile:"Увійти за допомогою мобільного додатку",unlockWithMobile:"Розблокувати за допомогою мобільного додатку",scanQrCode:"Проскануйте цей QR-код за допомогою мобільного додатка AliasVault, щоб увійти та розблокувати сховище.",errors:{invalidCode:"Будь ласка, введіть дійсний 6-значний код автентифікації.",serverError:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",wrongPassword:"Невірний пароль. Будь ласка, спробуйте ще раз.",sessionExpired:"Час сеансу закінчився. Будь ласка, увійдіть знову.",mobileLoginRequestExpired:"Час очікування запиту на вхід у мобільний додаток закінчився. Перезавантажте сторінку та спробуйте ще раз."}},ek={vault:"Vault",emails:"Електронні адреси"},tk={loading:"Завантаження даних...",notice:"Примітка",error:"Помилка",cancel:"Скасувати",confirm:"Підтвердити",back:"Назад",next:"Далі",use:"Використовувати",add:"Add",delete:"Видалити",undo:"Скасувати",save:"Зберегти",saving:"Saving...",create:"Створити",or:"Або",close:"Закрити",logout:"Вихід",copied:"Скопійовано!",openInNewWindow:"Відкрити у новому вікні",enabled:"Увімкнено",disabled:"Вимкнено",showPassword:"Показати пароль",hidePassword:"Приховати пароль",showDetails:"Показати подробиці",hideDetails:"Приховати подробиці",copyToClipboard:"Копіювати до буфера обміну",loadingEmails:"Завантаження електронних адрес...",loadingTotpCodes:"Завантаження кодів TOTP...",attachments:"Вкладення",loadingAttachments:"Завантаження вкладень...",settings:"Налаштування",recentEmails:"Останні електронні листи",credentials:"Облікові дані",customFields:"Custom Fields",twoFactorAuthentication:"Двофакторна автентифікація",alias:"Псевдонім",notes:"Нотатки",email:"Електронна пошта",username:"Ім'я користувача",password:"Пароль",generate:"Generate",serviceName:"Назва сервісу",loggedIn:"Вхід виконано",syncingVault:"Синхронізація сховища",checkingVaultUpdates:"Перевірка оновлень сховища",syncingUpdatedVault:"Синхронізація оновленого сховища",loadMore:"Завантажити ще",offline:"Offline",offlineMode:"Operating in offline mode",pendingSync:"Syncing...",mergingVaultChanges:"Merging vault changes...",uploadingVault:"Uploading vault...",errors:{serverNotAvailable:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",clientVersionNotSupported:"Ця версія розширення браузера AliasVault більше не підтримується сервером. Будь ласка, оновіть розширення браузера до останньої версії.",browserExtensionOutdated:"Це розширення браузера застаріло, і його не можна використовувати для доступу до цього сховища. Щоб продовжити, оновіть це розширення браузера.",serverVersionNotSupported:"Щоб використовувати це розширення браузера, потрібно оновити сервер AliasVault до новішої версії. Зверніться до служби підтримки, якщо вам потрібна допомога.",serverVersionTooOld:"Щоб скористатися цією функцією, потрібно оновити сервер AliasVault до нової версії. Якщо вам потрібна допомога, будь ласка, зверніться до адміністратора сервера.",unknownError:"Сталася невідома помилка",unknownErrorTryAgain:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",vaultNotAvailable:"Сховище недоступне",vaultIsLocked:"Сховище заблоковано",passwordChanged:"Ваш пароль змінився з моменту останнього входу. З міркувань безпеки, будь ласка, увійдіть ще раз.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again."},apiErrors:{UNKNOWN_ERROR:"Сталася невідома помилка. Будь ласка, спробуйте ще раз.",ACCOUNT_LOCKED:"Обліковий запис тимчасово заблоковано через занадто багато невдалих спроб. Будь ласка, спробуйте пізніше.",ACCOUNT_BLOCKED:"Ваш обліковий запис вимкнено. Якщо ви вважаєте, що це помилка, зверніться до служби підтримки.",USER_NOT_FOUND:"Недійсне ім'я користувача або пароль. Спробуйте ще раз.",INVALID_AUTHENTICATOR_CODE:"Недійсний код автентифікатора. Спробуйте ще раз.",INVALID_RECOVERY_CODE:"Недійсний код відновлення. Будь ласка, спробуйте ще раз.",REFRESH_TOKEN_REQUIRED:"Необхідне оновлення токена.",INVALID_REFRESH_TOKEN:"Оновлення токена невдале.",PUBLIC_REGISTRATION_DISABLED:"Реєстрація нових облікових записів на цьому сервері наразі вимкнена. Зверніться до адміністратора.",USERNAME_REQUIRED:"Ім'я користувача обов'язкове.",USERNAME_ALREADY_IN_USE:"Ім'я користувача вже використовується.",USERNAME_AVAILABLE:"Ім'я користувача доступне.",USERNAME_MISMATCH:"Ім'я користувача не відповідає поточному користувачеві.",PASSWORD_MISMATCH:"Введений пароль не відповідає вашому поточному паролю.",ACCOUNT_SUCCESSFULLY_DELETED:"Обліковий запис успішно видалено.",USERNAME_EMPTY_OR_WHITESPACE:"Ім’я користувача не може бути порожнім або містити пробіли.",USERNAME_TOO_SHORT:"Ім’я користувача закоротке: має містити щонайменше 3 символи.",USERNAME_TOO_LONG:"Ім'я користувача занадто довге: не може бути довшим за 40 символів.",USERNAME_INVALID_EMAIL:"Недійсна адреса електронної пошти.",USERNAME_INVALID_CHARACTERS:"Ім'я користувача недійсне, може містити лише літери або цифри.",VAULT_NOT_UP_TO_DATE:"Ваше сховище застаріло. Синхронізуйте його та спробуйте ще раз.",INTERNAL_SERVER_ERROR:"Внутрішня помилка сервера.",VAULT_ERROR:"Локальне сховище не оновлене. Синхронізуйте своє сховище, оновивши сторінку, та повторіть спробу."}},ak={or:"або",new:"Новий",vaultLocked:"AliasVault заблоковано.",creatingNewAlias:"Створення нового псевдоніму...",noMatchesFound:"Збігів не знайдено",searchVault:"Пошук сховища...",enterServiceName:"Введіть назву служби",enterEmailAddress:"Введіть електронну адресу",enterUsername:"Введіть ім'я користувача",hideFor1Hour:"Сховати протягом 1 години (поточний сайт)",hidePermanently:"Приховати назавжди (поточний сайт)",createRandomAlias:"Створити випадковий псевдонім",createUsernamePassword:"Створити ім'я користувача/пароль",randomAlias:"Випадковий псевдонім",usernamePassword:"Ім'я користувача/Пароль",createAndSaveAlias:"Створити та зберегти псевдонім",createAndSaveCredential:"Створити та зберегти облікові дані",randomIdentityDescription:"Згенеруйте випадкову особу з випадковою адресою електронної пошти, доступною в AliasVault.",randomIdentityDescriptionDropdown:"Випадкова ідентифікація з випадковою електронною поштою",manualCredentialDescription:"Вкажіть власну адресу електронної пошти та ім'я користувача.",manualCredentialDescriptionDropdown:"Ім'я користувача та пароль вручну",failedToCreateIdentity:"Не вдалося створити ідентифікатор. Спробуйте ще раз.",enterEmailAndOrUsername:"Введіть електронну пошту та/або ім'я користувача",autofillWithAliasVault:"Автозаповнення за допомогою AliasVault",generateRandomPassword:"Згенерувати випадковий пароль (скопіювати в буфер обміну)",generateNewPassword:"Згенерувати новий пароль",togglePasswordVisibility:"Перемикання видимості пароля",passwordCopiedToClipboard:"Пароль скопійовано в буфер обміну",openAliasVaultToUpgrade:"Відкрити AliasVault для покращення",vaultUpgradeRequired:"Потрібне оновлення сховища.",dismissPopup:"Закрити спливаюче вікно"},nk={title:"Items",itemName:"Назва",loginCredentials:"Дані для входу",cardInformation:"Card Information",addItem:"Add Item",addNewItem:"Add new item",saveItem:"Save Item",itemDetails:"Item Details",editItem:"Edit Item",untitled:"Untitled",newFolder:"New Folder",createFolder:"Створити теку",editFolder:"Edit Folder",folderName:"Folder Name",folderNameRequired:"Folder name is required",folder:"Тека",welcomeTitle:"Ласкаво просимо до AliasVult!",welcomeDescription:"Щоб скористатися розширенням браузера AliasVault: перейдіть на вебсайт і скористайтеся спливаючим вікном автозаповнення AliasVault, щоб створити нові облікові дані.",noPasskeysFound:"Ключі доступу ще не створено. Ключі доступу створюються під час відвідування вебсайту, який пропонує ключі доступу як спосіб автентифікації.",noAttachmentsFound:"No items with attachments found",noItemsOfTypeFound:"No {{type}} items found",noMatchingItems:"No matching items found",noMatchingItemsSearch:'No items matching "{{search}}"',noMatchingItemsWithFilter:'No {{filter}} items matching "{{search}}"',clearSearch:"Clear search",clearFilter:"Clear filter",emptyFolderHint:"This folder is empty. To move items to this folder, edit the item and tap the folder icon in the name field.",allItemsInFolders:"All your items are organized in folders. Click a folder above to view your credentials, or use the search to find specific items.",deleteFolder:"Delete Folder",deleteFolderKeepItems:"Delete folder only",deleteFolderKeepItemsDescription:"Items will be moved back to the main list.",deleteFolderAndItems:"Delete folder and all items",deleteFolderAndItemsDescription:"{{count}} item(s) will be moved to Recently Deleted.",filters:{all:"(All) Items",passkeys:"Ключі доступу"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"Delete Item",deleteItemConfirm:"Are you sure you want to delete this item?",viewHistory:"View history",history:"History",noHistoryAvailable:"No history available",tags:"Теги",changePasswordComplexity:"Зміна складності пароля",passwordLength:"Довжина пароля",includeLowercase:"Включити малі літери",includeUppercase:"Включити великі літери",includeNumbers:"Включити числа",includeSpecialChars:"Включити спеціальні символи",avoidAmbiguousChars:"Уникайте неоднозначних символів (o, 0 тощо)",privateEmailTitle:"Приватна електронна адреса",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Наскрізне шифрування, повністю конфіденційно.",publicEmailTitle:"Публічні тимчасові постачальники електронної пошти",publicEmailDescription:"Анонімно, але обмежена конфіденційність. Зміст електронного листа може прочитати будь-хто, хто знає адресу.",validation:{required:"Це поле обов'язкове"}},rk={selectType:"Add New Item",typeLabel:"Item Type",creating:"Creating",editing:"Editing",regenerateAlias:"Regenerate alias",addCustomField:"Add custom field",fieldLabel:"Field Label",enterFieldName:"Enter field name",fieldType:"Field Type",fieldTypes:{text:"Text",hidden:"Hidden (masked text)",email:"Електронна пошта",url:"URL",phone:"Phone",number:"Number",date:"Date",textArea:"Text Area"},login:{title:"Увійти"},alias:{title:"Псевдонім"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},ik={"login.url":"Website URL","login.username":"Username","login.password":"Пароль","alias.first_name":"Ім’я","alias.last_name":"Прізвище","alias.gender":"Стать","alias.birthdate":"Birthdate","login.email":"Пошта","notes.content":"Нотатки","card.cardholder_name":"Cardholder Name","card.number":"Card Number","card.expiry_month":"Expiry Month","card.expiry_year":"Expiry Year","card.cvv":"CVV","card.pin":"PIN"},sk={addCode:"Add 2FA Code",instructions:"Enter the secret key shown by the website where you want to add two-factor authentication.",nameOptional:"Ім'я (необов'язково)",secretKey:"Секретний ключ",saveToViewCode:"Зберегти для перегляду коду",defaultName:"Authenticator",errors:{invalidSecretKey:"Invalid secret key format."}},ok={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},lk={title:"Електронні листи",deleteEmailTitle:"Видалити електронного листа",deleteEmailConfirm:"Ви впевнені, що хочете остаточно видалити цей електронний лист?",from:"Від",to:"До",date:"Дата",emailContent:"Вміст електронного листа",emailNotFound:"Електронний лист не знайдено",noEmails:"Електронних листів не знайдено",noEmailsDescription:"Ви ще не отримували жодних листів на свої приватні адреси електронної пошти. Коли ви отримаєте новий лист, він з’явиться тут.",offlineMessage:"Ви офлайн. Будь ласка, приєднайтесь до Інтернету, щоб завантажити свої електронні листи.",dateFormat:{justNow:"щойно",minutesAgo_single:"{{count}} хвилина тому",minutesAgo_plural:"{{count}} хвилин тому",hoursAgo_single:"{{count}} година тому",hoursAgo_plural:"{{count}} годин тому",yesterday:"учора"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Поточна вибрана електронна адреса вже використовується. Змініть електронну адресу, відредагувавши ці облікові дані.",CLAIM_DOES_NOT_EXIST:"Під час спроби завантажити електронні листи сталася помилка. Спробуйте відредагувати та зберегти запис облікових даних, щоб синхронізувати базу даних, а потім повторіть спробу."}},ck={serverUrl:"URL-адреса сервера",language:"Мова",autofillEnabled:"Увімкнути автозаповнення",version:"Версія",openWebApp:"Відкрити веб додаток",lock:"Заблокувати",globalSettings:"Глобальні налаштування",autofillPopup:"Спливаюче вікно автозаповнення",activeOnAllSites:"Активно на всіх сайтах (якщо не вимкнено нижче)",disabledOnAllSites:"Вимкнено на всіх сайтах",rightClickContextMenu:"Контекстне меню правою кнопкою миші",autofillMatching:"Автозаповнення відповідності",autofillMatchingMode:"Режим автозаповнення відповідностей",autofillMatchingModeDescription:"Визначає, які облікові дані вважаються відповідними та будуть показуватися як пропозиції у спливному вікні автозаповнення для певного вебсайту.",autofillMatchingDefault:"URL-адреса + піддомен + універсальне ім'я",autofillMatchingUrlSubdomain:"URL-адреса + піддомен",autofillMatchingUrlExact:"Лише точний домен URL-адреси",siteSpecificSettings:"Налаштування, специфічні для сайту",autofillPopupOn:"Спливаюче вікно автозаповнення на: ",enabledForThisSite:"Увімкнено для цього сайту",disabledForThisSite:"Вимкнено для цього сайту",temporarilyDisabledUntil:"Тимчасово вимкнено до ",resetAllSiteSettings:"Скинути всі налаштування, характерні для сайту",appearance:"Зовнішній вигляд",theme:"Тема",useDefault:"Використовувати за замовчуванням",light:"Світла",dark:"Темна",keyboardShortcuts:"Комбінації клавіш",configureKeyboardShortcuts:"Налаштування комбінацій клавіш",configure:"Налаштування",clipboardClearTimeout:"Очистити буфер обміну після копіювання",clipboardClearTimeoutDescription:"Автоматично очищати буфер обміну після копіювання конфіденційних даних",clipboardClearDisabled:"Ніколи не очищати",clipboardClear5Seconds:"Очистити після 5 секунд",clipboardClear10Seconds:"Очистити після 10 секунд",clipboardClear15Seconds:"Очистити після 15 секунд",autoLockTimeout:"Тайм-аут автоматичного блокування",autoLockTimeoutDescription:"Автоматично блокувати сховище після періоду бездіяльності",autoLockTimeoutHelp:"Сховище буде заблоковано лише після зазначеного періоду бездіяльності (не використовується автозаповнення або не відкривається спливне вікно розширення). Сховище завжди блокуватиметься, коли браузер закривається, незалежно від цього налаштування.",autoLockNever:"Ніколи",autoLock15Seconds:"15 секунд",autoLock1Minute:"1 хвилина",autoLock5Minutes:"5 хвилин",autoLock15Minutes:"15 хвилин",autoLock30Minutes:"30 хвилин",autoLock1Hour:"1 година",autoLock4Hours:"4 години",autoLock8Hours:"8 годин",autoLock24Hours:"24 години",versionPrefix:"Версія ",autofillSettings:"Налаштування автозаповнення",clipboardSettings:"Параметри буфера обміну",contextMenuSettings:"Налаштування контекстного меню",passkeySettings:"Налаштування ключа доступу",contextMenu:"Контекстне меню",contextMenuEnabled:"Контекстне меню увімкнено",contextMenuDisabled:"Контекстне меню вимкнено",contextMenuDescription:"Натисніть правою кнопкою миші на поля введення, щоб отримати доступ до параметрів AliasVault",selectLanguage:"Виберіть мову",serverConfiguration:"Конфігурація сервера",serverConfigurationDescription:"Налаштування URL-адреси сервера AliasVault для самостійно розміщених екземплярів",customApiUrl:"URL-адреса API",customClientUrl:"URL-адреса клієнта",apiUrlHint:"URL-адреса кінцевої точки API (зазвичай URL-адреса клієнта + /api)",clientUrlHint:"URL-адреса вебінтерфейсу вашого самостійного екземпляра",autofillSettingsDescription:"Увімкнення або вимкнення спливаючого вікна автозаповнення на вебсторінках",autofillEnabledDescription:"",autofillDisabledDescription:"Autofill suggestions are disabled globally",languageSettings:"Мова",validation:{apiUrlRequired:"URL-адреса API обов'язкова",apiUrlInvalid:"Будь ласка, введіть дійсну URL-адресу API",clientUrlRequired:"URL-адреса клієнта обов'язкова",clientUrlInvalid:"Будь ласка, введіть дійсну URL-адресу клієнта"},identityGenerator:"Генератор ідентифікаційних даних",identityGeneratorSettings:{description:"Налаштуйте мову та стать за замовчуванням для створення нових ідентифікаційних даних.",languageSection:"Мова",languageDescription:"Встановіть мову, яка використовуватиметься під час створення нових ідентифікаторів.",genderSection:"Стать",genderDescription:"Встановити параметри гендеру для генерації нових ідентифікацій.",ageRangeSection:"Віковий діапазон",ageRangeDescription:"Встановіть віковий діапазон для створення нових ідентифікаційних даних.",genderOptions:{random:"Випадкова",male:"Чоловіча",female:"Жіноча"}},unlockMethod:{title:"Метод розблокування сховища",introText:"Choose how you want to unlock your vault. You can use your master password (always available) or set up a PIN code for faster access. After 3 failed PIN attempts, you'll need to use your master password.",password:"Головний пароль",pin:"ПІН-код",pinDescription:"Unlock vault with PIN code",setupPin:"Setup PIN Code",enterNewPinDescription:"Enter a PIN code consisting of minimum 6 digits",confirmPin:"Підтвердити ПІН-код",confirmPinDescription:"Enter your PIN again to confirm",invalidPinFormat:"Invalid PIN format",pinMismatch:"PINs do not match",incorrectPin:"Incorrect PIN. {{attemptsRemaining}} attempts remaining.",incorrectPinSingular:"Incorrect PIN. 1 attempt remaining.",enableSuccess:"Розблокування PIN-кодом успішно ввімкнено!",pinLocked:"PIN unlock has been disabled. Please use your master password to unlock your vault.",pinSecurityWarning:"PIN unlock in the browser extension can be less secure than your master password, as PINs typically have lower entropy and may be brute-forced if your device is compromised. Use it only on devices you fully trust."}},uk={passkey:"Ключ доступу",site:"Вебсайт",helpText:"Passkeys are created on the website when prompted. They cannot be manually edited. To remove this passkey, you can delete it from this credential. To replace this passkey or create a new one, visit the website and follow its prompts.",passkeyMarkedForDeletion:"Ключ доступу позначено для видалення",passkeyWillBeDeleted:"Цей ключ доступу буде видалено, коли ви збережете ці облікові дані.",useBrowserPasskey:"Use Browser Passkey",bypass:{description:"How long would you like to use the browser's passkey provider for {{origin}}?",thisTimeOnly:"This time only",alwaysForSite:"Always for this site"},authenticate:{title:"Sign in with Passkey",signInFor:"Sign in with passkey for",selectPasskey:"Select a passkey to sign in:",noPasskeysFound:"No passkeys found for this site"},create:{title:"Create Passkey",createFor:"Create a new passkey for",titleLabel:"Заголовок",titlePlaceholder:"Enter a name for this passkey",createButton:"Create Passkey",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Create New Passkey",replacingPasskey:"Replacing passkey: {{displayName}}",confirmReplace:"Confirm Replace",selectExistingLogin:"Add to existing login:",selectExistingLoginDescription:"Attach this passkey to an existing login credential for this site.",attachingToCredential:"Adding passkey to: {{serviceName}}",attachPasskey:"Add Passkey"},settings:{passkeyProvider:"Passkey Provider",passkeyProviderOn:"Passkey Provider on "}},dk={title:"Recently Deleted",noItems:"No deleted items",noItemsDescription:"Items you delete will appear here for 30 days before being permanently removed.",description:"These items will be permanently deleted after 30 days. You can restore them or delete them immediately.",restore:"Restore",deletePermanently:"Delete Permanently",emptyAll:"Empty All",daysRemaining_one:"{{count}} day remaining",daysRemaining_other:"{{count}} days remaining",expiringSoon:"Expiring soon",confirmDeleteTitle:"Delete Permanently?",confirmDeleteMessage:"This item will be permanently deleted and cannot be recovered.",confirmEmptyAllTitle:"Empty Recently Deleted?",confirmEmptyAllMessage:"All {{count}} items will be permanently deleted and cannot be recovered."},mk={title:"Оновлення сховища",subtitle:"AliasVault оновлено, і ваше сховище потрібно оновити. Це займе лише кілька секунд.",versionInformation:"Інформація про версію",yourVault:"Ваша версія сховища:",newVersion:"Доступна нова версія:",upgrade:"Оновлення сховища",upgrading:"Оновлення...",whatsNew:"Що нового",whatsNewDescription:"Для підтримки таких змін потрібне оновлення:",noDescriptionAvailable:"Для цієї версії немає опису.",alerts:{unableToGetVersionInfo:"Не вдалося отримати інформацію про версію. Спробуйте ще раз.",selfHostedServer:"Сервер із самостійним розміщенням",selfHostedWarning:"Якщо ви використовуєте власний сервер, обов’язково оновіть і свій власний екземпляр, інакше вхід до вебклієнта перестане працювати.",continueUpgrade:"Продовжити оновлення",upgradeFailed:"Помилка оновлення",failedToApplyMigration:"Не вдалося застосувати міграцію ({{current}} з {{total}})"}},gk={unsyncedChangesTitle:"Unsynced Changes",unsyncedChangesWarning:"You have unsynced changes that will be lost if you log out now. Are you sure you want to continue?",logoutAnyway:"Log out anyway"},fk={auth:Z1,menu:ek,common:tk,content:ak,items:nk,itemTypes:rk,fieldLabels:ik,totp:sk,attachmentUploader:ok,emails:lk,settings:ck,passkeys:uk,recentlyDeleted:dk,upgrade:mk,logout:gk},hk={loginTitle:"登录到 AliasVault",username:"用户名或邮箱",usernamePlaceholder:"姓名 / name@company.com",passwordPlaceholder:"输入您的密码",rememberMe:"记住我",loginButton:"登录",noAccount:"还没有账户？",createVault:"创建新密码库",twoFactorTitle:"请输入来自您身份验证器应用的身份验证码",authCode:"身份验证码",authCodePlaceholder:"输入 6 位数代码",verify:"验证",twoFactorNote:"注意：如果无法访问您的认证设备，您可以通过网站登录，使用恢复码重置两步验证（2FA）。",masterPassword:"主密码",unlockVault:"解锁",unlockWithPin:"使用 PIN 解锁",enterPinToUnlock:"输入您的 PIN 以解锁密码库",useMasterPassword:"使用主密码",unlockTitle:"解锁您的密码库",logoutConfirm:"确定要退出登录吗？",unlockSuccessTitle:"您的密码库已成功解锁",unlockSuccessDescription:"现在您可以在浏览器的登录表单中使用自动填充功能了。",closePopup:"关闭此弹窗",browseVault:"浏览密码库内容",connectingTo:"正在连接",switchAccounts:"切换账户？",loginWithMobile:"使用移动应用登录",unlockWithMobile:"使用移动应用解锁",scanQrCode:"使用 AliasVault 移动端应用扫描该二维码，即可登录并解锁您的密码库。",errors:{invalidCode:"请输入有效的6位动态验证码。",serverError:"无法连接到AliasVault服务器。请稍后重试，若问题依旧，请联系支持人员。",wrongPassword:"密码不正确。请重试。",sessionExpired:"您的会话已过期。请重新登录。",mobileLoginRequestExpired:"移动端登录请求超时。请重新加载页面后重试。"}},Ak={vault:"密码库",emails:"邮件"},pk={loading:"加载中…",notice:"注意",error:"错误",cancel:"取消",confirm:"确认",back:"返回",next:"下一步",use:"使用",add:"添加",delete:"删除",undo:"撤销",save:"保存",saving:"保存中…",create:"创建",or:"或",close:"关闭",logout:"退出登录",copied:"已复制！",openInNewWindow:"在新窗口中打开",enabled:"启用",disabled:"禁用",showPassword:"显示密码",hidePassword:"隐藏密码",showDetails:"显示详情",hideDetails:"隐藏详情",copyToClipboard:"复制到剪贴板",loadingEmails:"加载邮件中…",loadingTotpCodes:"加载TOTP验证码中…",attachments:"附件",loadingAttachments:"加载附件中…",settings:"设置",recentEmails:"近期邮件",credentials:"凭据",customFields:"自定义字段",twoFactorAuthentication:"两步验证（2FA）",alias:"别名",notes:"备注",email:"邮箱",username:"用户名",password:"密码",generate:"生成",serviceName:"服务名称",loggedIn:"已登录",syncingVault:"正在同步密码库",checkingVaultUpdates:"检查密码库更新中",syncingUpdatedVault:"同步更新后的密码库",loadMore:"加载更多",offline:"离线",offlineMode:"正在离线模式运行",pendingSync:"同步中…",mergingVaultChanges:"正在合并密码库更改...",uploadingVault:"正在上传密码库…",errors:{serverNotAvailable:"AliasVault服务器不可用。请稍后重试，若问题持续请联系支持人员。",clientVersionNotSupported:"此版本的AliasVault浏览器扩展已不被服务器支持。请将浏览器扩展更新到最新版本。",browserExtensionOutdated:"此浏览器扩展已过时，无法用于访问此密码库。请更新此浏览器扩展以继续。",serverVersionNotSupported:"AliasVault服务器需要更新到新版本才能使用此浏览器扩展。如需帮助，请联系支持人员。",serverVersionTooOld:"AliasVault 服务器需要更新到更高版本才能使用此功能。如需帮助，请联系服务器管理员。",unknownError:"发生未知错误",unknownErrorTryAgain:"发生未知错误，请重试。",vaultNotAvailable:"密码库不可用",vaultIsLocked:"密码库已锁定",passwordChanged:"登录密码已更新，请重新登录以确保账户安全。",syncConflictMaxRetries:"多次尝试后仍无法同步密码库，请稍后重试。",mergeFailed:"合并密码库更改失败，请重试。"},apiErrors:{UNKNOWN_ERROR:"发生未知错误。请重试。",ACCOUNT_LOCKED:"由于多次尝试失败，账户已暂时锁定。请稍后重试。",ACCOUNT_BLOCKED:"您的账户已被停用。若您认为此操作有误，请联系支持人员。",USER_NOT_FOUND:"用户名或密码无效。请重试。",INVALID_AUTHENTICATOR_CODE:"身份验证器验证码无效。请重试。",INVALID_RECOVERY_CODE:"恢复码无效。请重试。",REFRESH_TOKEN_REQUIRED:"刷新令牌为必填项。",INVALID_REFRESH_TOKEN:"刷新令牌无效。",PUBLIC_REGISTRATION_DISABLED:"当前服务器已禁用新账户注册。请联系管理员。",USERNAME_REQUIRED:"用户名为必填项。",USERNAME_ALREADY_IN_USE:"用户名已被使用。",USERNAME_AVAILABLE:"用户名可用。",USERNAME_MISMATCH:"用户名与当前用户不匹配。",PASSWORD_MISMATCH:"提供的密码与您的当前密码不匹配。",ACCOUNT_SUCCESSFULLY_DELETED:"账户已成功删除。",USERNAME_EMPTY_OR_WHITESPACE:"用户名不能为空或仅含空格。",USERNAME_TOO_SHORT:"用户名过短：至少需要3个字符。",USERNAME_TOO_LONG:"用户名过长：不能超过40个字符。",USERNAME_INVALID_EMAIL:"无效的邮箱地址。",USERNAME_INVALID_CHARACTERS:"用户名无效，只能包含字母或数字。",VAULT_NOT_UP_TO_DATE:"您的密码库不是最新的。请同步您的密码库后重试。",INTERNAL_SERVER_ERROR:"服务器内部错误。",VAULT_ERROR:"本地密码库不是最新的。请刷新页面同步密码库后重试。"}},yk={or:"或",new:"新建",vaultLocked:"AliasVault已锁定。",creatingNewAlias:"正在创建新别名…",noMatchesFound:"未找到匹配项",searchVault:"搜索密码库…",enterServiceName:"输入服务名称",enterEmailAddress:"输入邮箱地址",enterUsername:"输入用户名",hideFor1Hour:"隐藏1小时（当前网站）",hidePermanently:"永久隐藏（当前网站）",createRandomAlias:"创建随机别名",createUsernamePassword:"创建用户名/密码",randomAlias:"随机别名",usernamePassword:"用户名/密码",createAndSaveAlias:"创建并保存别名",createAndSaveCredential:"创建并保存凭据",randomIdentityDescription:"生成一个包含随机邮箱地址的随机身份，可在AliasVault中查看。",randomIdentityDescriptionDropdown:"带随机邮箱的随机身份",manualCredentialDescription:"指定您自己的邮箱地址和用户名。",manualCredentialDescriptionDropdown:"手动输入用户名和密码",failedToCreateIdentity:"创建身份失败。请重试。",enterEmailAndOrUsername:"输入邮箱和/或用户名",autofillWithAliasVault:"使用AliasVault自动填充",generateRandomPassword:"生成随机密码（复制到剪贴板）",generateNewPassword:"生成新密码",togglePasswordVisibility:"切换密码可见性",passwordCopiedToClipboard:"密码已复制到剪贴板",openAliasVaultToUpgrade:"打开AliasVault进行升级",vaultUpgradeRequired:"需要升级密码库。",dismissPopup:"关闭弹窗"},Ek={title:"项目",itemName:"名称",loginCredentials:"登录凭据",cardInformation:"卡信息",addItem:"添加项目",addNewItem:"添加新项目",saveItem:"保存项目",itemDetails:"项目详情",editItem:"编辑项目",untitled:"无标题",newFolder:"新建文件夹",createFolder:"创建文件夹",editFolder:"编辑文件夹",folderName:"文件夹名称",folderNameRequired:"文件夹名称为必填项",folder:"文件夹",welcomeTitle:"欢迎使用 AliasVault!",welcomeDescription:"要使用AliasVault浏览器扩展：导航到某个网站，使用AliasVault自动填充弹窗创建新凭据。",noPasskeysFound:"尚未创建通行密钥。访问以通行密钥为认证方式的网站才能创建通行密钥。",noAttachmentsFound:"未找到带附件的项目",noItemsOfTypeFound:"未找到 {{type}} 项目",noMatchingItems:"未找到匹配的项目",noMatchingItemsSearch:"未找到匹配“{{search}}”的项目",noMatchingItemsWithFilter:"未找到匹配“{{search}}”的 {{filter}} 项目",clearSearch:"清除搜索",clearFilter:"清除筛选器",emptyFolderHint:"此文件夹为空。要将项目移动到此文件夹，请编辑该项目，然后点击名称字段中的文件夹图标。",allItemsInFolders:"您的所有项目都已整理到文件夹中。点击上方文件夹即可查看您的凭据，或使用搜索查找特定的项目。",deleteFolder:"删除文件夹",deleteFolderKeepItems:"仅删除文件夹",deleteFolderKeepItemsDescription:"项目将被移回主列表。",deleteFolderAndItems:"删除文件夹和所有项目",deleteFolderAndItemsDescription:"{{count}} 个项目将被移至“近期删除”。",filters:{all:"（所有）项目",passkeys:"通行密钥"},sort:{title:"Sort by",oldestFirst:"Oldest first",newestFirst:"Newest first",alphabetical:"Alphabetical (A-Z)"},deleteItemTitle:"删除项目",deleteItemConfirm:"您确定要删除此项目吗？",viewHistory:"查看历史记录",history:"历史记录",noHistoryAvailable:"暂无历史记录",tags:"标签",changePasswordComplexity:"更改密码复杂度",passwordLength:"密码长度",includeLowercase:"包含小写字母",includeUppercase:"包含大写字母",includeNumbers:"包含数字",includeSpecialChars:"包含特殊字符",avoidAmbiguousChars:"避免易混淆字符（o、0 等）",privateEmailTitle:"私人邮箱",privateEmailAliasVaultServer:"AliasVault 服务器",privateEmailDescription:"端到端加密，完全私密。",publicEmailTitle:"公共临时邮箱提供商",publicEmailDescription:"匿名但隐私性有限，任何知晓其地址的人均可读取邮件内容。",validation:{required:"此字段为必填项"}},bk={selectType:"添加新项目",typeLabel:"项目类型",creating:"创建",editing:"编辑",regenerateAlias:"重新生成别名",addCustomField:"添加自定义字段",fieldLabel:"字段标签",enterFieldName:"输入字段名称",fieldType:"字段类型",fieldTypes:{text:"文本",hidden:"隐藏（已遮挡文本）",email:"邮箱",url:"URL",phone:"手机",number:"号码",date:"日期",textArea:"文本区域"},login:{title:"登录"},alias:{title:"别名"},creditCard:{title:"信用卡"},note:{title:"安全笔记"}},Ik={"login.url":"网站 URL","login.username":"用户名","login.password":"密码","alias.first_name":"名","alias.last_name":"姓","alias.gender":"性别","alias.birthdate":"出生日期","login.email":"邮箱","notes.content":"备注","card.cardholder_name":"持卡人姓名","card.number":"卡号","card.expiry_month":"到期月份","card.expiry_year":"到期年份","card.cvv":"CVV","card.pin":"PIN"},vk={addCode:"添加两步验证码",instructions:"输入要添加两步验证的网站显示的密钥。",nameOptional:"名称（可选）",secretKey:"密钥",saveToViewCode:"保存以查看验证码",defaultName:"身份验证器",errors:{invalidSecretKey:"密钥格式无效。"}},Ck={uploading:"上传中…",uploadSuccess:"文件上传成功。",deleteSuccess:"附件删除成功。",firefoxExpandRequired:"要上传文件，请使用展开的窗口。",openExpandedWindow:"打开展开的窗口"},Nk={title:"邮件",deleteEmailTitle:"删除邮件",deleteEmailConfirm:"确定要永久删除此邮件吗？",from:"发件人",to:"收件人",date:"日期",emailContent:"邮件内容",emailNotFound:"未找到邮件",noEmails:"未找到邮件",noEmailsDescription:"您的私人邮箱地址尚未收到任何邮件。当您收到新邮件时，会显示在这里。",offlineMessage:"您处于离线状态。请连接互联网以加载邮件。",dateFormat:{justNow:"刚刚",minutesAgo_single:"{{count}}分钟前",minutesAgo_plural:"{{count}}分钟前",hoursAgo_single:"{{count}}小时前",hoursAgo_plural:"{{count}}小时前",yesterday:"昨天"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"当前选择的邮箱地址已被使用。请通过编辑此凭据修改邮箱地址。",CLAIM_DOES_NOT_EXIST:"加载邮件时发生错误。请尝试编辑并保存凭据条目以同步数据库，然后重试。"}},wk={serverUrl:"服务器 URL",language:"语言",autofillEnabled:"启用自动填充",version:"版本",openWebApp:"打开网页应用",lock:"锁定",globalSettings:"全局设置",autofillPopup:"自动填充弹窗",activeOnAllSites:"在所有网站上激活（除非在下方禁用）",disabledOnAllSites:"在所有网站上禁用",rightClickContextMenu:"右键上下文菜单",autofillMatching:"自动填充匹配",autofillMatchingMode:"自动填充匹配模式",autofillMatchingModeDescription:"用于判定哪些凭据会被视为匹配项，并在指定网站的自动填充弹窗中显示为建议选项。",autofillMatchingDefault:"URL + 子域名 + 名称通配符",autofillMatchingUrlSubdomain:"URL + 子域名",autofillMatchingUrlExact:"精确匹配URL域名",siteSpecificSettings:"网站特定设置",autofillPopupOn:"自动填充弹窗在以下位置： ",enabledForThisSite:"对此网站启用",disabledForThisSite:"对此网站禁用",temporarilyDisabledUntil:"暂时禁用至 ",resetAllSiteSettings:"重置所有网站特定设置",appearance:"外观",theme:"主题",useDefault:"使用默认",light:"浅色",dark:"深色",keyboardShortcuts:"键盘快捷键",configureKeyboardShortcuts:"配置键盘快捷键",configure:"配置",clipboardClearTimeout:"复制后清除剪贴板",clipboardClearTimeoutDescription:"复制敏感数据后自动清除剪贴板",clipboardClearDisabled:"从不清除",clipboardClear5Seconds:"5秒后清除",clipboardClear10Seconds:"10 秒后清除",clipboardClear15Seconds:"15分钟后清除",autoLockTimeout:"自动锁定超时时间",autoLockTimeoutDescription:"无操作一段时间后自动锁定密码库",autoLockTimeoutHelp:"密码库仅在达到指定的无操作时长后才会锁定（未使用自动填充功能或未打开扩展程序弹窗）。无论此设置如何，关闭浏览器时密码库始终会锁定。",autoLockNever:"从不",autoLock15Seconds:"15 秒",autoLock1Minute:"1 分钟",autoLock5Minutes:"5 分钟",autoLock15Minutes:"15 分钟",autoLock30Minutes:"30 分钟",autoLock1Hour:"1 小时",autoLock4Hours:"4 小时",autoLock8Hours:"8 小时",autoLock24Hours:"24 小时",versionPrefix:"版本 ",autofillSettings:"自动填充设置",clipboardSettings:"剪贴板设置",contextMenuSettings:"上下文菜单设置",passkeySettings:"通行密钥设置",contextMenu:"上下文菜单",contextMenuEnabled:"上下文菜单已启用",contextMenuDisabled:"上下文菜单已停用",contextMenuDescription:"右键点击输入字段即可访问 AliasVault 选项",selectLanguage:"选择语言",serverConfiguration:"服务器配置",serverConfigurationDescription:"为自托管实例配置 AliasVault 服务器 URL",customApiUrl:"API URL",customClientUrl:"客户端 URL",apiUrlHint:"API 端点 URL（通常为客户端 URL + /api）",clientUrlHint:"您自托管实例的 Web 界面 URL",autofillSettingsDescription:"启用或禁用网页上的自动填充弹出窗口",autofillEnabledDescription:"自动填充建议将显示在登录表单上",autofillDisabledDescription:"自动填充建议已全局禁用",languageSettings:"语言",validation:{apiUrlRequired:"API URL 为必填项",apiUrlInvalid:"请输入有效的 API URL",clientUrlRequired:"客户端 URL 为必填项",clientUrlInvalid:"请输入有效的客户端 URL"},identityGenerator:"身份生成器",identityGeneratorSettings:{description:"配置生成新身份时的默认语言和性别偏好。",languageSection:"语言",languageDescription:"设置生成新身份时使用的语言。",genderSection:"性别",genderDescription:"设置生成新身份时的性别偏好。",ageRangeSection:"年龄范围",ageRangeDescription:"设置生成新身份的年龄范围。",genderOptions:{random:"随机",male:"男",female:"女"}},unlockMethod:{title:"密码库解锁方式",introText:"选择您解锁密码库的方式。您可以使用主密码（始终可用），也可以设置 PIN 码以便快捷访问。PIN 码输入错误 3 次后，您需要使用主密码。",password:"主密码",pin:"PIN 码",pinDescription:"使用 PIN 码解锁密码库",setupPin:"设置 PIN 码",enterNewPinDescription:"请输入至少 6 位数的 PIN 码",confirmPin:"确认 PIN",confirmPinDescription:"再次输入您的 PIN 以确认",invalidPinFormat:"PIN 格式无效",pinMismatch:"PIN 不一致",incorrectPin:"PIN 码错误，剩余 {{attemptsRemaining}} 次尝试。",incorrectPinSingular:"PIN 码错误，剩余 1 次尝试。",enableSuccess:"PIN 码解锁已成功启用！",pinLocked:"PIN 码解锁已禁用，请使用您的主密码解锁您的密码库。",pinSecurityWarning:"浏览器扩展中的 PIN 码解锁可能不如您的主密码安全，因为 PIN 码的熵值通常较低，若您的设备遭到入侵，则可能被暴力破解。请仅在您完全信任的设备上使用该方式。"}},xk={passkey:"通行密钥",site:"网站",helpText:"通行密钥会在网站提示时自动生成，无法手动编辑。要移除此通行密钥，您可以在此凭据中进行删除。要替换或创建新的通行密钥，请访问网站并按照其提示操作。",passkeyMarkedForDeletion:"通行密钥已标记为删除",passkeyWillBeDeleted:"保存此凭据后，此通行密钥将被删除。",useBrowserPasskey:"使用浏览器通行密钥",bypass:{description:"对于 {{origin}}，您希望使用浏览器的密码提供程序多长时间？",thisTimeOnly:"仅一次",alwaysForSite:"始终为此网站"},authenticate:{title:"使用通行密钥登录",signInFor:"使用通行密钥登录或",selectPasskey:"选择要登录的通行密钥：",noPasskeysFound:"未找到此网站的通行密钥"},create:{title:"创建通行密钥",createFor:"创建新通行密钥用于",titleLabel:"标题",titlePlaceholder:"输入此通行密钥的名称",createButton:"创建通行密钥",selectPasskeyToReplace:"选择要替换的通行密钥：",createNewPasskey:"创建新通行密钥",replacingPasskey:"替换通行密钥：{{displayName}}",confirmReplace:"确认替换",selectExistingLogin:"添加到现有登录：",selectExistingLoginDescription:"将此通行密钥附加到此站点的现有登录凭据中。",attachingToCredential:"正在将通行密钥添加到：{{serviceName}}",attachPasskey:"添加通行密钥"},settings:{passkeyProvider:"通行密钥提供程序",passkeyProviderOn:"通行密钥提供程序于"}},Tk={title:"近期删除",noItems:"没有删除的项目",noItemsDescription:"您删除的项目将在此处停留 30 天，随后永久移除。",description:"这些项目将在 30 天后永久删除。您可以立即还原或永久删除。",restore:"还原",deletePermanently:"永久删除",emptyAll:"全部清空",daysRemaining_one:"剩余 {{count}} 天",daysRemaining_other:"剩余 {{count}} 天",expiringSoon:"即将到期",confirmDeleteTitle:"永久删除吗？",confirmDeleteMessage:"此项目将被永久删除，且无法恢复。",confirmEmptyAllTitle:"清空“近期删除”吗？",confirmEmptyAllMessage:"所有 {{count}} 个项目将被永久删除，且无法恢复。"},Sk={title:"升级密码库",subtitle:"AliasVault已更新，您的密码库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"您的密码库版本：",newVersion:"新可用版本：",upgrade:"升级密码库",upgrading:"升级中…",whatsNew:"新功能",whatsNewDescription:"需要升级才能支持以下更改：",noDescriptionAvailable:"此版本无可用说明。",alerts:{unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果您使用的是自托管服务器，请确保同时更新您的自托管实例，否则将无法登录网页客户端。",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）"}},kk={unsyncedChangesTitle:"未同步的更改",unsyncedChangesWarning:"您有更改尚未同步，若您现在退出登录，这些更改将会丢失。您确定要继续吗？",logoutAnyway:"仍要退出登录"},Lk={auth:hk,menu:Ak,common:pk,content:yk,items:Ek,itemTypes:bk,fieldLabels:Ik,totp:vk,attachmentUploader:Ck,emails:Nk,settings:wk,passkeys:xk,recentlyDeleted:Tk,upgrade:Sk,logout:kk},_l={de:{translation:Ox},en:{translation:eT},es:{translation:AT},fi:{translation:DT},fr:{translation:WT},he:{translation:uS},it:{translation:xS},nl:{translation:zS},pl:{translation:r1},pt:{translation:b1},ro:{translation:_1},ru:{translation:$1},uk:{translation:fk},zh:{translation:Lk}},jl=[{code:"de",name:"German",nativeName:"Deutsch",flag:"🇩🇪"},{code:"en",name:"English",nativeName:"English",flag:"🇺🇸"},{code:"es",name:"Spanish",nativeName:"Español",flag:"🇪🇸"},{code:"fi",name:"Finnish",nativeName:"Suomi",flag:"🇫🇮"},{code:"fr",name:"French",nativeName:"Français",flag:"🇫🇷"},{code:"he",name:"Hebrew",nativeName:"עברית",flag:"🇮🇱"},{code:"it",name:"Italian",nativeName:"Italiano",flag:"🇮🇹"},{code:"nl",name:"Dutch",nativeName:"Nederlands",flag:"🇳🇱"},{code:"pl",name:"Polish",nativeName:"Polski",flag:"🇵🇱"},{code:"pt",name:"Portuguese Brazilian",nativeName:"Português Brasileiro",flag:"🇧🇷"},{code:"ro",name:"Romanian",nativeName:"Română",flag:"🇷🇴"},{code:"ru",name:"Russian",nativeName:"Русский",flag:"🇷🇺"},{code:"uk",name:"Ukrainian",nativeName:"Українська",flag:"🇺🇦"},{code:"zh",name:"Chinese",nativeName:"简体中文",flag:"🇨🇳"}],Sr="en",qu=jl.map(r=>r.code),gu=new Map;async function Ry(r){const e=`all:${r}`;if(gu.has(e))return gu.get(e);if(_l[r]){const a=_l[r].translation;return gu.set(e,a),a}if(r!==Sr&&_l[Sr]){console.warn(`Translations not found for ${r}, falling back to ${Sr}`);const a=_l[Sr].translation;return gu.set(e,a),a}return console.warn(`No translations found for ${r} and no fallback available`),{}}function Rk(r){return jl.find(e=>e.code===r)}function Dy(r,e){return e.split(".").reduce((a,i)=>a&&typeof a=="object"&&a!==null&&i in a?a[i]:void 0,r)}async function Dk(){try{const r=await Se.getItem("local:language");if(r&&qu.includes(r))return r;const e=navigator.language.split("-")[0],a=qu.includes(e)?e:Sr;return await Se.setItem("local:language",a),a}catch(r){return console.error("Failed to get current language:",r),Sr}}async function Bk(r,e){try{const a=await Dk(),i=await Ry(a),s=Dy(i,r);if(s&&typeof s=="string")return s;if(a!==Sr){const c=await Ry(Sr),d=Dy(c,r);if(d&&typeof d=="string")return d}return e||r}catch(a){return console.error("Translation error:",a),e||r}}function Uk(r){return r.toISOString().replace("T"," ").replace("Z","").substring(0,23)}function Qg(){return Uk(new Date)}class $l{constructor(e){this.client=e}async withTransaction(e){this.client.beginTransaction();try{const a=await e();return await this.client.commitTransaction(),a}catch(a){throw this.client.rollbackTransaction(),a}}softDelete(e,a){const i=Qg();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?`,[i,a])}softDeleteByForeignKey(e,a,i){const s=Qg();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE ${a} = ?`,[s,i])}hardDelete(e,a){return this.client.executeUpdate(`DELETE FROM ${e} WHERE Id = ?`,[a])}hardDeleteByForeignKey(e,a,i){return this.client.executeUpdate(`DELETE FROM ${e} WHERE ${a} = ?`,[i])}tableExists(e){return this.client.executeQuery("SELECT name FROM sqlite_master WHERE type='table' AND name=?",[e]).length>0}generateId(){return crypto.randomUUID().toUpperCase()}now(){return Qg()}buildInClause(e){return{placeholders:e.map(()=>"?").join(","),values:e}}}var Za={LoginUsername:"login.username",LoginPassword:"login.password",LoginEmail:"login.email",LoginUrl:"login.url",CardNumber:"card.number",CardCardholderName:"card.cardholder_name",CardExpiryMonth:"card.expiry_month",CardExpiryYear:"card.expiry_year",CardCvv:"card.cvv",CardPin:"card.pin",AliasFirstName:"alias.first_name",AliasLastName:"alias.last_name",AliasGender:"alias.gender",AliasBirthdate:"alias.birthdate",NotesContent:"notes.content"},ma={Login:"Login",Alias:"Alias",CreditCard:"CreditCard",Note:"Note"},aa={Text:"Text",Password:"Password",Hidden:"Hidden",Email:"Email",URL:"URL",Date:"Date",Number:"Number",Phone:"Phone",TextArea:"TextArea"},ut={Primary:"Primary",Login:"Login",Alias:"Alias",Card:"Card",Custom:"Custom",Notes:"Notes",Metadata:"Metadata"},Nh={"login.email":{FieldKey:"login.email",FieldType:"Email",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!1},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:ut.Login,DefaultDisplayOrder:10},"login.username":{FieldKey:"login.username",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:ut.Login,DefaultDisplayOrder:15},"login.password":{FieldKey:"login.password",FieldType:"Password",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:ut.Login,DefaultDisplayOrder:20},"login.url":{FieldKey:"login.url",FieldType:"URL",IsHidden:!1,IsMultiValue:!0,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Primary,DefaultDisplayOrder:5},"alias.first_name":{FieldKey:"alias.first_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Alias,DefaultDisplayOrder:20},"alias.last_name":{FieldKey:"alias.last_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Alias,DefaultDisplayOrder:30},"alias.gender":{FieldKey:"alias.gender",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Alias,DefaultDisplayOrder:50},"alias.birthdate":{FieldKey:"alias.birthdate",FieldType:"Date",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Alias,DefaultDisplayOrder:60},"card.cardholder_name":{FieldKey:"card.cardholder_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Card,DefaultDisplayOrder:10},"card.number":{FieldKey:"card.number",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Card,DefaultDisplayOrder:20},"card.expiry_month":{FieldKey:"card.expiry_month",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Card,DefaultDisplayOrder:30},"card.expiry_year":{FieldKey:"card.expiry_year",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Card,DefaultDisplayOrder:40},"card.cvv":{FieldKey:"card.cvv",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Card,DefaultDisplayOrder:50},"card.pin":{FieldKey:"card.pin",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!1}},EnableHistory:!1,Category:ut.Card,DefaultDisplayOrder:60},"notes.content":{FieldKey:"notes.content",FieldType:"TextArea",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!1},Alias:{ShowByDefault:!1},CreditCard:{ShowByDefault:!1},Note:{ShowByDefault:!0}},EnableHistory:!1,Category:ut.Notes,DefaultDisplayOrder:100}};function ho(r){return Nh[r]}function Pl(r,e){return e in r.ApplicableToTypes}function Fl(r,e){const a=r.ApplicableToTypes[e];return(a==null?void 0:a.ShowByDefault)??!1}function Mk(r){return Object.values(Nh).filter(e=>Pl(e,r)).sort((e,a)=>e.DefaultDisplayOrder-a.DefaultDisplayOrder)}function _k(r){return Object.values(Nh).filter(e=>Pl(e,r)&&!Fl(e,r)).sort((e,a)=>e.DefaultDisplayOrder-a.DefaultDisplayOrder)}function fu(r,e){const a=r.Fields.find(i=>i.FieldKey===e);if(a)return Array.isArray(a.Value)?a.Value[0]:a.Value}function Fk(r,e){const a={};return r.Fields.forEach(i=>{const s=e(i);a[s]||(a[s]=[]),a[s].push(i)}),a}function Ok(r){const e=Fk(r,a=>a.FieldKey.startsWith("login.")?ut.Login:a.FieldKey.startsWith("alias.")?ut.Alias:a.FieldKey.startsWith("card.")?ut.Card:a.FieldKey.startsWith("notes.")?ut.Notes:a.FieldKey.startsWith("metadata.")?ut.Metadata:ut.Custom);for(const a of Object.keys(e))e[a].sort((i,s)=>(i.DisplayOrder??0)-(s.DisplayOrder??0));return e}function hu(r,e){const a=ho(r);if(!a)throw new Error(`Unknown system field: ${r}. Use createCustomField for custom fields.`);return{FieldKey:r,Label:e.label??r,FieldType:a.FieldType,Value:e.value,IsHidden:a.IsHidden,DisplayOrder:e.displayOrder??a.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:a.EnableHistory}}var Vg=10;class Gg{static processFieldRows(e){const a=e.map(c=>this.processFieldRow(c)),i=new Map,s=new Map;for(const c of a){const d=`${c.ItemId}_${c.FieldKey}`;s.has(d)||s.set(d,[]),s.get(d).push(c.Value),i.has(c.ItemId)||i.set(c.ItemId,[]);const m=i.get(c.ItemId);m.find(g=>g.FieldKey===c.FieldKey)||m.push({FieldKey:c.FieldKey,Label:c.Label,FieldType:c.FieldType,Value:"",IsHidden:c.IsHidden===1,DisplayOrder:c.DisplayOrder,IsCustomField:c.IsCustomField,EnableHistory:c.EnableHistory})}for(const[c,d]of i)for(const m of d){const f=`${c}_${m.FieldKey}`,g=s.get(f)||[];g.length===1?m.Value=g[0]:m.Value=g}return i}static processFieldRow(e){if(e.FieldKey){const a=ho(e.FieldKey);return{ItemId:e.ItemId,FieldKey:e.FieldKey,Label:e.FieldKey,FieldType:(a==null?void 0:a.FieldType)||aa.Text,IsHidden:a!=null&&a.IsHidden?1:0,Value:e.Value,DisplayOrder:(a==null?void 0:a.DefaultDisplayOrder)??e.DisplayOrder,IsCustomField:!1,EnableHistory:(a==null?void 0:a.EnableHistory)??!1}}else return{ItemId:e.ItemId,FieldKey:e.FieldDefinitionId||"",Label:e.CustomLabel||"",FieldType:e.CustomFieldType||aa.Text,IsHidden:e.CustomIsHidden||0,Value:e.Value,DisplayOrder:e.DisplayOrder,IsCustomField:!0,EnableHistory:e.CustomEnableHistory===1}}static processFieldRowsForSingleItem(e){const a=new Map,i=new Map;for(const s of e){const c=s.FieldKey||s.FieldDefinitionId||"";if(a.has(c)||a.set(c,[]),a.get(c).push(s.Value),!i.has(c))if(s.FieldKey){const d=ho(s.FieldKey);i.set(c,{FieldKey:s.FieldKey,Label:s.FieldKey,FieldType:(d==null?void 0:d.FieldType)||aa.Text,IsHidden:d!=null&&d.IsHidden?1:0,DisplayOrder:(d==null?void 0:d.DefaultDisplayOrder)??s.DisplayOrder,IsCustomField:!1,EnableHistory:(d==null?void 0:d.EnableHistory)??!1})}else i.set(c,{FieldKey:c,Label:s.CustomLabel||"",FieldType:s.CustomFieldType||aa.Text,IsHidden:s.CustomIsHidden||0,DisplayOrder:s.DisplayOrder,IsCustomField:!0,EnableHistory:s.CustomEnableHistory===1})}return Array.from(i.entries()).map(([s,c])=>{const d=a.get(s)||[];return{...c,FieldType:c.FieldType,Value:d.length===1?d[0]:d,IsHidden:c.IsHidden===1,IsCustomField:c.IsCustomField,EnableHistory:c.EnableHistory}})}}class Cl{static mapRow(e,a=[],i=[]){return{Id:e.Id,Name:e.Name,ItemType:e.ItemType,Logo:e.Logo??void 0,FolderId:e.FolderId,FolderPath:e.FolderPath||null,Tags:i,Fields:a,HasPasskey:e.HasPasskey===1,HasAttachment:e.HasAttachment===1,HasTotp:e.HasTotp===1,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}static mapRows(e,a,i){return e.map(s=>this.mapRow(s,a.get(s.Id)||[],i.get(s.Id)||[]))}static groupTagsByItem(e){const a=new Map;for(const i of e)a.has(i.ItemId)||a.set(i.ItemId,[]),a.get(i.ItemId).push({Id:i.Id,Name:i.Name,Color:i.Color||void 0});return a}static mapTagRows(e){return e.map(a=>({Id:a.Id,Name:a.Name,Color:a.Color||void 0}))}static mapDeletedItemRow(e,a=[]){return{Id:e.Id,Name:e.Name,ItemType:e.ItemType,Logo:e.Logo?new Uint8Array(e.Logo):void 0,FolderId:e.FolderId,FolderPath:e.FolderPath,DeletedAt:e.DeletedAt,HasPasskey:e.HasPasskey===1,HasAttachment:e.HasAttachment===1,HasTotp:e.HasTotp===1,Fields:a,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}}function By(r){return new Date(r).getTime()}class Kg{static mapRow(e){return{Id:e.Id,ItemId:e.ItemId,RpId:e.RpId,UserHandle:e.UserHandle??void 0,PublicKey:e.PublicKey,PrivateKey:e.PrivateKey,DisplayName:e.DisplayName,PrfKey:e.PrfKey??void 0,AdditionalData:e.AdditionalData,CreatedAt:By(e.CreatedAt),UpdatedAt:By(e.UpdatedAt),IsDeleted:e.IsDeleted}}static mapRowWithItem(e){return{...this.mapRow(e),Username:e.Username,ServiceName:e.ServiceName}}static mapRows(e){return e.map(a=>this.mapRow(a))}static mapRowsWithItem(e){return e.map(a=>this.mapRowWithItem(a))}}const Ma=class Ma{static getFieldValuesForItems(e){return`
      SELECT
        fv.ItemId,
        fv.FieldKey,
        fv.FieldDefinitionId,
        fd.Label as CustomLabel,
        fd.FieldType as CustomFieldType,
        fd.IsHidden as CustomIsHidden,
        fd.EnableHistory as CustomEnableHistory,
        fv.Value,
        fv.Weight as DisplayOrder
      FROM FieldValues fv
      LEFT JOIN FieldDefinitions fd ON fv.FieldDefinitionId = fd.Id
      WHERE fv.ItemId IN (${Array(e).fill("?").join(",")})
        AND fv.IsDeleted = 0
      ORDER BY fv.ItemId, fv.Weight`}static getTagsForItems(e){return`
      SELECT
        it.ItemId,
        t.Id,
        t.Name,
        t.Color
      FROM ItemTags it
      INNER JOIN Tags t ON it.TagId = t.Id
      WHERE it.ItemId IN (${Array(e).fill("?").join(",")})
        AND it.IsDeleted = 0
        AND t.IsDeleted = 0
      ORDER BY t.DisplayOrder, t.Name`}};Qe(Ma,"BASE_SELECT",`
    SELECT DISTINCT
      i.Id,
      i.Name,
      i.ItemType,
      i.FolderId,
      f.Name as FolderPath,
      l.FileData as Logo,
      CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
      CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
      CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
      i.CreatedAt,
      i.UpdatedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    LEFT JOIN Folders f ON i.FolderId = f.Id`),Qe(Ma,"GET_ALL_ACTIVE",`
    ${Ma.BASE_SELECT}
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NULL
    ORDER BY i.CreatedAt DESC`),Qe(Ma,"GET_BY_ID",`
    SELECT
      i.Id,
      i.Name,
      i.ItemType,
      i.FolderId,
      l.FileData as Logo,
      CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
      CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
      CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
      i.CreatedAt,
      i.UpdatedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    WHERE i.Id = ? AND i.IsDeleted = 0`),Qe(Ma,"GET_RECENTLY_DELETED",`
    ${Ma.BASE_SELECT},
      i.DeletedAt
    FROM Items i
    LEFT JOIN Logos l ON i.LogoId = l.Id
    LEFT JOIN Folders f ON i.FolderId = f.Id
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NOT NULL
    ORDER BY i.DeletedAt DESC`),Qe(Ma,"COUNT_RECENTLY_DELETED",`
    SELECT COUNT(*) as count
    FROM Items
    WHERE IsDeleted = 0 AND DeletedAt IS NOT NULL`),Qe(Ma,"GET_FIELD_VALUES_FOR_ITEM",`
    SELECT
      fv.FieldKey,
      fv.FieldDefinitionId,
      fd.Label as CustomLabel,
      fd.FieldType as CustomFieldType,
      fd.IsHidden as CustomIsHidden,
      fd.EnableHistory as CustomEnableHistory,
      fv.Value,
      fv.Weight as DisplayOrder
    FROM FieldValues fv
    LEFT JOIN FieldDefinitions fd ON fv.FieldDefinitionId = fd.Id
    WHERE fv.ItemId = ? AND fv.IsDeleted = 0
    ORDER BY fv.Weight`),Qe(Ma,"GET_TAGS_FOR_ITEM",`
    SELECT
      t.Id,
      t.Name,
      t.Color
    FROM ItemTags it
    INNER JOIN Tags t ON it.TagId = t.Id
    WHERE it.ItemId = ? AND it.IsDeleted = 0 AND t.IsDeleted = 0
    ORDER BY t.DisplayOrder, t.Name`),Qe(Ma,"INSERT_ITEM",`
    INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?)`),Qe(Ma,"UPDATE_ITEM",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = COALESCE(?, LogoId),
        UpdatedAt = ?
    WHERE Id = ?`),Qe(Ma,"UPDATE_ITEM_WITH_LOGO",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = ?,
        UpdatedAt = ?
    WHERE Id = ?`),Qe(Ma,"TRASH_ITEM",`
    UPDATE Items
    SET DeletedAt = ?,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0`),Qe(Ma,"RESTORE_ITEM",`
    UPDATE Items
    SET DeletedAt = NULL,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0 AND DeletedAt IS NOT NULL`),Qe(Ma,"TOMBSTONE_ITEM",`
    UPDATE Items
    SET IsDeleted = 1,
        Name = NULL,
        LogoId = NULL,
        FolderId = NULL,
        UpdatedAt = ?
    WHERE Id = ?`),Qe(Ma,"GET_LOGO_ID",`
    SELECT LogoId FROM Items WHERE Id = ?`),Qe(Ma,"GET_ALL_EMAIL_ADDRESSES",`
    SELECT DISTINCT fv.Value as Email
    FROM FieldValues fv
    INNER JOIN Items i ON fv.ItemId = i.Id
    WHERE fv.FieldKey = ?
      AND fv.Value IS NOT NULL
      AND fv.Value != ''
      AND fv.IsDeleted = 0
      AND i.IsDeleted = 0`);let Xa=Ma;class lr{}Qe(lr,"GET_EXISTING_FOR_ITEM",`
    SELECT Id, FieldKey, FieldDefinitionId, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0`),Qe(lr,"INSERT",`
    INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),Qe(lr,"UPDATE",`
    UPDATE FieldValues
    SET Value = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`),Qe(lr,"SOFT_DELETE",`
    UPDATE FieldValues
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`),Qe(lr,"GET_FOR_HISTORY",`
    SELECT FieldKey, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0 AND FieldKey IS NOT NULL`);class ai{}Qe(ai,"EXISTS",`
    SELECT Id FROM FieldDefinitions WHERE Id = ?`),Qe(ai,"EXISTS_ACTIVE",`
    SELECT Id FROM FieldDefinitions WHERE Id = ? AND IsDeleted = 0`),Qe(ai,"INSERT",`
    INSERT INTO FieldDefinitions (Id, FieldType, Label, IsMultiValue, IsHidden, EnableHistory, Weight, ApplicableToTypes, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`),Qe(ai,"UPDATE",`
    UPDATE FieldDefinitions
    SET Label = ?,
        FieldType = ?,
        IsHidden = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`);class xr{static softDeleteOld(e){return`
      UPDATE FieldHistories
      SET IsDeleted = 1, UpdatedAt = ?
      WHERE Id IN (${Array(e).fill("?").join(",")})`}}Qe(xr,"INSERT",`
    INSERT INTO FieldHistories (Id, ItemId, FieldDefinitionId, FieldKey, ValueSnapshot, ChangedAt, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),Qe(xr,"GET_FOR_FIELD",`
    SELECT
      Id,
      ItemId,
      FieldKey,
      ValueSnapshot,
      ChangedAt,
      CreatedAt,
      UpdatedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC
    LIMIT ?`),Qe(xr,"GET_FOR_PRUNING",`
    SELECT Id, ChangedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC`),Qe(xr,"SOFT_DELETE",`
    UPDATE FieldHistories
    SET IsDeleted = 1, UpdatedAt = ?
    WHERE Id = ?`);class jk extends $l{constructor(e,a){super(e),this.logoRepository=a}getAll(){let e;try{e=this.client.executeQuery(Xa.GET_ALL_ACTIVE)}catch(m){if(m instanceof Error&&m.message.includes("no such table"))return[];throw m}if(e.length===0)return[];const a=e.map(m=>m.Id),i=this.client.executeQuery(Xa.getFieldValuesForItems(a.length),a),s=Gg.processFieldRows(i),c=this.client.executeQuery(Xa.getTagsForItems(a.length),a),d=Cl.groupTagsByItem(c);return Cl.mapRows(e,s,d)}getById(e){const a=this.client.executeQuery(Xa.GET_BY_ID,[e]);if(a.length===0)return null;const i=this.client.executeQuery(Xa.GET_FIELD_VALUES_FOR_ITEM,[e]),s=Gg.processFieldRowsForSingleItem(i),c=this.client.executeQuery(Xa.GET_TAGS_FOR_ITEM,[e]),d=Cl.mapTagRows(c);return Cl.mapRow(a[0],s,d)}getAllEmailAddresses(){return this.client.executeQuery(Xa.GET_ALL_EMAIL_ADDRESSES,[Za.LoginEmail]).map(a=>a.Email)}async create(e,a=[],i=[]){return this.withTransaction(async()=>{const s=this.now(),c=e.Id||this.generateId(),d=this.resolveLogoId(e,s);return this.client.executeUpdate(Xa.INSERT_ITEM,[c,e.Name??null,e.ItemType,d,e.FolderId??null,s,s,0]),e.Fields&&e.Fields.length>0&&this.insertFieldValues(c,e.Fields,e.ItemType,s),this.insertTotpCodes(c,i,s),this.insertAttachments(c,a,s),c})}async update(e,a=[],i=[],s=[],c=[]){return this.withTransaction(async()=>{const d=this.now(),m=this.resolveLogoId(e,d),f=this.client.executeQuery("SELECT Name, ItemType, FolderId, LogoId FROM Items WHERE Id = ?",[e.Id])[0];if(f){const g=(e.Name??null)!==f.Name,E=String(e.ItemType)!==String(f.ItemType),p=(e.FolderId??null)!==f.FolderId,N=m!==f.LogoId;(g||E||p||N)&&this.client.executeUpdate(Xa.UPDATE_ITEM_WITH_LOGO,[e.Name??null,e.ItemType,e.FolderId??null,m,d,e.Id])}return await this.trackFieldHistory(e.Id,e.Fields,d),this.updateFieldValues(e,d),this.handleTotpCodes(e.Id,c,s,d),this.handleAttachments(e.Id,i,a,d),1})}async trash(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(Xa.TRASH_ITEM,[a,a,e])})}async restore(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(Xa.RESTORE_ITEM,[a,e])})}async permanentlyDelete(e){return this.withTransaction(async()=>{const a=this.now(),i=this.client.executeQuery(Xa.GET_LOGO_ID,[e]),s=i.length>0?i[0].LogoId:null;this.hardDeleteByForeignKey("FieldValues","ItemId",e),this.hardDeleteByForeignKey("FieldHistories","ItemId",e),this.hardDeleteByForeignKey("Passkeys","ItemId",e),this.hardDeleteByForeignKey("TotpCodes","ItemId",e),this.hardDeleteByForeignKey("Attachments","ItemId",e),this.hardDeleteByForeignKey("ItemTags","ItemId",e);const c=this.client.executeUpdate(Xa.TOMBSTONE_ITEM,[a,e]);return s&&this.logoRepository.cleanupOrphanedLogo(s),c})}getRecentlyDeleted(){let e;try{e=this.client.executeQuery(`
        SELECT DISTINCT
          i.Id,
          i.Name,
          i.ItemType,
          i.FolderId,
          f.Name as FolderPath,
          l.FileData as Logo,
          i.DeletedAt,
          CASE WHEN EXISTS (SELECT 1 FROM Passkeys pk WHERE pk.ItemId = i.Id AND pk.IsDeleted = 0) THEN 1 ELSE 0 END as HasPasskey,
          CASE WHEN EXISTS (SELECT 1 FROM Attachments att WHERE att.ItemId = i.Id AND att.IsDeleted = 0) THEN 1 ELSE 0 END as HasAttachment,
          CASE WHEN EXISTS (SELECT 1 FROM TotpCodes tc WHERE tc.ItemId = i.Id AND tc.IsDeleted = 0) THEN 1 ELSE 0 END as HasTotp,
          i.CreatedAt,
          i.UpdatedAt
        FROM Items i
        LEFT JOIN Logos l ON i.LogoId = l.Id
        LEFT JOIN Folders f ON i.FolderId = f.Id
        WHERE i.IsDeleted = 0 AND i.DeletedAt IS NOT NULL
        ORDER BY i.DeletedAt DESC`)}catch(c){if(c instanceof Error&&c.message.includes("no such table"))return[];throw c}if(e.length===0)return[];const a=e.map(c=>c.Id),i=this.client.executeQuery(Xa.getFieldValuesForItems(a.length),a),s=Gg.processFieldRows(i);return e.map(c=>Cl.mapDeletedItemRow(c,s.get(c.Id)||[]))}getRecentlyDeletedCount(){var e;try{return((e=this.client.executeQuery(Xa.COUNT_RECENTLY_DELETED)[0])==null?void 0:e.count)||0}catch(a){if(a instanceof Error&&a.message.includes("no such table"))return 0;throw a}}getFieldHistory(e,a){return this.client.executeQuery(xr.GET_FOR_FIELD,[e,a,Vg]).map(s=>({Id:s.Id,ItemId:s.ItemId,FieldKey:s.FieldKey,ValueSnapshot:s.ValueSnapshot,ChangedAt:s.ChangedAt,CreatedAt:s.CreatedAt,UpdatedAt:s.UpdatedAt}))}async deleteFieldHistory(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(xr.SOFT_DELETE,[a,e])})}resolveLogoId(e,a){var m;const i=(m=e.Fields)==null?void 0:m.find(f=>f.FieldKey==="login.url"),s=i==null?void 0:i.Value,c=Array.isArray(s)?s[0]:s,d=this.logoRepository.extractSourceFromUrl(c);if(e.Logo){const f=this.logoRepository.convertLogoToUint8Array(e.Logo);if(f)return this.logoRepository.getOrCreate(d,f,a)}else if(d!=="unknown")return this.logoRepository.getIdForSource(d);return null}insertFieldValues(e,a,i,s){for(const c of a){if((!c.Value||typeof c.Value=="string"&&c.Value.trim()==="")&&!c.IsCustomField)continue;let m=null;c.IsCustomField&&(m=this.ensureFieldDefinition(c,i,s));const g=(Array.isArray(c.Value)?c.Value:[c.Value]).filter(p=>p&&p.trim()!==""),E=c.IsCustomField&&g.length===0?[""]:g;for(const p of E)this.client.executeUpdate(lr.INSERT,[this.generateId(),e,m,c.IsCustomField?null:c.FieldKey,p,c.DisplayOrder??0,s,s,0]);if(c.EnableHistory&&g.length>0){const p=this.generateId(),N=JSON.stringify(g);this.client.executeUpdate(xr.INSERT,[p,e,null,c.FieldKey,N,s,s,s,0])}}}ensureFieldDefinition(e,a,i){return this.client.executeQuery(ai.EXISTS,[e.FieldKey]).length===0&&this.client.executeUpdate(ai.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,a,i,i,0]),e.FieldKey}updateFieldValues(e,a){const i=this.client.executeQuery(lr.GET_EXISTING_FOR_ITEM,[e.Id]),s=new Map,c=new Map;for(const m of i){const f=m.FieldKey||m.FieldDefinitionId||"",g=c.get(f)||0;s.set(`${f}:${g}`,{Id:m.Id,Value:m.Value}),c.set(f,g+1)}const d=new Set;if(e.Fields&&e.Fields.length>0)for(const m of e.Fields){if((!m.Value||typeof m.Value=="string"&&m.Value.trim()==="")&&!m.IsCustomField)continue;let g=null;m.IsCustomField&&(g=this.ensureOrUpdateFieldDefinition(m,e.ItemType,a));const E=Array.isArray(m.Value)?m.Value:[m.Value],p=m.FieldKey,N=E.filter(x=>x&&(typeof x!="string"||x.trim()!=="")),v=m.IsCustomField&&N.length===0?[""]:N;for(let x=0;x<v.length;x++){const T=v[x],k=`${p}:${x}`,L=s.get(k);L?(d.add(L.Id),L.Value!==T&&this.client.executeUpdate(lr.UPDATE,[T,m.DisplayOrder??0,a,L.Id])):this.client.executeUpdate(lr.INSERT,[this.generateId(),e.Id,g,m.IsCustomField?null:m.FieldKey,T,m.DisplayOrder??0,a,a,0])}}for(const m of i)d.has(m.Id)||this.client.executeUpdate(lr.SOFT_DELETE,[a,m.Id])}ensureOrUpdateFieldDefinition(e,a,i){return this.client.executeQuery(ai.EXISTS_ACTIVE,[e.FieldKey]).length===0?this.client.executeUpdate(ai.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,a,i,i,0]):this.client.executeUpdate(ai.UPDATE,[e.Label,e.FieldType,e.IsHidden?1:0,e.DisplayOrder??0,i,e.FieldKey]),e.FieldKey}async trackFieldHistory(e,a,i){const s=this.client.executeQuery(lr.GET_FOR_HISTORY,[e]),c={};for(const d of s)c[d.FieldKey]||(c[d.FieldKey]=[]),c[d.FieldKey].push(d.Value);for(const d of a){if(!d.EnableHistory)continue;const m=c[d.FieldKey]||[],g=(Array.isArray(d.Value)?d.Value:[d.Value]).filter(p=>p&&p.trim()!=="");if((m.length!==g.length||!m.every((p,N)=>p===g[N]))&&g.length>0){const p=this.generateId(),N=JSON.stringify(g);this.client.executeUpdate(xr.INSERT,[p,e,null,d.FieldKey,N,i,i,i,0]),await this.pruneFieldHistory(e,d.FieldKey,i)}}}async pruneFieldHistory(e,a,i){const s=this.client.executeQuery(xr.GET_FOR_PRUNING,[e,a]);if(s.length>Vg){const d=s.slice(Vg).map(m=>m.Id);d.length>0&&this.client.executeUpdate(xr.softDeleteOld(d.length),[i,...d])}}insertTotpCodes(e,a,i){for(const s of a)this.client.executeUpdate(`INSERT INTO TotpCodes (Id, Name, SecretKey, ItemId, CreatedAt, UpdatedAt, IsDeleted)
         VALUES (?, ?, ?, ?, ?, ?, ?)`,[s.Id||this.generateId(),s.Name,s.SecretKey,e,i,i,0])}handleTotpCodes(e,a,i,s){const c=this.client.executeQuery("SELECT Id, Name, SecretKey FROM TotpCodes WHERE ItemId = ? AND IsDeleted = 0",[e]),d=new Map(c.map(m=>[m.Id,m]));for(const m of a){const f=i.includes(m.Id);if(m.IsDeleted)f&&this.client.executeUpdate("UPDATE TotpCodes SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,m.Id]);else if(f){const g=d.get(m.Id);g&&(g.Name!==m.Name||g.SecretKey!==m.SecretKey)&&this.client.executeUpdate("UPDATE TotpCodes SET Name = ?, SecretKey = ?, UpdatedAt = ? WHERE Id = ?",[m.Name,m.SecretKey,s,m.Id])}else this.client.executeUpdate(`INSERT INTO TotpCodes (Id, Name, SecretKey, ItemId, CreatedAt, UpdatedAt, IsDeleted)
           VALUES (?, ?, ?, ?, ?, ?, ?)`,[m.Id||this.generateId(),m.Name,m.SecretKey,e,s,s,0])}}insertAttachments(e,a,i){for(const s of a){const c=s.Blob instanceof Uint8Array?s.Blob:new Uint8Array(s.Blob);this.client.executeUpdate(`INSERT INTO Attachments (Id, Filename, Blob, ItemId, CreatedAt, UpdatedAt, IsDeleted)
         VALUES (?, ?, ?, ?, ?, ?, ?)`,[s.Id||this.generateId(),s.Filename,c,e,i,i,0])}}handleAttachments(e,a,i,s){const c=new Set(a.map(d=>d.Id));for(const d of i)c.has(d)||this.client.executeUpdate("UPDATE Attachments SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,d]);for(const d of a){const m=i.includes(d.Id);if(d.IsDeleted)m&&this.client.executeUpdate("UPDATE Attachments SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,d.Id]);else if(!m){const f=d.Blob instanceof Uint8Array?d.Blob:new Uint8Array(d.Blob);this.client.executeUpdate(`INSERT INTO Attachments (Id, Filename, Blob, ItemId, CreatedAt, UpdatedAt, IsDeleted)
           VALUES (?, ?, ?, ?, ?, ?, ?)`,[d.Id||this.generateId(),d.Filename,f,e,s,s,0])}}}}const gs={GET_BY_RP_ID:`
    SELECT
      p.Id,
      p.ItemId,
      p.RpId,
      p.UserHandle,
      p.PublicKey,
      p.PrivateKey,
      p.DisplayName,
      p.PrfKey,
      p.AdditionalData,
      p.CreatedAt,
      p.UpdatedAt,
      p.IsDeleted,
      i.Name as ServiceName,
      (SELECT fv.Value FROM FieldValues fv WHERE fv.ItemId = i.Id AND fv.FieldKey = '${Za.LoginUsername}' AND fv.IsDeleted = 0 LIMIT 1) as Username
    FROM Passkeys p
    INNER JOIN Items i ON p.ItemId = i.Id
    WHERE p.RpId = ? AND p.IsDeleted = 0
      AND i.IsDeleted = 0 AND i.DeletedAt IS NULL
    ORDER BY p.CreatedAt DESC`,GET_BY_ID_WITH_ITEM:`
    SELECT
      p.Id,
      p.ItemId,
      p.RpId,
      p.UserHandle,
      p.PublicKey,
      p.PrivateKey,
      p.DisplayName,
      p.PrfKey,
      p.AdditionalData,
      p.CreatedAt,
      p.UpdatedAt,
      p.IsDeleted,
      i.Name as ServiceName,
      (SELECT fv.Value FROM FieldValues fv WHERE fv.ItemId = i.Id AND fv.FieldKey = '${Za.LoginUsername}' AND fv.IsDeleted = 0 LIMIT 1) as Username
    FROM Passkeys p
    INNER JOIN Items i ON p.ItemId = i.Id
    WHERE p.Id = ? AND p.IsDeleted = 0
      AND i.IsDeleted = 0 AND i.DeletedAt IS NULL`,GET_BY_ITEM_ID:`
    SELECT
      p.Id,
      p.ItemId,
      p.RpId,
      p.UserHandle,
      p.PublicKey,
      p.PrivateKey,
      p.DisplayName,
      p.PrfKey,
      p.AdditionalData,
      p.CreatedAt,
      p.UpdatedAt,
      p.IsDeleted
    FROM Passkeys p
    WHERE p.ItemId = ? AND p.IsDeleted = 0
    ORDER BY p.CreatedAt DESC`,INSERT:`
    INSERT INTO Passkeys (
      Id, ItemId, RpId, UserHandle, PublicKey, PrivateKey,
      PrfKey, DisplayName, AdditionalData, CreatedAt, UpdatedAt, IsDeleted
    )
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,UPDATE_DISPLAY_NAME:`
    UPDATE Passkeys
    SET DisplayName = ?,
        UpdatedAt = ?
    WHERE Id = ?`,SOFT_DELETE:`
    UPDATE Passkeys
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`,SOFT_DELETE_BY_ITEM:`
    UPDATE Passkeys
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE ItemId = ?`};class Pk extends $l{getByRpId(e){const a=this.client.executeQuery(gs.GET_BY_RP_ID,[e]);return Kg.mapRowsWithItem(a)}getById(e){const a=this.client.executeQuery(gs.GET_BY_ID_WITH_ITEM,[e]);return a.length===0?null:Kg.mapRowWithItem(a[0])}getByItemId(e){const a=this.client.executeQuery(gs.GET_BY_ITEM_ID,[e]);return Kg.mapRows(a)}async create(e){return this.withTransaction(async()=>{const a=this.now();let i=null;e.PrfKey&&(i=e.PrfKey instanceof Uint8Array?e.PrfKey:new Uint8Array(e.PrfKey));let s=null;e.UserHandle&&(s=e.UserHandle instanceof Uint8Array?e.UserHandle:new Uint8Array(e.UserHandle)),this.client.executeUpdate(gs.INSERT,[e.Id,e.ItemId,e.RpId,s,e.PublicKey,e.PrivateKey,i,e.DisplayName,e.AdditionalData??null,a,a,0])})}async deleteById(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(gs.SOFT_DELETE,[a,e])})}async deleteByItemId(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate(gs.SOFT_DELETE_BY_ITEM,[a,e])})}async updateDisplayName(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate(gs.UPDATE_DISPLAY_NAME,[a,i,e])})}}const $r={GET_ALL:`
    SELECT Id, Name, ParentFolderId, Weight
    FROM Folders
    WHERE IsDeleted = 0
    ORDER BY Weight, Name`,GET_BY_ID:`
    SELECT Id, Name, ParentFolderId
    FROM Folders
    WHERE Id = ? AND IsDeleted = 0`,INSERT:`
    INSERT INTO Folders (Id, Name, ParentFolderId, Weight, IsDeleted, CreatedAt, UpdatedAt)
    VALUES (?, ?, ?, 0, 0, ?, ?)`,UPDATE_NAME:`
    UPDATE Folders
    SET Name = ?,
        UpdatedAt = ?
    WHERE Id = ?`,SOFT_DELETE:`
    UPDATE Folders
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`,CLEAR_ITEMS_FOLDER:`
    UPDATE Items
    SET FolderId = NULL,
        UpdatedAt = ?
    WHERE FolderId = ?`,TRASH_ITEMS_IN_FOLDER:`
    UPDATE Items
    SET DeletedAt = ?,
        UpdatedAt = ?,
        FolderId = NULL
    WHERE FolderId = ? AND IsDeleted = 0 AND DeletedAt IS NULL`,MOVE_ITEM:`
    UPDATE Items
    SET FolderId = ?,
        UpdatedAt = ?
    WHERE Id = ?`};class Hk extends $l{async create(e,a){return this.withTransaction(async()=>{const i=crypto.randomUUID().toUpperCase(),s=this.now();return this.client.executeUpdate($r.INSERT,[i,e,a||null,s,s]),i})}getAll(){try{return this.client.executeQuery($r.GET_ALL)}catch(e){if(e instanceof Error&&e.message.includes("no such table"))return[];throw e}}getById(e){const a=this.client.executeQuery($r.GET_BY_ID,[e]);return a.length>0?a[0]:null}async update(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate($r.UPDATE_NAME,[a,i,e])})}async delete(e){return this.withTransaction(async()=>{const a=this.now();return this.client.executeUpdate($r.CLEAR_ITEMS_FOLDER,[a,e]),this.client.executeUpdate($r.SOFT_DELETE,[a,e])})}async deleteWithContents(e){return this.withTransaction(async()=>{const a=this.now(),i=this.client.executeUpdate($r.TRASH_ITEMS_IN_FOLDER,[a,a,e]);return this.client.executeUpdate($r.SOFT_DELETE,[a,e]),i})}async moveItem(e,a){return this.withTransaction(async()=>{const i=this.now();return this.client.executeUpdate($r.MOVE_ITEM,[a,i,e])})}}const Au={GET_SETTING:`
    SELECT s.Value
    FROM Settings s
    WHERE s.Key = ?`,GET_ENCRYPTION_KEYS:`
    SELECT
      x.PublicKey,
      x.PrivateKey,
      x.IsPrimary
    FROM EncryptionKeys x`,GET_TOTP_FOR_ITEM:`
    SELECT
      Id,
      Name,
      SecretKey,
      ItemId
    FROM TotpCodes
    WHERE ItemId = ? AND IsDeleted = 0`,GET_ATTACHMENTS_FOR_ITEM:`
    SELECT
      Id,
      Filename,
      Blob,
      ItemId,
      CreatedAt,
      UpdatedAt,
      IsDeleted
    FROM Attachments
    WHERE ItemId = ? AND IsDeleted = 0`};class zk extends $l{getSetting(e,a=""){const i=this.client.executeQuery(Au.GET_SETTING,[e]);return i.length>0?i[0].Value:a}getDefaultIdentityLanguage(){return this.getSetting("DefaultIdentityLanguage")}getDefaultIdentityGender(){return this.getSetting("DefaultIdentityGender","random")}getDefaultIdentityAgeRange(){return this.getSetting("DefaultIdentityAgeRange","random")}getPasswordSettings(){const e=this.getSetting("PasswordGenerationSettings"),a={Length:18,UseLowercase:!0,UseUppercase:!0,UseNumbers:!0,UseSpecialChars:!0,UseNonAmbiguousChars:!1};try{if(e)return{...a,...JSON.parse(e)}}catch(i){console.warn("Failed to parse password settings:",i)}return a}getAllEncryptionKeys(){return this.client.executeQuery(Au.GET_ENCRYPTION_KEYS)}getTotpCodesForItem(e){try{return this.tableExists("TotpCodes")?this.client.executeQuery(Au.GET_TOTP_FOR_ITEM,[e]):[]}catch(a){return console.error("Error getting TOTP codes for item:",a),[]}}getAttachmentsForItem(e){try{return this.tableExists("Attachments")?this.client.executeQuery(Au.GET_ATTACHMENTS_FOR_ITEM,[e]):[]}catch(a){return console.error("Error getting attachments for item:",a),[]}}getDefaultEmailDomain(){return this.getSetting("DefaultEmailDomain")}getEffectiveIdentityLanguage(){const e=this.getDefaultIdentityLanguage();return e||navigator.language.substring(0,2)}getCredentialsSortOrder(){const e=this.getSetting("CredentialsSortOrder","OldestFirst");return e==="OldestFirst"||e==="NewestFirst"||e==="Alphabetical"?e:"OldestFirst"}updateSetting(e,a){var d;const i=this.now();((d=this.client.executeQuery("SELECT COUNT(*) as count FROM Settings WHERE Key = ?",[e])[0])==null?void 0:d.count)>0?this.client.executeUpdate("UPDATE Settings SET Value = ?, UpdatedAt = ? WHERE Key = ?",[a,i,e]):this.client.executeUpdate("INSERT INTO Settings (Key, Value, CreatedAt, UpdatedAt, IsDeleted) VALUES (?, ?, ?, ?, ?)",[e,a,i,i,0])}setCredentialsSortOrder(e){this.updateSetting("CredentialsSortOrder",e)}}const Nl={GET_ID_FOR_SOURCE:`
    SELECT Id FROM Logos
    WHERE Source = ? AND IsDeleted = 0
    LIMIT 1`,INSERT:`
    INSERT INTO Logos (Id, Source, FileData, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?)`,COUNT_USAGE:`
    SELECT COUNT(*) as count FROM Items
    WHERE LogoId = ? AND IsDeleted = 0`,HARD_DELETE:`
    DELETE FROM Logos WHERE Id = ?`};class Qk extends $l{hasLogoForSource(e){return this.client.executeQuery(Nl.GET_ID_FOR_SOURCE,[e]).length>0}getIdForSource(e){const a=this.client.executeQuery(Nl.GET_ID_FOR_SOURCE,[e]);return a.length>0?a[0].Id:null}getOrCreate(e,a,i){const s=this.getIdForSource(e);if(s)return s;const c=this.generateId();return this.client.executeUpdate(Nl.INSERT,[c,e,a,i,i,0]),c}cleanupOrphanedLogo(e){const a=this.client.executeQuery(Nl.COUNT_USAGE,[e]);(a.length>0?a[0].count:0)===0&&(this.client.executeUpdate(Nl.HARD_DELETE,[e]),console.debug(`[LogoRepository] Deleted orphaned logo: ${e}`))}extractSourceFromUrl(e){if(!e)return"unknown";try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase().replace(/^www\./,"")}catch{return"unknown"}}convertLogoToUint8Array(e){if(!e)return null;try{if(typeof e=="object"&&!ArrayBuffer.isView(e)&&!Array.isArray(e)){const a=Object.values(e);return new Uint8Array(a)}if(Array.isArray(e)||e instanceof ArrayBuffer||e instanceof Uint8Array)return new Uint8Array(e)}catch(a){console.warn("Failed to convert logo to Uint8Array:",a)}return null}}class Jf{constructor(){Qe(this,"db",null);Qe(this,"isInTransaction",!1);Qe(this,"_items",null);Qe(this,"_passkeys",null);Qe(this,"_folders",null);Qe(this,"_settings",null);Qe(this,"_logos",null)}get items(){return this._items||(this._items=new jk(this,this.logos)),this._items}get passkeys(){return this._passkeys||(this._passkeys=new Pk(this)),this._passkeys}get folders(){return this._folders||(this._folders=new Hk(this)),this._folders}get settings(){return this._settings||(this._settings=new zk(this)),this._settings}get logos(){return this._logos||(this._logos=new Qk(this)),this._logos}getDb(){return this.db}async initializeFromBase64(e){try{const a=atob(e),i=new Uint8Array(a.length);for(let c=0;c<a.length;c++)i[c]=a.charCodeAt(c);const s=await Wf({locateFile:c=>`src/${c}`});this.db=new s.Database(i),this._items=null,this._passkeys=null,this._folders=null,this._settings=null,this._logos=null}catch(a){throw console.error("Error initializing SQLite database:",a),a}}beginTransaction(){if(!this.db)throw new Error("Database not initialized");if(this.isInTransaction)throw new Error("Transaction already in progress");try{this.db.run("BEGIN TRANSACTION"),this.isInTransaction=!0}catch(e){throw console.error("Error beginning transaction:",e),e}}async commitTransaction(){if(!this.db)throw new Error("Database not initialized");if(!this.isInTransaction)throw new Error("No transaction in progress");try{this.db.run("COMMIT"),this.isInTransaction=!1}catch(e){throw console.error("Error committing transaction:",e),e}}rollbackTransaction(){if(!this.db)throw new Error("Database not initialized");if(!this.isInTransaction)throw new Error("No transaction in progress");try{this.db.run("ROLLBACK"),this.isInTransaction=!1}catch(e){throw console.error("Error rolling back transaction:",e),e}}exportToBase64(){if(!this.db)throw new Error("Database not initialized");try{this.db.run("VACUUM");const e=this.db.export();let a="";for(let i=0;i<e.length;i++)a+=String.fromCharCode(e[i]);return btoa(a)}catch(e){throw console.error("Error exporting SQLite database:",e),e}}executeQuery(e,a=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(e);i.bind(a);const s=[];for(;i.step();)s.push(i.getAsObject());return i.free(),s}catch(i){throw console.error("Error executing query:",i),i}}executeUpdate(e,a=[]){if(!this.db)throw new Error("Database not initialized");try{const i=this.db.prepare(e);i.bind(a),i.step();const s=this.db.getRowsModified();return i.free(),s}catch(i){throw console.error("Error executing update:",i),i}}executeRaw(e){if(!this.db)throw new Error("Database not initialized");try{const a=e.split(";");for(const i of a){const s=i.trim();s.length===0||s.toUpperCase().startsWith("BEGIN TRANSACTION")||s.toUpperCase().startsWith("COMMIT")||s.toUpperCase().startsWith("ROLLBACK")||this.db.run(s)}}catch(a){throw console.error("Error executing raw SQL:",a),a}}close(){this.db&&(this.db.close(),this.db=null)}async getDatabaseVersion(){if(!this.db)throw new Error("Database not initialized");try{const e=this.executeQuery(`
        SELECT MigrationId
        FROM __EFMigrationsHistory
        ORDER BY MigrationId DESC
        LIMIT 1`);if(e.length===0)throw new Error("No migrations found in the database.");const a=e[0].MigrationId,i=vx(a);if(!i)throw new Error("Could not extract version from migration ID");const s=Ix(i);if(!s.isCompatible){const m=await Bk("common.errors.browserExtensionOutdated");throw new vs(m)}if(s.isKnownVersion&&s.clientVersion)return s.clientVersion;const d=new Yf().getLatestVersion();return{revision:d.revision,version:i,description:`Unknown version ${i} (backwards compatible)`,releaseVersion:d.releaseVersion,compatibleUpToVersion:d.compatibleUpToVersion}}catch(e){throw console.error("Error getting database version:",e),e}}async getLatestDatabaseVersion(){const a=new Yf().getAllVersions();return a[a.length-1]}async hasPendingMigrations(){try{const e=await this.getDatabaseVersion(),a=await this.getLatestDatabaseVersion();return e.revision<a.revision}catch(e){throw console.error("Error checking pending migrations:",e),e}}static imgSrcFromBytes(e){if(!e||Array.isArray(e)&&e.length===0||e instanceof Uint8Array&&e.length===0)return null;try{const a=this.toUint8Array(e),i=this.base64Encode(a);return i?`data:${this.detectMimeType(a)};base64,${i}`:null}catch(a){return console.error("Error setting logo:",a),null}}static extractSourceFromUrl(e){if(!e)return"unknown";try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase().replace(/^www\./,"")}catch{return"unknown"}}static detectMimeType(e){const a=()=>{const c=new TextDecoder().decode(e.slice(0,5)).toLowerCase();return c.includes("<?xml")||c.includes("<svg")},i=()=>e[0]===0&&e[1]===0&&e[2]===1&&e[3]===0,s=()=>e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71;return a()?"image/svg+xml":i()?"image/x-icon":s()?"image/png":"image/x-icon"}static toUint8Array(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return new Uint8Array(e);const a=Object.keys(e).length,i=new Uint8Array(a);for(let s=0;s<a;s++)i[s]=e[s];return i}static base64Encode(e){try{const a=Array.from(this.toUint8Array(e));return btoa(a.reduce((i,s)=>i+String.fromCharCode(s),""))}catch(a){return console.error("Error encoding to base64:",a),null}}}const Uy={"local:publicEmailDomains":"session:publicEmailDomains","local:privateEmailDomains":"session:privateEmailDomains","local:hiddenPrivateEmailDomains":"session:hiddenPrivateEmailDomains","local:encryptionKeyDerivationParams":"session:encryptionKeyDerivationParams"};async function Hl(r){let e=await Se.getItem(r);if(e===null&&r in Uy){const a=Uy[r];e=await Se.getItem(a),e!==null&&(await Se.setItem(r,e),await Se.removeItem(a))}return e}const nI=I.createContext(void 0),Vk=({children:r})=>{const[e,a]=I.useState(null),[i,s]=I.useState(!1),[c,d]=I.useState(!1),[m,f]=I.useState(!1),g=I.useRef(!1),[E,p]=I.useState(!1),[N,v]=I.useState(!1),[x,T]=I.useState(0),k=I.useCallback(()=>E||N,[E,N]),L=I.useCallback(async $=>{g.current=$,f($),await Se.setItem("local:isOfflineMode",$)},[]);I.useEffect(()=>{(async()=>{const[W,ne,he]=await Promise.all([Se.getItem("local:isOfflineMode"),Se.getItem("local:isDirty"),Se.getItem("local:serverRevision")]);g.current=W??!1,f(W??!1),p(ne??!1),T(he??0)})()},[]);const B=I.useCallback(async $=>{const W=new Jf;return await W.initializeFromBase64($),a(W),s(!0),d(!0),W},[]),S=I.useCallback(async()=>{try{const $=await ft("GET_VAULT",{},"background");if($!=null&&$.vault){const W=new Jf;return await W.initializeFromBase64($.vault),a(W),s(!0),d(!0),W}else return s(!0),d(!1),null}catch($){return console.error("Error retrieving vault from background:",$),s(!0),d(!1),null}},[]),O=I.useCallback(async()=>{try{const $=await Hl("local:publicEmailDomains"),W=await Hl("local:privateEmailDomains"),ne=await Hl("local:hiddenPrivateEmailDomains"),he=await Se.getItem("local:serverRevision");return!$&&!W?null:{publicEmailDomains:$??[],privateEmailDomains:W??[],hiddenPrivateEmailDomains:ne??[],serverRevision:he??0}}catch($){return console.error("Error getting vault metadata from local storage:",$),null}},[]),M=I.useCallback(async()=>{const[$,W]=await Promise.all([Se.getItem("local:isDirty"),Se.getItem("local:serverRevision")]);p($??!1),T(W??0)},[]),P=I.useCallback(async()=>e?await e.hasPendingMigrations():!1,[e]);I.useEffect(()=>{i||S()},[i,S]);const G=I.useCallback(async $=>{await ft("STORE_ENCRYPTION_KEY",$,"background")},[]),H=I.useCallback(async $=>{await ft("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",$,"background")},[]),z=I.useCallback(()=>{a(null),s(!1),d(!1)},[]),V=I.useCallback(()=>g.current,[]),K=I.useMemo(()=>({sqliteClient:e,dbInitialized:i,dbAvailable:c,isOffline:m,getIsOffline:V,isDirty:E,isSyncing:N,serverRevision:x,setIsOffline:L,setIsSyncing:v,shouldSuppressEmailErrors:k,loadDatabase:B,loadStoredDatabase:S,storeEncryptionKey:G,storeEncryptionKeyDerivationParams:H,clearDatabase:z,getVaultMetadata:O,refreshSyncState:M,hasPendingMigrations:P}),[e,i,c,m,V,E,N,x,L,k,B,S,G,H,z,O,M,P]);return l.jsx(nI.Provider,{value:K,children:r})},zt=()=>{const r=I.useContext(nI);if(r===void 0)throw new Error("useDb must be used within a DbProvider");return r},Mu="local:aliasvault_disabled_sites",Wu="local:aliasvault_global_autofill_popup_enabled",My="local:aliasvault_global_context_menu_enabled",Ao="local:aliasvault_vault_locked_dismiss_until",pu="local:aliasvault_temporary_disabled_sites",_y="local:aliasvault_clipboard_clear_timeout",Fy="local:aliasvault_auto_lock_timeout",Oy="local:aliasvault_autofill_matching_mode",jy="local:aliasvault_passkey_provider_enabled",bs="local:aliasvault_passkey_disabled_sites",Yu="session:pendingRedirectUrl",qg="local:aliasvault_skip_form_restore";var _u={exports:{}},Gk=_u.exports,Py;function Kk(){return Py||(Py=1,function(r,e){(function(a,i){r.exports=i()})(Gk,function(){return(()=>{var a,i,s={773:(m,f,g)=>{var E,p=typeof self<"u"&&self.Module!==void 0?self.Module:{},N={};for(E in p)p.hasOwnProperty(E)&&(N[E]=p[E]);var v,x,T,k;v=typeof window=="object",x=typeof importScripts=="function",T=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",k=!v&&!T&&!x;var L,B,S,O,M,P="";T?(P=x?g(967).dirname(P)+"/":"//",L=function(me,De){return O||(O=g(145)),M||(M=g(967)),me=M.normalize(me),O.readFileSync(me,De?null:"utf8")},S=function(me){var De=L(me,!0);return De.buffer||(De=new Uint8Array(De)),K(De.buffer),De},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),m.exports=p,process.on("uncaughtException",function(me){if(!(me instanceof nt))throw me}),process.on("unhandledRejection",ee),p.inspect=function(){return"[Emscripten Module object]"}):k?(typeof read<"u"&&(L=function(me){return read(me)}),S=function(me){var De;return typeof readbuffer=="function"?new Uint8Array(readbuffer(me)):(K(typeof(De=read(me,"binary"))=="object"),De)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(v||x)&&(x?P=self.location.href:typeof document<"u"&&document.currentScript&&(P=document.currentScript.src),P=P.indexOf("blob:")!==0?P.substr(0,P.lastIndexOf("/")+1):"",L=function(me){var De=new XMLHttpRequest;return De.open("GET",me,!1),De.send(null),De.responseText},x&&(S=function(me){var De=new XMLHttpRequest;return De.open("GET",me,!1),De.responseType="arraybuffer",De.send(null),new Uint8Array(De.response)}),B=function(me,De,Pe){var ze=new XMLHttpRequest;ze.open("GET",me,!0),ze.responseType="arraybuffer",ze.onload=function(){ze.status==200||ze.status==0&&ze.response?De(ze.response):Pe()},ze.onerror=Pe,ze.send(null)}),p.print||console.log.bind(console);var G,H,z=p.printErr||console.warn.bind(console);for(E in N)N.hasOwnProperty(E)&&(p[E]=N[E]);N=null,p.arguments&&p.arguments,p.thisProgram&&p.thisProgram,p.quit&&p.quit,p.wasmBinary&&(G=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&ee("no native wasm support detected");var V=!1;function K(me,De){me||ee("Assertion failed: "+De)}var $,W,ne=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function he(me){$=me,p.HEAP8=new Int8Array(me),p.HEAP16=new Int16Array(me),p.HEAP32=new Int32Array(me),p.HEAPU8=W=new Uint8Array(me),p.HEAPU16=new Uint16Array(me),p.HEAPU32=new Uint32Array(me),p.HEAPF32=new Float32Array(me),p.HEAPF64=new Float64Array(me)}p.INITIAL_MEMORY;var q,re=[],Ee=[],pe=[],j=0,X=null;function ee(me){throw p.onAbort&&p.onAbort(me),z(me+=""),V=!0,me="abort("+me+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(me)}function ie(me){return me.startsWith("data:application/octet-stream;base64,")}function ve(me){return me.startsWith("file://")}p.preloadedImages={},p.preloadedAudios={};var Ne,Re="argon2.wasm";function Be(me){try{if(me==Re&&G)return new Uint8Array(G);if(S)return S(me);throw"both async and sync fetching of the wasm failed"}catch(De){ee(De)}}function ke(me){for(;me.length>0;){var De=me.shift();if(typeof De!="function"){var Pe=De.func;typeof Pe=="number"?De.arg===void 0?q.get(Pe)():q.get(Pe)(De.arg):Pe(De.arg===void 0?null:De.arg)}else De(p)}}function Ve(me){try{return H.grow(me-$.byteLength+65535>>>16),he(H.buffer),1}catch{}}ie(Re)||(Ne=Re,Re=p.locateFile?p.locateFile(Ne,P):P+Ne);var vt,Ct={a:function(me,De,Pe){W.copyWithin(me,De,De+Pe)},b:function(me){var De,Pe=W.length,ze=2147418112;if((me>>>=0)>ze)return!1;for(var at=1;at<=4;at*=2){var Ye=Pe*(1+.2/at);if(Ye=Math.min(Ye,me+100663296),Ve(Math.min(ze,((De=Math.max(me,Ye))%65536>0&&(De+=65536-De%65536),De))))return!0}return!1}},Ut=(function(){var me={a:Ct};function De(at,Ye){var dt,jt=at.exports;p.asm=jt,he((H=p.asm.c).buffer),q=p.asm.k,dt=p.asm.d,Ee.unshift(dt),function(qt){if(j--,p.monitorRunDependencies&&p.monitorRunDependencies(j),j==0&&X){var Qt=X;X=null,Qt()}}()}function Pe(at){De(at.instance)}function ze(at){return function(){if(!G&&(v||x)){if(typeof fetch=="function"&&!ve(Re))return fetch(Re,{credentials:"same-origin"}).then(function(Ye){if(!Ye.ok)throw"failed to load wasm binary file at '"+Re+"'";return Ye.arrayBuffer()}).catch(function(){return Be(Re)});if(B)return new Promise(function(Ye,dt){B(Re,function(jt){Ye(new Uint8Array(jt))},dt)})}return Promise.resolve().then(function(){return Be(Re)})}().then(function(Ye){return WebAssembly.instantiate(Ye,me)}).then(at,function(Ye){z("failed to asynchronously prepare wasm: "+Ye),ee(Ye)})}if(j++,p.monitorRunDependencies&&p.monitorRunDependencies(j),p.instantiateWasm)try{return p.instantiateWasm(me,De)}catch(at){return z("Module.instantiateWasm callback failed with error: "+at),!1}G||typeof WebAssembly.instantiateStreaming!="function"||ie(Re)||ve(Re)||typeof fetch!="function"?ze(Pe):fetch(Re,{credentials:"same-origin"}).then(function(at){return WebAssembly.instantiateStreaming(at,me).then(Pe,function(Ye){return z("wasm streaming compile failed: "+Ye),z("falling back to ArrayBuffer instantiation"),ze(Pe)})})}(),p.___wasm_call_ctors=function(){return(p.___wasm_call_ctors=p.asm.d).apply(null,arguments)},p._argon2_hash=function(){return(p._argon2_hash=p.asm.e).apply(null,arguments)},p._malloc=function(){return(Ut=p._malloc=p.asm.f).apply(null,arguments)}),tt=(p._free=function(){return(p._free=p.asm.g).apply(null,arguments)},p._argon2_verify=function(){return(p._argon2_verify=p.asm.h).apply(null,arguments)},p._argon2_error_message=function(){return(p._argon2_error_message=p.asm.i).apply(null,arguments)},p._argon2_encodedlen=function(){return(p._argon2_encodedlen=p.asm.j).apply(null,arguments)},p._argon2_hash_ext=function(){return(p._argon2_hash_ext=p.asm.l).apply(null,arguments)},p._argon2_verify_ext=function(){return(p._argon2_verify_ext=p.asm.m).apply(null,arguments)},p.stackAlloc=function(){return(tt=p.stackAlloc=p.asm.n).apply(null,arguments)});function nt(me){this.name="ExitStatus",this.message="Program terminated with exit("+me+")",this.status=me}function Te(me){function De(){vt||(vt=!0,p.calledRun=!0,V||(ke(Ee),p.onRuntimeInitialized&&p.onRuntimeInitialized(),function(){if(p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;)Pe=p.postRun.shift(),pe.unshift(Pe);var Pe;ke(pe)}()))}j>0||(function(){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)Pe=p.preRun.shift(),re.unshift(Pe);var Pe;ke(re)}(),j>0||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),De()},1)):De()))}if(p.allocate=function(me,De){var Pe;return Pe=De==1?tt(me.length):Ut(me.length),me.subarray||me.slice?W.set(me,Pe):W.set(new Uint8Array(me),Pe),Pe},p.UTF8ToString=function(me,De){return me?function(Pe,ze,at){for(var Ye=ze+at,dt=ze;Pe[dt]&&!(dt>=Ye);)++dt;if(dt-ze>16&&Pe.subarray&&ne)return ne.decode(Pe.subarray(ze,dt));for(var jt="";ze<dt;){var qt=Pe[ze++];if(128&qt){var Qt=63&Pe[ze++];if((224&qt)!=192){var na=63&Pe[ze++];if((qt=(240&qt)==224?(15&qt)<<12|Qt<<6|na:(7&qt)<<18|Qt<<12|na<<6|63&Pe[ze++])<65536)jt+=String.fromCharCode(qt);else{var U=qt-65536;jt+=String.fromCharCode(55296|U>>10,56320|1023&U)}}else jt+=String.fromCharCode((31&qt)<<6|Qt)}else jt+=String.fromCharCode(qt)}return jt}(W,me,De):""},p.ALLOC_NORMAL=0,X=function me(){vt||Te(),vt||(X=me)},p.run=Te,p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);p.preInit.length>0;)p.preInit.pop()();Te(),m.exports=p,p.unloadRuntime=function(){typeof self<"u"&&delete self.Module,p=H=q=$=W=void 0,delete m.exports}},631:function(m,f,g){var E,p;(p=typeof(E=function(){const N=typeof self<"u"?self:this,v={Argon2d:0,Argon2i:1,Argon2id:2};function x(S){if(x._promise)return x._promise;if(x._module)return Promise.resolve(x._module);let O;return O=N.process&&N.process.versions&&N.process.versions.node?T().then(M=>new Promise(P=>{M.postRun=()=>P(M)})):(N.loadArgon2WasmBinary?N.loadArgon2WasmBinary():Promise.resolve(g(721)).then(M=>function(P){const G=atob(P),H=new Uint8Array(new ArrayBuffer(G.length));for(let z=0;z<G.length;z++)H[z]=G.charCodeAt(z);return H}(M))).then(M=>function(P,G){return new Promise(H=>(N.Module={wasmBinary:P,wasmMemory:G,postRun(){H(Module)}},T()))}(M,S?function(P){const V=Math.min(Math.max(Math.ceil(P*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:V,maximum:32767})}(S):void 0)),x._promise=O,O.then(M=>(x._module=M,delete x._promise,M))}function T(){return N.loadArgon2WasmModule?N.loadArgon2WasmModule():Promise.resolve(g(773))}function k(S,O){return S.allocate(O,"i8",S.ALLOC_NORMAL)}function L(S,O){return k(S,new Uint8Array([...O,0]))}function B(S){if(typeof S!="string")return S;if(typeof TextEncoder=="function")return new TextEncoder().encode(S);if(typeof Buffer=="function")return Buffer.from(S);throw new Error("Don't know how to encode UTF8")}return{ArgonType:v,hash:function(S){const O=S.mem||1024;return x(O).then(M=>{const P=S.time||1,G=S.parallelism||1,H=B(S.pass),z=L(M,H),V=H.length,K=B(S.salt),$=L(M,K),W=K.length,ne=S.type||v.Argon2d,he=M.allocate(new Array(S.hashLen||24),"i8",M.ALLOC_NORMAL),q=S.secret?k(M,S.secret):0,re=S.secret?S.secret.byteLength:0,Ee=S.ad?k(M,S.ad):0,pe=S.ad?S.ad.byteLength:0,j=S.hashLen||24,X=M._argon2_encodedlen(P,O,G,W,j,ne),ee=M.allocate(new Array(X+1),"i8",M.ALLOC_NORMAL);let ie,ve,Ne;try{ve=M._argon2_hash_ext(P,O,G,z,V,$,W,he,j,ee,X,ne,q,re,Ee,pe,19)}catch(Re){ie=Re}if(ve!==0||ie){try{ie||(ie=M.UTF8ToString(M._argon2_error_message(ve)))}catch{}Ne={message:ie,code:ve}}else{let Re="";const Be=new Uint8Array(j);for(let ke=0;ke<j;ke++){const Ve=M.HEAP8[he+ke];Be[ke]=Ve,Re+=("0"+(255&Ve).toString(16)).slice(-2)}Ne={hash:Be,hashHex:Re,encoded:M.UTF8ToString(ee)}}try{M._free(z),M._free($),M._free(he),M._free(ee),Ee&&M._free(Ee),q&&M._free(q)}catch{}if(ie)throw Ne;return Ne})},verify:function(S){return x().then(O=>{const M=B(S.pass),P=L(O,M),G=M.length,H=S.secret?k(O,S.secret):0,z=S.secret?S.secret.byteLength:0,V=S.ad?k(O,S.ad):0,K=S.ad?S.ad.byteLength:0,$=L(O,B(S.encoded));let W,ne,he,q=S.type;if(q===void 0){let re=S.encoded.split("$")[1];re&&(re=re.replace("a","A"),q=v[re]||v.Argon2d)}try{ne=O._argon2_verify_ext($,P,G,H,z,V,K,q)}catch(re){W=re}if(ne||W){try{W||(W=O.UTF8ToString(O._argon2_error_message(ne)))}catch{}he={message:W,code:ne}}try{O._free(P),O._free($)}catch{}if(W)throw he;return he})},unloadRuntime:function(){x._module&&(x._module.unloadRuntime(),delete x._promise,delete x._module)}}})=="function"?E.apply(f,[]):E)===void 0||(m.exports=p)},721:function(m,f){m.exports=" "},145:()=>{},967:()=>{}},c={};function d(m){var f=c[m];if(f!==void 0)return f.exports;var g=c[m]={exports:{}};return s[m].call(g.exports,g,g.exports,d),g.exports}return i=Object.getPrototypeOf?m=>Object.getPrototypeOf(m):m=>m.__proto__,d.t=function(m,f){if(1&f&&(m=this(m)),8&f||typeof m=="object"&&m&&(4&f&&m.__esModule||16&f&&typeof m.then=="function"))return m;var g=Object.create(null);d.r(g);var E={};a=a||[null,i({}),i([]),i(i)];for(var p=2&f&&m;typeof p=="object"&&!~a.indexOf(p);p=i(p))Object.getOwnPropertyNames(p).forEach(N=>E[N]=()=>m[N]);return E.default=()=>m,d.d(g,E),g},d.d=(m,f)=>{for(var g in f)d.o(f,g)&&!d.o(m,g)&&Object.defineProperty(m,g,{enumerable:!0,get:f[g]})},d.o=(m,f)=>Object.prototype.hasOwnProperty.call(m,f),d.r=m=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},d(631)})()})}(_u)),_u.exports}var qk=Kk();const rI=qi(qk);var Nb,wb;const Wk=(wb=(Nb=globalThis.browser)==null?void 0:Nb.runtime)!=null&&wb.id?globalThis.browser:globalThis.chrome,li=Wk,wh="local:aliasvault_pin_enabled",xh="local:aliasvault_pin_encrypted_key",Th="local:aliasvault_pin_salt",Sh="local:aliasvault_pin_length",Eo="local:aliasvault_pin_failed_attempts",Xf=4;class Fu extends Error{constructor(){super("PIN locked after too many failed attempts"),this.name="PinLockedError"}}class ql extends Error{constructor(){super("Invalid PIN format"),this.name="InvalidPinFormatError"}}class $f extends Error{constructor(a){super(`Incorrect PIN. ${a} attempts remaining.`);Qe(this,"attemptsRemaining");this.name="IncorrectPinError",this.attemptsRemaining=a}}async function iI(){try{return await Se.getItem(wh)===!0}catch{return!1}}async function Yk(){try{return await Se.getItem(Sh)||null}catch{return null}}function kh(r){return/^\d{6,8}$/.test(r)}async function sI(){try{return await Se.getItem(Eo)||0}catch{return 0}}async function oI(){return await sI()>=Xf}async function Jk(r,e){if(!kh(r))throw new ql;try{const a=crypto.getRandomValues(new Uint8Array(16)),i=Zf(a.buffer),s=await lI(a),c=await cI(r,s),d=crypto.getRandomValues(new Uint8Array(12)),m=await crypto.subtle.encrypt({name:"AES-GCM",iv:d},c,new TextEncoder().encode(e)),f=new Uint8Array(d.length+m.byteLength);f.set(d,0),f.set(new Uint8Array(m),d.length);const g=Zf(f.buffer);await Promise.all([Se.setItem(wh,!0),Se.setItem(xh,g),Se.setItem(Th,i),Se.setItem(Sh,r.length),Se.setItem(Eo,0)])}catch(a){throw a instanceof ql||console.error("[PinUnlockService] Failed to setup PIN:",a),a}}async function Xk(r){if(!kh(r))throw new ql;if(await oI())throw new Fu;try{const[e,a]=await Promise.all([Se.getItem(xh),Se.getItem(Th)]);if(!e||!a)throw new Fu;const i=new Uint8Array(zy(e)),s=i.slice(0,12),c=i.slice(12),d=new Uint8Array(zy(a)),m=await lI(d),f=await cI(r,m),g=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},f,c),E=new TextDecoder().decode(g);return await Se.setItem(Eo,0),E}catch{const a=await sI()+1;throw await Se.setItem(Eo,a),a>=Xf?(await Lh(),new Fu):new $f(Xf-a)}}async function Lh(){try{await Promise.all([Se.removeItem(wh),Se.removeItem(xh),Se.removeItem(Th),Se.removeItem(Sh),Se.removeItem(Eo)])}catch(r){throw console.error("[PinUnlockService] Failed to disable PIN:",r),r}}async function Hy(){try{await Se.setItem(Eo,0)}catch(r){console.error("[PinUnlockService] Failed to reset failed attempts:",r)}}async function $k(){const r=li.runtime.id,e=new TextEncoder().encode(r),a=await crypto.subtle.digest("SHA-256",e);return new Uint8Array(a)}async function lI(r){const e=await $k(),a=new Uint8Array(r.length+e.length);return a.set(r,0),a.set(e,r.length),a}async function cI(r,e){const a=Zf(e.buffer),i=await rI.hash({pass:r,salt:a,time:3,mem:65536,parallelism:1,hashLen:32,type:2});return await crypto.subtle.importKey("raw",i.hash,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}function Zf(r){const e=new Uint8Array(r);let a="";for(let i=0;i<e.byteLength;i++)a+=String.fromCharCode(e[i]);return btoa(a)}function zy(r){const e=atob(r),a=new Uint8Array(e.length);for(let i=0;i<e.length;i++)a[i]=e.charCodeAt(i);return a.buffer}const uI=I.createContext(void 0),Zk=({children:r})=>{const[e,a]=I.useState(!1),[i,s]=I.useState(null),[c,d]=I.useState(null),m=zt(),f=I.useCallback(async()=>{const x=await Se.getItem("local:accessToken"),T=await Se.getItem("local:refreshToken"),k=await Se.getItem("local:username");return a(!0),x&&T&&k?(s(k),!0):!1},[s]),g=I.useCallback(async(x,T,k)=>{await Se.setItem("local:username",x),await Se.setItem("local:accessToken",T),await Se.setItem("local:refreshToken",k),await Se.setItem(Ao,0),s(x)},[]),E=I.useCallback(async x=>{await ft("CLEAR_SESSION",{},"background"),m==null||m.clearDatabase();try{await Lh()}catch(T){console.error("Failed to remove PIN data:",T)}x&&d(x)},[m]),p=I.useCallback(async x=>{await E(x),await ft("CLEAR_VAULT_DATA",{},"background"),s(null)},[E]),N=I.useCallback(()=>{d(null)},[]),v=I.useMemo(()=>({isInitialized:e,username:i,initializeAuth:f,setAuthTokens:g,clearAuthUserInitiated:p,clearAuthForced:E,globalMessage:c,clearGlobalMessage:N}),[e,i,f,c,g,p,E,N]);return l.jsx(uI.Provider,{value:v,children:r})},Zl=()=>{const r=I.useContext(uI);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r};class e2{constructor(){Qe(this,"listeners",new Set)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(e){this.listeners.forEach(a=>{try{a(e)}catch(i){console.error("Error in logout listener:",i)}})}}const eh=new e2,ti=class ti{constructor(){}static isServerVersionSupported(e){return this.versionGreaterThanOrEqualTo(e,this.MIN_SERVER_VERSION)}static versionGreaterThanOrEqualTo(e,a){const[i,s]=e.split("-"),[c,d]=a.split("-"),m=i.split(".").map(Number),f=c.split(".").map(Number);for(let g=0;g<Math.max(m.length,f.length);g++){const E=m[g]??0,p=f[g]??0;if(E>p)return!0;if(E<p)return!1}return!s&&d?!0:s&&!d?!1:!s&&!d?!0:s>=d}};Qe(ti,"VERSION","0.26.2"),Qe(ti,"API_VERSION",ti.VERSION.split("-")[0]),Qe(ti,"MIN_SERVER_VERSION","0.12.0-dev"),Qe(ti,"CLIENT_NAME","firefox"),Qe(ti,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),Qe(ti,"DEFAULT_API_URL","https://app.aliasvault.net/api");let en=ti;class si extends Error{constructor(e){super(e),this.name="ApiAuthError"}}class dd extends Error{constructor(e="Network error",a){super(e),this.name="NetworkError",this.cause=a,Object.setPrototypeOf(this,dd.prototype)}}class t2{async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==en.DEFAULT_API_URL}async authFetch(e,a={},i=!0,s=!0){const c=new Headers(a.headers??{}),d=await this.getAccessToken();d&&c.set("Authorization",`Bearer ${d}`);const m={...a,headers:c};try{const f=await this.rawFetch(e,m);if(f.status===401){const g=await this.refreshAccessToken();if(g){c.set("Authorization",`Bearer ${g}`);const E=await this.rawFetch(e,{...m,headers:c});if(!E.ok)throw new si("Request failed after token refresh");return i?E.json():E}else throw eh.emit("auth.errors.sessionExpired"),new si("Session expired")}if(!f.ok&&s)throw new Error(`HTTP error! status: ${f.status}`);return i?f.json():f}catch(f){throw console.error("API request failed:",f),f}}async rawFetch(e,a={}){const s=await this.getBaseUrl()+e,c=new Headers(a.headers??{});c.set("X-AliasVault-Client",`${en.CLIENT_NAME}-${en.API_VERSION}`);const d={...a,headers:c};try{return await fetch(s,d)}catch(m){throw console.error("API request failed:",m),new dd(m instanceof Error?m.message:"Network request failed",m instanceof Error?m:void 0)}}async get(e){return this.authFetch(e,{method:"GET"})}async downloadBlob(e){try{const i=await(await this.authFetch(e,{method:"GET",headers:{Accept:"application/octet-stream"}},!1)).arrayBuffer();return new Uint8Array(i)}catch(a){throw console.error("Error downloading blob:",a),a}}async post(e,a,i=!0){return this.authFetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)},i)}async put(e,a){return this.authFetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}async delete(e){return this.authFetch(e,{method:"DELETE"},!1)}async revokeTokens(){try{const e=await this.getRefreshToken();e&&await this.post("Auth/revoke",{token:await this.getAccessToken(),refreshToken:e},!1)}catch(e){console.error("WebApi revoke tokens error:",e)}}async getStatus(){try{return await this.get("Auth/status")}catch(e){if(e instanceof si)throw e;return{clientVersionSupported:!0,serverVersion:"0.0.0",vaultRevision:0,srpSalt:""}}}validateStatusResponse(e){return e.clientVersionSupported?en.isServerVersionSupported(e.serverVersion)?null:"serverVersionNotSupported":"clientVersionNotSupported"}async refreshAccessToken(){const e=await this.getRefreshToken();if(!e)return null;try{const a=await this.rawFetch("Auth/refresh",{method:"POST",headers:{"Content-Type":"application/json","X-Ignore-Failure":"true"},body:JSON.stringify({token:await this.getAccessToken(),refreshToken:e})});if(!a.ok)throw new Error("Failed to refresh token");const i=await a.json();return this.updateTokens(i.token,i.refreshToken),i.token}catch{return eh.emit("auth.errors.sessionExpired"),null}}async getAccessToken(){return await Se.getItem("local:accessToken")??null}async getRefreshToken(){return await Se.getItem("local:refreshToken")??null}async updateTokens(e,a){await Se.setItem("local:accessToken",e),await Se.setItem("local:refreshToken",a)}async getApiUrl(){const e=await Se.getItem("local:apiUrl");return!e||e.length===0?en.DEFAULT_API_URL:e}}const dI=I.createContext(null),a2=({children:r})=>{const[e,a]=I.useState(null);return I.useEffect(()=>{const i=new t2;a(i)},[]),e?l.jsx(dI.Provider,{value:e,children:r}):null},ur=()=>{const r=I.useContext(dI);if(!r)throw new Error("useWebApi must be used within a WebApiProvider");return r},mI=I.createContext(void 0),n2=({children:r})=>{const e=Zl(),a=ur(),[i,s]=I.useState(!1),c=I.useRef(!1),{t:d}=Ze(),m=I.useCallback(async p=>{if(!c.current)try{c.current=!0,await a.revokeTokens(),await e.clearAuthForced(p)}catch(N){console.error("Error during logout:",N)}finally{c.current=!1,s(!1)}},[e,a]),f=I.useCallback(async()=>{const p=await e.initializeAuth();return s(p),p},[e]),g=I.useCallback(async(p,N,v)=>{await e.setAuthTokens(p,N,v),s(!0)},[e]);I.useEffect(()=>eh.subscribe(async N=>{await m(d(N))}),[m,d]),I.useEffect(()=>{f()},[f]);const E=I.useMemo(()=>({isInitialized:e.isInitialized,username:e.username,globalMessage:e.globalMessage,logout:m,initializeAuth:f,setAuthTokens:g,clearGlobalMessage:e.clearGlobalMessage,isLoggedIn:i}),[e.isInitialized,e.username,e.globalMessage,e.clearGlobalMessage,m,f,g,i]);return l.jsx(mI.Provider,{value:E,children:r})},dr=()=>{const r=I.useContext(mI);if(r===void 0)throw new Error("useApp must be used within an AppProvider");return r};class pa{static isPopup(){return new URLSearchParams(window.location.search).get("expanded")==="true"?!0:window.innerWidth>390}static getReturnPath(){return new URLSearchParams(window.location.search).get("returnTo")}static openInNewPopup(e,a){const c=window.screen.width/2-400,d=window.screen.height/2-1e3/2,m=e||window.location.hash.replace("#",""),f=new URLSearchParams;f.set("expanded","true"),a&&f.set("returnTo",a);const g=`popup.html?${f.toString()}#${m}`;window.open(g,"AliasVaultPopup",`width=800,height=1000,left=${c},top=${d},popup=true`),window.close()}}const r2=()=>{const{t:r}=Ze(),e=dr(),a=zt();return!e.isLoggedIn||!a.dbAvailable?null:a.isOffline?l.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-400 rounded-md text-xs font-medium",children:[l.jsxs("div",{className:"relative",children:[l.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 5.636a9 9 0 010 12.728m0 0l-2.829-2.829m2.829 2.829L21 21M15.536 8.464a5 5 0 010 7.072m0 0l-2.829-2.829m-4.243 2.829a4.978 4.978 0 01-1.414-2.83m-1.414 5.658a9 9 0 01-2.167-9.238m7.824 2.167a1 1 0 111.414 1.414m-1.414-1.414L3 3m8.293 8.293l1.414 1.414"})}),a.isDirty&&l.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-red-500 rounded-full"})]}),l.jsx("span",{children:r("common.offline")})]}):a.isSyncing?l.jsx("div",{title:r("common.syncingVault"),className:"flex items-center gap-1.5 px-2 py-1 bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 rounded-md text-xs font-medium",children:l.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}):a.isDirty?l.jsx("div",{title:r("common.pendingSync"),className:"flex items-center gap-1.5 px-2 py-1 bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 rounded-md text-xs font-medium",children:l.jsxs("div",{className:"relative",children:[l.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),l.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-blue-500 dark:bg-blue-400 rounded-full animate-pulse"})]})}):null},gI=({routes:r=[],rightButtons:e})=>{const{t:a}=Ze(),i=dr(),s=La(),c=Ka(),d=r==null?void 0:r.find(E=>{const p=E.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${p}$`).test(c.pathname)}),m=I.useCallback(()=>{const E=pa.getReturnPath();E&&pa.isPopup()&&window.history.length<=2?s(E):s(-1)},[s]),f=()=>{s("/auth-settings")},g=()=>{c.pathname==="/upgrade"||c.pathname==="/login"||c.pathname==="/unlock"||(i.isLoggedIn?s("/items"):s("/"))};return l.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-center h-16 px-4",children:[d!=null&&d.showBackButton?l.jsx("button",{id:"back",onClick:m,className:"flex items-center gap-2 hover:bg-gray-100 dark:hover:bg-gray-700 pr-2 pt-1.5 pb-1.5 rounded-lg group",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 text-gray-500 group-hover:text-gray-900 dark:text-gray-400 dark:group-hover:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),d.title&&l.jsx("h1",{className:"text-lg font-medium text-gray-900 dark:text-white ml-2",children:d.title})]})}):l.jsx("div",{className:"flex items-center",children:l.jsxs("button",{onClick:()=>g(),className:"flex items-center hover:opacity-80 transition-opacity",children:[l.jsx(tI,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),l.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),l.jsx("div",{className:"flex-grow"}),l.jsx(r2,{}),l.jsx("div",{className:"flex items-center gap-2",children:i.isLoggedIn?e:l.jsxs(l.Fragment,{children:[e,l.jsxs("button",{id:"settings",onClick:f,className:"p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700",children:[l.jsx("span",{className:"sr-only",children:a("common.settings")}),l.jsx("svg",{className:"w-5 h-5","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{fillRule:"evenodd",d:"M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z",clipRule:"evenodd"})})]})]})})]})})},i2=({routes:r,headerButtons:e,message:a,children:i})=>{const s=I.useRef(null),c=Ka();return I.useEffect(()=>{s.current&&(s.current.scrollTop=0)},[c.pathname]),l.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[l.jsx(ox,{}),l.jsx(gI,{routes:r,rightButtons:e}),l.jsx("main",{ref:s,className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"calc(100% - 120px)"},children:l.jsxs("div",{className:"px-4 pb-4 pt-2 mb-16",children:[a&&l.jsx("p",{className:"text-red-500 mb-4",children:a}),i||l.jsx(Qb,{children:r.map(d=>l.jsx(bh,{path:d.path,element:d.element},d.path))})]})}),l.jsx(lx,{})]})},s2=({children:r})=>l.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[l.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-center justify-center h-16 px-4",children:[l.jsx(tI,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),l.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),l.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px"},children:l.jsx("div",{className:"p-4",children:r})})]}),$n=()=>{const r={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},e=l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),l.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:r})]});return l.jsx("div",{className:"inline-flex items-center",children:e})},fI=I.createContext(void 0),o2=({children:r})=>{const[e,a]=I.useState(null),i=I.useCallback(c=>{a(c)},[]),s=I.useMemo(()=>({setHeaderButtons:i,headerButtons:e}),[i,e]);return l.jsx(fI.Provider,{value:s,children:r})},mr=()=>{const r=I.useContext(fI);if(r===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return r},l2=()=>{const{isLoading:r}=fa();if(!r)return null;const e={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},a=l.jsxs(l.Fragment,{children:[l.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),l.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:e})]});return l.jsx("div",{className:"fixed inset-0 w-full h-full z-50 bg-gray-200 dark:bg-gray-500 bg-opacity-90 flex items-center justify-center",children:l.jsx("div",{className:"relative",children:a})})},hI=I.createContext(void 0),c2=({children:r})=>{const[e,a]=I.useState(!0),[i,s]=I.useState(!1),[c,d]=I.useState(void 0),m=E=>{s(!0),d(E)},f=()=>{s(!1),d(void 0)},g=I.useMemo(()=>({isLoading:i,loadingMessage:c,showLoading:m,hideLoading:f,isInitialLoading:e,setIsInitialLoading:a}),[i,c,e]);return l.jsxs(hI.Provider,{value:g,children:[l.jsx(l2,{message:c}),r]})},fa=()=>{const r=I.useContext(hI);if(r===void 0)throw new Error("useLoading must be used within a LoadingProvider");return r},u2="session:lastVisitedPage",d2="session:lastVisitedTime",m2="session:navigationHistory",AI=I.createContext(void 0),g2=({children:r})=>{const e=Ka(),a=La(),{isInitialized:i,isLoggedIn:s}=dr(),{dbInitialized:c,dbAvailable:d}=zt(),m=i&&c,f=m&&(!s||!d),g=I.useCallback(async()=>{if(m&&!f&&!["/","/reinitialize","/login","/unlock","/unlock-success","/auth-settings","/upgrade","/passkeys/create","/passkeys/authenticate"].includes(e.pathname)){const N=e.pathname.split("/").filter(Boolean),v=[];let x="";for(let T=0;T<N.length;T++)x+="/"+N[T],v.push({pathname:x,search:e.search,hash:e.hash});await Promise.all([Se.setItem(u2,e.pathname),Se.setItem(d2,Date.now()),Se.setItem(m2,v)])}},[e,m,f]);I.useEffect(()=>{m&&g()},[e.pathname,e.search,e.hash,m,g]),I.useEffect(()=>{m&&!s&&a("/login",{replace:!0})},[m,s]);const E=I.useMemo(()=>({storeCurrentPage:g,isFullyInitialized:m,requiresAuth:f}),[g,m,f]);return l.jsx(AI.Provider,{value:E,children:r})},f2=()=>{const r=I.useContext(AI);if(r===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return r};var Wg,Qy;function h2(){if(Qy)return Wg;Qy=1;function r(L){this._maxSize=L,this.clear()}r.prototype.clear=function(){this._size=0,this._values=Object.create(null)},r.prototype.get=function(L){return this._values[L]},r.prototype.set=function(L,B){return this._size>=this._maxSize&&this.clear(),L in this._values||this._size++,this._values[L]=B};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,a=/^\d+$/,i=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,c=/^\s*(['"]?)(.*?)(\1)\s*$/,d=512,m=new r(d),f=new r(d),g=new r(d);Wg={Cache:r,split:p,normalizePath:E,setter:function(L){var B=E(L);return f.get(L)||f.set(L,function(O,M){for(var P=0,G=B.length,H=O;P<G-1;){var z=B[P];if(z==="__proto__"||z==="constructor"||z==="prototype")return O;H=H[B[P++]]}H[B[P]]=M})},getter:function(L,B){var S=E(L);return g.get(L)||g.set(L,function(M){for(var P=0,G=S.length;P<G;)if(M!=null||!B)M=M[S[P++]];else return;return M})},join:function(L){return L.reduce(function(B,S){return B+(v(S)||a.test(S)?"["+S+"]":(B?".":"")+S)},"")},forEach:function(L,B,S){N(Array.isArray(L)?L:p(L),B,S)}};function E(L){return m.get(L)||m.set(L,p(L).map(function(B){return B.replace(c,"$2")}))}function p(L){return L.match(e)||[""]}function N(L,B,S){var O=L.length,M,P,G,H;for(P=0;P<O;P++)M=L[P],M&&(k(M)&&(M='"'+M+'"'),H=v(M),G=!H&&/^\d+$/.test(M),B.call(S,M,H,G,P,L))}function v(L){return typeof L=="string"&&L&&["'",'"'].indexOf(L.charAt(0))!==-1}function x(L){return L.match(i)&&!L.match(a)}function T(L){return s.test(L)}function k(L){return!v(L)&&(x(L)||T(L))}return Wg}var Is=h2(),Yg,Vy;function A2(){if(Vy)return Yg;Vy=1;const r=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=E=>E.match(r)||[],a=E=>E[0].toUpperCase()+E.slice(1),i=(E,p)=>e(E).join(p).toLowerCase(),s=E=>e(E).reduce((p,N)=>`${p}${p?N[0].toUpperCase()+N.slice(1).toLowerCase():N.toLowerCase()}`,"");return Yg={words:e,upperFirst:a,camelCase:s,pascalCase:E=>a(s(E)),snakeCase:E=>i(E,"_"),kebabCase:E=>i(E,"-"),sentenceCase:E=>a(i(E," ")),titleCase:E=>e(E).map(a).join(" ")},Yg}var Jg=A2(),yu={exports:{}},Gy;function p2(){if(Gy)return yu.exports;Gy=1,yu.exports=function(s){return r(e(s),s)},yu.exports.array=r;function r(s,c){var d=s.length,m=new Array(d),f={},g=d,E=a(c),p=i(s);for(c.forEach(function(v){if(!p.has(v[0])||!p.has(v[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});g--;)f[g]||N(s[g],g,new Set);return m;function N(v,x,T){if(T.has(v)){var k;try{k=", node was:"+JSON.stringify(v)}catch{k=""}throw new Error("Cyclic dependency"+k)}if(!p.has(v))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(v));if(!f[x]){f[x]=!0;var L=E.get(v)||new Set;if(L=Array.from(L),x=L.length){T.add(v);do{var B=L[--x];N(B,p.get(B),T)}while(x);T.delete(v)}m[--d]=v}}}function e(s){for(var c=new Set,d=0,m=s.length;d<m;d++){var f=s[d];c.add(f[0]),c.add(f[1])}return Array.from(c)}function a(s){for(var c=new Map,d=0,m=s.length;d<m;d++){var f=s[d];c.has(f[0])||c.set(f[0],new Set),c.has(f[1])||c.set(f[1],new Set),c.get(f[0]).add(f[1])}return c}function i(s){for(var c=new Map,d=0,m=s.length;d<m;d++)c.set(s[d],d);return c}return yu.exports}var y2=p2();const E2=qi(y2),b2=Object.prototype.toString,I2=Error.prototype.toString,v2=RegExp.prototype.toString,C2=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",N2=/^Symbol\((.*)\)(.*)$/;function w2(r){return r!=+r?"NaN":r===0&&1/r<0?"-0":""+r}function Ky(r,e=!1){if(r==null||r===!0||r===!1)return""+r;const a=typeof r;if(a==="number")return w2(r);if(a==="string")return e?`"${r}"`:r;if(a==="function")return"[Function "+(r.name||"anonymous")+"]";if(a==="symbol")return C2.call(r).replace(N2,"Symbol($1)");const i=b2.call(r).slice(8,-1);return i==="Date"?isNaN(r.getTime())?""+r:r.toISOString(r):i==="Error"||r instanceof Error?"["+I2.call(r)+"]":i==="RegExp"?v2.call(r):null}function Ki(r,e){let a=Ky(r,e);return a!==null?a:JSON.stringify(r,function(i,s){let c=Ky(this[i],e);return c!==null?c:s},2)}function pI(r){return r==null?[]:[].concat(r)}let yI,EI,bI,x2=/\$\{\s*(\w+)\s*\}/g;yI=Symbol.toStringTag;class qy{constructor(e,a,i,s){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[yI]="Error",this.name="ValidationError",this.value=a,this.path=i,this.type=s,this.errors=[],this.inner=[],pI(e).forEach(c=>{if(ln.isError(c)){this.errors.push(...c.errors);const d=c.inner.length?c.inner:[c];this.inner.push(...d)}else this.errors.push(c)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}EI=Symbol.hasInstance;bI=Symbol.toStringTag;class ln extends Error{static formatError(e,a){const i=a.label||a.path||"this";return a=Object.assign({},a,{path:i,originalPath:a.path}),typeof e=="string"?e.replace(x2,(s,c)=>Ki(a[c])):typeof e=="function"?e(a):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,a,i,s,c){const d=new qy(e,a,i,s);if(c)return d;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[bI]="Error",this.name=d.name,this.message=d.message,this.type=d.type,this.value=d.value,this.path=d.path,this.errors=d.errors,this.inner=d.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ln)}static[EI](e){return qy[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let wr={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:r,type:e,value:a,originalValue:i})=>{const s=i!=null&&i!==a?` (cast from the value \`${Ki(i,!0)}\`).`:".";return e!=="mixed"?`${r} must be a \`${e}\` type, but the final value was: \`${Ki(a,!0)}\``+s:`${r} must match the configured type. The validated value was: \`${Ki(a,!0)}\``+s}},Cn={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},T2={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},th={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},S2={isValue:"${path} field must be ${value}"},Ou={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},k2={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},L2={notType:r=>{const{path:e,value:a,spec:i}=r,s=i.types.length;if(Array.isArray(a)){if(a.length<s)return`${e} tuple value has too few items, expected a length of ${s} but got ${a.length} for value: \`${Ki(a,!0)}\``;if(a.length>s)return`${e} tuple value has too many items, expected a length of ${s} but got ${a.length} for value: \`${Ki(a,!0)}\``}return ln.formatError(wr.notType,r)}};Object.assign(Object.create(null),{mixed:wr,string:Cn,number:T2,date:th,object:Ou,array:k2,boolean:S2,tuple:L2});const Rh=r=>r&&r.__isYupSchema__;class Ju{static fromOptions(e,a){if(!a.then&&!a.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:s,otherwise:c}=a,d=typeof i=="function"?i:(...m)=>m.every(f=>f===i);return new Ju(e,(m,f)=>{var g;let E=d(...m)?s:c;return(g=E==null?void 0:E(f))!=null?g:f})}constructor(e,a){this.fn=void 0,this.refs=e,this.refs=e,this.fn=a}resolve(e,a){let i=this.refs.map(c=>c.getValue(a==null?void 0:a.value,a==null?void 0:a.parent,a==null?void 0:a.context)),s=this.fn(i,e,a);if(s===void 0||s===e)return e;if(!Rh(s))throw new TypeError("conditions must return a schema object");return s.resolve(a)}}const Eu={context:"$",value:"."};class Ns{constructor(e,a={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Eu.context,this.isValue=this.key[0]===Eu.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?Eu.context:this.isValue?Eu.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&Is.getter(this.path,!0),this.map=a.map}getValue(e,a,i){let s=this.isContext?i:this.isValue?e:a;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(e,a){return this.getValue(e,a==null?void 0:a.parent,a==null?void 0:a.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Ns.prototype.__isYupRef=!0;const ys=r=>r==null;function lo(r){function e({value:a,path:i="",options:s,originalValue:c,schema:d},m,f){const{name:g,test:E,params:p,message:N,skipAbsent:v}=r;let{parent:x,context:T,abortEarly:k=d.spec.abortEarly,disableStackTrace:L=d.spec.disableStackTrace}=s;function B(K){return Ns.isRef(K)?K.getValue(a,x,T):K}function S(K={}){const $=Object.assign({value:a,originalValue:c,label:d.spec.label,path:K.path||i,spec:d.spec,disableStackTrace:K.disableStackTrace||L},p,K.params);for(const ne of Object.keys($))$[ne]=B($[ne]);const W=new ln(ln.formatError(K.message||N,$),a,$.path,K.type||g,$.disableStackTrace);return W.params=$,W}const O=k?m:f;let M={path:i,parent:x,type:g,from:s.from,createError:S,resolve:B,options:s,originalValue:c,schema:d};const P=K=>{ln.isError(K)?O(K):K?f(null):O(S())},G=K=>{ln.isError(K)?O(K):m(K)};if(v&&ys(a))return P(!0);let z;try{var V;if(z=E.call(M,a,M),typeof((V=z)==null?void 0:V.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${M.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(z).then(P,G)}}catch(K){G(K);return}P(z)}return e.OPTIONS=r,e}function R2(r,e,a,i=a){let s,c,d;return e?(Is.forEach(e,(m,f,g)=>{let E=f?m.slice(1,m.length-1):m;r=r.resolve({context:i,parent:s,value:a});let p=r.type==="tuple",N=g?parseInt(E,10):0;if(r.innerType||p){if(p&&!g)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${d}" must contain an index to the tuple element, e.g. "${d}[0]"`);if(a&&N>=a.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${m}, in the path: ${e}. because there is no value at that index. `);s=a,a=a&&a[N],r=p?r.spec.types[N]:r.innerType}if(!g){if(!r.fields||!r.fields[E])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${d} which is a type: "${r.type}")`);s=a,a=a&&a[E],r=r.fields[E]}c=E,d=f?"["+m+"]":"."+m}),{schema:r,parent:s,parentPath:c}):{parent:s,parentPath:e,schema:r}}class Xu extends Set{describe(){const e=[];for(const a of this.values())e.push(Ns.isRef(a)?a.describe():a);return e}resolveAll(e){let a=[];for(const i of this.values())a.push(e(i));return a}clone(){return new Xu(this.values())}merge(e,a){const i=this.clone();return e.forEach(s=>i.add(s)),a.forEach(s=>i.delete(s)),i}}function fo(r,e=new Map){if(Rh(r)||!r||typeof r!="object")return r;if(e.has(r))return e.get(r);let a;if(r instanceof Date)a=new Date(r.getTime()),e.set(r,a);else if(r instanceof RegExp)a=new RegExp(r),e.set(r,a);else if(Array.isArray(r)){a=new Array(r.length),e.set(r,a);for(let i=0;i<r.length;i++)a[i]=fo(r[i],e)}else if(r instanceof Map){a=new Map,e.set(r,a);for(const[i,s]of r.entries())a.set(i,fo(s,e))}else if(r instanceof Set){a=new Set,e.set(r,a);for(const i of r)a.add(fo(i,e))}else if(r instanceof Object){a={},e.set(r,a);for(const[i,s]of Object.entries(r))a[i]=fo(s,e)}else throw Error(`Unable to clone ${r}`);return a}class Lr{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Xu,this._blacklist=new Xu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(wr.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e==null?void 0:e.spec),this.withMutation(a=>{a.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const a=Object.create(Object.getPrototypeOf(this));return a.type=this.type,a._typeCheck=this._typeCheck,a._whitelist=this._whitelist.clone(),a._blacklist=this._blacklist.clone(),a.internalTests=Object.assign({},this.internalTests),a.exclusiveTests=Object.assign({},this.exclusiveTests),a.deps=[...this.deps],a.conditions=[...this.conditions],a.tests=[...this.tests],a.transforms=[...this.transforms],a.spec=fo(Object.assign({},this.spec,e)),a}label(e){let a=this.clone();return a.spec.label=e,a}meta(...e){if(e.length===0)return this.spec.meta;let a=this.clone();return a.spec.meta=Object.assign(a.spec.meta||{},e[0]),a}withMutation(e){let a=this._mutate;this._mutate=!0;let i=e(this);return this._mutate=a,i}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let a=this,i=e.clone();const s=Object.assign({},a.spec,i.spec);return i.spec=s,i.internalTests=Object.assign({},a.internalTests,i.internalTests),i._whitelist=a._whitelist.merge(e._whitelist,e._blacklist),i._blacklist=a._blacklist.merge(e._blacklist,e._whitelist),i.tests=a.tests,i.exclusiveTests=a.exclusiveTests,i.withMutation(c=>{e.tests.forEach(d=>{c.test(d.OPTIONS)})}),i.transforms=[...a.transforms,...i.transforms],i}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let a=this;if(a.conditions.length){let i=a.conditions;a=a.clone(),a.conditions=[],a=i.reduce((s,c)=>c.resolve(s,e),a),a=a.resolve(e)}return a}resolveOptions(e){var a,i,s,c;return Object.assign({},e,{from:e.from||[],strict:(a=e.strict)!=null?a:this.spec.strict,abortEarly:(i=e.abortEarly)!=null?i:this.spec.abortEarly,recursive:(s=e.recursive)!=null?s:this.spec.recursive,disableStackTrace:(c=e.disableStackTrace)!=null?c:this.spec.disableStackTrace})}cast(e,a={}){let i=this.resolve(Object.assign({value:e},a)),s=a.assert==="ignore-optionality",c=i._cast(e,a);if(a.assert!==!1&&!i.isType(c)){if(s&&ys(c))return c;let d=Ki(e),m=Ki(c);throw new TypeError(`The value of ${a.path||"field"} could not be cast to a value that satisfies the schema type: "${i.type}". 

attempted value: ${d} 
`+(m!==d?`result of cast: ${m}`:""))}return c}_cast(e,a){let i=e===void 0?e:this.transforms.reduce((s,c)=>c.call(this,s,e,this),e);return i===void 0&&(i=this.getDefault(a)),i}_validate(e,a={},i,s){let{path:c,originalValue:d=e,strict:m=this.spec.strict}=a,f=e;m||(f=this._cast(f,Object.assign({assert:!1},a)));let g=[];for(let E of Object.values(this.internalTests))E&&g.push(E);this.runTests({path:c,value:f,originalValue:d,options:a,tests:g},i,E=>{if(E.length)return s(E,f);this.runTests({path:c,value:f,originalValue:d,options:a,tests:this.tests},i,s)})}runTests(e,a,i){let s=!1,{tests:c,value:d,originalValue:m,path:f,options:g}=e,E=T=>{s||(s=!0,a(T,d))},p=T=>{s||(s=!0,i(T,d))},N=c.length,v=[];if(!N)return p([]);let x={value:d,originalValue:m,path:f,options:g,schema:this};for(let T=0;T<c.length;T++){const k=c[T];k(x,E,function(B){B&&(Array.isArray(B)?v.push(...B):v.push(B)),--N<=0&&p(v)})}}asNestedTest({key:e,index:a,parent:i,parentPath:s,originalParent:c,options:d}){const m=e??a;if(m==null)throw TypeError("Must include `key` or `index` for nested validations");const f=typeof m=="number";let g=i[m];const E=Object.assign({},d,{strict:!0,parent:i,value:g,originalValue:c[m],key:void 0,[f?"index":"key"]:m,path:f||m.includes(".")?`${s||""}[${f?m:`"${m}"`}]`:(s?`${s}.`:"")+e});return(p,N,v)=>this.resolve(E)._validate(g,E,N,v)}validate(e,a){var i;let s=this.resolve(Object.assign({},a,{value:e})),c=(i=a==null?void 0:a.disableStackTrace)!=null?i:s.spec.disableStackTrace;return new Promise((d,m)=>s._validate(e,a,(f,g)=>{ln.isError(f)&&(f.value=g),m(f)},(f,g)=>{f.length?m(new ln(f,g,void 0,void 0,c)):d(g)}))}validateSync(e,a){var i;let s=this.resolve(Object.assign({},a,{value:e})),c,d=(i=a==null?void 0:a.disableStackTrace)!=null?i:s.spec.disableStackTrace;return s._validate(e,Object.assign({},a,{sync:!0}),(m,f)=>{throw ln.isError(m)&&(m.value=f),m},(m,f)=>{if(m.length)throw new ln(m,e,void 0,void 0,d);c=f}),c}isValid(e,a){return this.validate(e,a).then(()=>!0,i=>{if(ln.isError(i))return!1;throw i})}isValidSync(e,a){try{return this.validateSync(e,a),!0}catch(i){if(ln.isError(i))return!1;throw i}}_getDefault(e){let a=this.spec.default;return a==null?a:typeof a=="function"?a.call(this,e):fo(a)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,a){const i=this.clone({nullable:e});return i.internalTests.nullable=lo({message:a,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),i}optionality(e,a){const i=this.clone({optional:e});return i.internalTests.optionality=lo({message:a,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(e=wr.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=wr.notNull){return this.nullability(!1,e)}required(e=wr.required){return this.clone().withMutation(a=>a.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let a=this.clone();return a.transforms.push(e),a}test(...e){let a;if(e.length===1?typeof e[0]=="function"?a={test:e[0]}:a=e[0]:e.length===2?a={name:e[0],test:e[1]}:a={name:e[0],message:e[1],test:e[2]},a.message===void 0&&(a.message=wr.default),typeof a.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),s=lo(a),c=a.exclusive||a.name&&i.exclusiveTests[a.name]===!0;if(a.exclusive&&!a.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return a.name&&(i.exclusiveTests[a.name]=!!a.exclusive),i.tests=i.tests.filter(d=>!(d.OPTIONS.name===a.name&&(c||d.OPTIONS.test===s.OPTIONS.test))),i.tests.push(s),i}when(e,a){!Array.isArray(e)&&typeof e!="string"&&(a=e,e=".");let i=this.clone(),s=pI(e).map(c=>new Ns(c));return s.forEach(c=>{c.isSibling&&i.deps.push(c.key)}),i.conditions.push(typeof a=="function"?new Ju(s,a):Ju.fromOptions(s,a)),i}typeError(e){let a=this.clone();return a.internalTests.typeError=lo({message:e,name:"typeError",skipAbsent:!0,test(i){return this.schema._typeCheck(i)?!0:this.createError({params:{type:this.schema.type}})}}),a}oneOf(e,a=wr.oneOf){let i=this.clone();return e.forEach(s=>{i._whitelist.add(s),i._blacklist.delete(s)}),i.internalTests.whiteList=lo({message:a,name:"oneOf",skipAbsent:!0,test(s){let c=this.schema._whitelist,d=c.resolveAll(this.resolve);return d.includes(s)?!0:this.createError({params:{values:Array.from(c).join(", "),resolved:d}})}}),i}notOneOf(e,a=wr.notOneOf){let i=this.clone();return e.forEach(s=>{i._blacklist.add(s),i._whitelist.delete(s)}),i.internalTests.blacklist=lo({message:a,name:"notOneOf",test(s){let c=this.schema._blacklist,d=c.resolveAll(this.resolve);return d.includes(s)?this.createError({params:{values:Array.from(c).join(", "),resolved:d}}):!0}}),i}strip(e=!0){let a=this.clone();return a.spec.strip=e,a}describe(e){const a=(e?this.resolve(e):this).clone(),{label:i,meta:s,optional:c,nullable:d}=a.spec;return{meta:s,label:i,optional:c,nullable:d,default:a.getDefault(e),type:a.type,oneOf:a._whitelist.describe(),notOneOf:a._blacklist.describe(),tests:a.tests.map(f=>({name:f.OPTIONS.name,params:f.OPTIONS.params})).filter((f,g,E)=>E.findIndex(p=>p.name===f.name)===g)}}}Lr.prototype.__isYupSchema__=!0;for(const r of["validate","validateSync"])Lr.prototype[`${r}At`]=function(e,a,i={}){const{parent:s,parentPath:c,schema:d}=R2(this,e,a,i.context);return d[r](s&&s[c],Object.assign({},i,{parent:s,path:e}))};for(const r of["equals","is"])Lr.prototype[r]=Lr.prototype.oneOf;for(const r of["not","nope"])Lr.prototype[r]=Lr.prototype.notOneOf;const D2=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function B2(r){const e=ah(r);if(!e)return Date.parse?Date.parse(r):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let a=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(a=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(a=0-a)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+a,e.second,e.millisecond)}function ah(r){var e,a;const i=D2.exec(r);return i?{year:Zr(i[1]),month:Zr(i[2],1)-1,day:Zr(i[3],1),hour:Zr(i[4]),minute:Zr(i[5]),second:Zr(i[6]),millisecond:i[7]?Zr(i[7].substring(0,3)):0,precision:(e=(a=i[7])==null?void 0:a.length)!=null?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:Zr(i[10]),minuteOffset:Zr(i[11])}:null}function Zr(r,e=0){return Number(r)||e}let U2=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,M2=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,_2=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,F2="^\\d{4}-\\d{2}-\\d{2}",O2="\\d{2}:\\d{2}:\\d{2}",j2="(([+-]\\d{2}(:?\\d{2})?)|Z)",P2=new RegExp(`${F2}T${O2}(\\.\\d+)?${j2}$`),H2=r=>ys(r)||r===r.trim(),z2={}.toString();function nh(){return new II}class II extends Lr{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,a,i)=>{if(!i.spec.coerce||i.isType(e)||Array.isArray(e))return e;const s=e!=null&&e.toString?e.toString():e;return s===z2?e:s})})}required(e){return super.required(e).withMutation(a=>a.test({message:e||wr.required,name:"required",skipAbsent:!0,test:i=>!!i.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(a=>a.OPTIONS.name!=="required"),e))}length(e,a=Cn.length){return this.test({message:a,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(i){return i.length===this.resolve(e)}})}min(e,a=Cn.min){return this.test({message:a,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i.length>=this.resolve(e)}})}max(e,a=Cn.max){return this.test({name:"max",exclusive:!0,message:a,params:{max:e},skipAbsent:!0,test(i){return i.length<=this.resolve(e)}})}matches(e,a){let i=!1,s,c;return a&&(typeof a=="object"?{excludeEmptyString:i=!1,message:s,name:c}=a:s=a),this.test({name:c||"matches",message:s||Cn.matches,params:{regex:e},skipAbsent:!0,test:d=>d===""&&i||d.search(e)!==-1})}email(e=Cn.email){return this.matches(U2,{name:"email",message:e,excludeEmptyString:!0})}url(e=Cn.url){return this.matches(M2,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Cn.uuid){return this.matches(_2,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let a="",i,s;return e&&(typeof e=="object"?{message:a="",allowOffset:i=!1,precision:s=void 0}=e:a=e),this.matches(P2,{name:"datetime",message:a||Cn.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:a||Cn.datetime_offset,params:{allowOffset:i},skipAbsent:!0,test:c=>{if(!c||i)return!0;const d=ah(c);return d?!!d.z:!1}}).test({name:"datetime_precision",message:a||Cn.datetime_precision,params:{precision:s},skipAbsent:!0,test:c=>{if(!c||s==null)return!0;const d=ah(c);return d?d.precision===s:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Cn.trim){return this.transform(a=>a!=null?a.trim():a).test({message:e,name:"trim",test:H2})}lowercase(e=Cn.lowercase){return this.transform(a=>ys(a)?a:a.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:a=>ys(a)||a===a.toLowerCase()})}uppercase(e=Cn.uppercase){return this.transform(a=>ys(a)?a:a.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:a=>ys(a)||a===a.toUpperCase()})}}nh.prototype=II.prototype;let Q2=new Date(""),V2=r=>Object.prototype.toString.call(r)==="[object Date]";class Dh extends Lr{constructor(){super({type:"date",check(e){return V2(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,a,i)=>!i.spec.coerce||i.isType(e)||e===null?e:(e=B2(e),isNaN(e)?Dh.INVALID_DATE:new Date(e)))})}prepareParam(e,a){let i;if(Ns.isRef(e))i=e;else{let s=this.cast(e);if(!this._typeCheck(s))throw new TypeError(`\`${a}\` must be a Date or a value that can be \`cast()\` to a Date`);i=s}return i}min(e,a=th.min){let i=this.prepareParam(e,"min");return this.test({message:a,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(i)}})}max(e,a=th.max){let i=this.prepareParam(e,"max");return this.test({message:a,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(i)}})}}Dh.INVALID_DATE=Q2;function G2(r,e=[]){let a=[],i=new Set,s=new Set(e.map(([d,m])=>`${d}-${m}`));function c(d,m){let f=Is.split(d)[0];i.add(f),s.has(`${m}-${f}`)||a.push([m,f])}for(const d of Object.keys(r)){let m=r[d];i.add(d),Ns.isRef(m)&&m.isSibling?c(m.path,d):Rh(m)&&"deps"in m&&m.deps.forEach(f=>c(f,d))}return E2.array(Array.from(i),a).reverse()}function Wy(r,e){let a=1/0;return r.some((i,s)=>{var c;if((c=e.path)!=null&&c.includes(i))return a=s,!0}),a}function vI(r){return(e,a)=>Wy(r,e)-Wy(r,a)}const K2=(r,e,a)=>{if(typeof r!="string")return r;let i=r;try{i=JSON.parse(r)}catch{}return a.isType(i)?i:r};function ju(r){if("fields"in r){const e={};for(const[a,i]of Object.entries(r.fields))e[a]=ju(i);return r.setFields(e)}if(r.type==="array"){const e=r.optional();return e.innerType&&(e.innerType=ju(e.innerType)),e}return r.type==="tuple"?r.optional().clone({types:r.spec.types.map(ju)}):"optional"in r?r.optional():r}const q2=(r,e)=>{const a=[...Is.normalizePath(e)];if(a.length===1)return a[0]in r;let i=a.pop(),s=Is.getter(Is.join(a),!0)(r);return!!(s&&i in s)};let Yy=r=>Object.prototype.toString.call(r)==="[object Object]";function Jy(r,e){let a=Object.keys(r.fields);return Object.keys(e).filter(i=>a.indexOf(i)===-1)}const W2=vI([]);function CI(r){return new NI(r)}class NI extends Lr{constructor(e){super({type:"object",check(a){return Yy(a)||typeof a=="function"}}),this.fields=Object.create(null),this._sortErrors=W2,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,a={}){var i;let s=super._cast(e,a);if(s===void 0)return this.getDefault(a);if(!this._typeCheck(s))return s;let c=this.fields,d=(i=a.stripUnknown)!=null?i:this.spec.noUnknown,m=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),f={},g=Object.assign({},a,{parent:f,__validating:a.__validating||!1}),E=!1;for(const p of m){let N=c[p],v=p in s;if(N){let x,T=s[p];g.path=(a.path?`${a.path}.`:"")+p,N=N.resolve({value:T,context:a.context,parent:f});let k=N instanceof Lr?N.spec:void 0,L=k==null?void 0:k.strict;if(k!=null&&k.strip){E=E||p in s;continue}x=!a.__validating||!L?N.cast(s[p],g):s[p],x!==void 0&&(f[p]=x)}else v&&!d&&(f[p]=s[p]);(v!==p in f||f[p]!==s[p])&&(E=!0)}return E?f:s}_validate(e,a={},i,s){let{from:c=[],originalValue:d=e,recursive:m=this.spec.recursive}=a;a.from=[{schema:this,value:d},...c],a.__validating=!0,a.originalValue=d,super._validate(e,a,i,(f,g)=>{if(!m||!Yy(g)){s(f,g);return}d=d||g;let E=[];for(let p of this._nodes){let N=this.fields[p];!N||Ns.isRef(N)||E.push(N.asNestedTest({options:a,key:p,parent:g,parentPath:a.path,originalParent:d}))}this.runTests({tests:E,value:g,originalValue:d,options:a},i,p=>{s(p.sort(this._sortErrors).concat(f),g)})})}clone(e){const a=super.clone(e);return a.fields=Object.assign({},this.fields),a._nodes=this._nodes,a._excludedEdges=this._excludedEdges,a._sortErrors=this._sortErrors,a}concat(e){let a=super.concat(e),i=a.fields;for(let[s,c]of Object.entries(this.fields)){const d=i[s];i[s]=d===void 0?c:d}return a.withMutation(s=>s.setFields(i,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let a={};return this._nodes.forEach(i=>{var s;const c=this.fields[i];let d=e;(s=d)!=null&&s.value&&(d=Object.assign({},d,{parent:d.value,value:d.value[i]})),a[i]=c&&"getDefault"in c?c.getDefault(d):void 0}),a}setFields(e,a){let i=this.clone();return i.fields=e,i._nodes=G2(e,a),i._sortErrors=vI(Object.keys(e)),a&&(i._excludedEdges=a),i}shape(e,a=[]){return this.clone().withMutation(i=>{let s=i._excludedEdges;return a.length&&(Array.isArray(a[0])||(a=[a]),s=[...i._excludedEdges,...a]),i.setFields(Object.assign(i.fields,e),s)})}partial(){const e={};for(const[a,i]of Object.entries(this.fields))e[a]="optional"in i&&i.optional instanceof Function?i.optional():i;return this.setFields(e)}deepPartial(){return ju(this)}pick(e){const a={};for(const i of e)this.fields[i]&&(a[i]=this.fields[i]);return this.setFields(a,this._excludedEdges.filter(([i,s])=>e.includes(i)&&e.includes(s)))}omit(e){const a=[];for(const i of Object.keys(this.fields))e.includes(i)||a.push(i);return this.pick(a)}from(e,a,i){let s=Is.getter(e,!0);return this.transform(c=>{if(!c)return c;let d=c;return q2(c,e)&&(d=Object.assign({},c),i||delete d[e],d[a]=s(c)),d})}json(){return this.transform(K2)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Ou.exact,test(a){if(a==null)return!0;const i=Jy(this.schema,a);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,a=Ou.noUnknown){typeof e!="boolean"&&(a=e,e=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:a,test(s){if(s==null)return!0;const c=Jy(this.schema,s);return!e||c.length===0||this.createError({params:{unknown:c.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(e=!0,a=Ou.noUnknown){return this.noUnknown(!e,a)}transformKeys(e){return this.transform(a=>{if(!a)return a;const i={};for(const s of Object.keys(a))i[e(s)]=a[s];return i})}camelCase(){return this.transformKeys(Jg.camelCase)}snakeCase(){return this.transformKeys(Jg.snakeCase)}constantCase(){return this.transformKeys(e=>Jg.snakeCase(e).toUpperCase())}describe(e){const a=(e?this.resolve(e):this).clone(),i=super.describe(e);i.fields={};for(const[c,d]of Object.entries(a.fields)){var s;let m=e;(s=m)!=null&&s.value&&(m=Object.assign({},m,{parent:m.value,value:m.value[c]})),i.fields[c]=d.describe(m)}return i}}CI.prototype=NI.prototype;const wI=({variant:r="dropdown",size:e="md"})=>{const{i18n:a}=Ze(),[i,s]=I.useState(!1),c=I.useRef(null),d=Rk(a.language)||jl[0];I.useEffect(()=>{const f=g=>{c.current&&!c.current.contains(g.target)&&s(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]);const m=async f=>{await a.changeLanguage(f),await Se.setItem("local:language",f),s(!1),a.emit("languageChanged",f)};return r==="buttons"?l.jsx("div",{className:"flex space-x-2",children:jl.map(f=>l.jsxs("button",{onClick:()=>m(f.code),className:`flex items-center space-x-1 px-2 py-1 text-xs rounded transition-colors ${a.language===f.code?"bg-primary-500 text-white":"bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-500"}`,title:f.nativeName,children:[l.jsx("span",{className:"text-sm",children:f.flag}),l.jsx("span",{children:f.code.toUpperCase()})]},f.code))}):l.jsxs("div",{className:"relative",ref:c,children:[l.jsxs("button",{onClick:()=>s(!i),className:`w-full flex items-center justify-between px-3 py-1.5 rounded-lg border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors ${e==="sm"?"text-sm":"text-base"}`,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{className:"text-lg",children:d.flag}),l.jsx("span",{children:d.nativeName})]}),l.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${i?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),i&&l.jsx("div",{className:"absolute top-full left-0 mt-1 w-full bg-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg z-50",children:jl.map(f=>l.jsxs("button",{onClick:()=>m(f.code),className:`w-full flex items-center justify-between px-3 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-600 transition-colors first:rounded-t-lg last:rounded-b-lg ${e==="sm"?"text-sm":"text-base"}`,children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("span",{className:"text-lg",children:f.flag}),l.jsx("span",{className:"text-gray-700 dark:text-gray-200",children:f.nativeName})]}),a.language===f.code&&l.jsx("svg",{className:"w-4 h-4 text-primary-500",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},f.code))})]})},Xg=[{label:"Aliasvault.net",value:en.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],Y2=r=>CI().shape({apiUrl:nh().required(r("settings.validation.apiUrlRequired")).test("is-valid-api-url",r("settings.validation.apiUrlInvalid"),e=>{if(!e)return!0;try{const a=new URL(e);return a.protocol==="http:"||a.protocol==="https:"}catch{return!1}}),clientUrl:nh().required(r("settings.validation.clientUrlRequired")).test("is-valid-client-url",r("settings.validation.clientUrlInvalid"),e=>{if(!e)return!0;try{const a=new URL(e);return a.protocol==="http:"||a.protocol==="https:"}catch{return!1}})}),J2=()=>{const{t:r}=Ze(),[e,a]=I.useState(""),[i,s]=I.useState(""),[c,d]=I.useState(""),[m,f]=I.useState(!0),[g,E]=I.useState({}),{setIsInitialLoading:p}=fa(),N=Y2(r),v=I.useRef(null),x=I.useRef(null),T=I.useRef(null),k=I.useRef(null);I.useEffect(()=>()=>{if(v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current),T.current!==null){const M=T.current;Se.setItem("local:apiUrl",M)}if(k.current!==null){const M=k.current;Se.setItem("local:clientUrl",M)}},[]),I.useEffect(()=>{(async()=>{const P=await Se.getItem("local:apiUrl"),G=await Se.getItem("local:clientUrl"),H=await Se.getItem(Wu)!==!1,z=await Se.getItem(Ao);f(z?!1:H);const V=Xg.find(K=>K.value===P);V?a(V.value):P?(a("custom"),s(P),d(G??"")):a(Xg[0].value),p(!1)})()},[p]);const L=async M=>{const P=M.target.value;a(P),P!=="custom"&&(await Se.setItem("local:apiUrl",""),await Se.setItem("local:clientUrl",""),s(""),d(""),E({}))},B=I.useCallback(M=>{const P=M.target.value;s(P),T.current=P,v.current&&clearTimeout(v.current),v.current=setTimeout(async()=>{try{await N.validateAt("apiUrl",{apiUrl:P}),E(G=>({...G,apiUrl:void 0})),await Se.setItem("local:apiUrl",P),T.current=null}catch(G){G instanceof ln&&(E(H=>({...H,apiUrl:G.message})),await Se.setItem("local:apiUrl",en.DEFAULT_API_URL),await Se.setItem("local:clientUrl",en.DEFAULT_CLIENT_URL),T.current=null)}},150)},[N]),S=I.useCallback(M=>{const P=M.target.value;d(P),k.current=P,x.current&&clearTimeout(x.current),x.current=setTimeout(async()=>{try{await N.validateAt("clientUrl",{clientUrl:P}),E(G=>({...G,clientUrl:void 0})),await Se.setItem("local:clientUrl",P),k.current=null}catch(G){G instanceof ln&&(E(H=>({...H,clientUrl:G.message})),k.current=null)}},150)},[N]),O=async()=>{const M=!m;await Se.setItem(Wu,M),M&&(await Se.setItem(Mu,[]),await Se.setItem(Ao,0)),f(M)};return l.jsxs("div",{className:"p-4 space-y-6",children:[l.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:r("settings.serverConfiguration","Server Configuration")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r("settings.serverConfigurationDescription","Configure the AliasVault server URL for self-hosted instances")})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"api-connection",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:r("settings.serverUrl")}),l.jsx("select",{id:"api-connection",value:e,onChange:L,className:"w-full bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white",children:Xg.map(M=>l.jsx("option",{value:M.value,children:M.label},M.value))})]}),e==="custom"&&l.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary-500",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"custom-api-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:r("settings.customApiUrl","API URL")}),l.jsx("input",{id:"custom-api-url",type:"text",value:i,onChange:B,placeholder:"https://vault.example.com/api",className:`w-full bg-gray-50 border ${g.apiUrl?"border-red-500":"border-gray-300"} text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white`}),g.apiUrl&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.apiUrl}),l.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:r("settings.apiUrlHint","The API endpoint URL (usually client URL + /api)")})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"custom-client-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:r("settings.customClientUrl","Client URL")}),l.jsx("input",{id:"custom-client-url",type:"text",value:c,onChange:S,placeholder:"https://vault.example.com",className:`w-full bg-gray-50 border ${g.clientUrl?"border-red-500":"border-gray-300"} text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white`}),g.clientUrl&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.clientUrl}),l.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:r("settings.clientUrlHint","The web interface URL of your self-hosted instance")})]})]})]}),l.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:r("settings.autofillSettings","Autofill Settings")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r("settings.autofillSettingsDescription","Enable or disable the autofill popup on web pages")})]}),l.jsxs("div",{className:"flex items-center justify-between gap-4",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:r("settings.autofillEnabled")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:m?r("settings.autofillEnabledDescription","Autofill suggestions will appear on login forms"):r("settings.autofillDisabledDescription","Autofill suggestions are disabled globally")})]}),l.jsx("button",{onClick:O,className:`px-4 py-2 rounded-md transition-colors font-medium text-sm ${m?"bg-green-200 text-green-800 hover:bg-green-300 dark:bg-green-900/30 dark:text-green-400 dark:hover:bg-green-900/50":"bg-red-200 text-red-800 hover:bg-red-300 dark:bg-red-900/30 dark:text-red-400 dark:hover:bg-red-900/50"}`,children:m?r("common.enabled","Enabled"):r("common.disabled","Disabled")})]})]}),l.jsxs("div",{className:"space-y-4 pb-6",children:[l.jsx("div",{children:l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:r("settings.languageSettings","Language")})}),l.jsx("div",{children:l.jsx(wI,{variant:"dropdown",size:"sm"})})]}),l.jsxs("div",{className:"text-center text-xs text-gray-400 dark:text-gray-600 pt-4 border-t border-gray-200 dark:border-gray-700",children:[r("settings.version"),": ",en.VERSION]})]})},Aa=I.forwardRef(({onClick:r,id:e,children:a,type:i="button",variant:s="primary"},c)=>{const d={primary:"bg-primary-500 hover:bg-primary-600",secondary:"bg-gray-500 hover:bg-gray-600"};return l.jsx("button",{ref:c,className:`${d[s]} text-white font-medium rounded-lg px-4 py-2 text-sm w-full`,onClick:r,type:i,id:e,children:a})});Aa.displayName="Button";var co={},$g,Xy;function X2(){return Xy||(Xy=1,$g=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),$g}var Zg={},ji={},$y;function ws(){if($y)return ji;$y=1;let r;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return ji.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},ji.getSymbolTotalCodewords=function(i){return e[i]},ji.getBCHDigit=function(a){let i=0;for(;a!==0;)i++,a>>>=1;return i},ji.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},ji.isKanjiModeEnabled=function(){return typeof r<"u"},ji.toSJIS=function(i){return r(i)},ji}var ef={},Zy;function Bh(){return Zy||(Zy=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(a){if(typeof a!="string")throw new Error("Param is not a string");switch(a.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+a)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,s){if(r.isValid(i))return i;try{return e(i)}catch{return s}}}(ef)),ef}var tf,eE;function $2(){if(eE)return tf;eE=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(e){const a=Math.floor(e/8);return(this.buffer[a]>>>7-e%8&1)===1},put:function(e,a){for(let i=0;i<a;i++)this.putBit((e>>>a-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const a=Math.floor(this.length/8);this.buffer.length<=a&&this.buffer.push(0),e&&(this.buffer[a]|=128>>>this.length%8),this.length++}},tf=r,tf}var af,tE;function Z2(){if(tE)return af;tE=1;function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return r.prototype.set=function(e,a,i,s){const c=e*this.size+a;this.data[c]=i,s&&(this.reservedBit[c]=!0)},r.prototype.get=function(e,a){return this.data[e*this.size+a]},r.prototype.xor=function(e,a,i){this.data[e*this.size+a]^=i},r.prototype.isReserved=function(e,a){return this.reservedBit[e*this.size+a]},af=r,af}var nf={},aE;function eL(){return aE||(aE=1,function(r){const e=ws().getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const s=Math.floor(i/7)+2,c=e(i),d=c===145?26:Math.ceil((c-13)/(2*s-2))*2,m=[c-7];for(let f=1;f<s-1;f++)m[f]=m[f-1]-d;return m.push(6),m.reverse()},r.getPositions=function(i){const s=[],c=r.getRowColCoords(i),d=c.length;for(let m=0;m<d;m++)for(let f=0;f<d;f++)m===0&&f===0||m===0&&f===d-1||m===d-1&&f===0||s.push([c[m],c[f]]);return s}}(nf)),nf}var rf={},nE;function tL(){if(nE)return rf;nE=1;const r=ws().getSymbolSize,e=7;return rf.getPositions=function(i){const s=r(i);return[[0,0],[s-e,0],[0,s-e]]},rf}var sf={},rE;function aL(){return rE||(rE=1,function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};r.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},r.from=function(s){return r.isValid(s)?parseInt(s,10):void 0},r.getPenaltyN1=function(s){const c=s.size;let d=0,m=0,f=0,g=null,E=null;for(let p=0;p<c;p++){m=f=0,g=E=null;for(let N=0;N<c;N++){let v=s.get(p,N);v===g?m++:(m>=5&&(d+=e.N1+(m-5)),g=v,m=1),v=s.get(N,p),v===E?f++:(f>=5&&(d+=e.N1+(f-5)),E=v,f=1)}m>=5&&(d+=e.N1+(m-5)),f>=5&&(d+=e.N1+(f-5))}return d},r.getPenaltyN2=function(s){const c=s.size;let d=0;for(let m=0;m<c-1;m++)for(let f=0;f<c-1;f++){const g=s.get(m,f)+s.get(m,f+1)+s.get(m+1,f)+s.get(m+1,f+1);(g===4||g===0)&&d++}return d*e.N2},r.getPenaltyN3=function(s){const c=s.size;let d=0,m=0,f=0;for(let g=0;g<c;g++){m=f=0;for(let E=0;E<c;E++)m=m<<1&2047|s.get(g,E),E>=10&&(m===1488||m===93)&&d++,f=f<<1&2047|s.get(E,g),E>=10&&(f===1488||f===93)&&d++}return d*e.N3},r.getPenaltyN4=function(s){let c=0;const d=s.data.length;for(let f=0;f<d;f++)c+=s.data[f];return Math.abs(Math.ceil(c*100/d/5)-10)*e.N4};function a(i,s,c){switch(i){case r.Patterns.PATTERN000:return(s+c)%2===0;case r.Patterns.PATTERN001:return s%2===0;case r.Patterns.PATTERN010:return c%3===0;case r.Patterns.PATTERN011:return(s+c)%3===0;case r.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(c/3))%2===0;case r.Patterns.PATTERN101:return s*c%2+s*c%3===0;case r.Patterns.PATTERN110:return(s*c%2+s*c%3)%2===0;case r.Patterns.PATTERN111:return(s*c%3+(s+c)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}r.applyMask=function(s,c){const d=c.size;for(let m=0;m<d;m++)for(let f=0;f<d;f++)c.isReserved(f,m)||c.xor(f,m,a(s,f,m))},r.getBestMask=function(s,c){const d=Object.keys(r.Patterns).length;let m=0,f=1/0;for(let g=0;g<d;g++){c(g),r.applyMask(g,s);const E=r.getPenaltyN1(s)+r.getPenaltyN2(s)+r.getPenaltyN3(s)+r.getPenaltyN4(s);r.applyMask(g,s),E<f&&(f=E,m=g)}return m}}(sf)),sf}var bu={},iE;function xI(){if(iE)return bu;iE=1;const r=Bh(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],a=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return bu.getBlocksCount=function(s,c){switch(c){case r.L:return e[(s-1)*4+0];case r.M:return e[(s-1)*4+1];case r.Q:return e[(s-1)*4+2];case r.H:return e[(s-1)*4+3];default:return}},bu.getTotalCodewordsCount=function(s,c){switch(c){case r.L:return a[(s-1)*4+0];case r.M:return a[(s-1)*4+1];case r.Q:return a[(s-1)*4+2];case r.H:return a[(s-1)*4+3];default:return}},bu}var of={},wl={},sE;function nL(){if(sE)return wl;sE=1;const r=new Uint8Array(512),e=new Uint8Array(256);return function(){let i=1;for(let s=0;s<255;s++)r[s]=i,e[i]=s,i<<=1,i&256&&(i^=285);for(let s=255;s<512;s++)r[s]=r[s-255]}(),wl.log=function(i){if(i<1)throw new Error("log("+i+")");return e[i]},wl.exp=function(i){return r[i]},wl.mul=function(i,s){return i===0||s===0?0:r[e[i]+e[s]]},wl}var oE;function rL(){return oE||(oE=1,function(r){const e=nL();r.mul=function(i,s){const c=new Uint8Array(i.length+s.length-1);for(let d=0;d<i.length;d++)for(let m=0;m<s.length;m++)c[d+m]^=e.mul(i[d],s[m]);return c},r.mod=function(i,s){let c=new Uint8Array(i);for(;c.length-s.length>=0;){const d=c[0];for(let f=0;f<s.length;f++)c[f]^=e.mul(s[f],d);let m=0;for(;m<c.length&&c[m]===0;)m++;c=c.slice(m)}return c},r.generateECPolynomial=function(i){let s=new Uint8Array([1]);for(let c=0;c<i;c++)s=r.mul(s,new Uint8Array([1,e.exp(c)]));return s}}(of)),of}var lf,lE;function iL(){if(lE)return lf;lE=1;const r=rL();function e(a){this.genPoly=void 0,this.degree=a,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(i){this.degree=i,this.genPoly=r.generateECPolynomial(this.degree)},e.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const s=new Uint8Array(i.length+this.degree);s.set(i);const c=r.mod(s,this.genPoly),d=this.degree-c.length;if(d>0){const m=new Uint8Array(this.degree);return m.set(c,d),m}return c},lf=e,lf}var cf={},uf={},df={},cE;function TI(){return cE||(cE=1,df.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),df}var Ir={},uE;function SI(){if(uE)return Ir;uE=1;const r="[0-9]+",e="[A-Z $%*+\\-./:]+";let a="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";a=a.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+a+`)(?:.|[\r
]))+`;Ir.KANJI=new RegExp(a,"g"),Ir.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ir.BYTE=new RegExp(i,"g"),Ir.NUMERIC=new RegExp(r,"g"),Ir.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+a+"$"),c=new RegExp("^"+r+"$"),d=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ir.testKanji=function(f){return s.test(f)},Ir.testNumeric=function(f){return c.test(f)},Ir.testAlphanumeric=function(f){return d.test(f)},Ir}var dE;function xs(){return dE||(dE=1,function(r){const e=TI(),a=SI();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(c,d){if(!c.ccBits)throw new Error("Invalid mode: "+c);if(!e.isValid(d))throw new Error("Invalid version: "+d);return d>=1&&d<10?c.ccBits[0]:d<27?c.ccBits[1]:c.ccBits[2]},r.getBestModeForData=function(c){return a.testNumeric(c)?r.NUMERIC:a.testAlphanumeric(c)?r.ALPHANUMERIC:a.testKanji(c)?r.KANJI:r.BYTE},r.toString=function(c){if(c&&c.id)return c.id;throw new Error("Invalid mode")},r.isValid=function(c){return c&&c.bit&&c.ccBits};function i(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+s)}}r.from=function(c,d){if(r.isValid(c))return c;try{return i(c)}catch{return d}}}(uf)),uf}var mE;function sL(){return mE||(mE=1,function(r){const e=ws(),a=xI(),i=Bh(),s=xs(),c=TI(),d=7973,m=e.getBCHDigit(d);function f(N,v,x){for(let T=1;T<=40;T++)if(v<=r.getCapacity(T,x,N))return T}function g(N,v){return s.getCharCountIndicator(N,v)+4}function E(N,v){let x=0;return N.forEach(function(T){const k=g(T.mode,v);x+=k+T.getBitsLength()}),x}function p(N,v){for(let x=1;x<=40;x++)if(E(N,x)<=r.getCapacity(x,v,s.MIXED))return x}r.from=function(v,x){return c.isValid(v)?parseInt(v,10):x},r.getCapacity=function(v,x,T){if(!c.isValid(v))throw new Error("Invalid QR Code version");typeof T>"u"&&(T=s.BYTE);const k=e.getSymbolTotalCodewords(v),L=a.getTotalCodewordsCount(v,x),B=(k-L)*8;if(T===s.MIXED)return B;const S=B-g(T,v);switch(T){case s.NUMERIC:return Math.floor(S/10*3);case s.ALPHANUMERIC:return Math.floor(S/11*2);case s.KANJI:return Math.floor(S/13);case s.BYTE:default:return Math.floor(S/8)}},r.getBestVersionForData=function(v,x){let T;const k=i.from(x,i.M);if(Array.isArray(v)){if(v.length>1)return p(v,k);if(v.length===0)return 1;T=v[0]}else T=v;return f(T.mode,T.getLength(),k)},r.getEncodedBits=function(v){if(!c.isValid(v)||v<7)throw new Error("Invalid QR Code version");let x=v<<12;for(;e.getBCHDigit(x)-m>=0;)x^=d<<e.getBCHDigit(x)-m;return v<<12|x}}(cf)),cf}var mf={},gE;function oL(){if(gE)return mf;gE=1;const r=ws(),e=1335,a=21522,i=r.getBCHDigit(e);return mf.getEncodedBits=function(c,d){const m=c.bit<<3|d;let f=m<<10;for(;r.getBCHDigit(f)-i>=0;)f^=e<<r.getBCHDigit(f)-i;return(m<<10|f)^a},mf}var gf={},ff,fE;function lL(){if(fE)return ff;fE=1;const r=xs();function e(a){this.mode=r.NUMERIC,this.data=a.toString()}return e.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(i){let s,c,d;for(s=0;s+3<=this.data.length;s+=3)c=this.data.substr(s,3),d=parseInt(c,10),i.put(d,10);const m=this.data.length-s;m>0&&(c=this.data.substr(s),d=parseInt(c,10),i.put(d,m*3+1))},ff=e,ff}var hf,hE;function cL(){if(hE)return hf;hE=1;const r=xs(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function a(i){this.mode=r.ALPHANUMERIC,this.data=i}return a.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(s){let c;for(c=0;c+2<=this.data.length;c+=2){let d=e.indexOf(this.data[c])*45;d+=e.indexOf(this.data[c+1]),s.put(d,11)}this.data.length%2&&s.put(e.indexOf(this.data[c]),6)},hf=a,hf}var Af,AE;function uL(){if(AE)return Af;AE=1;const r=xs();function e(a){this.mode=r.BYTE,typeof a=="string"?this.data=new TextEncoder().encode(a):this.data=new Uint8Array(a)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(a){for(let i=0,s=this.data.length;i<s;i++)a.put(this.data[i],8)},Af=e,Af}var pf,pE;function dL(){if(pE)return pf;pE=1;const r=xs(),e=ws();function a(i){this.mode=r.KANJI,this.data=i}return a.getBitsLength=function(s){return s*13},a.prototype.getLength=function(){return this.data.length},a.prototype.getBitsLength=function(){return a.getBitsLength(this.data.length)},a.prototype.write=function(i){let s;for(s=0;s<this.data.length;s++){let c=e.toSJIS(this.data[s]);if(c>=33088&&c<=40956)c-=33088;else if(c>=57408&&c<=60351)c-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
Make sure your charset is UTF-8`);c=(c>>>8&255)*192+(c&255),i.put(c,13)}},pf=a,pf}var yf={exports:{}},yE;function mL(){return yE||(yE=1,function(r){var e={single_source_shortest_paths:function(a,i,s){var c={},d={};d[i]=0;var m=e.PriorityQueue.make();m.push(i,0);for(var f,g,E,p,N,v,x,T,k;!m.empty();){f=m.pop(),g=f.value,p=f.cost,N=a[g]||{};for(E in N)N.hasOwnProperty(E)&&(v=N[E],x=p+v,T=d[E],k=typeof d[E]>"u",(k||T>x)&&(d[E]=x,m.push(E,x),c[E]=g))}if(typeof s<"u"&&typeof d[s]>"u"){var L=["Could not find a path from ",i," to ",s,"."].join("");throw new Error(L)}return c},extract_shortest_path_from_predecessor_list:function(a,i){for(var s=[],c=i;c;)s.push(c),a[c],c=a[c];return s.reverse(),s},find_path:function(a,i,s){var c=e.single_source_shortest_paths(a,i,s);return e.extract_shortest_path_from_predecessor_list(c,s)},PriorityQueue:{make:function(a){var i=e.PriorityQueue,s={},c;a=a||{};for(c in i)i.hasOwnProperty(c)&&(s[c]=i[c]);return s.queue=[],s.sorter=a.sorter||i.default_sorter,s},default_sorter:function(a,i){return a.cost-i.cost},push:function(a,i){var s={value:a,cost:i};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e}(yf)),yf.exports}var EE;function gL(){return EE||(EE=1,function(r){const e=xs(),a=lL(),i=cL(),s=uL(),c=dL(),d=SI(),m=ws(),f=mL();function g(L){return unescape(encodeURIComponent(L)).length}function E(L,B,S){const O=[];let M;for(;(M=L.exec(S))!==null;)O.push({data:M[0],index:M.index,mode:B,length:M[0].length});return O}function p(L){const B=E(d.NUMERIC,e.NUMERIC,L),S=E(d.ALPHANUMERIC,e.ALPHANUMERIC,L);let O,M;return m.isKanjiModeEnabled()?(O=E(d.BYTE,e.BYTE,L),M=E(d.KANJI,e.KANJI,L)):(O=E(d.BYTE_KANJI,e.BYTE,L),M=[]),B.concat(S,O,M).sort(function(G,H){return G.index-H.index}).map(function(G){return{data:G.data,mode:G.mode,length:G.length}})}function N(L,B){switch(B){case e.NUMERIC:return a.getBitsLength(L);case e.ALPHANUMERIC:return i.getBitsLength(L);case e.KANJI:return c.getBitsLength(L);case e.BYTE:return s.getBitsLength(L)}}function v(L){return L.reduce(function(B,S){const O=B.length-1>=0?B[B.length-1]:null;return O&&O.mode===S.mode?(B[B.length-1].data+=S.data,B):(B.push(S),B)},[])}function x(L){const B=[];for(let S=0;S<L.length;S++){const O=L[S];switch(O.mode){case e.NUMERIC:B.push([O,{data:O.data,mode:e.ALPHANUMERIC,length:O.length},{data:O.data,mode:e.BYTE,length:O.length}]);break;case e.ALPHANUMERIC:B.push([O,{data:O.data,mode:e.BYTE,length:O.length}]);break;case e.KANJI:B.push([O,{data:O.data,mode:e.BYTE,length:g(O.data)}]);break;case e.BYTE:B.push([{data:O.data,mode:e.BYTE,length:g(O.data)}])}}return B}function T(L,B){const S={},O={start:{}};let M=["start"];for(let P=0;P<L.length;P++){const G=L[P],H=[];for(let z=0;z<G.length;z++){const V=G[z],K=""+P+z;H.push(K),S[K]={node:V,lastCount:0},O[K]={};for(let $=0;$<M.length;$++){const W=M[$];S[W]&&S[W].node.mode===V.mode?(O[W][K]=N(S[W].lastCount+V.length,V.mode)-N(S[W].lastCount,V.mode),S[W].lastCount+=V.length):(S[W]&&(S[W].lastCount=V.length),O[W][K]=N(V.length,V.mode)+4+e.getCharCountIndicator(V.mode,B))}}M=H}for(let P=0;P<M.length;P++)O[M[P]].end=0;return{map:O,table:S}}function k(L,B){let S;const O=e.getBestModeForData(L);if(S=e.from(B,O),S!==e.BYTE&&S.bit<O.bit)throw new Error('"'+L+'" cannot be encoded with mode '+e.toString(S)+`.
 Suggested mode is: `+e.toString(O));switch(S===e.KANJI&&!m.isKanjiModeEnabled()&&(S=e.BYTE),S){case e.NUMERIC:return new a(L);case e.ALPHANUMERIC:return new i(L);case e.KANJI:return new c(L);case e.BYTE:return new s(L)}}r.fromArray=function(B){return B.reduce(function(S,O){return typeof O=="string"?S.push(k(O,null)):O.data&&S.push(k(O.data,O.mode)),S},[])},r.fromString=function(B,S){const O=p(B,m.isKanjiModeEnabled()),M=x(O),P=T(M,S),G=f.find_path(P.map,"start","end"),H=[];for(let z=1;z<G.length-1;z++)H.push(P.table[G[z]].node);return r.fromArray(v(H))},r.rawSplit=function(B){return r.fromArray(p(B,m.isKanjiModeEnabled()))}}(gf)),gf}var bE;function fL(){if(bE)return Zg;bE=1;const r=ws(),e=Bh(),a=$2(),i=Z2(),s=eL(),c=tL(),d=aL(),m=xI(),f=iL(),g=sL(),E=oL(),p=xs(),N=gL();function v(P,G){const H=P.size,z=c.getPositions(G);for(let V=0;V<z.length;V++){const K=z[V][0],$=z[V][1];for(let W=-1;W<=7;W++)if(!(K+W<=-1||H<=K+W))for(let ne=-1;ne<=7;ne++)$+ne<=-1||H<=$+ne||(W>=0&&W<=6&&(ne===0||ne===6)||ne>=0&&ne<=6&&(W===0||W===6)||W>=2&&W<=4&&ne>=2&&ne<=4?P.set(K+W,$+ne,!0,!0):P.set(K+W,$+ne,!1,!0))}}function x(P){const G=P.size;for(let H=8;H<G-8;H++){const z=H%2===0;P.set(H,6,z,!0),P.set(6,H,z,!0)}}function T(P,G){const H=s.getPositions(G);for(let z=0;z<H.length;z++){const V=H[z][0],K=H[z][1];for(let $=-2;$<=2;$++)for(let W=-2;W<=2;W++)$===-2||$===2||W===-2||W===2||$===0&&W===0?P.set(V+$,K+W,!0,!0):P.set(V+$,K+W,!1,!0)}}function k(P,G){const H=P.size,z=g.getEncodedBits(G);let V,K,$;for(let W=0;W<18;W++)V=Math.floor(W/3),K=W%3+H-8-3,$=(z>>W&1)===1,P.set(V,K,$,!0),P.set(K,V,$,!0)}function L(P,G,H){const z=P.size,V=E.getEncodedBits(G,H);let K,$;for(K=0;K<15;K++)$=(V>>K&1)===1,K<6?P.set(K,8,$,!0):K<8?P.set(K+1,8,$,!0):P.set(z-15+K,8,$,!0),K<8?P.set(8,z-K-1,$,!0):K<9?P.set(8,15-K-1+1,$,!0):P.set(8,15-K-1,$,!0);P.set(z-8,8,1,!0)}function B(P,G){const H=P.size;let z=-1,V=H-1,K=7,$=0;for(let W=H-1;W>0;W-=2)for(W===6&&W--;;){for(let ne=0;ne<2;ne++)if(!P.isReserved(V,W-ne)){let he=!1;$<G.length&&(he=(G[$]>>>K&1)===1),P.set(V,W-ne,he),K--,K===-1&&($++,K=7)}if(V+=z,V<0||H<=V){V-=z,z=-z;break}}}function S(P,G,H){const z=new a;H.forEach(function(ne){z.put(ne.mode.bit,4),z.put(ne.getLength(),p.getCharCountIndicator(ne.mode,P)),ne.write(z)});const V=r.getSymbolTotalCodewords(P),K=m.getTotalCodewordsCount(P,G),$=(V-K)*8;for(z.getLengthInBits()+4<=$&&z.put(0,4);z.getLengthInBits()%8!==0;)z.putBit(0);const W=($-z.getLengthInBits())/8;for(let ne=0;ne<W;ne++)z.put(ne%2?17:236,8);return O(z,P,G)}function O(P,G,H){const z=r.getSymbolTotalCodewords(G),V=m.getTotalCodewordsCount(G,H),K=z-V,$=m.getBlocksCount(G,H),W=z%$,ne=$-W,he=Math.floor(z/$),q=Math.floor(K/$),re=q+1,Ee=he-q,pe=new f(Ee);let j=0;const X=new Array($),ee=new Array($);let ie=0;const ve=new Uint8Array(P.buffer);for(let Ve=0;Ve<$;Ve++){const vt=Ve<ne?q:re;X[Ve]=ve.slice(j,j+vt),ee[Ve]=pe.encode(X[Ve]),j+=vt,ie=Math.max(ie,vt)}const Ne=new Uint8Array(z);let Re=0,Be,ke;for(Be=0;Be<ie;Be++)for(ke=0;ke<$;ke++)Be<X[ke].length&&(Ne[Re++]=X[ke][Be]);for(Be=0;Be<Ee;Be++)for(ke=0;ke<$;ke++)Ne[Re++]=ee[ke][Be];return Ne}function M(P,G,H,z){let V;if(Array.isArray(P))V=N.fromArray(P);else if(typeof P=="string"){let he=G;if(!he){const q=N.rawSplit(P);he=g.getBestVersionForData(q,H)}V=N.fromString(P,he||40)}else throw new Error("Invalid data");const K=g.getBestVersionForData(V,H);if(!K)throw new Error("The amount of data is too big to be stored in a QR Code");if(!G)G=K;else if(G<K)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+K+`.
`);const $=S(G,H,V),W=r.getSymbolSize(G),ne=new i(W);return v(ne,G),x(ne),T(ne,G),L(ne,H,0),G>=7&&k(ne,G),B(ne,$),isNaN(z)&&(z=d.getBestMask(ne,L.bind(null,ne,H))),d.applyMask(z,ne),L(ne,H,z),{modules:ne,version:G,errorCorrectionLevel:H,maskPattern:z,segments:V}}return Zg.create=function(G,H){if(typeof G>"u"||G==="")throw new Error("No input text");let z=e.M,V,K;return typeof H<"u"&&(z=e.from(H.errorCorrectionLevel,e.M),V=g.from(H.version),K=d.from(H.maskPattern),H.toSJISFunc&&r.setToSJISFunction(H.toSJISFunc)),M(G,V,z,K)},Zg}var Ef={},bf={},IE;function kI(){return IE||(IE=1,function(r){function e(a){if(typeof a=="number"&&(a=a.toString()),typeof a!="string")throw new Error("Color should be defined as hex string");let i=a.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+a);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(c){return[c,c]}))),i.length===6&&i.push("F","F");const s=parseInt(i.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+i.slice(0,6).join("")}}r.getOptions=function(i){i||(i={}),i.color||(i.color={});const s=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,c=i.width&&i.width>=21?i.width:void 0,d=i.scale||4;return{width:c,scale:c?4:d,margin:s,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},r.getScale=function(i,s){return s.width&&s.width>=i+s.margin*2?s.width/(i+s.margin*2):s.scale},r.getImageWidth=function(i,s){const c=r.getScale(i,s);return Math.floor((i+s.margin*2)*c)},r.qrToImageData=function(i,s,c){const d=s.modules.size,m=s.modules.data,f=r.getScale(d,c),g=Math.floor((d+c.margin*2)*f),E=c.margin*f,p=[c.color.light,c.color.dark];for(let N=0;N<g;N++)for(let v=0;v<g;v++){let x=(N*g+v)*4,T=c.color.light;if(N>=E&&v>=E&&N<g-E&&v<g-E){const k=Math.floor((N-E)/f),L=Math.floor((v-E)/f);T=p[m[k*d+L]?1:0]}i[x++]=T.r,i[x++]=T.g,i[x++]=T.b,i[x]=T.a}}}(bf)),bf}var vE;function hL(){return vE||(vE=1,function(r){const e=kI();function a(s,c,d){s.clearRect(0,0,c.width,c.height),c.style||(c.style={}),c.height=d,c.width=d,c.style.height=d+"px",c.style.width=d+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}r.render=function(c,d,m){let f=m,g=d;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),d||(g=i()),f=e.getOptions(f);const E=e.getImageWidth(c.modules.size,f),p=g.getContext("2d"),N=p.createImageData(E,E);return e.qrToImageData(N.data,c,f),a(p,g,E),p.putImageData(N,0,0),g},r.renderToDataURL=function(c,d,m){let f=m;typeof f>"u"&&(!d||!d.getContext)&&(f=d,d=void 0),f||(f={});const g=r.render(c,d,f),E=f.type||"image/png",p=f.rendererOpts||{};return g.toDataURL(E,p.quality)}}(Ef)),Ef}var If={},CE;function AL(){if(CE)return If;CE=1;const r=kI();function e(s,c){const d=s.a/255,m=c+'="'+s.hex+'"';return d<1?m+" "+c+'-opacity="'+d.toFixed(2).slice(1)+'"':m}function a(s,c,d){let m=s+c;return typeof d<"u"&&(m+=" "+d),m}function i(s,c,d){let m="",f=0,g=!1,E=0;for(let p=0;p<s.length;p++){const N=Math.floor(p%c),v=Math.floor(p/c);!N&&!g&&(g=!0),s[p]?(E++,p>0&&N>0&&s[p-1]||(m+=g?a("M",N+d,.5+v+d):a("m",f,0),f=0,g=!1),N+1<c&&s[p+1]||(m+=a("h",E),E=0)):f++}return m}return If.render=function(c,d,m){const f=r.getOptions(d),g=c.modules.size,E=c.modules.data,p=g+f.margin*2,N=f.color.light.a?"<path "+e(f.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",v="<path "+e(f.color.dark,"stroke")+' d="'+i(E,g,f.margin)+'"/>',x='viewBox="0 0 '+p+" "+p+'"',k='<svg xmlns="http://www.w3.org/2000/svg" '+(f.width?'width="'+f.width+'" height="'+f.width+'" ':"")+x+' shape-rendering="crispEdges">'+N+v+`</svg>
`;return typeof m=="function"&&m(null,k),k},If}var NE;function pL(){if(NE)return co;NE=1;const r=X2(),e=fL(),a=hL(),i=AL();function s(c,d,m,f,g){const E=[].slice.call(arguments,1),p=E.length,N=typeof E[p-1]=="function";if(!N&&!r())throw new Error("Callback required as last argument");if(N){if(p<2)throw new Error("Too few arguments provided");p===2?(g=m,m=d,d=f=void 0):p===3&&(d.getContext&&typeof g>"u"?(g=f,f=void 0):(g=f,f=m,m=d,d=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(m=d,d=f=void 0):p===2&&!d.getContext&&(f=m,m=d,d=void 0),new Promise(function(v,x){try{const T=e.create(m,f);v(c(T,d,f))}catch(T){x(T)}})}try{const v=e.create(m,f);g(null,c(v,d,f))}catch(v){g(v)}}return co.create=e.create,co.toCanvas=s.bind(null,a.render),co.toDataURL=s.bind(null,a.renderToDataURL),co.toString=s.bind(null,function(c,d,m){return i.render(c,m)}),co}var yL=pL();const EL=qi(yL),Zn=({isOpen:r,onClose:e,title:a,children:i,maxWidth:s="max-w-md",showCloseButton:c=!0,footer:d,showHeaderBorder:m=!0,bodyClassName:f="px-6 py-4"})=>{const{t:g}=Ze(),E=I.useCallback(v=>{v.key==="Escape"&&e()},[e]);if(I.useEffect(()=>{if(r)return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[r,E]),!r)return null;const p=v=>{v.target===v.currentTarget&&e()},N=a||c;return l.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:e}),l.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:p,children:l.jsxs("div",{className:`relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 shadow-xl transition-all w-full ${s} mx-4`,children:[N&&l.jsxs("div",{className:`px-6 py-4 flex items-center justify-between ${m?"border-b border-gray-200 dark:border-gray-700":""}`,children:[a&&l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:a}),!a&&l.jsx("div",{}),c&&l.jsxs("button",{type:"button",className:"text-gray-400 hover:text-gray-500 focus:outline-none",onClick:e,children:[l.jsx("span",{className:"sr-only",children:g("common.close")}),l.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})]}),l.jsx("div",{className:f,children:i}),d&&l.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:d})]})})]})};var _n=(r=>(r.TIMEOUT="TIMEOUT",r.GENERIC="GENERIC",r))(_n||{}),vf={},xl={},wE;function bL(){if(wE)return xl;wE=1,xl.byteLength=m,xl.toByteArray=g,xl.fromByteArray=N;for(var r=[],e=[],a=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=i.length;s<c;++s)r[s]=i[s],e[i.charCodeAt(s)]=s;e[45]=62,e[95]=63;function d(v){var x=v.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var T=v.indexOf("=");T===-1&&(T=x);var k=T===x?0:4-T%4;return[T,k]}function m(v){var x=d(v),T=x[0],k=x[1];return(T+k)*3/4-k}function f(v,x,T){return(x+T)*3/4-T}function g(v){var x,T=d(v),k=T[0],L=T[1],B=new a(f(v,k,L)),S=0,O=L>0?k-4:k,M;for(M=0;M<O;M+=4)x=e[v.charCodeAt(M)]<<18|e[v.charCodeAt(M+1)]<<12|e[v.charCodeAt(M+2)]<<6|e[v.charCodeAt(M+3)],B[S++]=x>>16&255,B[S++]=x>>8&255,B[S++]=x&255;return L===2&&(x=e[v.charCodeAt(M)]<<2|e[v.charCodeAt(M+1)]>>4,B[S++]=x&255),L===1&&(x=e[v.charCodeAt(M)]<<10|e[v.charCodeAt(M+1)]<<4|e[v.charCodeAt(M+2)]>>2,B[S++]=x>>8&255,B[S++]=x&255),B}function E(v){return r[v>>18&63]+r[v>>12&63]+r[v>>6&63]+r[v&63]}function p(v,x,T){for(var k,L=[],B=x;B<T;B+=3)k=(v[B]<<16&16711680)+(v[B+1]<<8&65280)+(v[B+2]&255),L.push(E(k));return L.join("")}function N(v){for(var x,T=v.length,k=T%3,L=[],B=16383,S=0,O=T-k;S<O;S+=B)L.push(p(v,S,S+B>O?O:S+B));return k===1?(x=v[T-1],L.push(r[x>>2]+r[x<<4&63]+"==")):k===2&&(x=(v[T-2]<<8)+v[T-1],L.push(r[x>>10]+r[x>>4&63]+r[x<<2&63]+"=")),L.join("")}return xl}var Iu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var xE;function IL(){return xE||(xE=1,Iu.read=function(r,e,a,i,s){var c,d,m=s*8-i-1,f=(1<<m)-1,g=f>>1,E=-7,p=a?s-1:0,N=a?-1:1,v=r[e+p];for(p+=N,c=v&(1<<-E)-1,v>>=-E,E+=m;E>0;c=c*256+r[e+p],p+=N,E-=8);for(d=c&(1<<-E)-1,c>>=-E,E+=i;E>0;d=d*256+r[e+p],p+=N,E-=8);if(c===0)c=1-g;else{if(c===f)return d?NaN:(v?-1:1)*(1/0);d=d+Math.pow(2,i),c=c-g}return(v?-1:1)*d*Math.pow(2,c-i)},Iu.write=function(r,e,a,i,s,c){var d,m,f,g=c*8-s-1,E=(1<<g)-1,p=E>>1,N=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=i?0:c-1,x=i?1:-1,T=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,d=E):(d=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-d))<1&&(d--,f*=2),d+p>=1?e+=N/f:e+=N*Math.pow(2,1-p),e*f>=2&&(d++,f/=2),d+p>=E?(m=0,d=E):d+p>=1?(m=(e*f-1)*Math.pow(2,s),d=d+p):(m=e*Math.pow(2,p-1)*Math.pow(2,s),d=0));s>=8;r[a+v]=m&255,v+=x,m/=256,s-=8);for(d=d<<s|m,g+=s;g>0;r[a+v]=d&255,v+=x,d/=256,g-=8);r[a+v-x]|=T*128}),Iu}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var TE;function vL(){return TE||(TE=1,function(r){const e=bL(),a=IL(),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=m,r.SlowBuffer=B,r.INSPECT_MAX_BYTES=50;const s=2147483647;r.kMaxLength=s,m.TYPED_ARRAY_SUPPORT=c(),!m.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const U=new Uint8Array(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,Uint8Array.prototype),Object.setPrototypeOf(U,C),U.foo()===42}catch{return!1}}Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.buffer}}),Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.byteOffset}});function d(U){if(U>s)throw new RangeError('The value "'+U+'" is invalid for option "size"');const C=new Uint8Array(U);return Object.setPrototypeOf(C,m.prototype),C}function m(U,C,w){if(typeof U=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(U)}return f(U,C,w)}m.poolSize=8192;function f(U,C,w){if(typeof U=="string")return N(U,C);if(ArrayBuffer.isView(U))return x(U);if(U==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U);if(dt(U,ArrayBuffer)||U&&dt(U.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(dt(U,SharedArrayBuffer)||U&&dt(U.buffer,SharedArrayBuffer)))return T(U,C,w);if(typeof U=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Q=U.valueOf&&U.valueOf();if(Q!=null&&Q!==U)return m.from(Q,C,w);const ae=k(U);if(ae)return ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof U[Symbol.toPrimitive]=="function")return m.from(U[Symbol.toPrimitive]("string"),C,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof U)}m.from=function(U,C,w){return f(U,C,w)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function g(U){if(typeof U!="number")throw new TypeError('"size" argument must be of type number');if(U<0)throw new RangeError('The value "'+U+'" is invalid for option "size"')}function E(U,C,w){return g(U),U<=0?d(U):C!==void 0?typeof w=="string"?d(U).fill(C,w):d(U).fill(C):d(U)}m.alloc=function(U,C,w){return E(U,C,w)};function p(U){return g(U),d(U<0?0:L(U)|0)}m.allocUnsafe=function(U){return p(U)},m.allocUnsafeSlow=function(U){return p(U)};function N(U,C){if((typeof C!="string"||C==="")&&(C="utf8"),!m.isEncoding(C))throw new TypeError("Unknown encoding: "+C);const w=S(U,C)|0;let Q=d(w);const ae=Q.write(U,C);return ae!==w&&(Q=Q.slice(0,ae)),Q}function v(U){const C=U.length<0?0:L(U.length)|0,w=d(C);for(let Q=0;Q<C;Q+=1)w[Q]=U[Q]&255;return w}function x(U){if(dt(U,Uint8Array)){const C=new Uint8Array(U);return T(C.buffer,C.byteOffset,C.byteLength)}return v(U)}function T(U,C,w){if(C<0||U.byteLength<C)throw new RangeError('"offset" is outside of buffer bounds');if(U.byteLength<C+(w||0))throw new RangeError('"length" is outside of buffer bounds');let Q;return C===void 0&&w===void 0?Q=new Uint8Array(U):w===void 0?Q=new Uint8Array(U,C):Q=new Uint8Array(U,C,w),Object.setPrototypeOf(Q,m.prototype),Q}function k(U){if(m.isBuffer(U)){const C=L(U.length)|0,w=d(C);return w.length===0||U.copy(w,0,0,C),w}if(U.length!==void 0)return typeof U.length!="number"||jt(U.length)?d(0):v(U);if(U.type==="Buffer"&&Array.isArray(U.data))return v(U.data)}function L(U){if(U>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return U|0}function B(U){return+U!=U&&(U=0),m.alloc(+U)}m.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==m.prototype},m.compare=function(C,w){if(dt(C,Uint8Array)&&(C=m.from(C,C.offset,C.byteLength)),dt(w,Uint8Array)&&(w=m.from(w,w.offset,w.byteLength)),!m.isBuffer(C)||!m.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===w)return 0;let Q=C.length,ae=w.length;for(let fe=0,be=Math.min(Q,ae);fe<be;++fe)if(C[fe]!==w[fe]){Q=C[fe],ae=w[fe];break}return Q<ae?-1:ae<Q?1:0},m.isEncoding=function(C){switch(String(C).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},m.concat=function(C,w){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return m.alloc(0);let Q;if(w===void 0)for(w=0,Q=0;Q<C.length;++Q)w+=C[Q].length;const ae=m.allocUnsafe(w);let fe=0;for(Q=0;Q<C.length;++Q){let be=C[Q];if(dt(be,Uint8Array))fe+be.length>ae.length?(m.isBuffer(be)||(be=m.from(be)),be.copy(ae,fe)):Uint8Array.prototype.set.call(ae,be,fe);else if(m.isBuffer(be))be.copy(ae,fe);else throw new TypeError('"list" argument must be an Array of Buffers');fe+=be.length}return ae};function S(U,C){if(m.isBuffer(U))return U.length;if(ArrayBuffer.isView(U)||dt(U,ArrayBuffer))return U.byteLength;if(typeof U!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof U);const w=U.length,Q=arguments.length>2&&arguments[2]===!0;if(!Q&&w===0)return 0;let ae=!1;for(;;)switch(C){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return De(U).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return at(U).length;default:if(ae)return Q?-1:De(U).length;C=(""+C).toLowerCase(),ae=!0}}m.byteLength=S;function O(U,C,w){let Q=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,C>>>=0,w<=C))return"";for(U||(U="utf8");;)switch(U){case"hex":return pe(this,C,w);case"utf8":case"utf-8":return ne(this,C,w);case"ascii":return re(this,C,w);case"latin1":case"binary":return Ee(this,C,w);case"base64":return W(this,C,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,C,w);default:if(Q)throw new TypeError("Unknown encoding: "+U);U=(U+"").toLowerCase(),Q=!0}}m.prototype._isBuffer=!0;function M(U,C,w){const Q=U[C];U[C]=U[w],U[w]=Q}m.prototype.swap16=function(){const C=this.length;if(C%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<C;w+=2)M(this,w,w+1);return this},m.prototype.swap32=function(){const C=this.length;if(C%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<C;w+=4)M(this,w,w+3),M(this,w+1,w+2);return this},m.prototype.swap64=function(){const C=this.length;if(C%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<C;w+=8)M(this,w,w+7),M(this,w+1,w+6),M(this,w+2,w+5),M(this,w+3,w+4);return this},m.prototype.toString=function(){const C=this.length;return C===0?"":arguments.length===0?ne(this,0,C):O.apply(this,arguments)},m.prototype.toLocaleString=m.prototype.toString,m.prototype.equals=function(C){if(!m.isBuffer(C))throw new TypeError("Argument must be a Buffer");return this===C?!0:m.compare(this,C)===0},m.prototype.inspect=function(){let C="";const w=r.INSPECT_MAX_BYTES;return C=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(C+=" ... "),"<Buffer "+C+">"},i&&(m.prototype[i]=m.prototype.inspect),m.prototype.compare=function(C,w,Q,ae,fe){if(dt(C,Uint8Array)&&(C=m.from(C,C.offset,C.byteLength)),!m.isBuffer(C))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof C);if(w===void 0&&(w=0),Q===void 0&&(Q=C?C.length:0),ae===void 0&&(ae=0),fe===void 0&&(fe=this.length),w<0||Q>C.length||ae<0||fe>this.length)throw new RangeError("out of range index");if(ae>=fe&&w>=Q)return 0;if(ae>=fe)return-1;if(w>=Q)return 1;if(w>>>=0,Q>>>=0,ae>>>=0,fe>>>=0,this===C)return 0;let be=fe-ae,Ue=Q-w;const ht=Math.min(be,Ue),Et=this.slice(ae,fe),St=C.slice(w,Q);for(let mt=0;mt<ht;++mt)if(Et[mt]!==St[mt]){be=Et[mt],Ue=St[mt];break}return be<Ue?-1:Ue<be?1:0};function P(U,C,w,Q,ae){if(U.length===0)return-1;if(typeof w=="string"?(Q=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,jt(w)&&(w=ae?0:U.length-1),w<0&&(w=U.length+w),w>=U.length){if(ae)return-1;w=U.length-1}else if(w<0)if(ae)w=0;else return-1;if(typeof C=="string"&&(C=m.from(C,Q)),m.isBuffer(C))return C.length===0?-1:G(U,C,w,Q,ae);if(typeof C=="number")return C=C&255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(U,C,w):Uint8Array.prototype.lastIndexOf.call(U,C,w):G(U,[C],w,Q,ae);throw new TypeError("val must be string, number or Buffer")}function G(U,C,w,Q,ae){let fe=1,be=U.length,Ue=C.length;if(Q!==void 0&&(Q=String(Q).toLowerCase(),Q==="ucs2"||Q==="ucs-2"||Q==="utf16le"||Q==="utf-16le")){if(U.length<2||C.length<2)return-1;fe=2,be/=2,Ue/=2,w/=2}function ht(St,mt){return fe===1?St[mt]:St.readUInt16BE(mt*fe)}let Et;if(ae){let St=-1;for(Et=w;Et<be;Et++)if(ht(U,Et)===ht(C,St===-1?0:Et-St)){if(St===-1&&(St=Et),Et-St+1===Ue)return St*fe}else St!==-1&&(Et-=Et-St),St=-1}else for(w+Ue>be&&(w=be-Ue),Et=w;Et>=0;Et--){let St=!0;for(let mt=0;mt<Ue;mt++)if(ht(U,Et+mt)!==ht(C,mt)){St=!1;break}if(St)return Et}return-1}m.prototype.includes=function(C,w,Q){return this.indexOf(C,w,Q)!==-1},m.prototype.indexOf=function(C,w,Q){return P(this,C,w,Q,!0)},m.prototype.lastIndexOf=function(C,w,Q){return P(this,C,w,Q,!1)};function H(U,C,w,Q){w=Number(w)||0;const ae=U.length-w;Q?(Q=Number(Q),Q>ae&&(Q=ae)):Q=ae;const fe=C.length;Q>fe/2&&(Q=fe/2);let be;for(be=0;be<Q;++be){const Ue=parseInt(C.substr(be*2,2),16);if(jt(Ue))return be;U[w+be]=Ue}return be}function z(U,C,w,Q){return Ye(De(C,U.length-w),U,w,Q)}function V(U,C,w,Q){return Ye(Pe(C),U,w,Q)}function K(U,C,w,Q){return Ye(at(C),U,w,Q)}function $(U,C,w,Q){return Ye(ze(C,U.length-w),U,w,Q)}m.prototype.write=function(C,w,Q,ae){if(w===void 0)ae="utf8",Q=this.length,w=0;else if(Q===void 0&&typeof w=="string")ae=w,Q=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(Q)?(Q=Q>>>0,ae===void 0&&(ae="utf8")):(ae=Q,Q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const fe=this.length-w;if((Q===void 0||Q>fe)&&(Q=fe),C.length>0&&(Q<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");ae||(ae="utf8");let be=!1;for(;;)switch(ae){case"hex":return H(this,C,w,Q);case"utf8":case"utf-8":return z(this,C,w,Q);case"ascii":case"latin1":case"binary":return V(this,C,w,Q);case"base64":return K(this,C,w,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,C,w,Q);default:if(be)throw new TypeError("Unknown encoding: "+ae);ae=(""+ae).toLowerCase(),be=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function W(U,C,w){return C===0&&w===U.length?e.fromByteArray(U):e.fromByteArray(U.slice(C,w))}function ne(U,C,w){w=Math.min(U.length,w);const Q=[];let ae=C;for(;ae<w;){const fe=U[ae];let be=null,Ue=fe>239?4:fe>223?3:fe>191?2:1;if(ae+Ue<=w){let ht,Et,St,mt;switch(Ue){case 1:fe<128&&(be=fe);break;case 2:ht=U[ae+1],(ht&192)===128&&(mt=(fe&31)<<6|ht&63,mt>127&&(be=mt));break;case 3:ht=U[ae+1],Et=U[ae+2],(ht&192)===128&&(Et&192)===128&&(mt=(fe&15)<<12|(ht&63)<<6|Et&63,mt>2047&&(mt<55296||mt>57343)&&(be=mt));break;case 4:ht=U[ae+1],Et=U[ae+2],St=U[ae+3],(ht&192)===128&&(Et&192)===128&&(St&192)===128&&(mt=(fe&15)<<18|(ht&63)<<12|(Et&63)<<6|St&63,mt>65535&&mt<1114112&&(be=mt))}}be===null?(be=65533,Ue=1):be>65535&&(be-=65536,Q.push(be>>>10&1023|55296),be=56320|be&1023),Q.push(be),ae+=Ue}return q(Q)}const he=4096;function q(U){const C=U.length;if(C<=he)return String.fromCharCode.apply(String,U);let w="",Q=0;for(;Q<C;)w+=String.fromCharCode.apply(String,U.slice(Q,Q+=he));return w}function re(U,C,w){let Q="";w=Math.min(U.length,w);for(let ae=C;ae<w;++ae)Q+=String.fromCharCode(U[ae]&127);return Q}function Ee(U,C,w){let Q="";w=Math.min(U.length,w);for(let ae=C;ae<w;++ae)Q+=String.fromCharCode(U[ae]);return Q}function pe(U,C,w){const Q=U.length;(!C||C<0)&&(C=0),(!w||w<0||w>Q)&&(w=Q);let ae="";for(let fe=C;fe<w;++fe)ae+=qt[U[fe]];return ae}function j(U,C,w){const Q=U.slice(C,w);let ae="";for(let fe=0;fe<Q.length-1;fe+=2)ae+=String.fromCharCode(Q[fe]+Q[fe+1]*256);return ae}m.prototype.slice=function(C,w){const Q=this.length;C=~~C,w=w===void 0?Q:~~w,C<0?(C+=Q,C<0&&(C=0)):C>Q&&(C=Q),w<0?(w+=Q,w<0&&(w=0)):w>Q&&(w=Q),w<C&&(w=C);const ae=this.subarray(C,w);return Object.setPrototypeOf(ae,m.prototype),ae};function X(U,C,w){if(U%1!==0||U<0)throw new RangeError("offset is not uint");if(U+C>w)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(C,w,Q){C=C>>>0,w=w>>>0,Q||X(C,w,this.length);let ae=this[C],fe=1,be=0;for(;++be<w&&(fe*=256);)ae+=this[C+be]*fe;return ae},m.prototype.readUintBE=m.prototype.readUIntBE=function(C,w,Q){C=C>>>0,w=w>>>0,Q||X(C,w,this.length);let ae=this[C+--w],fe=1;for(;w>0&&(fe*=256);)ae+=this[C+--w]*fe;return ae},m.prototype.readUint8=m.prototype.readUInt8=function(C,w){return C=C>>>0,w||X(C,1,this.length),this[C]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(C,w){return C=C>>>0,w||X(C,2,this.length),this[C]|this[C+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(C,w){return C=C>>>0,w||X(C,2,this.length),this[C]<<8|this[C+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(C,w){return C=C>>>0,w||X(C,4,this.length),(this[C]|this[C+1]<<8|this[C+2]<<16)+this[C+3]*16777216},m.prototype.readUint32BE=m.prototype.readUInt32BE=function(C,w){return C=C>>>0,w||X(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},m.prototype.readBigUInt64LE=Qt(function(C){C=C>>>0,tt(C,"offset");const w=this[C],Q=this[C+7];(w===void 0||Q===void 0)&&nt(C,this.length-8);const ae=w+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24,fe=this[++C]+this[++C]*2**8+this[++C]*2**16+Q*2**24;return BigInt(ae)+(BigInt(fe)<<BigInt(32))}),m.prototype.readBigUInt64BE=Qt(function(C){C=C>>>0,tt(C,"offset");const w=this[C],Q=this[C+7];(w===void 0||Q===void 0)&&nt(C,this.length-8);const ae=w*2**24+this[++C]*2**16+this[++C]*2**8+this[++C],fe=this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+Q;return(BigInt(ae)<<BigInt(32))+BigInt(fe)}),m.prototype.readIntLE=function(C,w,Q){C=C>>>0,w=w>>>0,Q||X(C,w,this.length);let ae=this[C],fe=1,be=0;for(;++be<w&&(fe*=256);)ae+=this[C+be]*fe;return fe*=128,ae>=fe&&(ae-=Math.pow(2,8*w)),ae},m.prototype.readIntBE=function(C,w,Q){C=C>>>0,w=w>>>0,Q||X(C,w,this.length);let ae=w,fe=1,be=this[C+--ae];for(;ae>0&&(fe*=256);)be+=this[C+--ae]*fe;return fe*=128,be>=fe&&(be-=Math.pow(2,8*w)),be},m.prototype.readInt8=function(C,w){return C=C>>>0,w||X(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},m.prototype.readInt16LE=function(C,w){C=C>>>0,w||X(C,2,this.length);const Q=this[C]|this[C+1]<<8;return Q&32768?Q|4294901760:Q},m.prototype.readInt16BE=function(C,w){C=C>>>0,w||X(C,2,this.length);const Q=this[C+1]|this[C]<<8;return Q&32768?Q|4294901760:Q},m.prototype.readInt32LE=function(C,w){return C=C>>>0,w||X(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},m.prototype.readInt32BE=function(C,w){return C=C>>>0,w||X(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},m.prototype.readBigInt64LE=Qt(function(C){C=C>>>0,tt(C,"offset");const w=this[C],Q=this[C+7];(w===void 0||Q===void 0)&&nt(C,this.length-8);const ae=this[C+4]+this[C+5]*2**8+this[C+6]*2**16+(Q<<24);return(BigInt(ae)<<BigInt(32))+BigInt(w+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24)}),m.prototype.readBigInt64BE=Qt(function(C){C=C>>>0,tt(C,"offset");const w=this[C],Q=this[C+7];(w===void 0||Q===void 0)&&nt(C,this.length-8);const ae=(w<<24)+this[++C]*2**16+this[++C]*2**8+this[++C];return(BigInt(ae)<<BigInt(32))+BigInt(this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+Q)}),m.prototype.readFloatLE=function(C,w){return C=C>>>0,w||X(C,4,this.length),a.read(this,C,!0,23,4)},m.prototype.readFloatBE=function(C,w){return C=C>>>0,w||X(C,4,this.length),a.read(this,C,!1,23,4)},m.prototype.readDoubleLE=function(C,w){return C=C>>>0,w||X(C,8,this.length),a.read(this,C,!0,52,8)},m.prototype.readDoubleBE=function(C,w){return C=C>>>0,w||X(C,8,this.length),a.read(this,C,!1,52,8)};function ee(U,C,w,Q,ae,fe){if(!m.isBuffer(U))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>ae||C<fe)throw new RangeError('"value" argument is out of bounds');if(w+Q>U.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(C,w,Q,ae){if(C=+C,w=w>>>0,Q=Q>>>0,!ae){const Ue=Math.pow(2,8*Q)-1;ee(this,C,w,Q,Ue,0)}let fe=1,be=0;for(this[w]=C&255;++be<Q&&(fe*=256);)this[w+be]=C/fe&255;return w+Q},m.prototype.writeUintBE=m.prototype.writeUIntBE=function(C,w,Q,ae){if(C=+C,w=w>>>0,Q=Q>>>0,!ae){const Ue=Math.pow(2,8*Q)-1;ee(this,C,w,Q,Ue,0)}let fe=Q-1,be=1;for(this[w+fe]=C&255;--fe>=0&&(be*=256);)this[w+fe]=C/be&255;return w+Q},m.prototype.writeUint8=m.prototype.writeUInt8=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,1,255,0),this[w]=C&255,w+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,2,65535,0),this[w]=C&255,this[w+1]=C>>>8,w+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,2,65535,0),this[w]=C>>>8,this[w+1]=C&255,w+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,4,4294967295,0),this[w+3]=C>>>24,this[w+2]=C>>>16,this[w+1]=C>>>8,this[w]=C&255,w+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,4,4294967295,0),this[w]=C>>>24,this[w+1]=C>>>16,this[w+2]=C>>>8,this[w+3]=C&255,w+4};function ie(U,C,w,Q,ae){Ut(C,Q,ae,U,w,7);let fe=Number(C&BigInt(4294967295));U[w++]=fe,fe=fe>>8,U[w++]=fe,fe=fe>>8,U[w++]=fe,fe=fe>>8,U[w++]=fe;let be=Number(C>>BigInt(32)&BigInt(4294967295));return U[w++]=be,be=be>>8,U[w++]=be,be=be>>8,U[w++]=be,be=be>>8,U[w++]=be,w}function ve(U,C,w,Q,ae){Ut(C,Q,ae,U,w,7);let fe=Number(C&BigInt(4294967295));U[w+7]=fe,fe=fe>>8,U[w+6]=fe,fe=fe>>8,U[w+5]=fe,fe=fe>>8,U[w+4]=fe;let be=Number(C>>BigInt(32)&BigInt(4294967295));return U[w+3]=be,be=be>>8,U[w+2]=be,be=be>>8,U[w+1]=be,be=be>>8,U[w]=be,w+8}m.prototype.writeBigUInt64LE=Qt(function(C,w=0){return ie(this,C,w,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=Qt(function(C,w=0){return ve(this,C,w,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function(C,w,Q,ae){if(C=+C,w=w>>>0,!ae){const ht=Math.pow(2,8*Q-1);ee(this,C,w,Q,ht-1,-ht)}let fe=0,be=1,Ue=0;for(this[w]=C&255;++fe<Q&&(be*=256);)C<0&&Ue===0&&this[w+fe-1]!==0&&(Ue=1),this[w+fe]=(C/be>>0)-Ue&255;return w+Q},m.prototype.writeIntBE=function(C,w,Q,ae){if(C=+C,w=w>>>0,!ae){const ht=Math.pow(2,8*Q-1);ee(this,C,w,Q,ht-1,-ht)}let fe=Q-1,be=1,Ue=0;for(this[w+fe]=C&255;--fe>=0&&(be*=256);)C<0&&Ue===0&&this[w+fe+1]!==0&&(Ue=1),this[w+fe]=(C/be>>0)-Ue&255;return w+Q},m.prototype.writeInt8=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,1,127,-128),C<0&&(C=255+C+1),this[w]=C&255,w+1},m.prototype.writeInt16LE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,2,32767,-32768),this[w]=C&255,this[w+1]=C>>>8,w+2},m.prototype.writeInt16BE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,2,32767,-32768),this[w]=C>>>8,this[w+1]=C&255,w+2},m.prototype.writeInt32LE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,4,2147483647,-2147483648),this[w]=C&255,this[w+1]=C>>>8,this[w+2]=C>>>16,this[w+3]=C>>>24,w+4},m.prototype.writeInt32BE=function(C,w,Q){return C=+C,w=w>>>0,Q||ee(this,C,w,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[w]=C>>>24,this[w+1]=C>>>16,this[w+2]=C>>>8,this[w+3]=C&255,w+4},m.prototype.writeBigInt64LE=Qt(function(C,w=0){return ie(this,C,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=Qt(function(C,w=0){return ve(this,C,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(U,C,w,Q,ae,fe){if(w+Q>U.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function Re(U,C,w,Q,ae){return C=+C,w=w>>>0,ae||Ne(U,C,w,4),a.write(U,C,w,Q,23,4),w+4}m.prototype.writeFloatLE=function(C,w,Q){return Re(this,C,w,!0,Q)},m.prototype.writeFloatBE=function(C,w,Q){return Re(this,C,w,!1,Q)};function Be(U,C,w,Q,ae){return C=+C,w=w>>>0,ae||Ne(U,C,w,8),a.write(U,C,w,Q,52,8),w+8}m.prototype.writeDoubleLE=function(C,w,Q){return Be(this,C,w,!0,Q)},m.prototype.writeDoubleBE=function(C,w,Q){return Be(this,C,w,!1,Q)},m.prototype.copy=function(C,w,Q,ae){if(!m.isBuffer(C))throw new TypeError("argument should be a Buffer");if(Q||(Q=0),!ae&&ae!==0&&(ae=this.length),w>=C.length&&(w=C.length),w||(w=0),ae>0&&ae<Q&&(ae=Q),ae===Q||C.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(Q<0||Q>=this.length)throw new RangeError("Index out of range");if(ae<0)throw new RangeError("sourceEnd out of bounds");ae>this.length&&(ae=this.length),C.length-w<ae-Q&&(ae=C.length-w+Q);const fe=ae-Q;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(w,Q,ae):Uint8Array.prototype.set.call(C,this.subarray(Q,ae),w),fe},m.prototype.fill=function(C,w,Q,ae){if(typeof C=="string"){if(typeof w=="string"?(ae=w,w=0,Q=this.length):typeof Q=="string"&&(ae=Q,Q=this.length),ae!==void 0&&typeof ae!="string")throw new TypeError("encoding must be a string");if(typeof ae=="string"&&!m.isEncoding(ae))throw new TypeError("Unknown encoding: "+ae);if(C.length===1){const be=C.charCodeAt(0);(ae==="utf8"&&be<128||ae==="latin1")&&(C=be)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(w<0||this.length<w||this.length<Q)throw new RangeError("Out of range index");if(Q<=w)return this;w=w>>>0,Q=Q===void 0?this.length:Q>>>0,C||(C=0);let fe;if(typeof C=="number")for(fe=w;fe<Q;++fe)this[fe]=C;else{const be=m.isBuffer(C)?C:m.from(C,ae),Ue=be.length;if(Ue===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(fe=0;fe<Q-w;++fe)this[fe+w]=be[fe%Ue]}return this};const ke={};function Ve(U,C,w){ke[U]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:C.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${U}]`,this.stack,delete this.name}get code(){return U}set code(ae){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ae,writable:!0})}toString(){return`${this.name} [${U}]: ${this.message}`}}}Ve("ERR_BUFFER_OUT_OF_BOUNDS",function(U){return U?`${U} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ve("ERR_INVALID_ARG_TYPE",function(U,C){return`The "${U}" argument must be of type number. Received type ${typeof C}`},TypeError),Ve("ERR_OUT_OF_RANGE",function(U,C,w){let Q=`The value of "${U}" is out of range.`,ae=w;return Number.isInteger(w)&&Math.abs(w)>2**32?ae=vt(String(w)):typeof w=="bigint"&&(ae=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(ae=vt(ae)),ae+="n"),Q+=` It must be ${C}. Received ${ae}`,Q},RangeError);function vt(U){let C="",w=U.length;const Q=U[0]==="-"?1:0;for(;w>=Q+4;w-=3)C=`_${U.slice(w-3,w)}${C}`;return`${U.slice(0,w)}${C}`}function Ct(U,C,w){tt(C,"offset"),(U[C]===void 0||U[C+w]===void 0)&&nt(C,U.length-(w+1))}function Ut(U,C,w,Q,ae,fe){if(U>w||U<C){const be=typeof C=="bigint"?"n":"";let Ue;throw C===0||C===BigInt(0)?Ue=`>= 0${be} and < 2${be} ** ${(fe+1)*8}${be}`:Ue=`>= -(2${be} ** ${(fe+1)*8-1}${be}) and < 2 ** ${(fe+1)*8-1}${be}`,new ke.ERR_OUT_OF_RANGE("value",Ue,U)}Ct(Q,ae,fe)}function tt(U,C){if(typeof U!="number")throw new ke.ERR_INVALID_ARG_TYPE(C,"number",U)}function nt(U,C,w){throw Math.floor(U)!==U?(tt(U,w),new ke.ERR_OUT_OF_RANGE("offset","an integer",U)):C<0?new ke.ERR_BUFFER_OUT_OF_BOUNDS:new ke.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${C}`,U)}const Te=/[^+/0-9A-Za-z-_]/g;function me(U){if(U=U.split("=")[0],U=U.trim().replace(Te,""),U.length<2)return"";for(;U.length%4!==0;)U=U+"=";return U}function De(U,C){C=C||1/0;let w;const Q=U.length;let ae=null;const fe=[];for(let be=0;be<Q;++be){if(w=U.charCodeAt(be),w>55295&&w<57344){if(!ae){if(w>56319){(C-=3)>-1&&fe.push(239,191,189);continue}else if(be+1===Q){(C-=3)>-1&&fe.push(239,191,189);continue}ae=w;continue}if(w<56320){(C-=3)>-1&&fe.push(239,191,189),ae=w;continue}w=(ae-55296<<10|w-56320)+65536}else ae&&(C-=3)>-1&&fe.push(239,191,189);if(ae=null,w<128){if((C-=1)<0)break;fe.push(w)}else if(w<2048){if((C-=2)<0)break;fe.push(w>>6|192,w&63|128)}else if(w<65536){if((C-=3)<0)break;fe.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((C-=4)<0)break;fe.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return fe}function Pe(U){const C=[];for(let w=0;w<U.length;++w)C.push(U.charCodeAt(w)&255);return C}function ze(U,C){let w,Q,ae;const fe=[];for(let be=0;be<U.length&&!((C-=2)<0);++be)w=U.charCodeAt(be),Q=w>>8,ae=w%256,fe.push(ae),fe.push(Q);return fe}function at(U){return e.toByteArray(me(U))}function Ye(U,C,w,Q){let ae;for(ae=0;ae<Q&&!(ae+w>=C.length||ae>=U.length);++ae)C[ae+w]=U[ae];return ae}function dt(U,C){return U instanceof C||U!=null&&U.constructor!=null&&U.constructor.name!=null&&U.constructor.name===C.name}function jt(U){return U!==U}const qt=function(){const U="0123456789abcdef",C=new Array(256);for(let w=0;w<16;++w){const Q=w*16;for(let ae=0;ae<16;++ae)C[Q+ae]=U[w]+U[ae]}return C}();function Qt(U){return typeof BigInt>"u"?na:U}function na(){throw new Error("BigInt not supported")}}(vf)),vf}var po=vL();class Ft{static async deriveKeyFromPassword(e,a,i="Argon2Id",s='{"Iterations":2,"MemorySize":19456,"DegreeOfParallelism":1}'){const c=JSON.parse(s);try{if(i!=="Argon2Id")throw new Error("Unsupported encryption type");return(await rI.hash({pass:e,salt:a,time:c.Iterations,mem:c.MemorySize,parallelism:c.DegreeOfParallelism,hashLen:32,type:2})).hash}catch(d){throw console.error("Argon2 hashing failed:",d),d}}static async symmetricEncrypt(e,a){if(!e)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(a),g=>g.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["encrypt"]),s=crypto.getRandomValues(new Uint8Array(12)),d=new TextEncoder().encode(e),m=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,d),f=new Uint8Array(s.length+m.byteLength);return f.set(s,0),f.set(new Uint8Array(m),s.length),btoa(Array.from(f).map(g=>String.fromCharCode(g)).join(""))}static async symmetricDecrypt(e,a){if(!e)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(a),g=>g.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=Uint8Array.from(atob(e),g=>g.charCodeAt(0)),c=s.slice(0,12),d=s.slice(12),m=await crypto.subtle.decrypt({name:"AES-GCM",iv:c},i,d);return new TextDecoder().decode(m)}static async symmetricDecryptBytes(e,a){if(!e||e.length===0)return e;const i=await crypto.subtle.importKey("raw",Uint8Array.from(atob(a),m=>m.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=e.slice(0,12),c=e.slice(12),d=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},i,c);return new Uint8Array(d)}static async generateRsaKeyPair(){const e=await crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"]),a=await crypto.subtle.exportKey("jwk",e.publicKey),i=await crypto.subtle.exportKey("jwk",e.privateKey);return{publicKey:JSON.stringify(a),privateKey:JSON.stringify(i)}}static async encryptWithPublicKey(e,a){const i=await crypto.subtle.importKey("jwk",JSON.parse(a),{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),s=new TextEncoder().encode(e),c=await crypto.subtle.encrypt({name:"RSA-OAEP"},i,s);return btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(c))))}static async decryptWithPrivateKey(e,a){try{const i=await crypto.subtle.importKey("jwk",JSON.parse(a),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),s=Uint8Array.from(atob(e),d=>d.charCodeAt(0)),c=await crypto.subtle.decrypt({name:"RSA-OAEP"},i,s);return new Uint8Array(c)}catch(i){throw console.error("RSA decryption failed:",i),new Error(`Failed to decrypt: ${i instanceof Error?i.message:"Unknown error"}`)}}static async decryptEmail(e,a){try{const i=a.find(m=>m.PublicKey===e.encryptionKey);if(!i)throw new Error("Encryption key not found");const s=await Ft.decryptWithPrivateKey(e.encryptedSymmetricKey,i.PrivateKey),c=po.Buffer.from(s).toString("base64"),d={...e};return d.subject=await Ft.symmetricDecrypt(e.subject,c),d.fromDisplay=await Ft.symmetricDecrypt(e.fromDisplay,c),d.fromDomain=await Ft.symmetricDecrypt(e.fromDomain,c),d.fromLocal=await Ft.symmetricDecrypt(e.fromLocal,c),e.messageHtml&&(d.messageHtml=await Ft.symmetricDecrypt(e.messageHtml,c)),e.messagePlain&&(d.messagePlain=await Ft.symmetricDecrypt(e.messagePlain,c)),d}catch(i){throw new Error(i instanceof Error?i.message:"Failed to decrypt email")}}static async decryptEmailList(e,a){return Promise.all(e.map(async i=>{try{const s=a.find(f=>f.PublicKey===i.encryptionKey);if(!s)throw new Error("Encryption key not found");const c=await Ft.decryptWithPrivateKey(i.encryptedSymmetricKey,s.PrivateKey),d=po.Buffer.from(c).toString("base64"),m={...i};return m.subject=await Ft.symmetricDecrypt(i.subject,d),m.fromDisplay=await Ft.symmetricDecrypt(i.fromDisplay,d),m.fromDomain=await Ft.symmetricDecrypt(i.fromDomain,d),m.fromLocal=await Ft.symmetricDecrypt(i.fromLocal,d),i.messagePreview&&(m.messagePreview=await Ft.symmetricDecrypt(i.messagePreview,d)),m}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt email")}}))}static async decryptAttachment(e,a,i){try{const s=i.find(m=>m.PublicKey===a.encryptionKey);if(!s)throw new Error("Encryption key not found");const c=await Ft.decryptWithPrivateKey(a.encryptedSymmetricKey,s.PrivateKey),d=po.Buffer.from(c).toString("base64");return await Ft.symmetricDecryptBytes(e,d)}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt attachment")}}}class CL{constructor(e){Qe(this,"webApi");Qe(this,"pollingInterval",null);Qe(this,"requestId",null);Qe(this,"privateKey",null);this.webApi=e}async initiate(){try{const e=await Ft.generateRsaKeyPair();this.privateKey=e.privateKey;const a=await this.webApi.rawFetch("auth/mobile-login/initiate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientPublicKey:e.publicKey})});if(!a.ok)throw _n.GENERIC;const i=await a.json();return this.requestId=i.requestId,this.requestId}catch(e){throw typeof e=="string"&&Object.values(_n).includes(e)?e:_n.GENERIC}}async startPolling(e,a){if(!this.requestId||!this.privateKey)throw new Error("Must call initiate() before starting polling");const i=async()=>{try{if(!this.requestId){this.stopPolling();return}const s=await this.webApi.rawFetch(`auth/mobile-login/poll/${this.requestId}`,{method:"GET"});if(!s.ok){if(s.status===404){this.stopPolling(),this.privateKey=null,this.requestId=null,a(_n.TIMEOUT);return}throw new Error(`Polling failed: ${s.status}`)}const c=await s.json();if(c.fulfilled&&c.encryptedSymmetricKey){this.stopPolling();const d=await Ft.decryptWithPrivateKey(c.encryptedDecryptionKey,this.privateKey),m=po.Buffer.from(d).toString("base64"),f=await Ft.decryptWithPrivateKey(c.encryptedSymmetricKey,this.privateKey),g=po.Buffer.from(f).toString("base64"),E=await Ft.symmetricDecrypt(c.encryptedToken,g),p=await Ft.symmetricDecrypt(c.encryptedRefreshToken,g),N=await Ft.symmetricDecrypt(c.encryptedUsername,g);this.privateKey=null,this.requestId=null;const v=await this.webApi.rawFetch("auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:N})});if(!v.ok){a(_n.GENERIC);return}const x=await v.json(),T={username:N,token:E,refreshToken:p,decryptionKey:m,salt:x.salt,encryptionType:x.encryptionType,encryptionSettings:x.encryptionSettings};e(T)}}catch{this.stopPolling(),this.privateKey=null,this.requestId=null,a(_n.GENERIC)}};this.pollingInterval=setInterval(i,3e3),setTimeout(()=>{this.pollingInterval&&(this.stopPolling(),this.privateKey=null,this.requestId=null,a(_n.TIMEOUT))},21e4)}stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}cleanup(){this.stopPolling(),this.privateKey=null,this.requestId=null}}const LI=({isOpen:r,onClose:e,onSuccess:a,webApi:i,mode:s="login"})=>{const{t:c}=Ze(),[d,m]=I.useState(null),[f,g]=I.useState(null),[E,p]=I.useState(120),N=I.useRef(null),v=I.useRef(null),x=S=>{switch(S){case _n.TIMEOUT:return c("auth.errors.mobileLoginRequestExpired");case _n.GENERIC:default:return c("common.errors.unknownError")}};I.useEffect(()=>{if(d&&E>0&&r)return v.current=setInterval(()=>{p(S=>S<=1?(v.current&&clearInterval(v.current),0):S-1)},1e3),()=>{v.current&&clearInterval(v.current)}},[d,E,r]),I.useEffect(()=>r?((async()=>{try{g(null),m(null),p(120),N.current||(N.current=new CL(i));const M=`aliasvault://open/mobile-unlock/${await N.current.initiate()}`,P=await EL.toDataURL(M,{width:256,margin:2});m(P),await N.current.startPolling(async G=>{try{await a(G),T()}catch{m(null),g(_n.GENERIC)}},G=>{m(null),g(G)})}catch(O){typeof O=="string"&&Object.values(_n).includes(O)?g(O):g(_n.GENERIC)}})(),()=>{N.current&&N.current.cleanup(),v.current&&clearInterval(v.current)}):void 0,[r]);const T=()=>{N.current&&N.current.cleanup(),v.current&&clearInterval(v.current),m(null),g(null),p(120),e()},k=S=>{const O=Math.floor(S/60),M=S%60;return`${O}:${M.toString().padStart(2,"0")}`},L=c(s==="unlock"?"auth.unlockWithMobile":"auth.loginWithMobile"),B=c("auth.scanQrCode");return l.jsxs(Zn,{isOpen:r,onClose:T,title:L,showHeaderBorder:!1,bodyClassName:"px-6 pb-6",children:[l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:B}),f&&l.jsx("div",{className:"mb-4 p-3 bg-red-100 dark:bg-red-900/30 border border-red-400 dark:border-red-700 rounded text-red-700 dark:text-red-400 text-sm",children:x(f)}),d&&l.jsxs("div",{className:"flex flex-col items-center mb-4",children:[l.jsx("img",{src:d,alt:"QR Code",className:"border-4 border-gray-200 dark:border-gray-600 rounded mb-3"}),l.jsx("div",{className:"text-gray-700 dark:text-gray-300 text-sm font-medium",children:k(E)})]}),!d&&!f&&l.jsx("div",{className:"flex justify-center py-8",children:l.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}),l.jsx("button",{type:"button",onClick:T,className:"mt-4 w-full inline-flex justify-center rounded-md bg-white dark:bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-900 dark:text-gray-200 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-primary-500",children:c("common.cancel")})]})};var Fa=(r=>(r.EXPAND="expand",r.EDIT="edit",r.DELETE="delete",r.SETTINGS="settings",r.RELOAD="reload",r.EXTERNAL_LINK="external_link",r.SAVE="save",r.PLUS="plus",r.TAB="tab",r.EYE="eye",r.EYE_OFF="eye_off",r))(Fa||{});const Uh=({type:r,className:e="w-5 h-5"})=>({expand:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})}),edit:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),delete:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),settings:l.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),reload:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),external_link:l.jsxs("svg",{className:e,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),l.jsx("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"})]}),save:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),plus:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),tab:l.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"})]}),eye:l.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),eye_off:l.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})[r]||null,wn=({onClick:r,title:e,iconType:a,variant:i="default",id:s})=>{const c={default:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700",primary:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 hover:bg-primary-100 dark:hover:bg-primary-900/20",danger:"text-red-500 hover:text-red-600 hover:bg-red-100 dark:hover:bg-red-900/20"};return l.jsx("button",{id:s,onClick:r,className:`p-2 rounded-lg ${c[i]}`,title:e,children:l.jsx(Uh,{type:a})})},RI=()=>{const[r,e]=I.useState(en.DEFAULT_API_URL);return{apiUrl:r,setApiUrl:e,loadApiUrl:async()=>{const s=await Se.getItem("local:apiUrl");s&&s.length>0?e(s):e(en.DEFAULT_API_URL)},getDisplayUrl:()=>{const s=r.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return s==="app.aliasvault.net"?"aliasvault.net":s}}},NL=()=>{const{loadApiUrl:r,getDisplayUrl:e}=RI(),a=La(),{t:i}=Ze();I.useEffect(()=>{r()},[r]);const s=()=>{a("/auth-settings")};return l.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:["(",i("auth.connectingTo")," ",l.jsx("button",{onClick:s,type:"button",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500 underline",children:e()}),")"]})};let je;function xt(r){Ql===ni.length&&ni.push(ni.length+1);const e=Ql;return Ql=ni[e],ni[e]=r,e}function rh(r){const e=typeof r;if(e=="number"||e=="boolean"||r==null)return`${r}`;if(e=="string")return`"${r}"`;if(e=="symbol"){const s=r.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){const s=r.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(r)){const s=r.length;let c="[";s>0&&(c+=rh(r[0]));for(let d=1;d<s;d++)c+=", "+rh(r[d]);return c+="]",c}const a=/\[object ([^\]]+)\]/.exec(toString.call(r));let i;if(a&&a.length>1)i=a[1];else return toString.call(r);if(i=="Object")try{return"Object("+JSON.stringify(r)+")"}catch{return"Object"}return r instanceof Error?`${r.name}: ${r.message}
${r.stack}`:i}function wL(r){r<132||(ni[r]=Ql,Ql=r)}function xL(r,e){r=r>>>0;const a=yt(),i=[];for(let s=r;s<r+4*e;s+=4)i.push(Ga(a.getUint32(s,!0)));return i}function SE(r,e){return r=r>>>0,zl().subarray(r/1,r/1+e)}let hs=null;function yt(){return(hs===null||hs.buffer.detached===!0||hs.buffer.detached===void 0&&hs.buffer!==je.memory.buffer)&&(hs=new DataView(je.memory.buffer)),hs}function Tr(r,e){return r=r>>>0,SL(r,e)}let Ol=null;function zl(){return(Ol===null||Ol.byteLength===0)&&(Ol=new Uint8Array(je.memory.buffer)),Ol}function $e(r){return ni[r]}function fs(r,e){try{return r.apply(this,e)}catch(a){je.__wbindgen_export3(xt(a))}}let ni=new Array(128).fill(void 0);ni.push(void 0,null,!0,!1);let Ql=ni.length;function vr(r){return r==null}function gn(r,e,a){if(a===void 0){const m=Vl.encode(r),f=e(m.length,1)>>>0;return zl().subarray(f,f+m.length).set(m),tn=m.length,f}let i=r.length,s=e(i,1)>>>0;const c=zl();let d=0;for(;d<i;d++){const m=r.charCodeAt(d);if(m>127)break;c[s+d]=m}if(d!==i){d!==0&&(r=r.slice(d)),s=a(s,i,i=d+r.length*3,1)>>>0;const m=zl().subarray(s+d,s+i),f=Vl.encodeInto(r,m);d+=f.written,s=a(s,i,d,1)>>>0}return tn=d,s}function Ga(r){const e=$e(r);return wL(r),e}let Pu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Pu.decode();const TL=2146435072;let Cf=0;function SL(r,e){return Cf+=e,Cf>=TL&&(Pu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Pu.decode(),Cf=e),Pu.decode(zl().subarray(r,r+e))}const Vl=new TextEncoder;"encodeInto"in Vl||(Vl.encodeInto=function(r,e){const a=Vl.encode(r);return e.set(a),{read:r.length,written:a.length}});let tn=0;function kL(r){let e,a;try{const c=je.__wbindgen_add_to_stack_pointer(-16),d=gn(r,je.__wbindgen_export,je.__wbindgen_export2),m=tn;je.extractDomain(c,d,m);var i=yt().getInt32(c+4*0,!0),s=yt().getInt32(c+4*1,!0);return e=i,a=s,Tr(i,s)}finally{je.__wbindgen_add_to_stack_pointer(16),je.__wbindgen_export4(e,a,1)}}function LL(r){let e,a;try{const c=je.__wbindgen_add_to_stack_pointer(-16),d=gn(r,je.__wbindgen_export,je.__wbindgen_export2),m=tn;je.extractRootDomain(c,d,m);var i=yt().getInt32(c+4*0,!0),s=yt().getInt32(c+4*1,!0);return e=i,a=s,Tr(i,s)}finally{je.__wbindgen_add_to_stack_pointer(16),je.__wbindgen_export4(e,a,1)}}function RL(r){try{const s=je.__wbindgen_add_to_stack_pointer(-16);je.filterCredentials(s,xt(r));var e=yt().getInt32(s+4*0,!0),a=yt().getInt32(s+4*1,!0),i=yt().getInt32(s+4*2,!0);if(i)throw Ga(a);return Ga(e)}finally{je.__wbindgen_add_to_stack_pointer(16)}}function DL(){try{const i=je.__wbindgen_add_to_stack_pointer(-16);je.getSyncableTableNames(i);var r=yt().getInt32(i+4*0,!0),e=yt().getInt32(i+4*1,!0),a=xL(r,e).slice();return je.__wbindgen_export4(r,e*4,4),a}finally{je.__wbindgen_add_to_stack_pointer(16)}}function BL(r){try{const s=je.__wbindgen_add_to_stack_pointer(-16);je.mergeVaults(s,xt(r));var e=yt().getInt32(s+4*0,!0),a=yt().getInt32(s+4*1,!0),i=yt().getInt32(s+4*2,!0);if(i)throw Ga(a);return Ga(e)}finally{je.__wbindgen_add_to_stack_pointer(16)}}function UL(r){try{const s=je.__wbindgen_add_to_stack_pointer(-16);je.pruneVault(s,xt(r));var e=yt().getInt32(s+4*0,!0),a=yt().getInt32(s+4*1,!0),i=yt().getInt32(s+4*2,!0);if(i)throw Ga(a);return Ga(e)}finally{je.__wbindgen_add_to_stack_pointer(16)}}function ML(r,e,a){let i,s;try{const p=je.__wbindgen_add_to_stack_pointer(-16),N=gn(r,je.__wbindgen_export,je.__wbindgen_export2),v=tn,x=gn(e,je.__wbindgen_export,je.__wbindgen_export2),T=tn,k=gn(a,je.__wbindgen_export,je.__wbindgen_export2),L=tn;je.srpDerivePrivateKey(p,N,v,x,T,k,L);var c=yt().getInt32(p+4*0,!0),d=yt().getInt32(p+4*1,!0),m=yt().getInt32(p+4*2,!0),f=yt().getInt32(p+4*3,!0),g=c,E=d;if(f)throw g=0,E=0,Ga(m);return i=g,s=E,Tr(g,E)}finally{je.__wbindgen_add_to_stack_pointer(16),je.__wbindgen_export4(i,s,1)}}function _L(r,e,a,i,s){try{const f=je.__wbindgen_add_to_stack_pointer(-16),g=gn(r,je.__wbindgen_export,je.__wbindgen_export2),E=tn,p=gn(e,je.__wbindgen_export,je.__wbindgen_export2),N=tn,v=gn(a,je.__wbindgen_export,je.__wbindgen_export2),x=tn,T=gn(i,je.__wbindgen_export,je.__wbindgen_export2),k=tn,L=gn(s,je.__wbindgen_export,je.__wbindgen_export2),B=tn;je.srpDeriveSession(f,g,E,p,N,v,x,T,k,L,B);var c=yt().getInt32(f+4*0,!0),d=yt().getInt32(f+4*1,!0),m=yt().getInt32(f+4*2,!0);if(m)throw Ga(d);return Ga(c)}finally{je.__wbindgen_add_to_stack_pointer(16)}}function FL(r){let e,a;try{const g=je.__wbindgen_add_to_stack_pointer(-16),E=gn(r,je.__wbindgen_export,je.__wbindgen_export2),p=tn;je.srpDeriveVerifier(g,E,p);var i=yt().getInt32(g+4*0,!0),s=yt().getInt32(g+4*1,!0),c=yt().getInt32(g+4*2,!0),d=yt().getInt32(g+4*3,!0),m=i,f=s;if(d)throw m=0,f=0,Ga(c);return e=m,a=f,Tr(m,f)}finally{je.__wbindgen_add_to_stack_pointer(16),je.__wbindgen_export4(e,a,1)}}function OL(){try{const i=je.__wbindgen_add_to_stack_pointer(-16);je.srpGenerateEphemeral(i);var r=yt().getInt32(i+4*0,!0),e=yt().getInt32(i+4*1,!0),a=yt().getInt32(i+4*2,!0);if(a)throw Ga(e);return Ga(r)}finally{je.__wbindgen_add_to_stack_pointer(16)}}function jL(){let r,e;try{const s=je.__wbindgen_add_to_stack_pointer(-16);je.srpGenerateSalt(s);var a=yt().getInt32(s+4*0,!0),i=yt().getInt32(s+4*1,!0);return r=a,e=i,Tr(a,i)}finally{je.__wbindgen_add_to_stack_pointer(16),je.__wbindgen_export4(r,e,1)}}const PL=new Set(["basic","cors","default"]);async function HL(r,e){if(typeof Response=="function"&&r instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(r,e)}catch(i){if(r.ok&&PL.has(r.type)&&r.headers.get("Content-Type")!=="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",i);else throw i}const a=await r.arrayBuffer();return await WebAssembly.instantiate(a,e)}else{const a=await WebAssembly.instantiate(r,e);return a instanceof WebAssembly.Instance?{instance:a,module:r}:a}}function zL(){const r={};return r.wbg={},r.wbg.__wbg_Error_52673b7de5a0ca89=function(e,a){const i=Error(Tr(e,a));return xt(i)},r.wbg.__wbg_Number_2d1dcfcf4ec51736=function(e){return Number($e(e))},r.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,a){const i=String($e(a)),s=gn(i,je.__wbindgen_export,je.__wbindgen_export2),c=tn;yt().setInt32(e+4*1,c,!0),yt().setInt32(e+4*0,s,!0)},r.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(e,a){const i=$e(a),s=typeof i=="bigint"?i:void 0;yt().setBigInt64(e+8*1,vr(s)?BigInt(0):s,!0),yt().setInt32(e+4*0,!vr(s),!0)},r.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(e){const a=$e(e),i=typeof a=="boolean"?a:void 0;return vr(i)?16777215:i?1:0},r.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(e,a){const i=rh($e(a)),s=gn(i,je.__wbindgen_export,je.__wbindgen_export2),c=tn;yt().setInt32(e+4*1,c,!0),yt().setInt32(e+4*0,s,!0)},r.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(e,a){return $e(e)in $e(a)},r.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(e){return typeof $e(e)=="bigint"},r.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(e){return typeof $e(e)=="function"},r.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(e){const a=$e(e);return typeof a=="object"&&a!==null},r.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030=function(e){return typeof $e(e)=="string"},r.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(e){return $e(e)===void 0},r.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(e,a){return $e(e)===$e(a)},r.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(e,a){return $e(e)==$e(a)},r.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(e,a){const i=$e(a),s=typeof i=="number"?i:void 0;yt().setFloat64(e+8*1,vr(s)?0:s,!0),yt().setInt32(e+4*0,!vr(s),!0)},r.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(e,a){const i=$e(a),s=typeof i=="string"?i:void 0;var c=vr(s)?0:gn(s,je.__wbindgen_export,je.__wbindgen_export2),d=tn;yt().setInt32(e+4*1,d,!0),yt().setInt32(e+4*0,c,!0)},r.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(e,a){throw new Error(Tr(e,a))},r.wbg.__wbg_call_3020136f7a2d6e44=function(){return fs(function(e,a,i){const s=$e(e).call($e(a),$e(i));return xt(s)},arguments)},r.wbg.__wbg_call_abb4ff46ce38be40=function(){return fs(function(e,a){const i=$e(e).call($e(a));return xt(i)},arguments)},r.wbg.__wbg_crypto_86f2631e91b51511=function(e){const a=$e(e).crypto;return xt(a)},r.wbg.__wbg_done_62ea16af4ce34b24=function(e){return $e(e).done},r.wbg.__wbg_entries_83c79938054e065f=function(e){const a=Object.entries($e(e));return xt(a)},r.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,a){let i,s;try{i=e,s=a,console.error(Tr(e,a))}finally{je.__wbindgen_export4(i,s,1)}},r.wbg.__wbg_getRandomValues_b3f15fcbfabb0f8b=function(){return fs(function(e,a){$e(e).getRandomValues($e(a))},arguments)},r.wbg.__wbg_get_6b7bd52aca3f9671=function(e,a){const i=$e(e)[a>>>0];return xt(i)},r.wbg.__wbg_get_af9dab7e9603ea93=function(){return fs(function(e,a){const i=Reflect.get($e(e),$e(a));return xt(i)},arguments)},r.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,a){const i=$e(e)[$e(a)];return xt(i)},r.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(e){let a;try{a=$e(e)instanceof ArrayBuffer}catch{a=!1}return a},r.wbg.__wbg_instanceof_Map_084be8da74364158=function(e){let a;try{a=$e(e)instanceof Map}catch{a=!1}return a},r.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(e){let a;try{a=$e(e)instanceof Uint8Array}catch{a=!1}return a},r.wbg.__wbg_isArray_51fd9e6422c0a395=function(e){return Array.isArray($e(e))},r.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(e){return Number.isSafeInteger($e(e))},r.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){return xt(Symbol.iterator)},r.wbg.__wbg_length_22ac23eaec9d8053=function(e){return $e(e).length},r.wbg.__wbg_length_d45040a40c570362=function(e){return $e(e).length},r.wbg.__wbg_msCrypto_d562bbe83e0d4b91=function(e){const a=$e(e).msCrypto;return xt(a)},r.wbg.__wbg_new_1ba21ce319a06297=function(){const e=new Object;return xt(e)},r.wbg.__wbg_new_25f239778d6112b9=function(){const e=new Array;return xt(e)},r.wbg.__wbg_new_6421f6084cc5bc5a=function(e){const a=new Uint8Array($e(e));return xt(a)},r.wbg.__wbg_new_8a6f238a6ece86ea=function(){const e=new Error;return xt(e)},r.wbg.__wbg_new_b546ae120718850e=function(){return xt(new Map)},r.wbg.__wbg_new_no_args_cb138f77cf6151ee=function(e,a){const i=new Function(Tr(e,a));return xt(i)},r.wbg.__wbg_new_with_length_aa5eaf41d35235e5=function(e){const a=new Uint8Array(e>>>0);return xt(a)},r.wbg.__wbg_next_138a17bbf04e926c=function(e){const a=$e(e).next;return xt(a)},r.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return fs(function(e){const a=$e(e).next();return xt(a)},arguments)},r.wbg.__wbg_node_e1f24f89a7336c2e=function(e){const a=$e(e).node;return xt(a)},r.wbg.__wbg_process_3975fd6c72f520aa=function(e){const a=$e(e).process;return xt(a)},r.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(e,a,i){Uint8Array.prototype.set.call(SE(e,a),$e(i))},r.wbg.__wbg_randomFillSync_f8c153b79f285817=function(){return fs(function(e,a){$e(e).randomFillSync(Ga(a))},arguments)},r.wbg.__wbg_require_b74f47fc2d022fd6=function(){return fs(function(){const e=sv.require;return xt(e)},arguments)},r.wbg.__wbg_set_3f1d0b984ed272ed=function(e,a,i){$e(e)[Ga(a)]=Ga(i)},r.wbg.__wbg_set_7df433eea03a5c14=function(e,a,i){$e(e)[a>>>0]=Ga(i)},r.wbg.__wbg_set_efaaf145b9377369=function(e,a,i){const s=$e(e).set($e(a),$e(i));return xt(s)},r.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,a){const i=$e(a).stack,s=gn(i,je.__wbindgen_export,je.__wbindgen_export2),c=tn;yt().setInt32(e+4*1,c,!0),yt().setInt32(e+4*0,s,!0)},r.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335=function(){const e=typeof global>"u"?null:global;return vr(e)?0:xt(e)},r.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1=function(){const e=typeof globalThis>"u"?null:globalThis;return vr(e)?0:xt(e)},r.wbg.__wbg_static_accessor_SELF_08f5a74c69739274=function(){const e=typeof self>"u"?null:self;return vr(e)?0:xt(e)},r.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024=function(){const e=typeof window>"u"?null:window;return vr(e)?0:xt(e)},r.wbg.__wbg_subarray_845f2f5bce7d061a=function(e,a,i){const s=$e(e).subarray(a>>>0,i>>>0);return xt(s)},r.wbg.__wbg_value_57b7b035e117f7ee=function(e){const a=$e(e).value;return xt(a)},r.wbg.__wbg_versions_4e31226f5e8dc909=function(e){const a=$e(e).versions;return xt(a)},r.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,a){const i=Tr(e,a);return xt(i)},r.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){const a=BigInt.asUintN(64,e);return xt(a)},r.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return xt(e)},r.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,a){const i=SE(e,a);return xt(i)},r.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return xt(e)},r.wbg.__wbindgen_object_clone_ref=function(e){const a=$e(e);return xt(a)},r.wbg.__wbindgen_object_drop_ref=function(e){Ga(e)},r}function QL(r,e){return je=r.exports,md.__wbindgen_wasm_module=e,hs=null,Ol=null,je.__wbindgen_start(),je}async function md(r){if(je!==void 0)return je;typeof r<"u"&&(Object.getPrototypeOf(r)===Object.prototype?{module_or_path:r}=r:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof r>"u"&&(r=new URL("aliasvault_core_bg.wasm",self.location.href));const e=zL();(typeof r=="string"||typeof Request=="function"&&r instanceof Request||typeof URL=="function"&&r instanceof URL)&&(r=fetch(r));const{instance:a,module:i}=await HL(await r,e);return QL(a,i)}const vu={type:"Argon2Id",settings:JSON.stringify({DegreeOfParallelism:1,MemorySize:19456,Iterations:2})},Sa=class Sa{static async initWasm(){if(!this.wasmInitialized)return this.wasmInitPromise?this.wasmInitPromise:(this.wasmInitPromise=(async()=>{try{const e=li.runtime.getURL("src/aliasvault_core_bg.wasm"),i=await(await fetch(e)).arrayBuffer();await md({module_or_path:i}),this.wasmInitialized=!0}catch(e){throw this.wasmInitPromise=null,e}})(),this.wasmInitPromise)}static normalizeUsername(e){return e.toLowerCase().trim()}static async generateSalt(){return await this.initWasm(),jL()}static bytesToHexString(e){return Array.from(e).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase()}static bytesToBase64(e){return btoa(String.fromCharCode(...e))}static async derivePrivateKey(e,a,i){return await this.initWasm(),ML(e,Sa.normalizeUsername(a),i)}static async deriveVerifier(e){return await this.initWasm(),FL(e)}static async generateEphemeral(){return await this.initWasm(),OL()}static async deriveSession(e,a,i,s,c){return await this.initWasm(),_L(e,a,i,Sa.normalizeUsername(s),c)}static async prepareCredentials(e,a,i,s){const c=await Ft.deriveKeyFromPassword(e,a,i,s);return{passwordHashString:Sa.bytesToHexString(c),passwordHashBase64:Sa.bytesToBase64(c)}}static generateSrpIdentity(){return crypto.randomUUID()}static async prepareRegistration(e,a){const i=Sa.normalizeUsername(e),s=await Sa.generateSalt(),c=Sa.generateSrpIdentity(),d=await Sa.prepareCredentials(a,s,vu.type,vu.settings),m=await Sa.derivePrivateKey(s,c,d.passwordHashString),f=await Sa.deriveVerifier(m);return{username:i,salt:s,verifier:f,encryptionType:vu.type,encryptionSettings:vu.settings,srpIdentity:c}}static async registerUser(e,a,i){try{const s=await Sa.prepareRegistration(a,i),c=e.replace(/\/$/,"")+"/v1/",d=await fetch(`${c}Auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!d.ok){const f=await d.text();let g=`Registration failed with status ${d.status}`;try{g=JSON.parse(f).title||g}catch{g=f||g}return{success:!1,error:g}}return{success:!0,token:await d.json()}}catch(s){return{success:!1,error:s instanceof Error?s.message:"Unknown error occurred"}}}static async login(e,a,i,s=!1){try{const c=e.replace(/\/$/,"")+"/v1/",d=Sa.normalizeUsername(a),m=await fetch(`${c}Auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d})});if(!m.ok){const k=await m.text();try{return{success:!1,error:JSON.parse(k).title}}catch{return{success:!1,error:k||"Login initiation failed"}}}const f=await m.json(),g=f.srpIdentity??d,E=await Sa.prepareCredentials(i,f.salt,f.encryptionType,f.encryptionSettings),p=await Sa.generateEphemeral(),N=await Sa.derivePrivateKey(f.salt,g,E.passwordHashString),v=await Sa.deriveSession(p.secret,f.serverEphemeral,f.salt,g,N),x=await fetch(`${c}Auth/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:d,rememberMe:s,clientPublicEphemeral:p.public,clientSessionProof:v.proof})});if(!x.ok){const k=await x.text();try{return{success:!1,error:JSON.parse(k).title}}catch{return{success:!1,error:k||"Login validation failed"}}}const T=await x.json();return T.requiresTwoFactor?{success:!1,requiresTwoFactor:!0,loginResponse:f,passwordHashBase64:E.passwordHashBase64}:{success:!0,token:T.token,passwordHashBase64:E.passwordHashBase64,loginResponse:f}}catch(c){return{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}}};Qe(Sa,"wasmInitialized",!1),Qe(Sa,"wasmInitPromise",null);let on=Sa;class DI{constructor(e){Qe(this,"webApiService");this.webApiService=e}async initiateLogin(e){const a=on.normalizeUsername(e),i=await this.webApiService.rawFetch("Auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:a})});if(i.status===400){const c=await i.json();throw new si(c.title)}return await i.json()}async validateLogin(e,a,i,s){const c=on.normalizeUsername(e),d=s.srpIdentity??c,m=await on.generateEphemeral(),f=await on.derivePrivateKey(s.salt,d,a),g=await on.deriveSession(m.secret,s.serverEphemeral,s.salt,d,f),E={username:c,rememberMe:i,clientPublicEphemeral:m.public,clientSessionProof:g.proof},p=await this.webApiService.rawFetch("Auth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(E)});if(p.status===400){const v=await p.json();throw new si(v.title)}return await p.json()}async validateLogin2Fa(e,a,i,s,c){const d=on.normalizeUsername(e),m=s.srpIdentity??d,f=await on.generateEphemeral(),g=await on.derivePrivateKey(s.salt,m,a),E=await on.deriveSession(f.secret,s.serverEphemeral,s.salt,m,g),p={username:d,rememberMe:i,clientPublicEphemeral:f.public,clientSessionProof:E.proof,code2Fa:c},N=await this.webApiService.rawFetch("Auth/validate-2fa",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(N.status===400){const x=await N.json();throw new si(x.title)}return await N.json()}}let Nf=!1;const VL=()=>{const{t:r}=Ze(),e=La(),a=dr(),i=zt(),{setHeaderButtons:s}=mr(),[c,d]=I.useState({username:"",password:""}),{showLoading:m,hideLoading:f,setIsInitialLoading:g}=fa(),[E,p]=I.useState(!0),[N,v]=I.useState(!1),[x,T]=I.useState(null),[k,L]=I.useState(null),[B,S]=I.useState(null),[O,M]=I.useState(!1),[P,G]=I.useState(""),[H,z]=I.useState(null),[V,K]=I.useState(null),[$,W]=I.useState(!1),ne=ur(),he=new DI(ne),q=async(ee,ie)=>{const ve=await Se.getItem("local:encryptedVault"),Ne=await Se.getItem("local:serverRevision");let Re=ee.vault.blob;if(ve&&Ne!==null)try{const ke=await Ft.symmetricDecrypt(ve,ie);if(Ne>=ee.vault.currentRevisionNumber)return console.info(`Existing vault is more advanced (rev ${Ne} >= ${ee.vault.currentRevisionNumber}), preserving local vault and will upload to server`),Re=ve,await ft("STORE_VAULT_METADATA",{publicEmailDomainList:ee.vault.publicEmailDomainList,privateEmailDomainList:ee.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:ee.vault.hiddenPrivateEmailDomainList},"background"),i.loadDatabase(ke);console.info(`Server vault is more advanced (rev ${ee.vault.currentRevisionNumber} > ${Ne}), using server vault`)}catch{console.info("Existing vault could not be decrypted (password changed), using server vault")}await ft("STORE_ENCRYPTED_VAULT",{vaultBlob:ee.vault.blob,serverRevision:ee.vault.currentRevisionNumber},"background"),await ft("STORE_VAULT_METADATA",{publicEmailDomainList:ee.vault.publicEmailDomainList,privateEmailDomainList:ee.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:ee.vault.hiddenPrivateEmailDomainList},"background");const Be=await Ft.symmetricDecrypt(Re,ie);return i.loadDatabase(Be)},re=async(ee,ie,ve,Ne,Re)=>{const Be=await ne.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${ie}`}});await a.setAuthTokens(ee,ie,ve),await i.storeEncryptionKey(Ne),await i.storeEncryptionKeyDerivationParams({salt:Re.salt,encryptionType:Re.encryptionType,encryptionSettings:Re.encryptionSettings});const ke=await q(Be,Ne);try{if(await ke.hasPendingMigrations()){e("/upgrade",{replace:!0}),f();return}}catch(Ve){await a.logout(),K(Ve instanceof Error?Ve.message:r("common.errors.unknownError")),f();return}Nf=!1,e("/reinitialize",{replace:!0}),f()};I.useEffect(()=>{(async()=>{const ie=await Se.getItem("local:clientUrl");let ve=en.DEFAULT_CLIENT_URL;if(ie&&ie.length>0&&(ve=ie),z(ve),!Nf){Nf=!0;const Ne=await Se.getItem("local:username");Ne&&d(Re=>({...Re,username:Ne}))}g(!1)})()},[g]),I.useEffect(()=>{const ee=pa.isPopup()?null:l.jsx(l.Fragment,{children:l.jsx(wn,{onClick:()=>pa.openInNewPopup(),title:"Open in new window",iconType:Fa.EXPAND})});return s(ee),()=>{s(null)}},[s]);const Ee=async ee=>{ee.preventDefault(),K(null);try{m(),a.clearGlobalMessage();const ie=on.normalizeUsername(c.username),ve=await he.initiateLogin(ie),{passwordHashString:Ne,passwordHashBase64:Re}=await on.prepareCredentials(c.password,ve.salt,ve.encryptionType,ve.encryptionSettings),Be=await he.validateLogin(ie,Ne,E,ve);if(Be.requiresTwoFactor){T(ve),L(Ne),S(Re),M(!0),f();return}if(!Be.token)throw new Error(r("common.errors.unknownError"));await re(ie,Be.token.token,Be.token.refreshToken,Re,ve)}catch(ie){ie instanceof si?K(r("common.apiErrors."+ie.message)):K(r("auth.errors.serverError")),f()}},pe=async ee=>{ee.preventDefault(),K(null);try{if(m(),!k||!B||!x)throw new Error(r("common.errors.unknownError"));const ie=P.trim();if(!/^\d{6}$/.test(ie))throw new Error(r("auth.errors.invalidCode"));const ve=on.normalizeUsername(c.username),Ne=await he.validateLogin2Fa(ve,k,E,x,parseInt(P));if(!Ne.token)throw new Error(r("common.errors.unknownError"));await re(ve,Ne.token.token,Ne.token.refreshToken,B,x),M(!1),G(""),L(null),S(null),T(null)}catch(ie){console.error("2FA error:",ie),ie instanceof si?K(r("common.apiErrors."+ie.message)):K(r("auth.errors.serverError")),f()}},j=async ee=>{m();try{a.clearGlobalMessage();const ie=await ne.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${ee.token}`}});await a.setAuthTokens(ee.username,ee.token,ee.refreshToken),await i.storeEncryptionKey(ee.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:ee.salt,encryptionType:ee.encryptionType,encryptionSettings:ee.encryptionSettings});const ve=await q(ie,ee.decryptionKey);try{if(await ve.hasPendingMigrations()){e("/upgrade",{replace:!0}),f(),g(!1);return}}catch(Ne){await a.logout(),K(Ne instanceof Error?Ne.message:r("common.errors.unknownError")),f();return}f(),g(!1),e("/reinitialize",{replace:!0})}catch(ie){throw K(ie instanceof Error?ie.message:r("common.errors.unknownError")),f(),ie}},X=ee=>{const{name:ie,value:ve}=ee.target;d(Ne=>({...Ne,[ie]:ve}))};return O?l.jsx("div",{children:l.jsxs("form",{onSubmit:pe,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[V&&l.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:V}),l.jsxs("div",{className:"mb-6",children:[l.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:r("auth.twoFactorTitle")}),l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:r("auth.authCode")}),l.jsx("input",{className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-800 dark:border-gray-600 leading-tight focus:outline-none focus:shadow-outline",id:"twoFactorCode",type:"text",value:P,onChange:ee=>G(ee.target.value),placeholder:r("auth.authCodePlaceholder"),required:!0})]}),l.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[l.jsx(Aa,{type:"submit",children:r("auth.verify")}),l.jsx(Aa,{type:"button",onClick:()=>{d({username:"",password:""}),M(!1),G(""),L(null),S(null),T(null),K(null)},variant:"secondary",children:r("common.cancel")})]}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:r("auth.twoFactorNote")})]})}):l.jsx("div",{className:"flex flex-col items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-md",children:[l.jsxs("form",{onSubmit:Ee,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[l.jsxs("div",{className:"text-center mb-6",children:[l.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r("auth.loginTitle")}),l.jsx(NL,{})]}),V&&l.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:V}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"username",children:r("auth.username")}),l.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"username",type:"text",name:"username",placeholder:r("auth.usernamePlaceholder"),value:c.username,onChange:X,required:!0})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:r("common.password")}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 pr-10 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"password",type:N?"text":"password",name:"password",placeholder:r("auth.passwordPlaceholder"),value:c.password,onChange:X,required:!0}),l.jsx("button",{type:"button",className:"absolute right-2 top-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",onClick:()=>v(!N),tabIndex:-1,children:l.jsx(Uh,{type:N?Fa.EYE_OFF:Fa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),l.jsx("div",{className:"mb-6",children:l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"checkbox",checked:E,onChange:ee=>p(ee.target.checked),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-200",children:r("auth.rememberMe")})]})}),l.jsx(Aa,{type:"submit",children:l.jsx("div",{className:"flex items-center justify-center gap-2",children:r("auth.loginButton")})}),l.jsxs("button",{type:"button",onClick:()=>W(!0),className:"w-full max-w-md mt-4 px-4 py-2 text-sm font-medium text-center text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 dark:bg-gray-600 dark:text-white dark:border-gray-500 dark:hover:bg-gray-500 dark:focus:ring-gray-700 flex items-center justify-center gap-2",children:[l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),r("auth.loginWithMobile")]}),l.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[r("auth.noAccount")," ",l.jsx("a",{href:H??"",target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500",children:r("auth.createVault")})]})]}),l.jsx(LI,{isOpen:$,onClose:()=>W(!1),onSuccess:j,webApi:ne,mode:"login"})]})})},As=({type:r,message:e,className:a=""})=>{const i=()=>{const s="p-3 border rounded-md text-sm";switch(r){case"error":return`${s} bg-red-100 dark:bg-red-900/30 border-red-300 dark:border-red-700 text-red-800 dark:text-red-300`;case"success":return`${s} bg-green-100 dark:bg-green-900/30 border-green-300 dark:border-green-700 text-green-800 dark:text-green-300`;case"warning":return`${s} bg-yellow-100 dark:bg-yellow-900/30 border-yellow-300 dark:border-yellow-700 text-yellow-800 dark:text-yellow-300`;case"info":return`${s} bg-blue-100 dark:bg-blue-900/30 border-blue-300 dark:border-blue-700 text-blue-800 dark:text-blue-300`;default:return s}};return l.jsx("div",{className:`${i()} ${a}`,children:e})},Mh=({isOpen:r,onClose:e,onConfirm:a})=>{const{t:i}=Ze(),[s,c]=I.useState(null),d=I.useCallback(async()=>{try{const m=await ft("GET_SYNC_STATE",{},"background");c(m.isDirty)}catch(m){console.error("Failed to check sync state:",m),c(!1)}},[]);return I.useEffect(()=>{r&&(c(null),d())},[r,d]),!r||s===null?null:s?l.jsxs(Zn,{isOpen:r,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[l.jsxs("div",{className:"flex items-start mb-4",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("svg",{className:"h-6 w-6 text-amber-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}),l.jsx("div",{className:"ml-3",children:l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:i("logout.unsyncedChangesTitle")})})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("logout.unsyncedChangesWarning")}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("button",{onClick:e,className:"flex-1 px-4 py-2 bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-md transition-colors",children:i("common.cancel")}),l.jsx("button",{onClick:a,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:i("logout.logoutAnyway")})]})]}):l.jsxs(Zn,{isOpen:r,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:i("common.logout")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:i("auth.logoutConfirm")}),l.jsxs("div",{className:"flex gap-3",children:[l.jsx("button",{onClick:e,className:"flex-1 px-4 py-2 bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-md transition-colors",children:i("common.cancel")}),l.jsx("button",{onClick:a,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:i("common.logout")})]})]})},kE=()=>{var a;const{t:r}=Ze(),{username:e}=Zl();return l.jsxs("div",{className:"flex flex-col items-center mb-6",children:[l.jsx("div",{className:"w-12 h-12 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center mb-3",children:l.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-2xl font-medium",children:((a=e==null?void 0:e[0])==null?void 0:a.toUpperCase())||"?"})}),l.jsx("p",{className:"font-medium text-gray-900 dark:text-white text-base",children:e}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r("common.loggedIn")})]})},GL=()=>{const{t:r}=Ze(),e=dr(),a=Zl(),i=zt(),s=La(),{setHeaderButtons:c}=mr(),d=ur(),m=new DI(d),[f,g]=I.useState("password"),[E,p]=I.useState(!1),[N,v]=I.useState(""),[x,T]=I.useState(!1),[k,L]=I.useState(""),[B,S]=I.useState(6),O=I.useRef(null),M=I.useRef(null),[P,G]=I.useState(null),{showLoading:H,hideLoading:z,setIsInitialLoading:V}=fa(),[K,$]=I.useState(!1),[W,ne]=I.useState(!1),he=async()=>{try{const Be=await d.getStatus();if(Be.serverVersion==="0.0.0")return V(!1),await i.setIsOffline(!0),{online:!1,error:null};const ke=d.validateStatusResponse(Be);return ke!==null?(await e.logout(r("common.errors."+ke)),{online:!1,error:ke}):(V(!1),await i.setIsOffline(!1),{online:!0,error:null})}catch{return V(!1),{online:!1,error:"sessionExpired"}}};I.useEffect(()=>{(async()=>{const[ke,Ve]=await Promise.all([iI(),Yk()]);p(ke),S(Ve||6),g(ke?"pin":"password"),await he()})()},[]),I.useEffect(()=>{const Be=pa.isPopup()?null:l.jsx(wn,{onClick:()=>pa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Fa.EXPAND});return c(Be),()=>{c(null)}},[c,r]),I.useEffect(()=>{if(f!=="pin")return;const Be=()=>{O.current&&O.current.focus()},ke=()=>{Be()},Ve=()=>{Be()};Be();const vt=M.current;return vt&&vt.addEventListener("click",ke),window.addEventListener("focus",Ve),()=>{vt&&vt.removeEventListener("click",ke),window.removeEventListener("focus",Ve)}},[f]);const q=async Be=>{Be.preventDefault(),G(null),H();const ke=await he();if(ke.error){z();return}try{let Ve;if(ke.online){const Ct=await m.initiateLogin(a.username);Ve=(await on.prepareCredentials(N,Ct.salt,Ct.encryptionType,Ct.encryptionSettings)).passwordHashBase64,await i.storeEncryptionKeyDerivationParams({salt:Ct.salt,encryptionType:Ct.encryptionType,encryptionSettings:Ct.encryptionSettings})}else{const Ct=await ft("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(!Ct){G(r("common.errors.serverNotAvailable")),z();return}Ve=(await on.prepareCredentials(N,Ct.salt,Ct.encryptionType,Ct.encryptionSettings)).passwordHashBase64,await i.setIsOffline(!0)}await i.storeEncryptionKey(Ve);const vt=await i.loadStoredDatabase();if(!vt){G(r("auth.errors.wrongPassword")),z();return}if(await vt.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await Se.setItem(Ao,0),await Hy(),s("/reinitialize",{replace:!0})}catch(Ve){Ve instanceof vs?await e.logout(Ve.message):G(r("auth.errors.wrongPassword")),console.error("Unlock error:",Ve)}finally{z()}},re=I.useCallback(async Be=>{L(Be),G(null),Be.length===B&&(await new Promise(ke=>setTimeout(ke,50)),await j(Be))},[B]),Ee=Be=>{k.length<8&&re(k+Be)},pe=()=>{L(k.slice(0,-1)),G(null)},j=async(Be=k)=>{if(Be.length===B){G(null),H();try{const ke=await Xk(Be);(await he()).online||await i.setIsOffline(!0),await i.storeEncryptionKey(ke);const vt=await i.loadStoredDatabase();if(!vt)throw new $f(3);if(await vt.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await Se.setItem(Ao,0),s("/reinitialize",{replace:!0}),z()}catch(ke){if(ke instanceof Fu)p(!1),g("password"),G(r("settings.unlockMethod.pinLocked"));else if(ke instanceof $f){const Ve=ke.attemptsRemaining;G(Ve===1?r("settings.unlockMethod.incorrectPinSingular"):r("settings.unlockMethod.incorrectPin",{attemptsRemaining:Ve})),L("")}else ke instanceof ql?(G(r("settings.unlockMethod.invalidPinFormat")),L("")):(console.error("PIN unlock failed:",ke),G(r("common.errors.unknownErrorTryAgain")),L(""));z()}}},X=()=>{ne(!0)},ee=async()=>{ne(!1);try{await d.revokeTokens(),await a.clearAuthUserInitiated()}catch(Be){console.error("Error during logout:",Be)}},ie=async Be=>{H();try{await d.revokeTokens(),await a.setAuthTokens(Be.username,Be.token,Be.refreshToken),await i.storeEncryptionKey(Be.decryptionKey),await i.storeEncryptionKeyDerivationParams({salt:Be.salt,encryptionType:Be.encryptionType,encryptionSettings:Be.encryptionSettings});const ke=await i.loadStoredDatabase();if(!ke){G(r("common.errors.unknownErrorTryAgain")),z();return}if(await ke.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await Se.setItem(Ao,0),await Hy(),s("/reinitialize",{replace:!0})}catch(ke){ke instanceof vs?await e.logout(ke.message):G(r("common.errors.unknownErrorTryAgain")),console.error("Mobile unlock error:",ke)}finally{z()}},ve=()=>{g("password"),G(null)},Ne=()=>{g("pin"),G(null)},Re=Array.from({length:B},(Be,ke)=>l.jsx("div",{className:`w-4 h-4 rounded-full border-2 transition-all ${ke<k.length?"bg-primary-500 border-primary-500":"bg-transparent border-gray-300 dark:border-gray-600"}`},ke));return f==="pin"?l.jsx("div",{ref:M,className:"flex flex-col items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-md",children:[l.jsx(kE,{}),l.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[l.jsxs("div",{className:"text-center mb-4",children:[l.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white mb-1",children:r("auth.unlockTitle")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("auth.enterPinToUnlock")})]}),l.jsx("div",{className:"flex justify-center gap-2 mb-4",children:Re}),P&&l.jsx(As,{type:"error",message:P,className:"mb-3 text-center"}),l.jsx("input",{ref:O,type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:k,onChange:Be=>re(Be.target.value.replace(/\D/g,"")),className:"w-0 h-0 opacity-0 absolute",autoFocus:!0,"aria-label":"PIN input"}),l.jsx("div",{children:l.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[[1,2,3,4,5,6,7,8,9].map(Be=>l.jsx("button",{type:"button",onClick:()=>Ee(Be.toString()),className:"h-12 flex items-center justify-center text-xl font-semibold bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-lg transition-colors active:scale-95",children:Be},Be)),l.jsx("div",{}),l.jsx("button",{type:"button",onClick:()=>Ee("0"),className:"h-12 flex items-center justify-center text-xl font-semibold bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-lg transition-colors active:scale-95",children:"0"}),l.jsx("button",{type:"button",onClick:pe,className:"h-12 flex items-center justify-center bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-white rounded-lg transition-colors active:scale-95","aria-label":"Backspace",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2M3 12l6.414 6.414a2 2 0 001.414.586H19a2 2 0 002-2V7a2 2 0 00-2-2h-8.172a2 2 0 00-1.414.586L3 12z"})})})]})})]}),l.jsx("div",{className:"mt-4",children:l.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:l.jsx("button",{type:"button",onClick:ve,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:r("auth.useMasterPassword")})})})]})}):l.jsxs("div",{className:"flex flex-col items-center justify-center p-4",children:[l.jsxs("div",{className:"w-full max-w-md",children:[l.jsx(kE,{}),l.jsxs("form",{onSubmit:q,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[l.jsx("div",{className:"text-center mb-6",children:l.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:r("auth.unlockTitle")})}),P&&l.jsx(As,{type:"error",message:P,className:"mb-4 text-center"}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:r("auth.masterPassword")}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{className:"shadow appearance-none border rounded-lg w-full py-2 px-3 pr-10 text-gray-700 dark:text-gray-200 dark:bg-gray-700 dark:border-gray-600 leading-tight focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",id:"password",type:x?"text":"password",value:N,onChange:Be=>v(Be.target.value),placeholder:r("auth.passwordPlaceholder"),required:!0,autoFocus:!0}),l.jsx("button",{type:"button",className:"absolute right-2 top-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",onClick:()=>T(!x),tabIndex:-1,children:l.jsx(Uh,{type:x?Fa.EYE_OFF:Fa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),l.jsx(Aa,{type:"submit",children:r("auth.unlockVault")}),!i.isOffline&&l.jsxs("button",{type:"button",onClick:()=>$(!0),className:"w-full max-w-md mt-4 px-4 py-2 text-sm font-medium text-center text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-100 focus:ring-4 focus:ring-gray-200 dark:bg-gray-600 dark:text-white dark:border-gray-500 dark:hover:bg-gray-500 dark:focus:ring-gray-700 flex items-center justify-center gap-2",children:[l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"})}),r("auth.unlockWithMobile")]}),l.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[r("auth.switchAccounts")," ",l.jsx("button",{type:"button",onClick:X,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:r("common.logout")})]})]})]}),E&&l.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:l.jsx("button",{type:"button",onClick:Ne,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:r("auth.unlockWithPin")})}),l.jsx(LI,{isOpen:K,onClose:()=>$(!1),onSuccess:ie,webApi:d,mode:"unlock"}),l.jsx(Mh,{isOpen:W,onClose:()=>ne(!1),onConfirm:ee})]})},KL=()=>{const r=La(),{t:e}=Ze(),a=()=>{const i=new URL(window.location.href);i.searchParams.delete("mode"),window.history.replaceState({},"",i),r("/items")};return l.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[l.jsx("div",{className:"mb-4 text-green-600 dark:text-green-400",children:l.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),l.jsx("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:e("auth.unlockSuccessTitle")}),l.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-400",children:e("auth.unlockSuccessDescription")}),l.jsxs("div",{className:"space-y-3 w-full",children:[l.jsx("button",{onClick:()=>window.close(),className:"w-full px-4 py-2 text-white bg-primary-600 rounded hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2",children:e("auth.closePopup")}),l.jsx("button",{onClick:a,className:"w-full px-4 py-2 text-gray-700 bg-gray-100 rounded hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600",children:e("auth.browseVault")})]})]})},$u=({isOpen:r,onClose:e,onConfirm:a,title:i,message:s,confirmText:c="",cancelText:d="",variant:m="default"})=>{const f=m==="danger"?"bg-red-600 hover:bg-red-700 focus:ring-red-500":"bg-primary-600 hover:bg-primary-700 focus:ring-primary-500";return l.jsxs(Zn,{isOpen:r,onClose:e,maxWidth:"max-w-lg",showHeaderBorder:!1,bodyClassName:"px-4 pb-4 pt-5",children:[l.jsxs("div",{className:"sm:flex sm:items-start",children:[m==="danger"&&l.jsx("div",{className:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 dark:bg-red-900 sm:mx-0 sm:h-10 sm:w-10",children:l.jsx("svg",{className:"h-6 w-6 text-red-600 dark:text-red-200",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})})}),l.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[l.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:i}),l.jsx("div",{className:"mt-2",children:l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})})]})]}),l.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[c&&l.jsx("button",{type:"button",className:`inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 sm:ml-3 sm:w-auto ${f}`,onClick:a,children:c}),d&&l.jsx("button",{type:"button",className:"mt-3 inline-flex w-full justify-center rounded-md bg-white dark:bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-900 dark:text-gray-200 shadow-sm ring-1 ring-inset ring-gray-300 dark:ring-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-primary-500 sm:mt-0 sm:w-auto",onClick:e,children:d})]})]})};class qL{constructor(){Qe(this,"sqlJsInstance",null);Qe(this,"rustInitialized",!1)}async initRust(){if(this.rustInitialized)return;const e=li.runtime.getURL("src/aliasvault_core_bg.wasm"),i=await(await fetch(e)).arrayBuffer();await md(i),this.rustInitialized=!0}async merge(e,a){try{await this.initRust();const i=this.sqlJsInstance??await Wf({locateFile:d=>`src/${d}`}),s=this.loadDatabase(i,e),c=this.loadDatabase(i,a);try{const d=DL(),m=d.map(N=>({name:N,records:this.readTableAsJson(s,N)})),f=d.map(N=>({name:N,records:this.readTableAsJson(c,N)})),g=JSON.parse(JSON.stringify({local_tables:m,server_tables:f}));console.debug("[VaultMerge] Merge input:",{localTableCount:m.length,serverTableCount:f.length,localTables:m.map(N=>({name:N.name,recordCount:N.records.length})),serverTables:f.map(N=>({name:N.name,recordCount:N.records.length}))});const E=BL(g);for(const N of E.statements){const v=N.params.map(x=>x===void 0?null:x);s.run(N.sql,v)}const p=this.exportDatabase(s);return{success:E.success,mergedVaultBase64:p,stats:{tablesProcessed:E.stats.tables_processed,recordsFromLocal:E.stats.records_from_local,recordsFromServer:E.stats.records_from_server,recordsCreatedLocally:E.stats.records_created_locally,conflicts:E.stats.conflicts}}}finally{s.close(),c.close()}}catch(i){throw console.error("Vault merge failed:",i),i}}async prune(e,a=30){try{await this.initRust();const i=this.sqlJsInstance??await Wf({locateFile:c=>`src/${c}`}),s=this.loadDatabase(i,e);try{const d=["Items","FieldValues","Attachments","TotpCodes","Passkeys"].map(p=>({name:p,records:this.readTableAsJson(s,p)})),m=JSON.parse(JSON.stringify({tables:d,retention_days:a,current_time:new Date().toISOString()})),f=UL(m);for(const p of f.statements){const N=p.params.map(v=>v===void 0?null:v);s.run(p.sql,N)}const g=this.exportDatabase(s),E=f.statements.length;return E>0&&console.info(`[VaultMerge] Pruned expired items from trash (${E} SQL statements executed)`),{success:f.success,prunedVaultBase64:g,statementCount:E}}finally{s.close()}}catch(i){throw console.error("Vault prune failed:",i),i}}loadDatabase(e,a){const i=atob(a),s=new Uint8Array(i.length);for(let c=0;c<i.length;c++)s[c]=i.charCodeAt(c);return new e.Database(s)}exportDatabase(e){e.run("VACUUM");const a=e.export();let i="";for(let s=0;s<a.length;s++)i+=String.fromCharCode(a[s]);return btoa(i)}readTableAsJson(e,a){const i=[],s=e.prepare(`SELECT * FROM ${a}`);for(;s.step();){const c=s.getAsObject(),d=JSON.parse(JSON.stringify(c));i.push(d)}return s.free(),i}}const WL=new qL,gd=()=>{const{t:r}=Ze(),e=dr(),a=zt(),i=ur(),s=I.useCallback(async m=>await a.hasPendingMigrations()?(m==null||m(),!0):!1,[a]),c=I.useCallback(async(m,f,g)=>(await a.setIsOffline(!0),m==null||m(r("common.offlineMode")),f==null||f(),g==null||g(!1),!0),[a,r]),d=I.useCallback(async(m={})=>{const{onSuccess:f,onError:g,onStatus:E,onOffline:p,onUpgradeRequired:N}=m;try{if(!await e.initializeAuth())return!1;E==null||E(r("common.checkingVaultUpdates"));const x=await i.getStatus(),T=await ft("GET_SYNC_STATE",{},"background");if(x.vaultRevision>T.serverRevision&&a.setIsSyncing(!0),x.serverVersion==="0.0.0")return a.dbAvailable?c(E,p,f):(g==null||g(r("common.errors.serverNotAvailable")),!1);const k=i.validateStatusResponse(x);if(k)return k==="clientVersionNotSupported"||k==="serverVersionNotSupported"?(await e.logout(r("common.errors."+k)),!1):(g==null||g(r("common.errors."+k)),!1);const L=await ft("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(L&&x.srpSalt&&x.srpSalt!==L.salt)return await e.logout(r("common.errors.passwordChanged")),!1;if(a.isOffline&&await a.setIsOffline(!1),x.vaultRevision>T.serverRevision){E==null||E(r("common.syncingUpdatedVault"));const B=await i.get("Vault");try{const S=await ft("GET_ENCRYPTION_KEY",{},"background");if(T.isDirty){E==null||E(r("common.mergingVaultChanges"));const P=await ft("GET_ENCRYPTED_VAULT",{},"background");if(P){const G=await Ft.symmetricDecrypt(P,S),H=await Ft.symmetricDecrypt(B.vault.blob,S),z=await WL.merge(G,H);if(z.success){console.info("Vault merge during sync completed:",z.stats);const V=await Ft.symmetricEncrypt(z.mergedVaultBase64,S);if(!(await ft("STORE_ENCRYPTED_VAULT",{vaultBlob:V,serverRevision:B.vault.currentRevisionNumber,expectedMutationSeq:T.mutationSequence},"background")).success)return console.info("Mutation detected during merge, re-syncing..."),d(m);E==null||E(r("common.uploadingVault"));const $=await ft("UPLOAD_VAULT",{},"background");if($.success&&$.status===0)await ft("MARK_VAULT_CLEAN",{mutationSeqAtStart:$.mutationSeqAtStart,newServerRevision:$.newRevisionNumber},"background");else return $.status===2?d(m):(console.error("Failed to upload merged vault:",$.error),g==null||g($.error??r("common.errors.unknownError")),!1);return await ft("STORE_VAULT_METADATA",{publicEmailDomainList:B.vault.publicEmailDomainList,privateEmailDomainList:B.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:B.vault.hiddenPrivateEmailDomainList},"background"),await a.loadDatabase(z.mergedVaultBase64),await a.refreshSyncState(),await s(N)?!1:(f==null||f(!0),!0)}else console.error("Vault merge failed during sync, using server vault")}}if(!(await ft("STORE_ENCRYPTED_VAULT",{vaultBlob:B.vault.blob,serverRevision:B.vault.currentRevisionNumber,expectedMutationSeq:T.mutationSequence},"background")).success)return console.info("Mutation detected during sync, re-syncing..."),d(m);await ft("STORE_VAULT_METADATA",{publicEmailDomainList:B.vault.publicEmailDomainList,privateEmailDomainList:B.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:B.vault.hiddenPrivateEmailDomainList},"background");const M=await Ft.symmetricDecrypt(B.vault.blob,S);return await a.loadDatabase(M),await a.refreshSyncState(),await s(N)?!1:(f==null||f(!0),!0)}catch(S){if(S instanceof vs)return await e.logout(S.message),!1;throw new Error("Vault could not be decrypted, if the problem persists please logout and login again.")}}else if(x.vaultRevision===T.serverRevision){if(T.isDirty){E==null||E(r("common.uploadingVault"));const B=await ft("UPLOAD_VAULT",{},"background");if(B.success&&B.status===0)await ft("MARK_VAULT_CLEAN",{mutationSeqAtStart:B.mutationSeqAtStart,newServerRevision:B.newRevisionNumber},"background"),await a.refreshSyncState();else return B.status===2?d(m):(console.error("Failed to upload pending vault:",B.error),g==null||g(B.error??r("common.errors.unknownError")),!1);return f==null||f(!1),!0}}else if(x.vaultRevision<T.serverRevision){console.warn(`Server data loss detected! Server at rev ${x.vaultRevision}, client at rev ${T.serverRevision}. Uploading to recover server state.`),E==null||E(r("common.uploadingVault"));const B=await ft("UPLOAD_VAULT",{},"background");return B.success&&B.status===0?(await ft("MARK_VAULT_CLEAN",{mutationSeqAtStart:B.mutationSeqAtStart,newServerRevision:B.newRevisionNumber},"background"),await a.refreshSyncState(),console.info(`Server recovery complete: rev ${x.vaultRevision} → ${B.newRevisionNumber}`),f==null||f(!1),!0):B.status===2?(console.info("Another client recovered server first, re-syncing..."),d(m)):(console.error("Server recovery failed:",B.error),g==null||g(r("common.errors.unknownError")),!1)}return await s(N)||f==null||f(!1),!1}catch(v){const x=v instanceof Error?v.message:"Unknown error during vault sync";return console.error("Vault sync error:",v),v instanceof vs?(await e.logout(x),!1):v instanceof si?!1:v instanceof dd&&a.dbAvailable?c(E,p,f):(g==null||g(x),!1)}finally{a.setIsSyncing(!1)}},[e,a,i,r,s,c]);return{syncVault:d}};function Ts(){const r=zt(),{syncVault:e}=gd(),a=I.useRef(!1),i=I.useCallback(async d=>{await d();const m=r.sqliteClient.exportToBase64(),f=await ft("GET_ENCRYPTION_KEY",{},"background"),g=await Ft.symmetricEncrypt(m,f);await ft("STORE_ENCRYPTED_VAULT",{vaultBlob:g,markDirty:!0},"background"),await r.refreshSyncState()},[r]),s=I.useCallback(async()=>{if(!a.current){a.current=!0;try{await e({onSuccess:async()=>{await r.refreshSyncState(),r.getIsOffline()||(await ft("GET_SYNC_STATE",{},"background")).isDirty&&(a.current=!1,await s())},onOffline:()=>{},onError:d=>{console.error("Background sync error:",d)}})}catch(d){console.error("Error during background sync:",d)}finally{a.current=!1}}},[r,e]);return{executeVaultMutationAsync:I.useCallback(async d=>{await i(d),s()},[i,s])}}const YL=()=>{var q;const{t:r}=Ze(),{username:e}=dr(),a=Zl(),i=zt(),{sqliteClient:s}=i,{setHeaderButtons:c}=mr(),[d,m]=I.useState(!1),[f,g]=I.useState(null),[E,p]=I.useState(null),[N,v]=I.useState(null),[x,T]=I.useState(!1),[k,L]=I.useState(!1),[B,S]=I.useState(!1),{setIsInitialLoading:O}=fa(),M=ur(),{executeVaultMutationAsync:P}=Ts(),{syncVault:G}=gd(),H=La();I.useEffect(()=>{const re=pa.isPopup()?null:l.jsx(l.Fragment,{children:l.jsx(wn,{onClick:()=>pa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Fa.EXPAND})});return c(re),()=>{c(null)}},[c,r]);const z=I.useCallback(async()=>{try{if(s){const re=await s.getDatabaseVersion(),Ee=await s.getLatestDatabaseVersion();g(re),p(Ee)}}catch(re){console.error("Failed to load version information:",re),v(r("upgrade.alerts.unableToGetVersionInfo"))}finally{O(!1)}},[s,O,r]);I.useEffect(()=>{z()},[z]);const V=async()=>{if(!s||!f||!E){v(r("upgrade.alerts.unableToGetVersionInfo"));return}if(await M.isSelfHosted()){T(!0);return}await K()},K=async()=>{if(!s||!f||!E){v(r("upgrade.alerts.unableToGetVersionInfo"));return}m(!0),v(null);try{const Ee=new Yf().getUpgradeVaultSql(f.revision,E.revision);if(!Ee.success)throw new Error(Ee.error??r("upgrade.alerts.upgradeFailed"));if(Ee.sqlCommands.length===0){await $();return}await P(async()=>{for(let pe=0;pe<Ee.sqlCommands.length;pe++){const j=Ee.sqlCommands[pe];try{s.executeRaw(j)}catch(X){throw console.error(`Error executing SQL command ${pe+1}:`,j,X),new Error(r("upgrade.alerts.failedToApplyMigration",{current:pe+1,total:Ee.sqlCommands.length}))}}}),await $()}catch(re){console.error("Upgrade failed:",re),v(re instanceof Error?re.message:r("common.errors.unknownError"))}finally{m(!1)}},$=async()=>{try{await G({onSuccess:()=>{H("/items")},onError:re=>{console.error("Sync error after upgrade:",re),H("/items")}})}catch(re){console.error("Error during post-upgrade sync:",re),H("/items")}},W=()=>{S(!0)},ne=async()=>{S(!1);try{await M.revokeTokens(),await a.clearAuthUserInitiated()}catch(re){console.error("Error during logout:",re)}},he=()=>{L(!0)};return l.jsxs("div",{children:[d&&l.jsxs("div",{className:"fixed inset-0 flex flex-col justify-center items-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-50",children:[l.jsx($n,{}),l.jsx("div",{className:"text-sm text-gray-500 mt-2",children:r("upgrade.upgrading")})]}),l.jsx($u,{isOpen:x,onClose:()=>T(!1),onConfirm:()=>{T(!1),K()},title:r("upgrade.alerts.selfHostedServer"),message:r("upgrade.alerts.selfHostedWarning"),confirmText:r("upgrade.alerts.continueUpgrade"),cancelText:r("common.cancel")}),l.jsx($u,{isOpen:k,onClose:()=>L(!1),onConfirm:()=>L(!1),title:r("upgrade.whatsNew"),message:`${r("upgrade.whatsNewDescription")}

${(E==null?void 0:E.description)??r("upgrade.noDescriptionAvailable")}`}),l.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[N&&l.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:N}),l.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:l.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((q=e==null?void 0:e[0])==null?void 0:q.toUpperCase())||"?"})})}),l.jsx("div",{children:l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e})})]}),l.jsx("h2",{className:"text-xl font-bold dark:text-gray-200 mb-4",children:r("upgrade.title")}),l.jsxs("div",{className:"mb-6",children:[l.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:r("upgrade.subtitle")}),l.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded p-4 mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("span",{className:"font-medium text-gray-700 dark:text-gray-200",children:r("upgrade.versionInformation")}),l.jsx("button",{type:"button",onClick:he,className:"bg-gray-200 dark:bg-gray-600 text-gray-800 dark:text-gray-200 rounded-full w-6 h-6 flex items-center justify-center text-sm font-bold hover:bg-gray-300 dark:hover:bg-gray-500",title:r("upgrade.whatsNew"),children:"?"})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("upgrade.yourVault")}),l.jsx("span",{className:"text-sm font-bold text-orange-600 dark:text-orange-400",children:(f==null?void 0:f.compatibleUpToVersion)??"..."})]}),l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("upgrade.newVersion")}),l.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:(E==null?void 0:E.releaseVersion)??"..."})]})]})]})]}),l.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[l.jsx(Aa,{type:"button",id:"upgrade-button",onClick:V,children:r(d?"upgrade.upgrading":"upgrade.upgrade")}),l.jsx("button",{type:"button",onClick:W,className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 text-sm font-medium py-2",disabled:d,children:r("common.logout")})]})]}),l.jsx(Mh,{isOpen:B,onClose:()=>S(!1),onConfirm:ne})]})};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:BI,setPrototypeOf:LE,isFrozen:JL,getPrototypeOf:XL,getOwnPropertyDescriptor:$L}=Object;let{freeze:fn,seal:er,create:ih}=Object,{apply:sh,construct:oh}=typeof Reflect<"u"&&Reflect;fn||(fn=function(e){return e});er||(er=function(e){return e});sh||(sh=function(e,a){for(var i=arguments.length,s=new Array(i>2?i-2:0),c=2;c<i;c++)s[c-2]=arguments[c];return e.apply(a,s)});oh||(oh=function(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];return new e(...i)});const Cu=hn(Array.prototype.forEach),ZL=hn(Array.prototype.lastIndexOf),RE=hn(Array.prototype.pop),Tl=hn(Array.prototype.push),eR=hn(Array.prototype.splice),Hu=hn(String.prototype.toLowerCase),wf=hn(String.prototype.toString),xf=hn(String.prototype.match),Sl=hn(String.prototype.replace),tR=hn(String.prototype.indexOf),aR=hn(String.prototype.trim),or=hn(Object.prototype.hasOwnProperty),mn=hn(RegExp.prototype.test),kl=nR(TypeError);function hn(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s<a;s++)i[s-1]=arguments[s];return sh(r,e,i)}}function nR(r){return function(){for(var e=arguments.length,a=new Array(e),i=0;i<e;i++)a[i]=arguments[i];return oh(r,a)}}function Rt(r,e){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hu;LE&&LE(r,null);let i=e.length;for(;i--;){let s=e[i];if(typeof s=="string"){const c=a(s);c!==s&&(JL(e)||(e[i]=c),s=c)}r[s]=!0}return r}function rR(r){for(let e=0;e<r.length;e++)or(r,e)||(r[e]=null);return r}function Nr(r){const e=ih(null);for(const[a,i]of BI(r))or(r,a)&&(Array.isArray(i)?e[a]=rR(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=Nr(i):e[a]=i);return e}function Ll(r,e){for(;r!==null;){const i=$L(r,e);if(i){if(i.get)return hn(i.get);if(typeof i.value=="function")return hn(i.value)}r=XL(r)}function a(){return null}return a}const DE=fn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Tf=fn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Sf=fn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),iR=fn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),kf=fn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),sR=fn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),BE=fn(["#text"]),UE=fn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Lf=fn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ME=fn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Nu=fn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),oR=er(/\{\{[\w\W]*|[\w\W]*\}\}/gm),lR=er(/<%[\w\W]*|[\w\W]*%>/gm),cR=er(/\$\{[\w\W]*/gm),uR=er(/^data-[\-\w.\u00B7-\uFFFF]+$/),dR=er(/^aria-[\-\w]+$/),UI=er(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mR=er(/^(?:\w+script|data):/i),gR=er(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),MI=er(/^html$/i),fR=er(/^[a-z][.\w]*(-[.\w]+)+$/i);var _E=Object.freeze({__proto__:null,ARIA_ATTR:dR,ATTR_WHITESPACE:gR,CUSTOM_ELEMENT:fR,DATA_ATTR:uR,DOCTYPE_NAME:MI,ERB_EXPR:lR,IS_ALLOWED_URI:UI,IS_SCRIPT_OR_DATA:mR,MUSTACHE_EXPR:oR,TMPLIT_EXPR:cR});const Rl={element:1,text:3,progressingInstruction:7,comment:8,document:9},hR=function(){return typeof window>"u"?null:window},AR=function(e,a){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(i=a.getAttribute(s));const c="dompurify"+(i?"#"+i:"");try{return e.createPolicy(c,{createHTML(d){return d},createScriptURL(d){return d}})}catch{return console.warn("TrustedTypes policy "+c+" could not be created."),null}},FE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _I(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hR();const e=Fe=>_I(Fe);if(e.version="3.3.1",e.removed=[],!r||!r.document||r.document.nodeType!==Rl.document||!r.Element)return e.isSupported=!1,e;let{document:a}=r;const i=a,s=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:d,Node:m,Element:f,NodeFilter:g,NamedNodeMap:E=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:p,DOMParser:N,trustedTypes:v}=r,x=f.prototype,T=Ll(x,"cloneNode"),k=Ll(x,"remove"),L=Ll(x,"nextSibling"),B=Ll(x,"childNodes"),S=Ll(x,"parentNode");if(typeof d=="function"){const Fe=a.createElement("template");Fe.content&&Fe.content.ownerDocument&&(a=Fe.content.ownerDocument)}let O,M="";const{implementation:P,createNodeIterator:G,createDocumentFragment:H,getElementsByTagName:z}=a,{importNode:V}=i;let K=FE();e.isSupported=typeof BI=="function"&&typeof S=="function"&&P&&P.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:$,ERB_EXPR:W,TMPLIT_EXPR:ne,DATA_ATTR:he,ARIA_ATTR:q,IS_SCRIPT_OR_DATA:re,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:pe}=_E;let{IS_ALLOWED_URI:j}=_E,X=null;const ee=Rt({},[...DE,...Tf,...Sf,...kf,...BE]);let ie=null;const ve=Rt({},[...UE,...Lf,...ME,...Nu]);let Ne=Object.seal(ih(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Be=null;const ke=Object.seal(ih(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ve=!0,vt=!0,Ct=!1,Ut=!0,tt=!1,nt=!0,Te=!1,me=!1,De=!1,Pe=!1,ze=!1,at=!1,Ye=!0,dt=!1;const jt="user-content-";let qt=!0,Qt=!1,na={},U=null;const C=Rt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let w=null;const Q=Rt({},["audio","video","img","source","image","track"]);let ae=null;const fe=Rt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),be="http://www.w3.org/1998/Math/MathML",Ue="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml";let Et=ht,St=!1,mt=null;const gr=Rt({},[be,Ue,ht],wf);let ra=Rt({},["mi","mo","mn","ms","mtext"]),an=Rt({},["annotation-xml"]);const On=Rt({},["title","style","font","a","script"]);let jn=null;const Oe=["application/xhtml+xml","text/html"],ci="text/html";let Zt=null,sa=null;const tr=a.createElement("form"),ar=function(Z){return Z instanceof RegExp||Z instanceof Function},Ra=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(sa&&sa===Z)){if((!Z||typeof Z!="object")&&(Z={}),Z=Nr(Z),jn=Oe.indexOf(Z.PARSER_MEDIA_TYPE)===-1?ci:Z.PARSER_MEDIA_TYPE,Zt=jn==="application/xhtml+xml"?wf:Hu,X=or(Z,"ALLOWED_TAGS")?Rt({},Z.ALLOWED_TAGS,Zt):ee,ie=or(Z,"ALLOWED_ATTR")?Rt({},Z.ALLOWED_ATTR,Zt):ve,mt=or(Z,"ALLOWED_NAMESPACES")?Rt({},Z.ALLOWED_NAMESPACES,wf):gr,ae=or(Z,"ADD_URI_SAFE_ATTR")?Rt(Nr(fe),Z.ADD_URI_SAFE_ATTR,Zt):fe,w=or(Z,"ADD_DATA_URI_TAGS")?Rt(Nr(Q),Z.ADD_DATA_URI_TAGS,Zt):Q,U=or(Z,"FORBID_CONTENTS")?Rt({},Z.FORBID_CONTENTS,Zt):C,Re=or(Z,"FORBID_TAGS")?Rt({},Z.FORBID_TAGS,Zt):Nr({}),Be=or(Z,"FORBID_ATTR")?Rt({},Z.FORBID_ATTR,Zt):Nr({}),na=or(Z,"USE_PROFILES")?Z.USE_PROFILES:!1,Ve=Z.ALLOW_ARIA_ATTR!==!1,vt=Z.ALLOW_DATA_ATTR!==!1,Ct=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,Ut=Z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,tt=Z.SAFE_FOR_TEMPLATES||!1,nt=Z.SAFE_FOR_XML!==!1,Te=Z.WHOLE_DOCUMENT||!1,Pe=Z.RETURN_DOM||!1,ze=Z.RETURN_DOM_FRAGMENT||!1,at=Z.RETURN_TRUSTED_TYPE||!1,De=Z.FORCE_BODY||!1,Ye=Z.SANITIZE_DOM!==!1,dt=Z.SANITIZE_NAMED_PROPS||!1,qt=Z.KEEP_CONTENT!==!1,Qt=Z.IN_PLACE||!1,j=Z.ALLOWED_URI_REGEXP||UI,Et=Z.NAMESPACE||ht,ra=Z.MATHML_TEXT_INTEGRATION_POINTS||ra,an=Z.HTML_INTEGRATION_POINTS||an,Ne=Z.CUSTOM_ELEMENT_HANDLING||{},Z.CUSTOM_ELEMENT_HANDLING&&ar(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ne.tagNameCheck=Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&ar(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ne.attributeNameCheck=Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ne.allowCustomizedBuiltInElements=Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),tt&&(vt=!1),ze&&(Pe=!0),na&&(X=Rt({},BE),ie=[],na.html===!0&&(Rt(X,DE),Rt(ie,UE)),na.svg===!0&&(Rt(X,Tf),Rt(ie,Lf),Rt(ie,Nu)),na.svgFilters===!0&&(Rt(X,Sf),Rt(ie,Lf),Rt(ie,Nu)),na.mathMl===!0&&(Rt(X,kf),Rt(ie,ME),Rt(ie,Nu))),Z.ADD_TAGS&&(typeof Z.ADD_TAGS=="function"?ke.tagCheck=Z.ADD_TAGS:(X===ee&&(X=Nr(X)),Rt(X,Z.ADD_TAGS,Zt))),Z.ADD_ATTR&&(typeof Z.ADD_ATTR=="function"?ke.attributeCheck=Z.ADD_ATTR:(ie===ve&&(ie=Nr(ie)),Rt(ie,Z.ADD_ATTR,Zt))),Z.ADD_URI_SAFE_ATTR&&Rt(ae,Z.ADD_URI_SAFE_ATTR,Zt),Z.FORBID_CONTENTS&&(U===C&&(U=Nr(U)),Rt(U,Z.FORBID_CONTENTS,Zt)),Z.ADD_FORBID_CONTENTS&&(U===C&&(U=Nr(U)),Rt(U,Z.ADD_FORBID_CONTENTS,Zt)),qt&&(X["#text"]=!0),Te&&Rt(X,["html","head","body"]),X.table&&(Rt(X,["tbody"]),delete Re.tbody),Z.TRUSTED_TYPES_POLICY){if(typeof Z.TRUSTED_TYPES_POLICY.createHTML!="function")throw kl('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw kl('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');O=Z.TRUSTED_TYPES_POLICY,M=O.createHTML("")}else O===void 0&&(O=AR(v,s)),O!==null&&typeof M=="string"&&(M=O.createHTML(""));fn&&fn(Z),sa=Z}},Vt=Rt({},[...Tf,...Sf,...iR]),ya=Rt({},[...kf,...sR]),Wt=function(Z){let we=S(Z);(!we||!we.tagName)&&(we={namespaceURI:Et,tagName:"template"});const He=Hu(Z.tagName),Mt=Hu(we.tagName);return mt[Z.namespaceURI]?Z.namespaceURI===Ue?we.namespaceURI===ht?He==="svg":we.namespaceURI===be?He==="svg"&&(Mt==="annotation-xml"||ra[Mt]):!!Vt[He]:Z.namespaceURI===be?we.namespaceURI===ht?He==="math":we.namespaceURI===Ue?He==="math"&&an[Mt]:!!ya[He]:Z.namespaceURI===ht?we.namespaceURI===Ue&&!an[Mt]||we.namespaceURI===be&&!ra[Mt]?!1:!ya[He]&&(On[He]||!Vt[He]):!!(jn==="application/xhtml+xml"&&mt[Z.namespaceURI]):!1},Da=function(Z){Tl(e.removed,{element:Z});try{S(Z).removeChild(Z)}catch{k(Z)}},ja=function(Z,we){try{Tl(e.removed,{attribute:we.getAttributeNode(Z),from:we})}catch{Tl(e.removed,{attribute:null,from:we})}if(we.removeAttribute(Z),Z==="is")if(Pe||ze)try{Da(we)}catch{}else try{we.setAttribute(Z,"")}catch{}},Rr=function(Z){let we=null,He=null;if(De)Z="<remove></remove>"+Z;else{const oa=xf(Z,/^[\r\n\t ]+/);He=oa&&oa[0]}jn==="application/xhtml+xml"&&Et===ht&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");const Mt=O?O.createHTML(Z):Z;if(Et===ht)try{we=new N().parseFromString(Mt,jn)}catch{}if(!we||!we.documentElement){we=P.createDocument(Et,"template",null);try{we.documentElement.innerHTML=St?M:Mt}catch{}}const ca=we.body||we.documentElement;return Z&&He&&ca.insertBefore(a.createTextNode(He),ca.childNodes[0]||null),Et===ht?z.call(we,Te?"html":"body")[0]:Te?we.documentElement:ca},oe=function(Z){return G.call(Z.ownerDocument||Z,Z,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},_e=function(Z){return Z instanceof p&&(typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||!(Z.attributes instanceof E)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function")},Me=function(Z){return typeof m=="function"&&Z instanceof m};function Xe(Fe,Z,we){Cu(Fe,He=>{He.call(e,Z,we,sa)})}const kt=function(Z){let we=null;if(Xe(K.beforeSanitizeElements,Z,null),_e(Z))return Da(Z),!0;const He=Zt(Z.nodeName);if(Xe(K.uponSanitizeElement,Z,{tagName:He,allowedTags:X}),nt&&Z.hasChildNodes()&&!Me(Z.firstElementChild)&&mn(/<[/\w!]/g,Z.innerHTML)&&mn(/<[/\w!]/g,Z.textContent)||Z.nodeType===Rl.progressingInstruction||nt&&Z.nodeType===Rl.comment&&mn(/<[/\w]/g,Z.data))return Da(Z),!0;if(!(ke.tagCheck instanceof Function&&ke.tagCheck(He))&&(!X[He]||Re[He])){if(!Re[He]&&it(He)&&(Ne.tagNameCheck instanceof RegExp&&mn(Ne.tagNameCheck,He)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(He)))return!1;if(qt&&!U[He]){const Mt=S(Z)||Z.parentNode,ca=B(Z)||Z.childNodes;if(ca&&Mt){const oa=ca.length;for(let la=oa-1;la>=0;--la){const qa=T(ca[la],!0);qa.__removalCount=(Z.__removalCount||0)+1,Mt.insertBefore(qa,L(Z))}}}return Da(Z),!0}return Z instanceof f&&!Wt(Z)||(He==="noscript"||He==="noembed"||He==="noframes")&&mn(/<\/no(script|embed|frames)/i,Z.innerHTML)?(Da(Z),!0):(tt&&Z.nodeType===Rl.text&&(we=Z.textContent,Cu([$,W,ne],Mt=>{we=Sl(we,Mt," ")}),Z.textContent!==we&&(Tl(e.removed,{element:Z.cloneNode()}),Z.textContent=we)),Xe(K.afterSanitizeElements,Z,null),!1)},bt=function(Z,we,He){if(Ye&&(we==="id"||we==="name")&&(He in a||He in tr))return!1;if(!(vt&&!Be[we]&&mn(he,we))){if(!(Ve&&mn(q,we))){if(!(ke.attributeCheck instanceof Function&&ke.attributeCheck(we,Z))){if(!ie[we]||Be[we]){if(!(it(Z)&&(Ne.tagNameCheck instanceof RegExp&&mn(Ne.tagNameCheck,Z)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(Z))&&(Ne.attributeNameCheck instanceof RegExp&&mn(Ne.attributeNameCheck,we)||Ne.attributeNameCheck instanceof Function&&Ne.attributeNameCheck(we,Z))||we==="is"&&Ne.allowCustomizedBuiltInElements&&(Ne.tagNameCheck instanceof RegExp&&mn(Ne.tagNameCheck,He)||Ne.tagNameCheck instanceof Function&&Ne.tagNameCheck(He))))return!1}else if(!ae[we]){if(!mn(j,Sl(He,Ee,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&Z!=="script"&&tR(He,"data:")===0&&w[Z])){if(!(Ct&&!mn(re,Sl(He,Ee,"")))){if(He)return!1}}}}}}}return!0},it=function(Z){return Z!=="annotation-xml"&&xf(Z,pe)},st=function(Z){Xe(K.beforeSanitizeAttributes,Z,null);const{attributes:we}=Z;if(!we||_e(Z))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ie,forceKeepAttr:void 0};let Mt=we.length;for(;Mt--;){const ca=we[Mt],{name:oa,namespaceURI:la,value:qa}=ca,va=Zt(oa),fr=qa;let ea=oa==="value"?fr:aR(fr);if(He.attrName=va,He.attrValue=ea,He.keepAttr=!0,He.forceKeepAttr=void 0,Xe(K.uponSanitizeAttribute,Z,He),ea=He.attrValue,dt&&(va==="id"||va==="name")&&(ja(oa,Z),ea=jt+ea),nt&&mn(/((--!?|])>)|<\/(style|title|textarea)/i,ea)){ja(oa,Z);continue}if(va==="attributename"&&xf(ea,"href")){ja(oa,Z);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){ja(oa,Z);continue}if(!Ut&&mn(/\/>/i,ea)){ja(oa,Z);continue}tt&&Cu([$,W,ne],Dr=>{ea=Sl(ea,Dr," ")});const xn=Zt(Z.nodeName);if(!bt(xn,va,ea)){ja(oa,Z);continue}if(O&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!la)switch(v.getAttributeType(xn,va)){case"TrustedHTML":{ea=O.createHTML(ea);break}case"TrustedScriptURL":{ea=O.createScriptURL(ea);break}}if(ea!==fr)try{la?Z.setAttributeNS(la,oa,ea):Z.setAttribute(oa,ea),_e(Z)?Da(Z):RE(e.removed)}catch{ja(oa,Z)}}Xe(K.afterSanitizeAttributes,Z,null)},cn=function Fe(Z){let we=null;const He=oe(Z);for(Xe(K.beforeSanitizeShadowDOM,Z,null);we=He.nextNode();)Xe(K.uponSanitizeShadowNode,we,null),kt(we),st(we),we.content instanceof c&&Fe(we.content);Xe(K.afterSanitizeShadowDOM,Z,null)};return e.sanitize=function(Fe){let Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we=null,He=null,Mt=null,ca=null;if(St=!Fe,St&&(Fe="<!-->"),typeof Fe!="string"&&!Me(Fe))if(typeof Fe.toString=="function"){if(Fe=Fe.toString(),typeof Fe!="string")throw kl("dirty is not a string, aborting")}else throw kl("toString is not a function");if(!e.isSupported)return Fe;if(me||Ra(Z),e.removed=[],typeof Fe=="string"&&(Qt=!1),Qt){if(Fe.nodeName){const qa=Zt(Fe.nodeName);if(!X[qa]||Re[qa])throw kl("root node is forbidden and cannot be sanitized in-place")}}else if(Fe instanceof m)we=Rr("<!---->"),He=we.ownerDocument.importNode(Fe,!0),He.nodeType===Rl.element&&He.nodeName==="BODY"||He.nodeName==="HTML"?we=He:we.appendChild(He);else{if(!Pe&&!tt&&!Te&&Fe.indexOf("<")===-1)return O&&at?O.createHTML(Fe):Fe;if(we=Rr(Fe),!we)return Pe?null:at?M:""}we&&De&&Da(we.firstChild);const oa=oe(Qt?Fe:we);for(;Mt=oa.nextNode();)kt(Mt),st(Mt),Mt.content instanceof c&&cn(Mt.content);if(Qt)return Fe;if(Pe){if(ze)for(ca=H.call(we.ownerDocument);we.firstChild;)ca.appendChild(we.firstChild);else ca=we;return(ie.shadowroot||ie.shadowrootmode)&&(ca=V.call(i,ca,!0)),ca}let la=Te?we.outerHTML:we.innerHTML;return Te&&X["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&&mn(MI,we.ownerDocument.doctype.name)&&(la="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
`+la),tt&&Cu([$,W,ne],qa=>{la=Sl(la,qa," ")}),O&&at?O.createHTML(la):la},e.setConfig=function(){let Fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ra(Fe),me=!0},e.clearConfig=function(){sa=null,me=!1},e.isValidAttribute=function(Fe,Z,we){sa||Ra({});const He=Zt(Fe),Mt=Zt(Z);return bt(He,Mt,we)},e.addHook=function(Fe,Z){typeof Z=="function"&&Tl(K[Fe],Z)},e.removeHook=function(Fe,Z){if(Z!==void 0){const we=ZL(K[Fe],Z);return we===-1?void 0:eR(K[Fe],we,1)[0]}return RE(K[Fe])},e.removeHooks=function(Fe){K[Fe]=[]},e.removeAllHooks=function(){K=FE()},e}var pR=_I();const yR={ALLOWED_TAGS:["div","span","p","br","hr","h1","h2","h3","h4","h5","h6","ul","ol","li","table","thead","tbody","tfoot","tr","th","td","a","img","b","i","u","s","strike","strong","em","small","sub","sup","blockquote","pre","code","font","center"],ALLOWED_ATTR:["style","class","id","width","height","align","valign","bgcolor","color","border","cellpadding","cellspacing","colspan","rowspan","face","size","href","target","rel","src","alt","title"],ALLOW_DATA_ATTR:!1,ADD_ATTR:["target"],FORBID_TAGS:["script","object","embed","iframe","frame","frameset","form","input","button","textarea","select","option","link","meta","base","applet"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onmouseout","onfocus","onblur","onchange","onsubmit","onreset","onkeydown","onkeyup","onkeypress","ondblclick","oncontextmenu","onmousedown","onmouseup","onmousemove","ondrag","ondrop"]};class ER{sanitizeHtmlForEmailViewing(e){if(!e||e.trim()==="")return e;try{return pR.sanitize(e,yR)}catch(a){return console.error(`Error in sanitizeHtmlForEmailViewing: ${a instanceof Error?a.message:String(a)}`),""}}sanitizeAndPrepareEmailHtml(e){if(!e||e.trim()==="")return e;const a=this.sanitizeHtmlForEmailViewing(e);return this.convertAnchorTagsToOpenInNewTab(a)}convertAnchorTagsToOpenInNewTab(e){try{const i=new DOMParser().parseFromString(e,"text/html"),s=i.querySelectorAll("a[href]");return s.length>0&&s.forEach(c=>{if((!c.hasAttribute("target")||c.getAttribute("target")!=="_blank")&&c.setAttribute("target","_blank"),!c.hasAttribute("rel"))c.setAttribute("rel","noopener noreferrer");else{const d=c.getAttribute("rel")??"",m=new Set(d.split(" ").filter(f=>f.trim()!==""));m.add("noopener"),m.add("noreferrer"),c.setAttribute("rel",Array.from(m).join(" "))}}),i.documentElement.outerHTML}catch(a){return console.error(`Error in convertAnchorTagsToOpenInNewTab: ${a instanceof Error?a.message:String(a)}`),e}}normalizeUsername(e){return e.toLowerCase().trim()}}const bR=new ER,ec=(r=!1,e=300)=>{const[a,i]=I.useState(r),s=I.useRef(null),c=I.useRef(null),d=I.useCallback(m=>{if(m)i(!0),c.current=Date.now();else{const f=c.current?Date.now()-c.current:0,g=Math.max(0,e-f);g===0?i(!1):(s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{i(!1)},g))}},[e]);return I.useEffect(()=>{r&&(i(!0),c.current=Date.now())},[r,i]),I.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),[a,d]},IR=()=>{const{t:r}=Ze(),{id:e}=ld(),a=La(),i=zt(),s=ur(),[c,d]=I.useState(null),[m,f]=I.useState(null),[g,E]=ec(!0,150),[p,N]=I.useState(!1),[v,x]=I.useState(!1),{setIsInitialLoading:T}=fa(),{setHeaderButtons:k}=mr(),[L,B]=I.useState(!1);I.useEffect(()=>{pa.isPopup()&&(window.history.replaceState({},"","popup.html#/emails"),window.history.pushState({},"",`popup.html#/emails/${e}`)),(async()=>{try{if(E(!0),d(null),!(i!=null&&i.sqliteClient)||!e)return;if(i.isOffline){d(r("emails.offlineMessage")),E(!1),T(!1);return}const G=await s.get(`Email/${e}`),H=i.sqliteClient.settings.getAllEncryptionKeys(),z=await Ft.decryptEmail(G,H);f(z)}catch(G){d(G instanceof Error?G.message:"An error occurred")}finally{E(!1),T(!1)}})()},[e,i==null?void 0:i.sqliteClient,i.isOffline,r,s,E,T]);const S=I.useCallback(async()=>{try{await s.delete(`Email/${e}`),pa.isPopup()?window.close():a("/emails")}catch(P){d(P instanceof Error?P.message:"Failed to delete email")}},[e,s,a]),O=I.useCallback(()=>{pa.openInNewPopup(`/emails/${e}`)},[e]),M=async P=>{try{const G=await s.downloadBlob(`Email/${e}/attachments/${P.id}`);if(!(i!=null&&i.sqliteClient)||!m){d("Database context or email not available");return}const H=i.sqliteClient.settings.getAllEncryptionKeys(),z=await Ft.decryptAttachment(G,m,H);if(!z){d("Failed to decrypt attachment");return}const V=new Blob([new Uint8Array(z)],{type:P.mimeType??"application/octet-stream"}),K=window.URL.createObjectURL(V),$=document.createElement("a");$.href=K,$.download=P.filename,document.body.appendChild($),$.click(),window.URL.revokeObjectURL(K),document.body.removeChild($)}catch(G){console.error("handleDownloadAttachment error",G),d(G instanceof Error?G.message:"Failed to download attachment")}};return I.useEffect(()=>{if(!L){const P=l.jsxs("div",{className:"flex items-center gap-2",children:[!pa.isPopup()&&l.jsx(wn,{onClick:O,title:r("common.openInNewWindow"),iconType:Fa.EXPAND}),l.jsx(wn,{onClick:()=>N(!0),title:r("emails.deleteEmailTitle"),iconType:Fa.DELETE,variant:"danger"})]});k(P),B(!0)}return()=>{}},[k,L,O,r]),I.useEffect(()=>()=>k(null),[k]),g?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx($n,{})}):c?l.jsxs("div",{className:"text-red-500",children:[r("common.error")," ",c]}):m?l.jsxs("div",{className:"max-w-4xl mx-auto",children:[l.jsx($u,{isOpen:p,onClose:()=>N(!1),onConfirm:()=>{N(!1),S()},title:r("emails.deleteEmailTitle"),message:r("emails.deleteEmailConfirm"),confirmText:r("common.delete"),cancelText:r("common.cancel"),variant:"danger"}),l.jsxs("div",{children:[l.jsxs("div",{children:[l.jsx("div",{className:"flex justify-between items-start",children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:m.subject}),l.jsx("button",{onClick:()=>x(!v),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:r(v?"common.hideDetails":"common.showDetails"),children:l.jsx("svg",{className:`w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform ${v?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})]})}),v&&l.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400 mt-2",children:[l.jsxs("p",{children:[l.jsx("span",{className:"font-bold",children:r("emails.from")})," ",l.jsx("span",{title:m.fromLocal+"@"+m.fromDomain,children:m.fromDisplay})]}),l.jsxs("p",{children:[l.jsx("span",{className:"font-bold",children:r("emails.to")})," ",l.jsxs("span",{title:m.toLocal+"@"+m.toDomain,children:[m.toLocal,"@",m.toDomain]})]}),l.jsxs("p",{children:[l.jsx("span",{className:"font-bold",children:r("emails.date")})," ",new Date(m.dateSystem).toLocaleString()]})]})]}),l.jsx("div",{className:"bg-white mt-4",children:m.messageHtml?l.jsx("iframe",{srcDoc:bR.sanitizeAndPrepareEmailHtml(m.messageHtml),className:"w-full min-h-[500px] border-0",title:r("emails.emailContent"),sandbox:"allow-popups allow-popups-to-escape-sandbox"}):l.jsx("pre",{className:"whitespace-pre-wrap text-gray-800 p-3",children:m.messagePlain})}),m.attachments&&m.attachments.length>0&&l.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700",children:[l.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:r("common.attachments")}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:m.attachments.map(P=>l.jsxs("button",{onClick:()=>M(P),className:"flex items-center space-x-2 text-sm text-gray-600 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 text-left",children:[l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"})}),l.jsxs("span",{children:[P.filename," (",Math.ceil(P.filesize/1024)," KB)"]})]},P.id))})]})]})]}):l.jsx("div",{className:"text-gray-500",children:r("emails.emailNotFound")})},lh=({onClick:r})=>l.jsxs("div",{className:"px-2 items-center",children:[l.jsxs("div",{className:"relative inline-flex items-center",children:[l.jsx("button",{id:"reload-vault",onClick:r,className:"absolute p-2 hover:bg-gray-200 rounded-2xl",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-gray-400",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})})}),l.jsxs("svg",{"aria-hidden":"true",className:"inline w-8 h-8 text-gray-200 dark:text-gray-600",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),l.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})]}),l.jsx("span",{className:"sr-only",children:"Loading..."})]}),vR=()=>{const{t:r}=Ze(),e=zt(),a=ur(),{setHeaderButtons:i}=mr(),[s,c]=I.useState(null),[d,m]=I.useState([]),{setIsInitialLoading:f}=fa(),[g,E]=ec(!0,100),p=I.useCallback(async()=>{try{if(E(!0),c(null),!(e!=null&&e.sqliteClient))return;if(e.isOffline){E(!1),f(!1);return}const v=e.sqliteClient.items.getAllEmailAddresses();try{const x=await a.post("EmailBox/bulk",{addresses:v,page:1,pageSize:50}),T=e.sqliteClient.settings.getAllEncryptionKeys(),k=await Ft.decryptEmailList(x.mails,T);m(k)}catch(x){throw console.error(x),new Error(r("common.errors.unknownError"))}}catch(v){c(v instanceof Error?v.message:r("common.errors.unknownError"))}finally{E(!1),f(!1)}},[e==null?void 0:e.sqliteClient,e.isOffline,a,E,f,r]);I.useEffect(()=>{p()},[p]),I.useEffect(()=>{const v=pa.isPopup()?null:l.jsx(wn,{onClick:()=>pa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Fa.EXPAND});return i(v),()=>{i(null)}},[i,r]);const N=v=>{const x=new Date,T=new Date(v),k=Math.floor((x.getTime()-T.getTime())/1e3);if(k<60)return r("emails.dateFormat.justNow");if(k<3600){const L=Math.floor(k/60);return L===1?r("emails.dateFormat.minutesAgo_single",{count:L}):r("emails.dateFormat.minutesAgo_plural",{count:L})}else if(k<86400){const L=Math.floor(k/3600);return L===1?r("emails.dateFormat.hoursAgo_single",{count:L}):r("emails.dateFormat.hoursAgo_plural",{count:L})}else return k<172800?r("emails.dateFormat.yesterday"):T.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit"})};return g?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx($n,{})}):s?l.jsxs("div",{className:"text-red-500",children:[r("common.error"),": ",s]}):e.isOffline?l.jsxs("div",{children:[l.jsx("div",{className:"flex justify-between items-center mb-4",children:l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:r("emails.title")})}),l.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:l.jsx("p",{className:"text-sm",children:r("emails.offlineMessage")})})]}):d.length===0?l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:r("emails.title")}),l.jsx(lh,{onClick:p})]}),l.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:l.jsx("p",{className:"text-sm",children:r("emails.noEmailsDescription")})})]}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:r("emails.title")}),l.jsx(lh,{onClick:p})]}),l.jsx("div",{className:"space-y-2",children:d.map(v=>l.jsxs(ud,{to:`/emails/${v.id}`,className:"block p-4 bg-white dark:bg-gray-800 rounded-lg shadow hover:shadow-md transition-shadow border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",children:[l.jsxs("div",{className:"flex justify-between items-start mb-2",children:[l.jsx("div",{className:"text-gray-900 dark:text-white mb-1 font-bold",children:v.subject}),l.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:N(v.dateSystem)})]}),l.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-300 line-clamp-2",children:v.messagePreview})]},v.id))})]})},CR=()=>{const{isFullyInitialized:r}=f2();return r?l.jsx(nw,{to:"/reinitialize",replace:!0}):null},NR=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),wR=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),xR=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"})}),Zu=()=>l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),TR=r=>{switch(r){case ut.Notes:return l.jsx(NR,{});default:return l.jsx(Zu,{})}},SR=r=>{switch(r){case"2fa":return l.jsx(wR,{});case"attachments":return l.jsx(xR,{});default:return l.jsx(Zu,{})}},kR=({optionalSystemFields:r,visibleFieldKeys:e,optionalSections:a,callbacks:i})=>{const{t:s}=Ze(),[c,d]=I.useState(!1),[m,f]=I.useState(!1),[g,E]=I.useState(""),[p,N]=I.useState("Text"),v=I.useCallback(()=>{f(!0),d(!1)},[]),x=I.useCallback(()=>{g.trim()&&(i.onAddCustomField(g,p),E(""),N("Text"),f(!1))},[g,p,i]),T=I.useCallback(()=>{E(""),N("Text"),f(!1)},[]),k=I.useCallback(S=>{i.onAddSystemField(S),d(!1)},[i]),L=I.useCallback(S=>{S(),d(!1)},[]),B=I.useMemo(()=>{const S=[];return r.forEach(O=>{e.has(O.FieldKey)||S.push({key:O.FieldKey,label:s(`fieldLabels.${O.FieldKey}`,{defaultValue:O.FieldKey}),icon:TR(O.Category),action:()=>k(O.FieldKey)})}),a.forEach(O=>{O.isVisible||S.push({key:O.key,label:s(`common.${O.key==="2fa"?"twoFactorAuthentication":O.key}`),icon:SR(O.key),action:()=>L(O.onAdd)})}),S},[r,e,a,s,k,L]);return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"relative",children:[l.jsx("button",{type:"button",id:"add-field-menu",onClick:()=>d(!c),className:"w-full px-4 py-2 border-2 border-dashed border-gray-300 dark:border-gray-600 text-gray-600 dark:text-gray-400 rounded-md hover:border-primary-500 hover:text-primary-600 dark:hover:text-primary-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 transition-colors flex items-center justify-center gap-2",children:l.jsx(Zu,{})}),c&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50",onClick:()=>d(!1)}),l.jsxs("div",{className:"absolute bottom-full left-0 right-0 mb-1 z-20 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-md shadow-lg overflow-hidden",children:[B.map(S=>l.jsxs("button",{type:"button",onClick:S.action,className:"w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 text-gray-700 dark:text-gray-300",children:[l.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:S.icon}),l.jsx("span",{children:S.label})]},S.key)),l.jsxs("button",{type:"button",onClick:v,className:"w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 text-gray-700 dark:text-gray-300",children:[l.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:l.jsx(Zu,{})}),l.jsx("span",{children:s("itemTypes.addCustomField")})]})]})]})]}),l.jsx(Zn,{isOpen:m,onClose:T,title:s("itemTypes.addCustomField"),footer:l.jsxs("div",{className:"flex gap-3",children:[l.jsx("button",{type:"button",onClick:x,disabled:!g.trim(),className:"flex-1 px-4 py-2 bg-primary-600 text-white rounded-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 disabled:opacity-50 disabled:cursor-not-allowed",children:s("common.add")}),l.jsx("button",{type:"button",onClick:T,className:"px-4 py-2 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 rounded-md hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500",children:s("common.cancel")})]}),children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldLabel")}),l.jsx("input",{type:"text",value:g,onChange:S=>E(S.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white",placeholder:s("itemTypes.enterFieldName"),autoFocus:!0})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldType")}),l.jsxs("select",{value:p,onChange:S=>N(S.target.value),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white",children:[l.jsx("option",{value:"Text",children:s("itemTypes.fieldTypes.text")}),l.jsx("option",{value:"Hidden",children:s("itemTypes.fieldTypes.hidden")}),l.jsx("option",{value:"Email",children:s("itemTypes.fieldTypes.email")}),l.jsx("option",{value:"URL",children:s("itemTypes.fieldTypes.url")}),l.jsx("option",{value:"Phone",children:s("itemTypes.fieldTypes.phone")}),l.jsx("option",{value:"Number",children:s("itemTypes.fieldTypes.number")}),l.jsx("option",{value:"Date",children:s("itemTypes.fieldTypes.date")}),l.jsx("option",{value:"TextArea",children:s("itemTypes.fieldTypes.textArea")})]})]})]})})]})},LR=({htmlFor:r,label:e,onLabelChange:a,onDelete:i})=>{const[s,c]=I.useState(!1),[d,m]=I.useState(e),f=()=>{d.trim()&&(a(d.trim()),c(!1))},g=()=>{m(e),c(!1)},E=p=>{p.key==="Enter"?f():p.key==="Escape"&&g()};return s?l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("input",{type:"text",value:d,onChange:p=>m(p.target.value),onKeyDown:E,onBlur:f,className:"flex-1 px-2 py-1 text-sm font-medium text-gray-700 dark:text-gray-300 border border-primary-500 rounded focus:outline-none focus:ring-1 focus:ring-primary-500 dark:bg-gray-700 dark:border-primary-400",placeholder:"Field label",autoFocus:!0}),l.jsx("button",{type:"button",onClick:f,className:"text-green-600 dark:text-green-400 hover:text-green-700 dark:hover:text-green-300 text-xs px-2 py-1",children:"✓"}),l.jsx("button",{type:"button",onClick:g,className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 text-xs px-2 py-1",children:"✕"})]}):l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("label",{htmlFor:r,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),l.jsx("button",{type:"button",onClick:()=>c(!0),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-xs",title:"Edit label",children:l.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})})}),i&&l.jsx("button",{type:"button",onClick:i,className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 text-xs",title:"Delete field",children:l.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})},RR=({id:r,value:e,onChange:a,error:i,required:s=!1,onRemove:c,onGenerateAlias:d,isEmailMode:m,onEmailModeChange:f})=>{const{t:g}=Ze(),E=zt(),p=m!==void 0,[N,v]=I.useState(!0),x=p?m:N,T=I.useCallback(pe=>{const j=typeof pe=="function"?pe(x):pe;p&&f?f(j):v(j)},[p,f,x]),[k,L]=I.useState(""),[B,S]=I.useState(""),[O,M]=I.useState(!1),[P,G]=I.useState([]),[H,z]=I.useState([]),[V,K]=I.useState([]),$=I.useRef(null),W=I.useRef(!1);I.useEffect(()=>{(async()=>{const j=await E.getVaultMetadata();G((j==null?void 0:j.publicEmailDomains)??[]),z((j==null?void 0:j.privateEmailDomains)??[]),K((j==null?void 0:j.hiddenPrivateEmailDomains)??[])})()},[E]);const ne=I.useMemo(()=>H.length>0&&!(H.length===1&&(H[0]==="DISABLED.TLD"||H[0]==="")),[H]);I.useEffect(()=>{if(!e){L(""),B||(ne&&H[0]?S(H[0]):P[0]&&S(P[0]));return}if(e.includes("@")){const[pe,j]=e.split("@");if(L(pe),S(j),!W.current){const X=P.includes(j)||H.includes(j)||V.includes(j);p&&f?f(!X):p||T(!X)}}else L(e),!B&&!e.includes("@")&&(ne&&H[0]?S(H[0]):P[0]&&S(P[0]))},[e,P,H,V,ne,p,f,B,T]),I.useEffect(()=>{if(W.current||!e||!e.includes("@"))return;const pe=e.split("@")[1];if(!pe)return;const j=P.includes(pe)||H.includes(pe)||V.includes(pe);p&&f?f(!j):p||j&&x&&T(!1)},[P,H,V,e,x,p,f,T]),I.useEffect(()=>{if(!x&&e&&!e.includes("@")&&e.trim()){const pe=ne&&H[0]?H[0]:P[0],j=B||pe;j&&(!B&&pe&&S(pe),a(`${e}@${j}`))}},[e,x,B,ne,H,P,a]);const he=I.useCallback(pe=>{const j=pe.target.value;if(W.current=!1,x){a(j);return}if(j.includes("@")){T(!0),a(j);return}if(L(j),!j||j.trim()==="")a("");else{const X=B||(ne&&H[0]?H[0]:P[0]||"");X?(a(`${j}@${X}`),B||S(X)):a(j)}},[x,B,a,T,ne,H,P]),q=I.useCallback(pe=>{S(pe);const j=k.includes("@")?k.split("@")[0]:k;!j||j.trim()===""?a(""):a(`${j}@${pe}`),T(!1),M(!1)},[k,a,T]),re=I.useCallback(()=>{W.current=!0;const pe=!x;if(T(pe),pe)a(""),L("");else{const j=ne&&H[0]?H[0]:P[0];S(j),L(""),a("")}},[x,ne,P,H,a,T]);I.useEffect(()=>{const pe=j=>{$.current&&!$.current.contains(j.target)&&M(!1)};if(O)return document.addEventListener("mousedown",pe),()=>{document.removeEventListener("mousedown",pe)}},[O]);const Ee=I.useCallback(()=>{W.current=!0,T(!1);const pe=ne&&H[0]?H[0]:P[0];pe&&S(pe),L(""),a(""),d&&d()},[d,T,ne,H,P,a]);return l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex items-center",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("button",{type:"button",onClick:x?void 0:re,className:`text-sm font-medium transition-colors ${x?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400 cursor-pointer"}`,children:g("common.email")}),l.jsx("span",{className:"mx-2 text-gray-400 dark:text-gray-500",children:"/"}),l.jsx("button",{type:"button",onClick:x?Ee:void 0,className:`text-sm font-medium transition-colors ${x?"text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-400 cursor-pointer":"text-primary-600 dark:text-primary-400"}`,children:g("common.alias")}),s&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}),c&&l.jsx("button",{type:"button",onClick:c,className:"w-5 h-5 flex items-center justify-center text-gray-300 hover:text-red-400 dark:text-gray-500 dark:hover:text-red-400 transition-colors",title:g("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),l.jsxs("div",{className:"relative w-full",children:[l.jsxs("div",{className:"flex w-full",children:[l.jsx("input",{type:"text",id:r,className:`flex-1 min-w-0 px-3 py-2 border text-sm ${i?"border-red-500":"border-gray-300 dark:border-gray-600"} ${x?"rounded-md":"rounded-l-md"} focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`,value:x?e:k,onChange:he}),!x&&l.jsxs("button",{type:"button",onClick:()=>M(!O),className:`inline-flex items-center px-2 py-2 border border-l-0 border-gray-300 dark:border-gray-600 ${d?"":"rounded-r-md"} bg-gray-50 dark:bg-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-500 cursor-pointer text-sm truncate max-w-[120px]`,children:[l.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"@"}),l.jsx("span",{className:"truncate ml-0.5",children:B})]}),!x&&d&&l.jsx("button",{type:"button",onClick:d,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm border-l border-gray-300 dark:border-gray-700 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:g("common.generate"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]}),O&&!x&&l.jsx("div",{ref:$,className:"absolute z-50 mt-2 w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 max-h-96 overflow-y-auto",children:l.jsxs("div",{className:"p-4",children:[ne&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:[g("items.privateEmailTitle")," ",l.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",g("items.privateEmailAliasVaultServer"),")"]})]}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.privateEmailDescription")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:H.filter(pe=>!V.includes(pe)).map(pe=>l.jsx("button",{type:"button",onClick:()=>q(pe),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${B===pe?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 border border-gray-300 dark:border-gray-600"}`,children:pe},pe))})]}),l.jsxs("div",{className:ne?"border-t border-gray-200 dark:border-gray-600 pt-4":"",children:[l.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:g("items.publicEmailTitle")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.publicEmailDescription")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:P.map(pe=>l.jsx("button",{type:"button",onClick:()=>q(pe),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${B===pe?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 border border-gray-300 dark:border-gray-600"}`,children:pe},pe))})]})]})})]}),i&&l.jsx("p",{className:"text-sm text-red-500 mt-1",children:i})]})},DR=({name:r})=>{switch(r){case"visibility":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),l.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"refresh":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M23 4v6h-6"}),l.jsx("path",{d:"M1 20v-6h6"}),l.jsx("path",{d:"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"})]});case"settings":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l.jsx("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});default:return null}},fd=I.forwardRef(({id:r,label:e,value:a,onChange:i,type:s="text",placeholder:c,required:d=!1,multiline:m=!1,rows:f=1,error:g,buttons:E=[],showPassword:p,onShowPasswordChange:N},v)=>{const{t:x}=Ze(),[T,k]=sd.useState(!1),L=p!==void 0?p:T,B=M=>{p!==void 0?N==null||N(M):k(M)},S=`mt-1 block text-sm w-full rounded-md ${g?"border-red-500":"border-gray-300 dark:border-gray-600"} text-gray-900 sm:text-sm rounded-lg shadow-sm border focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400 py-2 px-3`,O=s==="password"?[...E,{icon:L?"visibility-off":"visibility",onClick:()=>B(!L),title:x(L?"common.hidePassword":"common.showPassword")}]:E;return l.jsxs("div",{children:[l.jsxs("label",{htmlFor:r,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,d&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),l.jsxs("div",{className:"relative",children:[m?l.jsx("textarea",{id:r,value:a,onChange:M=>i(M.target.value),rows:f,placeholder:c,className:S}):l.jsx("input",{ref:v,type:s==="password"&&!L?"password":"text",id:r,value:a,onChange:M=>i(M.target.value),placeholder:c,className:S}),O.length>0&&l.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:O.map((M,P)=>l.jsx("button",{type:"button",onClick:M.onClick,title:M.title,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(DR,{name:M.icon})})},P))})]}),g&&l.jsx("p",{className:"mt-1 text-sm text-red-500",children:g})]})});fd.displayName="FormInput";const wu=({title:r,children:e,actions:a})=>l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[r&&l.jsxs("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white flex items-center justify-between",children:[typeof r=="string"?l.jsx("span",{children:r}):r,a&&l.jsx("div",{className:"flex items-center gap-2",children:a})]}),l.jsx("div",{className:"space-y-4",children:e})]}),BR=({id:r,label:e,value:a,onChange:i,placeholder:s,error:c,showValue:d,onShowValueChange:m})=>{const{t:f}=Ze(),[g,E]=I.useState(!1),p=d!==void 0?d:g,N=I.useCallback(x=>{d!==void 0?m==null||m(x):E(x)},[d,m]),v=I.useCallback(()=>{N(!p)},[p,N]);return l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:r,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsxs("div",{className:"flex",children:[l.jsx("div",{className:"relative flex-grow",children:l.jsx("input",{type:p?"text":"password",id:r,value:a,onChange:x=>i(x.target.value),placeholder:s,className:"outline-0 text-sm shadow-sm border border-gray-300 bg-gray-50 text-gray-900 sm:text-sm rounded-l-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white"})}),l.jsx("div",{className:"flex",children:l.jsx("button",{type:"button",onClick:v,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:f(p?"common.hidePassword":"common.showPassword"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p?l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}):l.jsxs(l.Fragment,{children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})})})]}),c&&l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c})]})};var UR=class{constructor(r){this.lowercaseChars="abcdefghijklmnopqrstuvwxyz",this.uppercaseChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ",this.numberChars="0123456789",this.specialChars="!@#$%^&*()_+-=[]{}|;:,.<>?",this.ambiguousChars="Il1O0oZzSsBbGg2568|[]{}()<>;:,.`'\"_-",this.length=18,this.useLowercase=!0,this.useUppercase=!0,this.useNumbers=!0,this.useSpecial=!0,this.useNonAmbiguous=!1,r&&this.applySettings(r)}applySettings(r){return this.length=r.Length,this.useLowercase=r.UseLowercase,this.useUppercase=r.UseUppercase,this.useNumbers=r.UseNumbers,this.useSpecial=r.UseSpecialChars,this.useNonAmbiguous=r.UseNonAmbiguousChars,this}setLength(r){return this.length=r,this}useLowercaseLetters(r){return this.useLowercase=r,this}useUppercaseLetters(r){return this.useUppercase=r,this}useNumericCharacters(r){return this.useNumbers=r,this}useSpecialCharacters(r){return this.useSpecial=r,this}useNonAmbiguousCharacters(r){return this.useNonAmbiguous=r,this}getUnbiasedRandomIndex(r){const e=Math.floor(4294967296/r)*r;for(;;){const a=new Uint32Array(1);crypto.getRandomValues(a);const i=a[0];if(i<e)return i%r}}generateRandomPassword(){const r=this.buildCharacterSet();let e=this.generateInitialPassword(r);return e=this.ensureRequirements(e),e}buildCharacterSet(){let r="";return this.useLowercase&&(r+=this.lowercaseChars),this.useUppercase&&(r+=this.uppercaseChars),this.useNumbers&&(r+=this.numberChars),this.useSpecial&&(r+=this.specialChars),r.length===0&&(r=this.lowercaseChars),this.useNonAmbiguous&&(r=this.removeAmbiguousCharacters(r)),r}removeAmbiguousCharacters(r){for(const e of this.ambiguousChars)r=r.replace(e,"");return r}generateInitialPassword(r){let e="";for(let a=0;a<this.length;a++)e+=r[this.getUnbiasedRandomIndex(r.length)];return e}ensureRequirements(r){return this.useLowercase&&!/[a-z]/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.lowercaseChars))),this.useUppercase&&!/[A-Z]/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.uppercaseChars))),this.useNumbers&&!/\d/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.numberChars))),this.useSpecial&&!/[!@#$%^&*()_+\-=[\]{}|;:,.<>?]/.exec(r)&&(r=this.addCharacterFromSet(r,this.getSafeCharacterSet(this.specialChars))),r}getSafeCharacterSet(r){return this.useNonAmbiguous?this.removeAmbiguousCharacters(r):r}addCharacterFromSet(r,e){const a=this.getUnbiasedRandomIndex(this.length),i=e[this.getUnbiasedRandomIndex(e.length)];return r.substring(0,a)+i+r.substring(a+1)}},_h=r=>new UR(r);const MR=({isOpen:r,onClose:e,onSave:a,onSettingsChange:i,initialSettings:s})=>{const{t:c}=Ze(),[d,m]=I.useState(s),[f,g]=I.useState(""),E=I.useCallback(x=>{try{const k=_h(x).generateRandomPassword();g(k)}catch(T){console.error("Error generating preview password:",T),g("")}},[]);I.useEffect(()=>{r&&(m({...s}),E({...s}))},[r,s,E]);const p=I.useCallback((x,T)=>{const k={...d,[x]:T};m(k),E(k),i==null||i(k)},[d,E,i]),N=I.useCallback(()=>{E(d)},[d,E]),v=I.useCallback(()=>{a(f),e()},[f,a,e]);return l.jsx(Zn,{isOpen:r,onClose:e,title:c("items.changePasswordComplexity"),maxWidth:"max-w-lg",footer:l.jsx("div",{className:"flex justify-end",children:l.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 rounded-md bg-gray-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-gray-500",onClick:v,children:[l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 13l-3 3m0 0l-3-3m3 3V8m0 13a9 9 0 110-18 9 9 0 010 18z"})}),c("common.use")]})}),children:l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{children:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"text",value:f,readOnly:!0,className:"flex-1 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:text-white font-mono"}),l.jsx("button",{type:"button",onClick:N,className:"px-3 py-2 text-sm text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-lg dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:c("common.generate"),children:l.jsx("svg",{className:"w-4 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[l.jsx("button",{type:"button",onClick:()=>p("UseLowercase",!d.UseLowercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.UseLowercase?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:c("items.includeLowercase"),children:l.jsx("span",{className:"font-mono text-base",children:"a-z"})}),l.jsx("button",{type:"button",onClick:()=>p("UseUppercase",!d.UseUppercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.UseUppercase?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:c("items.includeUppercase"),children:l.jsx("span",{className:"font-mono text-base",children:"A-Z"})}),l.jsx("button",{type:"button",onClick:()=>p("UseNumbers",!d.UseNumbers),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.UseNumbers?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:c("items.includeNumbers"),children:l.jsx("span",{className:"font-mono text-base",children:"0-9"})}),l.jsx("button",{type:"button",onClick:()=>p("UseSpecialChars",!d.UseSpecialChars),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${d.UseSpecialChars?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-200 text-gray-700 hover:bg-gray-300 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600"}`,title:c("items.includeSpecialChars"),children:l.jsx("span",{className:"font-mono text-base",children:"!@#"})})]}),l.jsxs("div",{className:"flex items-center",children:[l.jsx("input",{id:"use-non-ambiguous",type:"checkbox",checked:d.UseNonAmbiguousChars,onChange:x=>p("UseNonAmbiguousChars",x.target.checked),className:"h-4 w-4 text-primary-600 focus:ring-primary-500 border-gray-300 rounded dark:bg-gray-700 dark:border-gray-600"}),l.jsx("label",{htmlFor:"use-non-ambiguous",className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:c("items.avoidAmbiguousChars")})]})]})]})})},_R=({id:r,label:e,value:a,onChange:i,placeholder:s,error:c,showPassword:d,onShowPasswordChange:m,initialSettings:f,onSettingsChange:g})=>{const{t:E}=Ze(),p=zt(),[N,v]=I.useState(!1),[x,T]=I.useState(!1),[k,L]=I.useState(null),[B,S]=I.useState(!1),O=d!==void 0?d:N,M=I.useCallback(W=>{d!==void 0?m==null||m(W):v(W)},[d,m]);I.useEffect(()=>{(async()=>{try{if(p.sqliteClient){if(f!==void 0)L(f);else{const ne=p.sqliteClient.settings.getPasswordSettings();L(ne)}S(!0)}}catch(ne){console.error("Error loading password settings:",ne)}})()},[p.sqliteClient,f]);const P=I.useCallback(W=>{try{const he=_h(W).generateRandomPassword();i(he),M(!0)}catch(ne){console.error("Error generating password:",ne)}},[i,M]),G=I.useCallback(W=>{if(!k)return;const ne=parseInt(W.target.value,10),he={...k,Length:ne};L(he),g==null||g(he),P(he)},[k,P,g]),H=I.useCallback(()=>{k&&P(k)},[P,k]),z=I.useCallback(W=>{i(W),M(!0)},[i,M]),V=I.useCallback(W=>{L(W),g==null||g(W)},[g]),K=I.useCallback(()=>{M(!O)},[O,M]),$=I.useCallback(()=>{T(!0)},[]);return!k||!B?l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:r,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsx("div",{className:"animate-pulse bg-gray-200 dark:bg-gray-700 h-10 rounded-lg"})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:r,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsxs("div",{className:"flex",children:[l.jsx("div",{className:"relative flex-grow",children:l.jsx("input",{type:O?"text":"password",id:r,value:a,onChange:W=>i(W.target.value),placeholder:s,className:"outline-0 text-sm shadow-sm border border-gray-300 bg-gray-50 text-gray-900 sm:text-sm rounded-l-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white"})}),l.jsxs("div",{className:"flex",children:[l.jsx("button",{type:"button",onClick:K,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium text-sm dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:E(O?"common.hidePassword":"common.showPassword"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:O?l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"}):l.jsxs(l.Fragment,{children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})})}),l.jsx("button",{type:"button",onClick:H,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm border-l border-gray-300 dark:border-gray-700 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:E("common.generate"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]})]}),l.jsxs("div",{className:"pt-2",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("label",{htmlFor:`${r}-length`,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:E("items.passwordLength")}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 font-mono",children:k.Length}),l.jsx("button",{type:"button",onClick:$,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",title:E("items.changePasswordComplexity"),children:l.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]}),l.jsx("input",{type:"range",id:`${r}-length`,min:"8",max:"64",value:k.Length,onChange:G,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"})]}),c&&l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c}),l.jsx(MR,{isOpen:x,onClose:()=>T(!1),onSave:z,onSettingsChange:V,initialSettings:k})]})},FR=({id:r,label:e,value:a,onChange:i,placeholder:s,error:c,onRegenerate:d})=>{const{t:m}=Ze(),f=I.useCallback(E=>{i(E.target.value)},[i]),g=I.useCallback(()=>{d()},[d]);return l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{htmlFor:r,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),l.jsxs("div",{className:"flex",children:[l.jsx("div",{className:"relative flex-grow",children:l.jsx("input",{type:"text",id:r,value:a,onChange:f,placeholder:s,className:"outline-0 text-sm shadow-sm bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-l-lg block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white"})}),l.jsx("div",{className:"flex",children:l.jsx("button",{type:"button",onClick:g,className:"px-3 text-gray-500 dark:text-white bg-gray-200 hover:bg-gray-300 focus:ring-4 focus:outline-none focus:ring-gray-300 font-medium rounded-r-lg text-sm dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800",title:m("common.generate"),children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})})]}),c&&l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c})]})},OR=({attachments:r,onAttachmentsChange:e,itemId:a})=>{const{t:i}=Ze(),[s,c]=I.useState(""),d=!pa.isPopup(),m=async E=>{const p=E.target.files;if(!(!p||p.length===0)){c(i("attachmentUploader.uploading"));try{const N=[...r];for(const v of Array.from(p)){const x=await v.arrayBuffer(),T=new Uint8Array(x),k={Id:crypto.randomUUID().toUpperCase(),Filename:v.name,Blob:T,ItemId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};N.push(k)}e(N),c(i("attachmentUploader.uploadSuccess")),setTimeout(()=>c(""),3e3)}catch(N){console.error("Error uploading files:",N),c(i("common.errors.unknownErrorTryAgain")),setTimeout(()=>c(""),3e3)}E.target.value=""}},f=E=>{try{const p=[...r],N=p.findIndex(v=>v.Id===E.Id);N!==-1&&p.splice(N,1),e(p),c(i("attachmentUploader.deleteSuccess")),setTimeout(()=>c(""),3e3)}catch(p){console.error("Error deleting attachment:",p),c(i("common.errors.unknownErrorTryAgain")),setTimeout(()=>c(""),3e3)}},g=r.filter(E=>!E.IsDeleted);return l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[l.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:i("common.attachments")}),l.jsxs("div",{className:"space-y-4",children:[d?l.jsx("div",{className:"border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg p-4 text-center",children:l.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[l.jsx("p",{className:"mb-3",children:i("attachmentUploader.firefoxExpandRequired")}),l.jsx("button",{type:"button",onClick:()=>{const E=a?`/items/${a}`:"/items";pa.openInNewPopup(void 0,E)},className:"inline-flex items-center px-3 py-1.5 text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 rounded-md transition-colors",children:i("attachmentUploader.openExpandedWindow")})]})}):l.jsx("div",{children:l.jsx("input",{type:"file",multiple:!0,onChange:m,className:"block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer bg-gray-50 dark:text-gray-400 focus:outline-none dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400"})}),s&&l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s}),g.length>0&&l.jsx("div",{children:l.jsx("div",{className:"space-y-2",children:g.map(E=>l.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 dark:bg-gray-700 rounded border border-gray-200 dark:border-gray-600",children:[l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:E.Filename}),l.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(E.CreatedAt).toLocaleDateString()})]}),l.jsx("button",{type:"button",onClick:()=>f(E),className:"text-red-500 hover:text-red-700 focus:outline-none","aria-label":`Delete ${E.Filename}`,children:l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},E.Id))})})]})]})},ch=({className:r="w-5 h-5"})=>l.jsx("svg",{className:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"})}),jR=({itemId:r})=>{const{t:e}=Ze(),a=zt(),[i,s]=I.useState([]),[c,d]=I.useState(!0);return I.useEffect(()=>{if(!(a!=null&&a.sqliteClient)||!r){d(!1);return}try{const m=a.sqliteClient.passkeys.getByItemId(r);s(m)}catch(m){console.error("Error loading passkeys:",m)}finally{d(!1)}},[a==null?void 0:a.sqliteClient,r]),c?l.jsx("div",{className:"flex justify-center p-2",children:l.jsx($n,{})}):i.length===0?null:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e("passkeys.passkey")}),i.map(m=>l.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(ch,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"mb-1",children:l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:m.DisplayName||e("passkeys.passkey")})}),l.jsx("div",{className:"space-y-1 mb-2",children:m.RpId&&l.jsxs("div",{children:[l.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[e("passkeys.site"),":"," "]}),l.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:m.RpId})]})}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:e("passkeys.helpText")})]})]})},m.Id))]})},PR=({itemId:r,passkeyIdsMarkedForDeletion:e,onPasskeyMarkedForDeletion:a})=>{const{t:i}=Ze(),s=zt(),[c,d]=I.useState([]),[m,f]=I.useState(!0);I.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!r){f(!1);return}try{const p=s.sqliteClient.passkeys.getByItemId(r);d(p)}catch(p){console.error("Error loading passkeys:",p)}finally{f(!1)}},[s==null?void 0:s.sqliteClient,r]);const g=p=>{e.includes(p)||a([...e,p])},E=p=>{a(e.filter(N=>N!==p))};return m?l.jsx("div",{className:"flex justify-center p-2",children:l.jsx($n,{})}):c.length===0?null:l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[l.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:i("passkeys.passkey")}),l.jsx("div",{className:"space-y-3",children:c.map(p=>e.includes(p.Id)?l.jsx("div",{className:"p-3 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(ch,{className:"w-5 h-5 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-red-900 dark:text-red-100",children:i("passkeys.passkeyMarkedForDeletion")}),l.jsx("button",{type:"button",onClick:()=>E(p.Id),className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:i("common.undo"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M3 7v6h6"}),l.jsx("path",{d:"M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13"})]})})]}),l.jsx("p",{className:"text-xs text-red-800 dark:text-red-200",children:i("passkeys.passkeyWillBeDeleted")})]})]})},p.Id):l.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"flex items-start gap-2",children:[l.jsx(ch,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),l.jsxs("div",{className:"flex-1",children:[l.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[l.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p.DisplayName||i("passkeys.passkey")}),l.jsx("button",{type:"button",onClick:()=>g(p.Id),className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300",title:i("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("polyline",{points:"3 6 5 6 21 6"}),l.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}),l.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),l.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]}),l.jsx("div",{className:"space-y-1 mb-2",children:p.RpId&&l.jsxs("div",{children:[l.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[i("passkeys.site"),":"," "]}),l.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:p.RpId})]})}),l.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:i("passkeys.helpText")})]})]})},p.Id))})]})};//! otpauth 9.4.0 | (c) Héctor Molinero Fernández | MIT | https://github.com/hectorm/otpauth
//! noble-hashes 1.7.1 | (c) Paul Miller | MIT | https://github.com/paulmillr/noble-hashes
const HR=r=>{const e=new ArrayBuffer(8),a=new Uint8Array(e);let i=r;for(let s=7;s>=0&&i!==0;s--)a[s]=i&255,i-=a[s],i/=256;return a};function ed(r){if(!Number.isSafeInteger(r)||r<0)throw new Error("positive integer expected, got "+r)}function zR(r){return r instanceof Uint8Array||ArrayBuffer.isView(r)&&r.constructor.name==="Uint8Array"}function hd(r,...e){if(!zR(r))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(r.length))throw new Error("Uint8Array expected of length "+e+", got length="+r.length)}function QR(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");ed(r.outputLen),ed(r.blockLen)}function bo(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function FI(r,e){hd(r);const a=e.outputLen;if(r.length<a)throw new Error("digestInto() expects output buffer of length at least "+a)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function VR(r){return new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4))}function Rf(r){return new DataView(r.buffer,r.byteOffset,r.byteLength)}function Cr(r,e){return r<<32-e|r>>>e}function Df(r,e){return r<<e|r>>>32-e>>>0}const OE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function GR(r){return r<<24&4278190080|r<<8&16711680|r>>>8&65280|r>>>24&255}function jE(r){for(let e=0;e<r.length;e++)r[e]=GR(r[e])}function KR(r){if(typeof r!="string")throw new Error("utf8ToBytes expected string, got "+typeof r);return new Uint8Array(new TextEncoder().encode(r))}function Ad(r){return typeof r=="string"&&(r=KR(r)),hd(r),r}class Fh{clone(){return this._cloneInto()}}function No(r){const e=i=>r().update(Ad(i)).digest(),a=r();return e.outputLen=a.outputLen,e.blockLen=a.blockLen,e.create=()=>r(),e}class OI extends Fh{update(e){return bo(this),this.iHash.update(e),this}digestInto(e){bo(this),hd(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:a,iHash:i,finished:s,destroyed:c,blockLen:d,outputLen:m}=this;return e=e,e.finished=s,e.destroyed=c,e.blockLen=d,e.outputLen=m,e.oHash=a._cloneInto(e.oHash),e.iHash=i._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,a){super(),this.finished=!1,this.destroyed=!1,QR(e);const i=Ad(a);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,c=new Uint8Array(s);c.set(i.length>s?e.create().update(i).digest():i);for(let d=0;d<c.length;d++)c[d]^=54;this.iHash.update(c),this.oHash=e.create();for(let d=0;d<c.length;d++)c[d]^=106;this.oHash.update(c),c.fill(0)}}const uh=(r,e,a)=>new OI(r,e).update(a).digest();uh.create=(r,e)=>new OI(r,e);function qR(r,e,a,i){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,a,i);const s=BigInt(32),c=BigInt(4294967295),d=Number(a>>s&c),m=Number(a&c),f=i?4:0,g=i?0:4;r.setUint32(e+f,d,i),r.setUint32(e+g,m,i)}function jI(r,e,a){return r&e^~r&a}function PI(r,e,a){return r&e^r&a^e&a}class Oh extends Fh{update(e){bo(this);const{view:a,buffer:i,blockLen:s}=this;e=Ad(e);const c=e.length;for(let d=0;d<c;){const m=Math.min(s-this.pos,c-d);if(m===s){const f=Rf(e);for(;s<=c-d;d+=s)this.process(f,d);continue}i.set(e.subarray(d,d+m),this.pos),this.pos+=m,d+=m,this.pos===s&&(this.process(a,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){bo(this),FI(e,this),this.finished=!0;const{buffer:a,view:i,blockLen:s,isLE:c}=this;let{pos:d}=this;a[d++]=128,this.buffer.subarray(d).fill(0),this.padOffset>s-d&&(this.process(i,0),d=0);for(let p=d;p<s;p++)a[p]=0;qR(i,s-8,BigInt(this.length*8),c),this.process(i,0);const m=Rf(e),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=f/4,E=this.get();if(g>E.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<g;p++)m.setUint32(4*p,E[p],c)}digest(){const{buffer:e,outputLen:a}=this;this.digestInto(e);const i=e.slice(0,a);return this.destroy(),i}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:a,buffer:i,length:s,finished:c,destroyed:d,pos:m}=this;return e.length=s,e.pos=m,e.finished=c,e.destroyed=d,s%a&&e.buffer.set(i),e}constructor(e,a,i,s){super(),this.blockLen=e,this.outputLen=a,this.padOffset=i,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Rf(this.buffer)}}const Dl=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Pi=new Uint32Array(80);class WR extends Oh{get(){const{A:e,B:a,C:i,D:s,E:c}=this;return[e,a,i,s,c]}set(e,a,i,s,c){this.A=e|0,this.B=a|0,this.C=i|0,this.D=s|0,this.E=c|0}process(e,a){for(let f=0;f<16;f++,a+=4)Pi[f]=e.getUint32(a,!1);for(let f=16;f<80;f++)Pi[f]=Df(Pi[f-3]^Pi[f-8]^Pi[f-14]^Pi[f-16],1);let{A:i,B:s,C:c,D:d,E:m}=this;for(let f=0;f<80;f++){let g,E;f<20?(g=jI(s,c,d),E=1518500249):f<40?(g=s^c^d,E=1859775393):f<60?(g=PI(s,c,d),E=2400959708):(g=s^c^d,E=3395469782);const p=Df(i,5)+g+m+E+Pi[f]|0;m=d,d=c,c=Df(s,30),s=i,i=p}i=i+this.A|0,s=s+this.B|0,c=c+this.C|0,d=d+this.D|0,m=m+this.E|0,this.set(i,s,c,d,m)}roundClean(){Pi.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,20,8,!1),this.A=Dl[0]|0,this.B=Dl[1]|0,this.C=Dl[2]|0,this.D=Dl[3]|0,this.E=Dl[4]|0}}const YR=No(()=>new WR),JR=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Hi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),zi=new Uint32Array(64);class HI extends Oh{get(){const{A:e,B:a,C:i,D:s,E:c,F:d,G:m,H:f}=this;return[e,a,i,s,c,d,m,f]}set(e,a,i,s,c,d,m,f){this.A=e|0,this.B=a|0,this.C=i|0,this.D=s|0,this.E=c|0,this.F=d|0,this.G=m|0,this.H=f|0}process(e,a){for(let p=0;p<16;p++,a+=4)zi[p]=e.getUint32(a,!1);for(let p=16;p<64;p++){const N=zi[p-15],v=zi[p-2],x=Cr(N,7)^Cr(N,18)^N>>>3,T=Cr(v,17)^Cr(v,19)^v>>>10;zi[p]=T+zi[p-7]+x+zi[p-16]|0}let{A:i,B:s,C:c,D:d,E:m,F:f,G:g,H:E}=this;for(let p=0;p<64;p++){const N=Cr(m,6)^Cr(m,11)^Cr(m,25),v=E+N+jI(m,f,g)+JR[p]+zi[p]|0,T=(Cr(i,2)^Cr(i,13)^Cr(i,22))+PI(i,s,c)|0;E=g,g=f,f=m,m=d+v|0,d=c,c=s,s=i,i=v+T|0}i=i+this.A|0,s=s+this.B|0,c=c+this.C|0,d=d+this.D|0,m=m+this.E|0,f=f+this.F|0,g=g+this.G|0,E=E+this.H|0,this.set(i,s,c,d,m,f,g,E)}roundClean(){zi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,32,8,!1),this.A=Hi[0]|0,this.B=Hi[1]|0,this.C=Hi[2]|0,this.D=Hi[3]|0,this.E=Hi[4]|0,this.F=Hi[5]|0,this.G=Hi[6]|0,this.H=Hi[7]|0}}class XR extends HI{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const $R=No(()=>new HI),ZR=No(()=>new XR),xu=BigInt(2**32-1),dh=BigInt(32);function zI(r,e=!1){return e?{h:Number(r&xu),l:Number(r>>dh&xu)}:{h:Number(r>>dh&xu)|0,l:Number(r&xu)|0}}function QI(r,e=!1){let a=new Uint32Array(r.length),i=new Uint32Array(r.length);for(let s=0;s<r.length;s++){const{h:c,l:d}=zI(r[s],e);[a[s],i[s]]=[c,d]}return[a,i]}const eD=(r,e)=>BigInt(r>>>0)<<dh|BigInt(e>>>0),tD=(r,e,a)=>r>>>a,aD=(r,e,a)=>r<<32-a|e>>>a,nD=(r,e,a)=>r>>>a|e<<32-a,rD=(r,e,a)=>r<<32-a|e>>>a,iD=(r,e,a)=>r<<64-a|e>>>a-32,sD=(r,e,a)=>r>>>a-32|e<<64-a,oD=(r,e)=>e,lD=(r,e)=>r,VI=(r,e,a)=>r<<a|e>>>32-a,GI=(r,e,a)=>e<<a|r>>>32-a,KI=(r,e,a)=>e<<a-32|r>>>64-a,qI=(r,e,a)=>r<<a-32|e>>>64-a;function cD(r,e,a,i){const s=(e>>>0)+(i>>>0);return{h:r+a+(s/2**32|0)|0,l:s|0}}const uD=(r,e,a)=>(r>>>0)+(e>>>0)+(a>>>0),dD=(r,e,a,i)=>e+a+i+(r/2**32|0)|0,mD=(r,e,a,i)=>(r>>>0)+(e>>>0)+(a>>>0)+(i>>>0),gD=(r,e,a,i,s)=>e+a+i+s+(r/2**32|0)|0,fD=(r,e,a,i,s)=>(r>>>0)+(e>>>0)+(a>>>0)+(i>>>0)+(s>>>0),hD=(r,e,a,i,s,c)=>e+a+i+s+c+(r/2**32|0)|0,wt={fromBig:zI,split:QI,toBig:eD,shrSH:tD,shrSL:aD,rotrSH:nD,rotrSL:rD,rotrBH:iD,rotrBL:sD,rotr32H:oD,rotr32L:lD,rotlSH:VI,rotlSL:GI,rotlBH:KI,rotlBL:qI,add:cD,add3L:uD,add3H:dD,add4L:mD,add4H:gD,add5H:hD,add5L:fD},[AD,pD]=wt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(r=>BigInt(r))),Qi=new Uint32Array(80),Vi=new Uint32Array(80);class WI extends Oh{get(){const{Ah:e,Al:a,Bh:i,Bl:s,Ch:c,Cl:d,Dh:m,Dl:f,Eh:g,El:E,Fh:p,Fl:N,Gh:v,Gl:x,Hh:T,Hl:k}=this;return[e,a,i,s,c,d,m,f,g,E,p,N,v,x,T,k]}set(e,a,i,s,c,d,m,f,g,E,p,N,v,x,T,k){this.Ah=e|0,this.Al=a|0,this.Bh=i|0,this.Bl=s|0,this.Ch=c|0,this.Cl=d|0,this.Dh=m|0,this.Dl=f|0,this.Eh=g|0,this.El=E|0,this.Fh=p|0,this.Fl=N|0,this.Gh=v|0,this.Gl=x|0,this.Hh=T|0,this.Hl=k|0}process(e,a){for(let S=0;S<16;S++,a+=4)Qi[S]=e.getUint32(a),Vi[S]=e.getUint32(a+=4);for(let S=16;S<80;S++){const O=Qi[S-15]|0,M=Vi[S-15]|0,P=wt.rotrSH(O,M,1)^wt.rotrSH(O,M,8)^wt.shrSH(O,M,7),G=wt.rotrSL(O,M,1)^wt.rotrSL(O,M,8)^wt.shrSL(O,M,7),H=Qi[S-2]|0,z=Vi[S-2]|0,V=wt.rotrSH(H,z,19)^wt.rotrBH(H,z,61)^wt.shrSH(H,z,6),K=wt.rotrSL(H,z,19)^wt.rotrBL(H,z,61)^wt.shrSL(H,z,6),$=wt.add4L(G,K,Vi[S-7],Vi[S-16]),W=wt.add4H($,P,V,Qi[S-7],Qi[S-16]);Qi[S]=W|0,Vi[S]=$|0}let{Ah:i,Al:s,Bh:c,Bl:d,Ch:m,Cl:f,Dh:g,Dl:E,Eh:p,El:N,Fh:v,Fl:x,Gh:T,Gl:k,Hh:L,Hl:B}=this;for(let S=0;S<80;S++){const O=wt.rotrSH(p,N,14)^wt.rotrSH(p,N,18)^wt.rotrBH(p,N,41),M=wt.rotrSL(p,N,14)^wt.rotrSL(p,N,18)^wt.rotrBL(p,N,41),P=p&v^~p&T,G=N&x^~N&k,H=wt.add5L(B,M,G,pD[S],Vi[S]),z=wt.add5H(H,L,O,P,AD[S],Qi[S]),V=H|0,K=wt.rotrSH(i,s,28)^wt.rotrBH(i,s,34)^wt.rotrBH(i,s,39),$=wt.rotrSL(i,s,28)^wt.rotrBL(i,s,34)^wt.rotrBL(i,s,39),W=i&c^i&m^c&m,ne=s&d^s&f^d&f;L=T|0,B=k|0,T=v|0,k=x|0,v=p|0,x=N|0,{h:p,l:N}=wt.add(g|0,E|0,z|0,V|0),g=m|0,E=f|0,m=c|0,f=d|0,c=i|0,d=s|0;const he=wt.add3L(V,$,ne);i=wt.add3H(he,z,K,W),s=he|0}({h:i,l:s}=wt.add(this.Ah|0,this.Al|0,i|0,s|0)),{h:c,l:d}=wt.add(this.Bh|0,this.Bl|0,c|0,d|0),{h:m,l:f}=wt.add(this.Ch|0,this.Cl|0,m|0,f|0),{h:g,l:E}=wt.add(this.Dh|0,this.Dl|0,g|0,E|0),{h:p,l:N}=wt.add(this.Eh|0,this.El|0,p|0,N|0),{h:v,l:x}=wt.add(this.Fh|0,this.Fl|0,v|0,x|0),{h:T,l:k}=wt.add(this.Gh|0,this.Gl|0,T|0,k|0),{h:L,l:B}=wt.add(this.Hh|0,this.Hl|0,L|0,B|0),this.set(i,s,c,d,m,f,g,E,p,N,v,x,T,k,L,B)}roundClean(){Qi.fill(0),Vi.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}}class yD extends WI{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const ED=No(()=>new WI),bD=No(()=>new yD),YI=[],JI=[],XI=[],ID=BigInt(0),Bl=BigInt(1),vD=BigInt(2),CD=BigInt(7),ND=BigInt(256),wD=BigInt(113);for(let r=0,e=Bl,a=1,i=0;r<24;r++){[a,i]=[i,(2*a+3*i)%5],YI.push(2*(5*i+a)),JI.push((r+1)*(r+2)/2%64);let s=ID;for(let c=0;c<7;c++)e=(e<<Bl^(e>>CD)*wD)%ND,e&vD&&(s^=Bl<<(Bl<<BigInt(c))-Bl);XI.push(s)}const[xD,TD]=QI(XI,!0),PE=(r,e,a)=>a>32?KI(r,e,a):VI(r,e,a),HE=(r,e,a)=>a>32?qI(r,e,a):GI(r,e,a);function SD(r,e=24){const a=new Uint32Array(10);for(let i=24-e;i<24;i++){for(let d=0;d<10;d++)a[d]=r[d]^r[d+10]^r[d+20]^r[d+30]^r[d+40];for(let d=0;d<10;d+=2){const m=(d+8)%10,f=(d+2)%10,g=a[f],E=a[f+1],p=PE(g,E,1)^a[m],N=HE(g,E,1)^a[m+1];for(let v=0;v<50;v+=10)r[d+v]^=p,r[d+v+1]^=N}let s=r[2],c=r[3];for(let d=0;d<24;d++){const m=JI[d],f=PE(s,c,m),g=HE(s,c,m),E=YI[d];s=r[E],c=r[E+1],r[E]=f,r[E+1]=g}for(let d=0;d<50;d+=10){for(let m=0;m<10;m++)a[m]=r[d+m];for(let m=0;m<10;m++)r[d+m]^=~a[(m+2)%10]&a[(m+4)%10]}r[0]^=xD[i],r[1]^=TD[i]}a.fill(0)}class jh extends Fh{keccak(){OE||jE(this.state32),SD(this.state32,this.rounds),OE||jE(this.state32),this.posOut=0,this.pos=0}update(e){bo(this);const{blockLen:a,state:i}=this;e=Ad(e);const s=e.length;for(let c=0;c<s;){const d=Math.min(a-this.pos,s-c);for(let m=0;m<d;m++)i[this.pos++]^=e[c++];this.pos===a&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:a,pos:i,blockLen:s}=this;e[i]^=a,(a&128)!==0&&i===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){bo(this,!1),hd(e),this.finish();const a=this.state,{blockLen:i}=this;for(let s=0,c=e.length;s<c;){this.posOut>=i&&this.keccak();const d=Math.min(i-this.posOut,c-s);e.set(a.subarray(this.posOut,this.posOut+d),s),this.posOut+=d,s+=d}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ed(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(FI(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:a,suffix:i,outputLen:s,rounds:c,enableXOF:d}=this;return e||(e=new jh(a,i,s,d,c)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=c,e.suffix=i,e.outputLen=s,e.enableXOF=d,e.destroyed=this.destroyed,e}constructor(e,a,i,s=!1,c=24){if(super(),this.blockLen=e,this.suffix=a,this.outputLen=i,this.enableXOF=s,this.rounds=c,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ed(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=VR(this.state)}}const pd=(r,e,a)=>No(()=>new jh(e,r,a)),kD=pd(6,144,224/8),LD=pd(6,136,256/8),RD=pd(6,104,384/8),DD=pd(6,72,512/8),Io=(()=>{if(typeof globalThis=="object")return globalThis;Object.defineProperty(Object.prototype,"__GLOBALTHIS__",{get(){return this},configurable:!0});try{if(typeof __GLOBALTHIS__<"u")return __GLOBALTHIS__}finally{delete Object.prototype.__GLOBALTHIS__}if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global})(),zE={SHA1:YR,SHA224:ZR,SHA256:$R,SHA384:bD,SHA512:ED,"SHA3-224":kD,"SHA3-256":LD,"SHA3-384":RD,"SHA3-512":DD},Ph=r=>{switch(!0){case/^(?:SHA-?1|SSL3-SHA1)$/i.test(r):return"SHA1";case/^SHA(?:2?-)?224$/i.test(r):return"SHA224";case/^SHA(?:2?-)?256$/i.test(r):return"SHA256";case/^SHA(?:2?-)?384$/i.test(r):return"SHA384";case/^SHA(?:2?-)?512$/i.test(r):return"SHA512";case/^SHA3-224$/i.test(r):return"SHA3-224";case/^SHA3-256$/i.test(r):return"SHA3-256";case/^SHA3-384$/i.test(r):return"SHA3-384";case/^SHA3-512$/i.test(r):return"SHA3-512";default:throw new TypeError(`Unknown hash algorithm: ${r}`)}},BD=(r,e,a)=>{if(uh){const i=zE[r]??zE[Ph(r)];return uh(i,e,a)}else throw new Error("Missing HMAC function")},mh="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",UD=r=>{r=r.replace(/ /g,"");let e=r.length;for(;r[e-1]==="=";)--e;r=(e<r.length?r.substring(0,e):r).toUpperCase();const a=new ArrayBuffer(r.length*5/8|0),i=new Uint8Array(a);let s=0,c=0,d=0;for(let m=0;m<r.length;m++){const f=mh.indexOf(r[m]);if(f===-1)throw new TypeError(`Invalid character found: ${r[m]}`);c=c<<5|f,s+=5,s>=8&&(s-=8,i[d++]=c>>>s)}return i},MD=r=>{let e=0,a=0,i="";for(let s=0;s<r.length;s++)for(a=a<<8|r[s],e+=8;e>=5;)i+=mh[a>>>e-5&31],e-=5;return e>0&&(i+=mh[a<<5-e&31]),i},_D=r=>{r=r.replace(/ /g,"");const e=new ArrayBuffer(r.length/2),a=new Uint8Array(e);for(let i=0;i<r.length;i+=2)a[i/2]=parseInt(r.substring(i,i+2),16);return a},FD=r=>{let e="";for(let a=0;a<r.length;a++){const i=r[a].toString(16);i.length===1&&(e+="0"),e+=i}return e.toUpperCase()},OD=r=>{const e=new ArrayBuffer(r.length),a=new Uint8Array(e);for(let i=0;i<r.length;i++)a[i]=r.charCodeAt(i)&255;return a},jD=r=>{let e="";for(let a=0;a<r.length;a++)e+=String.fromCharCode(r[a]);return e},QE=Io.TextEncoder?new Io.TextEncoder:null,VE=Io.TextDecoder?new Io.TextDecoder:null,PD=r=>{if(!QE)throw new Error("Encoding API not available");return QE.encode(r)},HD=r=>{if(!VE)throw new Error("Encoding API not available");return VE.decode(r)},zD=r=>{var e;if((e=Io.crypto)!=null&&e.getRandomValues)return Io.crypto.getRandomValues(new Uint8Array(r));throw new Error("Cryptography API not available")};class ri{static fromLatin1(e){return new ri({buffer:OD(e).buffer})}static fromUTF8(e){return new ri({buffer:PD(e).buffer})}static fromBase32(e){return new ri({buffer:UD(e).buffer})}static fromHex(e){return new ri({buffer:_D(e).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:jD(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:HD(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:MD(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:FD(this.bytes)}),this.hex}constructor({buffer:e,size:a=20}={}){this.bytes=typeof e>"u"?zD(a):new Uint8Array(e),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const QD=(r,e)=>{{if(r.length!==e.length)throw new TypeError("Input strings must have the same length");let a=-1,i=0;for(;++a<r.length;)i|=r.charCodeAt(a)^e.charCodeAt(a);return i===0}};class ka{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:e,algorithm:a=ka.defaults.algorithm,digits:i=ka.defaults.digits,counter:s=ka.defaults.counter}){const c=BD(a,e.bytes,HR(s)),d=c[c.byteLength-1]&15;return(((c[d]&127)<<24|(c[d+1]&255)<<16|(c[d+2]&255)<<8|c[d+3]&255)%10**i).toString().padStart(i,"0")}generate({counter:e=this.counter++}={}){return ka.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:e})}static validate({token:e,secret:a,algorithm:i,digits:s=ka.defaults.digits,counter:c=ka.defaults.counter,window:d=ka.defaults.window}){if(e.length!==s)return null;let m=null;const f=g=>{const E=ka.generate({secret:a,algorithm:i,digits:s,counter:g});QD(e,E)&&(m=g-c)};f(c);for(let g=1;g<=d&&m===null&&(f(c-g),!(m!==null||(f(c+g),m!==null)));++g);return m}validate({token:e,counter:a=this.counter,window:i}){return ka.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:a,window:i})}toString(){const e=encodeURIComponent;return`otpauth://hotp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&counter=${e(this.counter)}`}constructor({issuer:e=ka.defaults.issuer,label:a=ka.defaults.label,issuerInLabel:i=ka.defaults.issuerInLabel,secret:s=new ri,algorithm:c=ka.defaults.algorithm,digits:d=ka.defaults.digits,counter:m=ka.defaults.counter}={}){this.issuer=e,this.label=a,this.issuerInLabel=i,this.secret=typeof s=="string"?ri.fromBase32(s):s,this.algorithm=Ph(c),this.digits=d,this.counter=m}}class Ia{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:e=Ia.defaults.period,timestamp:a=Date.now()}={}){return Math.floor(a/1e3/e)}counter({timestamp:e=Date.now()}={}){return Ia.counter({period:this.period,timestamp:e})}static remaining({period:e=Ia.defaults.period,timestamp:a=Date.now()}={}){return e*1e3-a%(e*1e3)}remaining({timestamp:e=Date.now()}={}){return Ia.remaining({period:this.period,timestamp:e})}static generate({secret:e,algorithm:a,digits:i,period:s=Ia.defaults.period,timestamp:c=Date.now()}){return ka.generate({secret:e,algorithm:a,digits:i,counter:Ia.counter({period:s,timestamp:c})})}generate({timestamp:e=Date.now()}={}){return Ia.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:a,algorithm:i,digits:s,period:c=Ia.defaults.period,timestamp:d=Date.now(),window:m}){return ka.validate({token:e,secret:a,algorithm:i,digits:s,counter:Ia.counter({period:c,timestamp:d}),window:m})}validate({token:e,timestamp:a,window:i}){return Ia.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:a,window:i})}toString(){const e=encodeURIComponent;return`otpauth://totp/${this.issuer.length>0?this.issuerInLabel?`${e(this.issuer)}:${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?issuer=${e(this.issuer)}&`:`${e(this.label)}?`}secret=${e(this.secret.base32)}&algorithm=${e(this.algorithm)}&digits=${e(this.digits)}&period=${e(this.period)}`}constructor({issuer:e=Ia.defaults.issuer,label:a=Ia.defaults.label,issuerInLabel:i=Ia.defaults.issuerInLabel,secret:s=new ri,algorithm:c=Ia.defaults.algorithm,digits:d=Ia.defaults.digits,period:m=Ia.defaults.period}={}){this.issuer=e,this.label=a,this.issuerInLabel=i,this.secret=typeof s=="string"?ri.fromBase32(s):s,this.algorithm=Ph(c),this.digits=d,this.period=m}}const VD=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,GD=/^[2-7A-Z]+=*$/i,KD=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,qD=/^[+-]?\d+$/,GE=/^\+?[1-9]\d*$/;class WD{static parse(e){let a;try{a=e.match(VD)}catch{}if(!Array.isArray(a))throw new URIError("Invalid URI format");const i=a[1].toLowerCase(),s=a[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),c=a[3].split("&").reduce((f,g)=>{const E=g.split(/=(.*)/,2).map(decodeURIComponent),p=E[0].toLowerCase(),N=E[1],v=f;return v[p]=N,v},{});let d;const m={};if(i==="hotp")if(d=ka,typeof c.counter<"u"&&qD.test(c.counter))m.counter=parseInt(c.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(i==="totp"){if(d=Ia,typeof c.period<"u")if(GE.test(c.period))m.period=parseInt(c.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof c.issuer<"u"&&(m.issuer=c.issuer),s.length===2?(m.label=s[1],typeof m.issuer>"u"||m.issuer===""?m.issuer=s[0]:s[0]===""&&(m.issuerInLabel=!1)):(m.label=s[0],typeof m.issuer<"u"&&m.issuer!==""&&(m.issuerInLabel=!1)),typeof c.secret<"u"&&GD.test(c.secret))m.secret=c.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof c.algorithm<"u")if(KD.test(c.algorithm))m.algorithm=c.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof c.digits<"u")if(GE.test(c.digits))m.digits=parseInt(c.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new d(m)}static stringify(e){if(e instanceof ka||e instanceof Ia)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const YD=({totpCodes:r,onTotpCodesChange:e,originalTotpCodeIds:a,isAddFormVisible:i,formData:s,onStateChange:c})=>{const{t:d}=Ze(),[m,f]=I.useState(null),g=(L,B)=>{let S=L.trim(),O=B.trim();if(S.toLowerCase().startsWith("otpauth://totp/"))try{const M=WD.parse(S);M instanceof Ia&&(S=M.secret.base32,!O&&M.label&&(O=M.label))}catch{throw new Error(d("totp.errors.invalidSecretKey"))}if(S=S.replace(/\s/g,""),!/^[A-Z2-7]+=*$/i.test(S))throw new Error(d("totp.errors.invalidSecretKey"));return{secretKey:S,name:O||d("totp.defaultName")}},E=()=>{c({isAddFormVisible:!0,formData:{name:"",secretKey:""}}),f(null)},p=()=>{c({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),f(null)},N=L=>{c({isAddFormVisible:i,formData:{...s,...L}})},v=L=>{if(L==null||L.preventDefault(),f(null),!s.secretKey){f(d("items.validation.required"));return}try{const{secretKey:B,name:S}=g(s.secretKey,s.name),O={Id:crypto.randomUUID().toUpperCase(),Name:S,SecretKey:B,ItemId:""},M=[...r,O];e(M),p()}catch(B){B instanceof Error?f(B.message):f(d("common.errors.unknownErrorTryAgain"))}},x=L=>{const B=a.includes(L.Id);let S;B?S=r.map(O=>O.Id===L.Id?{...O,IsDeleted:!0}:O):S=r.filter(O=>O.Id!==L.Id),e(S)},T=r.filter(L=>!L.IsDeleted),k=T.length>0;return l.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:d("common.twoFactorAuthentication")}),k&&!i&&l.jsx("button",{type:"button",onClick:E,className:"w-8 h-8 flex items-center justify-center text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600 dark:focus:ring-primary-800",title:d("totp.addCode"),children:l.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),!k&&!i&&l.jsxs("button",{type:"button",onClick:E,className:"w-full py-1.5 px-4 flex items-center justify-center gap-2 text-primary-700 hover:text-white border border-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg dark:border-primary-500 dark:text-primary-500 dark:hover:text-white dark:hover:bg-primary-600 dark:focus:ring-primary-800",children:[l.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),l.jsx("span",{children:d("totp.addCode")})]}),i&&l.jsxs("div",{className:"p-4 mb-4 bg-gray-50 border border-gray-200 rounded-lg dark:bg-gray-700 dark:border-gray-600",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h4",{className:"text-lg font-medium text-gray-900 dark:text-white",children:d("totp.addCode")}),k&&l.jsx("button",{type:"button",onClick:p,className:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white",children:l.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 14 14",children:l.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})})})]}),l.jsx("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:d("totp.instructions")}),m&&l.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-lg dark:bg-red-900/20 dark:border-red-800",children:l.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:m})}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{htmlFor:"totp-name",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:d("totp.nameOptional")}),l.jsx("input",{id:"totp-name",type:"text",value:s.name,onChange:L=>N({name:L.target.value}),className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{htmlFor:"totp-secret",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:d("totp.secretKey")}),l.jsx("input",{id:"totp-secret",type:"text",value:s.secretKey,onChange:L=>N({secretKey:L.target.value}),onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),v(L))},className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"})]}),l.jsx("div",{className:"flex justify-end",children:l.jsx("button",{type:"button",onClick:L=>v(L),className:"text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:outline-none focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",children:d("common.save")})})]}),k&&l.jsx("div",{className:"grid grid-cols-1 gap-4 mt-4",children:T.map(L=>l.jsx("div",{className:"p-2 ps-3 pe-3 bg-gray-50 border border-gray-200 rounded-lg dark:bg-gray-700 dark:border-gray-600",children:l.jsxs("div",{className:"flex justify-between items-center gap-2",children:[l.jsx("div",{className:"flex items-center flex-1",children:l.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:L.Name})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"flex flex-col items-end",children:l.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:d("totp.saveToViewCode")})}),l.jsx("button",{type:"button",onClick:()=>x(L),className:"text-red-600 hover:text-red-800 dark:text-red-500 dark:hover:text-red-400",children:l.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M9 2a1 1 0 00-.894.553L7.382 4H4a1 1 0 000 2v10a2 2 0 002 2h8a2 2 0 002-2V6a1 1 0 100-2h-3.382l-.724-1.447A1 1 0 0011 2H9zM7 8a1 1 0 012 0v6a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v6a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"})})})]})]})},L.Id))})]})},JD=({inputRef:r,value:e,onChange:a,folders:i,selectedFolderId:s,onFolderChange:c})=>{const{t:d}=Ze(),[m,f]=I.useState(!1),g=i.find(x=>x.Id===s),E=I.useCallback(x=>{c(x),f(!1)},[c]),p=I.useCallback(x=>{a(x.target.value)},[a]),N=I.useCallback(()=>{f(!0)},[]),v=I.useCallback(()=>{f(!1)},[]);return l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"itemName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[d("items.itemName")," ",l.jsx("span",{className:"text-red-500",children:"*"})]}),l.jsxs("div",{className:"relative flex items-center",children:[l.jsx("input",{ref:r,id:"itemName",type:"text",value:e,onChange:p,className:`w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white ${s?"pr-28":"pr-10"}`,required:!0}),l.jsxs("button",{type:"button",onClick:N,className:`absolute right-1 z-10 flex items-center gap-1 px-2 py-1 rounded transition-colors text-xs ${s?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400 hover:bg-primary-200 dark:hover:bg-primary-900/50":"text-gray-500 dark:text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-600"}`,title:(g==null?void 0:g.Name)||"-",children:[l.jsx("svg",{className:"w-4 h-4 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),s&&l.jsx("span",{className:"max-w-16 truncate",children:g==null?void 0:g.Name})]})]})]}),m&&l.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:v}),l.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:l.jsxs("div",{className:"relative transform overflow-hidden rounded-lg bg-white dark:bg-gray-800 px-4 pb-4 pt-5 text-left shadow-xl transition-all w-full max-w-sm",children:[l.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:v,children:[l.jsx("span",{className:"sr-only",children:d("common.close")}),l.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),l.jsx("div",{className:"mb-4",children:l.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:d("items.folder")})}),l.jsxs("div",{className:"space-y-1 max-h-64 overflow-y-auto",children:[l.jsxs("button",{type:"button",onClick:()=>E(null),className:`w-full px-3 py-2 text-left rounded-md flex items-center gap-3 transition-colors ${s?"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700":"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300"}`,children:[l.jsx("svg",{className:`w-5 h-5 ${s?"text-gray-400":"text-primary-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"})}),l.jsx("span",{className:"font-medium",children:"—"}),!s&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]}),i.map(x=>l.jsxs("button",{type:"button",onClick:()=>E(x.Id),className:`w-full px-3 py-2 text-left rounded-md flex items-center gap-3 transition-colors ${s===x.Id?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"}`,children:[l.jsx("svg",{className:`w-5 h-5 ${s===x.Id?"text-primary-500":"text-gray-400"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l.jsx("span",{className:"font-medium",children:x.Name}),s===x.Id&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},x.Id))]})]})})]})]})},td=[{type:ma.Login,titleKey:"itemTypes.login.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})},{type:ma.Alias,titleKey:"itemTypes.alias.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})},{type:ma.CreditCard,titleKey:"itemTypes.creditCard.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})},{type:ma.Note,titleKey:"itemTypes.note.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}],XD=({selectedType:r,isEditMode:e,showDropdown:a,onDropdownToggle:i,onTypeChange:s,onRegenerateAlias:c})=>{const{t:d}=Ze(),m=td.find(f=>f.type===r);return l.jsxs("div",{className:"relative",children:[l.jsxs("div",{className:"w-full px-4 py-2 bg-primary-50 dark:bg-primary-900/20 border border-primary-200 dark:border-primary-800 rounded-lg flex items-center gap-2",children:[l.jsxs("button",{type:"button",onClick:()=>i(!a),className:"flex-1 flex items-center justify-between hover:opacity-80 transition-opacity",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:m==null?void 0:m.iconSvg}),l.jsxs("span",{className:"text-primary-700 dark:text-primary-300 font-medium text-sm",children:[d(e?"itemTypes.editing":"itemTypes.creating")," ",m?d(m.titleKey):""]})]}),l.jsx("svg",{className:`w-4 h-4 text-primary-500 transition-transform ${a?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),r===ma.Alias&&!e&&c&&l.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),c()},className:"flex-shrink-0 p-1.5 text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 hover:bg-primary-100 dark:hover:bg-primary-900/40 rounded transition-colors",title:d("itemTypes.regenerateAlias"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M23 4v6h-6"}),l.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})]}),a&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>i(!1)}),l.jsx("div",{className:"absolute z-20 mt-1 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-md shadow-lg",children:td.map(f=>l.jsxs("button",{type:"button",onClick:()=>s(f.type),className:`w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 ${r===f.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[l.jsx("span",{className:r===f.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:f.iconSvg}),l.jsx("span",{className:"font-medium",children:d(f.titleKey)}),r===f.type&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},f.type))})]})]})};var $I=(r=>(r.Male="Male",r.Female="Female",r.Other="Other",r))($I||{}),Hh=class ei{constructor(){this.symbols=[".","-"]}generateUsername(e){let a=this.generateEmailPrefix(e);return a=a.replace(/[^a-zA-Z0-9]/g,""),a.length<ei.MIN_LENGTH?a+=this.generateRandomString(ei.MIN_LENGTH-a.length):a.length>ei.MAX_LENGTH&&(a=a.substring(0,ei.MAX_LENGTH)),a}generateEmailPrefix(e){const a=[];switch(typeof e.birthDate=="string"&&(e.birthDate=new Date(e.birthDate)),this.getSecureRandom(4)){case 0:a.push(e.firstName.substring(0,1).toLowerCase()+e.lastName.toLowerCase());break;case 1:a.push((e.firstName+e.lastName).toLowerCase());break;case 2:a.push(e.firstName.toLowerCase()+e.lastName.substring(0,1).toLowerCase());break;case 3:a.push(e.firstName.substring(0,Math.min(3,e.firstName.length)).toLowerCase()+e.lastName.toLowerCase());break}switch(this.getSecureRandom(2)){case 0:a.push(e.birthDate.getFullYear().toString());break;case 1:a.push(e.birthDate.getFullYear().toString().substring(2));break}let i=a.join(this.getRandomSymbol());if(this.getSecureRandom(2)===0){const s=this.getSecureRandom(i.length);i=i.slice(0,s)+this.getRandomSymbol()+i.slice(s)}return i=this.sanitizeEmailPrefix(i),i.length<ei.MIN_LENGTH?i+=this.generateRandomString(ei.MIN_LENGTH-i.length):i.length>ei.MAX_LENGTH&&(i=i.substring(0,ei.MAX_LENGTH)),i}generateRandomEmailPrefix(e=14){return this.generateRandomString(e)}sanitizeEmailPrefix(e){let a=e.replace(/[^a-zA-Z0-9._-]/g,"");return a=a.replace(/[-_.]{2,}/g,i=>i[0]),a=a.replace(/^[-._]+/,""),a=a.replace(/[-._]*$/,""),a}getRandomSymbol(){return this.getSecureRandom(3)===0?this.symbols[this.getSecureRandom(this.symbols.length)]:""}generateRandomString(e){const a="abcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e},()=>a.charAt(this.getSecureRandom(a.length))).join("")}getSecureRandom(e){const a=new Uint32Array(1);return crypto.getRandomValues(a),a[0]%e}};Hh.MIN_LENGTH=6;Hh.MAX_LENGTH=20;var zh=Hh,Ss=class{constructor(){this.firstNamesMale=[],this.firstNamesFemale=[],this.lastNames=[],this.random=Math.random,this.firstNamesMale=this.getFirstNamesMaleJson(),this.firstNamesFemale=this.getFirstNamesFemaleJson(),this.lastNames=this.getLastNamesJson()}getFirstNamesMaleByDecade(){return[]}getFirstNamesFemaleByDecade(){return[]}generateRandomDateOfBirth(r){if(r){const{targetYear:m,yearDeviation:f}=r;if(f===0){const g=new Date(m,0,1),E=new Date(m,11,31),p=g.getTime()+this.random()*(E.getTime()-g.getTime());return new Date(p)}else{const g=m-f,E=m+f,p=new Date(g,0,1),N=new Date(E,11,31),v=p.getTime()+this.random()*(N.getTime()-p.getTime());return new Date(v)}}const e=new Date,a=21,i=65,s=new Date(e.getFullYear()-i,e.getMonth(),e.getDate()),c=new Date(e.getFullYear()-a,e.getMonth(),e.getDate()),d=s.getTime()+this.random()*(c.getTime()-s.getTime());return new Date(d)}selectFirstnamesForBirthdate(r,e){const a=r.getFullYear(),i=e?this.getFirstNamesMaleByDecade():this.getFirstNamesFemaleByDecade();if(i.length===0)return e?this.firstNamesMale:this.firstNamesFemale;const s=i.filter(d=>a>=d.startYear&&a<=d.endYear);if(s.length>0){const d=[];return s.forEach(m=>d.push(...m.names)),d}const c=[];return i.forEach(d=>c.push(...d.names)),c.length>0?c:e?this.firstNamesMale:this.firstNamesFemale}generateRandomIdentity(r,e){const a={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let i;r==="random"||r===void 0?i=this.random()<.5?"Male":"Female":r==="male"?i="Male":r==="female"?i="Female":i="Male",a.gender=i,a.birthDate=this.generateRandomDateOfBirth(e);let s;if(i==="Male")s=this.selectFirstnamesForBirthdate(a.birthDate,!0);else if(i==="Female")s=this.selectFirstnamesForBirthdate(a.birthDate,!1);else{const d=this.random()<.5;s=this.selectFirstnamesForBirthdate(a.birthDate,d)}a.firstName=s[Math.floor(this.random()*s.length)],a.lastName=this.lastNames[Math.floor(this.random()*this.lastNames.length)];const c=new zh;return a.emailPrefix=c.generateEmailPrefix(a),a.nickName=c.generateUsername(a),a}},$D=["Aaron","Adam","Adrian","Aidan","Aiden","Alan","Albert","Alex","Alexander","Alfred","Amir","Andrew","Anthony","Antonio","Archer","Arthur","Asher","Austin","Axel","Barry","Beau","Beckett","Benjamin","Bennett","Bernard","Blake","Braden","Bradley","Brady","Brandon","Braxton","Brayden","Brendan","Brett","Brian","Bruce","Bryan","Bryce","Bryson","Caden","Caleb","Calvin","Camden","Cameron","Carlos","Carson","Carter","Casey","Cecil","Charles","Chase","Chester","Christian","Christopher","Clarence","Claude","Clifford","Clyde","Cody","Cole","Colin","Collin","Colton","Connor","Cooper","Corey","Craig","Curtis","Dakota","Dale","Dalton","Damian","Dan","Daniel","Darrell","Daryl","David","Dawson","Dean","Declan","Dennis","Derek","Devin","Dominic","Dominick","Don","Douglas","Dustin","Dylan","Earl","Easton","Edgar","Edmund","Edward","Edwin","Eli","Elias","Elijah","Elliot","Elliott","Emilio","Emmett","Eric","Ethan","Eugene","Evan","Everett","Felix","Ferdinand","Floyd","Forrest","Francis","Franklin","Frederick","Gabriel","Gael","Garrett","Gary","Gavin","George","Gerald","Gilbert","Glen","Gordon","Graham","Grant","Grayson","Gregory","Greyson","Harold","Harrison","Harvey","Hayden","Henry","Herman","Howard","Hudson","Hugh","Hugo","Hunter","Ian","Irving","Isaac","Isaiah","Ivan","Jace","Jack","Jackson","Jacob","Jaden","James","Jared","Jason","Jasper","Jayden","Jeffrey","Jeremiah","Jeremy","Jerome","Jesse","Jesus","Joel","John","Jonathan","Jordan","Jorge","Jose","Joseph","Joshua","Josiah","Juan","Justin","Kai","Kayden","Keith","Kenneth","Kevin","Kingston","Knox","Kyle","Landon","Lawrence","Leo","Leon","Leonard","Leonardo","Leslie","Levi","Liam","Lincoln","Lloyd","Logan","Luca","Lucas","Luis","Luke","Maddox","Malachi","Malcolm","Marcus","Mark","Martin","Marvin","Mason","Mateo","Matthew","Maurice","Max","Maxwell","Micah","Michael","Miguel","Miles","Milton","Mitchell","Morris","Nathan","Nathaniel","Neil","Nelson","Nicholas","Noah","Nolan","Norman","Oliver","Oscar","Owen","Parker","Patrick","Paul","Perry","Peter","Philip","Phillip","Preston","Ralph","Randy","Ray","Raymond","Rhett","Richard","Riley","Robert","Roderick","Rodney","Roger","Roland","Roman","Ronald","Ross","Roy","Russell","Ryan","Ryder","Ryker","Samuel","Sawyer","Scott","Sean","Sebastian","Seth","Shane","Shawn","Silas","Simon","Spencer","Stanley","Stephen","Steven","Stuart","Tanner","Terrence","Theodore","Thomas","Timothy","Travis","Trevor","Tristan","Tyler","Vernon","Victor","Vincent","Wade","Wallace","Walter","Warren","Wayne","Wendell","Wesley","Weston","William","Winston","Wyatt","Xavier","Zachariah","Zachary","Zane"],ZD=["Aaliyah","Abigail","Ada","Adalyn","Adalynn","Addison","Adeline","Adriana","Alexa","Alexandra","Alice","Alina","Allison","Alyssa","Amara","Amaya","Amelia","Anastasia","Andrea","Anna","Annabelle","Aria","Ariana","Arianna","Arielle","Arya","Ashley","Aspen","Athena","Aubree","Aubrey","Audrey","Aurora","Autumn","Ava","Avery","Ayla","Bailey","Beatrice","Bella","Bianca","Blair","Brianna","Brielle","Brooklyn","Brynn","Calliope","Camila","Camille","Carmen","Caroline","Cassidy","Catalina","Cecilia","Celeste","Charlie","Charlotte","Chloe","Claire","Clara","Cora","Coraline","Dahlia","Daisy","Dakota","Daphne","Dawn","Delilah","Diana","Eden","Eleanor","Elena","Eliana","Elise","Eliza","Elizabeth","Ella","Ellie","Eloise","Ember","Emerson","Emersyn","Emery","Emilia","Emily","Emma","Esme","Esther","Eva","Evangeline","Evelyn","Everly","Faith","Fiona","Flora","Florence","Francesca","Freya","Gabriella","Gemma","Genesis","Georgia","Gianna","Giselle","Grace","Gwendolyn","Hadley","Hailey","Hannah","Harlow","Harmony","Harper","Haven","Hazel","Heidi","Helena","Holly","Hope","Imogen","India","Indie","Iris","Isabel","Isabella","Isabelle","Isla","Ivy","Jade","Jasmine","Jessie","Jocelyn","Josephine","Josie","Julia","Juliana","Juliet","June","Juniper","Kaia","Katherine","Kayla","Kaylee","Keira","Kennedy","Khloe","Kinsley","Kylie","Lara","Laura","Laurel","Layla","Leah","Leilani","Lena","Liliana","Lillian","Lily","Lola","Lorelei","Lucia","Lucy","Luna","Lydia","Lyla","Mabel","Mackenzie","Madeline","Madelyn","Madison","Maeve","Magnolia","Maisie","Malia","Margaret","Margot","Maria","Marina","Marlowe","Mary","Matilda","Maya","Melanie","Melody","Mia","Mira","Miranda","Morgan","Nadia","Naomi","Natalia","Natalie","Nell","Nevaeh","Nina","Noelle","Nora","Norah","Nova","Octavia","Odette","Olive","Olivia","Opal","Ophelia","Paisley","Pearl","Penelope","Peyton","Phoebe","Phoenix","Piper","Poppy","Primrose","Quinn","Raelynn","Ramona","Raven","Reagan","Reese","Riley","River","Robin","Rosalie","Rose","Rosemary","Rowan","Ruby","Ruth","Rylee","Ryleigh","Sabrina","Sadie","Sage","Salem","Samantha","Sarah","Sasha","Savannah","Scarlett","Selena","Serena","Serenity","Sienna","Sierra","Simone","Skye","Skylar","Sloane","Sofia","Sophia","Sophie","Stella","Summer","Sylvia","Sylvie","Talia","Taylor","Tessa","Thea","Thora","Valentina","Valeria","Vera","Victoria","Violet","Vivian","Vivienne","Willa","Willow","Winnie","Winter","Wren","Ximena","Yara","Zara","Zoe","Zoey"],eB=["Abbott","Adams","Aguilar","Alexander","Allen","Alvarez","Anderson","Atkins","Bailey","Baker","Baldwin","Ballard","Barber","Barker","Barnes","Barrett","Bauer","Baxter","Beard","Bell","Bennett","Benson","Black","Blackwood","Blake","Blanchard","Booth","Bowman","Bradley","Briggs","Brooks","Brown","Bryant","Buckley","Burke","Burns","Butler","Byrd","Cain","Campbell","Cannon","Carlson","Carter","Castillo","Castro","Chandler","Chapman","Chavez","Chen","Clark","Clarke","Cobb","Cole","Coleman","Collier","Collins","Conrad","Cook","Cooke","Cooper","Cox","Craig","Crawford","Cross","Cruz","Cunningham","Dalton","Daniel","Davenport","Davis","Dawson","Dempsey","Dennis","Diaz","Dickerson","Dillon","Dixon","Doyle","Duran","Dyer","Edwards","Ellis","Erickson","Evans","Ewing","Farley","Farr","Farrell","Fernandez","Ferris","Fisher","Fitzgerald","Fleming","Fletcher","Flores","Foley","Ford","Foster","Fowler","Frazier","Freeman","Frost","Fuller","Gallagher","Garcia","Gardner","Garner","Garrett","Gates","Gibbs","Gibson","Gill","Glover","Goldberg","Gomez","Gonzales","Gonzalez","Goodman","Goodwin","Gordon","Graham","Graves","Gray","Green","Griffin","Griffith","Gross","Gutierrez","Guzman","Hale","Hall","Hamilton","Hancock","Harmon","Harris","Harrison","Hawkins","Hayes","Hayward","Henderson","Hendricks","Henry","Hensley","Hernandez","Herrera","Hicks","Hill","Hodges","Holland","Holmes","Holt","Hoover","Howard","Hudson","Huffman","Hughes","Humphrey","Hunter","Hutchinson","Isaac","Jackson","Jacobson","James","Jarvis","Jenkins","Jimenez","Johnson","Jones","Jordan","Keller","Kelly","Kennedy","Kent","Kerr","Kim","King","Kirby","Knowles","Koch","Landry","Lang","Lawson","Lee","Levy","Lewis","Livingston","Logan","Long","Lopez","Lowery","Lowry","Lucas","Luna","Malone","Manning","Marsh","Marshall","Martin","Martinez","Mason","May","McBride","McCoy","McDonald","McKinney","Mccarthy","Mcguire","Mckay","Mckenzie","Meadows","Medina","Mendez","Mendoza","Middleton","Miller","Miranda","Mitchell","Moody","Moore","Morales","Moreno","Morgan","Morris","Morse","Murphy","Murray","Myers","Nash","Neal","Nelson","Nguyen","Nichols","Nielsen","Nixon","Norton","Olson","Orr","Ortiz","Owens","Palmer","Parker","Parsons","Patel","Patterson","Payne","Pearce","Pearson","Perez","Perry","Peterson","Phillips","Pickett","Pollard","Porter","Potter","Powell","Pratt","Preston","Price","Ramirez","Ramos","Randall","Ray","Reed","Reyes","Reynolds","Richardson","Riddle","Riley","Rivera","Roach","Robbins","Roberts","Robinson","Rodriguez","Rogers","Romero","Ross","Rowe","Ruiz","Russell","Salinas","Sanchez","Sanders","Santana","Savage","Sawyer","Schmidt","Schultz","Scott","Sellers","Shannon","Sharp","Shaw","Shepherd","Shields","Short","Silva","Simmons","Simpson","Skinner","Sloan","Smith","Snyder","Sparks","Spears","Stanley","Stark","Steele","Stephenson","Stevens","Stewart","Stokes","Sullivan","Sutton","Swanson","Tanner","Tate","Taylor","Thomas","Thompson","Thornton","Torres","Tran","Travis","Tucker","Turner","Tyler","Underwood","Vargas","Vasquez","Vincent","Wagner","Walker","Wallace","Walters","Walton","Ward","Washington","Watkins","Watson","Weaver","Webb","Weeks","Welch","Wells","West","Whitaker","White","Wilcox","Wilkinson","Williams","Willis","Wilson","Winters","Wise","Wolfe","Wood","Woods","Woodward","Wright","Wyatt","Yates","York","Young","Zamora","Zimmerman"],KE=class extends Ss{getFirstNamesMaleJson(){return $D}getFirstNamesFemaleJson(){return ZD}getLastNamesJson(){return eB}},tB=["Daan","Luuk","Sem","Finn","Milan","Levi","Noah","Lucas","Jesse","Thijs","Jayden","Bram","Lars","Ruben","Thomas","Tim","Sam","Liam","Julian","Mees","Ties","Sven","Max","Gijs","David","Stijn","Jasper","Niels","Jens","Timo","Cas","Joep","Roan","Tom","Tygo","Teun","Siem","Mats","Thijmen","Rens","Niek","Tobias","Dex","Hugo","Robin","Nick","Floris","Pepijn","Boaz","Olivier","Luca","Jurre","Jelle","Guus","Koen","Bart","Olaf","Wessel","Daniël","Job","Sander","Tijmen","Kai","Quinten","Owen","Morris","Fedde","Joris","Jesper","Mick","Ryan","Milo","Stan","Benjamin","Melle","Jip","Dylan","Brent","Mick","Dean","Otis","Abel","Luc","Sepp","Vince","Rayan","Noud","Hidde","Fabian","Jort","Damian","Boris","Sil","Moos","Aiden","Sep","Mika","Mijs","Mika","Felix","Merlijn","Alexander","Aron","Arthur","Axel","Bas","Bastiaan","Berend","Björn","Casper","Cees","Chris","Christian","Christiaan","Colin","Cornelis","Dani","Dennis","Dirk","Dominic","Eduard","Eelco","Erik","Erwin","Ezra","Faas","Filip","Florian","Frank","Frederik","Freek","Gerard","Gerrit","Giel","Gijs","Glenn","Govert","Harm","Harold","Hendrik","Henrik","Huub","Ian","Ivo","Jacob","Jake","Jan","Jarno","Jason","Jeffrey","Jeremy","Jim","Jimmy","Johan","Johannes","Jonas","Jonathan","Jos","Joshua","Justin","Kay","Kevin","Kjeld","Klaas","Lennard","Lennart","Leon","Lex","Liam","Loek","Lorenzo","Louis","Lowie","Maarten","Magnus","Maikel","Marc","Marcel","Marco","Martijn","Mathias","Matthijs","Maurits","Menno","Michiel","Nathan","Nico","Oscar","Pascal","Patrick","Paul","Peter","Philip","Pieter","Pim","Quincy","Remco","Rick","Rik","Robert","Rogier","Rowan","Ruud","Simon","Stefan","Steven","Thom","Victor","Vincent","Willem","Wouter","Yannick"],aB=["Emma","Sophie","Julia","Mila","Tess","Sara","Anna","Noor","Lotte","Liv","Eva","Nora","Zoë","Evi","Yara","Saar","Nina","Fenna","Lieke","Fleur","Isa","Roos","Lynn","Sofie","Sarah","Milou","Olivia","Maud","Lisa","Vera","Luna","Lina","Noa","Feline","Loïs","Lena","Floor","Charlotte","Esmee","Julie","Iris","Lara","Amber","Hailey","Mia","Lize","Isabelle","Cato","Fenne","Sanne","Norah","Sophia","Ella","Nova","Elin","Femke","Lizzy","Linde","Lauren","Rosalie","Lana","Emily","Elise","Esmée","Anne","Isabelle","Demi","Hannah","Liva","Suze","Fay","Isabel","Benthe","Evi","Amy","Jasmijn","Niene","Sterre","Fenna","Fiene","Liz","Ise","Mara","Nienke","Indy","Romy","Lola","Puck","Nora","Merel","Bente","Eline","Lily","Leah","Naomi","Mirthe","Valerie","Noor","Liva","Jade","Juul","Lise","Myrthe","Veerle","Aafke","Alicia","Amira","Aniek","Annabel","Annelies","Anouk","Astrid","Babette","Bianca","Britt","Carlijn","Chantal","Claire","Dagmar","Danique","Daphne","Denise","Dominique","Doris","Eefje","Elena","Eline","Elisa","Elisabeth","Ellen","Esther","Eveline","Fabienne","Felice","Fleur","Frederique","Gwen","Hanna","Heleen","Helena","Ilona","Imke","Inge","Irene","Iris","Janna","Janneke","Jasmine","Jennifer","Jessica","Joelle","Judith","Julia","Karin","Karlijn","Kim","Kirsten","Kyra","Laura","Lena","Lianne","Liesbeth","Linda","Lisanne","Lisette","Louise","Maartje","Manon","Margot","Marieke","Marijke","Marlies","Marloes","Marthe","Melissa","Michelle","Nadine","Natalie","Nicole","Nina","Noortje","Paulien","Petra","Rachel","Renee","Robin","Rosa","Roxanne","Sabine","Sandra","Saskia","Silke","Simone","Suzanne","Sylvie","Tamara","Tanja","Tara","Thea","Thirza","Tina","Tineke","Ursula","Victoria","Wendy","Wilma","Xandra","Yasmin","Yvette","Yvonne","Zara"],nB=["de Jong","Jansen","de Vries","van den Berg","van Dijk","Bakker","Janssen","Visser","Smit","Meijer","de Boer","Mulder","de Groot","Bos","Vos","Peters","Hendriks","van Leeuwen","Dekker","Brouwer","de Wit","Dijkstra","Smits","de Graaf","van der Meer","van der Linden","Kok","Jacobs","de Haan","Vermeulen","van den Heuvel","van der Veen","van den Broek","de Bruijn","de Bruin","van der Heijden","Schouten","van Beek","Willems","van Vliet","van de Ven","Hoekstra","Maas","Verhoeven","Koster","van Dam","van der Wal","Prins","Blom","Huisman","Peeters","Kuipers","van Veen","van Dongen","Veenstra","Kramer","van den Bosch","van der Meulen","Mol","Zwart","van der Laan","Martens","van de Pol","Postma","Tromp","Borst","Boon","van Doorn","Jonker","van der Velden","Willemsen","van Wijk","Groen","Gerritsen","Bosch","van Loon","van der Ploeg","de Ruiter","Molenaar","Boer","Klein","de Koning","van de Kamp","van der Horst","Verbeek","Vink","Goossens","Scholten","Hartman","van Dalen","van Elst","Brink","Boekel","van de Berg","Berends","van der Hoek","Kuiper","Kooijman","de Lange","van der Sluis","van Gelder","Martens","van Asselt","Timmermans","van Vliet","van Rijn","van Schaik","Bosman","Wolters","van Hout","Hermans","van Rooij","de Vos","van Donselaar","Evers","van den Brink","Verkerk","Groeneveld","van Duijn","Schuurman","Hoogendoorn","van Zanten","Koopman","Cornelissen","van Driel","Teunissen","Versteeg","van Deursen","Schipper","van Kempen","Bouwman","van der Valk","Nijhuis","van der Werf","van den Akker","Verhoef","Wessels","van der Poel","Driessen","van Oosten","Lambrechts","van der Vlist","Hoogeveen","van Gils","Rietveld","Barendrecht","van der Spek","Stam","van der Linde","Boersma","van Dijk","Schepers","van der Kolk","Roelofs","van der Velden","van den Burg","Westra","van der Steen","Pronk","van der Veer","Rozendaal","van den Bos","Konings","van der Wiel","Noordam","van der Laan","Schut","van der Vlugt","Witteveen","van der Zwan","Boogaard","van der Waal","Stolk","van der Windt","Rutten","van der Zanden","Spaans","van der Zwaan","Roos","van der Zijl","Schoenmaker","van Diepen","Romeijn","van Doesburg","Schippers","van Eck","Rijken","van Egmond","Schrama","van Eijk","Ruijter","van Engelen","Sanders","van Es","Schenk","van Essen","van Gaal","van Geenen","van Gent","van Gestel","van Gool","van Grinsven","van Gurp","van Haaften","van Haren","van Hattem","van Hees"],rB=class extends Ss{getFirstNamesMaleJson(){return tB}getFirstNamesFemaleJson(){return aB}getLastNamesJson(){return nB}},iB=["Müller","Schmidt","Schneider","Fischer","Weber","Meyer","Wagner","Schulz","Becker","Hoffmann","Schäfer","Koch","Richter","Bauer","Klein","Wolf","Schröder","Neumann","Schwarz","Zimmermann","Braun","Hofmann","Krüger","Hartmann","Lange","Schmitt","Werner","Schmitz","Krause","Meier","Lehmann","Schmid","Schulze","Maier","Köhler","Herrmann","Walter","König","Mayer","Huber","Kaiser","Fuchs","Peters","Lang","Scholz","Möller","Weiß","Jung","Hahn","Schubert","Vogel","Friedrich","Günther","Keller","Winkler","Frank","Berger","Roth","Beck","Lorenz","Baumann","Franke","Albrecht","Schuster","Simon","Ludwig","Böhm","Winter","Kraus","Martin","Schumacher","Krämer","Vogt","Otto","Jäger","Stein","Groß","Sommer","Seidel","Heinrich","Haas","Brandt","Schreiber","Graf","Dietrich","Schulte","Kühn","Ziegler","Kuhn","Pohl","Engel","Horn","Bergmann","Voigt","Busch","Thomas","Sauer","Arnold","Pfeiffer","Wolff","Beyer","Seifert","Ernst","Lindner","Hübner","Kramer","Jansen","Franz","Peter","Hansen","Wenzel","Götz","Paul","Riedel","Barth","Kern","Hermann","Nagel","Wilhelm","Ott","Bock","Langer","Grimm","Ritter","Haase","Lenz","Förster","Mohr","Kruse","Schumann","Jahn","Thiel","Kaufmann","Zimmer","Hoppe","Petersen","Fiedler","Berg","Arndt","Marx","Lutz","Fritz","Kraft","Michel","Walther","Böttcher","Schütz","Eckert","Sander","Thiele","Reuter","Reinhardt","Schindler","Ebert","Kunz","Schilling","Schramm","Voß","Nowak","Hein","Hesse","Frey","Rudolph","Fröhlich","Beckmann","Kunze","Herzog","Bayer","Behrens","Stephan","Büttner","Gruber","Adam","Gärtner","Witt","Maurer","Bender","Bachmann","Schultz","Seitz","Geiger","Stahl","Steiner","Scherer","Kirchner","Dietz","Ullrich","Kurz","Breuer","Gerlach","Ulrich","Brinkmann","Fink","Heinz","Löffler","Reichert","Naumann","Böhme","Schröter","Blum","Göbel","Moser","Schlüter","Brunner","Körner","Schenk","Wirth","Wegner","Brand","Wendt","Stark","Schwab","Krebs","Heller","Wolter","Reimann","Rieger","Unger","Binder","Bruns","Döring","Menzel","Buchholz","Ackermann","Rose","Meißner","Janssen","Bartsch","May","Hirsch","Jakob","Schiller","Kopp","John","Hinz","Bach","Pfeifer","Bischoff","Engelhardt","Wilke","Sturm","Hildebrandt","Siebert","Urban","Link","Rohde","Kohl","Linke","Wittmann","Fricke","Köster","Gebhardt","Weiss","Vetter","Freitag","Nickel","Hennig","Rau","Münch","Witte","Noack","Renner","Westphal","Reich","Will","Baier","Kolb","Brückner","Marquardt","Kiefer","Keil","Henning","Heinze","Funk","Lemke","Ahrens","Esser","Pieper","Baum","Conrad","Schlegel","Fuhrmann","Decker","Jacob","Held","Röder","Berndt","Hanke","Kirsch","Neubauer","Hammer","Stoll","Erdmann","Mann","Philipp","Schön","Wiese","Kremer","Bartels","Klose","Mertens","Schreiner","Dittrich","Krieger","Kröger","Krug","Harms","Henke","Großmann","Martens","Heß","Schrader","Strauß","Adler","Herbst","Kühne","Heine","Konrad","Kluge","Henkel","Wiedemann","Albert","Popp","Wimmer","Karl","Wahl","Stadler","Hamann","Kuhlmann","Steffen","Lindemann","Fritsch","Bernhardt","Burkhardt","Preuß","Metzger","Bader","Nolte","Hauser","Blank","Beier","Klaus","Probst","Hess","Zander","Miller","Niemann","Funke","Haupt","Burger","Bode","Holz","Jost","Rauch","Rothe","Herold","Jordan","Anders","Fleischer","Wiegand","Hartung","Janßen","Lohmann","Krauß","Vollmer","Baur","Heinemann","Wild","Brenner","Reichel","Wetzel","Christ","Rausch","Hummel","Reiter","Mayr","Knoll","Kroll","Wegener","Beer","Schade","Neubert","Merz","Schüler","Strobel","Diehl","Behrendt","Glaser","Feldmann","Hagen","Jacobs","Rupp","Geißler","Straub","Hohmann","Römer","Stock","Haag","Meister","Freund","Dörr","Kessler","Betz","Seiler","Altmann","Weise","Metz","Eder","Busse","Mai","Wunderlich","Schütte","Hentschel","Voss","Weis","Heck","Born","Falk","Raab","Lauer","Völker","Bittner","Merkel","Sonntag","Moritz","Ehlers","Bertram","Hartwig","Rapp","Gerber","Zeller","Scharf","Pietsch","Kellner","Bär","Eichhorn","Giese","Wulf","Block","Opitz","Gottschalk","Jürgens","Greiner","Wieland","Benz","Keßler","Steffens","Heil","Seeger","Stumpf","Gross","Bühler","Eberhardt","Hiller","Buck","Weigel","Schweizer","Albers","Heuer","Pape","Hempel","Schott","Schütze","Scheffler","Engelmann","Wiesner","Runge","Geyer","Neuhaus","Forster","Oswald","Radtke","Heim","Geisler","Appel","Weidner","Seidl","Moll","Dorn","Klemm","Barthel","Gabriel","Springer","Timm","Engels","Kretschmer","Reimer","Steinbach","Hensel","Wichmann","Eichler","Hecht","Winkelmann","Heise","Noll","Fleischmann","Neugebauer","Hinrichs","Schaller","Lechner","Brandl","Mack","Gebauer","Siegel","Zahn","Singer","Michels","Schuler","Scholl","Uhlig","Brüggemann","Specht","Bürger","Eggert","Baumgartner","Weller","Schnell","Börner","Brauer","Kohler","Pfaff","Auer","Drescher","Otte","Frenzel","Petzold","Rother","Hagemann","Sattler","Wirtz","Ruf","Schirmer","Sauter","Schürmann","Junker","Walz","Dreyer","Sievers","Haller","Prinz","Stolz","Hausmann","Dick","Lux","Schnabel","Elsner","Kühl","Gerhardt","Klotz","Rabe","Schick","Faber","Riedl","Kranz","Fries","Reichelt","Rösch","Langner","Maaß","Wittig","Geier","Finke","Kasper","Maas","Bremer","Rath","Knapp","Dittmann","Kahl","Volk","Faust","Harder","Biermann","Pütz","Kempf","Mielke","Michaelis","Yilmaz","Abel","Thieme","Schütt","Hauck","Cordes","Eberle","Schaefer","Wehner","Haug","Fritzsche","Kilian","Eggers","Große","Matthes","Reinhold","Paulus","Dürr","Bohn","Thoma","Schober","Koller","Korn","Höhne","Hering","Gerdes","Ullmann","Jensen","Endres","Bernhard","Leonhardt","Eckhardt","Schaaf","Höfer","Junge","Rademacher","Pilz","Hellwig","Knorr","Helbig","Melzer","Lippert","Evers","Bahr","Klinger","Heitmann","Ehrhardt","Heinrichs","Horstmann","Behr","Stöhr","Drews","Rudolf","Sieber","Theis","Groth","Hecker","Weiler","Kemper","Rost","Lück","Claus","Hildebrand","Steinmetz","Götze","Trautmann","Blume","Kurth","Augustin","Nitsche","Janke","Jahnke","Klug","Damm","Heimann","Strauch","Schlosser","Uhl","Böhmer","Ries","Hellmann","Höhn","Hertel","Dreher","Borchert","Huth","Sperling","Just","Stenzel","Kunkel","Lau","Sprenger","Schönfeld","Pohlmann","Heilmann","Wacker","Lehner","Teichmann","Kaminski","Vogl","Gehrke","Hartl","Vogler","Schroeder","Thomsen","Nitschke","Engler","Liedtke","Wille","Starke","Friedrichs","Kirchhoff","Schwarze","Balzer","Reinhard","Heinen","Lotz","Küster","Kretzschmar","Schöne","Clemens","Hornung","Ulbrich","Renz","Hofer","Ruppert","Lohse","Schuh","Amann","Westermann","Stiller","Burmeister","Alt","Hampel","Brockmann","Wessel","Späth","Hoyer","Mader","Bartel","Rößler","Krieg","Grote","Schwarzer","Schweitzer","Scheer","Bosch","Zink","Roos","Wagener","Oppermann","Henze","Lehnert","Seemann","Trapp","Reiß","David","Pfeffer","Grau","Horst","Diekmann","Korte","Rehm","Wilde","Schleicher","Lampe","Grundmann","Veit","Daniel","Eisele","Hafner","Steinert","Sachs","Pfister","Kühnel","Schüller","Klatt","Bischof","Wendel","Tietz","Frick","Buschmann","Steinke","Menke","Baumeister","Kirschner","Loos","Ebner","Kastner","Wolters","Orth","Stange","Becher","Helm","Knobloch","Wörner","Heyer","Nguyen","Baumgärtner","Grund","Brüning","Ostermann","Cremer","Schauer","Jacobi","Ewald","Fürst","Widmann","Otten","Büchner","Petri","Fritsche","Kock","Ehlert","Kleine","Eckstein","Hacker","Brandes","Buchner","Hagedorn","Keck","Häusler","Muth","Apel","Heuser","Bastian","Kersten","Stamm","Niemeyer","Berthold","Gehrmann","Weinert","Schatz","Hager","Volkmann","Michael","Wieczorek","Wilms","Burghardt","Schultze","Merten","Schwartz","Kling","Rode","Neu","Mende","Thies","Böttger","Schell","Spindler","Pabst","Grün","Weiland","Mühlbauer","Hanisch","Doll","Janzen","Adams","Hermes","Haack","Cramer","Spies","Stern","Kugler","Budde","Jakobs","Scheller","Rösler","Reiser","Jonas","Herr","Ebeling","Wulff","Pauli","Löhr","Lukas","Rahn","Sachse","Köhn","Backhaus","Mahler","Hille","Kowalski","Heidrich","Brück","Gottwald","Heidenreich","Baumgarten","Hamm","Körber","Kübler","Frisch","Hardt","Enders","Bräuer","Seidler","Küpper","Lauterbach","Zeidler","Eckardt","Kreuzer","Schiffer","Schaper","Gehring","Hannemann","Ortmann","Petry","Thiemann","Tiedemann","Grünewald","Johannsen","Scheel","Volz","Kunert","Dieckmann","Bormann","Obermeier","Knauer","Schaub","Eilers","Berner","Pahl","Reinecke","Herz","Henn","Brehm","Hoff","Resch","Ochs","Krohn","Lerch","Raabe","Ehrlich","Hack","Friedl","Reis","Rogge","Meurer","Thelen","Drechsler","Hölscher","Morgenstern","Sommerfeld","Ebel","Kellermann","Rupprecht","Post","Hillebrand","Hill","Paulsen","Grabowski","Bolz","Lorenzen","Welsch","Seibel","Kleinert","Schröer","Jaeger","Wächter","Boldt","Palm","Kratz","Reimers","Pusch","Exner","Dietze","Wüst","Andres","Heide","Kaya","Reichardt","Kummer","Metzner","Grube","Ewert","Grunwald","Habermann","Zorn","Fichtner","Emmerich","Mangold","Reif","Ahlers","Kästner","Küppers","Petermann","Stratmann","Sailer","Schuhmacher","Hoch","Struck","Buchmann","Rauscher","Lüdtke","Wendler","Dreier","Zöller","Bucher","Siegert","Finger","Hopf","Rieck","Friese","Hopp","Sahin","Henrich","Spengler"],sB=["Michael","Peter","Hans","Klaus","Wolfgang","Thomas","Jürgen","Andreas","Bernd","Manfred","Rainer","Uwe","Dieter","Joachim","Karl","Holger","Werner","Ralf","Frank","Norbert","Ulrich","Rolf","Jörg","Gerhard","Günther","Helmut","Harald","Jens","Horst","Heinz","Reinhardt","Martin","Detlef","Stefan","Matthias","Volker","Christian","Gerd","Rüdiger","Alexander","Bernhard","Hartmut","Walter","Herbert","Georg","Ronald","Axel","Roland","Dirk","Josef","Lothar","Wilfried","Jan","Karsten","Udo","Ingo","Hermann","Kurt","Olaf","Franz","Siegfried","Dietmar","Mohammed","Heinrich","Alfred","Christoph","Viktor","Lutz","Johannes","Torsten","Kai","Rudolf","Richard","Waldemar","Robert","Jörn","Johann","Ernst","Reinhold","Eckhard","Friedrich","Burghard","Wilhelm","Heiko","Jochen","Harry","Hubert","Paul","Erich","Fred","Achim","Ali","Wolf","Erwin","Mario","Andre","Eberhard","Winfried","Heino","Sven","Willi","Ulf","Bodo","Henry","Vladimir","Dietrich","John","Armin","Edgar","Friedhelm","Gunnar","Arno","Fritz","Gerald","Henning","Abdul","Karlheinz","Andrzej","Markus","Otto","Roman","Knut","Wolfram","Nobert","Gunther","Konrad","Heiner","Mehmet","Nils","Bruno"],oB=["Thomas","Michael","Andreas","Stefan","Frank","Torsten","Peter","Jörg","Ralf","Matthias","Christian","Dirk","Jens","Martin","Klaus","Jürgen","Karsten","Uwe","Bernd","Markus","Oliver","Sven","Wolfgang","Holger","Olaf","Hans","Rainer","Kai","Jan","Volker","Joachim","Christoph","Alexander","Axel","Heiko","Norbert","Manfred","Andre","Dieter","Robert","Ulrich","Detlef","Harald","Ingo","Marc","Roland","Lars","Rolf","Marco","Jochen","Guido","Mike","Jörn","Georg","Gerhard","Rüdiger","Mario","Lutz","Bernhard","Nils","Udo","Dietmar","Gerd","Karl","Horst","Günther","Steffen","Johannes","Werner","Ronald","Arne","Daniel","Helmut","Achim","Mohammed","René","Ulf","Hartmut","Björn","Erik","Heinz","Patrick","Viktor","Walter","Ali","Gerald","Reinhardt","Henning","Tobias","Mehmet","Armin","Sebastian","Helge","Gunnar","Richard","Waldemar","Josef","Knut","Boris","Hermann","Paul","Burghard","Florian","Lothar","Sönke","Tim","Philipp","Franz","Clemens","Wilfried","Siegfried","Johann","Ahmet","Eckhard","Fred","Heinrich","Roman","John","Arno","Mustafa","Hasan","Gregor","Alfred","Arnd","Rudolf","Sergej","David","Manuel","Marcel","Friedrich","José","Marek","Mirko","Sascha","Thilo","Bodo","Darius","Hendrik","Herbert","Nikolai","Wolf","Nikola","Roger","Edgar","Ernst","Henry","Wolfram","Christopher","Vladimir","Gunther","Hüseyin","Harry","Hauke","Wilhelm","Arthur","Winfried","Henrik","Antonio","Felix","Anton","Bruno","Igor","Götz","Tom","Heino","Abdul","Miroslaw","Sören","Bert","Elmar","Hubert","Kurt","Ole","Tillmann","Ahmad","Andrej","Dennis","Adam","Ibrahim","Malte","Raphael","Reinhold","Eduard","Erwin","Marius","Nikolaus","Carlos","Ismail","Nico","Gernot","Jacek","Nicolas","Peer","Albert","Heiner","Timo","Andrzej","Jean","Berthold","Hanno"],lB=["Christian","Michael","Stefan","Andreas","Markus","Thomas","Matthias","Sven","Jan","Alexander","Oliver","Martin","Torsten","Frank","Marco","Marc","Jens","Daniel","Karsten","Andre","Sebastian","Lars","Dirk","Tobias","Jörg","Sascha","Kai","Florian","Christoph","Björn","Peter","Dennis","Mike","Ralf","Patrick","Robert","Holger","René","Nils","Heiko","Mario","Philipp","Olaf","Steffen","Tim","Timo","Ingo","Jürgen","Volker","Marcel","Benjamin","Bernd","Axel","Arne","Klaus","David","Jörn","Felix","Boris","Henning","Wolfgang","Uwe","Mirko","Torben","Johannes","Nico","Manuel","Jochen","Hans","Ali","Joachim","Malte","Mohammed","Roland","Simon","Rainer","Fabian","Gunnar","Ulrich","Ronny","Mehmet","Erik","Guido","Sergej","Hendrik","Viktor","Dominik","Roman","Georg","Bastian","Murat","Helge","Sören","Christopher","Karl","Andrej","Mustafa","Ulf","Lutz","Ole","Ahmet","Moritz","Enrico","Nicolas","Sönke","Paul","Harald","Norbert","Henrik","Raphael","Nikolai","Tom","Danny","Gerrit","Hasan","Gregor","Arthur","Bernhard","Marius","Konstantin","Achim","Norman","John","Thilo","Waldemar","Julian","Clemens","Hakan","Till","Ronald","Eduard","Erkan","Hauke","Manfred","Rüdiger","Adam","Ahmad","Klaas","Ibrahim","Vladimir","Adrian","Eugen","Falk","Maximilian","Richard","Andy","Frederik","Marek","Tino","Kevin","Knut","Pascal","Arnd","Detlef","Gerald","Max","Darius","Heinrich","Hüseyin","Igor","Alexej","Dieter","Eike","Tomasz","Wilhelm","Dietmar","Franz","Gerhard","Johann","Antonio","José","Rolf","Abdul","Peer","Ismail","Nikola","Bülent","Gerd","Jakob","Lukas","Niklas","Robin","Gordon","Friedrich","Jonas","Leif","Michel","Hermann","Oleg","Sandro","Tillmann","Burghard","Henry","Jean","Steven","Benedikt","Nikolaus","Ricardo","Roberto","Vitali","Amir","Günther","Helmut","Ivan","Rico","Falko","Jacek","Kim","Krzysztof","Piotr","Said","Silvio","Udo","Vitalij","Werner","Armin","Ayhan","Bodo","Carlos","Cengiz","Josef","Pierre","Ömer","Arno","Atilla","Birger","Dimitri","Georgios","Götz","Hagen","Hannes","Hartmut","Juan","Kolja","Marcin","Toni","Louis","Metin","Paulo","Pawel","Yusuf","Albert","Alex","Chris","Gunther","Lasse","Orhan","Ramazan","Rudolf","Walter"],cB=["Christian","Sebastian","Jan","Daniel","Stefan","Alexander","Michael","Dennis","Martin","Florian","Tobias","Matthias","Philipp","Patrick","Thomas","Benjamin","Andreas","Markus","Christoph","Marcel","Sven","Sascha","Tim","David","Felix","Johannes","Robert","Marco","Andre","Marc","Oliver","Christopher","Nils","Fabian","Simon","Björn","Timo","René","Dominik","Julian","Jens","Lars","Peter","Steffen","Manuel","Lukas","Moritz","Maximilian","Jonas","Mike","Kai","Frank","Paul","Kevin","Torben","Nico","Karsten","Torsten","Mario","Malte","Bastian","Hendrik","Max","Dirk","Pascal","Erik","Sören","Arne","Jakob","Nicolas","Konstantin","Niklas","Marius","Frederik","Roman","Henning","Jörg","Mirko","Mohammed","Viktor","Ali","Ralf","Raphael","Adrian","Danny","Steven","Ole","Hannes","Lennard","Benedikt","Georg","Marvin","Eugen","Robin","Jochen","Tom","Arthur","Heiko","Nikolai","Jannik","Till","Hans","Richard","Henrik","Pierre","Ronny","Sergej","Holger","Jannis","John","Boris","Jörn","Michel","Johann","Gregor","Klaus","Norman","Clemens","Hauke","Jonathan","Vincent","Enrico","Kim","Axel","Andrej","Toni","Karl","Waldemar","Bernd","Mehmet","Anton","Wolfgang","Ahmad","Mustafa","Andy","Ahmet","Lasse","Tino","Eike","Gerrit","Konrad","Joachim","Steve","Julius","Eduard","Murat","Dimitri","Friedrich","Gunnar","Jürgen","Adam","Ibrahim","Maurice","Klaas","Sönke","Bernhard","Igor","Tillmann","Alexej","Chris","Vladimir","Serkan","Thilo","Helge","Olaf","Roland","Gabriel","Nick","Falk","Nikola","Rico","Kolja","Leif","Pawel","Amir","Ingo","Jascha","Alex","Fatih","Gökhan","Hakan","Hasan","Kamil","Lutz","Marcin","Uwe","Achim","Finn","Samuel","Valentin","Vitali","Damian","Dustin","Franz","Leon","Darius","Erkan","Henry","Maxim","Peer"],uB=["Jan","Lukas","Philipp","Tim","Alexander","Daniel","Tobias","Dennis","Marcel","Felix","Kevin","Florian","Maximilian","Niklas","Jonas","Sebastian","Patrick","Fabian","Christian","Jannik","Julian","David","Marvin","Timo","Marc","Nico","Simon","Finn","Dominik","Nils","Leon","Pascal","Lennard","Max","Tom","Christopher","Benjamin","Moritz","Paul","Lars","Marco","Sven","Christoph","Robin","Johannes","Malte","Michael","Torben","Jakob","Matthias","Martin","Stefan","Mike","Andre","Jannis","Hendrik","Luca","Björn","Nicolas","Markus","René","Vincent","Jonathan","Steven","Frederik","Sascha","Thomas","Erik","Robert","Oliver","Andreas","Nick","Marius","Kai","Ole","Manuel","Joshua","Justin","Steffen","Adrian","Konstantin","Benedikt","Lasse","Louis","Maurice","Julius","Mirko","Anton","Till","John","Henrik","Henry","Bastian","Sören","Leonard","Raphael","Johann","Arne","Hannes","Michel","Karl","Mario","Ben","Mohammed","Viktor","Linus","Nikolai","Dustin","Aaron","Valentin","Peter","Toni","Henning","Marlon","Clemens","Danny","Justus","Jasper","Julien","Chris","Jens","Joel","Hauke","Kim","Richard","Gerrit","Cedric","Pierre","Karsten","Thore","Vivian","Mats","Ricardo","Arthur","Bennet","Fabio","Jannek","Kilian","Leo","Melvin","Noah","Samuel","Timon","Eike","Ali","Leif","Peer","Jean","Hans","Jeremy","Merlin","Jannes","Calvin","Jona","Elias","Lorenz","Marten","Can","Dario","Georg","Ahmet","Enrico","Oskar","Tristan","Jascha","Roman","Colin","Gabriel","Jason","Klaas","Morten","Nikola","Phil","Sönke","Alex","Cem","Konrad","Mattis","Rico","Armin","Brian","Frank","Gregor","Ralf","Thies","Norman","Ruben","Ahmad","Emre","Levin","Mehmet","Torge","Torsten","Bjarne","Kornelius","Steve","Jerome","Marek","Sandro","Thilo","Franz","Kenneth","Axel","Burak","Jörn","Kjell","Milan","Tjark","Kolja","Miguel","Tillmann","Emil","Friedrich","Lion","Rasmus","Tino","Caspar","Mert","Amir","Ibrahim","Joe","Leonhard","Mustafa","Onur","Ferdinand","Joscha","Laurenz","Maxim","Sam","Yasin","Antonio","Jeffrey","Jendrik","Nikolaus","Philippe","Sinan","Damian","Dirk","Fritz","Helge","Juri","Leander","Matti","Michele","Nino","Rouven","Said","Tarek","Theo","Timothy"],dB=["Leon","Lukas","Luca","Jonas","Tim","Finn","Paul","Felix","Maximilian","Louis","Niklas","Max","Ben","Julian","Jan","Philipp","Elias","Moritz","Noah","Jannik","Jannis","Tom","Nico","Simon","David","Alexander","Fabian","Erik","Jakob","Florian","Nils","Justin","Lennard","Nick","Linus","Daniel","Tobias","Jason","Dominik","Colin","Marvin","Mika","Sebastian","Kevin","Johannes","Julius","Robin","Jonathan","Henry","Hannes","Anton","Vincent","Benjamin","Marlon","Timo","Lenny","Adrian","Marc","Joel","Raphael","Dennis","Till","Joshua","Aaron","Emil","Pascal","Ole","Leonard","Leo","Lasse","Marcel","Samuel","Konstantin","Karl","Oskar","Lars","Lennox","Mattis","Jona","Kilian","Christian","Maurice","Justus","Jamie","Oliver","Malte","Silas","Michael","Mohammed","Jeremy","John","Phil","Bastian","Maxim","Johann","Liam","Nicolas","Mike","Levin","Benedikt","Marco","Noel","Luke","Bennet","Cedric","Gabriel","Theo","Matteo","Tyler","Valentin","Fabio","Marius","Jayden","Toni","Richard","Mats","Hendrik","Jannes","Henrik","Julien","Manuel","Arthur","Patrick","Matthias","Frederik","Connor","Tristan","Torben","Markus","Kai","Martin","Arda","Andreas","Damian","Timon","Franz","Michel","Levi","Finley","Robert","Thomas","Ian","Arne","Dustin","Christopher","Christoph","Bruno","Diego","Matti","Clemens","Leander","Magnus","Milan","Danny","Laurin","Lorenz","Laurenz","Sven","Ali","Leandro","Steven","Chris","Dean","Lenn","Pepe","Jasper","Konrad","Devin","Can","Domenik","Friedrich","Sean","Kian","Sam","Kjell","Ryan","Andre","Bjarne","Ruben","Stefan","Nikita","René","Peter","Hugo","Melvin","Jean","Leopold","Malik","Willi","Fritz","Leonardo","Quentin","Ahmet","Enrico","Emilio","Brian","Ferdinand","Antonio","Marten","Nevio","Thore","Joris","Leonhard","Roman","Anthony","Viktor","Henning","Sascha","Alex","Adam","Elia","Josef","Theodor","Jaron","Leif","Georg","Piet","Alessandro","Kaan","Lion","Miguel","Alessio","Carlos","Luan","Ilyas","Ricardo","Yusuf","Jannek","Mert","Peer","Yasin","Enes","Marek","Nino","Arian","Carlo","Janne","Gustav","Hasan","Mattes","Mustafa","William","Jerome","Milo","Dario","Mehmet","Hans","Thilo","Neo","Sören","Mirko","Sandro","Tamino","Emilian","Björn","Korbinian","Pierre","Emanuel","Bela","Benno","Merlin","Tino","Keno","Ludwig","Emre","Jordan","Kerem","Gianluca","Ibrahim","Jesse","Mario","Tjark","Eddy","Lian","Fiete","Etienne","Klaas","Marian","Efe","Jack","Calvin","Semih","Rico","Mick","Darian","Joost","Tommy","Angelo","Romeo","Keanu","Kurt","Raik","Tammo","Dylan","Nikolai","Thies","Armin","Darius","Maddox","Rasmus"],mB=["Ben","Leon","Paul","Jonas","Finn","Lukas","Louis","Luca","Noah","Elias","Felix","Maximilian","Max","Henry","Julian","Moritz","Tim","Emil","Jakob","Philipp","Niklas","Oskar","David","Anton","Alexander","Liam","Matteo","Theo","Tom","Jan"],gB=["Noah","Matteo","Leon","Elias","Finn","Paul","Luca","Emil","Louis","Theo","Henry","Felix","Ben","Liam","Leo","Lukas","Jonas","Jakob","Anton","Oskar","Maximilian","Mohammed","Levi","Milan","Jona","David","Karl","Jannis","Lio","Moritz","Adam","Max","Samuel","Mats","Alexander","Jonathan","Raphael","Aaron","Linus","Julian","Milo","Theodor","Carlo","Philipp","Valentin","Leonard","Erik","Mika","Johann","Niklas"],fB=["Angelika","Monika","Sabine","Karin","Petra","Gabriele","Birgit","Brigitte","Renate","Susanne","Barbara","Ursula","Ute","Marion","Jutta","Ingrid","Cornelia","Heike","Maria","Regina","Elke","Silvia","Andrea","Ulrike","Gisela","Angela","Bärbel","Christine","Martina","Christiane","Doris","Helga","Dagmar","Sigrid","Christa","Gudrun","Beate","Rita","Hannelore","Marlies","Eva","Claudia","Anke","Marianne","Annette","Elisabeth","Astrid","Erika","Heidi","Christel","Rosemarie","Anna","Bettina","Gabriela","Roswita","Ilona","Annegret","Evelyn","Sonja","Inge","Christina","Carmen","Irene","Kirsten","Lydia","Silke","Marina","Margret","Marita","Ruth","Maren","Sibylle","Waltraud","Ingeborg","Katharina","Vera","Heidemarie","Kerstin","Heidrun","Margrit","Carola","Iris","Antje","Katrin","Margit","Manuela","Veronika","Olga","Anne","Dorothea","Hildegard","Irmgard","Edith","Uta","Regine","Margarete","Anita","Frauke","Karen","Valentina","Anja","Tatjana","Ellen","Edeltraud","Verena","Dörte","Ilse","Gerda","Ines","Britta","Corinna","Elvira","Michaela","Annemarie","Anneliese","Gertrud","Gitta","Marie","Susann","Maike","Stefanie","Danuta","Gunda","Margot","Johanna","Irina","Ina","Theresa","Nina","Wiebke"],hB=["Sabine","Susanne","Petra","Andrea","Claudia","Birgit","Martina","Anja","Heike","Kerstin","Bettina","Gabriele","Katrin","Silke","Ute","Christine","Stefanie","Monika","Britta","Ulrike","Barbara","Kirsten","Silvia","Karin","Annette","Christiane","Beate","Manuela","Angela","Anke","Nicole","Marion","Cornelia","Christina","Angelika","Astrid","Elke","Michaela","Regina","Dagmar","Katja","Brigitte","Maria","Iris","Jutta","Antje","Tanja","Doris","Maike","Simone","Maren","Corinna","Sonja","Daniela","Carola","Alexandra","Eva","Ursula","Carmen","Sandra","Karen","Ines","Marina","Katharina","Elisabeth","Bärbel","Renate","Gaby","Anne","Anna","Gabriela","Sibylle","Heidi","Uta","Ina","Sigrid","Frauke","Ilona","Ingrid","Gudrun","Wiebke","Tatjana","Yvonne","Carolin","Patricia","Dörte","Susann","Birte","Rita","Julia","Irina","Bianca","Nikola","Ilka","Olga","Jeanette","Marlies","Helga","Melanie","Verena","Vera","Regine","Kirstin","Evelyn","Irene","Lydia","Christa","Annett","Marianne","Dorothea","Annegret","Elena","Gisela","Imke","Isabell","Heidrun","Viola","Diana","Esther","Susan","Inga","Judith","Ruth","Cordula","Jacqueline","Kai","Veronika","Carina","Roswita","Constanze","Marita","Natalie","Ramona","Ellen","Erika","Fatma","Nina","Svetlana","Dorothee","Inge","Nadja","Jasmin","Anita","Franziska","Friederike","Marie","Svenja","Jessica","Natascha","Rosemarie","Valentina","Ayse","Linda","Beatrix","Johanna","Ariane","Gesa","Larissa","Malgorzata","Miriam","Gunda","Margarete","Natalia","Almut","Ewa","Gitta","Jolanta","Babette","Beatrice","Christel","Christin","Sabrina","Dorit","Jana","Juliane","Hilke","Margret","Beata","Galina","Liane","Danuta","Elvira","Ingeborg","Rosa","Emine","Grit","Hannah","Sabina","Agnes","Edith","Gundula","Inken","Maja","Margit","Bozena","Helena","Theresa","Elzbieta","Hannelore","Tina"],AB=["Nicole","Stefanie","Sandra","Katrin","Claudia","Tanja","Anja","Melanie","Andrea","Daniela","Julia","Susanne","Katja","Christina","Kerstin","Silke","Sabine","Alexandra","Yvonne","Sonja","Nadine","Nina","Simone","Maike","Petra","Christine","Britta","Martina","Anna","Michaela","Manuela","Bianca","Katharina","Silvia","Bettina","Heike","Ulrike","Birgit","Anke","Christiane","Jessica","Monika","Maren","Eva","Anne","Antje","Diana","Jana","Cornelia","Wiebke","Kirsten","Miriam","Tina","Carolin","Astrid","Annette","Maria","Annika","Jennifer","Tatjana","Angela","Corinna","Barbara","Verena","Elena","Jasmin","Birte","Inga","Olga","Natalie","Ines","Iris","Ina","Marion","Beate","Irina","Svenja","Judith","Carina","Sarah","Patricia","Karin","Carmen","Franziska","Janine","Juliane","Saskia","Carola","Doreen","Frauke","Marina","Ute","Isabell","Annett","Christin","Karen","Mandy","Nadja","Svetlana","Natalia","Gabriele","Sabrina","Elke","Ramona","Natascha","Friederike","Ilka","Vanessa","Dagmar","Imke","Jeanette","Dörte","Angelika","Nikola","Rebecca","Regina","Janina","Kirstin","Johanna","Jutta","Elisabeth","Anita","Mareike","Sibylle","Maja","Esther","Vera","Agnieszka","Jenny","Peggy","Ariane","Hannah","Steffi","Joana","Victoria","Magdalena","Fatma","Lena","Sina","Doris","Uta","Larissa","Marie","Evelyn","Ann","Constanze","Jacqueline","Kati","Lydia","Agnes","Dana","Dorothea","Ilona","Kim","Ayse","Gaby","Katarzyna","Mirja","Pamela","Heidi","Helena","Viola","Isabella","Susann","Cindy","Cordula","Emine","Kathleen","Nancy","Beata","Denise","Susan","Ursula","Veronika","Brigitte","Gesa","Martha","Mirjam","Beatrice","Hatice","Dorothee","Linda","Malgorzata","Pia","Grit","Irene","Filiz","Yasemin","Berit","Ellen","Janet","Laura","Lisa","Renate","Ruth","Ewa","Gabriela","Ingrid","Liane","Mariam","Monique","Tamara","Antonia","Svantje","Alice","Margarete","Nele","Manja","Nora","Oksana","Özlem","Nadia","Ricarda","Bärbel","Carolina","Hülya","Inken","Rita","Sophie","Valentina","Violetta","Vivien","Britt","Inna","Leyla","Arzu","Kai","Natalja","Sandy","Silvana","Sophia","Beatrix","Ludmilla","Romy","Selma","Elvira","Helene","Henrike","Oxana","Rabea","Sabina","Wenke","Annegret","Aylin","Charlotte","Dorit","Emma","Jeannine","Marianne","Mona"],pB=["Julia","Stefanie","Anna","Katharina","Katrin","Sarah","Sandra","Nadine","Melanie","Christina","Jennifer","Nicole","Sabrina","Jessica","Annika","Claudia","Nina","Anne","Daniela","Franziska","Anja","Carolin","Jasmin","Christin","Katja","Janina","Jana","Janine","Yvonne","Alexandra","Svenja","Maike","Lena","Laura","Maria","Tanja","Susanne","Lisa","Andrea","Christine","Miriam","Sonja","Johanna","Ann","Sabine","Vanessa","Kerstin","Natalie","Bianca","Eva","Mareike","Marie","Verena","Jacqueline","Isabell","Hannah","Saskia","Simone","Tina","Juliane","Maren","Elena","Rebecca","Martina","Christiane","Carina","Mandy","Olga","Denise","Wiebke","Diana","Marina","Tatjana","Jenny","Manuela","Linda","Michaela","Nadja","Inga","Antje","Corinna","Patricia","Silvia","Ulrike","Kim","Judith","Ines","Monika","Birte","Ina","Victoria","Elisabeth","Theresa","Sina","Irina","Sophie","Silke","Friederike","Britta","Nora","Lea","Nele","Natascha","Bettina","Doreen","Barbara","Angela","Ramona","Cornelia","Anke","Natalia","Magdalena","Nancy","Annette","Astrid","Aylin","Susann","Kathleen","Alina","Lydia","Joana","Kirsten","Jeanette","Martha","Heike","Mona","Anita","Dana","Veronika","Yasemin","Sophia","Carolina","Svetlana","Esther","Charlotte","Antonia","Constanze","Vivien","Luisa","Svantje","Helena","Petra","Steffi","Pia","Susan","Monique","Lina","Mariam","Vera","Merle","Angelika","Karin","Maja","Frauke","Agnes","Isabella","Josephine","Frederike","Michelle","Carmen","Carola","Cindy","Madeleine","Janna","Larissa","Gina","Marlene","Anastasia","Elisa","Regina","Viola","Özlem","Alice","Evelyn","Marleen","Dominique","Lara","Karen","Nikola","Marion","Annabell","Annett","Dorothea","Iris","Henrike","Kira","Mirja","Camilla","Ronja","Valentina","Alena","Ariane","Dorothee","Fatma","Gesa","Agnieszka","Birgit","Ricarda","Sandy","Beate"],yB=["Julia","Anna","Sarah","Lisa","Laura","Katharina","Lena","Vanessa","Annika","Jennifer","Jana","Lea","Marie","Jasmin","Franziska","Hannah","Jessica","Michelle","Nina","Alina","Johanna","Carolin","Christina","Kim","Nadine","Jacqueline","Ann","Luisa","Sophie","Lara","Natalie","Svenja","Sabrina","Isabell","Sandra","Janina","Melanie","Leonie","Antonia","Saskia","Stefanie","Aylin","Denise","Nele","Pia","Alexandra","Katrin","Sophia","Sina","Melina","Janine","Vivien","Rebecca","Anne","Miriam","Victoria","Nicole","Mareike","Lina","Josephine","Merle","Clara","Maria","Maike","Charlotte","Celina","Paula","Carina","Larissa","Christin","Linda","Mandy","Theresa","Kimberly","Elena","Melissa","Jule","Celine","Daniela","Jenny","Kira","Patricia","Ronja","Bianca","Eva","Sonja","Joana","Gina","Tanja","Nora","Yvonne","Pauline","Emily","Natascha","Anja","Marina","Friederike","Angelina","Nadja","Paulina","Lynn","Alicia","Svea","Amelie","Katja","Juliane","Lilly","Marlene","Verena","Chantal","Milena","Maja","Chiara","Selina","Alena","Carlotta","Mona","Annabell","Carla","Claudia","Tatjana","Maren","Elisabeth","Emma","Helena","Inga","Luise","Tamara","Christine","Fiona","Judith","Frederike","Finja","Jill","Fenja","Tina","Cindy","Ina","Janne","Marleen","Mia","Samantha","Annalena","Janika","Henrike","Wiebke","Elisa","Esther","Ricarda","Janna","Stella","Carolina","Dana","Helen","Madeleine","Mara","Simone","Corinna","Diana","Fabienne","Monique","Samira","Sandy","Tabea","Valerie","Malin","Andrea","Birte","Swantje","Veronika","Kerstin","Magdalena","Ramona","Susanne","Greta","Juli","Kaja","Lucy","Zoe","Angelique","Jasmina","Tessa","Lydia","Sabine","Dominique","Malina","Michaela","Charline","Monika","Karen","Mira","Yasemin","Alica","Alice","Alisa","Angelika","Emilia","Henriette","Marieke","Vera","Anneke","Felicia","Giulia","Liza","Maxi","Viola","Annkatrin","Lotta","Olivia","Anastasia","Dilara","Felicitas","Mariam","Marisa","Rieke","Rosa","Beatrice","Constanze","Dorothea","Isabella","Juliana","Katerina","Martina","Merve","Philine","Valentina","Justine","Melisa","Michele","Mika","Nancy","Selin","Alissa","Angela","Cara","Charleen","Deborah","Ellen","Imke","Irina","Jeanette","Leona","Lorena","Manuela","Martha","Silvia","Viviane","Aline","Desiree","Xenia"],EB=["Hannah","Leonie","Anna","Lea","Lena","Mia","Emily","Laura","Lara","Sarah","Emma","Lilly","Marie","Sophie","Nele","Johanna","Lina","Julia","Maja","Sophia","Lisa","Amelie","Alina","Luisa","Leni","Clara","Jana","Charlotte","Paula","Emilia","Jasmin","Zoe","Annika","Katharina","Chiara","Pia","Finja","Josephine","Angelina","Jule","Lucy","Melina","Antonia","Vanessa","Emely","Victoria","Celina","Michelle","Nina","Isabell","Franziska","Fiona","Amy","Celine","Maria","Pauline","Stella","Carolin","Lia","Marlene","Melissa","Ida","Greta","Selina","Helena","Aylin","Merle","Ronja","Sina","Vivien","Mara","Eva","Kim","Elisa","Theresa","Jolina","Mathilda","Jette","Lotta","Luise","Elena","Carla","Jessica","Larissa","Luna","Nelly","Alicia","Lana","Linda","Milena","Miriam","Samira","Frieda","Magdalena","Carlotta","Alexandra","Fabienne","Kira","Helene","Nora","Elisabeth","Natalie","Tabea","Romy","Anne","Paulina","Juli","Christina","Annalena","Kimberly","Samantha","Annabell","Ella","Lynn","Mira","Letizia","Jennifer","Carina","Aaliyah","Rebecca","Anastasia","Dana","Isabella","Diana","Olivia","Lenja","Mariella","Mila","Lucia","Martha","Leyla","Joana","Elina","Carolina","Xenia","Gina","Nicole","Janina","Saskia","Evelyn","Anni","Marleen","Melanie","Svenja","Svea","Chantal","Tessa","Maike","Fenja","Leona","Josie","Joline","Cheyenne","Lorena","Noemi","Helen","Ann","Alissa","Malin","Lilian","Lotte","Mina","Felicitas","Liv","Jenny","Jill","Valentina","Veronika","Alexa","Kaja","Rieke","Yara","Dilara","Tuana","Laila","Tamara","Alisa","Ela","Marina","Alessia","Luana","Patricia","Lene","Jacqueline","Janne","Henriette","Ashley","Franka","Milla","Florentine","Selin","Selma","Giulia","Mona","Lisann","Aleyna","Rosalie","Sonja","Elif","Thea","Maren","Enya","Nadine","Alisha","Freya","Jamie","Denise","Aurelia","Ina","Christin","Judith","Lilith","Alena","Felicia","Juliana","Sandra","Zoey","Linnea","Soraya","Nisa","Stefanie","Juliane","Daria","Jasmina","Josefin","Friederike","Marla","Rosa","Cara","Nika","Naomi","Vivian","Amina","Elli","Cora","Luca","Madita","Mailin","Marieke","Tara","Amira","Liana","Lydia","Joy","Madlen","Nike","Hailey","Madeleine","Mareike","Aimee","Cassandra","Heidi","Joyce","Alea","Janine","Jonna","Sydney","Alia","Ilayda","Livia","Maira","Leana","Valerie","Thalia","Ellen","Emmi","Melisa","Inga","Julina","Smilla","Katja","Melinda","Valeria","Anouk","Liliana","Sabrina","Wiebke","Joleen","Leandra","Zeynep","Katrin","Tamina","Jenna","Levke","Salome","Annelie","Cecilia","Annemarie","Jona","Mary","Mirja","Collien","Alice","Azra","Ceylin","Lavinia","Maxi","Anja","Henrike","Mariam"],bB=["Mia","Emma","Hannah","Sophia","Emilia","Anna","Lea","Lina","Marie","Lena","Leonie","Emily","Amelie","Luisa","Johanna","Clara","Sophie","Lilly","Mila","Leni","Laura","Lara","Nele","Maja","Charlotte","Sarah","Ella","Ida","Mathilda","Frieda"],IB=["Emilia","Sophia","Emma","Hannah","Mia","Lina","Mila","Ella","Clara","Lea","Marie","Leni","Lia","Mathilda","Ida","Anna","Frieda","Leonie","Emily","Maja","Lilly","Luisa","Charlotte","Amelie","Sophie","Lena","Johanna","Lara","Mira","Nora","Nele","Sarah","Malia","Lotta","Juna","Paula","Luna","Elisa","Maria","Romy","Laura","Helena","Thea","Mara","Victoria","Antonia","Elena","Tilda","Carla","Eva"],vB=class extends Ss{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return iB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:sB},{startYear:1960,endYear:1969,names:oB},{startYear:1970,endYear:1979,names:lB},{startYear:1980,endYear:1989,names:cB},{startYear:1990,endYear:1999,names:uB},{startYear:2e3,endYear:2009,names:dB},{startYear:2010,endYear:2019,names:mB},{startYear:2020,endYear:2029,names:gB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:fB},{startYear:1960,endYear:1969,names:hB},{startYear:1970,endYear:1979,names:AB},{startYear:1980,endYear:1989,names:pB},{startYear:1990,endYear:1999,names:yB},{startYear:2e3,endYear:2009,names:EB},{startYear:2010,endYear:2019,names:bB},{startYear:2020,endYear:2029,names:IB}]}},CB=["Rossi","Russo","Ferrari","Esposito","Bianchi","Romano","Colombo","Ricci","Marino","Greco","Bruno","Gallo","Conti","De Luca","Mancini","Costa","Giordano","Rizzo","Lombardi","Moretti","Barbieri","Fontana","Santoro","Mariani","Rinaldi","Caruso","Ferrara","Galli","Martini","Leone","Longo","Gentile","Martinelli","Vitale","Serra","Coppola","De Santis","D'Angelo","Marchetti","Parisi","Villa","Conte","Ferraro","Ferri","Fabbri","Bianco","Marini","Grasso","Valentini","Messina"],NB=["Giuseppe","Giovanni","Antonio","Mario","Luigi","Francesco","Angelo","Vincenzo","Pietro","Salvatore","Carlo","Franco","Pasquale","Domenico","Raffaele","Carmelo","Paolo","Sergio","Bruno","Luciano","Giorgio","Aldo","Renato","Piero","Guido","Nicola","Rosario","Vittorio","Michele","Umberto","Romano","Gino","Silvano","Renzo","Attilio","Augusto","Benito","Biagio","Cesare","Corrado","Dino","Egidio","Elio","Enzo","Ettore","Fausto","Felice","Ferdinando","Ferruccio","Gaetano","Gastone","Gennaro","Gerardo","Germano","Italo","Lino","Marino","Nello","Nino","Orazio","Orlando","Osvaldo","Ottavio","Primo","Remo","Rinaldo","Rocco","Ruggero","Severino","Silvio","Ugo","Valerio","Vasco","Walter","Agostino","Alfredo","Armando","Arturo","Claudio","Enrico","Giancarlo","Gianfranco","Alberto","Marcello","Roberto","Stefano","Mauro","Fabio","Maurizio","Massimo","Alessandro","Lorenzo","Andrea","Marco","Giuliano","Adriano","Gianni","Sandro","Leone"],wB=["Roberto","Stefano","Paolo","Marco","Luca","Alessandro","Massimo","Mauro","Fabrizio","Maurizio","Gianluca","Claudio","Giorgio","Piero","Gianfranco","Gianni","Valter","Ivan","Danilo","Moreno","Loris","Sandro","Dario","Nicola","Enrico","Alberto","Fabio","Giuseppe","Antonio","Giovanni","Francesco","Andrea","Michele","Daniele","Emanuele","Vittorio","Silvano","Romano","Giuliano","Tiziano","Massimiliano","Antonello","Arrigo","Aurelio","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Diego","Dino","Donatello","Duccio","Edmondo","Egidio","Elio","Enea","Ercole","Ermanno","Eros","Ezio","Fausto","Ferdinando","Fiorello","Flavio","Floriano","Folco","Franco","Fulvio","Gabriele","Gaetano","Gastone","Giacomo","Gianbattista","Giancarlo","Gianmaria","Gianpaolo","Gianpiero","Gilberto","Gino","Giordano","Gualtiero","Guido","Gustavo","Iacopo","Igor","Ilario","Italo","Ivano","Jacopo","Lamberto","Lando","Lanfranco","Lazzaro","Leo","Leonardo","Leone"],xB=["Alessandro","Andrea","Marco","Luca","Stefano","Davide","Gianluca","Fabio","Francesco","Massimo","Roberto","Simone","Daniele","Emanuele","Christian","Riccardo","Federico","Matteo","Gabriele","Michele","Lorenzo","Alessio","Nicola","Alberto","Fabrizio","Massimiliano","Giorgio","Enrico","Claudio","Paolo","Ivan","Mirko","Manuel","Denis","Igor","Omar","Cristian","Yuri","Alex","Samuel","Mattia","Pietro","Vincenzo","Angelo","Salvatore","Luigi","Domenico","Raffaele","Rosario","Carmelo","Pasquale","Diego","Dario","Giulio","Valerio","Maurizio","Gianni","Sandro","Loris","Moreno","Danilo","Tiziano","Antonello","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Demetrio","Dino","Edoardo","Elia","Emilio","Enzo","Ermanno","Eros","Eugenio","Fausto","Flavio","Fulvio","Gaetano","Gerardo","Gianbattista","Gianmaria","Gianpaolo","Gilberto","Giuliano","Iacopo","Leonardo","Marcello","Martino","Niccolò","Piero","Rinaldo","Ruggero","Samuele","Saverio","Sebastiano","Tommaso"],TB=["Marco","Andrea","Luca","Alessandro","Stefano","Daniele","Simone","Davide","Matteo","Francesco","Lorenzo","Federico","Gianluca","Fabio","Massimo","Emanuele","Riccardo","Nicola","Christian","Roberto","Michele","Giuseppe","Antonio","Giovanni","Paolo","Alberto","Filippo","Giorgio","Enrico","Tommaso","Giacomo","Mattia","Gabriele","Samuele","Pietro","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Alessio","Cristian","Manuel","Mirko","Ivan","Omar","Denis","Igor","Yuri","Alex","Samuel","Jacopo","Nicolò","Edoardo","Leonardo","Diego","Dario","Giulio","Valerio","Claudio","Mauro","Fabrizio","Maurizio","Gianni","Piero","Sandro","Loris","Moreno","Danilo","Valter","Silvano","Romano","Giuliano","Tiziano","Massimiliano","Antonello","Arrigo","Aurelio","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Demetrio","Dino","Elia","Emilio","Enzo","Ermanno","Eros","Eugenio","Fausto"],SB=["Matteo","Andrea","Luca","Alessandro","Davide","Lorenzo","Francesco","Simone","Marco","Mattia","Federico","Riccardo","Gabriele","Stefano","Daniele","Nicola","Christian","Giacomo","Filippo","Tommaso","Emanuele","Michele","Giuseppe","Antonio","Giovanni","Alberto","Giorgio","Enrico","Pietro","Samuele","Alessio","Edoardo","Leonardo","Diego","Nicolò","Manuel","Mirko","Ivan","Jacopo","Giulio","Valerio","Claudio","Paolo","Roberto","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Massimo","Fabio","Gianluca","Maurizio","Fabrizio","Mauro","Gianni","Piero","Sandro","Loris","Moreno","Danilo","Valter","Silvano","Romano","Giuliano","Tiziano","Massimiliano","Antonello","Arrigo","Aurelio","Bernardo","Carlo","Cesare","Corrado","Costantino","Damiano","Dino","Elia","Emilio","Enea","Ettore","Eugenio","Flavio","Gaetano","Gerardo","Gianmaria","Gianpaolo","Gilberto","Gualtiero","Guido","Gustavo","Iacopo","Igor"],kB=["Francesco","Alessandro","Andrea","Matteo","Lorenzo","Mattia","Davide","Simone","Luca","Gabriele","Riccardo","Federico","Marco","Tommaso","Leonardo","Giuseppe","Antonio","Giovanni","Filippo","Giacomo","Christian","Edoardo","Samuele","Alessio","Michele","Daniele","Stefano","Nicola","Pietro","Giorgio","Enrico","Emanuele","Alberto","Diego","Nicolò","Manuel","Jacopo","Giulio","Valerio","Paolo","Roberto","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Kevin","Thomas","Nicholas","Samuel","Gabriel","Daniel","David","Jonathan","Michael","Patrick","Simon","Steven","William","Anthony","Christopher","George","Harry","Jack","James","Joseph","Joshua","Matthew","Oliver","Oscar","Richard","Robert","Ryan","Elia","Gioele","Enea","Liam","Noah","Ethan","Bryan","Nathan","Aron","Zeno","Leone","Brando","Tancredi","Manfredi","Dante","Lapo","Romeo","Ettore","Achille","Michelangelo","Orlando"],LB=["Francesco","Alessandro","Leonardo","Lorenzo","Mattia","Andrea","Gabriele","Matteo","Riccardo","Tommaso","Edoardo","Giuseppe","Antonio","Davide","Federico","Diego","Giovanni","Marco","Nicolò","Samuele","Michele","Pietro","Luca","Simone","Filippo","Giacomo","Christian","Alessio","Emanuele","Daniele","Stefano","Nicola","Giorgio","Enrico","Alberto","Manuel","Jacopo","Giulio","Valerio","Paolo","Roberto","Vincenzo","Angelo","Raffaele","Domenico","Rosario","Salvatore","Luigi","Mario","Carmelo","Pasquale","Nathan","Liam","Noah","Ethan","Mason","Logan","Lucas","Oliver","Elijah","Aiden","James","Benjamin","William","Alexander","Michael","Daniel","Henry","Jackson","Sebastian","Jack","Samuel","David","Joseph","Carter","Owen","Wyatt","John","Matthew","Luke","Julian","Gioele","Elia","Enea","Leone","Brando","Tancredi","Manfredi","Dante","Lapo","Romeo","Ettore","Achille","Michelangelo","Orlando","Cesare","Vittorio","Augusto","Sebastiano","Damiano","Gregorio","Ludovico","Martino","Niccolò","Rocco","Santo","Saverio","Tiziano","Valentino","Vasco","Zaccaria"],RB=["Maria","Anna","Rosa","Giuseppina","Angela","Giovanna","Teresa","Lucia","Carmela","Caterina","Francesca","Antonietta","Carla","Rita","Paola","Luisa","Fernanda","Franca","Gabriella","Giuliana","Lina","Mirella","Bruna","Adriana","Silvana","Marisa","Iolanda","Ines","Ida","Ester","Elvira","Elsa","Elena","Edda","Dina","Delia","Clara","Bice","Bianca","Assunta","Antonia","Annunziata","Amelia","Amalia","Agata","Ada","Adele","Adelina","Albina","Alda","Alma","Anita","Armida","Aurelia","Aurora","Beatrice","Celeste","Cesira","Clelia","Clotilde","Concetta","Costanza","Daria","Deanna","Dolores","Domenica","Dora","Edvige","Elda","Eleonora","Elisabetta","Emma","Enrica","Ersilia","Eugenia","Evelina","Fabiola","Fiammetta","Filomena","Flora","Floriana","Fulvia","Gemma","Gilda","Gina","Gioia","Grazia","Graziella","Immacolata","Irene","Irma","Isa","Jolanda","Laura","Lidia"],DB=["Roberta","Patrizia","Cinzia","Daniela","Lorella","Nadia","Monica","Susanna","Tiziana","Donatella","Simonetta","Antonella","Sabrina","Loredana","Marina","Barbara","Paola","Laura","Cristina","Rossella","Simona","Stefania","Manuela","Sonia","Sandra","Loretta","Orietta","Gigliola","Fiorella","Gabriella","Raffaella","Isabella","Marta","Elisabetta","Claudia","Alessandra","Federica","Michela","Serena","Valeria","Cecilia","Letizia","Luciana","Mara","Marcella","Margherita","Mariella","Marilena","Marisa","Milena","Mirella","Natalia","Nicoletta","Norma","Novella","Olga","Ombretta","Oriana","Ornella","Ottavia","Pamela","Piera","Priscilla","Rachele","Rebecca","Regina","Renata","Rita","Romina","Rosalina","Rosanna","Rosetta","Rosina","Santina","Savina","Silvia","Sofia","Speranza","Tina","Vanda","Vanna","Velia","Vera","Vilma","Vincenza","Violante","Virginia","Vittoria","Viviana","Wanda","Zita"],BB=["Barbara","Katia","Debora","Erika","Pamela","Samantha","Moira","Natascia","Tamara","Tatiana","Jessica","Valentina","Ilaria","Serena","Chiara","Silvia","Elena","Elisa","Francesca","Alessia","Federica","Giorgia","Martina","Giulia","Sara","Alice","Veronica","Eleonora","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Marinella","Silvana","Patrizia","Luisa","Monica","Manuela","Michela","Simona","Stefania","Claudia","Valeria","Roberta","Laura","Cristina","Daniela","Paola","Alessandra","Cecilia","Letizia","Marta","Elisabetta","Raffaella","Gabriella","Cinzia","Nadia","Donatella","Lorella","Susanna","Simonetta","Marina","Rossella","Sandra","Loretta","Orietta","Fiorella","Isabella","Gigliola","Margherita","Agnese"],UB=["Valentina","Francesca","Alessandra","Chiara","Silvia","Elena","Laura","Cristina","Roberta","Sara","Giulia","Martina","Alice","Ilaria","Serena","Federica","Michela","Simona","Manuela","Monica","Daniela","Paola","Barbara","Stefania","Claudia","Valeria","Eleonora","Veronica","Elisa","Giorgia","Alessia","Noemi","Giada","Aurora","Sofia","Ludovica","Ginevra","Beatrice","Matilde","Vittoria","Emma","Nicole","Gaia","Camilla","Bianca","Arianna","Melissa","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Marinella","Silvana","Patrizia","Luisa","Katia","Debora","Erika","Pamela","Samantha","Moira","Natascia","Tamara","Tatiana","Jessica","Greta","Rachele","Rebecca","Angelica","Benedetta","Costanza","Diletta","Lucrezia","Marta","Miriam","Asia","Desiree","Sharon","Denise","Chanel"],MB=["Giulia","Chiara","Martina","Sara","Francesca","Alessia","Silvia","Valentina","Alice","Federica","Giorgia","Elena","Laura","Elisa","Ilaria","Eleonora","Serena","Roberta","Cristina","Veronica","Simona","Michela","Manuela","Monica","Daniela","Paola","Barbara","Stefania","Claudia","Valeria","Noemi","Giada","Aurora","Sofia","Ludovica","Ginevra","Beatrice","Matilde","Vittoria","Emma","Nicole","Gaia","Camilla","Bianca","Arianna","Melissa","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Anna","Maria","Greta","Rachele","Rebecca","Angelica","Benedetta","Costanza","Diletta","Lucrezia","Marta","Miriam","Asia","Desiree","Sharon","Denise","Chanel","Emily","Jennifer","Jasmine","Luna","Maya","Mia","Michelle","Siria","Sole","Stella","Viola","Virginia","Zoe","Adele","Agata"],_B=["Giulia","Sofia","Martina","Sara","Chiara","Aurora","Alice","Alessia","Francesca","Giorgia","Ginevra","Ludovica","Greta","Gaia","Emma","Beatrice","Matilde","Vittoria","Noemi","Giada","Elena","Elisa","Anna","Maria","Nicole","Valentina","Federica","Silvia","Laura","Ilaria","Eleonora","Serena","Roberta","Cristina","Veronica","Simona","Michela","Manuela","Monica","Daniela","Paola","Barbara","Stefania","Claudia","Valeria","Arianna","Melissa","Vanessa","Sabrina","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Rachele","Rebecca","Angelica","Benedetta","Costanza","Diletta","Lucrezia","Marta","Miriam","Asia","Desiree","Sharon","Denise","Chanel","Emily","Jennifer","Jasmine","Luna","Maya","Mia","Michelle","Siria","Sole","Stella","Viola","Virginia","Zoe","Adele","Agata","Ambra","Cecilia"],FB=["Sofia","Aurora","Giulia","Ginevra","Alice","Giorgia","Emma","Greta","Martina","Beatrice","Matilde","Ludovica","Vittoria","Nicole","Chiara","Anna","Sara","Bianca","Gaia","Noemi","Francesca","Alessia","Elena","Elisa","Maria","Adele","Viola","Mia","Ambra","Cecilia","Margherita","Linda","Eleonora","Elisabetta","Valeria","Veronica","Vanessa","Sabrina","Pamela","Debora","Nadia","Sonia","Tiziana","Loredana","Antonella","Annamaria","Mariangela","Rosaria","Concetta","Assunta","Domenica","Vincenza","Filomena","Maddalena","Teresa","Lucia","Carmela","Caterina","Antonietta","Carla","Rita","Franca","Marinella","Silvana","Patrizia","Luisa","Ilaria","Monica","Manuela","Michela","Simona","Barbara","Agnese","Anita","Isabel","Chloe","Emily","Luna","Sole","Stella","Azzurra","Gioia","Diletta","Benedetta","Costanza","Angelica","Lucrezia","Marta","Miriam","Rachele","Rebecca","Serena","Zoe","Agata","Cloe","Dafne","Diana","Eva","Flora","Frida","Glenda","Irene","Iris"],OB=class extends Ss{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return CB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:NB},{startYear:1960,endYear:1969,names:wB},{startYear:1970,endYear:1979,names:xB},{startYear:1980,endYear:1989,names:TB},{startYear:1990,endYear:1999,names:SB},{startYear:2e3,endYear:2009,names:kB},{startYear:2010,endYear:2019,names:LB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:RB},{startYear:1960,endYear:1969,names:DB},{startYear:1970,endYear:1979,names:BB},{startYear:1980,endYear:1989,names:UB},{startYear:1990,endYear:1999,names:MB},{startYear:2e3,endYear:2009,names:_B},{startYear:2010,endYear:2019,names:FB}]}},jB=["Mateo","Leo","Lucas","Hugo","Martín","Enzo","Thiago","Óliver","Manuel","Luca","Daniel","Liam","Mario","Gabriel","Adrián","Alejandro","Dylan","Noah","Pablo","Álvaro","David","Gael","Gonzalo","Rafael","Julen","Miguel","Aarón","Bruno","Marc","Marco","Eric","Izan","Juan","Antonio","Darío","Santiago","Iván","Teo","Alex","Andrés","Jaime","Javier","Leonardo","Marcos","Mathias","Adonay","Kai","Nathan","Pau","Aimar","Biel","Carlos","Dakar","Diego","Fabio","Leandro","Nico","Nil","Rodrigo","Sergio","Aleix","Dante","Derek","Eithan","Ian","Iker","Lorenzo","Pol","Rubén","Samuel","Ángel","Ares","Axel","Haitam","Ismael","José María","Kylian","Luis","Maximiliano","Pedro","Telmo","Unai","Abel","Adam","Aitor","Arnau","Asier","Ignacio","Isaac","Jesús","Joel","Jon","Nael","Raúl","Romeo","Saúl","Yeray","Adria","Alan","Alonso"],PB=["Sofía","Emma","Alma","Lucía","Olivia","Vega","Mía","Valeria","Julia","Lola","Martina","Noa","Alana","Triana","Adhara","Carla","Laia","Carmen","Gala","Paula","Adriane","Daniela","Lía","Alba","Candela","Isabella","Lara","Vera","Aitana","María","Cloe","Luna","Nora","Sara","Victoria","Zoe","Alejandra","Camila","Alicia","Manuela","Mar","Valentina","Ángela","Aina","Amara","Ana","Aria","Bianca","Claudia","Elena","Macarena","Maya","Abril","Blanca","Carolina","Catalina","Gabriela","Violeta","Amaia","Aurora","Cataleya","Gema","Inés","Irati","Jade","Julieta","Ainara","Alaia","Arlet","Atenea","Clara","Marta","Ona","Rocío","Sabela","Amelia","Antonella","Cristina","Elsa","Eva","Georgina","Haizea","India","Iris","Jana","Leyre","Marina","Naia","Sienna","Sol","Zaira","Africa","Alessia","Arabia","Aroa","Diana","Eira","Encarna","Gaia","Gianna"],HB=["García","Rodríguez","González","Fernández","López","Martínez","Sánchez","Pérez","Gómez","Martín","Jimenez","Hernández","Ruiz","Díaz","Moreno","Muñoz","Álvarez","Romero","Gutiérrez","Alonso","Navarro","Torres","Domínguez","Ramos","Vázquez","Ramírez","Gil","Serrano","Morales","Molina","Blanco","Suárez","Castro","Ortega","Delgado","Ortiz","Marin","Rubio","Nuñez","Medina","Sanz","Castillo","Iglesias","Cortés","Garrido","Santos","Guerrero","Lozano","Cano","Cruz","Méndez","Flores","Prieto","Herrera","Peña","León","Márquez","Cabrera","Gallego","Calvo","Vidal","Campos","Reyes","Vega","Fuentes","Carrasco","Diez","Aguilar","Caballero","Nieto","Santana","Vargas","Pascual","Giménez","Herrero","Hidalgo","Montero","Lorenzo","Santiago","Benitez","Duran","Ibáñez","Arias","Mora","Ferrer","Carmona","Vicente","Rojas","Soto","Crespo","Roman","Pastor","Velasco","Parra","Sáez","Moya","Bravo","Rivera","Gallardo","Soler"],zB=class extends Ss{getFirstNamesMaleJson(){return jB}getFirstNamesFemaleJson(){return PB}getLastNamesJson(){return HB}},QB=["Ababei","Apostol","Ardelean","Avram","Baciu","Badea","Balan","Barbu","Bejan","Bicu","Blaga","Boboc","Bogdan","Boroș","Botezatu","Bradea","Bratu","Bucur","Burlacu","Butnaru","Călin","Căpățână","Caragea","Cazan","Ceaușu","Cercel","Cernat","Chiriac","Chirila","Chiriță","Chis","Ciobanu","Ciocan","Ciorbea","Cojocaru","Coman","Constantin","Constantinescu","Cornea","Cosma","Costache","Costin","Cozma","Crăciun","Crețu","Crisan","Cristea","Croitoru","Cuza","Danciu","Danila","Dascălu","David","Diaconescu","Diaconu","Dima","Dincă","Dinu","Dobre","Dobrescu","Dogaru","Drăgan","Drăghici","Drăghicescu","Dumitrascu","Dumitrescu","Dumitru","Duta","Enache","Ene","Farcas","Filimon","Filip","Florea","Florescu","Frățilă","Gabor","Gavrila","Georgescu","Gheorghe","Gheorghita","Gheorghiu","Gherman","Ghiță","Giurgiu","Gliga","Goga","Goran","Grigoras","Grigore","Grigorescu","Grosu","Groza","Hanganu","Hodor","Hossu","Iacob","Iancu","Ieremia","Ilie","Iliuta","Ion","Ionescu","Ioniță","Iordache","Iordănescu","Iorgu","Iosif","Iovu","Irimia","Isac","Istrate","Ivan","Ivascu","Jianu","Lazar","Luca","Luchian","Lungu","Lupu","Macovei","Maftei","Man","Manea","Manole","Manolache","Manolea","Marcu","Marian","Marin","Marinescu","Marta","Matei","Mateescu","Mărgărit","Micu","Mihai","Mihăilescu","Miloș","Mirea","Mirică","Miron","Moise","Moldovan","Moldoveanu","Morar","Moraru","Muntean","Munteanu","Mureșan","Mușat","Năstase","Neacșu","Neagoe","Neagu","Neamțu","Necula","Nedelcu","Negrea","Negrescu","Negru","Nica","Nichita","Nicolae","Nicolescu","Nistor","Niță","Olaru","Oltean","Olteanu","Oprea","Oproiu","Pârvu","Pascu","Pătrașcu","Păun","Pavel","Petre","Petrescu","Pîrvu","Pop","Popa","Popescu","Popovici","Preda","Puiu","Radu","Radulescu","Roman","Roșca","Roșu","Rus","Rusu","Sandu","Sârbu","Sava","Savu","Simion","Simionescu","Socol","Solomon","Spânu","Stan","Stanciu","Stancu","Stănescu","Ștefan","Ștefănescu","Stoian","Stoica","Stroe","Suciu","Tănase","Tătaru","Teodorescu","Ticu","Toma","Tomescu","Trandafir","Trifan","Tudor","Tudoran","Tudose","Ungureanu","Ursu","Vaduva","Varga","Vasile","Vasilescu","Vasiliu","Vatamanu","Vâlcu","Vintilă","Vișan","Vlad","Voicu","Voinea","Zaharia","Zamfir"],VB=["Ion","Gheorghe","Vasile","Constantin","Nicolae","Dumitru","Petre","Ioan","Alexandru","Ștefan","Grigore","Marin","Victor","Cornel","Traian","Ilie","Mircea","Radu","Tudor","Pavel","Costică","Viorel","Aurel","Valeriu","Emil","Andrei","Mihai","Iuliu","Stan","Anghel","Zaharia","Zamfir","Haralambie","Iordache","Savu","Panait","Spiridon","Chiriac","Avram","Axente"],GB=["Mihai","Alexandru","Ion","Ioan","Gheorghe","Vasile","Viorel","Mircea","Ionel","Dan","Valeriu","Emil","Marian","Aurel","Doru","Virgil","Florin","Adrian","Petrică","Nicolae","Ștefan","Constantin","Dumitru","Gelu","Stelian","Silviu","Cezar","Ovidiu","Liviu","Valentin","Romeo","Lucian","Nelu","Gicu","Relu","Tiberiu","Eugen","Corneliu","Dorel","Tănase"],KB=["Cristian","Marius","Gabriel","Daniel","Sorin","Claudiu","Ciprian","Laurențiu","Bogdan","Cosmin","Răzvan","Cătălin","George","Alin","Robert","Leonard","Nicușor","Costel","Paul","Remus","Sergiu","Mugurel","Călin","Horia","Codrin","Septimiu","Sever","Silvestru","Teofil","Valer","Benone","Mihai","Alexandru","Ion","Ioan","Adrian","Florin","Silviu","Ovidiu","Liviu"],qB=["Ionuț","Andrei","Alexandru","Bogdan","Răzvan","Adrian","Cătălin","George","Robert","Cristian","Mihai","Gabriel","Paul","Ion","Ioan","Ștefan","Daniel","Marius","Florin","Cosmin","Claudiu","Ciprian","Alin","Silviu","Vlad","Valentin","Iulian","Marian","Lucian","Doru","Horațiu","Gruia","Glad","Decebal","Dacian","Arcadie","Aristide","Apolodor","Cazimir","Filaret"],WB=["Alexandru","Andrei","Vlad","Robert","Ștefan","Ionuț","Cristian","Mihai","Gabriel","Bogdan","Adrian","Cătălin","Darius","Sebastian","Raul","Denis","Cosmin","George","Alin","Marian","Valentin","Emanuel","Rareș","David","Octavian","Mădălin","Răzvan","Eduard","Ion","Ioan","Basarab","Sabin","Marcel","Narcis","Codruț","Bujor","Camil","Cantemir","Carol","Lorin"],YB=["David","Matei","Luca","Andrei","Alexandru","Ștefan","Darius","Rareș","Eduard","Gabriel","Mario","Nicolas","Iustin","Tudor","Cristian","Ion","Ioan","Teodor","Filip","Ianis","Antonio","Denis","Sebastian","Raul","Victor","Ionuț","Robert","Vlad","Yannis","Mihai","Patrick","Albert","Eric","Vladimir","Iancu","Dominic","Matias","Casian","Damian","Ayan"],JB=["Andrei","David","Matei","Alexandru","Ștefan","Tudor","Filip","Luca","Nicolas","Patrick","Ianis","Albert","Eric","Vladimir","Iancu","Ion","Ioan","Dominic","Matias","Casian","Cezar","Damian","Ayan","Marc","Tomas","Lucas","Victor","Sebastian","Edward","Aris","Mateo","Rian","Beniamin","Clement","Achim","Adam","Adelin","Angel","Anton","Antoniu"],XB=["Maria","Elena","Ana","Floarea","Georgeta","Elisabeta","Marioara","Rodica","Silvia","Constanța","Victoria","Ecaterina","Ileana","Stana","Aurica","Sanda","Viorica","Stela","Anica","Paraschiva","Gherghina","Ioana","Anca","Livia","Lucia","Catrina","Eugenia","Verona","Smaranda","Mioara","Domnica","Olga","Parasca","Profira","Safta","Solomia","Zenovia","Aglaia","Catinca","Chira"],$B=["Maria","Elena","Ana","Mihaela","Doina","Mariana","Angela","Gabriela","Daniela","Viorica","Adriana","Steliana","Eugenia","Lucia","Paula","Carmen","Veronica","Tatiana","Luminița","Camelia","Liliana","Cornelia","Felicia","Simona","Mirela","Geta","Lidia","Adina","Violeta","Otilia","Valeria","Sidonia","Marilena","Julieta","Hortensia","Grațiela","Despina","Cezara","Brândușa","Sonia"],ZB=["Maria","Elena","Ana","Monica","Alina","Claudia","Nicoleta","Florentina","Cristina","Ramona","Loredana","Corina","Dana","Oana","Roxana","Alis","Magdalena","Raluca","Delia","Manuela","Ionela","Geanina","Iuliana","Andreea","Valentina","Ruxandra","Lavinia","Denisa","Crina","Codruța","Cosmina","Letiția","Minerva","Medeea","Mirabela","Mihaela","Gabriela","Daniela","Simona","Camelia"],eU=["Maria","Elena","Ana","Andreea","Alexandra","Diana","Roxana","Oana","Adina","Bianca","Raluca","Irina","Mădălina","Denisa","Georgiana","Ioana","Ana-Maria","Laura","Cosmina","Simona","Alina","Cristina","Nicoleta","Mihaela","Ramona","Loredana","Mirela","Daniela","Camelia","Florentina","Sabina","Narcisa","Iulia","Catrinel","Daciana","Steluța","Nora","Malvina","Rada","Zoița"],tU=["Maria","Elena","Ana","Alexandra","Denisa","Bianca","Larisa","Sabrina","Rebeca","Roberta","Beatrice","Patricia","Lorena","Mihaela","Gabriela","Paula","Diana","Laura","Iulia","Mădălina","Georgiana","Andra","Roxana","Oana","Raluca","Corina","Alina","Camelia","Cristina","Nicoleta","Ștefania","Karina","Marta","Ofelia","Melania","Isabela","Riana","Dora","Iasmine","Andrada"],aU=["Maria","Elena","Ana","Ioana","Andra","Daria","Teodora","Alessia","Sara","Maya","Antonia","Eva","Miruna","Erika","Iulia","Alexandra","Andreea","Denisa","Bianca","Deea","Amalia","Carina","Sonia","Catinca","Ilinca","Rebeca","Roberta","Ariana","Medeea","Sofia","Noemi","Aida","Nectaria","Ilona","Agata","Amora","Xenia","Malina","Zenaida","Adora"],nU=["Maria","Elena","Ana","Sofia","Anastasia","Eva","Natalia","Emma","Antonia","Ingrid","Raisa","Anais","Ilinca","Medeea","Teodora","Carla","Amalia","Ines","Irina","Ania","Petra","Cezara","Gloria","Iris","Ema","Clara","Zoe","Adeline","Evelina","Damaris","Arina","Mina","Evelin","Luna","Kira","Tessa","Sia","Ina","Thea","Lia","Sora","Roza","Vanda","Mona","Eliza","Hrisanti","Casiana"],rU=class extends Ss{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return QB}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:VB},{startYear:1960,endYear:1969,names:GB},{startYear:1970,endYear:1979,names:KB},{startYear:1980,endYear:1989,names:qB},{startYear:1990,endYear:1999,names:WB},{startYear:2e3,endYear:2009,names:YB},{startYear:2010,endYear:2019,names:JB}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:XB},{startYear:1960,endYear:1969,names:$B},{startYear:1970,endYear:1979,names:ZB},{startYear:1980,endYear:1989,names:eU},{startYear:1990,endYear:1999,names:tU},{startYear:2e3,endYear:2009,names:aU},{startYear:2010,endYear:2019,names:nU}]}},iU=["Abbas","Abbasali","Abbasreza","Abdolrahman","Abdolreza","Ahmad","Ali","Aliakbar","Alihossein","Alireza","Aliyar","Amin","Amir","Amirreza","Anoushirvan","Arad","Arash","Arashmehr","Ardeshir","Arian","Arman","Armin","Arvand","Arvin","Arya","Aryan","Ashkan","Attar","Avan","Babak","Bahador","Bahman","Bahram","Barad","Behnam","Behzad","Bijan","Darian","Davood","Dena","Ebrahim","Ehsan","Ehsanali","Ehsanollah","Elyas","Esmaeil","Esmat","Ezatollah","Faramarz","Farbod","Farhad","Fariborz","Farrokh","Farzad","Farzin","Fazel","Fereydoun","Gholamreza","Habib","Hadi","Hafez","Hamid","Hassan","Hooman","Hormoz","Hossein","Hosseinreza","Ilia","Iman","Jamshid","Javad","Kambiz","Kamran","Kamyar","Karim","Kaveh","Kazem","Keyghobad","Keyhan","Keyvan","Khashayar","Khosrow","Kia","Kian","Kiyan","Kourosh","Latif","Mahan","Mahmoud","Majid","Manouchehr","Masih","Masoud","Matin","Mehdi","Mehrab","Mehrdad","Mehrshad","Mehrshid","Mehrzad","Milad","Mohammad","Mohammadali","Mohammadreza","Mohsen","Morteza","Mostafa","Nader","Naser","Navab","Navid","Nikan","Nima","Nosrat","Nouri","Omran","Parham","Parviz","Payam","Peyman","Pouya","Pouyan","Qasem","Radin","Rahim","Ramin","Rasoul","Rayan","Reza","Rezaali","Roham","Rohollah","Rostam","Rumi","Saadi","Sadegh","Saeed","Sahand","Sahra","Saleh","Samad","Saman","Samyar","Sattar","Seyed","Shahab","Shahin","Shahram","Shahryar","Shahzad","Shaparak","Shapour","Shayan","Shayanmehr","Shervin","Siavash","Siawash","Sina","Sohrab","Soroush","Taghi","Taha","Vahid","Yaghoub","Yahya","Yasin","Yavar","Yazdan","Younes","Yousef"],sU=["Afsaneh","Afsoon","Afsoun","Afsun","Amineh","Anahita","Arezoo","Arezou","Arezu","Asal","Ashraf","Atefeh","Atousa","Ava","Azadeh","Azar","Azra","Bahar","Baran","Behnaz","Behnoosh","Behnoush","Dana","Darya","Delara","Delshad","Donya","Elaheh","Elham","Esmat","Fahimeh","Farah","Fariba","Farideh","Farnaz","Farzaneh","Fatemeh","Fereshteh","Firoozeh","Firouzeh","Firuzeh","Forough","Ghoncheh","Gohar","Gol","Golbahar","Golnar","Golnaz","Golshah","Golshan","Golzar","Hajar","Hamide","Hamideh","Hanieh","Hayat","Hedieh","Helia","Hoda","Homa","Jahanara","Jaleh","Jamileh","Katayoun","Katayun","Khadijeh","Khorshid","Kimia","Ladan","Laleh","Leila","Leili","Leyla","Leyli","Mahboubeh","Mahin","Mahine","Mahnaz","Mahsa","Mahtab","Mahvash","Maliheh","Manijeh","Mansoureh","Marjan","Maryam","Marzieh","Masoomeh","Masoumeh","Mehr","Mehri","Mehrnaz","Mina","Minoo","Minu","Mitra","Mojdeh","Mojgan","Morvarid","Mozhdeh","Mozhgan","Naheed","Nahid","Najmeh","Narges","Nasrin","Nastaran","Nazanin","Nazli","Neda","Negar","Negin","Nika","Niloofar","Niloufar","Niousha","Niusha","Nooshin","Nousha","Noushin","Paniz","Pantea","Parastoo","Parastu","Pari","Parisa","Parvaneh","Parvin","Pegah","Pouran","Raheleh","Rana","Razieh","Reyhaneh","Robab","Robabeh","Roghayeh","Roshan","Roshanak","Roshanara","Roya","Saba","Sadaf","Safa","Sahar","Sakineh","Samaneh","Samira","Sanaz","Sara","Sedigheh","Sepideh","Setare","Setareh","Shabnam","Shadi","Shahla","Shahnaz","Shahrazad","Shahrbanoo","Shahrzad","Shams","Shereen","Shideh","Shireen","Shirin","Shiva","Shohre","Shohreh","Shokoufeh","Shokufeh","Shukria","Sima","Simin","Soheila","Solmaz","Somayeh","Soodeh","Soraya","Soudeh","Sudabeh","Tahereh","Tahmineh","Taraneh","Tayebeh","Vida","Yalda","Yasaman","Yasamin","Zahra","Zeinab","Zeynab","Zhaleh","Ziba","Zinat","Zohreh"],oU=["Abbasi","Abedi","Abhari","Abtahi","Abadi","Abdollahi","Abedzadeh","Adibi","Afkari","Afsari","Afshar","Ahadi","Ahmadi","Ahmadpour","Ajami","Akbari","Akbarian","Akhavan","Akhtar","Alaei","Alamouti","Alavi","Alinejad","Alizadeh","Almasi","Amini","Aminzadeh","Amiri","Amouzgar","Ansari","Anvari","Arabi","Araki","Arbab","Ardalan","Aref","Armand","Arshi","Asadi","Asgari","Asghari","Asgharzadeh","Ashna","Ashrafi","Ashtari","Askari","Asl","Aslani","Attar","Azad","Azadi","Azar","Azari","Azimi","Azizi","Azmoudeh","Babaei","Badr","Badri","Bagheri","Bagherian","Bahar","Bahmani","Bahrami","Bakhshi","Bakhtiari","Banifaz","Baraghani","Barati","Bastani","Bayani","Bayat","Beheshti","Behnam","Behrouz","Behzadi","Besharat","Bijani","Binesh","Boniadi","Borna","Bostani","Choopan","Dabagh","Darya","Dadashi","Daei","Daneshvar","Darvish","Dehghan","Dehkordi","Dorri","Ebrahimi","Eghbali","Ejlali","Elahi","Emadi","Emami","Entezami","Esfahani","Eshraghi","Eskandari","Esmaili","Estesami","Etemad","Fakhar","Falah","Falahi","Fallah","Fanaei","Far","Farah","Farahani","Faraji","Farhadi","Farhang","Farjami","Farrokh","Farsad","Farshad","Farshid","Farsi","Fatehi","Fayyaz","Fazli","Feiz","Ferdowsi","Fereshteh","Fikri","Firouz","Firouzpour","Foroughi","Foroutan","Ghaderi","Ghaffari","Ghasemi","Ghazizadeh","Ghezavat","Ghobadi","Ghorbani","Golzar","Goodarzi","Gorji","Goya","Habibi","Haghighat","Hajati","Hakami","Hakimi","Halimi","Hamidi","Hariri","Hasani","Hashemi","Hassani","Hassanipour","Hosseini","Hatami","Hedayat","Hejazi","Hekmat","Heydari","Hijazi","Homayoun","Hossein","Imani","Irani","Isfahani","Izadi","Jabari","Jabbari","Jafari","Jahanbani","Jahangiri","Jalali","Jaleh","Jalili","Jam","Jamali","Jamshidi","Janati","Javadi","Jobrani","Kanani","Kar","Karami","Kargar","Karimi","Karimian","Kashani","Kashi","Kaveh","Kayhan","Kazemi","Keramat","Keyhan","Khadem","Khalaf","Khalili","Khamenei","Khani","Khorasani","Khorram","Khorsandi","Kia","Kiani","Kianian","Kiarostami","Kimiaei","Kord","Kordestani","Lotfi","Maadi","Madani","Mahdavi","Mahini","Mahjoub","Mahmoudi","Majd","Majidi","Makhdoom","Makki","Malakian","Maleki","Malekzadeh","Manavi","Mansour","Mansouri","Marashi","Marjani","Marzban","Mashhadi","Matin","Mazhari","Maziar","Mazloom","Mehraban","Mehrabi","Mehrabian","Mehrad","Mehran","Mehrdad","Mehri","Mehrzad","Memar","Meshkat","Milani","Miri","Moghadam","Mohammad","Mohammadi","Moini","Mojarad","Mokhtari","Mokri","Molavi","Moradi","Moridi","Mosheli","Mousavi","Nabavi","Naceri","Nader","Naderi","Nafari","Nafisi","Najafi","Namazi","Namdar","Namvar","Naqdi","Naqshbandi","Naqvi","Nariman","Nasab","Naseri","Naserian","Nasiri","Nasri","Navabi","Navaz","Navid","Nayeri","Nazari","Nazarian","Nazem","Nazeri","Negahban","Nejad","Neshat","Niazi","Nik","Nili","Nori","Norouzi","Nouri","Noury","Nozad","Omidyar","Osanloo","Ostad","Pahlavan","Paknia","Panahi","Parastui","Parsa","Parvin","Parvizi","Pashaei","Pedrad","Pejman","Peyman","Pezeshkzad","Pezeshkian","Piran","Qasemi","Rahimi","Ranjbar","Rashidi","Rezaei","Rostami","Rouhani","Sadeghi","Saeedi","Safavi","Sharifi","Shirazi","Tabatabaei","Tabrizi","Tavakoli","Tehrani","Yazdi","Yousefi","Zamani","Zarei"],lU=class extends Ss{getFirstNamesMaleJson(){return iU}getFirstNamesFemaleJson(){return sU}getLastNamesJson(){return oU}},cU=class{static normalizeBirthDate(r){if(!r||r.trim()===""||r.startsWith("0001-01-01"))return"";const e=r.trim(),a=e.match(/^(\d{4})-(\d{2})-(\d{2})/);if(a){const[,s,c,d]=a;return`${s}-${c}-${d}`}const i=new Date(e);if(!isNaN(i.getTime())){const s=i.getFullYear().toString().padStart(4,"0"),c=(i.getMonth()+1).toString().padStart(2,"0"),d=i.getDate().toString().padStart(2,"0");return`${s}-${c}-${d}`}return""}static isValidBirthDate(r){if(!r||r.trim()===""||r.startsWith("0001-01-01"))return!1;const e=new Date(r);return isNaN(e.getTime())?!1:e.getFullYear()>1&&e.getFullYear()<9999}};function uU(){return[{value:"random",label:"Random"},{value:"21-25",label:"21-25"},{value:"26-30",label:"26-30"},{value:"31-35",label:"31-35"},{value:"36-40",label:"36-40"},{value:"41-45",label:"41-45"},{value:"46-50",label:"46-50"},{value:"51-55",label:"51-55"},{value:"56-60",label:"56-60"},{value:"61-65",label:"61-65"}]}function dU(r){if(r==="random"||!r)return null;const e=r.split("-");if(e.length!==2)return null;const a=parseInt(e[0],10),i=parseInt(e[1],10);if(isNaN(a)||isNaN(i))return null;const s=new Date().getFullYear(),c=Math.floor((a+i)/2),d=s-c,m=Math.floor((i-a)/2);return{targetYear:d,yearDeviation:m}}function mU(){return[{value:"de",label:"Deutsch",flag:"🇩🇪",alternativeCodes:["de-DE","de-AT","de-CH","de-LU","de-LI"]},{value:"en",label:"English",flag:"🇬🇧",alternativeCodes:["en-US","en-GB","en-CA","en-AU","en-NZ","en-IE","en-ZA","en-SG","en-IN"]},{value:"es",label:"Español",flag:"🇪🇸",alternativeCodes:["es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","es-VE","es-EC","es-GT","es-CU","es-BO","es-DO","es-HN","es-PY","es-SV","es-NI","es-CR","es-PA","es-UY","es-PR"]},{value:"it",label:"Italiano",flag:"🇮🇹",alternativeCodes:["it-IT","it-CH","it-SM","it-VA"]},{value:"nl",label:"Nederlands",flag:"🇳🇱",alternativeCodes:["nl-NL","nl-BE"]},{value:"ro",label:"Română",flag:"🇷🇴",alternativeCodes:["ro-RO","ro-MD"]},{value:"fa",label:"فارسی",flag:"🇮🇷",alternativeCodes:["fa-IR","fa-AF"]}].sort((e,a)=>e.label.localeCompare(a.label))}var gU=r=>{switch(r.toLowerCase()){case"en":return new KE;case"nl":return new rB;case"de":return new vB;case"it":return new OB;case"es":return new zB;case"ro":return new rU;case"fa":return new lU;default:return console.warn(`Language '${r}' is not supported. Falling back to English.`),new KE}};const fU=()=>{const r=zt(),[e,a]=I.useState({username:null,password:null,email:null}),i=I.useCallback(async()=>{if(!(r!=null&&r.sqliteClient))throw new Error("Database not initialized");const d=r.sqliteClient.settings.getEffectiveIdentityLanguage(),m=gU(d),f=r.sqliteClient.settings.getPasswordSettings(),g=_h(f);return{identityGenerator:m,passwordGenerator:g}},[r==null?void 0:r.sqliteClient]),s=I.useCallback(async()=>{if(!(r!=null&&r.sqliteClient))return null;try{const{identityGenerator:d,passwordGenerator:m}=await i(),f=r.sqliteClient.settings.getDefaultIdentityGender(),g=r.sqliteClient.settings.getDefaultIdentityAgeRange(),E=dU(g),p=d.generateRandomIdentity(f,E),N=m.generateRandomPassword(),v=r.sqliteClient.settings.getDefaultEmailDomain(),x=v?`${p.emailPrefix}@${v}`:p.emailPrefix,T={email:x,firstName:p.firstName,lastName:p.lastName,gender:p.gender,birthdate:cU.normalizeBirthDate(p.birthDate.toISOString()),username:p.nickName,password:N};return a({username:p.nickName,password:N,email:x}),T}catch(d){return console.error("Error generating random alias:",d),null}},[r==null?void 0:r.sqliteClient,i]),c=I.useCallback(()=>new zh().generateRandomEmailPrefix(),[]);return{generateAlias:s,generateRandomEmailPrefix:c,lastGeneratedValues:e,setLastGeneratedValues:a}},hU=({formId:r,isLoading:e,formData:a,onRestore:i,skipRestore:s=!1})=>{const c=I.useRef(!1),d=I.useCallback(async()=>{if(e)return;await ft("PERSIST_FORM_VALUES",JSON.stringify({formId:r,data:a}),"background")},[r,a,e]),m=I.useCallback(async()=>{if(s||c.current)return!1;const g=await ft("GET_PERSISTED_FORM_VALUES",null,"background");try{if(!g)return!1;let E=null;try{E=JSON.parse(g)}catch(N){return console.error("Error parsing persisted form data:",N),!1}return E.formId===r?(c.current=!0,i(E.data),!0):!1}catch(E){return console.error("Error loading persisted form data:",E),!1}},[r,i,s]),f=I.useCallback(async()=>{await ft("CLEAR_PERSISTED_FORM_VALUES",null,"background")},[]);return I.useEffect(()=>{e||d()},[e,d]),I.useEffect(()=>()=>{f()},[f]),{loadPersistedValues:m,clearPersistedValues:f,persistFormValues:d}},Jn={username:["username","login","identifier","user"],fullName:["fullname","full-name","full name"],firstName:["firstname","first-name","first_name","fname","name","given-name"],lastName:["lastname","last-name","last_name","lname","surname","family-name"],email:["email","mail","emailaddress"],emailConfirm:["confirm","verification","repeat","retype","verify","email2"],password:["password","pwd","pass"],birthdate:["birthdate","birth-date","dob","date-of-birth"],gender:["gender","sex"],birthDateDay:["-day","birthdate_d","birthdayday","_day","day"],birthDateMonth:["-month","birthdate_m","birthdaymonth","_month","month"],birthDateYear:["-year","birthdate_y","birthdayyear","_year","year"]},Bf={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},AU=new Set(["login","signin","sign","register","signup","account","authentication","password","access","auth","session","authenticate","credentials","logout","signout","portal","dashboard","home","welcome","page","site","secure","member","user","profile","settings","menu","overview","index","main","start","landing","free","create","new","your","special","offer","deal","discount","promotion","newsletter","help","support","contact","about","faq","terms","privacy","cookie","service","services","products","shop","store","cart","checkout","online","web","digital","mobile","my","personal","private","general","default","standard","website","system","admin","administrator","platform","portal","gateway","api","interface","console","today","now","current","latest","newest","recent","the","and","or","but","to","up"]),Xn={username:["gebruikersnaam","gebruiker","login","identifier"],fullName:["volledige naam"],firstName:["voornaam","naam"],lastName:["achternaam"],email:["e-mailadres","e-mail"],emailConfirm:["bevestig","herhaal","verificatie"],password:["wachtwoord","pwd"],birthdate:["geboortedatum","geboorte-datum"],gender:["geslacht","aanhef"],birthDateDay:["dag"],birthDateMonth:["maand"],birthDateYear:["jaar"]},Uf={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},pU=new Set(["inloggen","registreren","registratie","aanmelden","inschrijven","uitloggen","wachtwoord","toegang","authenticatie","account","portaal","overzicht","startpagina","welkom","pagina","beveiligd","lid","gebruiker","profiel","instellingen","menu","begin","hoofdpagina","gratis","nieuw","jouw","schrijf","nieuwsbrief","aanbieding","korting","speciaal","actie","hulp","ondersteuning","contact","over","voorwaarden","privacy","cookie","dienst","diensten","producten","winkel","bestellen","winkelwagen","online","web","digitaal","mobiel","mijn","persoonlijk","privé","algemeen","standaard","systeem","beheer","beheerder","platform","portaal","interface","console","vandaag","nu","huidig","recent","nieuwste","je","in","op","de","van","ons","allemaal"]),Va={username:[...new Set([...Jn.username,...Xn.username])],fullName:[...new Set([...Jn.fullName,...Xn.fullName])],firstName:[...new Set([...Jn.firstName,...Xn.firstName])],lastName:[...new Set([...Jn.lastName,...Xn.lastName])],email:[...new Set([...Xn.email,...Jn.email])],emailConfirm:[...new Set([...Jn.emailConfirm,...Xn.emailConfirm])],password:[...new Set([...Jn.password,...Xn.password])],birthdate:[...new Set([...Jn.birthdate,...Xn.birthdate])],gender:[...new Set([...Jn.gender,...Xn.gender])],birthDateDay:[...new Set([...Jn.birthDateDay,...Xn.birthDateDay])],birthDateMonth:[...new Set([...Jn.birthDateMonth,...Xn.birthDateMonth])],birthDateYear:[...new Set([...Jn.birthDateYear,...Xn.birthDateYear])]},Ul={male:[...new Set([...Bf.male,...Uf.male])],female:[...new Set([...Bf.female,...Uf.female])],other:[...new Set([...Bf.other,...Uf.other])]},qE=new Set([...AU,...pU]);class WE{constructor(e,a){Qe(this,"document");Qe(this,"clickedElement");Qe(this,"visibilityCache");this.document=e,this.clickedElement=a??null,this.visibilityCache=new Map}containsLoginForm(){let e=this.getFormWrapper();return(e==null?void 0:e.getAttribute("role"))==="dialog"&&(e=e.querySelector("form")??e),e||(e=this.document.body),e.querySelectorAll("input").length>200?!1:!!(this.containsPasswordField(e)||this.containsLikelyUsernameOrEmailField(e))}getForm(){if(!this.clickedElement)return null;const e=this.getFormWrapper();return this.detectFormFields(e)}static getSuggestedServiceName(e,a){const i=e.title,s=4,c=50,d=x=>{const T=x.length>=3&&x.length<=c,k=x.split(/[\s|\-—/\\]+/).length<=s;return T&&k},m=x=>{const T=x.toLowerCase().split(" ").map(B=>B.toLowerCase());let k=0;for(;k<T.length&&qE.has(T[k].toLowerCase());)k++;let L=T.length-1;for(;L>k&&qE.has(T[L].toLowerCase());)L--;return T.slice(k,L+1)},f=(x,T)=>x.split(/[\s|]+/).filter(k=>T.includes(k.toLowerCase())).join(" "),g=a.hostname.replace(/^www\./,""),p=/[|\-—/\\:]/.exec(i);if(p){const x=p.index,T=i.substring(0,x).trim(),k=i.substring(x+1).trim(),L=m(T),B=m(k),S=f(T,L),O=f(k,B),M=d(S),P=d(O);if(M&&P)return[S,O,g];if(M)return[S,g];if(P)return[O,g]}const N=m(i),v=f(i,N);return d(v)?[v,g]:[g]}getFormWrapper(){var e;return(e=this.clickedElement)==null?void 0:e.closest('form, [role="dialog"]')}getActualInputElement(e){if(e.tagName.toLowerCase()==="input")return e;const a=e;if(a.shadowRoot){const s=a.shadowRoot.querySelector("input, textarea");if(s)return s}const i=e.querySelector("input, textarea");return i||e}isElementVisible(e){var i;if(!e)return!1;if(this.visibilityCache.has(e))return this.visibilityCache.get(e);let a=e;for(;a;){try{const s=(i=this.document.defaultView)==null?void 0:i.getComputedStyle(a);if(!s){let c=a;for(;c;)this.visibilityCache.set(c,!0),c=c.parentElement;return!0}if(s.display==="none"){let c=a;for(;c;)this.visibilityCache.set(c,!1),c=c.parentElement;return!1}if(s.visibility==="hidden"){let c=a;for(;c;)this.visibilityCache.set(c,!1),c=c.parentElement;return!1}if(parseFloat(s.opacity)===0){let c=a;for(;c;)this.visibilityCache.set(c,!1),c=c.parentElement;return!1}}catch{let s=a;for(;s;)this.visibilityCache.set(s,!0),s=s.parentElement;return!0}a=a.parentElement}return this.visibilityCache.set(e,!0),!0}findAllInputFields(e,a,i,s=[]){var p,N,v,x,T,k,L,B;const c=e?Array.from(e.querySelectorAll("input, select, [type]")):Array.from(this.document.querySelectorAll("input, select, [type]")),m=(e?Array.from(e.querySelectorAll("*")):Array.from(this.document.querySelectorAll("*"))).filter(S=>{const O=S;return O.shadowRoot?O.shadowRoot.querySelector("input, textarea")!==null:!1}),g=[...c,...m].filter((S,O,M)=>M.indexOf(S)===O),E=[];for(const S of Array.from(g)){if(s.includes(S)||!this.isElementVisible(S))continue;let M=S.tagName.toLowerCase()==="select"?"select":((p=S.type)==null?void 0:p.toLowerCase())||((N=S.getAttribute("type"))==null?void 0:N.toLowerCase())||"";const P=S,G=P.shadowRoot&&P.shadowRoot.querySelector("input, textarea");if(G&&!M){const W=P.shadowRoot.querySelector("input, textarea");W&&(M=((v=W.type)==null?void 0:v.toLowerCase())||"text")}if(!i.includes(M)&&!(G&&i.includes("text")&&!M))continue;if(i.includes("email")&&M==="email"){E.push({input:S,score:-1});continue}const H=[S.id,S.getAttribute("name"),S.getAttribute("placeholder")].map(W=>(W==null?void 0:W.toLowerCase())??"");if(S.id||S.getAttribute("name")){const W=this.document.querySelector(`label[for="${S.id||S.getAttribute("name")}"]`);W&&H.push(((x=W.textContent)==null?void 0:x.toLowerCase())??"")}let z=S;for(let W=0;W<3&&z;W++){const ne=z.querySelectorAll('[slot="label"], [slot="helper-text"]');for(const he of Array.from(ne)){const q=((T=he.textContent)==null?void 0:T.toLowerCase())??"";q&&H.push(q)}if(z.shadowRoot){const he=z.shadowRoot.querySelectorAll('slot[name="label"], slot[name="helper-text"]');for(const q of Array.from(he)){const re=q.assignedNodes();for(const Ee of re)Ee.textContent&&H.push(Ee.textContent.toLowerCase())}}z=z.parentElement}const V=S.parentElement;if(V)for(const W of Array.from(V.children))W!==S&&Array.from(W.classList).some(ne=>ne.toLowerCase().includes("label"))&&H.push(((k=W.textContent)==null?void 0:k.toLowerCase())??"");let K=S;for(let W=0;W<5&&K&&!(K.children.length>15);W++){const ne=K.querySelector("label");if(ne){H.push(((L=ne.textContent)==null?void 0:L.toLowerCase())??"");break}const he=K.closest("td");if(he){const q=he.closest("tr");if(q){for(const re of Array.from(q.querySelectorAll("td")))if(re!==he){H.push(((B=re.textContent)==null?void 0:B.toLowerCase())??"");break}}break}K=K.parentElement}let $=a.length;for(let W=0;W<a.length;W++)if(H.some(ne=>ne.includes(a[W]))){$=W;break}$<a.length&&E.push({input:S,score:$})}return E.sort((S,O)=>S.score-O.score).map(S=>S.input)}findInputField(e,a,i,s=[]){const c=this.findAllInputFields(e,a,i,s),d=this.filterOutNestedDuplicates(c,s);if(i.includes("email")){const m=d.find(f=>(f.type||"").toLowerCase()==="email");if(m)return m}return d.length>0?d[0]:null}findEmailField(e){const a=this.findAllInputFields(e,Va.email,["text","email"]),s=this.filterOutNestedDuplicates(a)[0]??null,c=s?this.findAllInputFields(e,Va.emailConfirm,["text","email"],[s]):[],m=this.filterOutNestedDuplicates(c)[0]??null;return{primary:s,confirm:m}}findBirthdateFields(e,a=[]){const i=this.findInputField(e,Va.birthdate,["date","text"],a);let s="yyyy-mm-dd";if(e&&i){const f=i.closest("div");if(f){const E=[...Array.from(f.getElementsByTagName("label")),...Array.from(f.getElementsByTagName("span")),f].map(p=>{var N;return((N=p.textContent)==null?void 0:N.toLowerCase())??""}).join(" ").replace(/[\s\u00A0]/g,"").toLowerCase();if(/dd[-/]mm[-/]jj/i.test(E)||/dd[-/]mm[-/]yyyy/i.test(E)?s=E.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd[-/]yyyy/i.test(E)?s=E.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy":/yyyy[-/]mm[-/]dd/i.test(E)&&(s=E.includes("/")?"yyyy/mm/dd":"yyyy-mm-dd"),s==="yyyy-mm-dd"&&i.placeholder){const p=i.placeholder.toLowerCase();/dd[-/]mm/i.test(p)?s=p.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd/i.test(p)&&(s=p.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy")}}}if(i)return{single:i,format:s,day:null,month:null,year:null};const c=this.findInputField(e,Va.birthDateDay,["text","number","select"],a),d=this.findInputField(e,Va.birthDateMonth,["text","number","select"],a),m=this.findInputField(e,Va.birthDateYear,["text","number","select"],a);return{single:null,format:"yyyy-mm-dd",day:c,month:d,year:m}}findGenderField(e,a=[]){const i=this.findInputField(e,Va.gender,["select"],a);if((i==null?void 0:i.tagName.toLowerCase())==="select")return{type:"select",field:i};const s=e?e.querySelectorAll('input[type="radio"][name*="gender"], input[type="radio"][name*="sex"]'):null;if(s&&s.length>0){const d=(m,f=!1)=>Array.from(s).find(g=>{var p,N;const E=[g.value,g.id,g.name,((N=(p=g.labels)==null?void 0:p[0])==null?void 0:N.textContent)??""].map(v=>(v==null?void 0:v.toLowerCase())??"");return f&&(Ul.male.some(v=>E.some(x=>x.includes(v)))||Ul.female.some(v=>E.some(x=>x.includes(v))))?!1:m.some(v=>E.some(x=>x.includes(v)))})??null;return{type:"radio",field:null,radioButtons:{male:d(Ul.male),female:d(Ul.female),other:d(Ul.other)}}}return{type:"text",field:this.findInputField(e,Va.gender,["text"],a)}}filterOutNestedDuplicates(e,a=[]){if(e.length===0)return e;const i=[];for(const s of e){let c=!0;for(const d of a){if(s===d){c=!1;break}if(d.contains(s)){c=!1;break}if(s.contains(d)){c=!1;break}const m=s,f=d;if(f.shadowRoot&&f.shadowRoot.contains(s)){c=!1;break}if(m.shadowRoot&&m.shadowRoot.contains(d)){c=!1;break}const g=this.getActualInputElement(s),E=this.getActualInputElement(d);if(g===E){c=!1;break}}if(c){for(const d of e)if(s!==d){if(s.contains(d)){c=!1;break}const m=s;if(m.shadowRoot&&m.shadowRoot.contains(d)){c=!1;break}}if(c){const d=this.getActualInputElement(s);if(d!==s&&e.includes(d))continue;i.push(s)}}}return i}findPasswordField(e){const a=this.findAllInputFields(e,Va.password,["password"]),i=this.filterOutNestedDuplicates(a);return{primary:i[0]??null,confirm:i[1]??null}}containsPasswordField(e){const a=this.findPasswordField(e);return!!(a.primary&&this.isElementVisible(a.primary))}containsLikelyUsernameOrEmailField(e){const a=this.findEmailField(e);if(a.primary&&this.isElementVisible(a.primary))return!0;const i=this.findInputField(e,Va.username,["text"],[]);if(i&&this.isElementVisible(i))return!0;const s=this.findInputField(e,Va.firstName,["text"],[]);if(s&&this.isElementVisible(s))return!0;const c=this.findInputField(e,Va.lastName,["text"],[]);return!!(c&&this.isElementVisible(c))}isAutofillTriggerableField(){const e=this.getFormWrapper();if(!this.clickedElement)return!1;const a=this.getActualInputElement(this.clickedElement),i=[this.clickedElement,a].filter((m,f,g)=>m&&g.indexOf(m)===f);if(this.findAllInputFields(e,Va.username,["text"]).some(m=>i.includes(m)))return!0;const c=this.findPasswordField(e);return!!(c.primary&&i.includes(c.primary)||c.confirm&&i.includes(c.confirm)||this.findAllInputFields(e,Va.email,["text","email"]).some(m=>i.includes(m)))}detectFormFields(e){const a=[],i=this.findEmailField(e);i.primary&&a.push(i.primary),i.confirm&&a.push(i.confirm);const s=this.findPasswordField(e);s.primary&&a.push(s.primary),s.confirm&&a.push(s.confirm);const c=this.findInputField(e,Va.username,["text"],a);c&&a.push(c);const d=this.findInputField(e,Va.fullName,["text"],a);d&&a.push(d);const m=this.findInputField(e,Va.lastName,["text"],a);m&&a.push(m);const f=this.findInputField(e,Va.firstName,["text"],a);f&&a.push(f);const g=this.findBirthdateFields(e,a);g.single&&a.push(g.single),g.day&&a.push(g.day),g.month&&a.push(g.month),g.year&&a.push(g.year);const E=this.findGenderField(e,a);return E.field&&a.push(E.field),{form:e,emailField:i.primary,emailConfirmField:i.confirm,usernameField:c,passwordField:s.primary,passwordConfirmField:s.confirm,fullNameField:d,firstNameField:f,lastNameField:m,birthdateField:g,genderField:E}}}class YE{static getServiceInfo(e,a){const i=WE.getSuggestedServiceName(e,a),s=a.href;let c="";try{const d=new URL(s);(d.protocol==="http:"||d.protocol==="https:")&&(c=d.origin+d.pathname,c.endsWith("/")&&(c=c.slice(0,-1)))}catch(d){console.error("Error parsing current URL:",d)}return{suggestedNames:i,currentUrl:s,serviceUrl:c,domain:a.hostname.replace(/^www\./,"")}}static getServiceInfoFromTab(e,a){try{const i=new URL(e),s={href:e,hostname:i.hostname,protocol:i.protocol,pathname:i.pathname,origin:i.origin},c={title:a||i.hostname},d=WE.getSuggestedServiceName(c,s);let m="";return(i.protocol==="http:"||i.protocol==="https:")&&(m=i.origin+i.pathname,m.endsWith("/")&&(m=m.slice(0,-1))),{suggestedNames:d,currentUrl:e,serviceUrl:m,domain:i.hostname.replace(/^www\./,"")}}catch(i){console.error("Error parsing tab URL:",i);const s=e.replace(/^https?:\/\/(www\.)?/,"").split("/")[0];return{suggestedNames:[s],currentUrl:e,serviceUrl:e,domain:s}}}static getEncodedServiceInfo(e,a){const i=this.getServiceInfo(e,a);return{serviceName:i.suggestedNames.length>0?encodeURIComponent(i.suggestedNames[0]):"",serviceUrl:i.serviceUrl?encodeURIComponent(i.serviceUrl):"",currentUrl:encodeURIComponent(i.currentUrl),domain:encodeURIComponent(i.domain)}}static getEncodedServiceInfoFromTab(e,a){const i=this.getServiceInfoFromTab(e,a);return{serviceName:i.suggestedNames.length>0?encodeURIComponent(i.suggestedNames[0]):"",serviceUrl:i.serviceUrl?encodeURIComponent(i.serviceUrl):"",currentUrl:encodeURIComponent(i.currentUrl),domain:encodeURIComponent(i.domain)}}}const yU=()=>{const[r]=Wb();return{detectService:I.useCallback(async a=>{let i=a||"",s="";try{const c=r.get("serviceName"),d=r.get("serviceUrl"),m=r.get("currentUrl");if(c||d||m){if(c&&(i=decodeURIComponent(c)),d&&(s=decodeURIComponent(d)),m&&(!c||!d)){const f=decodeURIComponent(m),g=YE.getServiceInfoFromTab(f);!c&&g.suggestedNames.length>0&&(i=g.suggestedNames[0]),!d&&g.serviceUrl&&(s=g.serviceUrl)}}else{const[f]=await li.tabs.query({active:!0,currentWindow:!0});if(f!=null&&f.url){const g=YE.getServiceInfoFromTab(f.url,f.title);g.suggestedNames.length>0&&!i&&(i=g.suggestedNames[0]),g.serviceUrl&&(s=g.serviceUrl)}}}catch(c){console.error("Error detecting service information:",c)}return{serviceName:i,serviceUrl:s}},[r])}},EU=5e3;class Gi{static extractSourceFromUrl(e){if(!e)return"unknown";try{return new URL(e.startsWith("http")?e:`https://${e}`).hostname.toLowerCase().replace(/^www\./,"")}catch{return"unknown"}}static normalizeUrl(e){if(!e)return;const a=e.trim();if(a&&!(!a.startsWith("http://")&&!a.startsWith("https://")&&!a.startsWith("www.")))return a.startsWith("www.")?`https://${a}`:a}static extractFirstValidUrl(e){if(!e)return;const i=(Array.isArray(e)?e:[e]).find(s=>{const c=s==null?void 0:s.trim();return c&&(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("www."))});return Gi.normalizeUrl(i)}static hasLogoForUrl(e,a){if(!e)return!1;const i=Gi.extractSourceFromUrl(e);return i==="unknown"?!1:a.logos.hasLogoForSource(i)}static async fetchFavicon(e,a,i,s=EU){const c=Gi.normalizeUrl(e);if(!c)return{success:!1,error:"Invalid URL"};const d=Gi.extractSourceFromUrl(c);if(d==="unknown")return{success:!1,error:"Could not extract domain from URL"};if(a.logos.hasLogoForSource(d))return{success:!1,skipped:!0};try{const m=new Promise((E,p)=>setTimeout(()=>p(new Error("Favicon extraction timed out")),s)),f=i.get(`Favicon/Extract?url=${encodeURIComponent(c)}`),g=await Promise.race([f,m]);return g!=null&&g.image?{success:!0,imageData:Uint8Array.from(po.Buffer.from(g.image,"base64"))}:{success:!1,error:"No favicon returned from server"}}catch(m){const f=m instanceof Error?m.message:"Unknown error";return console.error("[Favicon] Error extracting favicon:",f),{success:!1,error:f}}}static async fetchAndAttachFavicon(e,a,i,s){const c=Gi.extractFirstValidUrl(a);if(!c)return{...e,Logo:void 0};const d=await Gi.fetchFavicon(c,i,s);return d.success&&d.imageData?{...e,Logo:d.imageData}:e}}const bU=[ma.Login,ma.Alias,ma.CreditCard,ma.Note],IU=ma.Login,JE=()=>{const{t:r}=Ze(),{id:e}=ld(),[a]=Wb(),i=La(),s=zt(),c=e!==void 0&&e.length>0,d=a.get("type"),m=a.get("name"),f=a.get("folderId"),{executeVaultMutationAsync:g}=Ts(),{setHeaderButtons:E}=mr(),{setIsInitialLoading:p}=fa(),{generateAlias:N,generateRandomEmailPrefix:v,lastGeneratedValues:x}=fU(),{detectService:T}=yU(),k=ur(),[L,B]=I.useState(!0),[S,O]=I.useState(!1),[M,P]=I.useState(null),[G,H]=I.useState({}),[z,V]=I.useState([]),[K,$]=I.useState([]),[W,ne]=I.useState(!1),[he,q]=I.useState(!1),[re,Ee]=I.useState(!1),pe=I.useRef(!1),j=I.useRef(null),[X,ee]=I.useState(!1),[ie,ve]=I.useState(new Set),[Ne,Re]=I.useState(new Set),[Be,ke]=I.useState([]),[Ve,vt]=I.useState([]),[Ct,Ut]=I.useState({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),[tt,nt]=I.useState([]),[Te,me]=I.useState([]),[De,Pe]=I.useState([]),[ze,at]=I.useState(!0),[Ye,dt]=I.useState(void 0),[jt]=I.useState(!1),qt=I.useCallback(oe=>{oe.item&&P(oe.item),oe.fieldValues&&H(oe.fieldValues),oe.customFields&&V(oe.customFields),oe.totpEditorState&&Ut(oe.totpEditorState),oe.show2FA!==void 0&&q(oe.show2FA),oe.showAttachments!==void 0&&Ee(oe.showAttachments),oe.manuallyAddedFields&&ve(new Set(oe.manuallyAddedFields)),oe.isLoginEmailInEmailMode!==void 0&&at(oe.isLoginEmailInEmailMode),oe.passwordSettings!==void 0&&dt(oe.passwordSettings)},[]),{loadPersistedValues:Qt,clearPersistedValues:na}=hU({formId:e||null,isLoading:L,formData:{item:M,fieldValues:G,customFields:z,totpEditorState:Ct,show2FA:he,showAttachments:re,manuallyAddedFields:Array.from(ie),isLoginEmailInEmailMode:ze,passwordSettings:Ye},onRestore:qt,skipRestore:jt}),U=I.useMemo(()=>M?Mk(M.ItemType):[],[M]),C=I.useMemo(()=>U.find(oe=>oe.FieldKey==="notes.content"),[U]),w=I.useMemo(()=>M?_k(M.ItemType):[],[M]),Q=I.useMemo(()=>{const oe=new Set;return U.forEach(_e=>{M&&Fl(_e,M.ItemType)&&oe.add(_e.FieldKey)}),ie.forEach(_e=>oe.add(_e)),Ne.forEach(_e=>oe.add(_e)),Object.keys(G).forEach(_e=>{const Me=G[_e];Me&&(Array.isArray(Me)?Me.length>0:Me.toString().trim()!=="")&&oe.add(_e)}),oe},[M,U,ie,Ne,G]),ae=I.useCallback(oe=>{if(!M)return!1;if(ie.has(oe.FieldKey)||Ne.has(oe.FieldKey))return!0;const _e=U.find(Me=>Me.FieldKey===oe.FieldKey);return _e?Fl(_e,M.ItemType):!0},[M,U,ie,Ne]),fe=I.useMemo(()=>U.filter(oe=>oe.Category===ut.Primary),[U]),be=I.useMemo(()=>{const oe={};return U.forEach(_e=>{if(_e.Category===ut.Notes||_e.Category===ut.Metadata||_e.Category===ut.Primary)return;const Me=_e.Category;oe[Me]||(oe[Me]=[]),oe[Me].push(_e)}),oe},[U]);I.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!e||!c){const oe=d&&bU.includes(d)?d:IU;(async()=>{const{serviceName:Me,serviceUrl:Xe}=await T(m),kt={Id:crypto.randomUUID().toUpperCase(),Name:Me,ItemType:oe,FolderId:f||null,Fields:[],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()};if(P(kt),at(oe===ma.Login),Xe&&H(it=>({...it,"login.url":Xe})),s!=null&&s.sqliteClient){const it=s.sqliteClient.folders.getAll();$(it)}(await li.storage.local.get([qg]))[qg]?await li.storage.local.remove([qg]):await Qt(),B(!1),p(!1)})();return}try{const oe=s.sqliteClient.items.getById(e);if(oe){P(oe);const _e=s.sqliteClient.folders.getAll();$(_e);const Me={},Xe=[],kt=new Set;oe.Fields.forEach(st=>{Me[st.FieldKey]=st.Value,kt.add(st.FieldKey),st.IsCustomField&&Xe.push({tempId:st.FieldKey,label:st.Label,fieldType:st.FieldType,isHidden:st.IsHidden,displayOrder:st.DisplayOrder})}),H(Me),V(Xe),Re(kt);const bt=s.sqliteClient.settings.getTotpCodesForItem(e);ke(bt),vt(bt.map(st=>st.Id)),bt.length>0&&q(!0);const it=s.sqliteClient.settings.getAttachmentsForItem(e);nt(it),me(it.map(st=>st.Id)),it.length>0&&Ee(!0),B(!1),p(!1)}else console.error("Item not found"),i("/items")}catch(oe){console.error("Error loading item:",oe),B(!1),p(!1)}},[s==null?void 0:s.sqliteClient,e,c,d,m,f,i,p,T,Qt]);const Ue=I.useCallback(async()=>{const oe=await N();oe&&(H(_e=>{const Me=_e["login.username"]||"",Xe=_e["login.password"]||"",kt=_e["login.email"]||"",bt={..._e,"alias.first_name":oe.firstName,"alias.last_name":oe.lastName,"alias.gender":oe.gender,"alias.birthdate":oe.birthdate};return(!kt||kt===x.email)&&(bt["login.email"]=oe.email),(!Me||Me===x.username)&&(bt["login.username"]=oe.username),(!Xe||Xe===x.password)&&(bt["login.password"]=oe.password),bt}),ee(!0))},[N,x]),ht=I.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const oe=G["alias.first_name"]||"",_e=G["alias.last_name"]||"";let Me;if(!oe.trim()&&!_e.trim())Me=v();else{const bt=G["alias.gender"]||$I.Other,it=G["alias.birthdate"]||"";Me=new zh().generateEmailPrefix({firstName:oe,lastName:_e,gender:bt,birthDate:it?new Date(it):new Date,emailPrefix:"",nickName:""})}const Xe=s.sqliteClient.settings.getDefaultEmailDomain(),kt=Xe?`${Me}@${Xe}`:Me;H(bt=>({...bt,"login.email":kt}))},[s==null?void 0:s.sqliteClient,G,v]),Et=I.useCallback(()=>{if(!(s!=null&&s.sqliteClient))return;const oe=v(),_e=s.sqliteClient.settings.getDefaultEmailDomain(),Me=_e?`${oe}@${_e}`:oe;H(Xe=>({...Xe,"login.email":Me}))},[s==null?void 0:s.sqliteClient,v]),St=I.useCallback(async()=>{const oe=await N();oe&&H(_e=>({..._e,"login.username":oe.username}))},[N]),mt=I.useMemo(()=>{if(!M)return!1;const oe=U.find(_e=>_e.FieldKey==="alias.first_name");return oe?Fl(oe,M.ItemType):!1},[M,U]),gr=I.useMemo(()=>U.some(oe=>oe.FieldKey==="login.username"||oe.FieldKey==="login.password"),[U]);I.useEffect(()=>{!c&&mt&&!L&&(s!=null&&s.sqliteClient)&&!pe.current&&(pe.current=!0,Ue())},[c,mt,L,s==null?void 0:s.sqliteClient,Ue]),I.useEffect(()=>{!c&&!L&&j.current&&j.current.focus()},[c,L]);const ra=I.useCallback((oe,_e)=>{H(Me=>({...Me,[oe]:_e}))},[]),an=I.useCallback(async()=>{if(M)try{const oe=[];U.forEach(Me=>{const Xe=G[Me.FieldKey];Xe&&(Array.isArray(Xe)?Xe.length>0:Xe.trim()!=="")&&oe.push({FieldKey:Me.FieldKey,Label:Me.FieldKey,FieldType:Me.FieldType,Value:Xe,IsHidden:Me.IsHidden,DisplayOrder:Me.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:Me.EnableHistory})}),z.forEach(Me=>{const Xe=G[Me.tempId]||"";oe.push({FieldKey:Me.tempId,Label:Me.label,FieldType:Me.fieldType,Value:Xe,IsHidden:Me.isHidden,DisplayOrder:Me.displayOrder,IsCustomField:!0,EnableHistory:!1})});let _e={...M,Id:c?M.Id:crypto.randomUUID().toUpperCase(),Fields:oe,UpdatedAt:new Date().toISOString()};if(s!=null&&s.sqliteClient&&(B(!0),_e=await Gi.fetchAndAttachFavicon(_e,G["login.url"],s.sqliteClient,k)),!(s!=null&&s.sqliteClient))throw new Error("Database not initialized");await g(async()=>{if(B(!1),c){if(await s.sqliteClient.items.update(_e,Te,tt,Ve,Be),De.length>0)for(const Me of De)await s.sqliteClient.passkeys.deleteById(Me)}else await s.sqliteClient.items.create(_e,tt,Be)}),na(),c?i(-1):i(`/items/${_e.Id}`,{replace:!0})}catch(oe){console.error("Error saving item:",oe)}},[M,G,U,z,s,c,g,i,Te,tt,Ve,Be,De,k,na]),On=I.useCallback(async()=>{if(!(!M||!c||!(s!=null&&s.sqliteClient)))try{await g(async()=>{await s.sqliteClient.items.trash(M.Id)}),i("/items")}catch(oe){console.error("Error deleting item:",oe)}finally{O(!1)}},[M,c,s,g,i]),jn=I.useCallback((oe,_e)=>{const Xe={tempId:crypto.randomUUID(),label:oe,fieldType:_e,isHidden:!1,displayOrder:U.length+z.length+1};V(kt=>[...kt,Xe])},[U.length,z.length]),Oe=I.useCallback(oe=>{V(_e=>_e.filter(Me=>Me.tempId!==oe)),H(_e=>{const Me={..._e};return delete Me[oe],Me})},[]),ci=I.useCallback((oe,_e)=>{V(Me=>Me.map(Xe=>Xe.tempId===oe?{...Xe,label:_e}:Xe))},[]),Zt=I.useCallback(oe=>{if(!M)return;const _e=M.ItemType;!c&&_e!==oe&&(H(Me=>{const Xe={};return Object.entries(Me).forEach(([kt,bt])=>{const it=ho(kt);it?Pl(it,oe)&&(Xe[kt]=bt):Xe[kt]=bt}),Xe}),ve(Me=>{const Xe=new Set;return Me.forEach(kt=>{const bt=ho(kt);(!bt||Pl(bt,oe))&&Xe.add(kt)}),Xe}),Re(Me=>{const Xe=new Set;return Me.forEach(kt=>{const bt=ho(kt);(!bt||Pl(bt,oe))&&Xe.add(kt)}),Xe})),pe.current=!1,at(oe===ma.Login),P({...M,ItemType:oe,Fields:c?M.Fields:[]}),ne(!1)},[M,c]),sa=I.useCallback(()=>{H(oe=>({...oe,"notes.content":""})),ve(oe=>{const _e=new Set(oe);return _e.delete("notes.content"),_e})},[]),tr=I.useCallback(()=>{q(!0),Ut({isAddFormVisible:!0,formData:{name:"",secretKey:""}})},[]),ar=I.useCallback(()=>{Ee(!0)},[]),Ra=I.useCallback(oe=>{ve(_e=>new Set(_e).add(oe))},[]),Vt=I.useMemo(()=>{const oe=[];return gr&&oe.push({key:"2fa",isVisible:he,onAdd:tr}),oe.push({key:"attachments",isVisible:re,onAdd:ar}),oe},[gr,he,re,tr,ar]),ya=I.useCallback(oe=>{ve(_e=>{const Me=new Set(_e);return Me.delete(oe),Me}),H(_e=>{const Me={..._e};return delete Me[oe],Me})},[]);I.useEffect(()=>{const oe=l.jsxs("div",{className:"flex items-center gap-2",children:[c&&l.jsx(wn,{onClick:()=>O(!0),title:r("items.deleteItemTitle"),iconType:Fa.DELETE,variant:"danger"}),l.jsx(wn,{id:"save-credential",onClick:an,title:r("items.saveItem"),iconType:Fa.SAVE})]});return E(oe),()=>E(null)},[E,c,r,an]);const Wt=I.useCallback((oe,_e,Me,Xe,kt,bt)=>{const it=G[oe]||"";if(kt){const Fe=Array.isArray(it)&&it.length>0?it:it?[it]:[""];return l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:_e}),Fe.map((Z,we)=>l.jsxs("div",{className:"relative",children:[l.jsx("input",{id:`${oe}-${we}`,type:"text",value:Z,onChange:He=>{const Mt=[...Fe];Mt[we]=He.target.value,ra(oe,Mt.filter(ca=>ca.trim()!==""))},className:"w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white"}),we===Fe.length-1&&l.jsx("button",{type:"button",onClick:()=>ra(oe,[...Fe,""]),className:"absolute right-2 top-1/2 -translate-y-1/2 w-6 h-6 flex items-center justify-center text-gray-400 hover:text-primary-500 dark:hover:text-primary-400 transition-colors",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]},`${oe}-${we}`))]})}const st=Array.isArray(it)?it[0]||"":it,cn=(Fe,Z=!0)=>bt?l.jsxs("div",{className:"relative",children:[Fe,l.jsx("button",{type:"button",onClick:bt,className:`absolute right-2 ${Z?"top-[38px]":"top-1/2"} -translate-y-1/2 w-6 h-6 flex items-center justify-center text-gray-300 hover:text-red-400 dark:text-gray-500 dark:hover:text-red-400 transition-colors`,title:r("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}):Fe;switch(Me){case aa.Password:return cn(l.jsx(_R,{id:oe,label:_e,value:st,onChange:Fe=>ra(oe,Fe),showPassword:X,onShowPasswordChange:ee,initialSettings:Ye,onSettingsChange:dt}));case aa.Hidden:return cn(l.jsx(BR,{id:oe,label:_e,value:st,onChange:Fe=>ra(oe,Fe)}));case aa.TextArea:return cn(l.jsxs("div",{children:[_e&&l.jsx("label",{htmlFor:oe,className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:_e}),l.jsx("textarea",{id:oe,value:st,onChange:Fe=>ra(oe,Fe.target.value),rows:4,className:`w-full px-3 py-2 ${bt?"pr-10":""} border border-gray-300 dark:border-gray-600 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`})]}));case aa.Email:return l.jsx(RR,{id:oe,value:st,onChange:Fe=>ra(oe,Fe),onRemove:bt,onGenerateAlias:mt?ht:Et,isEmailMode:ze,onEmailModeChange:at});case aa.URL:case aa.Phone:case aa.Number:case aa.Date:case aa.Text:default:return oe==="login.username"&&mt?l.jsx(FR,{id:oe,label:_e,value:st,onChange:Fe=>ra(oe,Fe),onRegenerate:St}):cn(l.jsx(fd,{id:oe,label:_e,value:st,onChange:Fe=>ra(oe,Fe),type:"text"}))}},[G,ra,X,r,ht,Et,mt,St,ze,Ye]),Da=I.useCallback(oe=>{oe.preventDefault(),an()},[an]),ja=I.useCallback(oe=>{switch(oe){case ut.Login:return r("items.loginCredentials");case ut.Alias:return r("common.alias");case ut.Card:return r("items.cardInformation");default:return oe}},[r]),Rr=I.useCallback(oe=>oe===ut.Alias&&mt?l.jsx(l.Fragment,{children:l.jsx("button",{type:"button",onClick:Ue,className:"p-1.5 text-gray-400 hover:text-primary-500 focus:outline-none",title:r("common.generate"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M23 4v6h-6"}),l.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})}):null,[mt,Ue,r]);return L||!M?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx($n,{})}):l.jsxs("form",{onSubmit:Da,className:"space-y-4",children:[l.jsx(XD,{selectedType:M.ItemType,isEditMode:c,showDropdown:W,onDropdownToggle:ne,onTypeChange:Zt,onRegenerateAlias:mt&&!c?Ue:void 0}),l.jsxs(wu,{children:[l.jsx(JD,{inputRef:j,value:M.Name||"",onChange:oe=>P({...M,Name:oe}),folders:K,selectedFolderId:M.FolderId,onFolderChange:oe=>P({...M,FolderId:oe})}),fe.map(oe=>l.jsx("div",{children:Wt(oe.FieldKey,r(`fieldLabels.${oe.FieldKey}`,{defaultValue:oe.FieldKey}),oe.FieldType,oe.IsHidden,oe.IsMultiValue)},oe.FieldKey))]}),c&&M.HasPasskey&&l.jsx(PR,{itemId:M.Id,passkeyIdsMarkedForDeletion:De,onPasskeyMarkedForDeletion:Pe}),Object.keys(be).map(oe=>{const _e=be[oe],Me=_e.filter(it=>ae(it)),Xe=oe===ut.Login?_e.find(it=>it.FieldKey==="login.email"):null,kt=Xe&&!ae(Xe),bt=oe===ut.Login?[...Me].sort((it,st)=>{const cn={"login.email":0,"login.username":1,"login.password":2},Fe=cn[it.FieldKey]??99,Z=cn[st.FieldKey]??99;return Fe-Z}):Me;return bt.length===0&&!kt?null:l.jsx(wu,{title:l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{children:ja(oe)}),kt&&l.jsxs("button",{type:"button",onClick:()=>Ra("login.email"),className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs rounded-full transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-primary-600 dark:hover:text-primary-400 border border-dashed border-gray-300 dark:border-gray-600 hover:border-primary-400 dark:hover:border-primary-500",children:[l.jsxs("svg",{className:"w-2.5 h-2.5 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),l.jsx("span",{children:r("common.email")})]})]}),actions:Rr(oe),children:bt.map(it=>{const st=M&&ie.has(it.FieldKey)&&!Fl(it,M.ItemType);return l.jsx(sd.Fragment,{children:Wt(it.FieldKey,r(`fieldLabels.${it.FieldKey}`,{defaultValue:it.FieldKey}),it.FieldType,it.IsHidden,it.IsMultiValue,st?()=>ya(it.FieldKey):void 0)},it.FieldKey)})},oe)}),C&&Q.has("notes.content")&&l.jsx(wu,{title:r("common.notes"),actions:ae(C)?void 0:l.jsx("button",{type:"button",onClick:sa,className:"p-1.5 text-gray-400 hover:text-red-500 focus:outline-none",title:r("common.delete"),children:l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),children:Wt(C.FieldKey,"",C.FieldType,C.IsHidden,C.IsMultiValue)}),z.length>0&&l.jsx(wu,{title:r("common.customFields"),children:z.map(oe=>l.jsxs("div",{children:[l.jsx(LR,{htmlFor:oe.tempId,label:oe.label,onLabelChange:_e=>ci(oe.tempId,_e),onDelete:()=>Oe(oe.tempId)}),Wt(oe.tempId,"",oe.fieldType,oe.isHidden,!1)]},oe.tempId))}),he&&gr&&l.jsx(YD,{totpCodes:Be,onTotpCodesChange:ke,originalTotpCodeIds:Ve,isAddFormVisible:Ct.isAddFormVisible,formData:Ct.formData,onStateChange:Ut}),re&&l.jsx(OR,{attachments:tt,onAttachmentsChange:nt,itemId:c?e:void 0}),l.jsx(kR,{optionalSystemFields:w,visibleFieldKeys:Q,optionalSections:Vt,callbacks:{onAddSystemField:Ra,onAddCustomField:jn}}),c&&l.jsx($u,{isOpen:S,onClose:()=>O(!1),title:r("items.deleteItemTitle"),message:r("items.deleteItemConfirm"),confirmText:r("common.delete"),cancelText:r("common.cancel"),onConfirm:On,variant:"danger"})]})},vU=({itemId:r})=>{const{t:e}=Ze(),[a,i]=I.useState([]),[s,c]=I.useState(!0),d=zt(),m=f=>{try{const g=f.Blob instanceof Uint8Array?f.Blob:new Uint8Array(f.Blob),E=new Blob([g]),p=URL.createObjectURL(E),N=document.createElement("a");N.href=p,N.download=f.Filename,document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(p)}catch(g){console.error("Error downloading attachment:",g)}};return I.useEffect(()=>{(async()=>{if(!(!(d!=null&&d.sqliteClient)||!r))try{const g=d.sqliteClient.settings.getAttachmentsForItem(r);i(g)}catch(g){console.error("Error loading attachments:",g)}finally{c(!1)}})()},[r,d==null?void 0:d.sqliteClient]),s?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.attachments")}),e("common.loadingAttachments")]}):a.length===0?null:l.jsx("div",{className:"mb-4",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.attachments")}),l.jsx("div",{className:"grid grid-cols-1 gap-2",children:a.map(f=>l.jsx("button",{className:"w-full text-left p-2 ps-3 pe-3 rounded bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",onClick:()=>m(f),"aria-label":`Download ${f.Filename}`,children:l.jsxs("div",{className:"flex justify-between items-center gap-2",children:[l.jsx("div",{className:"flex items-center flex-1",children:l.jsxs("div",{className:"flex flex-col",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:f.Filename}),l.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(f.CreatedAt).toLocaleDateString()})]})}),l.jsx("div",{className:"flex items-center",children:l.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v2a2 2 0 002 2h12a2 2 0 002-2v-2M7 10l5 5m0 0l5-5m-5 5V4"})})})]})},f.Id))})]})})};class CU{constructor(){Qe(this,"currentCopiedId","");Qe(this,"onCopyCallbacks",[])}setCopied(e){this.currentCopiedId=e,this.notifySubscribers()}getCopiedId(){return this.currentCopiedId}subscribe(e){return this.onCopyCallbacks.push(e),()=>{this.onCopyCallbacks=this.onCopyCallbacks.filter(a=>a!==e)}}notifySubscribers(){this.onCopyCallbacks.forEach(e=>e(this.currentCopiedId))}}const Tu=new CU,Mf=({name:r})=>{switch(r){case"visibility":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),l.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return l.jsxs(l.Fragment,{children:[l.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),l.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"copy":return l.jsxs(l.Fragment,{children:[l.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),l.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]});case"check":return l.jsx(l.Fragment,{children:l.jsx("polyline",{points:"20 6 9 17 4 12"})});default:return null}},zu=({id:r,label:e,value:a,type:i="text",labelSuffix:s})=>{const{t:c}=Ze(),[d,m]=I.useState(!1),[f,g]=I.useState(!1);I.useEffect(()=>{const p=Tu.subscribe(N=>{g(N===r)});return()=>{p()}},[r]);const E=async()=>{try{await navigator.clipboard.writeText(a),Tu.setCopied(r),await ft("CLIPBOARD_COPIED",{value:a},"background"),setTimeout(()=>{Tu.getCopiedId()===r&&Tu.setCopied("")},2e3)}catch(p){console.error("Failed to copy text:",p)}};return l.jsxs("div",{children:[l.jsxs("label",{htmlFor:r,className:"block mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,s]}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:i==="password"&&!d?"password":"text",id:r,readOnly:!0,value:a,onClick:E,className:`w-full px-3 py-2.5 bg-white border ${f?"border-green-500 border-2":"border-gray-300"} text-gray-900 text-sm rounded-lg shadow-sm focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400`}),l.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:[f?l.jsx("button",{type:"button",className:"p-1 text-green-500 dark:text-green-400 transition-colors duration-200",title:c("common.copied"),children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(Mf,{name:"check"})})}):l.jsx("button",{type:"button",onClick:E,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:c("common.copyToClipboard"),children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(Mf,{name:"copy"})})}),i==="password"&&l.jsx("button",{type:"button",onClick:()=>m(!d),className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:c(d?"common.hidePassword":"common.showPassword"),children:l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx(Mf,{name:d?"visibility-off":"visibility"})})})]})]})]})},NU=({isOpen:r,onClose:e,itemId:a,fieldKey:i,fieldLabel:s,fieldType:c,isHidden:d})=>{const{t:m}=Ze(),f=zt(),{executeVaultMutationAsync:g}=Ts(),[E,p]=I.useState([]),[N,v]=I.useState(!0),[x,T]=I.useState(null),k=d||c===aa.Password||c===aa.Hidden,L=I.useCallback(async()=>{if(f!=null&&f.sqliteClient)try{v(!0);const M=f.sqliteClient.items.getFieldHistory(a,i);p(M)}catch(M){console.error("Error loading field history:",M)}finally{v(!1)}},[f==null?void 0:f.sqliteClient,a,i]);I.useEffect(()=>{r&&L()},[r,f==null?void 0:f.sqliteClient,a,i,L]);const B=M=>{try{return new Date(M).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return M}},S=M=>{try{return JSON.parse(M)}catch{return[M]}},O=async M=>{if(f!=null&&f.sqliteClient)try{await g(async()=>{await f.sqliteClient.items.deleteFieldHistory(M)}),L(),T(null)}catch(P){console.error("Error deleting field history:",P)}};return l.jsx(Zn,{isOpen:r,onClose:e,title:`${s} ${m("items.history")}`,maxWidth:"max-w-2xl",bodyClassName:"px-4 pb-4 pt-4 overflow-y-auto max-h-[60vh]",children:N?l.jsx("div",{className:"flex items-center justify-center py-8",children:l.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):E.length===0?l.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:m("items.noHistoryAvailable")}):l.jsx("div",{className:"space-y-3",children:E.map(M=>{const P=S(M.ValueSnapshot),G=x===M.Id;return l.jsxs("div",{className:"rounded-lg p-4 border border-gray-200 dark:border-gray-700",children:[l.jsxs("div",{className:"flex items-center justify-between mb-2",children:[l.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:B(M.ChangedAt)}),G?l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{type:"button",onClick:()=>O(M.Id),className:"text-xs px-2 py-1 text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 font-medium",children:m("common.confirm")}),l.jsx("button",{type:"button",onClick:()=>T(null),className:"text-xs px-2 py-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",children:m("common.cancel")})]}):l.jsx("button",{type:"button",onClick:()=>T(M.Id),className:"text-xs px-2 py-1 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 transition-colors",title:m("common.delete"),children:l.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})})})]}),P.map((H,z)=>l.jsx("div",{className:"mt-2",children:l.jsx(zu,{id:`history-${M.Id}-${z}`,label:"",value:H,type:k?"password":"text"})},z))]},M.Id)})})})},XE=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/g,wU=r=>{const e=[];let a=0,i;for(XE.lastIndex=0;(i=XE.exec(r))!==null;){i.index>a&&e.push({type:"text",content:r.slice(a,i.index)});const s=i[0],c=s.startsWith("http")?s:`http://${s}`;e.push({type:"url",content:s,href:c}),a=i.index+s.length}return a<r.length&&e.push({type:"text",content:r.slice(a)}),e},xU=({text:r})=>{const e=wU(r);return l.jsx(l.Fragment,{children:e.map((a,i)=>a.type==="url"?l.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300",children:a.content},i):l.jsx(sd.Fragment,{children:a.content},i))})},uo=({field:r,itemId:e,hideLabel:a=!1})=>{const{t:i}=Ze(),s=zt(),[c,d]=I.useState(!1),[m,f]=I.useState(0),g=r.IsCustomField?r.Label||r.FieldKey:i(`fieldLabels.${r.FieldKey}`,{defaultValue:r.FieldKey}),E=r.EnableHistory===!0;if(I.useEffect(()=>{if(E&&e&&(s!=null&&s.sqliteClient))try{const T=s.sqliteClient.items.getFieldHistory(e,r.FieldKey);if(T.length>1)f(T.length);else if(T.length===1){const k=Array.isArray(r.Value)?r.Value:[r.Value],L=JSON.stringify(k.filter(S=>S&&S.trim()!=="")),B=T[0].ValueSnapshot;f(L!==B?1:0)}else f(0)}catch(T){console.error("[FieldBlock] Error checking history:",T)}},[E,e,r.FieldKey,r.Value,s==null?void 0:s.sqliteClient]),!r.Value||typeof r.Value=="string"&&r.Value.trim()==="")return null;const p=Array.isArray(r.Value)?r.Value:[r.Value];if(p.length>1)return l.jsx("div",{className:"space-y-2",children:p.map((T,k)=>l.jsx(zu,{id:`${r.FieldKey}-${k}`,label:k===0?g:`${g} ${k+1}`,value:T,type:r.FieldType===aa.Password?"password":"text"},`${r.FieldKey}-${k}`))});const N=p[0],v=m>0&&e?l.jsx("button",{type:"button",onClick:()=>d(!0),className:"ml-2 inline-flex items-center text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 focus:outline-none",title:i("items.viewHistory"),children:l.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})}):null,x=c&&e?l.jsx(NU,{isOpen:c,onClose:()=>d(!1),itemId:e,fieldKey:r.FieldKey,fieldLabel:g,fieldType:r.FieldType,isHidden:r.IsHidden}):null;switch(r.FieldType){case aa.Password:case aa.Hidden:return l.jsxs(l.Fragment,{children:[l.jsx(zu,{id:r.FieldKey,label:g,value:N,type:"password",labelSuffix:v}),x]});case aa.TextArea:return l.jsxs("div",{children:[!a&&l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:g}),l.jsx("div",{className:"p-4 bg-gray-50 rounded-lg dark:bg-gray-700",children:l.jsx("p",{className:"text-gray-900 dark:text-gray-100 whitespace-pre-wrap",children:l.jsx(xU,{text:N})})})]});case aa.Email:case aa.URL:case aa.Phone:case aa.Date:case aa.Number:case aa.Text:default:return l.jsxs(l.Fragment,{children:[l.jsx(zu,{id:r.FieldKey,label:g,value:N,type:"text",labelSuffix:v}),x]})}},TU=({itemId:r})=>{const{t:e}=Ze(),[a,i]=I.useState([]),[s,c]=I.useState(!0),[d,m]=I.useState({}),[f,g]=I.useState(null),E=zt(),p=(T=30)=>{const k=new Ia({secret:"dummy",algorithm:"SHA1",digits:6,period:T});return k.period-Math.floor(Date.now()/1e3)%k.period},N=()=>{const T=p();return Math.floor((30-T)/30*100)},v=T=>{try{return new Ia({secret:T,algorithm:"SHA1",digits:6,period:30}).generate()}catch(k){return console.error("Error generating TOTP code:",k),"Error"}},x=async(T,k)=>{try{await navigator.clipboard.writeText(T),g(k),await ft("CLIPBOARD_COPIED",{value:T},"background"),setTimeout(()=>{g(null)},2e3)}catch(L){console.error("Failed to copy:",L)}};return I.useEffect(()=>{(async()=>{if(!(!(E!=null&&E.sqliteClient)||!r))try{const k=E.sqliteClient.settings.getTotpCodesForItem(r);i(k)}catch(k){console.error("Error loading TOTP codes:",k)}finally{c(!1)}})()},[r,E==null?void 0:E.sqliteClient]),I.useEffect(()=>{const T=B=>{const S={};return a.forEach(O=>{const M=v(O.SecretKey);M!=="Error"?S[O.Id]=M:S[O.Id]=B[O.Id]??"Error"}),S},k={};a.forEach(B=>{k[B.Id]=v(B.SecretKey)}),m(k);const L=setInterval(()=>{m(T)},1e3);return()=>{clearInterval(L)}},[a]),s?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.twoFactorAuthentication")}),e("common.loadingTotpCodes")]}):a.length===0?null:l.jsx("div",{className:"mb-4",children:l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.twoFactorAuthentication")}),l.jsx("div",{className:"grid grid-cols-1 gap-2",children:a.map(T=>l.jsx("button",{className:"w-full text-left p-2 ps-3 pe-3 rounded bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700",onClick:()=>x(d[T.Id],T.Id),"aria-label":`Copy ${T.Name} code`,children:l.jsxs("div",{className:"flex justify-between items-center gap-2",children:[l.jsx("div",{className:"flex items-center flex-1",children:l.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:T.Name})}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("div",{className:"flex flex-col items-end",children:[l.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:d[T.Id]}),l.jsx("div",{className:"text-xs",children:f===T.Id?l.jsx("span",{className:"text-green-600 dark:text-green-400",children:e("common.copied")}):l.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[p(),"s"]})})]}),l.jsx("div",{className:"w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600",children:l.jsx("div",{className:"bg-blue-600 rounded-full transition-all",style:{height:`${N()}%`,width:"100%"}})})]})]})},T.Id))})]})})};var Qu={Placeholder:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <circle cx="10" cy="10" r="6.5" fill="none" stroke="#f49541" stroke-width="2.5"/>
  <circle cx="10" cy="10" r="2.5" fill="none" stroke="#f49541" stroke-width="2"/>
  <path d="M15 15L27 27" stroke="#f49541" stroke-width="2.5" stroke-linecap="round"/>
  <path d="M19 19L23 15" stroke="#f49541" stroke-width="2.5" stroke-linecap="round"/>
  <path d="M24 24L28 20" stroke="#f49541" stroke-width="2.5" stroke-linecap="round"/>
</svg>`,Note:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path d="M8 4C6.9 4 6 4.9 6 6V26C6 27.1 6.9 28 8 28H24C25.1 28 26 27.1 26 26V11L19 4H8Z" fill="#f49541"/>
  <path d="M19 4V11H26L19 4Z" fill="#d68338"/>
  <rect x="10" y="14" width="12" height="1.5" rx="0.75" fill="#ffe096"/>
  <rect x="10" y="18" width="10" height="1.5" rx="0.75" fill="#ffe096"/>
  <rect x="10" y="22" width="8" height="1.5" rx="0.75" fill="#ffe096"/>
</svg>`,CreditCard:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <rect x="2" y="11" width="28" height="4" fill="#d68338"/>
  <rect x="5" y="18" width="8" height="2" rx="1" fill="#ffe096"/>
  <rect x="5" y="22" width="5" height="1.5" rx="0.75" fill="#fbcb74"/>
</svg>`,Visa:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <path d="M13.5 13L11.5 19H10L8.5 14.5C8.5 14.5 8.35 14 8 14C7.65 14 7 13.8 7 13.8L7.05 13.5H9.5C9.85 13.5 10.15 13.75 10.2 14.1L10.8 17L12.5 13.5H13.5V13ZM15 19H14L15 13H16L15 19ZM20 13.5C20 13.5 19.4 13.3 18.7 13.3C17.35 13.3 16.4 14 16.4 15C16.4 15.8 17.1 16.2 17.65 16.5C18.2 16.8 18.4 17 18.4 17.2C18.4 17.5 18.05 17.7 17.6 17.7C17 17.7 16.5 17.5 16.5 17.5L16.3 18.7C16.3 18.7 16.9 19 17.7 19C19.2 19 20.1 18.2 20.1 17.1C20.1 15.7 18.4 15.6 18.4 15C18.4 14.7 18.7 14.5 19.15 14.5C19.6 14.5 20.1 14.7 20.1 14.7L20.3 13.5H20V13.5ZM24 19L23.1 13.5H22C21.7 13.5 21.45 13.7 21.35 13.95L19 19H20.5L20.8 18H22.7L22.9 19H24ZM21.2 17L22 14.5L22.45 17H21.2Z" fill="#ffe096"/>
</svg>`,Mastercard:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <circle cx="13" cy="16" r="5" fill="#d68338"/>
  <circle cx="19" cy="16" r="5" fill="#ffe096"/>
  <path d="M16 12.5C17.1 13.4 17.8 14.6 17.8 16C17.8 17.4 17.1 18.6 16 19.5C14.9 18.6 14.2 17.4 14.2 16C14.2 14.6 14.9 13.4 16 12.5Z" fill="#fbcb74"/>
</svg>`,Amex:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <text x="16" y="18" text-anchor="middle" fill="#ffe096" font-size="8" font-weight="bold" font-family="Arial, sans-serif">AMEX</text>
</svg>`,Discover:`<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
  <rect x="2" y="6" width="28" height="20" rx="3" fill="#f49541"/>
  <circle cx="20" cy="16" r="4" fill="#ffe096"/>
  <path d="M7 14H8.5C9.3 14 10 14.7 10 15.5C10 16.3 9.3 17 8.5 17H7V14Z" fill="#ffe096"/>
  <rect x="11" y="14" width="1.5" height="3" fill="#ffe096"/>
  <path d="M14 15C14 14.4 14.4 14 15 14C15.3 14 15.5 14.1 15.7 14.3L16.5 13.5C16.1 13.2 15.6 13 15 13C13.9 13 13 13.9 13 15C13 16.1 13.9 17 15 17C15.6 17 16.1 16.8 16.5 16.5L15.7 15.7C15.5 15.9 15.3 16 15 16C14.4 16 14 15.6 14 15Z" fill="#ffe096"/>
</svg>`};const _f=({svg:r,className:e="w-8 h-8"})=>l.jsx("div",{className:`${e} flex-shrink-0`,dangerouslySetInnerHTML:{__html:r}}),SU=r=>{if(!r)return"CreditCard";const e=r.replace(/[\s-]/g,"");return/^\d{4,}/.test(e)?/^4/.test(e)?"Visa":/^5[1-5]/.test(e)||/^2[2-7]/.test(e)?"Mastercard":/^3[47]/.test(e)?"Amex":/^6(?:011|22|4[4-9]|5)/.test(e)?"Discover":"CreditCard":"CreditCard"},kU=r=>Qu[SU(r)],ZI=({item:r,className:e="w-8 h-8"})=>{var i;if(r.ItemType===ma.Note)return l.jsx(_f,{svg:Qu.Note,className:e});if(r.ItemType===ma.CreditCard){const s=(i=r.Fields)==null?void 0:i.find(d=>d.FieldKey===Za.CardNumber),c=s!=null&&s.Value?Array.isArray(s.Value)?s.Value[0]:s.Value:void 0;return l.jsx(_f,{svg:kU(c),className:e})}const a=r.Logo&&r.Logo.length>0?Jf.imgSrcFromBytes(r.Logo):null;return a?l.jsx("img",{src:a,alt:r.Name||"Item",className:`${e} flex-shrink-0`,onError:s=>{const c=s.target;c.style.display="none";const d=c.parentElement;if(d){const m=document.createElement("div");m.className=e,m.innerHTML=Qu.Placeholder,d.insertBefore(m,c)}}}):l.jsx(_f,{svg:Qu.Placeholder,className:e})},LU=({email:r})=>{const{t:e}=Ze(),[a,i]=I.useState([]),[s,c]=I.useState([]),[d,m]=I.useState(!0),[f,g]=I.useState(0),[E,p]=I.useState(!1),[N,v]=I.useState(null),[x,T]=I.useState(!1),[k,L]=I.useState(2),B=ur(),S=zt(),O=3,M=k<a.length,P=(V,K)=>{const $=V.slice(0,K);c($)},G=()=>{const V=Math.min(k+O,a.length);L(V),P(a,V)},H=async V=>(await Hl("local:publicEmailDomains")??[]).some($=>V.toLowerCase().endsWith(`@${$.toLowerCase()}`)),z=async V=>(await Hl("local:privateEmailDomains")??[]).some($=>V.toLowerCase().endsWith(`@${$.toLowerCase()}`));return I.useEffect(()=>{const V=async()=>{var $;try{if(S.isOffline){m(!1);return}v(null);const W=await H(r),ne=await z(r),he=W||ne;if(p(W),T(he),!he)return;if(W){const q=r.split("@")[0],re=await fetch(`https://api.spamok.com/v2/EmailBox/${q}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":en.VERSION}});if(!re.ok){v(e("common.errors.unknownError"));return}const Ee=await re.json(),pe=(($=Ee==null?void 0:Ee.mails)==null?void 0:$.toSorted((j,X)=>new Date(X.dateSystem).getTime()-new Date(j.dateSystem).getTime()))??[];d&&pe.length>0&&g(pe[0].id),i(j=>JSON.stringify(j.map(ee=>ee.id))!==JSON.stringify(pe.map(ee=>ee.id))?(P(pe,k),pe):j)}else if(ne)try{const q=await B.authFetch(`EmailBox/${r}`,{method:"GET"},!0,!1);try{const Ee=q.mails.toSorted((pe,j)=>new Date(j.dateSystem).getTime()-new Date(pe.dateSystem).getTime());if(Ee){const pe=await Ft.decryptEmailList(Ee,S.sqliteClient.settings.getAllEncryptionKeys());d&&pe.length>0&&g(pe[0].id),i(j=>JSON.stringify(j.map(ee=>ee.id))!==JSON.stringify(pe.map(ee=>ee.id))?(P(pe,k),pe):j),v(null)}}catch{const re=q;if(S.shouldSuppressEmailErrors())return;v(e("emails.apiErrors."+(re==null?void 0:re.code)));return}}catch{if(S.shouldSuppressEmailErrors())return;v(e("common.errors.unknownError"));return}}catch(W){console.error("Error loading emails:",W),v(e("common.errors.unknownError"))}m(!1)};V();const K=setInterval(V,2e3);return()=>clearInterval(K)},[r,d,B,S,e,k]),x?S.isOffline?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2",children:l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),l.jsx("p",{className:"text-sm",children:e("emails.offlineMessage")})]}):N?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2",children:l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),l.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded",children:l.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:N})})]}):d?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),l.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("common.loadingEmails")]}):a.length===0?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4 text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),l.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("emails.noEmails")]}):l.jsxs("div",{className:"space-y-2 mb-4",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),l.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),s.map(V=>E?l.jsxs("a",{href:`https://spamok.com/${r.split("@")[0]}/${V.id}`,target:"_blank",rel:"noopener noreferrer",className:`flex justify-between items-center p-2 ps-3 pe-3 rounded cursor-pointer bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 ${V.id>f?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[l.jsx("div",{className:"truncate flex-1",children:l.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[V.subject.substring(0,30),V.subject.length>30?"...":""]})}),l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(V.dateSystem).toLocaleDateString()})]},V.id):l.jsxs(ud,{to:`/emails/${V.id}`,className:`flex justify-between items-center p-2 ps-3 pe-3 rounded cursor-pointer bg-white dark:bg-gray-800 shadow hover:shadow-md transition-all border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 ${V.id>f?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[l.jsx("span",{className:"truncate flex-1",children:l.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[V.subject.substring(0,30),V.subject.length>30?"...":""]})}),l.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(V.dateSystem).toLocaleDateString()})]},V.id)),M&&l.jsxs("button",{onClick:G,className:"w-full mt-2 py-1 px-3 bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-md transition-colors duration-200 text-sm text-gray-600 dark:text-gray-300 hover:text-gray-800 dark:hover:text-gray-100 flex items-center justify-center gap-1",children:[l.jsx("span",{children:e("common.loadMore")}),l.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}):null},RU=()=>{const{t:r}=Ze(),{id:e}=ld(),a=La(),i=zt(),[s,c]=I.useState(null),{setIsInitialLoading:d}=fa(),{setHeaderButtons:m}=mr(),f=I.useCallback(()=>{pa.openInNewPopup(`/items/${e}`)},[e]),g=I.useCallback(()=>{a(`/items/${e}/edit`)},[e,a]);if(I.useEffect(()=>{if(pa.isPopup()&&(window.history.replaceState({},"","popup.html#/items"),window.history.pushState({},"",`popup.html#/items/${e}`)),!(!(i!=null&&i.sqliteClient)||!e))try{const v=i.sqliteClient.items.getById(e);v?(c(v),d(!1)):(console.error("Item not found"),a("/items"))}catch(v){console.error("Error loading item:",v)}},[i.sqliteClient,e,a,d]),I.useEffect(()=>{const v=l.jsxs("div",{className:"flex items-center gap-2",children:[!pa.isPopup()&&l.jsx(wn,{onClick:f,title:r("common.openInNewWindow"),iconType:Fa.EXPAND}),l.jsx(wn,{onClick:g,title:r("items.editItem"),iconType:Fa.EDIT})]});return m(v),()=>{}},[m,g,f,r]),I.useEffect(()=>()=>m(null),[m]),!s)return l.jsx("div",{children:r("common.loading")});const E=s.Fields.filter(v=>v.FieldType===aa.URL&&v.Value),p={...s,Fields:s.Fields.filter(v=>v.FieldType!==aa.URL)},N=Ok(p);return l.jsxs("div",{className:"space-y-4",children:[l.jsx("div",{className:"flex justify-between items-start",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(ZI,{item:s,className:"w-12 h-12 rounded-lg"}),l.jsxs("div",{children:[l.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.Name||r("items.untitled")}),E.length>0&&l.jsx("div",{className:"mt-1 space-y-1",children:E.flatMap(v=>(Array.isArray(v.Value)?v.Value:[v.Value]).map((T,k)=>/^https?:\/\//i.test(T)?l.jsx("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"block text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300 break-all text-sm",children:T},`${v.FieldKey}-${k}`):l.jsx("span",{className:"block text-gray-500 dark:text-gray-300 break-all text-sm",children:T},`${v.FieldKey}-${k}`)))})]})]})}),(s.ItemType===ma.Login||s.ItemType===ma.Alias)&&(()=>{const v=s.Fields.find(k=>k.FieldKey==="login.email"),x=v==null?void 0:v.Value,T=Array.isArray(x)?x[0]:x;return T?l.jsx(LU,{email:T}):null})(),(s.ItemType===ma.Login||s.ItemType===ma.Alias)&&l.jsx(TU,{itemId:s.Id}),(s.ItemType===ma.Login||s.ItemType===ma.Alias)&&s.HasPasskey&&l.jsx(jR,{itemId:s.Id}),s.ItemType===ma.Note&&N[ut.Notes]&&N[ut.Notes].length>0&&N[ut.Notes].map(v=>l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r(`fieldLabels.${v.FieldKey}`,{defaultValue:v.Label||v.FieldKey})}),l.jsx(uo,{field:v,itemId:s.Id,hideLabel:!0})]},v.FieldKey)),Object.keys(N).length>0&&l.jsxs(l.Fragment,{children:[N[ut.Login]&&N[ut.Login].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r("common.credentials")}),N[ut.Login].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]}),N[ut.Alias]&&N[ut.Alias].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r("common.alias")}),N[ut.Alias].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]}),N[ut.Card]&&N[ut.Card].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r("items.cardInformation")}),N[ut.Card].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]}),s.ItemType!==ma.Note&&N[ut.Notes]&&N[ut.Notes].length>0&&N[ut.Notes].map(v=>l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r(`fieldLabels.${v.FieldKey}`,{defaultValue:v.Label||v.FieldKey})}),l.jsx(uo,{field:v,itemId:s.Id,hideLabel:!0})]},v.FieldKey)),N[ut.Custom]&&N[ut.Custom].length>0&&l.jsxs("div",{className:"space-y-2",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:r("common.customFields")}),N[ut.Custom].map(v=>l.jsx(uo,{field:v,itemId:s.Id},v.FieldKey))]})]}),l.jsx(vU,{itemId:s.Id}),s.Tags&&s.Tags.length>0&&l.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-4",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:r("items.tags")}),l.jsx("div",{className:"flex flex-wrap gap-2",children:s.Tags.map(v=>l.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:v.Name},v.Id))})]})]})},DU=({isOpen:r,onClose:e,onDeleteFolderOnly:a,onDeleteFolderAndContents:i,itemCount:s})=>{const{t:c}=Ze(),[d,m]=I.useState(!1),f=async()=>{m(!0);try{await a(),e()}catch(p){console.error("Error deleting folder:",p)}finally{m(!1)}},g=async()=>{m(!0);try{await i(),e()}catch(p){console.error("Error deleting folder with contents:",p)}finally{m(!1)}},E=()=>{d||e()};return l.jsx(Zn,{isOpen:r,onClose:E,title:c("items.deleteFolder"),footer:l.jsx("div",{className:"flex justify-end",children:l.jsx("button",{type:"button",onClick:E,disabled:d,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50",children:c("common.cancel")})}),children:l.jsx("div",{className:"space-y-4",children:l.jsxs("div",{className:"space-y-3 pt-2",children:[l.jsx("button",{type:"button",onClick:f,disabled:d,className:"w-full p-3 text-left border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors disabled:opacity-50",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"mt-0.5 text-orange-500",children:l.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"}),l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 14l2 2 4-4"})]})}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:c("items.deleteFolderKeepItems")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:c("items.deleteFolderKeepItemsDescription")})]})]})}),s>0&&l.jsx("button",{type:"button",onClick:g,disabled:d,className:"w-full p-3 text-left border border-red-300 dark:border-red-700 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors disabled:opacity-50",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx("div",{className:"mt-0.5 text-red-500",children:l.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.jsx("polyline",{points:"3 6 5 6 21 6"}),l.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}),l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-red-600 dark:text-red-400",children:c("items.deleteFolderAndItems")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:c("items.deleteFolderAndItemsDescription",{count:s})})]})]})})]})})})},$E=({isOpen:r,onClose:e,onSave:a,initialName:i="",mode:s})=>{const{t:c}=Ze(),[d,m]=I.useState(i),[f,g]=I.useState(!1),[E,p]=I.useState(null);I.useEffect(()=>{r&&(m(i),p(null))},[r,i]);const N=async v=>{v.preventDefault();const x=d.trim();if(!x){p(c("items.folderNameRequired"));return}g(!0),p(null);try{await a(x),e()}catch(T){p(c("common.errors.unknownErrorTryAgain")),console.error("Error saving folder:",T)}finally{g(!1)}};return l.jsx(Zn,{isOpen:r,onClose:e,title:c(s==="create"?"items.createFolder":"items.editFolder"),footer:l.jsxs("div",{className:"flex justify-end gap-3",children:[l.jsx("button",{type:"button",onClick:e,disabled:f,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50",children:c("common.cancel")}),l.jsx("button",{type:"submit",form:"folder-form",disabled:f,className:"px-4 py-2 text-sm font-medium text-white bg-orange-600 hover:bg-orange-700 rounded focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-orange-500 disabled:opacity-50",children:c(f?"common.saving":s==="create"?"common.create":"common.save")})]}),children:l.jsxs("form",{id:"folder-form",onSubmit:N,children:[l.jsx("label",{htmlFor:"folderName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:c("items.folderName")}),l.jsx("input",{id:"folderName",type:"text",value:d,onChange:v=>m(v.target.value),autoFocus:!0,className:"w-full p-2 border dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-blue-500 focus:border-blue-500"}),E&&l.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:E})]})})},ZE=({folder:r,onClick:e})=>l.jsxs("button",{onClick:e,className:"inline-flex items-center gap-1.5 px-3 py-1.5 bg-white dark:bg-gray-700/50 hover:bg-gray-50 dark:hover:bg-gray-600/50 border border-gray-200 dark:border-gray-600 rounded-full text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-orange-500/50",children:[l.jsx("svg",{className:"w-3.5 h-3.5 text-orange-500 dark:text-orange-400 flex-shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:l.jsx("path",{d:"M10 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2z"})}),l.jsx("span",{className:"text-gray-700 dark:text-gray-200 font-medium truncate max-w-[120px]",children:r.name}),r.itemCount>0&&l.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-xs",children:r.itemCount})]}),BU=({item:r,showFolderPath:e=!1})=>{const{t:a}=Ze(),i=La(),s=d=>{var g,E;let m="";const f=(g=d.Fields)==null?void 0:g.find(p=>p.FieldKey===Za.LoginUsername);if(f&&f.Value&&(m=Array.isArray(f.Value)?f.Value[0]:f.Value),!m){const p=(E=d.Fields)==null?void 0:E.find(N=>N.FieldKey===Za.LoginEmail);p&&p.Value&&(m=Array.isArray(p.Value)?p.Value[0]:p.Value)}return m.length>33?m.slice(0,30)+"...":m},c=d=>{let m=a("items.untitled");return d.Name&&(m=d.Name),m.length>33?m.slice(0,30)+"...":m};return l.jsx("li",{children:l.jsxs("button",{onClick:()=>i(`/items/${r.Id}`),className:"w-full p-2 border dark:border-gray-600 rounded flex items-center bg-white dark:bg-gray-800 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[l.jsx("div",{className:"w-8 h-8 mr-2 flex-shrink-0",children:l.jsx(ZI,{item:r,className:"w-8 h-8"})}),l.jsxs("div",{className:"text-left flex-1",children:[l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e&&r.FolderPath?l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"text-gray-500 dark:text-gray-400 text-sm",children:[r.FolderPath," > "]}),c(r)]}):c(r)}),r.HasPasskey&&l.jsx("svg",{className:"w-3.5 h-3.5 text-gray-500 dark:text-gray-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-label":"Has passkey",children:l.jsx("path",{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"})}),r.HasAttachment&&l.jsx("svg",{className:"w-3.5 h-3.5 text-gray-500 dark:text-gray-400",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-label":"Has attachments",children:l.jsx("path",{d:"M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"})}),r.HasTotp&&l.jsx("svg",{className:"w-3.5 h-3.5 text-gray-500 dark:text-gray-400",viewBox:"0 -960 960 960",fill:"currentColor","aria-label":"Has 2FA",children:l.jsx("path",{d:"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm100-200h46v-240h-36l-70 50 24 36 36-26v180Zm124 0h156v-40h-94l-2-2q21-20 34.5-34t21.5-22q18-18 27-36t9-38q0-29-22-48.5T458-600q-26 0-47 15t-29 39l40 16q5-13 14.5-20.5T458-558q15 0 24.5 8t9.5 20q0 11-4 20.5T470-486l-32 32-54 54v40Zm296 0q36 0 58-20t22-52q0-18-10-32t-28-22v-2q14-8 22-20.5t8-29.5q0-27-21-44.5T678-600q-25 0-46.5 14.5T604-550l40 16q4-12 13-19t21-7q13 0 21.5 7.5T708-534q0 14-10 22t-26 8h-18v40h20q20 0 31 8t11 22q0 13-11 22.5t-25 9.5q-17 0-26-7.5T638-436l-40 16q7 29 28.5 44.5T680-360ZM160-240h640v-480H160v480Zm0 0v-480 480Z"})})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:s(r)})]})]})})},yo="items-filter",UU=5*60*1e3,MU=[{value:"OldestFirst",labelKey:"items.sort.oldestFirst"},{value:"NewestFirst",labelKey:"items.sort.newestFirst"},{value:"Alphabetical",labelKey:"items.sort.alphabetical"}],_U=()=>{try{const r=localStorage.getItem(yo);if(!r)return"all";const{filter:e,timestamp:a}=JSON.parse(r);return Date.now()-a>UU?(localStorage.removeItem(yo),"all"):e}catch{return"all"}},Su=r=>{try{localStorage.setItem(yo,JSON.stringify({filter:r,timestamp:Date.now()}))}catch{}},ku=r=>Object.values(ma).includes(r),eb=()=>{const{t:r}=Ze(),{folderId:e}=ld(),a=Ka(),i=zt(),s=dr(),c=La(),{syncVault:d}=gd(),{executeVaultMutationAsync:m}=Ts(),{setHeaderButtons:f}=mr(),[g,E]=I.useState([]),[p,N]=I.useState(""),[v,x]=I.useState(_U()),[T,k]=I.useState(!1),[L,B]=I.useState(!1),[S,O]=I.useState(!1),[M,P]=I.useState(!1),[G,H]=I.useState(0),[z,V]=I.useState(0),[K,$]=I.useState("OldestFirst"),[W,ne]=I.useState(!1),{setIsInitialLoading:he}=fa(),q=e??null,re=I.useMemo(()=>{if(!q||!(i!=null&&i.sqliteClient))return null;const me=i.sqliteClient.folders.getAll().find(De=>De.Id===q);return(me==null?void 0:me.Name)??null},[q,i==null?void 0:i.sqliteClient,z]),[Ee,pe]=ec(!0,100);I.useEffect(()=>{const Te=a.state;Te!=null&&Te.resetFilters&&(N(""),x("all"),localStorage.removeItem(yo),c(a.pathname,{replace:!0,state:{}}))},[a.state,a.pathname,c]);const j=I.useCallback(()=>{const Te=new URLSearchParams;ku(v)&&Te.set("type",v),q&&Te.set("folderId",q);const me=Te.toString();c(me?`/items/add?${me}`:"/items/add")},[c,v,q]),X=I.useCallback(()=>{B(!0)},[]),ee=I.useCallback(async Te=>{if(!(i!=null&&i.sqliteClient)){console.error("[FOLDER DEBUG] No sqliteClient available");return}await m(async()=>{await i.sqliteClient.folders.create(Te,q)});const me=i.sqliteClient.items.getAll();E(me)},[i,q,m]),ie=I.useCallback(async()=>{if(!(i!=null&&i.sqliteClient)||!q)return;await m(async()=>{await i.sqliteClient.folders.delete(q)});const Te=i.sqliteClient.items.getAll();E(Te);const me=i.sqliteClient.items.getRecentlyDeletedCount();H(me),c("/items")},[i,q,m,c]),ve=I.useCallback(async()=>{if(!(i!=null&&i.sqliteClient)||!q)return;await m(async()=>{await i.sqliteClient.folders.deleteWithContents(q)});const Te=i.sqliteClient.items.getAll();E(Te);const me=i.sqliteClient.items.getRecentlyDeletedCount();H(me),c("/items")},[i,q,m,c]),Ne=I.useCallback(async Te=>{!(i!=null&&i.sqliteClient)||!q||(await m(async()=>{await i.sqliteClient.folders.update(q,Te)}),V(me=>me+1),P(!1))},[i,q,m]),Re=I.useCallback(async()=>{if(i!=null&&i.sqliteClient)try{await d({onSuccess:async Te=>{},onOffline:()=>{},onError:async Te=>{console.error("Error syncing vault:",Te)}})}catch(Te){console.error("Error refreshing items:",Te),await s.logout("Error while syncing vault, please re-authenticate.")}},[i,s,d]),Be=I.useCallback(async()=>{pe(!0),await Re(),pe(!1)},[Re,pe]);I.useEffect(()=>{const Te=l.jsxs("div",{className:"flex items-center gap-2",children:[!pa.isPopup()&&l.jsx(wn,{onClick:()=>pa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Fa.EXPAND}),l.jsx(wn,{onClick:j,title:r("items.addNewItem"),iconType:Fa.PLUS})]});return f(Te),()=>f(null)},[f,j,r]),I.useEffect(()=>{(async()=>{var me,De,Pe;if(i!=null&&i.sqliteClient){pe(!0);const ze=((me=i.sqliteClient)==null?void 0:me.items.getAll())??[];E(ze);const at=((De=i.sqliteClient)==null?void 0:De.items.getRecentlyDeletedCount())??0;H(at);const Ye=((Pe=i.sqliteClient)==null?void 0:Pe.settings.getCredentialsSortOrder())??"OldestFirst";$(Ye),pe(!1),he(!1)}})()},[i==null?void 0:i.sqliteClient,pe,he]);const ke=()=>{if(q&&re)return re;switch(v){case"passkeys":return r("items.filters.passkeys");case"attachments":return r("common.attachments");case"all":return r("items.title");default:if(ku(v)){const Te=td.find(me=>me.type===v);if(Te)return r(Te.titleKey)}return r("items.title")}},Ve=I.useCallback((Te,me)=>{N(""),c(`/items/folder/${Te}`)},[c]),vt=()=>{if(q||p)return[];if(!(i!=null&&i.sqliteClient))return[];const Te=i.sqliteClient.folders.getAll(),me=new Map;return g.forEach(Pe=>{Pe.FolderId&&me.set(Pe.FolderId,(me.get(Pe.FolderId)||0)+1)}),Te.map(Pe=>({id:Pe.Id,name:Pe.Name,itemCount:me.get(Pe.Id)||0})).sort((Pe,ze)=>Pe.name.localeCompare(ze.name))},Ct=g.filter(Te=>{var at,Ye;if(q!==null){if(Te.FolderId!==q)return!1}else if(!p&&Te.FolderId)return!1;let me=!0;if(v==="passkeys"?me=Te.HasPasskey===!0:v==="attachments"?me=Te.HasAttachment===!0:ku(v)&&(me=Te.ItemType===v),!me)return!1;const De=p.toLowerCase().trim();return!!(!De||(((at=Te.Name)==null?void 0:at.toLowerCase())||"").includes(De)||((Ye=Te.Fields)==null?void 0:Ye.some(dt=>(Array.isArray(dt.Value)?dt.Value.join(" ").toLowerCase():(dt.Value||"").toLowerCase()).includes(De)||dt.Label.toLowerCase().includes(De))))}),Ut=I.useMemo(()=>{const Te=[...Ct];switch(K){case"NewestFirst":return Te.sort((me,De)=>new Date(De.CreatedAt||0).getTime()-new Date(me.CreatedAt||0).getTime());case"Alphabetical":return Te.sort((me,De)=>(me.Name||"").localeCompare(De.Name||""));case"OldestFirst":default:return Te.sort((me,De)=>new Date(me.CreatedAt||0).getTime()-new Date(De.CreatedAt||0).getTime())}},[Ct,K]),tt=vt(),nt=g.length>0&&g.every(Te=>Te.FolderId!==null);return Ee?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx($n,{})}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center gap-2 mb-4",children:[l.jsxs("div",{className:"relative min-w-0 flex-1 flex items-center gap-2",children:[nt&&!q?l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl min-w-0",children:l.jsx("span",{className:"truncate",children:r("items.title")})}):l.jsxs("button",{onClick:()=>k(!T),className:"flex items-center gap-1 text-gray-900 dark:text-white text-xl hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none min-w-0",children:[l.jsxs("h2",{className:"flex items-baseline gap-1.5 min-w-0 overflow-hidden",children:[l.jsx("span",{className:"truncate",children:ke()}),l.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400 shrink-0",children:["(",Ct.length,")"]})]}),l.jsx("svg",{className:"w-4 h-4 mt-1 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),q&&l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[l.jsx("button",{onClick:()=>P(!0),title:r("items.editFolder"),className:"p-1.5 text-gray-400 hover:text-orange-500 dark:text-gray-500 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:l.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),l.jsx("button",{onClick:()=>O(!0),title:r("items.deleteFolder"),className:"p-1.5 text-gray-400 hover:text-red-500 dark:text-gray-500 dark:hover:text-red-400 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:l.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[l.jsx("polyline",{points:"3 6 5 6 21 6"}),l.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]}),T&&!(nt&&!q)&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>{k(!1)}}),l.jsx("div",{className:"absolute left-0 top-full mt-1 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-xl ring-1 ring-black/5 dark:ring-white/10 z-20",children:l.jsxs("div",{className:"py-1",children:[l.jsx("button",{onClick:()=>{const Te="all";x(Te),Su(Te),k(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${v==="all"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:r("items.filters.all")}),l.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),td.map(Te=>l.jsxs("button",{onClick:()=>{const me=Te.type;x(me),Su(me),k(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2 ${v===Te.type?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[l.jsx("span",{className:v===Te.type?"text-orange-500 dark:text-orange-400":"text-gray-400 dark:text-gray-500",children:Te.iconSvg}),r(Te.titleKey)]},Te.type)),l.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),l.jsx("button",{onClick:()=>{const Te="passkeys";x(Te),Su(Te),k(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${v==="passkeys"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:r("items.filters.passkeys")}),l.jsx("button",{onClick:()=>{const Te="attachments";x(Te),Su(Te),k(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${v==="attachments"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:r("common.attachments")}),l.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),l.jsxs("button",{onClick:()=>{k(!1),c("/items/deleted")},className:"w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 flex items-center justify-between",children:[l.jsx("span",{children:r("recentlyDeleted.title")}),G>0&&l.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:G})]})]})})]})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsxs("div",{className:"relative",children:[l.jsx("button",{onClick:()=>ne(!W),className:"p-1.5 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",title:r("items.sort.title"),children:l.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("line",{x1:"4",y1:"6",x2:"16",y2:"6"}),l.jsx("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),l.jsx("line",{x1:"4",y1:"18",x2:"8",y2:"18"}),l.jsx("polyline",{points:"15 15 18 18 21 15"}),l.jsx("line",{x1:"18",y1:"12",x2:"18",y2:"18"})]})}),W&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>ne(!1)}),l.jsx("div",{className:"absolute right-0 top-full mt-1 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-xl ring-1 ring-black/5 dark:ring-white/10 z-20",children:l.jsx("div",{className:"py-1",children:MU.map(Te=>l.jsxs("button",{onClick:async()=>{$(Te.value),ne(!1),await m(async()=>{var me;(me=i.sqliteClient)==null||me.settings.setCredentialsSortOrder(Te.value)})},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 flex items-center gap-2 ${K===Te.value?"text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[K===Te.value?l.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("polyline",{points:"20 6 9 17 4 12"})}):l.jsx("span",{className:"w-4"}),l.jsx("span",{children:r(Te.labelKey)})]},Te.value))})})]})]}),l.jsx(lh,{onClick:Be})]})]}),g.length>0?l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"text",value:p,onChange:Te=>N(Te.target.value),placeholder:`${r("content.searchVault")}`,autoFocus:!0,className:"w-full p-2 border dark:border-gray-600 rounded bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-blue-500 focus:border-blue-500"})}):l.jsx(l.Fragment,{}),g.length===0?l.jsx(l.Fragment,{children:l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[l.jsx("p",{children:r("items.welcomeTitle")}),l.jsx("p",{children:r("items.welcomeDescription")})]})}):Ct.length===0&&tt.length===0&&!nt?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-3 mb-10",children:[(v!=="all"||p)&&l.jsxs(l.Fragment,{children:[l.jsx("p",{children:p&&v!=="all"?r("items.noMatchingItemsWithFilter",{filter:ke(),search:p}):p?r("items.noMatchingItemsSearch",{search:p}):v==="passkeys"?r("items.noPasskeysFound"):v==="attachments"?r("items.noAttachmentsFound"):ku(v)?r("items.noItemsOfTypeFound",{type:ke()}):r("items.noMatchingItems")}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[p&&l.jsxs("button",{onClick:()=>N(""),className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),r("items.clearSearch")]}),v!=="all"&&l.jsxs("button",{onClick:()=>{x("all"),localStorage.removeItem(yo)},className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-orange-100 dark:bg-orange-900/30 hover:bg-orange-200 dark:hover:bg-orange-900/50 text-orange-700 dark:text-orange-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),r("items.clearFilter")]})]})]}),q&&l.jsx("p",{className:"text-sm",children:r("items.emptyFolderHint")})]}):nt&&Ct.length===0&&!q&&!p?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[tt.map(Te=>l.jsx(ZE,{folder:Te,onClick:()=>Ve(Te.id,Te.name)},Te.id)),l.jsxs("button",{onClick:X,className:"inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none text-gray-500 dark:text-gray-400 hover:text-orange-600 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700/50",children:[l.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})]})]}),l.jsx("div",{className:"text-gray-500 dark:text-gray-400 text-sm",children:l.jsx("p",{children:r("items.allItemsInFolders")})})]}):l.jsxs(l.Fragment,{children:[!q&&!p&&l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[tt.map(Te=>l.jsx(ZE,{folder:Te,onClick:()=>Ve(Te.id,Te.name)},Te.id)),l.jsxs("button",{onClick:X,className:`inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none ${tt.length>0?"text-gray-500 dark:text-gray-400 hover:text-orange-600 dark:hover:text-orange-400 hover:bg-gray-100 dark:hover:bg-gray-700/50":"text-gray-400 dark:text-gray-500 border border-dashed border-gray-300 dark:border-gray-600 hover:border-orange-400 dark:hover:border-orange-500 hover:text-orange-600 dark:hover:text-orange-400"}`,children:[l.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),l.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[l.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),l.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),tt.length===0&&l.jsx("span",{children:r("items.newFolder")})]})]}),Ut.length>0&&l.jsx("ul",{id:"items-list",className:"space-y-2",children:Ut.map(Te=>l.jsx(BU,{item:Te,showFolderPath:!!p&&!!Te.FolderPath},Te.Id))}),(v!=="all"||p)&&l.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-4 pt-4",children:[p&&l.jsxs("button",{onClick:()=>N(""),className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),r("items.clearSearch")]}),v!=="all"&&l.jsxs("button",{onClick:()=>{x("all"),localStorage.removeItem(yo)},className:"inline-flex items-center gap-1 px-3 py-1.5 text-sm bg-orange-100 dark:bg-orange-900/30 hover:bg-orange-200 dark:hover:bg-orange-900/50 text-orange-700 dark:text-orange-300 rounded-lg transition-colors",children:[l.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),r("items.clearFilter")]})]})]}),l.jsx($E,{isOpen:L,onClose:()=>B(!1),onSave:ee,mode:"create"}),l.jsx($E,{isOpen:M,onClose:()=>P(!1),onSave:Ne,initialName:re||"",mode:"edit"}),l.jsx(DU,{isOpen:S,onClose:()=>O(!1),onDeleteFolderOnly:ie,onDeleteFolderAndContents:ve,itemCount:Ct.length})]})},tb=[{type:"Login",titleKey:"itemTypes.login.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})},{type:"Alias",titleKey:"itemTypes.alias.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})},{type:"CreditCard",titleKey:"itemTypes.creditCard.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"})})},{type:"Note",titleKey:"itemTypes.note.title",iconSvg:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}],FU=()=>{const{t:r}=Ze(),e=La(),{setIsInitialLoading:a}=fa(),[i,s]=I.useState(""),[c,d]=I.useState("Login"),[m,f]=I.useState(!1);I.useEffect(()=>{a(!1)},[a]);const g=I.useCallback(()=>{const N=new URLSearchParams;N.set("type",c),i.trim()&&N.set("name",i.trim()),e(`/items/add?${N.toString()}`)},[c,i,e]),E=I.useCallback(N=>{d(N),f(!1)},[]),p=tb.find(N=>N.type===c);return l.jsxs("div",{className:"p-4 space-y-6",children:[l.jsx("div",{children:l.jsx(fd,{id:"itemName",label:r("common.serviceName"),value:i,onChange:s,type:"text",placeholder:r("common.serviceName")})}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:r("itemTypes.typeLabel")}),l.jsxs("div",{className:"relative",children:[l.jsxs("button",{type:"button",onClick:()=>f(!m),className:"w-full px-4 py-3 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:p==null?void 0:p.iconSvg}),l.jsx("span",{className:"font-medium",children:p?r(p.titleKey):""})]}),l.jsx("svg",{className:`w-5 h-5 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>f(!1)}),l.jsx("div",{className:"absolute z-20 mt-1 w-full bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-md shadow-lg",children:tb.map(N=>l.jsxs("button",{type:"button",onClick:()=>E(N.type),className:`w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 border-b border-gray-100 dark:border-gray-700 last:border-b-0 ${c===N.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[l.jsx("span",{className:c===N.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:N.iconSvg}),l.jsx("span",{className:"font-medium",children:r(N.titleKey)}),c===N.type&&l.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:l.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})]},N.type))})]})]})]}),l.jsx("button",{type:"button",onClick:g,className:"w-full px-4 py-3 bg-primary-600 text-white rounded-md hover:bg-primary-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 font-medium",children:r("common.next")})]})},ab=({isOpen:r,onClose:e,onConfirm:a,title:i,message:s,confirmText:c})=>{const{t:d}=Ze();return l.jsx(Zn,{isOpen:r,onClose:e,title:i,maxWidth:"max-w-sm",footer:l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx("button",{onClick:e,className:"px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded",children:d("common.cancel")}),l.jsx("button",{onClick:a,className:"px-4 py-2 text-sm bg-red-600 text-white rounded hover:bg-red-700",children:c})]}),children:l.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:s})})},OU=(r,e=30)=>{const a=new Date(r),i=new Date(a.getTime()+e*24*60*60*1e3),s=new Date,c=Math.ceil((i.getTime()-s.getTime())/(24*60*60*1e3));return Math.max(0,c)},jU=()=>{const{t:r}=Ze(),e=zt(),{executeVaultMutationAsync:a}=Ts(),{setHeaderButtons:i}=mr(),[s,c]=I.useState([]),[d,m]=I.useState(null),[f,g]=I.useState(!1),[E,p]=I.useState(!1),[N,v]=ec(!0,100),x=I.useCallback(()=>{if(e!=null&&e.sqliteClient){const S=e.sqliteClient.items.getRecentlyDeleted();c(S)}},[e==null?void 0:e.sqliteClient]),T=I.useCallback(async S=>{e!=null&&e.sqliteClient&&(await a(async()=>{await e.sqliteClient.items.restore(S)}),x())},[e==null?void 0:e.sqliteClient,a,x]),k=I.useCallback(async()=>{!(e!=null&&e.sqliteClient)||!d||(await a(async()=>{await e.sqliteClient.items.permanentlyDelete(d)}),x(),g(!1),m(null))},[e==null?void 0:e.sqliteClient,a,x,d]),L=I.useCallback(async()=>{e!=null&&e.sqliteClient&&(await a(async()=>{for(const S of s)await e.sqliteClient.items.permanentlyDelete(S.Id)}),x(),p(!1))},[e==null?void 0:e.sqliteClient,a,s,x]);I.useEffect(()=>(i(null),()=>i(null)),[i]),I.useEffect(()=>{(async()=>{e!=null&&e.sqliteClient&&(v(!0),x(),v(!1))})()},[e==null?void 0:e.sqliteClient,v,x]);const B=I.useCallback(()=>{g(!1),m(null)},[]);return N?l.jsx("div",{className:"flex justify-center items-center p-8",children:l.jsx($n,{})}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsxs("h2",{className:"flex items-baseline gap-1.5 text-gray-900 dark:text-white text-xl",children:[r("recentlyDeleted.title"),l.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["(",s.length,")"]})]}),s.length>0&&l.jsx("button",{onClick:()=>p(!0),className:"text-sm text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300",children:r("recentlyDeleted.emptyAll")})]}),s.length===0?l.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[l.jsx("p",{children:r("recentlyDeleted.noItems")}),l.jsx("p",{className:"text-sm",children:r("recentlyDeleted.noItemsDescription")})]}):l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4",children:r("recentlyDeleted.description")}),l.jsx("ul",{className:"space-y-2",children:s.map(S=>{const O=S.DeletedAt,M=O?OU(O):30;return l.jsx("li",{className:"relative",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[S.Logo&&l.jsx("img",{src:`data:image/png;base64,${btoa(String.fromCharCode(...S.Logo))}`,alt:"",className:"w-6 h-6 rounded"}),l.jsx("span",{className:"font-medium text-gray-900 dark:text-white truncate",children:S.Name||r("items.untitled")})]}),l.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:M>0?r("recentlyDeleted.daysRemaining",{count:M}):l.jsx("span",{className:"text-red-500",children:r("recentlyDeleted.expiringSoon")})})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>T(S.Id),className:"px-3 py-1 text-sm bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 rounded hover:bg-green-200 dark:hover:bg-green-900/50",children:r("recentlyDeleted.restore")}),l.jsx("button",{onClick:()=>{m(S.Id),g(!0)},className:"px-3 py-1 text-sm bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 rounded hover:bg-red-200 dark:hover:bg-red-900/50",children:r("common.delete")})]})]})})},S.Id)})})]}),l.jsx(ab,{isOpen:f&&!!d,onClose:B,onConfirm:k,title:r("recentlyDeleted.confirmDeleteTitle"),message:r("recentlyDeleted.confirmDeleteMessage"),confirmText:r("recentlyDeleted.deletePermanently")}),l.jsx(ab,{isOpen:E,onClose:()=>p(!1),onConfirm:L,title:r("recentlyDeleted.confirmEmptyAllTitle"),message:r("recentlyDeleted.confirmEmptyAllMessage",{count:s.length}),confirmText:r("recentlyDeleted.emptyAll")})]})},ev=({isOpen:r,origin:e,onChoice:a,onCancel:i})=>{const{t:s}=Ze();return l.jsxs(Zn,{isOpen:r,onClose:i,title:s("passkeys.useBrowserPasskey"),showCloseButton:!0,children:[l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:s("passkeys.bypass.description",{origin:e})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(Aa,{variant:"primary",onClick:()=>a("once"),children:s("passkeys.bypass.thisTimeOnly")}),l.jsx(Aa,{variant:"secondary",onClick:()=>a("always"),children:s("passkeys.bypass.alwaysForSite")}),l.jsx(Aa,{variant:"secondary",onClick:i,children:s("common.cancel")})]})]})};function tv(r={}){const{enabled:e=!0}=r,a=Ka(),i=La(),{dbInitialized:s,dbAvailable:c}=zt();return I.useEffect(()=>{if(!(!e||!s)&&!c){const d=`${a.pathname}${a.search}`;Se.setItem(Yu,d),i("/unlock")}},[e,s,c,a,i]),{isLocked:s&&!c}}async function PU(){const r=await Se.getItem(Yu);return r&&await Se.removeItem(Yu),r}async function HU(){await Se.removeItem(Yu)}var ps=(r=>(r.DEFAULT="default",r.URL_EXACT="url_exact",r.URL_SUBDOMAIN="url_subdomain",r))(ps||{});let Ff=null;async function Qh(){return Ff||(Ff=(async()=>{const r=li.runtime.getURL("src/aliasvault_core_bg.wasm"),e=await(await fetch(r)).arrayBuffer();await md(e)})()),Ff}function zU(r,e){var i;const a=(i=r.Fields)==null?void 0:i.find(s=>s.FieldKey===e);return a?Array.isArray(a.Value)?a.Value.filter(s=>s&&s.length>0):a.Value?[a.Value]:[]:[]}async function QU(r,e,a,i="default"){return await Qh(),RL({credentials:r.map(c=>({Id:c.Id,ItemName:c.Name??"",ItemUrls:zU(c,Za.LoginUrl)})),current_url:e,page_title:a,matching_mode:i}).matched_ids.map(c=>r.find(d=>d.Id===c)).filter(c=>c!==void 0)}async function Vh(r){return await Qh(),kL(r)}async function Gh(r){return await Qh(),LL(r)}const We=class We{constructor(){}static async createPasskey(e,a,i){var ne,he,q,re,Ee;We.pickSupportedAlgorithm(a.publicKey.pubKeyCredParams);const s=((ne=a.publicKey.rp)==null?void 0:ne.id)||new URL(a.origin).hostname,c=new Uint8Array(await crypto.subtle.digest("SHA-256",We.te(s))),d=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),m=await crypto.subtle.exportKey("jwk",d.publicKey),f=await crypto.subtle.exportKey("jwk",d.privateKey),g=We.toB64u(e),E=We.buildCoseEc2Es256(m);let p=65;const N=(he=a.publicKey.authenticatorSelection)==null?void 0:he.userVerification,v=!!(i!=null&&i.uvPerformed);(N==="required"||N==="preferred"&&v)&&(p|=4),p|=8,p|=16;const x=new Uint8Array([0,0,0,0]),T=new Uint8Array([e.length>>8&255,e.length&255]),k=We.concat(We.AAGUID,T,e,E),L=We.concat(c,new Uint8Array([p]),x,k),S={type:"webauthn.create",challenge:We.challengeToB64u(a.publicKey.challenge),origin:a.origin,crossOrigin:!1},O=JSON.stringify(S),M=We.te(O),P=a.publicKey.attestation||"none",G=P==="none"||P==="indirect"?We.buildAttObjNone(L):await We.buildAttObjPackedSelf(L,M,d.privateKey);let H=null;(q=a.publicKey.user)!=null&&q.id&&(H=typeof a.publicKey.user.id=="string"?a.publicKey.user.id:We.toB64(a.publicKey.user.id instanceof Uint8Array?a.publicKey.user.id:new Uint8Array(a.publicKey.user.id)));let z,V=!1,K;if(i!=null&&i.enablePrf){const pe=new Uint8Array(32);if(crypto.getRandomValues(pe),z=We.toB64u(pe),V=!0,i!=null&&i.prfInputs){const j=We.fromB64u(i.prfInputs.first);if(K={first:await We.evaluatePrf(pe,j)},i.prfInputs.second){const X=We.fromB64u(i.prfInputs.second);K.second=await We.evaluatePrf(pe,X)}}}const $={rpId:s,credentialId:g,publicKey:m,privateKey:f,userId:H,userName:(re=a.publicKey.user)==null?void 0:re.name,userDisplayName:(Ee=a.publicKey.user)==null?void 0:Ee.displayName,prfSecret:z};return{credential:{id:g,rawId:g,response:{clientDataJSON:We.toB64u(M),attestationObject:We.toB64u(G)},type:"public-key"},stored:$,prfEnabled:V,prfResults:K}}static async getAssertion(e,a,i){const s=a,c=e.publicKey.rpId||new URL(e.origin).hostname,d=new Uint8Array(await crypto.subtle.digest("SHA-256",We.te(c)));let m=1;const f=e.publicKey.userVerification,g=!!(i!=null&&i.uvPerformed);(f==="required"||f==="preferred"&&g)&&(m|=4),((i==null?void 0:i.includeBEBS)??!0)&&(m|=8,m|=16);const E=new Uint8Array([0,0,0,0]),p=We.concat(d,new Uint8Array([m]),E),v={type:"webauthn.get",challenge:We.challengeToB64u(e.publicKey.challenge),origin:e.origin,crossOrigin:!1},x=JSON.stringify(v),T=We.te(x),k=new Uint8Array(await crypto.subtle.digest("SHA-256",T)),L=We.concat(p,k),B=await crypto.subtle.importKey("jwk",s.privateKey,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),S=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},B,L)),O=We.ecdsaRawToDer(S);let M=null;s.userId&&(M=s.userId.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));let P;if(i!=null&&i.prfInputs&&s.prfSecret){const G=We.fromB64u(s.prfSecret);if(P={first:await We.evaluatePrf(G,i.prfInputs.first)},i.prfInputs.second){const z=await We.evaluatePrf(G,i.prfInputs.second);P.second=z}}return{id:s.credentialId,rawId:s.credentialId,clientDataJSON:We.toB64u(T),authenticatorData:We.toB64u(p),signature:We.toB64u(O),userHandle:M,prfResults:P}}static async evaluatePrf(e,a){const i=a instanceof Uint8Array?a:new Uint8Array(a),s=We.te("WebAuthn PRF\0"),c=We.concat(s,i),d=await crypto.subtle.digest("SHA-256",c),m=await crypto.subtle.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await crypto.subtle.sign("HMAC",m,d)}static pickSupportedAlgorithm(e){if(!e||e.length===0)return-7;if(!e.some(i=>i.type==="public-key"&&i.alg===-7))throw new Error("No supported algorithm (ES256) in pubKeyCredParams");return-7}static buildCoseEc2Es256(e){const a=We.pad32(We.fromB64u(e.x)),i=We.pad32(We.fromB64u(e.y));return new Uint8Array([165,1,2,3,38,32,1,33,88,32,...a,34,88,32,...i])}static buildAttObjNone(e){const a=We.cborText("fmt"),i=We.cborText("none"),s=We.cborText("attStmt"),c=new Uint8Array([160]),d=We.cborText("authData"),m=We.cborBstr(e);return We.concat(new Uint8Array([163]),a,i,s,c,d,m)}static async buildAttObjPackedSelf(e,a,i){const s=new Uint8Array(await crypto.subtle.digest("SHA-256",a)),c=We.concat(e,s),d=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},i,c)),m=We.ecdsaRawToDer(d),f=We.concat(We.cborText("alg"),new Uint8Array([38]),We.cborText("sig"),We.cborBstr(m)),g=We.concat(new Uint8Array([162]),f),E=We.cborText("fmt"),p=We.cborText("packed"),N=We.cborText("attStmt"),v=We.cborText("authData"),x=We.cborBstr(e);return We.concat(new Uint8Array([163]),E,p,N,g,v,x)}static cborText(e){const a=We.te(e);return a.length<=23?new Uint8Array([96|a.length,...a]):a.length<=255?new Uint8Array([120,a.length,...a]):new Uint8Array([121,a.length>>8&255,a.length&255,...a])}static cborBstr(e){return e.length<=23?new Uint8Array([64|e.length,...e]):e.length<=255?new Uint8Array([88,e.length,...e]):new Uint8Array([89,e.length>>8&255,e.length&255,...e])}static ecdsaRawToDer(e){if(e.length!==64)throw new Error("Unexpected ECDSA signature length");const a=e.slice(0,32),i=e.slice(32,64),s=We.derInt(a),c=We.derInt(i);return new Uint8Array([48,s.length+c.length,...s,...c])}static derInt(e){let a=0;for(;a<e.length-1&&e[a]===0;)a++;let i=e.slice(a);if((i[0]&128)!==0){const s=new Uint8Array(i.length+1);s[0]=0,s.set(i,1),i=s}return new Uint8Array([2,i.length,...i])}static te(e){return new TextEncoder().encode(e)}static toB64(e){let a="";for(let i=0;i<e.length;i++)a+=String.fromCharCode(e[i]);return btoa(a)}static toB64u(e){return We.toB64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}static fromB64u(e){const a=e.replace(/-/g,"+").replace(/_/g,"/"),i=a.length%4===2?"==":a.length%4===3?"=":"",s=atob(a+i),c=new Uint8Array(s.length);for(let d=0;d<s.length;d++)c[d]=s.charCodeAt(d);return c}static challengeToB64u(e){if(typeof e=="string")return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");const a=e instanceof Uint8Array?e:new Uint8Array(e);return We.toB64u(a)}static pad32(e){if(e.length===32)return e;const a=new Uint8Array(32);return a.set(e,32-e.length),a}static concat(...e){const a=e.reduce((c,d)=>c+d.length,0),i=new Uint8Array(a);let s=0;for(const c of e)i.set(c,s),s+=c.length;return i}};Qe(We,"AAGUID",new Uint8Array([161,26,95,170,159,50,75,140,140,93,47,125,19,232,201,66]));let ad=We;class $a{constructor(){}static guidToBytes(e){const a=e.replace(/-/g,"");if(a.length!==32)throw new Error("Invalid GUID format");const i=new Uint8Array(16);for(let s=0;s<16;s++)i[s]=parseInt(a.substr(s*2,2),16);return i}static bytesToGuid(e){if(e.length!==16)throw new Error("Invalid byte length for GUID");const a=Array.from(e).map(i=>i.toString(16).padStart(2,"0")).join("");return[a.substr(0,8),a.substr(8,4),a.substr(12,4),a.substr(16,4),a.substr(20)].join("-").toUpperCase()}static bytesToBase64Url(e){let a="";return e.forEach(s=>a+=String.fromCharCode(s)),btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}static base64UrlToBytes(e){let i=e.replace(/=+$/,"").replace(/-/g,"+").replace(/_/g,"/");for(;i.length%4;)i+="=";const s=atob(i),c=new Uint8Array(s.length);for(let d=0;d<s.length;d++)c[d]=s.charCodeAt(d);return c}static guidToBase64url(e){return this.bytesToBase64Url(this.guidToBytes(e))}static base64urlToGuid(e){return this.bytesToGuid(this.base64UrlToBytes(e))}static arrayBufferToBase64(e){const a=new Uint8Array(e);let i="";for(let s=0;s<a.length;s++)i+=String.fromCharCode(a[s]);return btoa(i)}static bytesToBase64url(e){const a=e instanceof Uint8Array?e:new Uint8Array(e);return this.bytesToBase64Url(a)}static base64urlToBytes(e){return this.base64UrlToBytes(e)}}const VU=()=>{const{t:r}=Ze(),e=Ka(),{setIsInitialLoading:a}=fa(),i=zt(),[s,c]=I.useState(null),[d,m]=I.useState(!1),[f,g]=I.useState(null),[E,p]=I.useState([]),[N,v]=I.useState(!1),{isLocked:x}=tv(),T=I.useRef(null);I.useEffect(()=>{(async()=>{if(!i.dbInitialized||x)return;const P=new URLSearchParams(e.search).get("requestId");if(P)try{const G=await ft("GET_REQUEST_DATA",{requestId:P},"background");if(G&&G.type==="get"){c(G);const H=G.publicKey.rpId||new URL(G.origin).hostname,z=i.sqliteClient.passkeys.getByRpId(H);let V=z;if(G.publicKey.allowCredentials&&G.publicKey.allowCredentials.length>0){const K=new Set(G.publicKey.allowCredentials.map($=>{try{return $a.base64urlToGuid($.id)}catch(W){return console.warn("Failed to convert credential ID to GUID:",$.id,W),null}}).filter($=>$!==null));V=z.filter($=>K.has($.Id))}p(V.map(K=>({id:K.Id,displayName:K.DisplayName,serviceName:K.ServiceName,rpId:K.RpId,username:K.Username})))}}catch(G){console.error("Failed to fetch request data:",G),g(r("common.errors.unknownError"))}a(!1)})()},[e,a,i.dbInitialized,x,i.sqliteClient,r]),I.useEffect(()=>{E.length>0&&T.current&&T.current.focus()},[E.length]),I.useEffect(()=>{const O=M=>{M.key==="Enter"&&!d&&E.length>0&&k(E[0].id)};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[d,E]);const k=async O=>{var M,P;if(!(!s||!i.sqliteClient)){m(!0),g(null);try{const G=i.sqliteClient.passkeys.getById(O);if(!G)throw new Error(r("common.errors.unknownError"));const H=JSON.parse(G.PublicKey),z=JSON.parse(G.PrivateKey);let V;if(G.PrfKey)try{V=$a.bytesToBase64url(G.PrfKey)}catch(Ee){console.warn("Failed to convert PrfKey to base64url",Ee)}let K=null;if(G.UserHandle)try{const Ee=G.UserHandle instanceof Uint8Array?G.UserHandle:new Uint8Array(G.UserHandle);K=$a.bytesToBase64url(Ee)}catch(Ee){console.warn("Failed to convert UserHandle to base64",Ee)}const $={rpId:G.RpId,credentialId:$a.guidToBase64url(G.Id),publicKey:H,privateKey:z,userId:K,userName:G.Username??void 0,userDisplayName:G.ServiceName??void 0,prfSecret:V},W={origin:s.origin,requestId:s.requestId,publicKey:{rpId:s.publicKey.rpId,challenge:s.publicKey.challenge,userVerification:s.publicKey.userVerification}};let ne;if((P=(M=s.publicKey.extensions)==null?void 0:M.prf)!=null&&P.eval){const Ee=s.publicKey.extensions.prf.eval.first;let pe;if(typeof Ee=="object"&&Ee!==null&&!Array.isArray(Ee)){const j=Object.keys(Ee).map(Number).sort((X,ee)=>X-ee);pe=new Uint8Array(j.length);for(let X=0;X<j.length;X++)pe[X]=Ee[X]}else if(typeof Ee=="string"){const j=atob(Ee);pe=new Uint8Array(j.length);for(let X=0;X<j.length;X++)pe[X]=j.charCodeAt(X)}else throw new Error("Unknown PRF input format");if(ne={first:pe},s.publicKey.extensions.prf.eval.second){const j=s.publicKey.extensions.prf.eval.second;let X;if(typeof j=="object"&&j!==null&&!Array.isArray(j)){const ee=Object.keys(j).map(Number).sort((ie,ve)=>ie-ve);X=new Uint8Array(ee.length);for(let ie=0;ie<ee.length;ie++)X[ie]=j[ie]}else if(typeof j=="string"){const ee=atob(j);X=new Uint8Array(ee.length);for(let ie=0;ie<ee.length;ie++)X[ie]=ee.charCodeAt(ie)}else throw console.error("[PasskeyAuth] Unknown PRF second input type:",typeof j),new Error("Unknown PRF second input format");ne.second=X}}const he=await ad.getAssertion(W,$,{uvPerformed:!0,includeBEBS:!0,prfInputs:ne});let q;he.prfResults&&(q={first:$a.arrayBufferToBase64(he.prfResults.first)},he.prfResults.second&&(q.second=$a.arrayBufferToBase64(he.prfResults.second)));const re={id:he.id,rawId:he.rawId,clientDataJSON:he.clientDataJSON,authenticatorData:he.authenticatorData,signature:he.signature,userHandle:he.userHandle,prfResults:q};await ft("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,credential:re},"background")}catch(G){console.error("PasskeyAuthenticate: Error during authentication",G),m(!1),g(r("common.errors.unknownError"))}}},L=async()=>{v(!0)},B=async O=>{if(s){if(O==="always"){const M=new URL(s.origin).hostname,P=await Gh(await Vh(M)),G=await Se.getItem(bs)??[];G.includes(P)||(G.push(P),await Se.setItem(bs,G))}await ft("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,fallback:!0},"background")}},S=async()=>{s&&await ft("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,cancelled:!0},"background")};return s?l.jsxs(l.Fragment,{children:[l.jsx(ev,{isOpen:N&&!!s,origin:s?new URL(s.origin).hostname:"",onChoice:B,onCancel:()=>v(!1)}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:r("passkeys.authenticate.title")}),l.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[r("passkeys.authenticate.signInFor")," ",l.jsx("strong",{children:s.origin})]})]}),f&&l.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:l.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:f})}),l.jsx("div",{className:"space-y-4",children:E&&E.length>0?l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r("passkeys.authenticate.selectPasskey")}),l.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:E.map((O,M)=>l.jsxs("div",{ref:M===0?T:null,tabIndex:0,className:"p-3 rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",onClick:()=>!d&&k(O.id),onKeyDown:P=>{P.key==="Enter"&&!d&&k(O.id)},children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:O.serviceName}),l.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:l.jsx("span",{className:"truncate",children:O.displayName})})]},O.id))})]}):l.jsx("div",{className:"text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg",children:l.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:r("passkeys.authenticate.noPasskeysFound")})})}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(Aa,{variant:"secondary",onClick:L,children:r("passkeys.useBrowserPasskey")}),l.jsx(Aa,{variant:"secondary",onClick:S,children:r("common.cancel")})]})]})]}):l.jsx("div",{className:"flex justify-center py-8",children:l.jsx($n,{})})},Of=({variant:r,children:e,className:a=""})=>{const i={info:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800 text-blue-800 dark:text-blue-200",warning:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800 text-yellow-800 dark:text-yellow-200",error:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800 text-red-800 dark:text-red-200",success:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800 text-green-800 dark:text-green-200"};return l.jsx("div",{className:`p-3 border rounded-lg ${i[r]} ${a}`,children:l.jsx("p",{className:"text-sm",children:e})})},GU=()=>{var j,X;const{t:r}=Ze(),e=Ka(),{setIsInitialLoading:a}=fa(),i=zt(),s=ur(),{executeVaultMutationAsync:c}=Ts(),[d,m]=I.useState(null),[f,g]=I.useState(""),[E,p]=I.useState(null),{isLocked:N}=tv(),[v,x]=I.useState([]),[T,k]=I.useState([]),[L,B]=I.useState(null),[S,O]=I.useState(null),[M,P]=I.useState(!1),[G,H]=I.useState(!1),[z,V]=I.useState(!1),K=I.useRef(null),$=I.useRef(null);I.useEffect(()=>{(async()=>{var Ne,Re,Be,ke,Ve,vt,Ct,Ut;if(!i.dbInitialized||N)return;const ve=new URLSearchParams(e.search).get("requestId");if(ve)try{const tt=await ft("GET_REQUEST_DATA",{requestId:ve},"background");if(tt&&tt.type==="create"){m(tt);const nt=((Re=(Ne=tt.publicKey)==null?void 0:Ne.rp)==null?void 0:Re.name)||((ke=(Be=tt.publicKey)==null?void 0:Be.rp)==null?void 0:ke.id)||"Passkey";if(g(nt),i.sqliteClient&&((vt=(Ve=tt.publicKey)==null?void 0:Ve.rp)!=null&&vt.id)){const Te=i.sqliteClient.passkeys.getByRpId(tt.publicKey.rp.id);let me=Te;if(((Ct=tt.publicKey.user)!=null&&Ct.id||(Ut=tt.publicKey.user)!=null&&Ut.name)&&(me=Te.filter(De=>{var Pe,ze;if((Pe=tt.publicKey.user)!=null&&Pe.id&&De.UserHandle)try{const at=$a.base64urlToBytes(tt.publicKey.user.id),Ye=De.UserHandle instanceof Uint8Array?De.UserHandle:new Uint8Array(De.UserHandle);if(at.length===Ye.length&&at.every((dt,jt)=>dt===Ye[jt]))return!0}catch{}return!!((ze=tt.publicKey.user)!=null&&ze.name&&De.Username&&De.Username===tt.publicKey.user.name)})),x(me),me.length===0){const Pe=i.sqliteClient.items.getAll().filter(at=>{const Ye=fu(at,Za.LoginUsername),dt=fu(at,Za.LoginPassword);return!Ye&&!dt?!1:!at.HasPasskey});let ze=[];Pe.length>0&&(ze=await QU(Pe,tt.origin,tt.publicKey.rp.name||"",ps.URL_SUBDOMAIN),k(ze)),ze.length===0&&P(!0)}}}}catch(tt){console.error("Failed to fetch request data:",tt),p(r("common.errors.unknownError"))}a(!1)})()},[e,a,i.dbInitialized,i.sqliteClient,N,r]),I.useEffect(()=>{M&&$.current?$.current.focus():!M&&v.length>0&&K.current&&K.current.focus()},[M,v.length]),I.useEffect(()=>{const ee=ie=>{ie.key==="Enter"&&!G&&M&&q()};return window.addEventListener("keydown",ee),()=>window.removeEventListener("keydown",ee)},[M,G]);const W=()=>{B(null),O(null),P(!0)},ne=ee=>{B(ee),O(null),P(!0)},he=ee=>{O(ee),B(null),P(!0)},q=async()=>{var ee,ie;if(!(!d||!i.sqliteClient)){p(null);try{let ve;if(d.origin){H(!0);try{const ze=new Promise((dt,jt)=>setTimeout(()=>jt(new Error("Favicon extraction timed out")),5e3)),at=s.get("Favicon/Extract?url="+d.origin),Ye=await Promise.race([at,ze]);if(Ye!=null&&Ye.image){const dt=atob(Ye.image),jt=new Uint8Array(dt.length);for(let qt=0;qt<dt.length;qt++)jt[qt]=dt.charCodeAt(qt);ve=jt}}catch{}}const Ne={origin:d.origin,requestId:d.requestId,publicKey:{rp:d.publicKey.rp,user:d.publicKey.user,challenge:d.publicKey.challenge,pubKeyCredParams:d.publicKey.pubKeyCredParams,attestation:d.publicKey.attestation,authenticatorSelection:d.publicKey.authenticatorSelection}},Re=crypto.randomUUID().toUpperCase(),Be=$a.guidToBytes(Re),ke=$a.guidToBase64url(Re),Ve=(ie=(ee=d.publicKey)==null?void 0:ee.extensions)==null?void 0:ie.prf,vt=!!Ve,Ct=Ve==null?void 0:Ve.eval,Ut=await ad.createPasskey(Be,Ne,{uvPerformed:!0,credentialIdBytes:16,enablePrf:vt,prfInputs:Ct}),{credential:tt,stored:nt,prfEnabled:Te,prfResults:me}=Ut;await c(async()=>{if(L){const ze=i.sqliteClient.passkeys.getById(L);if(ze){const at=i.sqliteClient.items.getById(ze.ItemId);at&&await i.sqliteClient.items.update({...at,Name:f,Logo:ve??at.Logo,Fields:[...(at.Fields||[]).filter(dt=>dt.FieldKey!==Za.LoginUrl&&dt.FieldKey!==Za.LoginUsername),hu(Za.LoginUrl,{value:d.origin}),hu(Za.LoginUsername,{value:d.publicKey.user.name})]},[],[]),await i.sqliteClient.passkeys.deleteById(L);let Ye=null;if(nt.userId)try{Ye=$a.base64urlToBytes(nt.userId)}catch{Ye=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:ze.ItemId,RpId:nt.rpId,UserHandle:Ye,PublicKey:JSON.stringify(nt.publicKey),PrivateKey:JSON.stringify(nt.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:nt.prfSecret?$a.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}}else if(S){let ze=null;if(nt.userId)try{ze=$a.base64urlToBytes(nt.userId)}catch{ze=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:S,RpId:nt.rpId,UserHandle:ze,PublicKey:JSON.stringify(nt.publicKey),PrivateKey:JSON.stringify(nt.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:nt.prfSecret?$a.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}else{const ze={Id:"",Name:f,ItemType:ma.Login,Logo:ve,Fields:[hu(Za.LoginUrl,{value:d.origin}),hu(Za.LoginUsername,{value:d.publicKey.user.name})],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()},at=await i.sqliteClient.items.create(ze,[]);let Ye=null;if(nt.userId)try{Ye=$a.base64urlToBytes(nt.userId)}catch{Ye=null}await i.sqliteClient.passkeys.create({Id:Re,ItemId:at,RpId:nt.rpId,UserHandle:Ye,PublicKey:JSON.stringify(nt.publicKey),PrivateKey:JSON.stringify(nt.privateKey),DisplayName:d.publicKey.user.displayName||d.publicKey.user.name||"",PrfKey:nt.prfSecret?$a.base64urlToBytes(nt.prfSecret):void 0,AdditionalData:null})}});let De;Te&&(De={prf:{enabled:!0,results:me?{first:$a.bytesToBase64url(new Uint8Array(me.first)),second:me.second?$a.bytesToBase64url(new Uint8Array(me.second)):void 0}:void 0}});const Pe={id:ke,rawId:ke,clientDataJSON:tt.response.clientDataJSON,attestationObject:tt.response.attestationObject,extensions:De};await ft("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,credential:Pe},"background"),H(!1)}catch(ve){console.error("PasskeyCreate: Error creating passkey",ve),p(r("common.errors.unknownError"))}}},re=async()=>{V(!0)},Ee=async ee=>{if(d){if(ee==="always"){const ie=new URL(d.origin).hostname,ve=await Gh(await Vh(ie)),Ne=await Se.getItem(bs)??[];Ne.includes(ve)||(Ne.push(ve),await Se.setItem(bs,Ne))}await ft("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,fallback:!0},"background")}},pe=async()=>{d&&await ft("PASSKEY_POPUP_RESPONSE",{requestId:d.requestId,cancelled:!0},"background")};return d?l.jsxs(l.Fragment,{children:[l.jsx(ev,{isOpen:z&&!!d,origin:d?new URL(d.origin).hostname:"",onChoice:Ee,onCancel:()=>V(!1)}),G&&l.jsx("div",{className:"fixed inset-0 flex flex-col justify-center items-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90 z-50",children:l.jsx($n,{})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:r("passkeys.create.title")}),l.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[r("passkeys.create.createFor")," ",l.jsx("strong",{children:d.origin})]})]}),E&&l.jsx(Of,{variant:"error",children:E}),!M&&v.length>0&&l.jsxs("div",{className:"space-y-4",children:[l.jsx(Aa,{variant:"primary",onClick:W,ref:K,children:r("passkeys.create.createNewPasskey")}),l.jsx(Aa,{variant:"secondary",onClick:re,children:r("passkeys.useBrowserPasskey")}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),l.jsx("div",{className:"relative flex justify-center text-sm",children:l.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:r("common.or")})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r("passkeys.create.selectPasskeyToReplace")}),l.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:v.map(ee=>l.jsx("button",{onClick:()=>ne(ee.Id),className:"w-full p-3 text-left rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:ee.ServiceName}),l.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:l.jsx("span",{className:"truncate",children:ee.DisplayName})})]}),l.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},ee.Id))})]}),l.jsx(Aa,{variant:"secondary",onClick:pe,children:r("common.cancel")})]}),!M&&v.length===0&&T.length>0&&l.jsxs("div",{className:"space-y-4",children:[l.jsx(Aa,{variant:"primary",onClick:W,ref:K,children:r("passkeys.create.createNewPasskey")}),l.jsx(Aa,{variant:"secondary",onClick:re,children:r("passkeys.useBrowserPasskey")}),l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute inset-0 flex items-center",children:l.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),l.jsx("div",{className:"relative flex justify-center text-sm",children:l.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:r("common.or")})})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:r("passkeys.create.selectExistingLogin")}),l.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:r("passkeys.create.selectExistingLoginDescription")}),l.jsx("div",{className:"space-y-2 max-h-48 overflow-y-auto border rounded-lg p-2 bg-gray-50 dark:bg-gray-800",children:T.map(ee=>l.jsx("button",{onClick:()=>he(ee.Id),className:"w-full p-3 text-left rounded-lg border cursor-pointer transition-colors bg-white border-gray-200 hover:bg-gray-100 hover:border-gray-300 dark:bg-gray-700 dark:border-gray-600 dark:hover:bg-gray-600 dark:hover:border-gray-500 focus:outline-none focus:ring-1 focus:ring-primary-500 focus:border-primary-500",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("div",{className:"flex items-center flex-1 min-w-0",children:l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:ee.Name}),fu(ee,Za.LoginUsername)&&l.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:fu(ee,Za.LoginUsername)})]})}),l.jsx("svg",{className:"w-5 h-5 text-gray-400 flex-shrink-0 ml-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},ee.Id))})]}),l.jsx(Aa,{variant:"secondary",onClick:pe,children:r("common.cancel")})]}),M&&l.jsxs("div",{className:"space-y-4",children:[L&&l.jsx(Of,{variant:"warning",children:r("passkeys.create.replacingPasskey",{displayName:((j=v.find(ee=>ee.Id===L))==null?void 0:j.DisplayName)||""})}),S&&l.jsx(Of,{variant:"info",children:r("passkeys.create.attachingToCredential",{serviceName:((X=T.find(ee=>ee.Id===S))==null?void 0:X.Name)||""})}),!S&&l.jsx(fd,{id:"displayName",label:r("passkeys.create.titleLabel"),value:f,onChange:g,placeholder:r("passkeys.create.titlePlaceholder"),ref:$}),l.jsxs("div",{className:"space-y-3",children:[l.jsx(Aa,{variant:"primary",onClick:q,children:r(L?"passkeys.create.confirmReplace":S?"passkeys.create.attachPasskey":"passkeys.create.createButton")}),v.length>0||T.length>0?l.jsx(Aa,{variant:"secondary",onClick:()=>{P(!1),B(null),O(null)},children:r("common.back")}):l.jsxs(l.Fragment,{children:[l.jsx(Aa,{variant:"secondary",onClick:re,children:r("passkeys.useBrowserPasskey")}),l.jsx(Aa,{variant:"secondary",onClick:pe,children:r("common.cancel")})]})]})]})]})]}):l.jsx("div",{className:"flex justify-center py-8",children:l.jsx($n,{})})},nb="session:lastVisitedPage",rb="session:lastVisitedTime",ib="session:navigationHistory",KU=120*1e3,qU=()=>{const r=La(),{setIsInitialLoading:e}=fa(),{syncVault:a}=gd(),i=I.useRef(!1),{isInitialized:s,isLoggedIn:c}=dr(),{dbInitialized:d,dbAvailable:m,refreshSyncState:f}=zt(),g=s&&d,E=g&&(!c||!m),p=I.useCallback(async()=>{const[N,v,x]=await Promise.all([Se.getItem(nb),Se.getItem(rb),Se.getItem(ib)]);if(N&&v&&Date.now()-v<=KU){(x==null?void 0:x.length)>1?(r(x[0].pathname,{replace:!0}),r(N,{replace:!1})):r(N,{replace:!0});return}await Promise.all([Se.removeItem(nb),Se.removeItem(rb),Se.removeItem(ib),ft("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),r("/items",{replace:!0})},[r]);return I.useEffect(()=>{(async()=>{const x=new URLSearchParams(window.location.search).get("mode")==="inline_unlock",T=await PU();if(!g)return;const k=!i.current;E?(e(!1),c?m||r("/unlock",{replace:!0}):r("/login",{replace:!0})):k?(i.current=!0,e(!1),x?r("/unlock-success",{replace:!0}):T?r(T,{replace:!0}):await p(),a({onSuccess:async L=>{await f()},onUpgradeRequired:()=>{r("/upgrade",{replace:!0})},onError:L=>{console.error("Background vault sync error:",L)}})):(e(!1),p())})()},[g,E,c,m,r,e,a,p,f]),null},WU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=fa(),[a,i]=I.useState({disabledUrls:[],temporaryDisabledUrls:{},currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),[s,c]=I.useState(ps.DEFAULT),d=async()=>{const N={active:!0,currentWindow:!0},[v]=await li.tabs.query(N);return v},m=I.useCallback(async()=>{const N=await d(),v=new URL(N.url??"").hostname,x=await Se.getItem(Mu)??[],T=await Se.getItem(pu)??{},k=await Se.getItem(Wu)!==!1,L=Date.now(),B=Object.fromEntries(Object.entries(T).filter(([O,M])=>M>L));Object.keys(B).length!==Object.keys(T).length&&await Se.setItem(pu,B);const S=await Se.getItem(Oy)??ps.DEFAULT;c(S),i({disabledUrls:x,temporaryDisabledUrls:B,currentUrl:v,isEnabled:!x.includes(v)&&!(v in B),isGloballyEnabled:k}),e(!1)},[e]);I.useEffect(()=>{m()},[m]);const f=async()=>{const{currentUrl:N,disabledUrls:v,temporaryDisabledUrls:x,isEnabled:T}=a;let k=[...v],L={...x};T?(k.includes(N)||k.push(N),delete L[N]):(k=k.filter(B=>B!==N),delete L[N]),await Se.setItem(Mu,k),await Se.setItem(pu,L),i(B=>({...B,disabledUrls:k,temporaryDisabledUrls:L,isEnabled:!T}))},g=async()=>{await Se.setItem(Mu,[]),await Se.setItem(pu,{}),i(N=>({...N,disabledUrls:[],temporaryDisabledUrls:{},isEnabled:!0}))},E=async()=>{const N=!a.isGloballyEnabled;await Se.setItem(Wu,N),i(v=>({...v,isGloballyEnabled:N}))},p=async N=>{await Se.setItem(Oy,N),c(N)};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.globalSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:r("settings.autofillPopup")}),l.jsx("p",{className:`text-sm mt-1 ${a.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isGloballyEnabled?r("settings.activeOnAllSites"):r("settings.disabledOnAllSites")})]}),l.jsx("button",{onClick:E,className:`px-4 py-2 rounded-md transition-colors ${a.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isGloballyEnabled?r("common.enabled"):r("common.disabled")})]})})})]}),a.isGloballyEnabled&&l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.siteSpecificSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[r("settings.autofillPopupOn"),a.currentUrl]}),l.jsx("p",{className:`text-sm mt-1 ${a.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isEnabled?r("settings.enabledForThisSite"):r("settings.disabledForThisSite")}),!a.isEnabled&&a.temporaryDisabledUrls[a.currentUrl]&&l.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:[r("settings.temporarilyDisabledUntil"),new Date(a.temporaryDisabledUrls[a.currentUrl]).toLocaleTimeString()]})]}),a.isGloballyEnabled&&l.jsx("button",{onClick:f,className:`px-4 py-2 ml-1 rounded-md transition-colors ${a.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isEnabled?r("common.enabled"):r("common.disabled")})]}),l.jsx("div",{className:"mt-4",children:l.jsx("button",{onClick:g,className:"w-full px-4 py-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md text-gray-700 dark:text-gray-300 transition-colors text-sm",children:r("settings.resetAllSiteSettings")})})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.autofillMatching")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:r("settings.autofillMatchingMode")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.autofillMatchingModeDescription")}),l.jsxs("select",{value:s,onChange:N=>p(N.target.value),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[l.jsx("option",{value:ps.DEFAULT,children:r("settings.autofillMatchingDefault")}),l.jsx("option",{value:ps.URL_SUBDOMAIN,children:r("settings.autofillMatchingUrlSubdomain")}),l.jsx("option",{value:ps.URL_EXACT,children:r("settings.autofillMatchingUrlExact")})]})]})})})]})]})},av=({title:r,content:e,className:a=""})=>{const[i,s]=I.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx("button",{onClick:()=>s(!0),className:`${a}`,type:"button","aria-label":"Help",children:l.jsx("svg",{className:"w-4 h-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 cursor-help",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),l.jsx(Zn,{isOpen:i,onClose:()=>s(!1),title:r,children:l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e})})]})},YU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=fa(),[a,i]=I.useState(0);I.useEffect(()=>{(async()=>{const d=await Se.getItem(Fy)??0;i(d),e(!1)})()},[e]);const s=async c=>{await Se.setItem(Fy,c),await ft("SET_AUTO_LOCK_TIMEOUT",c,"background"),i(c)};return l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.autoLockTimeout")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:r("settings.autoLockTimeout")}),l.jsx(av,{title:r("settings.autoLockTimeout"),content:r("settings.autoLockTimeoutHelp"),className:"ml-2"})]}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.autoLockTimeoutDescription")}),l.jsxs("select",{value:a,onChange:c=>s(Number(c.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[l.jsx("option",{value:"0",children:r("settings.autoLockNever")}),l.jsx("option",{value:"15",children:r("settings.autoLock15Seconds")}),l.jsx("option",{value:"60",children:r("settings.autoLock1Minute")}),l.jsx("option",{value:"300",children:r("settings.autoLock5Minutes")}),l.jsx("option",{value:"900",children:r("settings.autoLock15Minutes")}),l.jsx("option",{value:"1800",children:r("settings.autoLock30Minutes")}),l.jsx("option",{value:"3600",children:r("settings.autoLock1Hour")}),l.jsx("option",{value:"14400",children:r("settings.autoLock4Hours")}),l.jsx("option",{value:"28800",children:r("settings.autoLock8Hours")}),l.jsx("option",{value:"86400",children:r("settings.autoLock24Hours")})]})]})})})]})})},JU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=fa(),[a,i]=I.useState(10);I.useEffect(()=>{(async()=>{const d=await Se.getItem(_y)??10;i(d),e(!1)})()},[e]);const s=async c=>{await Se.setItem(_y,c),await ft("SET_CLIPBOARD_CLEAR_TIMEOUT",c,"background"),i(c)};return l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.clipboardSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:r("settings.clipboardClearTimeout")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.clipboardClearTimeoutDescription")}),l.jsxs("select",{value:a,onChange:c=>s(Number(c.target.value)),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:[l.jsx("option",{value:"0",children:r("settings.clipboardClearDisabled")}),l.jsx("option",{value:"5",children:r("settings.clipboardClear5Seconds")}),l.jsx("option",{value:"10",children:r("settings.clipboardClear10Seconds")}),l.jsx("option",{value:"15",children:r("settings.clipboardClear15Seconds")})]})]})})})]})})},XU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=fa(),[a,i]=I.useState(!0),s=I.useCallback(async()=>{const d=await Se.getItem(My)!==!1;i(d),e(!1)},[e]);I.useEffect(()=>{s()},[s]);const c=async()=>{const d=!a;await Se.setItem(My,d),await ft("TOGGLE_CONTEXT_MENU",{enabled:d},"background"),i(d)};return l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.contextMenu")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:r("settings.rightClickContextMenu")}),l.jsx("p",{className:`text-sm mt-1 ${a?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:r(a?"settings.contextMenuEnabled":"settings.contextMenuDisabled")}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:r("settings.contextMenuDescription")})]}),l.jsx("button",{onClick:c,className:`px-4 py-2 rounded-md transition-colors ${a?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r(a?"common.enabled":"common.disabled")})]})})})]})})},$U=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=fa(),a=zt(),{executeVaultMutationAsync:i}=Ts(),[s,c]=I.useState("en"),[d,m]=I.useState("random"),[f,g]=I.useState("random"),[E,p]=I.useState([]),[N,v]=I.useState([]),x=[{label:r("settings.identityGeneratorSettings.genderOptions.random"),value:"random"},{label:r("settings.identityGeneratorSettings.genderOptions.male"),value:"male"},{label:r("settings.identityGeneratorSettings.genderOptions.female"),value:"female"}];I.useEffect(()=>{const B=mU(),S=uU();if(p(B),v(S),a!=null&&a.sqliteClient){const O=a.sqliteClient.settings.getEffectiveIdentityLanguage(),M=a.sqliteClient.settings.getDefaultIdentityGender(),P=a.sqliteClient.settings.getDefaultIdentityAgeRange();c(O),m(M),g(P)}e(!1)},[a==null?void 0:a.sqliteClient,e]);const T=I.useCallback(async B=>{c(B),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityLanguage",B)})},[a==null?void 0:a.sqliteClient,i]),k=I.useCallback(async B=>{m(B),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityGender",B)})},[a==null?void 0:a.sqliteClient,i]),L=I.useCallback(async B=>{g(B),a!=null&&a.sqliteClient&&await i(async()=>{a.sqliteClient.settings.updateSetting("DefaultIdentityAgeRange",B)})},[a==null?void 0:a.sqliteClient,i]);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.identityGeneratorSettings.languageSection")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:r("settings.identityGeneratorSettings.languageSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.identityGeneratorSettings.languageDescription")}),l.jsx("select",{value:s,onChange:B=>T(B.target.value),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:E.map(B=>l.jsxs("option",{value:B.value,children:[B.flag," ",B.label]},B.value))})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.identityGeneratorSettings.genderSection")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:r("settings.identityGeneratorSettings.genderSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.identityGeneratorSettings.genderDescription")}),l.jsx("select",{value:d,onChange:B=>k(B.target.value),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:x.map(B=>l.jsx("option",{value:B.value,children:B.label},B.value))})]})})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.identityGeneratorSettings.ageRangeSection")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:r("settings.identityGeneratorSettings.ageRangeSection")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:r("settings.identityGeneratorSettings.ageRangeDescription")}),l.jsx("select",{value:f,onChange:B=>L(B.target.value),className:"w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white focus:ring-primary-500 focus:border-primary-500",children:N.map(B=>l.jsx("option",{value:B.value,children:B.value==="random"?r("settings.identityGeneratorSettings.genderOptions.random"):B.label},B.value))})]})})]})]})},ZU=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=fa();return I.useEffect(()=>{e(!1)},[e]),l.jsx("div",{className:"space-y-6",children:l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.language")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-3",children:r("settings.selectLanguage")}),l.jsx(wI,{variant:"dropdown",size:"sm"})]})})})]})})},eM=()=>{const{t:r}=Ze(),{setIsInitialLoading:e}=fa(),[a,i]=I.useState({disabledUrls:[],currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),s=async()=>{const g={active:!0,currentWindow:!0},[E]=await li.tabs.query(g);return E},c=I.useCallback(async()=>{const g=await s(),E=new URL(g.url??"").hostname,p=await Gh(await Vh(E)),N=await Se.getItem(bs)??[],v=await Se.getItem(jy)!==!1,x=!N.includes(p);i({disabledUrls:N,currentUrl:p,isEnabled:x,isGloballyEnabled:v}),e(!1)},[e]);I.useEffect(()=>{c()},[c]);const d=async()=>{const{currentUrl:g,disabledUrls:E,isEnabled:p}=a;let N=[...E];p?N.includes(g)||N.push(g):N=N.filter(v=>v!==g),await Se.setItem(bs,N),i(v=>({...v,disabledUrls:N,isEnabled:!p}))},m=async()=>{await Se.setItem(bs,[]),i(g=>({...g,disabledUrls:[],isEnabled:!0}))},f=async()=>{const g=!a.isGloballyEnabled;await Se.setItem(jy,g),i(E=>({...E,isGloballyEnabled:g}))};return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.globalSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:r("passkeys.settings.passkeyProvider")}),l.jsx("p",{className:`text-sm mt-1 ${a.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isGloballyEnabled?r("settings.activeOnAllSites"):r("settings.disabledOnAllSites")})]}),l.jsx("button",{onClick:f,className:`px-4 py-2 rounded-md transition-colors ${a.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isGloballyEnabled?r("common.enabled"):r("common.disabled")})]})})})]}),a.isGloballyEnabled&&l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.siteSpecificSettings")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"p-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[r("passkeys.settings.passkeyProviderOn"),a.currentUrl]}),l.jsx("p",{className:`text-sm mt-1 ${a.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:a.isEnabled?r("settings.enabledForThisSite"):r("settings.disabledForThisSite")})]}),a.isGloballyEnabled&&l.jsx("button",{onClick:d,className:`px-4 py-2 ml-1 rounded-md transition-colors ${a.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:a.isEnabled?r("common.enabled"):r("common.disabled")})]}),l.jsx("div",{className:"mt-4",children:l.jsx("button",{onClick:m,className:"w-full px-4 py-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 rounded-md text-gray-700 dark:text-gray-300 transition-colors text-sm",children:r("settings.resetAllSiteSettings")})})]})})]})]})},sb="local:theme",nv=I.createContext(void 0),tM=({children:r})=>{const[e,a]=I.useState("system"),[i,s]=I.useState(!1);I.useEffect(()=>{(async()=>{const E=await d();a(E)})()},[]);const c=I.useCallback(g=>{a(g),m(g)},[]),d=async()=>await Se.getItem(sb)||"system",m=async g=>{await Se.setItem(sb,g)};I.useEffect(()=>{const g=()=>{if(e==="system"){const E=window.matchMedia("(prefers-color-scheme: dark)").matches;s(E),document.documentElement.classList.toggle("dark",E)}else{const E=e==="dark";s(E),document.documentElement.classList.toggle("dark",E)}};if(g(),e==="system"){const E=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>g();return E.addEventListener("change",p),()=>E.removeEventListener("change",p)}},[e]);const f=I.useMemo(()=>({theme:e,setTheme:c,isDarkMode:i}),[e,i,c]);return l.jsx(nv.Provider,{value:f,children:r})},aM=()=>{const r=I.useContext(nv);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r},nM=()=>{var K,$;const{t:r}=Ze(),{theme:e,setTheme:a}=aM(),i=dr(),s=Zl(),c=ur(),{setHeaderButtons:d}=mr(),{setIsInitialLoading:m}=fa(),{loadApiUrl:f,getDisplayUrl:g}=RI(),E=La(),[p,N]=I.useState(!1),v=async()=>{const W=await Se.getItem("local:clientUrl");let ne=en.DEFAULT_CLIENT_URL;W&&W.length>0&&(ne=W),window.open(ne,"_blank")};I.useEffect(()=>{const W=l.jsxs("div",{className:"flex items-center gap-2",children:[!pa.isPopup()&&l.jsx(l.Fragment,{children:l.jsx(wn,{onClick:()=>pa.openInNewPopup(),title:r("common.openInNewWindow"),iconType:Fa.EXPAND})}),l.jsx(wn,{onClick:v,title:r("settings.openWebApp"),iconType:Fa.EXTERNAL_LINK})]});return d(W),()=>d(null)},[d,r]);const x=I.useCallback(async()=>{await f(),m(!1)},[m,f]);I.useEffect(()=>{x()},[x]);const T=async W=>{a(W)},k=()=>{N(!0)},L=async()=>{N(!1);try{await c.revokeTokens(),await s.clearAuthUserInitiated()}catch(W){console.error("Error during logout:",W)}},B=async()=>{await ft("LOCK_VAULT",{},"background"),E("/unlock")},S=()=>{E("/settings/autofill")},O=()=>{E("/settings/clipboard")},M=()=>{E("/settings/language")},P=()=>{E("/settings/auto-lock")},G=()=>{E("/settings/unlock-method")},H=()=>{E("/settings/context-menu")},z=()=>{E("/settings/passkeys")},V=()=>{E("/settings/identity-generator")};return l.jsxs(l.Fragment,{children:[l.jsx(Mh,{isOpen:p,onClose:()=>N(!1),onConfirm:L}),l.jsxs("div",{className:"space-y-6",children:[l.jsx("div",{className:"flex justify-between items-center mb-4",children:l.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:r("common.settings")})}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:l.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:(($=(K=i.username)==null?void 0:K[0])==null?void 0:$.toUpperCase())||"?"})})}),l.jsxs("div",{children:[l.jsx("p",{className:"text font-medium text-gray-900 dark:text-white",children:i.username}),l.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:r("common.loggedIn")})]})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("button",{onClick:B,title:r("settings.lock"),className:"p-2 bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-600 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300 rounded-md transition-colors",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":r("settings.lock"),children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),l.jsx("button",{onClick:k,title:r("common.logout"),className:"p-2 bg-red-100 hover:bg-red-200 dark:bg-red-900/30 dark:hover:bg-red-900/50 text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 rounded-md transition-colors",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":r("common.logout"),children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"})})})]})]})})})}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[l.jsxs("button",{onClick:S,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.autofillSettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:z,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.passkeySettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:G,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.unlockMethod.title")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:P,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.autoLockTimeout")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:O,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7v8a2 2 0 002 2h6M8 7V5a2 2 0 012-2h4.586a1 1 0 01.707.293l4.414 4.414a1 1 0 01.293.707V15a2 2 0 01-2 2h-2M8 7H6a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2v-2"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.clipboardSettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:M,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.language")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[l.jsxs("button",{onClick:V,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.identityGenerator")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),l.jsxs("button",{onClick:H,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-3 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16m-7 6h7"})}),l.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:r("settings.contextMenuSettings")})]}),l.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:r("settings.appearance")}),l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:r("settings.theme")}),l.jsxs("div",{className:"flex flex-col space-y-2",children:[l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"system",checked:e==="system",onChange:()=>T("system"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:r("settings.useDefault")})]}),l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"light",checked:e==="light",onChange:()=>T("light"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:r("settings.light")})]}),l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"radio",name:"theme",value:"dark",checked:e==="dark",onChange:()=>T("dark"),className:"mr-2"}),l.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:r("settings.dark")})]})]})]})})})]}),!1,l.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[r("settings.versionPrefix"),en.VERSION," (",g(),")"]})]})]})},rM=()=>{const{t:r}=Ze(),e=zt(),{setIsInitialLoading:a,showLoading:i,hideLoading:s}=fa(),[c,d]=I.useState(void 0),[m,f]=I.useState(null),[g,E]=I.useState(null),[p,N]=I.useState(!1),[v,x]=I.useState(1),[T,k]=I.useState(""),[L,B]=I.useState(""),[S,O]=I.useState(!1),M=I.useCallback(async()=>{try{const[V,K]=await Promise.all([iI(),oI()]);d(V),O(K),a(!1)}catch(V){console.error("Failed to load PIN settings:",V),f(r("common.errors.unknownErrorTryAgain")),a(!1)}},[a,r]);I.useEffect(()=>{M()},[M]);const P=()=>{if(f(null),E(null),!e.dbAvailable){f(r("common.errors.unknownErrorTryAgain"));return}x(1),k(""),B(""),N(!0)},G=V=>{if(V.preventDefault(),f(null),!kh(T)){f(r("settings.unlockMethod.invalidPinFormat"));return}x(2)},H=async V=>{if(V.preventDefault(),f(null),E(null),T!==L){f(r("settings.unlockMethod.pinMismatch"));return}try{i();const $=await Se.getItem("session:encryptionKey");if(!$){f(r("common.errors.unknownErrorTryAgain")),s();return}await Jk(T,$),d(!0),N(!1),x(1),k(""),B(""),E(r("settings.unlockMethod.enableSuccess")),s()}catch(K){console.error("Failed to enable PIN:",K),K instanceof ql?f(r("settings.unlockMethod.invalidPinFormat")):f(r("common.errors.unknownErrorTryAgain")),s()}},z=async()=>{f(null),E(null);try{i(),await Lh(),d(!1),O(!1),s()}catch(V){console.error("Failed to disable PIN:",V),f(r("common.errors.unknownErrorTryAgain")),s()}};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"flex items-start gap-2",children:l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("settings.unlockMethod.introText")})}),l.jsxs("div",{className:"mt-6",children:[m&&l.jsx(As,{type:"error",message:m,className:"mb-4"}),g&&l.jsx(As,{type:"success",message:g,className:"mb-4"}),S&&l.jsx(As,{type:"warning",message:r("settings.unlockMethod.pinLocked"),className:"mb-4"}),l.jsx("section",{children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:r("settings.unlockMethod.pin")}),l.jsx(av,{title:r("common.notice"),content:r("settings.unlockMethod.pinSecurityWarning"),className:"ml-2"})]}),l.jsx("p",{className:"text-sm mt-1 text-gray-600 dark:text-gray-400",children:r("settings.unlockMethod.pinDescription")})]})]}),c!==void 0&&l.jsx("button",{onClick:c&&!S?z:P,className:`px-4 py-2 rounded-md transition-colors ${c&&!S?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:r(c&&!S?"common.enabled":"common.disabled")})]})})})}),l.jsx("section",{className:"mt-4",children:l.jsx("div",{className:"bg-gray-50 dark:bg-gray-700/30 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:l.jsx("div",{className:"p-4",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("svg",{className:"w-5 h-5 mr-2 text-gray-600 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})}),l.jsx("div",{children:l.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:r("settings.unlockMethod.password")})})]}),l.jsx("div",{className:"px-4 py-2 rounded-md bg-green-500 text-white hover:bg-green-600 cursor-not-allowed",children:r("common.enabled")})]})})})}),p&&l.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:l.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-md w-full mx-4 relative",children:[l.jsx("button",{type:"button",onClick:()=>{N(!1),x(1),k(""),B(""),f(null)},className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 transition-colors","aria-label":"Cancel",children:l.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),v===1&&l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:r("settings.unlockMethod.setupPin")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:r("settings.unlockMethod.enterNewPinDescription")}),l.jsxs("form",{onSubmit:G,children:[l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:T,onChange:V=>k(V.target.value.replace(/\D/g,"")),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-center text-2xl tracking-widest",autoFocus:!0})}),m&&l.jsx(As,{type:"error",message:m,className:"mb-4"}),l.jsx(Aa,{type:"submit",children:r("common.next")})]})]}),v===2&&l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:r("settings.unlockMethod.confirmPin")}),l.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:r("settings.unlockMethod.confirmPinDescription")}),l.jsxs("form",{onSubmit:H,children:[l.jsx("div",{className:"mb-4",children:l.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:L,onChange:V=>B(V.target.value.replace(/\D/g,"")),className:"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-white text-center text-2xl tracking-widest",autoFocus:!0})}),m&&l.jsx(As,{type:"error",message:m,className:"mb-4"}),l.jsx(Aa,{type:"submit",children:r("common.confirm")})]})]})]})})]})]})},iM=({routes:r,isLoading:e,message:a,headerButtons:i})=>{const s=Ka(),c=r.find(g=>{const E=g.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${E}$`).test(s.pathname)}),d=(c==null?void 0:c.layout)??"default",m=e&&l.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50 flex items-center justify-center",children:l.jsx($n,{})}),f=l.jsx(Qb,{children:r.map(g=>l.jsx(bh,{path:g.path,element:g.element},g.path))});switch(d){case"passkey":return l.jsxs(s2,{children:[m,a&&l.jsx("p",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:a}),f]});case"auth":return l.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[m,l.jsx(gI,{routes:r,rightButtons:i}),l.jsxs("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"100%"},children:[a&&l.jsx("div",{className:"px-4 pt-0",children:l.jsx("p",{className:"text-red-500 dark:text-red-400 text-sm",children:a})}),f]})]});case"default":default:return l.jsxs(l.Fragment,{children:[m,l.jsx(i2,{routes:r,headerButtons:i,message:a,children:f})]})}},sM=()=>{const{t:r}=Ze(),e=dr(),{isInitialLoading:a}=fa(),[i,s]=ec(!0,150),[c,d]=I.useState(null),{headerButtons:m}=mr(),f=sd.useMemo(()=>[{path:"/",element:l.jsx(CR,{}),showBackButton:!1},{path:"/reinitialize",element:l.jsx(qU,{}),showBackButton:!1},{path:"/login",element:l.jsx(VL,{}),showBackButton:!1,layout:"auth"},{path:"/unlock",element:l.jsx(GL,{}),showBackButton:!1,layout:"auth"},{path:"/unlock-success",element:l.jsx(KL,{}),showBackButton:!1},{path:"/upgrade",element:l.jsx(YL,{}),showBackButton:!1},{path:"/auth-settings",element:l.jsx(J2,{}),showBackButton:!0,title:r("common.settings")},{path:"/items",element:l.jsx(eb,{}),showBackButton:!1},{path:"/items/folder/:folderId",element:l.jsx(eb,{}),showBackButton:!0,title:r("items.title")},{path:"/items/select-type",element:l.jsx(FU,{}),showBackButton:!0,title:r("itemTypes.selectType")},{path:"/items/add",element:l.jsx(JE,{}),showBackButton:!0,title:r("items.addItem")},{path:"/items/deleted",element:l.jsx(jU,{}),showBackButton:!0,title:r("recentlyDeleted.title")},{path:"/items/:id",element:l.jsx(RU,{}),showBackButton:!0,title:r("items.itemDetails")},{path:"/items/:id/edit",element:l.jsx(JE,{}),showBackButton:!0,title:r("items.editItem")},{path:"/passkeys/create",element:l.jsx(GU,{}),layout:"passkey"},{path:"/passkeys/authenticate",element:l.jsx(VU,{}),layout:"passkey"},{path:"/emails",element:l.jsx(vR,{}),showBackButton:!1},{path:"/emails/:id",element:l.jsx(IR,{}),showBackButton:!0,title:r("emails.title")},{path:"/settings",element:l.jsx(nM,{}),showBackButton:!1},{path:"/settings/unlock-method",element:l.jsx(rM,{}),showBackButton:!0,title:r("settings.unlockMethod.title")},{path:"/settings/autofill",element:l.jsx(WU,{}),showBackButton:!0,title:r("settings.autofillSettings")},{path:"/settings/context-menu",element:l.jsx(XU,{}),showBackButton:!0,title:r("settings.contextMenuSettings")},{path:"/settings/clipboard",element:l.jsx(JU,{}),showBackButton:!0,title:r("settings.clipboardSettings")},{path:"/settings/language",element:l.jsx(ZU,{}),showBackButton:!0,title:r("settings.language")},{path:"/settings/auto-lock",element:l.jsx(YU,{}),showBackButton:!0,title:r("settings.autoLockTimeout")},{path:"/settings/passkeys",element:l.jsx(eM,{}),showBackButton:!0,title:r("settings.passkeySettings")},{path:"/settings/identity-generator",element:l.jsx($U,{}),showBackButton:!0,title:r("settings.identityGenerator")}],[r]);return I.useEffect(()=>{a||s(!1)},[a,s]),I.useEffect(()=>{ft("POPUP_HEARTBEAT",{},"background").catch(()=>{});const g=setInterval(()=>{ft("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(g)}},[]),I.useEffect(()=>{window.location.hash&&window.location.hash!=="#/"&&window.location.hash!=="#"||HU()},[]),I.useEffect(()=>{e.globalMessage?d(e.globalMessage):d(null)},[e,e.globalMessage]),l.jsx(kw,{children:l.jsx(g2,{children:l.jsx(iM,{routes:f,isLoading:i,message:c,headerButtons:m})})})},pt=r=>typeof r=="string",Ml=()=>{let r,e;const a=new Promise((i,s)=>{r=i,e=s});return a.resolve=r,a.reject=e,a},ob=r=>r==null?"":""+r,oM=(r,e,a)=>{r.forEach(i=>{e[i]&&(a[i]=e[i])})},lM=/###/g,lb=r=>r&&r.indexOf("###")>-1?r.replace(lM,"."):r,cb=r=>!r||pt(r),Gl=(r,e,a)=>{const i=pt(e)?e.split("."):e;let s=0;for(;s<i.length-1;){if(cb(r))return{};const c=lb(i[s]);!r[c]&&a&&(r[c]=new a),Object.prototype.hasOwnProperty.call(r,c)?r=r[c]:r={},++s}return cb(r)?{}:{obj:r,k:lb(i[s])}},ub=(r,e,a)=>{const{obj:i,k:s}=Gl(r,e,Object);if(i!==void 0||e.length===1){i[s]=a;return}let c=e[e.length-1],d=e.slice(0,e.length-1),m=Gl(r,d,Object);for(;m.obj===void 0&&d.length;)c=`${d[d.length-1]}.${c}`,d=d.slice(0,d.length-1),m=Gl(r,d,Object),m!=null&&m.obj&&typeof m.obj[`${m.k}.${c}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${c}`]=a},cM=(r,e,a,i)=>{const{obj:s,k:c}=Gl(r,e,Object);s[c]=s[c]||[],s[c].push(a)},nd=(r,e)=>{const{obj:a,k:i}=Gl(r,e);if(a&&Object.prototype.hasOwnProperty.call(a,i))return a[i]},uM=(r,e,a)=>{const i=nd(r,a);return i!==void 0?i:nd(e,a)},rv=(r,e,a)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in r?pt(r[i])||r[i]instanceof String||pt(e[i])||e[i]instanceof String?a&&(r[i]=e[i]):rv(r[i],e[i],a):r[i]=e[i]);return r},mo=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var dM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const mM=r=>pt(r)?r.replace(/[&<>"'\/]/g,e=>dM[e]):r;class gM{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const a=this.regExpMap.get(e);if(a!==void 0)return a;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const fM=[" ",",","?","!",";"],hM=new gM(20),AM=(r,e,a)=>{e=e||"",a=a||"";const i=fM.filter(d=>e.indexOf(d)<0&&a.indexOf(d)<0);if(i.length===0)return!0;const s=hM.getRegExp(`(${i.map(d=>d==="?"?"\\?":d).join("|")})`);let c=!s.test(r);if(!c){const d=r.indexOf(a);d>0&&!s.test(r.substring(0,d))&&(c=!0)}return c},gh=(r,e,a=".")=>{if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const i=e.split(a);let s=r;for(let c=0;c<i.length;){if(!s||typeof s!="object")return;let d,m="";for(let f=c;f<i.length;++f)if(f!==c&&(m+=a),m+=i[f],d=s[m],d!==void 0){if(["string","number","boolean"].indexOf(typeof d)>-1&&f<i.length-1)continue;c+=f-c+1;break}s=d}return s},Wl=r=>r==null?void 0:r.replace("_","-"),pM={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var a,i;(i=(a=console==null?void 0:console[r])==null?void 0:a.apply)==null||i.call(a,console,e)}};class rd{constructor(e,a={}){this.init(e,a)}init(e,a={}){this.prefix=a.prefix||"i18next:",this.logger=e||pM,this.options=a,this.debug=a.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,a,i,s){return s&&!this.debug?null:(pt(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[a](e))}create(e){return new rd(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new rd(this.logger,e)}}var kr=new rd;class yd{constructor(){this.observers={}}on(e,a){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const s=this.observers[i].get(a)||0;this.observers[i].set(a,s+1)}),this}off(e,a){if(this.observers[e]){if(!a){delete this.observers[e];return}this.observers[e].delete(a)}}emit(e,...a){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,c])=>{for(let d=0;d<c;d++)s(...a)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,c])=>{for(let d=0;d<c;d++)s.apply(s,[e,...a])})}}class db extends yd{constructor(e,a={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const a=this.options.ns.indexOf(e);a>-1&&this.options.ns.splice(a,1)}getResource(e,a,i,s={}){var g,E;const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,d=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;e.indexOf(".")>-1?m=e.split("."):(m=[e,a],i&&(Array.isArray(i)?m.push(...i):pt(i)&&c?m.push(...i.split(c)):m.push(i)));const f=nd(this.data,m);return!f&&!a&&!i&&e.indexOf(".")>-1&&(e=m[0],a=m[1],i=m.slice(2).join(".")),f||!d||!pt(i)?f:gh((E=(g=this.data)==null?void 0:g[e])==null?void 0:E[a],i,c)}addResource(e,a,i,s,c={silent:!1}){const d=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let m=[e,a];i&&(m=m.concat(d?i.split(d):i)),e.indexOf(".")>-1&&(m=e.split("."),s=a,a=m[1]),this.addNamespaces(a),ub(this.data,m,s),c.silent||this.emit("added",e,a,i,s)}addResources(e,a,i,s={silent:!1}){for(const c in i)(pt(i[c])||Array.isArray(i[c]))&&this.addResource(e,a,c,i[c],{silent:!0});s.silent||this.emit("added",e,a,i)}addResourceBundle(e,a,i,s,c,d={silent:!1,skipCopy:!1}){let m=[e,a];e.indexOf(".")>-1&&(m=e.split("."),s=i,i=a,a=m[1]),this.addNamespaces(a);let f=nd(this.data,m)||{};d.skipCopy||(i=JSON.parse(JSON.stringify(i))),s?rv(f,i,c):f={...f,...i},ub(this.data,m,f),d.silent||this.emit("added",e,a,i)}removeResourceBundle(e,a){this.hasResourceBundle(e,a)&&delete this.data[e][a],this.removeNamespaces(a),this.emit("removed",e,a)}hasResourceBundle(e,a){return this.getResource(e,a)!==void 0}getResourceBundle(e,a){return a||(a=this.options.defaultNS),this.getResource(e,a)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const a=this.getDataByLanguage(e);return!!(a&&Object.keys(a)||[]).find(s=>a[s]&&Object.keys(a[s]).length>0)}toJSON(){return this.data}}var iv={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,a,i,s){return r.forEach(c=>{var d;e=((d=this.processors[c])==null?void 0:d.process(e,a,i,s))??e}),e}};const mb={},gb=r=>!pt(r)&&typeof r!="boolean"&&typeof r!="number";class id extends yd{constructor(e,a={}){super(),oM(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=kr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,a={interpolation:{}}){const i={...a};if(e==null)return!1;const s=this.resolve(e,i);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,a){let i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=a.ns||this.options.defaultNS||[];const d=i&&e.indexOf(i)>-1,m=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!AM(e,i,s);if(d&&!m){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:pt(c)?[c]:c};const g=e.split(i);(i!==s||i===s&&this.options.ns.indexOf(g[0])>-1)&&(c=g.shift()),e=g.join(s)}return{key:e,namespaces:pt(c)?[c]:c}}translate(e,a,i){let s=typeof a=="object"?{...a}:a;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof options=="object"&&(s={...s}),s||(s={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const c=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,d=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:m,namespaces:f}=this.extractFromKey(e[e.length-1],s),g=f[f.length-1];let E=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;E===void 0&&(E=":");const p=s.lng||this.language,N=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return N?c?{res:`${g}${E}${m}`,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${E}${m}`:c?{res:m,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:m;const v=this.resolve(e,s);let x=v==null?void 0:v.res;const T=(v==null?void 0:v.usedKey)||m,k=(v==null?void 0:v.exactUsedKey)||m,L=["[object Number]","[object Function]","[object RegExp]"],B=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,O=s.count!==void 0&&!pt(s.count),M=id.hasDefaultValue(s),P=O?this.pluralResolver.getSuffix(p,s.count,s):"",G=s.ordinal&&O?this.pluralResolver.getSuffix(p,s.count,{ordinal:!1}):"",H=O&&!s.ordinal&&s.count===0,z=H&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${P}`]||s[`defaultValue${G}`]||s.defaultValue;let V=x;S&&!x&&M&&(V=z);const K=gb(V),$=Object.prototype.toString.apply(V);if(S&&V&&K&&L.indexOf($)<0&&!(pt(B)&&Array.isArray(V))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,V,{...s,ns:f}):`key '${m} (${this.language})' returned an object instead of string.`;return c?(v.res=W,v.usedParams=this.getUsedParamsDetails(s),v):W}if(d){const W=Array.isArray(V),ne=W?[]:{},he=W?k:T;for(const q in V)if(Object.prototype.hasOwnProperty.call(V,q)){const re=`${he}${d}${q}`;M&&!x?ne[q]=this.translate(re,{...s,defaultValue:gb(z)?z[q]:void 0,joinArrays:!1,ns:f}):ne[q]=this.translate(re,{...s,joinArrays:!1,ns:f}),ne[q]===re&&(ne[q]=V[q])}x=ne}}else if(S&&pt(B)&&Array.isArray(x))x=x.join(B),x&&(x=this.extendTranslation(x,e,s,i));else{let W=!1,ne=!1;!this.isValidLookup(x)&&M&&(W=!0,x=z),this.isValidLookup(x)||(ne=!0,x=m);const q=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ne?void 0:x,re=M&&z!==x&&this.options.updateMissing;if(ne||W||re){if(this.logger.log(re?"updateKey":"missingKey",p,g,m,re?z:x),d){const X=this.resolve(m,{...s,keySeparator:!1});X&&X.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Ee=[];const pe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&pe&&pe[0])for(let X=0;X<pe.length;X++)Ee.push(pe[X]);else this.options.saveMissingTo==="all"?Ee=this.languageUtils.toResolveHierarchy(s.lng||this.language):Ee.push(s.lng||this.language);const j=(X,ee,ie)=>{var Ne;const ve=M&&ie!==x?ie:q;this.options.missingKeyHandler?this.options.missingKeyHandler(X,g,ee,ve,re,s):(Ne=this.backendConnector)!=null&&Ne.saveMissing&&this.backendConnector.saveMissing(X,g,ee,ve,re,s),this.emit("missingKey",X,g,ee,x)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?Ee.forEach(X=>{const ee=this.pluralResolver.getSuffixes(X,s);H&&s[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(ie=>{j([X],m+ie,s[`defaultValue${ie}`]||z)})}):j(Ee,m,z))}x=this.extendTranslation(x,e,s,v,i),ne&&x===m&&this.options.appendNamespaceToMissingKey&&(x=`${g}${E}${m}`),(ne||W)&&this.options.parseMissingKeyHandler&&(x=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${E}${m}`:m,W?x:void 0,s))}return c?(v.res=x,v.usedParams=this.getUsedParamsDetails(s),v):x}extendTranslation(e,a,i,s,c){var f,g;if((f=this.i18nFormat)!=null&&f.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const E=pt(e)&&(((g=i==null?void 0:i.interpolation)==null?void 0:g.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(E){const v=e.match(this.interpolator.nestingRegexp);p=v&&v.length}let N=i.replace&&!pt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(N={...this.options.interpolation.defaultVariables,...N}),e=this.interpolator.interpolate(e,N,i.lng||this.language||s.usedLng,i),E){const v=e.match(this.interpolator.nestingRegexp),x=v&&v.length;p<x&&(i.nest=!1)}!i.lng&&s&&s.res&&(i.lng=this.language||s.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,(...v)=>(c==null?void 0:c[0])===v[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${a[0]}`),null):this.translate(...v,a),i)),i.interpolation&&this.interpolator.reset()}const d=i.postProcess||this.options.postProcess,m=pt(d)?[d]:d;return e!=null&&(m!=null&&m.length)&&i.applyPostProcessor!==!1&&(e=iv.handle(m,e,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,a={}){let i,s,c,d,m;return pt(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(i))return;const g=this.extractFromKey(f,a),E=g.key;s=E;let p=g.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const N=a.count!==void 0&&!pt(a.count),v=N&&!a.ordinal&&a.count===0,x=a.context!==void 0&&(pt(a.context)||typeof a.context=="number")&&a.context!=="",T=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);p.forEach(k=>{var L,B;this.isValidLookup(i)||(m=k,!mb[`${T[0]}-${k}`]&&((L=this.utils)!=null&&L.hasLoadedNamespace)&&!((B=this.utils)!=null&&B.hasLoadedNamespace(m))&&(mb[`${T[0]}-${k}`]=!0,this.logger.warn(`key "${s}" for languages "${T.join(", ")}" won't get resolved as namespace "${m}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),T.forEach(S=>{var P;if(this.isValidLookup(i))return;d=S;const O=[E];if((P=this.i18nFormat)!=null&&P.addLookupKeys)this.i18nFormat.addLookupKeys(O,E,S,k,a);else{let G;N&&(G=this.pluralResolver.getSuffix(S,a.count,a));const H=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(N&&(O.push(E+G),a.ordinal&&G.indexOf(z)===0&&O.push(E+G.replace(z,this.options.pluralSeparator)),v&&O.push(E+H)),x){const V=`${E}${this.options.contextSeparator}${a.context}`;O.push(V),N&&(O.push(V+G),a.ordinal&&G.indexOf(z)===0&&O.push(V+G.replace(z,this.options.pluralSeparator)),v&&O.push(V+H))}}let M;for(;M=O.pop();)this.isValidLookup(i)||(c=M,i=this.getResource(S,k,M,a))}))})}),{res:i,usedKey:s,exactUsedKey:c,usedLng:d,usedNS:m}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,a,i,s={}){var c;return(c=this.i18nFormat)!=null&&c.getResource?this.i18nFormat.getResource(e,a,i,s):this.resourceStore.getResource(e,a,i,s)}getUsedParamsDetails(e={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!pt(e.replace);let s=i?e.replace:e;if(i&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!i){s={...s};for(const c of a)delete s[c]}return s}static hasDefaultValue(e){const a="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&a===i.substring(0,a.length)&&e[i]!==void 0)return!0;return!1}}class fb{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=kr.create("languageUtils")}getScriptPartFromCode(e){if(e=Wl(e),!e||e.indexOf("-")<0)return null;const a=e.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(e){if(e=Wl(e),!e||e.indexOf("-")<0)return e;const a=e.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(e){if(pt(e)&&e.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(e)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let a;return e.forEach(i=>{if(a)return;const s=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(s))&&(a=s)}),!a&&this.options.supportedLngs&&e.forEach(i=>{if(a)return;const s=this.getScriptPartFromCode(i);if(this.isSupportedCode(s))return a=s;const c=this.getLanguagePartFromCode(i);if(this.isSupportedCode(c))return a=c;a=this.options.supportedLngs.find(d=>{if(d===c)return d;if(!(d.indexOf("-")<0&&c.indexOf("-")<0)&&(d.indexOf("-")>0&&c.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===c||d.indexOf(c)===0&&c.length>1))return d})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(e,a){if(!e)return[];if(typeof e=="function"&&(e=e(a)),pt(e)&&(e=[e]),Array.isArray(e))return e;if(!a)return e.default||[];let i=e[a];return i||(i=e[this.getScriptPartFromCode(a)]),i||(i=e[this.formatLanguageCode(a)]),i||(i=e[this.getLanguagePartFromCode(a)]),i||(i=e.default),i||[]}toResolveHierarchy(e,a){const i=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],e),s=[],c=d=>{d&&(this.isSupportedCode(d)?s.push(d):this.logger.warn(`rejecting language code not found in supportedLngs: ${d}`))};return pt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(e))):pt(e)&&c(this.formatLanguageCode(e)),i.forEach(d=>{s.indexOf(d)<0&&c(this.formatLanguageCode(d))}),s}}const hb={zero:0,one:1,two:2,few:3,many:4,other:5},Ab={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class yM{constructor(e,a={}){this.languageUtils=e,this.options=a,this.logger=kr.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,a){this.rules[e]=a}clearCache(){this.pluralRulesCache={}}getRule(e,a={}){const i=Wl(e==="dev"?"en":e),s=a.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:i,type:s});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let d;try{d=new Intl.PluralRules(i,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ab;if(!e.match(/-|_/))return Ab;const f=this.languageUtils.getLanguagePartFromCode(e);d=this.getRule(f,a)}return this.pluralRulesCache[c]=d,d}needsPlural(e,a={}){let i=this.getRule(e,a);return i||(i=this.getRule("dev",a)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,a,i={}){return this.getSuffixes(e,i).map(s=>`${a}${s}`)}getSuffixes(e,a={}){let i=this.getRule(e,a);return i||(i=this.getRule("dev",a)),i?i.resolvedOptions().pluralCategories.sort((s,c)=>hb[s]-hb[c]).map(s=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,a,i={}){const s=this.getRule(e,i);return s?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s.select(a)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",a,i))}}const pb=(r,e,a,i=".",s=!0)=>{let c=uM(r,e,a);return!c&&s&&pt(a)&&(c=gh(r,a,i),c===void 0&&(c=gh(e,a,i))),c},jf=r=>r.replace(/\$/g,"$$$$");class EM{constructor(e={}){var a;this.logger=kr.create("interpolator"),this.options=e,this.format=((a=e==null?void 0:e.interpolation)==null?void 0:a.format)||(i=>i),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:a,escapeValue:i,useRawValueToEscape:s,prefix:c,prefixEscaped:d,suffix:m,suffixEscaped:f,formatSeparator:g,unescapeSuffix:E,unescapePrefix:p,nestingPrefix:N,nestingPrefixEscaped:v,nestingSuffix:x,nestingSuffixEscaped:T,nestingOptionsSeparator:k,maxReplaces:L,alwaysFormat:B}=e.interpolation;this.escape=a!==void 0?a:mM,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=c?mo(c):d||"{{",this.suffix=m?mo(m):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=E?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":E||"",this.nestingPrefix=N?mo(N):v||mo("$t("),this.nestingSuffix=x?mo(x):T||mo(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=L||1e3,this.alwaysFormat=B!==void 0?B:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(a,i)=>(a==null?void 0:a.source)===i?(a.lastIndex=0,a):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,a,i,s){var v;let c,d,m;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=x=>{if(x.indexOf(this.formatSeparator)<0){const B=pb(a,f,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(B,void 0,i,{...s,...a,interpolationkey:x}):B}const T=x.split(this.formatSeparator),k=T.shift().trim(),L=T.join(this.formatSeparator).trim();return this.format(pb(a,f,k,this.options.keySeparator,this.options.ignoreJSONStructure),L,i,{...s,...a,interpolationkey:k})};this.resetRegExp();const E=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((v=s==null?void 0:s.interpolation)==null?void 0:v.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:x=>jf(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?jf(this.escape(x)):jf(x)}].forEach(x=>{for(m=0;c=x.regex.exec(e);){const T=c[1].trim();if(d=g(T),d===void 0)if(typeof E=="function"){const L=E(e,c,s);d=pt(L)?L:""}else if(s&&Object.prototype.hasOwnProperty.call(s,T))d="";else if(p){d=c[0];continue}else this.logger.warn(`missed to pass in variable ${T} for interpolating ${e}`),d="";else!pt(d)&&!this.useRawValueToEscape&&(d=ob(d));const k=x.safeValue(d);if(e=e.replace(c[0],k),p?(x.regex.lastIndex+=d.length,x.regex.lastIndex-=c[0].length):x.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),e}nest(e,a,i={}){let s,c,d;const m=(f,g)=>{const E=this.nestingOptionsSeparator;if(f.indexOf(E)<0)return f;const p=f.split(new RegExp(`${E}[ ]*{`));let N=`{${p[1]}`;f=p[0],N=this.interpolate(N,d);const v=N.match(/'/g),x=N.match(/"/g);(((v==null?void 0:v.length)??0)%2===0&&!x||x.length%2!==0)&&(N=N.replace(/'/g,'"'));try{d=JSON.parse(N),g&&(d={...g,...d})}catch(T){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,T),`${f}${E}${N}`}return d.defaultValue&&d.defaultValue.indexOf(this.prefix)>-1&&delete d.defaultValue,f};for(;s=this.nestingRegexp.exec(e);){let f=[];d={...i},d=d.replace&&!pt(d.replace)?d.replace:d,d.applyPostProcessor=!1,delete d.defaultValue;const g=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(g!==-1&&(f=s[1].slice(g).split(this.formatSeparator).map(E=>E.trim()).filter(Boolean),s[1]=s[1].slice(0,g)),c=a(m.call(this,s[1].trim(),d),d),c&&s[0]===e&&!pt(c))return c;pt(c)||(c=ob(c)),c||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),c=""),f.length&&(c=f.reduce((E,p)=>this.format(E,p,i.lng,{...i,interpolationkey:s[1].trim()}),c.trim())),e=e.replace(s[0],c),this.regexp.lastIndex=0}return e}}const bM=r=>{let e=r.toLowerCase().trim();const a={};if(r.indexOf("(")>-1){const i=r.split("(");e=i[0].toLowerCase().trim();const s=i[1].substring(0,i[1].length-1);e==="currency"&&s.indexOf(":")<0?a.currency||(a.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?a.range||(a.range=s.trim()):s.split(";").forEach(d=>{if(d){const[m,...f]=d.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),E=m.trim();a[E]||(a[E]=g),g==="false"&&(a[E]=!1),g==="true"&&(a[E]=!0),isNaN(g)||(a[E]=parseInt(g,10))}})}return{formatName:e,formatOptions:a}},yb=r=>{const e={};return(a,i,s)=>{let c=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(c={...c,[s.interpolationkey]:void 0});const d=i+JSON.stringify(c);let m=e[d];return m||(m=r(Wl(i),s),e[d]=m),m(a)}},IM=r=>(e,a,i)=>r(Wl(a),i)(e);class vM{constructor(e={}){this.logger=kr.create("formatter"),this.options=e,this.init(e)}init(e,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const i=a.cacheInBuiltFormats?yb:IM;this.formats={number:i((s,c)=>{const d=new Intl.NumberFormat(s,{...c});return m=>d.format(m)}),currency:i((s,c)=>{const d=new Intl.NumberFormat(s,{...c,style:"currency"});return m=>d.format(m)}),datetime:i((s,c)=>{const d=new Intl.DateTimeFormat(s,{...c});return m=>d.format(m)}),relativetime:i((s,c)=>{const d=new Intl.RelativeTimeFormat(s,{...c});return m=>d.format(m,c.range||"day")}),list:i((s,c)=>{const d=new Intl.ListFormat(s,{...c});return m=>d.format(m)})}}add(e,a){this.formats[e.toLowerCase().trim()]=a}addCached(e,a){this.formats[e.toLowerCase().trim()]=yb(a)}format(e,a,i,s={}){const c=a.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(m=>m.indexOf(")")>-1)){const m=c.findIndex(f=>f.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,m)].join(this.formatSeparator)}return c.reduce((m,f)=>{var p;const{formatName:g,formatOptions:E}=bM(f);if(this.formats[g]){let N=m;try{const v=((p=s==null?void 0:s.formatParams)==null?void 0:p[s.interpolationkey])||{},x=v.locale||v.lng||s.locale||s.lng||i;N=this.formats[g](m,x,{...E,...s,...v})}catch(v){this.logger.warn(v)}return N}else this.logger.warn(`there was no format function for ${g}`);return m},e)}}const CM=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class NM extends yd{constructor(e,a,i,s={}){var c,d;super(),this.backend=e,this.store=a,this.services=i,this.languageUtils=i.languageUtils,this.options=s,this.logger=kr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(d=(c=this.backend)==null?void 0:c.init)==null||d.call(c,i,s.backend,s)}queueLoad(e,a,i,s){const c={},d={},m={},f={};return e.forEach(g=>{let E=!0;a.forEach(p=>{const N=`${g}|${p}`;!i.reload&&this.store.hasResourceBundle(g,p)?this.state[N]=2:this.state[N]<0||(this.state[N]===1?d[N]===void 0&&(d[N]=!0):(this.state[N]=1,E=!1,d[N]===void 0&&(d[N]=!0),c[N]===void 0&&(c[N]=!0),f[p]===void 0&&(f[p]=!0)))}),E||(m[g]=!0)}),(Object.keys(c).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(d),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(f)}}loaded(e,a,i){const s=e.split("|"),c=s[0],d=s[1];a&&this.emit("failedLoading",c,d,a),!a&&i&&this.store.addResourceBundle(c,d,i,void 0,void 0,{skipCopy:!0}),this.state[e]=a?-1:2,a&&i&&(this.state[e]=0);const m={};this.queue.forEach(f=>{cM(f.loaded,[c],d),CM(f,e),a&&f.errors.push(a),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{m[g]||(m[g]={});const E=f.loaded[g];E.length&&E.forEach(p=>{m[g][p]===void 0&&(m[g][p]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(f=>!f.done)}read(e,a,i,s=0,c=this.retryTimeout,d){if(!e.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:a,fcName:i,tried:s,wait:c,callback:d});return}this.readingCalls++;const m=(g,E)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(g&&E&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,a,i,s+1,c*2,d)},c);return}d(g,E)},f=this.backend[i].bind(this.backend);if(f.length===2){try{const g=f(e,a);g&&typeof g.then=="function"?g.then(E=>m(null,E)).catch(m):m(null,g)}catch(g){m(g)}return}return f(e,a,m)}prepareLoading(e,a,i={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();pt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),pt(a)&&(a=[a]);const c=this.queueLoad(e,a,i,s);if(!c.toLoad.length)return c.pending.length||s(),null;c.toLoad.forEach(d=>{this.loadOne(d)})}load(e,a,i){this.prepareLoading(e,a,{},i)}reload(e,a,i){this.prepareLoading(e,a,{reload:!0},i)}loadOne(e,a=""){const i=e.split("|"),s=i[0],c=i[1];this.read(s,c,"read",void 0,void 0,(d,m)=>{d&&this.logger.warn(`${a}loading namespace ${c} for language ${s} failed`,d),!d&&m&&this.logger.log(`${a}loaded namespace ${c} for language ${s}`,m),this.loaded(e,d,m)})}saveMissing(e,a,i,s,c,d={},m=()=>{}){var f,g,E,p,N;if((g=(f=this.services)==null?void 0:f.utils)!=null&&g.hasLoadedNamespace&&!((p=(E=this.services)==null?void 0:E.utils)!=null&&p.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${i}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((N=this.backend)!=null&&N.create){const v={...d,isUpdate:c},x=this.backend.create.bind(this.backend);if(x.length<6)try{let T;x.length===5?T=x(e,a,i,s,v):T=x(e,a,i,s),T&&typeof T.then=="function"?T.then(k=>m(null,k)).catch(m):m(null,T)}catch(T){m(T)}else x(e,a,i,s,m,v)}!e||!e[0]||this.store.addResource(e[0],a,i,s)}}}const Eb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),pt(r[1])&&(e.defaultValue=r[1]),pt(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const a=r[3]||r[2];Object.keys(a).forEach(i=>{e[i]=a[i]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),bb=r=>{var e,a;return pt(r.ns)&&(r.ns=[r.ns]),pt(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),pt(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((a=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:a.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},Lu=()=>{},wM=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(a=>{typeof r[a]=="function"&&(r[a]=r[a].bind(r))})};class Yl extends yd{constructor(e={},a){if(super(),this.options=bb(e),this.services={},this.logger=kr,this.modules={external:[]},wM(this),a&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,a),this;setTimeout(()=>{this.init(e,a)},0)}}init(e={},a){this.isInitializing=!0,typeof e=="function"&&(a=e,e={}),e.defaultNS==null&&e.ns&&(pt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=Eb();this.options={...i,...this.options,...bb(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const s=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?kr.init(s(this.modules.logger),this.options):kr.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=vM;const E=new fb(this.options);this.store=new db(this.options.resources,this.options);const p=this.services;p.logger=kr,p.resourceStore=this.store,p.languageUtils=E,p.pluralResolver=new yM(E,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.warn("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),g&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(p.formatter=s(g),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new EM(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new NM(s(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(v,...x)=>{this.emit(v,...x)}),this.modules.languageDetector&&(p.languageDetector=s(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=s(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new id(this.services,this.options),this.translator.on("*",(v,...x)=>{this.emit(v,...x)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,a||(a=Lu),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...E)=>this.store[g](...E)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...E)=>(this.store[g](...E),this)});const m=Ml(),f=()=>{const g=(E,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),m.resolve(p),a(E,p)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?f():setTimeout(f,0),m}loadResources(e,a=Lu){var c,d;let i=a;const s=pt(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const m=[],f=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(p=>{p!=="cimode"&&m.indexOf(p)<0&&m.push(p)})};s?f(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(E=>f(E)),(d=(c=this.options.preload)==null?void 0:c.forEach)==null||d.call(c,g=>f(g)),this.services.backendConnector.load(m,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(g)})}else i(null)}reloadResources(e,a,i){const s=Ml();return typeof e=="function"&&(i=e,e=void 0),typeof a=="function"&&(i=a,a=void 0),e||(e=this.languages),a||(a=this.options.ns),i||(i=Lu),this.services.backendConnector.reload(e,a,c=>{s.resolve(),i(c)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&iv.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let a=0;a<this.languages.length;a++){const i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,a){this.isLanguageChangingTo=e;const i=Ml();this.emit("languageChanging",e);const s=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},c=(m,f)=>{f?this.isLanguageChangingTo===e&&(s(f),this.translator.changeLanguage(f),this.isLanguageChangingTo=void 0,this.emit("languageChanged",f),this.logger.log("languageChanged",f)):this.isLanguageChangingTo=void 0,i.resolve((...g)=>this.t(...g)),a&&a(m,(...g)=>this.t(...g))},d=m=>{var E,p;!e&&!m&&this.services.languageDetector&&(m=[]);const f=pt(m)?m:m&&m[0],g=this.store.hasLanguageSomeTranslations(f)?f:this.services.languageUtils.getBestMatchFromCodes(pt(m)?[m]:m);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),(p=(E=this.services.languageDetector)==null?void 0:E.cacheUserLanguage)==null||p.call(E,g)),this.loadResources(g,N=>{c(N,g)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(d):this.services.languageDetector.detect(d):d(e),i}getFixedT(e,a,i){const s=(c,d,...m)=>{let f;typeof d!="object"?f=this.options.overloadTranslationOptionHandler([c,d].concat(m)):f={...d},f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||i||s.keyPrefix);const g=this.options.keySeparator||".";let E;return f.keyPrefix&&Array.isArray(c)?E=c.map(p=>`${f.keyPrefix}${g}${p}`):E=f.keyPrefix?`${f.keyPrefix}${g}${c}`:c,this.t(E,f)};return pt(e)?s.lng=e:s.lngs=e,s.ns=a,s.keyPrefix=i,s}t(...e){var a;return(a=this.translator)==null?void 0:a.translate(...e)}exists(...e){var a;return(a=this.translator)==null?void 0:a.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,a={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=a.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const d=(m,f)=>{const g=this.services.backendConnector.state[`${m}|${f}`];return g===-1||g===0||g===2};if(a.precheck){const m=a.precheck(this,d);if(m!==void 0)return m}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(i,e)&&(!s||d(c,e)))}loadNamespaces(e,a){const i=Ml();return this.options.ns?(pt(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{i.resolve(),a&&a(s)}),i):(a&&a(),Promise.resolve())}loadLanguages(e,a){const i=Ml();pt(e)&&(e=[e]);const s=this.options.preload||[],c=e.filter(d=>s.indexOf(d)<0&&this.services.languageUtils.isSupportedCode(d));return c.length?(this.options.preload=s.concat(c),this.loadResources(d=>{i.resolve(),a&&a(d)}),i):(a&&a(),Promise.resolve())}dir(e){var s,c;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";if(Intl.Locale){const d=new Intl.Locale(e);if(d&&d.getTextInfo){const m=d.getTextInfo();if(m&&m.direction)return m.direction}}const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((c=this.services)==null?void 0:c.languageUtils)||new fb(Eb());return e.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},a){return new Yl(e,a)}cloneInstance(e={},a=Lu){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},c=new Yl(s);if((e.debug!==void 0||e.prefix!==void 0)&&(c.logger=c.logger.clone(e)),["store","services","language"].forEach(m=>{c[m]=this[m]}),c.services={...this.services},c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},i){const m=Object.keys(this.store.data).reduce((f,g)=>(f[g]={...this.store.data[g]},f[g]=Object.keys(f[g]).reduce((E,p)=>(E[p]={...f[g][p]},E),f[g]),f),{});c.store=new db(m,s),c.services.resourceStore=c.store}return c.translator=new id(c.services,s),c.translator.on("*",(m,...f)=>{c.emit(m,...f)}),c.init(s,a),c.translator.options=s,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Oa=Yl.createInstance();Oa.createInstance=Yl.createInstance;Oa.createInstance;Oa.dir;Oa.init;Oa.loadResources;Oa.reloadResources;Oa.use;Oa.changeLanguage;Oa.getFixedT;Oa.t;Oa.exists;Oa.setDefaultNamespace;Oa.hasLoadedNamespace;Oa.loadNamespaces;Oa.loadLanguages;const xM=async()=>{const r=await Se.getItem("local:language");if(r&&qu.includes(r))return r;const e=navigator.language.split("-")[0];return qu.includes(e)?e:Sr},TM=async()=>{const r=await xM();await Oa.use(nN).init({resources:_l,lng:r,fallbackLng:Sr,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};TM().catch(r=>{console.error("Failed to initialize i18n:",r),Oa.emit("initialized")});const Ib=()=>{GC.createRoot(document.getElementById("root")).render(l.jsx(Vk,{children:l.jsx(a2,{children:l.jsx(Zk,{children:l.jsx(n2,{children:l.jsx(c2,{children:l.jsx(o2,{children:l.jsx(tM,{children:l.jsx(sM,{})})})})})})})}))};Oa.isInitialized?Ib():Oa.on("initialized",Ib)});export default SM();
