var TD=Object.defineProperty;var kD=(t,e,n)=>e in t?TD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var xD=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ge=(t,e,n)=>kD(t,typeof e!="symbol"?e+"":e,n);var i3=xD((o3,aL)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();try{}catch(t){console.error("[wxt] Failed to initialize plugins",t)}function ss(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function LD(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var mh={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 nE;function DD(){if(nE)return Bl;nE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,s,l){var c=null;if(l!==void 0&&(c=""+l),s.key!==void 0&&(c=""+s.key),"key"in s){l={};for(var m in s)m!=="key"&&(l[m]=s[m])}else l=s;return s=l.ref,{$$typeof:t,type:r,key:c,ref:s!==void 0?s:null,props:l}}return Bl.Fragment=e,Bl.jsx=n,Bl.jsxs=n,Bl}var iE;function RD(){return iE||(iE=1,mh.exports=DD()),mh.exports}var d=RD(),gh={exports:{}},_l={},hh={exports:{}},fh={};/**
 * @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 rE;function UD(){return rE||(rE=1,function(t){function e(J,ie){var be=J.length;J.push(ie);e:for(;0<be;){var se=be-1>>>1,j=J[se];if(0<s(j,ie))J[se]=ie,J[be]=j,be=se;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var ie=J[0],be=J.pop();if(be!==ie){J[0]=be;e:for(var se=0,j=J.length,W=j>>>1;se<W;){var X=2*(se+1)-1,ne=J[X],we=X+1,ce=J[we];if(0>s(ne,be))we<j&&0>s(ce,ne)?(J[se]=ce,J[we]=be,se=we):(J[se]=ne,J[X]=be,se=X);else if(we<j&&0>s(ce,be))J[se]=ce,J[we]=be,se=we;else break e}}return ie}function s(J,ie){var be=J.sortIndex-ie.sortIndex;return be!==0?be:J.id-ie.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,m=c.now();t.unstable_now=function(){return c.now()-m}}var h=[],g=[],A=1,p=null,v=3,w=!1,T=!1,S=!1,k=!1,L=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function F(J){for(var ie=n(g);ie!==null;){if(ie.callback===null)r(g);else if(ie.startTime<=J)r(g),ie.sortIndex=ie.expirationTime,e(h,ie);else break;ie=n(g)}}function B(J){if(S=!1,F(J),!T)if(n(h)!==null)T=!0,V||(V=!0,te());else{var ie=n(g);ie!==null&&le(B,ie.startTime-J)}}var V=!1,O=-1,_=5,z=-1;function Q(){return k?!0:!(t.unstable_now()-z<_)}function K(){if(k=!1,V){var J=t.unstable_now();z=J;var ie=!0;try{e:{T=!1,S&&(S=!1,U(O),O=-1),w=!0;var be=v;try{t:{for(F(J),p=n(h);p!==null&&!(p.expirationTime>J&&Q());){var se=p.callback;if(typeof se=="function"){p.callback=null,v=p.priorityLevel;var j=se(p.expirationTime<=J);if(J=t.unstable_now(),typeof j=="function"){p.callback=j,F(J),ie=!0;break t}p===n(h)&&r(h),F(J)}else r(h);p=n(h)}if(p!==null)ie=!0;else{var W=n(g);W!==null&&le(B,W.startTime-J),ie=!1}}break e}finally{p=null,v=be,w=!1}ie=void 0}}finally{ie?te():V=!1}}}var te;if(typeof x=="function")te=function(){x(K)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,Y=ee.port2;ee.port1.onmessage=K,te=function(){Y.postMessage(null)}}else te=function(){L(K,0)};function le(J,ie){O=L(function(){J(t.unstable_now())},ie)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(J){J.callback=null},t.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<J?Math.floor(1e3/J):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(J){switch(v){case 1:case 2:case 3:var ie=3;break;default:ie=v}var be=v;v=ie;try{return J()}finally{v=be}},t.unstable_requestPaint=function(){k=!0},t.unstable_runWithPriority=function(J,ie){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var be=v;v=J;try{return ie()}finally{v=be}},t.unstable_scheduleCallback=function(J,ie,be){var se=t.unstable_now();switch(typeof be=="object"&&be!==null?(be=be.delay,be=typeof be=="number"&&0<be?se+be:se):be=se,J){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=be+j,J={id:A++,callback:ie,priorityLevel:J,startTime:be,expirationTime:j,sortIndex:-1},be>se?(J.sortIndex=be,e(g,J),n(h)===null&&J===n(g)&&(S?(U(O),O=-1):S=!0,le(B,be-se))):(J.sortIndex=j,e(h,J),T||w||(T=!0,V||(V=!0,te()))),J},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(J){var ie=v;return function(){var be=v;v=ie;try{return J.apply(this,arguments)}finally{v=be}}}}(fh)),fh}var sE;function MD(){return sE||(sE=1,hh.exports=UD()),hh.exports}var ph={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 oE;function BD(){if(oE)return Nt;oE=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),p=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=p&&j[p]||j["@@iterator"],typeof j=="function"?j:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,S={};function k(j,W,X){this.props=j,this.context=W,this.refs=S,this.updater=X||w}k.prototype.isReactComponent={},k.prototype.setState=function(j,W){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,W,"setState")},k.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function L(){}L.prototype=k.prototype;function U(j,W,X){this.props=j,this.context=W,this.refs=S,this.updater=X||w}var x=U.prototype=new L;x.constructor=U,T(x,k.prototype),x.isPureReactComponent=!0;var F=Array.isArray,B={H:null,A:null,T:null,S:null,V:null},V=Object.prototype.hasOwnProperty;function O(j,W,X,ne,we,ce){return X=ce.ref,{$$typeof:t,type:j,key:W,ref:X!==void 0?X:null,props:ce}}function _(j,W){return O(j.type,W,void 0,void 0,void 0,j.props)}function z(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function Q(j){var W={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(X){return W[X]})}var K=/\/+/g;function te(j,W){return typeof j=="object"&&j!==null&&j.key!=null?Q(""+j.key):W.toString(36)}function ee(){}function Y(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(ee,ee):(j.status="pending",j.then(function(W){j.status==="pending"&&(j.status="fulfilled",j.value=W)},function(W){j.status==="pending"&&(j.status="rejected",j.reason=W)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function le(j,W,X,ne,we){var ce=typeof j;(ce==="undefined"||ce==="boolean")&&(j=null);var Ee=!1;if(j===null)Ee=!0;else switch(ce){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(j.$$typeof){case t:case e:Ee=!0;break;case A:return Ee=j._init,le(Ee(j._payload),W,X,ne,we)}}if(Ee)return we=we(j),Ee=ne===""?"."+te(j,0):ne,F(we)?(X="",Ee!=null&&(X=Ee.replace(K,"$&/")+"/"),le(we,W,X,"",function(Pe){return Pe})):we!=null&&(z(we)&&(we=_(we,X+(we.key==null||j&&j.key===we.key?"":(""+we.key).replace(K,"$&/")+"/")+Ee)),W.push(we)),1;Ee=0;var Te=ne===""?".":ne+":";if(F(j))for(var Ce=0;Ce<j.length;Ce++)ne=j[Ce],ce=Te+te(ne,Ce),Ee+=le(ne,W,X,ce,we);else if(Ce=v(j),typeof Ce=="function")for(j=Ce.call(j),Ce=0;!(ne=j.next()).done;)ne=ne.value,ce=Te+te(ne,Ce++),Ee+=le(ne,W,X,ce,we);else if(ce==="object"){if(typeof j.then=="function")return le(Y(j),W,X,ne,we);throw W=String(j),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function J(j,W,X){if(j==null)return j;var ne=[],we=0;return le(j,ne,"","",function(ce){return W.call(X,ce,we++)}),ne}function ie(j){if(j._status===-1){var W=j._result;W=W(),W.then(function(X){(j._status===0||j._status===-1)&&(j._status=1,j._result=X)},function(X){(j._status===0||j._status===-1)&&(j._status=2,j._result=X)}),j._status===-1&&(j._status=0,j._result=W)}if(j._status===1)return j._result.default;throw j._result}var be=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=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(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)};function se(){}return Nt.Children={map:J,forEach:function(j,W,X){J(j,function(){W.apply(this,arguments)},X)},count:function(j){var W=0;return J(j,function(){W++}),W},toArray:function(j){return J(j,function(W){return W})||[]},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=n,Nt.Profiler=s,Nt.PureComponent=U,Nt.StrictMode=r,Nt.Suspense=h,Nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Nt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return B.H.useMemoCache(j)}},Nt.cache=function(j){return function(){return j.apply(null,arguments)}},Nt.cloneElement=function(j,W,X){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ne=T({},j.props),we=j.key,ce=void 0;if(W!=null)for(Ee in W.ref!==void 0&&(ce=void 0),W.key!==void 0&&(we=""+W.key),W)!V.call(W,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&W.ref===void 0||(ne[Ee]=W[Ee]);var Ee=arguments.length-2;if(Ee===1)ne.children=X;else if(1<Ee){for(var Te=Array(Ee),Ce=0;Ce<Ee;Ce++)Te[Ce]=arguments[Ce+2];ne.children=Te}return O(j.type,we,void 0,void 0,ce,ne)},Nt.createContext=function(j){return j={$$typeof:c,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:l,_context:j},j},Nt.createElement=function(j,W,X){var ne,we={},ce=null;if(W!=null)for(ne in W.key!==void 0&&(ce=""+W.key),W)V.call(W,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(we[ne]=W[ne]);var Ee=arguments.length-2;if(Ee===1)we.children=X;else if(1<Ee){for(var Te=Array(Ee),Ce=0;Ce<Ee;Ce++)Te[Ce]=arguments[Ce+2];we.children=Te}if(j&&j.defaultProps)for(ne in Ee=j.defaultProps,Ee)we[ne]===void 0&&(we[ne]=Ee[ne]);return O(j,ce,void 0,void 0,null,we)},Nt.createRef=function(){return{current:null}},Nt.forwardRef=function(j){return{$$typeof:m,render:j}},Nt.isValidElement=z,Nt.lazy=function(j){return{$$typeof:A,_payload:{_status:-1,_result:j},_init:ie}},Nt.memo=function(j,W){return{$$typeof:g,type:j,compare:W===void 0?null:W}},Nt.startTransition=function(j){var W=B.T,X={};B.T=X;try{var ne=j(),we=B.S;we!==null&&we(X,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(se,be)}catch(ce){be(ce)}finally{B.T=W}},Nt.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Nt.use=function(j){return B.H.use(j)},Nt.useActionState=function(j,W,X){return B.H.useActionState(j,W,X)},Nt.useCallback=function(j,W){return B.H.useCallback(j,W)},Nt.useContext=function(j){return B.H.useContext(j)},Nt.useDebugValue=function(){},Nt.useDeferredValue=function(j,W){return B.H.useDeferredValue(j,W)},Nt.useEffect=function(j,W,X){var ne=B.H;if(typeof X=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return ne.useEffect(j,W)},Nt.useId=function(){return B.H.useId()},Nt.useImperativeHandle=function(j,W,X){return B.H.useImperativeHandle(j,W,X)},Nt.useInsertionEffect=function(j,W){return B.H.useInsertionEffect(j,W)},Nt.useLayoutEffect=function(j,W){return B.H.useLayoutEffect(j,W)},Nt.useMemo=function(j,W){return B.H.useMemo(j,W)},Nt.useOptimistic=function(j,W){return B.H.useOptimistic(j,W)},Nt.useReducer=function(j,W,X){return B.H.useReducer(j,W,X)},Nt.useRef=function(j){return B.H.useRef(j)},Nt.useState=function(j){return B.H.useState(j)},Nt.useSyncExternalStore=function(j,W,X){return B.H.useSyncExternalStore(j,W,X)},Nt.useTransition=function(){return B.H.useTransition()},Nt.version="19.1.0",Nt}var lE;function np(){return lE||(lE=1,ph.exports=BD()),ph.exports}var Ah={exports:{}},An={};/**
 * @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 dE;function _D(){if(dE)return An;dE=1;var t=np();function e(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)g+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(h,g,A){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:h,containerInfo:g,implementation:A}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return An.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,An.createPortal=function(h,g){var A=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 l(h,g,null,A)},An.flushSync=function(h){var g=c.T,A=r.p;try{if(c.T=null,r.p=2,h)return h()}finally{c.T=g,r.p=A,r.d.f()}},An.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(h,g))},An.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},An.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var A=g.as,p=m(A,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;A==="style"?r.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:v,fetchPriority:w}):A==="script"&&r.d.X(h,{crossOrigin:p,integrity:v,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},An.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var A=m(g.as,g.crossOrigin);r.d.M(h,{crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(h)},An.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var A=g.as,p=m(A,g.crossOrigin);r.d.L(h,A,{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})}},An.preloadModule=function(h,g){if(typeof h=="string")if(g){var A=m(g.as,g.crossOrigin);r.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(h)},An.requestFormReset=function(h){r.d.r(h)},An.unstable_batchedUpdates=function(h,g){return h(g)},An.useFormState=function(h,g,A){return c.H.useFormState(h,g,A)},An.useFormStatus=function(){return c.H.useHostTransitionStatus()},An.version="19.1.0",An}var cE;function Hv(){if(cE)return Ah.exports;cE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Ah.exports=_D(),Ah.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 uE;function FD(){if(uE)return _l;uE=1;var t=MD(),e=np(),n=Hv();function r(a){var i="https://react.dev/errors/"+a;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+a+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var i=a,o=a;if(a.alternate)for(;i.return;)i=i.return;else{a=i;do i=a,(i.flags&4098)!==0&&(o=i.return),a=i.return;while(a)}return i.tag===3?o:null}function c(a){if(a.tag===13){var i=a.memoizedState;if(i===null&&(a=a.alternate,a!==null&&(i=a.memoizedState)),i!==null)return i.dehydrated}return null}function m(a){if(l(a)!==a)throw Error(r(188))}function h(a){var i=a.alternate;if(!i){if(i=l(a),i===null)throw Error(r(188));return i!==a?null:a}for(var o=a,u=i;;){var f=o.return;if(f===null)break;var E=f.alternate;if(E===null){if(u=f.return,u!==null){o=u;continue}break}if(f.child===E.child){for(E=f.child;E;){if(E===o)return m(f),a;if(E===u)return m(f),i;E=E.sibling}throw Error(r(188))}if(o.return!==u.return)o=f,u=E;else{for(var D=!1,P=f.child;P;){if(P===o){D=!0,o=f,u=E;break}if(P===u){D=!0,u=f,o=E;break}P=P.sibling}if(!D){for(P=E.child;P;){if(P===o){D=!0,o=E,u=f;break}if(P===u){D=!0,u=E,o=f;break}P=P.sibling}if(!D)throw Error(r(189))}}if(o.alternate!==u)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?a:i}function g(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a;for(a=a.child;a!==null;){if(i=g(a),i!==null)return i;a=a.sibling}return null}var A=Object.assign,p=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),U=Symbol.for("react.consumer"),x=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),Q=Symbol.for("react.memo_cache_sentinel"),K=Symbol.iterator;function te(a){return a===null||typeof a!="object"?null:(a=K&&a[K]||a["@@iterator"],typeof a=="function"?a:null)}var ee=Symbol.for("react.client.reference");function Y(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ee?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case T:return"Fragment";case k:return"Profiler";case S:return"StrictMode";case B:return"Suspense";case V:return"SuspenseList";case z:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case x:return(a.displayName||"Context")+".Provider";case U:return(a._context.displayName||"Context")+".Consumer";case F:var i=a.render;return a=a.displayName,a||(a=i.displayName||i.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case O:return i=a.displayName||null,i!==null?i:Y(a.type)||"Memo";case _:i=a._payload,a=a._init;try{return Y(a(i))}catch{}}return null}var le=Array.isArray,J=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,be={pending:!1,data:null,method:null,action:null},se=[],j=-1;function W(a){return{current:a}}function X(a){0>j||(a.current=se[j],se[j]=null,j--)}function ne(a,i){j++,se[j]=a.current,a.current=i}var we=W(null),ce=W(null),Ee=W(null),Te=W(null);function Ce(a,i){switch(ne(Ee,i),ne(ce,a),ne(we,null),i.nodeType){case 9:case 11:a=(a=i.documentElement)&&(a=a.namespaceURI)?D0(a):0;break;default:if(a=i.tagName,i=i.namespaceURI)i=D0(i),a=R0(i,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}X(we),ne(we,a)}function Pe(){X(we),X(ce),X(Ee)}function Ve(a){a.memoizedState!==null&&ne(Te,a);var i=we.current,o=R0(i,a.type);i!==o&&(ne(ce,a),ne(we,o))}function bt(a){ce.current===a&&(X(we),X(ce)),Te.current===a&&(X(Te),Ll._currentValue=be)}var gt=Object.prototype.hasOwnProperty,it=t.unstable_scheduleCallback,Ke=t.unstable_cancelCallback,Pt=t.unstable_shouldYield,Se=t.unstable_requestPaint,Fe=t.unstable_now,fe=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,at=t.unstable_LowPriority,wt=t.unstable_IdlePriority,Rt=t.log,Tt=t.unstable_setDisableYieldValue,qt=null,M=null;function C(a){if(typeof Rt=="function"&&Tt(a),M&&typeof M.setStrictMode=="function")try{M.setStrictMode(qt,a)}catch{}}var N=Math.clz32?Math.clz32:pe,G=Math.log,ae=Math.LN2;function pe(a){return a>>>=0,a===0?32:31-(G(a)/ae|0)|0}var Ne=256,_e=4194304;function ht(a){var i=a&42;if(i!==0)return i;switch(a&-a){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 a&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function pt(a,i,o){var u=a.pendingLanes;if(u===0)return 0;var f=0,E=a.suspendedLanes,D=a.pingedLanes;a=a.warmLanes;var P=u&134217727;return P!==0?(u=P&~E,u!==0?f=ht(u):(D&=P,D!==0?f=ht(D):o||(o=P&~a,o!==0&&(f=ht(o))))):(P=u&~E,P!==0?f=ht(P):D!==0?f=ht(D):o||(o=u&~a,o!==0&&(f=ht(o)))),f===0?0:i!==0&&i!==f&&(i&E)===0&&(E=f&-f,o=i&-i,E>=o||E===32&&(o&4194048)!==0)?i:f}function It(a,i){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&i)===0}function At(a,i){switch(a){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 hi(){var a=Ne;return Ne<<=1,(Ne&4194048)===0&&(Ne=256),a}function xa(){var a=_e;return _e<<=1,(_e&62914560)===0&&(_e=4194304),a}function Sa(a){for(var i=[],o=0;31>o;o++)i.push(a);return i}function Yt(a,i){a.pendingLanes|=i,i!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Vt(a,i,o,u,f,E){var D=a.pendingLanes;a.pendingLanes=o,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=o,a.entangledLanes&=o,a.errorRecoveryDisabledLanes&=o,a.shellSuspendCounter=0;var P=a.entanglements,$=a.expirationTimes,he=a.hiddenUpdates;for(o=D&~o;0<o;){var ke=31-N(o),De=1<<ke;P[ke]=0,$[ke]=-1;var Ae=he[ke];if(Ae!==null)for(he[ke]=null,ke=0;ke<Ae.length;ke++){var ye=Ae[ke];ye!==null&&(ye.lane&=-536870913)}o&=~De}u!==0&&Be(a,u,0),E!==0&&f===0&&a.tag!==0&&(a.suspendedLanes|=E&~(D&~i))}function Be(a,i,o){a.pendingLanes|=i,a.suspendedLanes&=~i;var u=31-N(i);a.entangledLanes|=i,a.entanglements[u]=a.entanglements[u]|1073741824|o&4194090}function sn(a,i){var o=a.entangledLanes|=i;for(a=a.entanglements;o;){var u=31-N(o),f=1<<u;f&i|a[u]&i&&(a[u]|=i),o&=~f}}function kt(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Lt(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function La(){var a=ie.p;return a!==0?a:(a=window.event,a===void 0?32:X0(a.type))}function on(a,i){var o=ie.p;try{return ie.p=a,i()}finally{ie.p=o}}var jt=Math.random().toString(36).slice(2),Ut="__reactFiber$"+jt,Qt="__reactProps$"+jt,Ht="__reactContainer$"+jt,ga="__reactEvents$"+jt,fa="__reactListeners$"+jt,Xa="__reactHandles$"+jt,$a="__reactResources$"+jt,_a="__reactMarker$"+jt;function pa(a){delete a[Ut],delete a[Qt],delete a[ga],delete a[fa],delete a[Xa]}function Da(a){var i=a[Ut];if(i)return i;for(var o=a.parentNode;o;){if(i=o[Ht]||o[Ut]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(a=_0(a);a!==null;){if(o=a[Ut])return o;a=_0(a)}return i}a=o,o=a.parentNode}return null}function de(a){if(a=a[Ut]||a[Ht]){var i=a.tag;if(i===5||i===6||i===13||i===26||i===27||i===3)return a}return null}function Oe(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a.stateNode;throw Error(r(33))}function Qe(a){var i=a[$a];return i||(i=a[$a]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function We(a){a[_a]=!0}var ot=new Set,Me={};function q(a,i){Ie(a,i),Ie(a+"Capture",i)}function Ie(a,i){for(Me[a]=i,a=0;a<i.length;a++)ot.add(i[a])}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]*$"),rt={},ia={};function $t(a){return gt.call(ia,a)?!0:gt.call(rt,a)?!1:He.test(a)?ia[a]=!0:(rt[a]=!0,!1)}function da(a,i,o){if($t(i))if(o===null)a.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":a.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){a.removeAttribute(i);return}}a.setAttribute(i,""+o)}}function Fa(a,i,o){if(o===null)a.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(i);return}a.setAttribute(i,""+o)}}function wa(a,i,o,u){if(u===null)a.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttributeNS(i,o,""+u)}}var Si,ca;function On(a){if(Si===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Si=i&&i[1]||"",ca=-1<o.stack.indexOf(`
    at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Si+a+ca}var zi=!1;function Ps(a,i){if(!a||zi)return"";zi=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(ye){var Ae=ye}Reflect.construct(a,[],De)}else{try{De.call()}catch(ye){Ae=ye}a.call(De.prototype)}}else{try{throw Error()}catch(ye){Ae=ye}(De=a())&&typeof De.catch=="function"&&De.catch(function(){})}}catch(ye){if(ye&&Ae&&typeof ye.stack=="string")return[ye.stack,Ae.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=u.DetermineComponentFrameRoot(),D=E[0],P=E[1];if(D&&P){var $=D.split(`
`),he=P.split(`
`);for(f=u=0;u<$.length&&!$[u].includes("DetermineComponentFrameRoot");)u++;for(;f<he.length&&!he[f].includes("DetermineComponentFrameRoot");)f++;if(u===$.length||f===he.length)for(u=$.length-1,f=he.length-1;1<=u&&0<=f&&$[u]!==he[f];)f--;for(;1<=u&&0<=f;u--,f--)if($[u]!==he[f]){if(u!==1||f!==1)do if(u--,f--,0>f||$[u]!==he[f]){var ke=`
`+$[u].replace(" at new "," at ");return a.displayName&&ke.includes("<anonymous>")&&(ke=ke.replace("<anonymous>",a.displayName)),ke}while(1<=u&&0<=f);break}}}finally{zi=!1,Error.prepareStackTrace=o}return(o=a?a.displayName||a.name:"")?On(o):""}function Rd(a){switch(a.tag){case 26:case 27:case 5:return On(a.type);case 16:return On("Lazy");case 13:return On("Suspense");case 19:return On("SuspenseList");case 0:case 15:return Ps(a.type,!1);case 11:return Ps(a.type.render,!1);case 1:return Ps(a.type,!0);case 31:return On("Activity");default:return""}}function Ud(a){try{var i="";do i+=Rd(a),a=a.return;while(a);return i}catch(o){return`
Error generating stack: `+o.message+`
`+o.stack}}function Ra(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ra(a){var i=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Qi(a){var i=ra(a)?"checked":"value",o=Object.getOwnPropertyDescriptor(a.constructor.prototype,i),u=""+a[i];if(!a.hasOwnProperty(i)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,E=o.set;return Object.defineProperty(a,i,{configurable:!0,get:function(){return f.call(this)},set:function(D){u=""+D,E.call(this,D)}}),Object.defineProperty(a,i,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(D){u=""+D},stopTracking:function(){a._valueTracker=null,delete a[i]}}}}function Ki(a){a._valueTracker||(a._valueTracker=Qi(a))}function os(a){if(!a)return!1;var i=a._valueTracker;if(!i)return!0;var o=i.getValue(),u="";return a&&(u=ra(a)?a.checked?"true":"false":a.value),a=u,a!==o?(i.setValue(a),!0):!1}function Gi(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var jo=/[\n"\\]/g;function Nn(a){return a.replace(jo,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Ho(a,i,o,u,f,E,D,P){a.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?a.type=D:a.removeAttribute("type"),i!=null?D==="number"?(i===0&&a.value===""||a.value!=i)&&(a.value=""+Ra(i)):a.value!==""+Ra(i)&&(a.value=""+Ra(i)):D!=="submit"&&D!=="reset"||a.removeAttribute("value"),i!=null?js(a,D,Ra(i)):o!=null?js(a,D,Ra(o)):u!=null&&a.removeAttribute("value"),f==null&&E!=null&&(a.defaultChecked=!!E),f!=null&&(a.checked=f&&typeof f!="function"&&typeof f!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+Ra(P):a.removeAttribute("name")}function br(a,i,o,u,f,E,D,P){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(a.type=E),i!=null||o!=null){if(!(E!=="submit"&&E!=="reset"||i!=null))return;o=o!=null?""+Ra(o):"",i=i!=null?""+Ra(i):o,P||i===a.value||(a.value=i),a.defaultValue=i}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,a.checked=P?a.checked:!!u,a.defaultChecked=!!u,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(a.name=D)}function js(a,i,o){i==="number"&&Gi(a.ownerDocument)===a||a.defaultValue===""+o||(a.defaultValue=""+o)}function vr(a,i,o,u){if(a=a.options,i){i={};for(var f=0;f<o.length;f++)i["$"+o[f]]=!0;for(o=0;o<a.length;o++)f=i.hasOwnProperty("$"+a[o].value),a[o].selected!==f&&(a[o].selected=f),f&&u&&(a[o].defaultSelected=!0)}else{for(o=""+Ra(o),i=null,f=0;f<a.length;f++){if(a[f].value===o){a[f].selected=!0,u&&(a[f].defaultSelected=!0);return}i!==null||a[f].disabled||(i=a[f])}i!==null&&(i.selected=!0)}}function Hs(a,i,o){if(i!=null&&(i=""+Ra(i),i!==a.value&&(a.value=i),o==null)){a.defaultValue!==i&&(a.defaultValue=i);return}a.defaultValue=o!=null?""+Ra(o):""}function Vo(a,i,o,u){if(i==null){if(u!=null){if(o!=null)throw Error(r(92));if(le(u)){if(1<u.length)throw Error(r(93));u=u[0]}o=u}o==null&&(o=""),i=o}o=Ra(i),a.defaultValue=o,u=a.textContent,u===o&&u!==""&&u!==null&&(a.value=u)}function Ni(a,i){if(i){var o=a.firstChild;if(o&&o===a.lastChild&&o.nodeType===3){o.nodeValue=i;return}}a.textContent=i}var zo=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 Md(a,i,o){var u=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?u?a.setProperty(i,""):i==="float"?a.cssFloat="":a[i]="":u?a.setProperty(i,o):typeof o!="number"||o===0||zo.has(i)?i==="float"?a.cssFloat=o:a[i]=(""+o).trim():a[i]=o+"px"}function ls(a,i,o){if(i!=null&&typeof i!="object")throw Error(r(62));if(a=a.style,o!=null){for(var u in o)!o.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?a.setProperty(u,""):u==="float"?a.cssFloat="":a[u]="");for(var f in i)u=i[f],i.hasOwnProperty(f)&&o[f]!==u&&Md(a,f,u)}else for(var E in i)i.hasOwnProperty(E)&&Md(a,E,i[E])}function wr(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Wi=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"]]),Qo=/^[\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 Tn(a){return Qo.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}var ti=null;function qi(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ir=null,Ze=null;function Vs(a){var i=de(a);if(i&&(a=i.stateNode)){var o=a[Qt]||null;e:switch(a=i.stateNode,i.type){case"input":if(Ho(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=a;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Nn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var u=o[i];if(u!==a&&u.form===a.form){var f=u[Qt]||null;if(!f)throw Error(r(90));Ho(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<o.length;i++)u=o[i],u.form===a.form&&os(u)}break e;case"textarea":Hs(a,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&vr(a,!!o.multiple,i,!1)}}}var Cr=!1;function Ko(a,i,o){if(Cr)return a(i,o);Cr=!0;try{var u=a(i);return u}finally{if(Cr=!1,(Ir!==null||Ze!==null)&&(bc(),Ir&&(i=Ir,a=Ze,Ze=Ir=null,Vs(i),a)))for(i=0;i<a.length;i++)Vs(a[i])}}function Sr(a,i){var o=a.stateNode;if(o===null)return null;var u=o[Qt]||null;if(u===null)return null;o=u[i];e:switch(i){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)||(a=a.type,u=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!u;break e;default:a=!1}if(a)return null;if(o&&typeof o!="function")throw Error(r(231,i,typeof o));return o}var vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ai=!1;if(vn)try{var fi={};Object.defineProperty(fi,"passive",{get:function(){ai=!0}}),window.addEventListener("test",fi,fi),window.removeEventListener("test",fi,fi)}catch{ai=!1}var ni=null,y=null,I=null;function R(){if(I)return I;var a,i=y,o=i.length,u,f="value"in ni?ni.value:ni.textContent,E=f.length;for(a=0;a<o&&i[a]===f[a];a++);var D=o-a;for(u=1;u<=D&&i[o-u]===f[E-u];u++);return I=f.slice(a,1<u?1-u:void 0)}function H(a){var i=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&i===13&&(a=13)):a=i,a===10&&(a=13),32<=a||a===13?a:0}function Z(){return!0}function me(){return!1}function ve(a){function i(o,u,f,E,D){this._reactName=o,this._targetInst=f,this.type=u,this.nativeEvent=E,this.target=D,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(o=a[P],this[P]=o?o(E):E[P]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?Z:me,this.isPropagationStopped=me,this}return A(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Z)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Z)},persist:function(){},isPersistent:Z}),i}var qe={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ct=ve(qe),yt=A({},qe,{view:0,detail:0}),Aa=ve(yt),Za,zs,ds,cs=A({},yt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qo,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==ds&&(ds&&a.type==="mousemove"?(Za=a.screenX-ds.screenX,zs=a.screenY-ds.screenY):zs=Za=0,ds=a),Za)},movementY:function(a){return"movementY"in a?a.movementY:zs}}),Bd=ve(cs),_d=A({},cs,{dataTransfer:0}),em=ve(_d),tm=A({},yt,{relatedTarget:0}),Go=ve(tm),am=A({},qe,{animationName:0,elapsedTime:0,pseudoElement:0}),nm=ve(am),im=A({},qe,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),rm=ve(im),sm=A({},qe,{data:0}),Wo=ve(sm),om={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lm={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"},dm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cm(a){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(a):(a=dm[a])?!!i[a]:!1}function qo(){return cm}var um=A({},yt,{key:function(a){if(a.key){var i=om[a.key]||a.key;if(i!=="Unidentified")return i}return a.type==="keypress"?(a=H(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?lm[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qo,charCode:function(a){return a.type==="keypress"?H(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?H(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),mm=ve(um),Fd=A({},cs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Od=ve(Fd),gm=A({},yt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qo}),hm=ve(gm),fm=A({},qe,{propertyName:0,elapsedTime:0,pseudoElement:0}),pm=ve(fm),Am=A({},cs,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Pd=ve(Am),ym=A({},qe,{newState:0,oldState:0}),Em=ve(ym),bm=[9,13,27,32],Nr=vn&&"CompositionEvent"in window,Tr=null;vn&&"documentMode"in document&&(Tr=document.documentMode);var jd=vn&&"TextEvent"in window&&!Tr,Yo=vn&&(!Nr||Tr&&8<Tr&&11>=Tr),ue=" ",Ue=!1;function Ye(a,i){switch(a){case"keyup":return bm.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function st(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ct=!1;function Jt(a,i){switch(a){case"compositionend":return st(i);case"keypress":return i.which!==32?null:(Ue=!0,ue);case"textInput":return a=i.data,a===ue&&Ue?null:a;default:return null}}function Pn(a,i){if(ct)return a==="compositionend"||!Nr&&Ye(a,i)?(a=R(),I=y=ni=null,ct=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Yo&&i.locale!=="ko"?null:i.data;default:return null}}var kn={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 fn(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i==="input"?!!kn[a.type]:i==="textarea"}function xn(a,i,o,u){Ir?Ze?Ze.push(u):Ze=[u]:Ir=u,i=Nc(i,"onChange"),0<i.length&&(o=new Ct("onChange","change",null,o,u),a.push({event:o,listeners:i}))}var Yi=null,jn=null;function vm(a){N0(a,0)}function Hd(a){var i=Oe(a);if(os(i))return a}function Wp(a,i){if(a==="change")return i}var qp=!1;if(vn){var wm;if(vn){var Im="oninput"in document;if(!Im){var Yp=document.createElement("div");Yp.setAttribute("oninput","return;"),Im=typeof Yp.oninput=="function"}wm=Im}else wm=!1;qp=wm&&(!document.documentMode||9<document.documentMode)}function Jp(){Yi&&(Yi.detachEvent("onpropertychange",Xp),jn=Yi=null)}function Xp(a){if(a.propertyName==="value"&&Hd(jn)){var i=[];xn(i,jn,a,qi(a)),Ko(vm,i)}}function nL(a,i,o){a==="focusin"?(Jp(),Yi=i,jn=o,Yi.attachEvent("onpropertychange",Xp)):a==="focusout"&&Jp()}function iL(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Hd(jn)}function rL(a,i){if(a==="click")return Hd(i)}function sL(a,i){if(a==="input"||a==="change")return Hd(i)}function oL(a,i){return a===i&&(a!==0||1/a===1/i)||a!==a&&i!==i}var Hn=typeof Object.is=="function"?Object.is:oL;function Jo(a,i){if(Hn(a,i))return!0;if(typeof a!="object"||a===null||typeof i!="object"||i===null)return!1;var o=Object.keys(a),u=Object.keys(i);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var f=o[u];if(!gt.call(i,f)||!Hn(a[f],i[f]))return!1}return!0}function $p(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Zp(a,i){var o=$p(a);a=0;for(var u;o;){if(o.nodeType===3){if(u=a+o.textContent.length,a<=i&&u>=i)return{node:o,offset:i-a};a=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=$p(o)}}function eA(a,i){return a&&i?a===i?!0:a&&a.nodeType===3?!1:i&&i.nodeType===3?eA(a,i.parentNode):"contains"in a?a.contains(i):a.compareDocumentPosition?!!(a.compareDocumentPosition(i)&16):!1:!1}function tA(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var i=Gi(a.document);i instanceof a.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)a=i.contentWindow;else break;i=Gi(a.document)}return i}function Cm(a){var i=a&&a.nodeName&&a.nodeName.toLowerCase();return i&&(i==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||i==="textarea"||a.contentEditable==="true")}var lL=vn&&"documentMode"in document&&11>=document.documentMode,Qs=null,Sm=null,Xo=null,Nm=!1;function aA(a,i,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Nm||Qs==null||Qs!==Gi(u)||(u=Qs,"selectionStart"in u&&Cm(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}),Xo&&Jo(Xo,u)||(Xo=u,u=Nc(Sm,"onSelect"),0<u.length&&(i=new Ct("onSelect","select",null,i,o),a.push({event:i,listeners:u}),i.target=Qs)))}function us(a,i){var o={};return o[a.toLowerCase()]=i.toLowerCase(),o["Webkit"+a]="webkit"+i,o["Moz"+a]="moz"+i,o}var Ks={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionrun:us("Transition","TransitionRun"),transitionstart:us("Transition","TransitionStart"),transitioncancel:us("Transition","TransitionCancel"),transitionend:us("Transition","TransitionEnd")},Tm={},nA={};vn&&(nA=document.createElement("div").style,"AnimationEvent"in window||(delete Ks.animationend.animation,delete Ks.animationiteration.animation,delete Ks.animationstart.animation),"TransitionEvent"in window||delete Ks.transitionend.transition);function ms(a){if(Tm[a])return Tm[a];if(!Ks[a])return a;var i=Ks[a],o;for(o in i)if(i.hasOwnProperty(o)&&o in nA)return Tm[a]=i[o];return a}var iA=ms("animationend"),rA=ms("animationiteration"),sA=ms("animationstart"),dL=ms("transitionrun"),cL=ms("transitionstart"),uL=ms("transitioncancel"),oA=ms("transitionend"),lA=new Map,km="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(" ");km.push("scrollEnd");function pi(a,i){lA.set(a,i),q(i,[a])}var dA=new WeakMap;function ii(a,i){if(typeof a=="object"&&a!==null){var o=dA.get(a);return o!==void 0?o:(i={value:a,source:i,stack:Ud(i)},dA.set(a,i),i)}return{value:a,source:i,stack:Ud(i)}}var ri=[],Gs=0,xm=0;function Vd(){for(var a=Gs,i=xm=Gs=0;i<a;){var o=ri[i];ri[i++]=null;var u=ri[i];ri[i++]=null;var f=ri[i];ri[i++]=null;var E=ri[i];if(ri[i++]=null,u!==null&&f!==null){var D=u.pending;D===null?f.next=f:(f.next=D.next,D.next=f),u.pending=f}E!==0&&cA(o,f,E)}}function zd(a,i,o,u){ri[Gs++]=a,ri[Gs++]=i,ri[Gs++]=o,ri[Gs++]=u,xm|=u,a.lanes|=u,a=a.alternate,a!==null&&(a.lanes|=u)}function Lm(a,i,o,u){return zd(a,i,o,u),Qd(a)}function Ws(a,i){return zd(a,null,null,i),Qd(a)}function cA(a,i,o){a.lanes|=o;var u=a.alternate;u!==null&&(u.lanes|=o);for(var f=!1,E=a.return;E!==null;)E.childLanes|=o,u=E.alternate,u!==null&&(u.childLanes|=o),E.tag===22&&(a=E.stateNode,a===null||a._visibility&1||(f=!0)),a=E,E=E.return;return a.tag===3?(E=a.stateNode,f&&i!==null&&(f=31-N(o),a=E.hiddenUpdates,u=a[f],u===null?a[f]=[i]:u.push(i),i.lane=o|536870912),E):null}function Qd(a){if(50<wl)throw wl=0,_g=null,Error(r(185));for(var i=a.return;i!==null;)a=i,i=a.return;return a.tag===3?a.stateNode:null}var qs={};function mL(a,i,o,u){this.tag=a,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=i,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 Vn(a,i,o,u){return new mL(a,i,o,u)}function Dm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Ji(a,i){var o=a.alternate;return o===null?(o=Vn(a.tag,i,a.key,a.mode),o.elementType=a.elementType,o.type=a.type,o.stateNode=a.stateNode,o.alternate=a,a.alternate=o):(o.pendingProps=i,o.type=a.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=a.flags&65011712,o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,i=a.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=a.sibling,o.index=a.index,o.ref=a.ref,o.refCleanup=a.refCleanup,o}function uA(a,i){a.flags&=65011714;var o=a.alternate;return o===null?(a.childLanes=0,a.lanes=i,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,i=o.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),a}function Kd(a,i,o,u,f,E){var D=0;if(u=a,typeof a=="function")Dm(a)&&(D=1);else if(typeof a=="string")D=hD(a,o,we.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case z:return a=Vn(31,o,i,f),a.elementType=z,a.lanes=E,a;case T:return gs(o.children,f,E,i);case S:D=8,f|=24;break;case k:return a=Vn(12,o,i,f|2),a.elementType=k,a.lanes=E,a;case B:return a=Vn(13,o,i,f),a.elementType=B,a.lanes=E,a;case V:return a=Vn(19,o,i,f),a.elementType=V,a.lanes=E,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case L:case x:D=10;break e;case U:D=9;break e;case F:D=11;break e;case O:D=14;break e;case _:D=16,u=null;break e}D=29,o=Error(r(130,a===null?"null":typeof a,"")),u=null}return i=Vn(D,o,i,f),i.elementType=a,i.type=u,i.lanes=E,i}function gs(a,i,o,u){return a=Vn(7,a,u,i),a.lanes=o,a}function Rm(a,i,o){return a=Vn(6,a,null,i),a.lanes=o,a}function Um(a,i,o){return i=Vn(4,a.children!==null?a.children:[],a.key,i),i.lanes=o,i.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},i}var Ys=[],Js=0,Gd=null,Wd=0,si=[],oi=0,hs=null,Xi=1,$i="";function fs(a,i){Ys[Js++]=Wd,Ys[Js++]=Gd,Gd=a,Wd=i}function mA(a,i,o){si[oi++]=Xi,si[oi++]=$i,si[oi++]=hs,hs=a;var u=Xi;a=$i;var f=32-N(u)-1;u&=~(1<<f),o+=1;var E=32-N(i)+f;if(30<E){var D=f-f%5;E=(u&(1<<D)-1).toString(32),u>>=D,f-=D,Xi=1<<32-N(i)+f|o<<f|u,$i=E+a}else Xi=1<<E|o<<f|u,$i=a}function Mm(a){a.return!==null&&(fs(a,1),mA(a,1,0))}function Bm(a){for(;a===Gd;)Gd=Ys[--Js],Ys[Js]=null,Wd=Ys[--Js],Ys[Js]=null;for(;a===hs;)hs=si[--oi],si[oi]=null,$i=si[--oi],si[oi]=null,Xi=si[--oi],si[oi]=null}var wn=null,Na=null,Xt=!1,ps=null,Ti=!1,_m=Error(r(519));function As(a){var i=Error(r(418,""));throw el(ii(i,a)),_m}function gA(a){var i=a.stateNode,o=a.type,u=a.memoizedProps;switch(i[Ut]=a,i[Qt]=u,o){case"dialog":Ot("cancel",i),Ot("close",i);break;case"iframe":case"object":case"embed":Ot("load",i);break;case"video":case"audio":for(o=0;o<Cl.length;o++)Ot(Cl[o],i);break;case"source":Ot("error",i);break;case"img":case"image":case"link":Ot("error",i),Ot("load",i);break;case"details":Ot("toggle",i);break;case"input":Ot("invalid",i),br(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0),Ki(i);break;case"select":Ot("invalid",i);break;case"textarea":Ot("invalid",i),Vo(i,u.value,u.defaultValue,u.children),Ki(i)}o=u.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||u.suppressHydrationWarning===!0||L0(i.textContent,o)?(u.popover!=null&&(Ot("beforetoggle",i),Ot("toggle",i)),u.onScroll!=null&&Ot("scroll",i),u.onScrollEnd!=null&&Ot("scrollend",i),u.onClick!=null&&(i.onclick=Tc),i=!0):i=!1,i||As(a)}function hA(a){for(wn=a.return;wn;)switch(wn.tag){case 5:case 13:Ti=!1;return;case 27:case 3:Ti=!0;return;default:wn=wn.return}}function $o(a){if(a!==wn)return!1;if(!Xt)return hA(a),Xt=!0,!1;var i=a.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=a.type,o=!(o!=="form"&&o!=="button")||$g(a.type,a.memoizedProps)),o=!o),o&&Na&&As(a),hA(a),i===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));e:{for(a=a.nextSibling,i=0;a;){if(a.nodeType===8)if(o=a.data,o==="/$"){if(i===0){Na=yi(a.nextSibling);break e}i--}else o!=="$"&&o!=="$!"&&o!=="$?"||i++;a=a.nextSibling}Na=null}}else i===27?(i=Na,zr(a.type)?(a=ah,ah=null,Na=a):Na=i):Na=wn?yi(a.stateNode.nextSibling):null;return!0}function Zo(){Na=wn=null,Xt=!1}function fA(){var a=ps;return a!==null&&(Rn===null?Rn=a:Rn.push.apply(Rn,a),ps=null),a}function el(a){ps===null?ps=[a]:ps.push(a)}var Fm=W(null),ys=null,Zi=null;function kr(a,i,o){ne(Fm,i._currentValue),i._currentValue=o}function er(a){a._currentValue=Fm.current,X(Fm)}function Om(a,i,o){for(;a!==null;){var u=a.alternate;if((a.childLanes&i)!==i?(a.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),a===o)break;a=a.return}}function Pm(a,i,o,u){var f=a.child;for(f!==null&&(f.return=a);f!==null;){var E=f.dependencies;if(E!==null){var D=f.child;E=E.firstContext;e:for(;E!==null;){var P=E;E=f;for(var $=0;$<i.length;$++)if(P.context===i[$]){E.lanes|=o,P=E.alternate,P!==null&&(P.lanes|=o),Om(E.return,o,a),u||(D=null);break e}E=P.next}}else if(f.tag===18){if(D=f.return,D===null)throw Error(r(341));D.lanes|=o,E=D.alternate,E!==null&&(E.lanes|=o),Om(D,o,a),D=null}else D=f.child;if(D!==null)D.return=f;else for(D=f;D!==null;){if(D===a){D=null;break}if(f=D.sibling,f!==null){f.return=D.return,D=f;break}D=D.return}f=D}}function tl(a,i,o,u){a=null;for(var f=i,E=!1;f!==null;){if(!E){if((f.flags&524288)!==0)E=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var D=f.alternate;if(D===null)throw Error(r(387));if(D=D.memoizedProps,D!==null){var P=f.type;Hn(f.pendingProps.value,D.value)||(a!==null?a.push(P):a=[P])}}else if(f===Te.current){if(D=f.alternate,D===null)throw Error(r(387));D.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(a!==null?a.push(Ll):a=[Ll])}f=f.return}a!==null&&Pm(i,a,o,u),i.flags|=262144}function qd(a){for(a=a.firstContext;a!==null;){if(!Hn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Es(a){ys=a,Zi=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function pn(a){return pA(ys,a)}function Yd(a,i){return ys===null&&Es(a),pA(a,i)}function pA(a,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Zi===null){if(a===null)throw Error(r(308));Zi=i,a.dependencies={lanes:0,firstContext:i},a.flags|=524288}else Zi=Zi.next=i;return o}var gL=typeof AbortController<"u"?AbortController:function(){var a=[],i=this.signal={aborted:!1,addEventListener:function(o,u){a.push(u)}};this.abort=function(){i.aborted=!0,a.forEach(function(o){return o()})}},hL=t.unstable_scheduleCallback,fL=t.unstable_NormalPriority,za={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jm(){return{controller:new gL,data:new Map,refCount:0}}function al(a){a.refCount--,a.refCount===0&&hL(fL,function(){a.controller.abort()})}var nl=null,Hm=0,Xs=0,$s=null;function pL(a,i){if(nl===null){var o=nl=[];Hm=0,Xs=zg(),$s={status:"pending",value:void 0,then:function(u){o.push(u)}}}return Hm++,i.then(AA,AA),i}function AA(){if(--Hm===0&&nl!==null){$s!==null&&($s.status="fulfilled");var a=nl;nl=null,Xs=0,$s=null;for(var i=0;i<a.length;i++)(0,a[i])()}}function AL(a,i){var o=[],u={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return a.then(function(){u.status="fulfilled",u.value=i;for(var f=0;f<o.length;f++)(0,o[f])(i)},function(f){for(u.status="rejected",u.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),u}var yA=J.S;J.S=function(a,i){typeof i=="object"&&i!==null&&typeof i.then=="function"&&pL(a,i),yA!==null&&yA(a,i)};var bs=W(null);function Vm(){var a=bs.current;return a!==null?a:ha.pooledCache}function Jd(a,i){i===null?ne(bs,bs.current):ne(bs,i.pool)}function EA(){var a=Vm();return a===null?null:{parent:za._currentValue,pool:a}}var il=Error(r(460)),bA=Error(r(474)),Xd=Error(r(542)),zm={then:function(){}};function vA(a){return a=a.status,a==="fulfilled"||a==="rejected"}function $d(){}function wA(a,i,o){switch(o=a[o],o===void 0?a.push(i):o!==i&&(i.then($d,$d),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,CA(a),a;default:if(typeof i.status=="string")i.then($d,$d);else{if(a=ha,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=i,a.status="pending",a.then(function(u){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=u}},function(u){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw a=i.reason,CA(a),a}throw rl=i,il}}var rl=null;function IA(){if(rl===null)throw Error(r(459));var a=rl;return rl=null,a}function CA(a){if(a===il||a===Xd)throw Error(r(483))}var xr=!1;function Qm(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Km(a,i){a=a.updateQueue,i.updateQueue===a&&(i.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Lr(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Dr(a,i,o){var u=a.updateQueue;if(u===null)return null;if(u=u.shared,(aa&2)!==0){var f=u.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),u.pending=i,i=Qd(a),cA(a,null,o),i}return zd(a,u,i,o),Qd(a)}function sl(a,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var u=i.lanes;u&=a.pendingLanes,o|=u,i.lanes=o,sn(a,o)}}function Gm(a,i){var o=a.updateQueue,u=a.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var f=null,E=null;if(o=o.firstBaseUpdate,o!==null){do{var D={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};E===null?f=E=D:E=E.next=D,o=o.next}while(o!==null);E===null?f=E=i:E=E.next=i}else f=E=i;o={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:E,shared:u.shared,callbacks:u.callbacks},a.updateQueue=o;return}a=o.lastBaseUpdate,a===null?o.firstBaseUpdate=i:a.next=i,o.lastBaseUpdate=i}var Wm=!1;function ol(){if(Wm){var a=$s;if(a!==null)throw a}}function ll(a,i,o,u){Wm=!1;var f=a.updateQueue;xr=!1;var E=f.firstBaseUpdate,D=f.lastBaseUpdate,P=f.shared.pending;if(P!==null){f.shared.pending=null;var $=P,he=$.next;$.next=null,D===null?E=he:D.next=he,D=$;var ke=a.alternate;ke!==null&&(ke=ke.updateQueue,P=ke.lastBaseUpdate,P!==D&&(P===null?ke.firstBaseUpdate=he:P.next=he,ke.lastBaseUpdate=$))}if(E!==null){var De=f.baseState;D=0,ke=he=$=null,P=E;do{var Ae=P.lane&-536870913,ye=Ae!==P.lane;if(ye?(Kt&Ae)===Ae:(u&Ae)===Ae){Ae!==0&&Ae===Xs&&(Wm=!0),ke!==null&&(ke=ke.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var ft=a,lt=P;Ae=i;var la=o;switch(lt.tag){case 1:if(ft=lt.payload,typeof ft=="function"){De=ft.call(la,De,Ae);break e}De=ft;break e;case 3:ft.flags=ft.flags&-65537|128;case 0:if(ft=lt.payload,Ae=typeof ft=="function"?ft.call(la,De,Ae):ft,Ae==null)break e;De=A({},De,Ae);break e;case 2:xr=!0}}Ae=P.callback,Ae!==null&&(a.flags|=64,ye&&(a.flags|=8192),ye=f.callbacks,ye===null?f.callbacks=[Ae]:ye.push(Ae))}else ye={lane:Ae,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ke===null?(he=ke=ye,$=De):ke=ke.next=ye,D|=Ae;if(P=P.next,P===null){if(P=f.shared.pending,P===null)break;ye=P,P=ye.next,ye.next=null,f.lastBaseUpdate=ye,f.shared.pending=null}}while(!0);ke===null&&($=De),f.baseState=$,f.firstBaseUpdate=he,f.lastBaseUpdate=ke,E===null&&(f.shared.lanes=0),Pr|=D,a.lanes=D,a.memoizedState=De}}function SA(a,i){if(typeof a!="function")throw Error(r(191,a));a.call(i)}function NA(a,i){var o=a.callbacks;if(o!==null)for(a.callbacks=null,a=0;a<o.length;a++)SA(o[a],i)}var Zs=W(null),Zd=W(0);function TA(a,i){a=or,ne(Zd,a),ne(Zs,i),or=a|i.baseLanes}function qm(){ne(Zd,or),ne(Zs,Zs.current)}function Ym(){or=Zd.current,X(Zs),X(Zd)}var Rr=0,Dt=null,sa=null,Oa=null,ec=!1,eo=!1,vs=!1,tc=0,dl=0,to=null,yL=0;function Ua(){throw Error(r(321))}function Jm(a,i){if(i===null)return!1;for(var o=0;o<i.length&&o<a.length;o++)if(!Hn(a[o],i[o]))return!1;return!0}function Xm(a,i,o,u,f,E){return Rr=E,Dt=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,J.H=a===null||a.memoizedState===null?cy:uy,vs=!1,E=o(u,f),vs=!1,eo&&(E=xA(i,o,u,f)),kA(a),E}function kA(a){J.H=oc;var i=sa!==null&&sa.next!==null;if(Rr=0,Oa=sa=Dt=null,ec=!1,dl=0,to=null,i)throw Error(r(300));a===null||en||(a=a.dependencies,a!==null&&qd(a)&&(en=!0))}function xA(a,i,o,u){Dt=a;var f=0;do{if(eo&&(to=null),dl=0,eo=!1,25<=f)throw Error(r(301));if(f+=1,Oa=sa=null,a.updateQueue!=null){var E=a.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}J.H=SL,E=i(o,u)}while(eo);return E}function EL(){var a=J.H,i=a.useState()[0];return i=typeof i.then=="function"?cl(i):i,a=a.useState()[0],(sa!==null?sa.memoizedState:null)!==a&&(Dt.flags|=1024),i}function $m(){var a=tc!==0;return tc=0,a}function Zm(a,i,o){i.updateQueue=a.updateQueue,i.flags&=-2053,a.lanes&=~o}function eg(a){if(ec){for(a=a.memoizedState;a!==null;){var i=a.queue;i!==null&&(i.pending=null),a=a.next}ec=!1}Rr=0,Oa=sa=Dt=null,eo=!1,dl=tc=0,to=null}function Ln(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Oa===null?Dt.memoizedState=Oa=a:Oa=Oa.next=a,Oa}function Pa(){if(sa===null){var a=Dt.alternate;a=a!==null?a.memoizedState:null}else a=sa.next;var i=Oa===null?Dt.memoizedState:Oa.next;if(i!==null)Oa=i,sa=a;else{if(a===null)throw Dt.alternate===null?Error(r(467)):Error(r(310));sa=a,a={memoizedState:sa.memoizedState,baseState:sa.baseState,baseQueue:sa.baseQueue,queue:sa.queue,next:null},Oa===null?Dt.memoizedState=Oa=a:Oa=Oa.next=a}return Oa}function tg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cl(a){var i=dl;return dl+=1,to===null&&(to=[]),a=wA(to,a,i),i=Dt,(Oa===null?i.memoizedState:Oa.next)===null&&(i=i.alternate,J.H=i===null||i.memoizedState===null?cy:uy),a}function ac(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return cl(a);if(a.$$typeof===x)return pn(a)}throw Error(r(438,String(a)))}function ag(a){var i=null,o=Dt.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var u=Dt.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=tg(),Dt.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(a),u=0;u<a;u++)o[u]=Q;return i.index++,o}function tr(a,i){return typeof i=="function"?i(a):i}function nc(a){var i=Pa();return ng(i,sa,a)}function ng(a,i,o){var u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=o;var f=a.baseQueue,E=u.pending;if(E!==null){if(f!==null){var D=f.next;f.next=E.next,E.next=D}i.baseQueue=f=E,u.pending=null}if(E=a.baseState,f===null)a.memoizedState=E;else{i=f.next;var P=D=null,$=null,he=i,ke=!1;do{var De=he.lane&-536870913;if(De!==he.lane?(Kt&De)===De:(Rr&De)===De){var Ae=he.revertLane;if(Ae===0)$!==null&&($=$.next={lane:0,revertLane:0,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),De===Xs&&(ke=!0);else if((Rr&Ae)===Ae){he=he.next,Ae===Xs&&(ke=!0);continue}else De={lane:0,revertLane:he.revertLane,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},$===null?(P=$=De,D=E):$=$.next=De,Dt.lanes|=Ae,Pr|=Ae;De=he.action,vs&&o(E,De),E=he.hasEagerState?he.eagerState:o(E,De)}else Ae={lane:De,revertLane:he.revertLane,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},$===null?(P=$=Ae,D=E):$=$.next=Ae,Dt.lanes|=De,Pr|=De;he=he.next}while(he!==null&&he!==i);if($===null?D=E:$.next=P,!Hn(E,a.memoizedState)&&(en=!0,ke&&(o=$s,o!==null)))throw o;a.memoizedState=E,a.baseState=D,a.baseQueue=$,u.lastRenderedState=E}return f===null&&(u.lanes=0),[a.memoizedState,u.dispatch]}function ig(a){var i=Pa(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=a;var u=o.dispatch,f=o.pending,E=i.memoizedState;if(f!==null){o.pending=null;var D=f=f.next;do E=a(E,D.action),D=D.next;while(D!==f);Hn(E,i.memoizedState)||(en=!0),i.memoizedState=E,i.baseQueue===null&&(i.baseState=E),o.lastRenderedState=E}return[E,u]}function LA(a,i,o){var u=Dt,f=Pa(),E=Xt;if(E){if(o===void 0)throw Error(r(407));o=o()}else o=i();var D=!Hn((sa||f).memoizedState,o);D&&(f.memoizedState=o,en=!0),f=f.queue;var P=UA.bind(null,u,f,a);if(ul(2048,8,P,[a]),f.getSnapshot!==i||D||Oa!==null&&Oa.memoizedState.tag&1){if(u.flags|=2048,ao(9,ic(),RA.bind(null,u,f,o,i),null),ha===null)throw Error(r(349));E||(Rr&124)!==0||DA(u,i,o)}return o}function DA(a,i,o){a.flags|=16384,a={getSnapshot:i,value:o},i=Dt.updateQueue,i===null?(i=tg(),Dt.updateQueue=i,i.stores=[a]):(o=i.stores,o===null?i.stores=[a]:o.push(a))}function RA(a,i,o,u){i.value=o,i.getSnapshot=u,MA(i)&&BA(a)}function UA(a,i,o){return o(function(){MA(i)&&BA(a)})}function MA(a){var i=a.getSnapshot;a=a.value;try{var o=i();return!Hn(a,o)}catch{return!0}}function BA(a){var i=Ws(a,2);i!==null&&Wn(i,a,2)}function rg(a){var i=Ln();if(typeof a=="function"){var o=a;if(a=o(),vs){C(!0);try{o()}finally{C(!1)}}}return i.memoizedState=i.baseState=a,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:a},i}function _A(a,i,o,u){return a.baseState=o,ng(a,sa,typeof u=="function"?u:tr)}function bL(a,i,o,u,f){if(sc(a))throw Error(r(485));if(a=i.action,a!==null){var E={payload:f,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){E.listeners.push(D)}};J.T!==null?o(!0):E.isTransition=!1,u(E),o=i.pending,o===null?(E.next=i.pending=E,FA(i,E)):(E.next=o.next,i.pending=o.next=E)}}function FA(a,i){var o=i.action,u=i.payload,f=a.state;if(i.isTransition){var E=J.T,D={};J.T=D;try{var P=o(f,u),$=J.S;$!==null&&$(D,P),OA(a,i,P)}catch(he){sg(a,i,he)}finally{J.T=E}}else try{E=o(f,u),OA(a,i,E)}catch(he){sg(a,i,he)}}function OA(a,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(u){PA(a,i,u)},function(u){return sg(a,i,u)}):PA(a,i,o)}function PA(a,i,o){i.status="fulfilled",i.value=o,jA(i),a.state=o,i=a.pending,i!==null&&(o=i.next,o===i?a.pending=null:(o=o.next,i.next=o,FA(a,o)))}function sg(a,i,o){var u=a.pending;if(a.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=o,jA(i),i=i.next;while(i!==u)}a.action=null}function jA(a){a=a.listeners;for(var i=0;i<a.length;i++)(0,a[i])()}function HA(a,i){return i}function VA(a,i){if(Xt){var o=ha.formState;if(o!==null){e:{var u=Dt;if(Xt){if(Na){t:{for(var f=Na,E=Ti;f.nodeType!==8;){if(!E){f=null;break t}if(f=yi(f.nextSibling),f===null){f=null;break t}}E=f.data,f=E==="F!"||E==="F"?f:null}if(f){Na=yi(f.nextSibling),u=f.data==="F!";break e}}As(u)}u=!1}u&&(i=o[0])}}return o=Ln(),o.memoizedState=o.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:HA,lastRenderedState:i},o.queue=u,o=oy.bind(null,Dt,u),u.dispatch=o,u=rg(!1),E=ug.bind(null,Dt,!1,u.queue),u=Ln(),f={state:i,dispatch:null,action:a,pending:null},u.queue=f,o=bL.bind(null,Dt,f,E,o),f.dispatch=o,u.memoizedState=a,[i,o,!1]}function zA(a){var i=Pa();return QA(i,sa,a)}function QA(a,i,o){if(i=ng(a,i,HA)[0],a=nc(tr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=cl(i)}catch(D){throw D===il?Xd:D}else u=i;i=Pa();var f=i.queue,E=f.dispatch;return o!==i.memoizedState&&(Dt.flags|=2048,ao(9,ic(),vL.bind(null,f,o),null)),[u,E,a]}function vL(a,i){a.action=i}function KA(a){var i=Pa(),o=sa;if(o!==null)return QA(i,o,a);Pa(),i=i.memoizedState,o=Pa();var u=o.queue.dispatch;return o.memoizedState=a,[i,u,!1]}function ao(a,i,o,u){return a={tag:a,create:o,deps:u,inst:i,next:null},i=Dt.updateQueue,i===null&&(i=tg(),Dt.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=a.next=a:(u=o.next,o.next=a,a.next=u,i.lastEffect=a),a}function ic(){return{destroy:void 0,resource:void 0}}function GA(){return Pa().memoizedState}function rc(a,i,o,u){var f=Ln();u=u===void 0?null:u,Dt.flags|=a,f.memoizedState=ao(1|i,ic(),o,u)}function ul(a,i,o,u){var f=Pa();u=u===void 0?null:u;var E=f.memoizedState.inst;sa!==null&&u!==null&&Jm(u,sa.memoizedState.deps)?f.memoizedState=ao(i,E,o,u):(Dt.flags|=a,f.memoizedState=ao(1|i,E,o,u))}function WA(a,i){rc(8390656,8,a,i)}function qA(a,i){ul(2048,8,a,i)}function YA(a,i){return ul(4,2,a,i)}function JA(a,i){return ul(4,4,a,i)}function XA(a,i){if(typeof i=="function"){a=a();var o=i(a);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return a=a(),i.current=a,function(){i.current=null}}function $A(a,i,o){o=o!=null?o.concat([a]):null,ul(4,4,XA.bind(null,i,a),o)}function og(){}function ZA(a,i){var o=Pa();i=i===void 0?null:i;var u=o.memoizedState;return i!==null&&Jm(i,u[1])?u[0]:(o.memoizedState=[a,i],a)}function ey(a,i){var o=Pa();i=i===void 0?null:i;var u=o.memoizedState;if(i!==null&&Jm(i,u[1]))return u[0];if(u=a(),vs){C(!0);try{a()}finally{C(!1)}}return o.memoizedState=[u,i],u}function lg(a,i,o){return o===void 0||(Rr&1073741824)!==0?a.memoizedState=i:(a.memoizedState=o,a=n0(),Dt.lanes|=a,Pr|=a,o)}function ty(a,i,o,u){return Hn(o,i)?o:Zs.current!==null?(a=lg(a,o,u),Hn(a,i)||(en=!0),a):(Rr&42)===0?(en=!0,a.memoizedState=o):(a=n0(),Dt.lanes|=a,Pr|=a,i)}function ay(a,i,o,u,f){var E=ie.p;ie.p=E!==0&&8>E?E:8;var D=J.T,P={};J.T=P,ug(a,!1,i,o);try{var $=f(),he=J.S;if(he!==null&&he(P,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var ke=AL($,u);ml(a,i,ke,Gn(a))}else ml(a,i,u,Gn(a))}catch(De){ml(a,i,{then:function(){},status:"rejected",reason:De},Gn())}finally{ie.p=E,J.T=D}}function wL(){}function dg(a,i,o,u){if(a.tag!==5)throw Error(r(476));var f=ny(a).queue;ay(a,f,i,be,o===null?wL:function(){return iy(a),o(u)})}function ny(a){var i=a.memoizedState;if(i!==null)return i;i={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:be},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:tr,lastRenderedState:o},next:null},a.memoizedState=i,a=a.alternate,a!==null&&(a.memoizedState=i),i}function iy(a){var i=ny(a).next.queue;ml(a,i,{},Gn())}function cg(){return pn(Ll)}function ry(){return Pa().memoizedState}function sy(){return Pa().memoizedState}function IL(a){for(var i=a.return;i!==null;){switch(i.tag){case 24:case 3:var o=Gn();a=Lr(o);var u=Dr(i,a,o);u!==null&&(Wn(u,i,o),sl(u,i,o)),i={cache:jm()},a.payload=i;return}i=i.return}}function CL(a,i,o){var u=Gn();o={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null},sc(a)?ly(i,o):(o=Lm(a,i,o,u),o!==null&&(Wn(o,a,u),dy(o,i,u)))}function oy(a,i,o){var u=Gn();ml(a,i,o,u)}function ml(a,i,o,u){var f={lane:u,revertLane:0,action:o,hasEagerState:!1,eagerState:null,next:null};if(sc(a))ly(i,f);else{var E=a.alternate;if(a.lanes===0&&(E===null||E.lanes===0)&&(E=i.lastRenderedReducer,E!==null))try{var D=i.lastRenderedState,P=E(D,o);if(f.hasEagerState=!0,f.eagerState=P,Hn(P,D))return zd(a,i,f,0),ha===null&&Vd(),!1}catch{}finally{}if(o=Lm(a,i,f,u),o!==null)return Wn(o,a,u),dy(o,i,u),!0}return!1}function ug(a,i,o,u){if(u={lane:2,revertLane:zg(),action:u,hasEagerState:!1,eagerState:null,next:null},sc(a)){if(i)throw Error(r(479))}else i=Lm(a,o,u,2),i!==null&&Wn(i,a,2)}function sc(a){var i=a.alternate;return a===Dt||i!==null&&i===Dt}function ly(a,i){eo=ec=!0;var o=a.pending;o===null?i.next=i:(i.next=o.next,o.next=i),a.pending=i}function dy(a,i,o){if((o&4194048)!==0){var u=i.lanes;u&=a.pendingLanes,o|=u,i.lanes=o,sn(a,o)}}var oc={readContext:pn,use:ac,useCallback:Ua,useContext:Ua,useEffect:Ua,useImperativeHandle:Ua,useLayoutEffect:Ua,useInsertionEffect:Ua,useMemo:Ua,useReducer:Ua,useRef:Ua,useState:Ua,useDebugValue:Ua,useDeferredValue:Ua,useTransition:Ua,useSyncExternalStore:Ua,useId:Ua,useHostTransitionStatus:Ua,useFormState:Ua,useActionState:Ua,useOptimistic:Ua,useMemoCache:Ua,useCacheRefresh:Ua},cy={readContext:pn,use:ac,useCallback:function(a,i){return Ln().memoizedState=[a,i===void 0?null:i],a},useContext:pn,useEffect:WA,useImperativeHandle:function(a,i,o){o=o!=null?o.concat([a]):null,rc(4194308,4,XA.bind(null,i,a),o)},useLayoutEffect:function(a,i){return rc(4194308,4,a,i)},useInsertionEffect:function(a,i){rc(4,2,a,i)},useMemo:function(a,i){var o=Ln();i=i===void 0?null:i;var u=a();if(vs){C(!0);try{a()}finally{C(!1)}}return o.memoizedState=[u,i],u},useReducer:function(a,i,o){var u=Ln();if(o!==void 0){var f=o(i);if(vs){C(!0);try{o(i)}finally{C(!1)}}}else f=i;return u.memoizedState=u.baseState=f,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:f},u.queue=a,a=a.dispatch=CL.bind(null,Dt,a),[u.memoizedState,a]},useRef:function(a){var i=Ln();return a={current:a},i.memoizedState=a},useState:function(a){a=rg(a);var i=a.queue,o=oy.bind(null,Dt,i);return i.dispatch=o,[a.memoizedState,o]},useDebugValue:og,useDeferredValue:function(a,i){var o=Ln();return lg(o,a,i)},useTransition:function(){var a=rg(!1);return a=ay.bind(null,Dt,a.queue,!0,!1),Ln().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,i,o){var u=Dt,f=Ln();if(Xt){if(o===void 0)throw Error(r(407));o=o()}else{if(o=i(),ha===null)throw Error(r(349));(Kt&124)!==0||DA(u,i,o)}f.memoizedState=o;var E={value:o,getSnapshot:i};return f.queue=E,WA(UA.bind(null,u,E,a),[a]),u.flags|=2048,ao(9,ic(),RA.bind(null,u,E,o,i),null),o},useId:function(){var a=Ln(),i=ha.identifierPrefix;if(Xt){var o=$i,u=Xi;o=(u&~(1<<32-N(u)-1)).toString(32)+o,i="«"+i+"R"+o,o=tc++,0<o&&(i+="H"+o.toString(32)),i+="»"}else o=yL++,i="«"+i+"r"+o.toString(32)+"»";return a.memoizedState=i},useHostTransitionStatus:cg,useFormState:VA,useActionState:VA,useOptimistic:function(a){var i=Ln();i.memoizedState=i.baseState=a;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=ug.bind(null,Dt,!0,o),o.dispatch=i,[a,i]},useMemoCache:ag,useCacheRefresh:function(){return Ln().memoizedState=IL.bind(null,Dt)}},uy={readContext:pn,use:ac,useCallback:ZA,useContext:pn,useEffect:qA,useImperativeHandle:$A,useInsertionEffect:YA,useLayoutEffect:JA,useMemo:ey,useReducer:nc,useRef:GA,useState:function(){return nc(tr)},useDebugValue:og,useDeferredValue:function(a,i){var o=Pa();return ty(o,sa.memoizedState,a,i)},useTransition:function(){var a=nc(tr)[0],i=Pa().memoizedState;return[typeof a=="boolean"?a:cl(a),i]},useSyncExternalStore:LA,useId:ry,useHostTransitionStatus:cg,useFormState:zA,useActionState:zA,useOptimistic:function(a,i){var o=Pa();return _A(o,sa,a,i)},useMemoCache:ag,useCacheRefresh:sy},SL={readContext:pn,use:ac,useCallback:ZA,useContext:pn,useEffect:qA,useImperativeHandle:$A,useInsertionEffect:YA,useLayoutEffect:JA,useMemo:ey,useReducer:ig,useRef:GA,useState:function(){return ig(tr)},useDebugValue:og,useDeferredValue:function(a,i){var o=Pa();return sa===null?lg(o,a,i):ty(o,sa.memoizedState,a,i)},useTransition:function(){var a=ig(tr)[0],i=Pa().memoizedState;return[typeof a=="boolean"?a:cl(a),i]},useSyncExternalStore:LA,useId:ry,useHostTransitionStatus:cg,useFormState:KA,useActionState:KA,useOptimistic:function(a,i){var o=Pa();return sa!==null?_A(o,sa,a,i):(o.baseState=a,[a,o.queue.dispatch])},useMemoCache:ag,useCacheRefresh:sy},no=null,gl=0;function lc(a){var i=gl;return gl+=1,no===null&&(no=[]),wA(no,a,i)}function hl(a,i){i=i.props.ref,a.ref=i!==void 0?i:null}function dc(a,i){throw i.$$typeof===p?Error(r(525)):(a=Object.prototype.toString.call(i),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":a)))}function my(a){var i=a._init;return i(a._payload)}function gy(a){function i(oe,re){if(a){var ge=oe.deletions;ge===null?(oe.deletions=[re],oe.flags|=16):ge.push(re)}}function o(oe,re){if(!a)return null;for(;re!==null;)i(oe,re),re=re.sibling;return null}function u(oe){for(var re=new Map;oe!==null;)oe.key!==null?re.set(oe.key,oe):re.set(oe.index,oe),oe=oe.sibling;return re}function f(oe,re){return oe=Ji(oe,re),oe.index=0,oe.sibling=null,oe}function E(oe,re,ge){return oe.index=ge,a?(ge=oe.alternate,ge!==null?(ge=ge.index,ge<re?(oe.flags|=67108866,re):ge):(oe.flags|=67108866,re)):(oe.flags|=1048576,re)}function D(oe){return a&&oe.alternate===null&&(oe.flags|=67108866),oe}function P(oe,re,ge,Le){return re===null||re.tag!==6?(re=Rm(ge,oe.mode,Le),re.return=oe,re):(re=f(re,ge),re.return=oe,re)}function $(oe,re,ge,Le){var Je=ge.type;return Je===T?ke(oe,re,ge.props.children,Le,ge.key):re!==null&&(re.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===_&&my(Je)===re.type)?(re=f(re,ge.props),hl(re,ge),re.return=oe,re):(re=Kd(ge.type,ge.key,ge.props,null,oe.mode,Le),hl(re,ge),re.return=oe,re)}function he(oe,re,ge,Le){return re===null||re.tag!==4||re.stateNode.containerInfo!==ge.containerInfo||re.stateNode.implementation!==ge.implementation?(re=Um(ge,oe.mode,Le),re.return=oe,re):(re=f(re,ge.children||[]),re.return=oe,re)}function ke(oe,re,ge,Le,Je){return re===null||re.tag!==7?(re=gs(ge,oe.mode,Le,Je),re.return=oe,re):(re=f(re,ge),re.return=oe,re)}function De(oe,re,ge){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Rm(""+re,oe.mode,ge),re.return=oe,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return ge=Kd(re.type,re.key,re.props,null,oe.mode,ge),hl(ge,re),ge.return=oe,ge;case w:return re=Um(re,oe.mode,ge),re.return=oe,re;case _:var Le=re._init;return re=Le(re._payload),De(oe,re,ge)}if(le(re)||te(re))return re=gs(re,oe.mode,ge,null),re.return=oe,re;if(typeof re.then=="function")return De(oe,lc(re),ge);if(re.$$typeof===x)return De(oe,Yd(oe,re),ge);dc(oe,re)}return null}function Ae(oe,re,ge,Le){var Je=re!==null?re.key:null;if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return Je!==null?null:P(oe,re,""+ge,Le);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:return ge.key===Je?$(oe,re,ge,Le):null;case w:return ge.key===Je?he(oe,re,ge,Le):null;case _:return Je=ge._init,ge=Je(ge._payload),Ae(oe,re,ge,Le)}if(le(ge)||te(ge))return Je!==null?null:ke(oe,re,ge,Le,null);if(typeof ge.then=="function")return Ae(oe,re,lc(ge),Le);if(ge.$$typeof===x)return Ae(oe,re,Yd(oe,ge),Le);dc(oe,ge)}return null}function ye(oe,re,ge,Le,Je){if(typeof Le=="string"&&Le!==""||typeof Le=="number"||typeof Le=="bigint")return oe=oe.get(ge)||null,P(re,oe,""+Le,Je);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case v:return oe=oe.get(Le.key===null?ge:Le.key)||null,$(re,oe,Le,Je);case w:return oe=oe.get(Le.key===null?ge:Le.key)||null,he(re,oe,Le,Je);case _:var Mt=Le._init;return Le=Mt(Le._payload),ye(oe,re,ge,Le,Je)}if(le(Le)||te(Le))return oe=oe.get(ge)||null,ke(re,oe,Le,Je,null);if(typeof Le.then=="function")return ye(oe,re,ge,lc(Le),Je);if(Le.$$typeof===x)return ye(oe,re,ge,Yd(re,Le),Je);dc(re,Le)}return null}function ft(oe,re,ge,Le){for(var Je=null,Mt=null,nt=re,ut=re=0,an=null;nt!==null&&ut<ge.length;ut++){nt.index>ut?(an=nt,nt=null):an=nt.sibling;var Wt=Ae(oe,nt,ge[ut],Le);if(Wt===null){nt===null&&(nt=an);break}a&&nt&&Wt.alternate===null&&i(oe,nt),re=E(Wt,re,ut),Mt===null?Je=Wt:Mt.sibling=Wt,Mt=Wt,nt=an}if(ut===ge.length)return o(oe,nt),Xt&&fs(oe,ut),Je;if(nt===null){for(;ut<ge.length;ut++)nt=De(oe,ge[ut],Le),nt!==null&&(re=E(nt,re,ut),Mt===null?Je=nt:Mt.sibling=nt,Mt=nt);return Xt&&fs(oe,ut),Je}for(nt=u(nt);ut<ge.length;ut++)an=ye(nt,oe,ut,ge[ut],Le),an!==null&&(a&&an.alternate!==null&&nt.delete(an.key===null?ut:an.key),re=E(an,re,ut),Mt===null?Je=an:Mt.sibling=an,Mt=an);return a&&nt.forEach(function(qr){return i(oe,qr)}),Xt&&fs(oe,ut),Je}function lt(oe,re,ge,Le){if(ge==null)throw Error(r(151));for(var Je=null,Mt=null,nt=re,ut=re=0,an=null,Wt=ge.next();nt!==null&&!Wt.done;ut++,Wt=ge.next()){nt.index>ut?(an=nt,nt=null):an=nt.sibling;var qr=Ae(oe,nt,Wt.value,Le);if(qr===null){nt===null&&(nt=an);break}a&&nt&&qr.alternate===null&&i(oe,nt),re=E(qr,re,ut),Mt===null?Je=qr:Mt.sibling=qr,Mt=qr,nt=an}if(Wt.done)return o(oe,nt),Xt&&fs(oe,ut),Je;if(nt===null){for(;!Wt.done;ut++,Wt=ge.next())Wt=De(oe,Wt.value,Le),Wt!==null&&(re=E(Wt,re,ut),Mt===null?Je=Wt:Mt.sibling=Wt,Mt=Wt);return Xt&&fs(oe,ut),Je}for(nt=u(nt);!Wt.done;ut++,Wt=ge.next())Wt=ye(nt,oe,ut,Wt.value,Le),Wt!==null&&(a&&Wt.alternate!==null&&nt.delete(Wt.key===null?ut:Wt.key),re=E(Wt,re,ut),Mt===null?Je=Wt:Mt.sibling=Wt,Mt=Wt);return a&&nt.forEach(function(ND){return i(oe,ND)}),Xt&&fs(oe,ut),Je}function la(oe,re,ge,Le){if(typeof ge=="object"&&ge!==null&&ge.type===T&&ge.key===null&&(ge=ge.props.children),typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case v:e:{for(var Je=ge.key;re!==null;){if(re.key===Je){if(Je=ge.type,Je===T){if(re.tag===7){o(oe,re.sibling),Le=f(re,ge.props.children),Le.return=oe,oe=Le;break e}}else if(re.elementType===Je||typeof Je=="object"&&Je!==null&&Je.$$typeof===_&&my(Je)===re.type){o(oe,re.sibling),Le=f(re,ge.props),hl(Le,ge),Le.return=oe,oe=Le;break e}o(oe,re);break}else i(oe,re);re=re.sibling}ge.type===T?(Le=gs(ge.props.children,oe.mode,Le,ge.key),Le.return=oe,oe=Le):(Le=Kd(ge.type,ge.key,ge.props,null,oe.mode,Le),hl(Le,ge),Le.return=oe,oe=Le)}return D(oe);case w:e:{for(Je=ge.key;re!==null;){if(re.key===Je)if(re.tag===4&&re.stateNode.containerInfo===ge.containerInfo&&re.stateNode.implementation===ge.implementation){o(oe,re.sibling),Le=f(re,ge.children||[]),Le.return=oe,oe=Le;break e}else{o(oe,re);break}else i(oe,re);re=re.sibling}Le=Um(ge,oe.mode,Le),Le.return=oe,oe=Le}return D(oe);case _:return Je=ge._init,ge=Je(ge._payload),la(oe,re,ge,Le)}if(le(ge))return ft(oe,re,ge,Le);if(te(ge)){if(Je=te(ge),typeof Je!="function")throw Error(r(150));return ge=Je.call(ge),lt(oe,re,ge,Le)}if(typeof ge.then=="function")return la(oe,re,lc(ge),Le);if(ge.$$typeof===x)return la(oe,re,Yd(oe,ge),Le);dc(oe,ge)}return typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint"?(ge=""+ge,re!==null&&re.tag===6?(o(oe,re.sibling),Le=f(re,ge),Le.return=oe,oe=Le):(o(oe,re),Le=Rm(ge,oe.mode,Le),Le.return=oe,oe=Le),D(oe)):o(oe,re)}return function(oe,re,ge,Le){try{gl=0;var Je=la(oe,re,ge,Le);return no=null,Je}catch(nt){if(nt===il||nt===Xd)throw nt;var Mt=Vn(29,nt,null,oe.mode);return Mt.lanes=Le,Mt.return=oe,Mt}finally{}}}var io=gy(!0),hy=gy(!1),li=W(null),ki=null;function Ur(a){var i=a.alternate;ne(Qa,Qa.current&1),ne(li,a),ki===null&&(i===null||Zs.current!==null||i.memoizedState!==null)&&(ki=a)}function fy(a){if(a.tag===22){if(ne(Qa,Qa.current),ne(li,a),ki===null){var i=a.alternate;i!==null&&i.memoizedState!==null&&(ki=a)}}else Mr()}function Mr(){ne(Qa,Qa.current),ne(li,li.current)}function ar(a){X(li),ki===a&&(ki=null),X(Qa)}var Qa=W(0);function cc(a){for(var i=a;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||th(o)))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}function mg(a,i,o,u){i=a.memoizedState,o=o(u,i),o=o==null?i:A({},i,o),a.memoizedState=o,a.lanes===0&&(a.updateQueue.baseState=o)}var gg={enqueueSetState:function(a,i,o){a=a._reactInternals;var u=Gn(),f=Lr(u);f.payload=i,o!=null&&(f.callback=o),i=Dr(a,f,u),i!==null&&(Wn(i,a,u),sl(i,a,u))},enqueueReplaceState:function(a,i,o){a=a._reactInternals;var u=Gn(),f=Lr(u);f.tag=1,f.payload=i,o!=null&&(f.callback=o),i=Dr(a,f,u),i!==null&&(Wn(i,a,u),sl(i,a,u))},enqueueForceUpdate:function(a,i){a=a._reactInternals;var o=Gn(),u=Lr(o);u.tag=2,i!=null&&(u.callback=i),i=Dr(a,u,o),i!==null&&(Wn(i,a,o),sl(i,a,o))}};function py(a,i,o,u,f,E,D){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(u,E,D):i.prototype&&i.prototype.isPureReactComponent?!Jo(o,u)||!Jo(f,E):!0}function Ay(a,i,o,u){a=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,u),i.state!==a&&gg.enqueueReplaceState(i,i.state,null)}function ws(a,i){var o=i;if("ref"in i){o={};for(var u in i)u!=="ref"&&(o[u]=i[u])}if(a=a.defaultProps){o===i&&(o=A({},o));for(var f in a)o[f]===void 0&&(o[f]=a[f])}return o}var uc=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)};function yy(a){uc(a)}function Ey(a){console.error(a)}function by(a){uc(a)}function mc(a,i){try{var o=a.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function vy(a,i,o){try{var u=a.onCaughtError;u(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function hg(a,i,o){return o=Lr(o),o.tag=3,o.payload={element:null},o.callback=function(){mc(a,i)},o}function wy(a){return a=Lr(a),a.tag=3,a}function Iy(a,i,o,u){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var E=u.value;a.payload=function(){return f(E)},a.callback=function(){vy(i,o,u)}}var D=o.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(a.callback=function(){vy(i,o,u),typeof f!="function"&&(jr===null?jr=new Set([this]):jr.add(this));var P=u.stack;this.componentDidCatch(u.value,{componentStack:P!==null?P:""})})}function NL(a,i,o,u,f){if(o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=o.alternate,i!==null&&tl(i,o,f,!0),o=li.current,o!==null){switch(o.tag){case 13:return ki===null?Og():o.alternate===null&&Ta===0&&(Ta=3),o.flags&=-257,o.flags|=65536,o.lanes=f,u===zm?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([u]):i.add(u),jg(a,u,f)),!1;case 22:return o.flags|=65536,u===zm?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([u]):o.add(u)),jg(a,u,f)),!1}throw Error(r(435,o.tag))}return jg(a,u,f),Og(),!1}if(Xt)return i=li.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,u!==_m&&(a=Error(r(422),{cause:u}),el(ii(a,o)))):(u!==_m&&(i=Error(r(423),{cause:u}),el(ii(i,o))),a=a.current.alternate,a.flags|=65536,f&=-f,a.lanes|=f,u=ii(u,o),f=hg(a.stateNode,u,f),Gm(a,f),Ta!==4&&(Ta=2)),!1;var E=Error(r(520),{cause:u});if(E=ii(E,o),vl===null?vl=[E]:vl.push(E),Ta!==4&&(Ta=2),i===null)return!0;u=ii(u,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,a=f&-f,o.lanes|=a,a=hg(o.stateNode,u,a),Gm(o,a),!1;case 1:if(i=o.type,E=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(jr===null||!jr.has(E))))return o.flags|=65536,f&=-f,o.lanes|=f,f=wy(f),Iy(f,a,o,u),Gm(o,f),!1}o=o.return}while(o!==null);return!1}var Cy=Error(r(461)),en=!1;function ln(a,i,o,u){i.child=a===null?hy(i,null,o,u):io(i,a.child,o,u)}function Sy(a,i,o,u,f){o=o.render;var E=i.ref;if("ref"in u){var D={};for(var P in u)P!=="ref"&&(D[P]=u[P])}else D=u;return Es(i),u=Xm(a,i,o,D,E,f),P=$m(),a!==null&&!en?(Zm(a,i,f),nr(a,i,f)):(Xt&&P&&Mm(i),i.flags|=1,ln(a,i,u,f),i.child)}function Ny(a,i,o,u,f){if(a===null){var E=o.type;return typeof E=="function"&&!Dm(E)&&E.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=E,Ty(a,i,E,u,f)):(a=Kd(o.type,null,u,i,i.mode,f),a.ref=i.ref,a.return=i,i.child=a)}if(E=a.child,!wg(a,f)){var D=E.memoizedProps;if(o=o.compare,o=o!==null?o:Jo,o(D,u)&&a.ref===i.ref)return nr(a,i,f)}return i.flags|=1,a=Ji(E,u),a.ref=i.ref,a.return=i,i.child=a}function Ty(a,i,o,u,f){if(a!==null){var E=a.memoizedProps;if(Jo(E,u)&&a.ref===i.ref)if(en=!1,i.pendingProps=u=E,wg(a,f))(a.flags&131072)!==0&&(en=!0);else return i.lanes=a.lanes,nr(a,i,f)}return fg(a,i,o,u,f)}function ky(a,i,o){var u=i.pendingProps,f=u.children,E=a!==null?a.memoizedState:null;if(u.mode==="hidden"){if((i.flags&128)!==0){if(u=E!==null?E.baseLanes|o:o,a!==null){for(f=i.child=a.child,E=0;f!==null;)E=E|f.lanes|f.childLanes,f=f.sibling;i.childLanes=E&~u}else i.childLanes=0,i.child=null;return xy(a,i,u,o)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},a!==null&&Jd(i,E!==null?E.cachePool:null),E!==null?TA(i,E):qm(),fy(i);else return i.lanes=i.childLanes=536870912,xy(a,i,E!==null?E.baseLanes|o:o,o)}else E!==null?(Jd(i,E.cachePool),TA(i,E),Mr(),i.memoizedState=null):(a!==null&&Jd(i,null),qm(),Mr());return ln(a,i,f,o),i.child}function xy(a,i,o,u){var f=Vm();return f=f===null?null:{parent:za._currentValue,pool:f},i.memoizedState={baseLanes:o,cachePool:f},a!==null&&Jd(i,null),qm(),fy(i),a!==null&&tl(a,i,u,!0),null}function gc(a,i){var o=i.ref;if(o===null)a!==null&&a.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(r(284));(a===null||a.ref!==o)&&(i.flags|=4194816)}}function fg(a,i,o,u,f){return Es(i),o=Xm(a,i,o,u,void 0,f),u=$m(),a!==null&&!en?(Zm(a,i,f),nr(a,i,f)):(Xt&&u&&Mm(i),i.flags|=1,ln(a,i,o,f),i.child)}function Ly(a,i,o,u,f,E){return Es(i),i.updateQueue=null,o=xA(i,u,o,f),kA(a),u=$m(),a!==null&&!en?(Zm(a,i,E),nr(a,i,E)):(Xt&&u&&Mm(i),i.flags|=1,ln(a,i,o,E),i.child)}function Dy(a,i,o,u,f){if(Es(i),i.stateNode===null){var E=qs,D=o.contextType;typeof D=="object"&&D!==null&&(E=pn(D)),E=new o(u,E),i.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=gg,i.stateNode=E,E._reactInternals=i,E=i.stateNode,E.props=u,E.state=i.memoizedState,E.refs={},Qm(i),D=o.contextType,E.context=typeof D=="object"&&D!==null?pn(D):qs,E.state=i.memoizedState,D=o.getDerivedStateFromProps,typeof D=="function"&&(mg(i,o,D,u),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(D=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),D!==E.state&&gg.enqueueReplaceState(E,E.state,null),ll(i,u,E,f),ol(),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(a===null){E=i.stateNode;var P=i.memoizedProps,$=ws(o,P);E.props=$;var he=E.context,ke=o.contextType;D=qs,typeof ke=="object"&&ke!==null&&(D=pn(ke));var De=o.getDerivedStateFromProps;ke=typeof De=="function"||typeof E.getSnapshotBeforeUpdate=="function",P=i.pendingProps!==P,ke||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(P||he!==D)&&Ay(i,E,u,D),xr=!1;var Ae=i.memoizedState;E.state=Ae,ll(i,u,E,f),ol(),he=i.memoizedState,P||Ae!==he||xr?(typeof De=="function"&&(mg(i,o,De,u),he=i.memoizedState),($=xr||py(i,o,$,u,Ae,he,D))?(ke||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(i.flags|=4194308)):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=he),E.props=u,E.state=he,E.context=D,u=$):(typeof E.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{E=i.stateNode,Km(a,i),D=i.memoizedProps,ke=ws(o,D),E.props=ke,De=i.pendingProps,Ae=E.context,he=o.contextType,$=qs,typeof he=="object"&&he!==null&&($=pn(he)),P=o.getDerivedStateFromProps,(he=typeof P=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(D!==De||Ae!==$)&&Ay(i,E,u,$),xr=!1,Ae=i.memoizedState,E.state=Ae,ll(i,u,E,f),ol();var ye=i.memoizedState;D!==De||Ae!==ye||xr||a!==null&&a.dependencies!==null&&qd(a.dependencies)?(typeof P=="function"&&(mg(i,o,P,u),ye=i.memoizedState),(ke=xr||py(i,o,ke,u,Ae,ye,$)||a!==null&&a.dependencies!==null&&qd(a.dependencies))?(he||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(u,ye,$),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(u,ye,$)),typeof E.componentDidUpdate=="function"&&(i.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof E.componentDidUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=ye),E.props=u,E.state=ye,E.context=$,u=ke):(typeof E.componentDidUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(i.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||D===a.memoizedProps&&Ae===a.memoizedState||(i.flags|=1024),u=!1)}return E=u,gc(a,i),u=(i.flags&128)!==0,E||u?(E=i.stateNode,o=u&&typeof o.getDerivedStateFromError!="function"?null:E.render(),i.flags|=1,a!==null&&u?(i.child=io(i,a.child,null,f),i.child=io(i,null,o,f)):ln(a,i,o,f),i.memoizedState=E.state,a=i.child):a=nr(a,i,f),a}function Ry(a,i,o,u){return Zo(),i.flags|=256,ln(a,i,o,u),i.child}var pg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ag(a){return{baseLanes:a,cachePool:EA()}}function yg(a,i,o){return a=a!==null?a.childLanes&~o:0,i&&(a|=di),a}function Uy(a,i,o){var u=i.pendingProps,f=!1,E=(i.flags&128)!==0,D;if((D=E)||(D=a!==null&&a.memoizedState===null?!1:(Qa.current&2)!==0),D&&(f=!0,i.flags&=-129),D=(i.flags&32)!==0,i.flags&=-33,a===null){if(Xt){if(f?Ur(i):Mr(),Xt){var P=Na,$;if($=P){e:{for($=P,P=Ti;$.nodeType!==8;){if(!P){P=null;break e}if($=yi($.nextSibling),$===null){P=null;break e}}P=$}P!==null?(i.memoizedState={dehydrated:P,treeContext:hs!==null?{id:Xi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},$=Vn(18,null,null,0),$.stateNode=P,$.return=i,i.child=$,wn=i,Na=null,$=!0):$=!1}$||As(i)}if(P=i.memoizedState,P!==null&&(P=P.dehydrated,P!==null))return th(P)?i.lanes=32:i.lanes=536870912,null;ar(i)}return P=u.children,u=u.fallback,f?(Mr(),f=i.mode,P=hc({mode:"hidden",children:P},f),u=gs(u,f,o,null),P.return=i,u.return=i,P.sibling=u,i.child=P,f=i.child,f.memoizedState=Ag(o),f.childLanes=yg(a,D,o),i.memoizedState=pg,u):(Ur(i),Eg(i,P))}if($=a.memoizedState,$!==null&&(P=$.dehydrated,P!==null)){if(E)i.flags&256?(Ur(i),i.flags&=-257,i=bg(a,i,o)):i.memoizedState!==null?(Mr(),i.child=a.child,i.flags|=128,i=null):(Mr(),f=u.fallback,P=i.mode,u=hc({mode:"visible",children:u.children},P),f=gs(f,P,o,null),f.flags|=2,u.return=i,f.return=i,u.sibling=f,i.child=u,io(i,a.child,null,o),u=i.child,u.memoizedState=Ag(o),u.childLanes=yg(a,D,o),i.memoizedState=pg,i=f);else if(Ur(i),th(P)){if(D=P.nextSibling&&P.nextSibling.dataset,D)var he=D.dgst;D=he,u=Error(r(419)),u.stack="",u.digest=D,el({value:u,source:null,stack:null}),i=bg(a,i,o)}else if(en||tl(a,i,o,!1),D=(o&a.childLanes)!==0,en||D){if(D=ha,D!==null&&(u=o&-o,u=(u&42)!==0?1:kt(u),u=(u&(D.suspendedLanes|o))!==0?0:u,u!==0&&u!==$.retryLane))throw $.retryLane=u,Ws(a,u),Wn(D,a,u),Cy;P.data==="$?"||Og(),i=bg(a,i,o)}else P.data==="$?"?(i.flags|=192,i.child=a.child,i=null):(a=$.treeContext,Na=yi(P.nextSibling),wn=i,Xt=!0,ps=null,Ti=!1,a!==null&&(si[oi++]=Xi,si[oi++]=$i,si[oi++]=hs,Xi=a.id,$i=a.overflow,hs=i),i=Eg(i,u.children),i.flags|=4096);return i}return f?(Mr(),f=u.fallback,P=i.mode,$=a.child,he=$.sibling,u=Ji($,{mode:"hidden",children:u.children}),u.subtreeFlags=$.subtreeFlags&65011712,he!==null?f=Ji(he,f):(f=gs(f,P,o,null),f.flags|=2),f.return=i,u.return=i,u.sibling=f,i.child=u,u=f,f=i.child,P=a.child.memoizedState,P===null?P=Ag(o):($=P.cachePool,$!==null?(he=za._currentValue,$=$.parent!==he?{parent:he,pool:he}:$):$=EA(),P={baseLanes:P.baseLanes|o,cachePool:$}),f.memoizedState=P,f.childLanes=yg(a,D,o),i.memoizedState=pg,u):(Ur(i),o=a.child,a=o.sibling,o=Ji(o,{mode:"visible",children:u.children}),o.return=i,o.sibling=null,a!==null&&(D=i.deletions,D===null?(i.deletions=[a],i.flags|=16):D.push(a)),i.child=o,i.memoizedState=null,o)}function Eg(a,i){return i=hc({mode:"visible",children:i},a.mode),i.return=a,a.child=i}function hc(a,i){return a=Vn(22,a,null,i),a.lanes=0,a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},a}function bg(a,i,o){return io(i,a.child,null,o),a=Eg(i,i.pendingProps.children),a.flags|=2,i.memoizedState=null,a}function My(a,i,o){a.lanes|=i;var u=a.alternate;u!==null&&(u.lanes|=i),Om(a.return,i,o)}function vg(a,i,o,u,f){var E=a.memoizedState;E===null?a.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:f}:(E.isBackwards=i,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=o,E.tailMode=f)}function By(a,i,o){var u=i.pendingProps,f=u.revealOrder,E=u.tail;if(ln(a,i,u.children,o),u=Qa.current,(u&2)!==0)u=u&1|2,i.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=i.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&My(a,o,i);else if(a.tag===19)My(a,o,i);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}u&=1}switch(ne(Qa,u),f){case"forwards":for(o=i.child,f=null;o!==null;)a=o.alternate,a!==null&&cc(a)===null&&(f=o),o=o.sibling;o=f,o===null?(f=i.child,i.child=null):(f=o.sibling,o.sibling=null),vg(i,!1,f,o,E);break;case"backwards":for(o=null,f=i.child,i.child=null;f!==null;){if(a=f.alternate,a!==null&&cc(a)===null){i.child=f;break}a=f.sibling,f.sibling=o,o=f,f=a}vg(i,!0,o,null,E);break;case"together":vg(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function nr(a,i,o){if(a!==null&&(i.dependencies=a.dependencies),Pr|=i.lanes,(o&i.childLanes)===0)if(a!==null){if(tl(a,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(a!==null&&i.child!==a.child)throw Error(r(153));if(i.child!==null){for(a=i.child,o=Ji(a,a.pendingProps),i.child=o,o.return=i;a.sibling!==null;)a=a.sibling,o=o.sibling=Ji(a,a.pendingProps),o.return=i;o.sibling=null}return i.child}function wg(a,i){return(a.lanes&i)!==0?!0:(a=a.dependencies,!!(a!==null&&qd(a)))}function TL(a,i,o){switch(i.tag){case 3:Ce(i,i.stateNode.containerInfo),kr(i,za,a.memoizedState.cache),Zo();break;case 27:case 5:Ve(i);break;case 4:Ce(i,i.stateNode.containerInfo);break;case 10:kr(i,i.type,i.memoizedProps.value);break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(Ur(i),i.flags|=128,null):(o&i.child.childLanes)!==0?Uy(a,i,o):(Ur(i),a=nr(a,i,o),a!==null?a.sibling:null);Ur(i);break;case 19:var f=(a.flags&128)!==0;if(u=(o&i.childLanes)!==0,u||(tl(a,i,o,!1),u=(o&i.childLanes)!==0),f){if(u)return By(a,i,o);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),ne(Qa,Qa.current),u)break;return null;case 22:case 23:return i.lanes=0,ky(a,i,o);case 24:kr(i,za,a.memoizedState.cache)}return nr(a,i,o)}function _y(a,i,o){if(a!==null)if(a.memoizedProps!==i.pendingProps)en=!0;else{if(!wg(a,o)&&(i.flags&128)===0)return en=!1,TL(a,i,o);en=(a.flags&131072)!==0}else en=!1,Xt&&(i.flags&1048576)!==0&&mA(i,Wd,i.index);switch(i.lanes=0,i.tag){case 16:e:{a=i.pendingProps;var u=i.elementType,f=u._init;if(u=f(u._payload),i.type=u,typeof u=="function")Dm(u)?(a=ws(u,a),i.tag=1,i=Dy(null,i,u,a,o)):(i.tag=0,i=fg(null,i,u,a,o));else{if(u!=null){if(f=u.$$typeof,f===F){i.tag=11,i=Sy(null,i,u,a,o);break e}else if(f===O){i.tag=14,i=Ny(null,i,u,a,o);break e}}throw i=Y(u)||u,Error(r(306,i,""))}}return i;case 0:return fg(a,i,i.type,i.pendingProps,o);case 1:return u=i.type,f=ws(u,i.pendingProps),Dy(a,i,u,f,o);case 3:e:{if(Ce(i,i.stateNode.containerInfo),a===null)throw Error(r(387));u=i.pendingProps;var E=i.memoizedState;f=E.element,Km(a,i),ll(i,u,null,o);var D=i.memoizedState;if(u=D.cache,kr(i,za,u),u!==E.cache&&Pm(i,[za],o,!0),ol(),u=D.element,E.isDehydrated)if(E={element:u,isDehydrated:!1,cache:D.cache},i.updateQueue.baseState=E,i.memoizedState=E,i.flags&256){i=Ry(a,i,u,o);break e}else if(u!==f){f=ii(Error(r(424)),i),el(f),i=Ry(a,i,u,o);break e}else{switch(a=i.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Na=yi(a.firstChild),wn=i,Xt=!0,ps=null,Ti=!0,o=hy(i,null,u,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(Zo(),u===f){i=nr(a,i,o);break e}ln(a,i,u,o)}i=i.child}return i;case 26:return gc(a,i),a===null?(o=j0(i.type,null,i.pendingProps,null))?i.memoizedState=o:Xt||(o=i.type,a=i.pendingProps,u=kc(Ee.current).createElement(o),u[Ut]=i,u[Qt]=a,cn(u,o,a),We(u),i.stateNode=u):i.memoizedState=j0(i.type,a.memoizedProps,i.pendingProps,a.memoizedState),null;case 27:return Ve(i),a===null&&Xt&&(u=i.stateNode=F0(i.type,i.pendingProps,Ee.current),wn=i,Ti=!0,f=Na,zr(i.type)?(ah=f,Na=yi(u.firstChild)):Na=f),ln(a,i,i.pendingProps.children,o),gc(a,i),a===null&&(i.flags|=4194304),i.child;case 5:return a===null&&Xt&&((f=u=Na)&&(u=tD(u,i.type,i.pendingProps,Ti),u!==null?(i.stateNode=u,wn=i,Na=yi(u.firstChild),Ti=!1,f=!0):f=!1),f||As(i)),Ve(i),f=i.type,E=i.pendingProps,D=a!==null?a.memoizedProps:null,u=E.children,$g(f,E)?u=null:D!==null&&$g(f,D)&&(i.flags|=32),i.memoizedState!==null&&(f=Xm(a,i,EL,null,null,o),Ll._currentValue=f),gc(a,i),ln(a,i,u,o),i.child;case 6:return a===null&&Xt&&((a=o=Na)&&(o=aD(o,i.pendingProps,Ti),o!==null?(i.stateNode=o,wn=i,Na=null,a=!0):a=!1),a||As(i)),null;case 13:return Uy(a,i,o);case 4:return Ce(i,i.stateNode.containerInfo),u=i.pendingProps,a===null?i.child=io(i,null,u,o):ln(a,i,u,o),i.child;case 11:return Sy(a,i,i.type,i.pendingProps,o);case 7:return ln(a,i,i.pendingProps,o),i.child;case 8:return ln(a,i,i.pendingProps.children,o),i.child;case 12:return ln(a,i,i.pendingProps.children,o),i.child;case 10:return u=i.pendingProps,kr(i,i.type,u.value),ln(a,i,u.children,o),i.child;case 9:return f=i.type._context,u=i.pendingProps.children,Es(i),f=pn(f),u=u(f),i.flags|=1,ln(a,i,u,o),i.child;case 14:return Ny(a,i,i.type,i.pendingProps,o);case 15:return Ty(a,i,i.type,i.pendingProps,o);case 19:return By(a,i,o);case 31:return u=i.pendingProps,o=i.mode,u={mode:u.mode,children:u.children},a===null?(o=hc(u,o),o.ref=i.ref,i.child=o,o.return=i,i=o):(o=Ji(a.child,u),o.ref=i.ref,i.child=o,o.return=i,i=o),i;case 22:return ky(a,i,o);case 24:return Es(i),u=pn(za),a===null?(f=Vm(),f===null&&(f=ha,E=jm(),f.pooledCache=E,E.refCount++,E!==null&&(f.pooledCacheLanes|=o),f=E),i.memoizedState={parent:u,cache:f},Qm(i),kr(i,za,f)):((a.lanes&o)!==0&&(Km(a,i),ll(i,null,null,o),ol()),f=a.memoizedState,E=i.memoizedState,f.parent!==u?(f={parent:u,cache:u},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),kr(i,za,u)):(u=E.cache,kr(i,za,u),u!==f.cache&&Pm(i,[za],o,!0))),ln(a,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function ir(a){a.flags|=4}function Fy(a,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!K0(i)){if(i=li.current,i!==null&&((Kt&4194048)===Kt?ki!==null:(Kt&62914560)!==Kt&&(Kt&536870912)===0||i!==ki))throw rl=zm,bA;a.flags|=8192}}function fc(a,i){i!==null&&(a.flags|=4),a.flags&16384&&(i=a.tag!==22?xa():536870912,a.lanes|=i,lo|=i)}function fl(a,i){if(!Xt)switch(a.tailMode){case"hidden":i=a.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?a.tail=null:o.sibling=null;break;case"collapsed":o=a.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i||a.tail===null?a.tail=null:a.tail.sibling=null:u.sibling=null}}function Ia(a){var i=a.alternate!==null&&a.alternate.child===a.child,o=0,u=0;if(i)for(var f=a.child;f!==null;)o|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=a,f=f.sibling;else for(f=a.child;f!==null;)o|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=a,f=f.sibling;return a.subtreeFlags|=u,a.childLanes=o,i}function kL(a,i,o){var u=i.pendingProps;switch(Bm(i),i.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ia(i),null;case 1:return Ia(i),null;case 3:return o=i.stateNode,u=null,a!==null&&(u=a.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),er(za),Pe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(a===null||a.child===null)&&($o(i)?ir(i):a===null||a.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,fA())),Ia(i),null;case 26:return o=i.memoizedState,a===null?(ir(i),o!==null?(Ia(i),Fy(i,o)):(Ia(i),i.flags&=-16777217)):o?o!==a.memoizedState?(ir(i),Ia(i),Fy(i,o)):(Ia(i),i.flags&=-16777217):(a.memoizedProps!==u&&ir(i),Ia(i),i.flags&=-16777217),null;case 27:bt(i),o=Ee.current;var f=i.type;if(a!==null&&i.stateNode!=null)a.memoizedProps!==u&&ir(i);else{if(!u){if(i.stateNode===null)throw Error(r(166));return Ia(i),null}a=we.current,$o(i)?gA(i):(a=F0(f,u,o),i.stateNode=a,ir(i))}return Ia(i),null;case 5:if(bt(i),o=i.type,a!==null&&i.stateNode!=null)a.memoizedProps!==u&&ir(i);else{if(!u){if(i.stateNode===null)throw Error(r(166));return Ia(i),null}if(a=we.current,$o(i))gA(i);else{switch(f=kc(Ee.current),a){case 1:a=f.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:a=f.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":a=f.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":a=f.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":a=f.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof u.is=="string"?f.createElement("select",{is:u.is}):f.createElement("select"),u.multiple?a.multiple=!0:u.size&&(a.size=u.size);break;default:a=typeof u.is=="string"?f.createElement(o,{is:u.is}):f.createElement(o)}}a[Ut]=i,a[Qt]=u;e:for(f=i.child;f!==null;){if(f.tag===5||f.tag===6)a.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===i)break e;for(;f.sibling===null;){if(f.return===null||f.return===i)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}i.stateNode=a;e:switch(cn(a,o,u),o){case"button":case"input":case"select":case"textarea":a=!!u.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ir(i)}}return Ia(i),i.flags&=-16777217,null;case 6:if(a&&i.stateNode!=null)a.memoizedProps!==u&&ir(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(r(166));if(a=Ee.current,$o(i)){if(a=i.stateNode,o=i.memoizedProps,u=null,f=wn,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}a[Ut]=i,a=!!(a.nodeValue===o||u!==null&&u.suppressHydrationWarning===!0||L0(a.nodeValue,o)),a||As(i)}else a=kc(a).createTextNode(u),a[Ut]=i,i.stateNode=a}return Ia(i),null;case 13:if(u=i.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(f=$o(i),u!==null&&u.dehydrated!==null){if(a===null){if(!f)throw Error(r(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ut]=i}else Zo(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ia(i),f=!1}else f=fA(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(ar(i),i):(ar(i),null)}if(ar(i),(i.flags&128)!==0)return i.lanes=o,i;if(o=u!==null,a=a!==null&&a.memoizedState!==null,o){u=i.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool);var E=null;u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(E=u.memoizedState.cachePool.pool),E!==f&&(u.flags|=2048)}return o!==a&&o&&(i.child.flags|=8192),fc(i,i.updateQueue),Ia(i),null;case 4:return Pe(),a===null&&Wg(i.stateNode.containerInfo),Ia(i),null;case 10:return er(i.type),Ia(i),null;case 19:if(X(Qa),f=i.memoizedState,f===null)return Ia(i),null;if(u=(i.flags&128)!==0,E=f.rendering,E===null)if(u)fl(f,!1);else{if(Ta!==0||a!==null&&(a.flags&128)!==0)for(a=i.child;a!==null;){if(E=cc(a),E!==null){for(i.flags|=128,fl(f,!1),a=E.updateQueue,i.updateQueue=a,fc(i,a),i.subtreeFlags=0,a=o,o=i.child;o!==null;)uA(o,a),o=o.sibling;return ne(Qa,Qa.current&1|2),i.child}a=a.sibling}f.tail!==null&&Fe()>yc&&(i.flags|=128,u=!0,fl(f,!1),i.lanes=4194304)}else{if(!u)if(a=cc(E),a!==null){if(i.flags|=128,u=!0,a=a.updateQueue,i.updateQueue=a,fc(i,a),fl(f,!0),f.tail===null&&f.tailMode==="hidden"&&!E.alternate&&!Xt)return Ia(i),null}else 2*Fe()-f.renderingStartTime>yc&&o!==536870912&&(i.flags|=128,u=!0,fl(f,!1),i.lanes=4194304);f.isBackwards?(E.sibling=i.child,i.child=E):(a=f.last,a!==null?a.sibling=E:i.child=E,f.last=E)}return f.tail!==null?(i=f.tail,f.rendering=i,f.tail=i.sibling,f.renderingStartTime=Fe(),i.sibling=null,a=Qa.current,ne(Qa,u?a&1|2:a&1),i):(Ia(i),null);case 22:case 23:return ar(i),Ym(),u=i.memoizedState!==null,a!==null?a.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(o&536870912)!==0&&(i.flags&128)===0&&(Ia(i),i.subtreeFlags&6&&(i.flags|=8192)):Ia(i),o=i.updateQueue,o!==null&&fc(i,o.retryQueue),o=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==o&&(i.flags|=2048),a!==null&&X(bs),null;case 24:return o=null,a!==null&&(o=a.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),er(za),Ia(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function xL(a,i){switch(Bm(i),i.tag){case 1:return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 3:return er(za),Pe(),a=i.flags,(a&65536)!==0&&(a&128)===0?(i.flags=a&-65537|128,i):null;case 26:case 27:case 5:return bt(i),null;case 13:if(ar(i),a=i.memoizedState,a!==null&&a.dehydrated!==null){if(i.alternate===null)throw Error(r(340));Zo()}return a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 19:return X(Qa),null;case 4:return Pe(),null;case 10:return er(i.type),null;case 22:case 23:return ar(i),Ym(),a!==null&&X(bs),a=i.flags,a&65536?(i.flags=a&-65537|128,i):null;case 24:return er(za),null;case 25:return null;default:return null}}function Oy(a,i){switch(Bm(i),i.tag){case 3:er(za),Pe();break;case 26:case 27:case 5:bt(i);break;case 4:Pe();break;case 13:ar(i);break;case 19:X(Qa);break;case 10:er(i.type);break;case 22:case 23:ar(i),Ym(),a!==null&&X(bs);break;case 24:er(za)}}function pl(a,i){try{var o=i.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var f=u.next;o=f;do{if((o.tag&a)===a){u=void 0;var E=o.create,D=o.inst;u=E(),D.destroy=u}o=o.next}while(o!==f)}}catch(P){ua(i,i.return,P)}}function Br(a,i,o){try{var u=i.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var E=f.next;u=E;do{if((u.tag&a)===a){var D=u.inst,P=D.destroy;if(P!==void 0){D.destroy=void 0,f=i;var $=o,he=P;try{he()}catch(ke){ua(f,$,ke)}}}u=u.next}while(u!==E)}}catch(ke){ua(i,i.return,ke)}}function Py(a){var i=a.updateQueue;if(i!==null){var o=a.stateNode;try{NA(i,o)}catch(u){ua(a,a.return,u)}}}function jy(a,i,o){o.props=ws(a.type,a.memoizedProps),o.state=a.memoizedState;try{o.componentWillUnmount()}catch(u){ua(a,i,u)}}function Al(a,i){try{var o=a.ref;if(o!==null){switch(a.tag){case 26:case 27:case 5:var u=a.stateNode;break;case 30:u=a.stateNode;break;default:u=a.stateNode}typeof o=="function"?a.refCleanup=o(u):o.current=u}}catch(f){ua(a,i,f)}}function xi(a,i){var o=a.ref,u=a.refCleanup;if(o!==null)if(typeof u=="function")try{u()}catch(f){ua(a,i,f)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(f){ua(a,i,f)}else o.current=null}function Hy(a){var i=a.type,o=a.memoizedProps,u=a.stateNode;try{e:switch(i){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(f){ua(a,a.return,f)}}function Ig(a,i,o){try{var u=a.stateNode;JL(u,a.type,o,i),u[Qt]=i}catch(f){ua(a,a.return,f)}}function Vy(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&zr(a.type)||a.tag===4}function Cg(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Vy(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&zr(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Sg(a,i,o){var u=a.tag;if(u===5||u===6)a=a.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(a,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(a),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=Tc));else if(u!==4&&(u===27&&zr(a.type)&&(o=a.stateNode,i=null),a=a.child,a!==null))for(Sg(a,i,o),a=a.sibling;a!==null;)Sg(a,i,o),a=a.sibling}function pc(a,i,o){var u=a.tag;if(u===5||u===6)a=a.stateNode,i?o.insertBefore(a,i):o.appendChild(a);else if(u!==4&&(u===27&&zr(a.type)&&(o=a.stateNode),a=a.child,a!==null))for(pc(a,i,o),a=a.sibling;a!==null;)pc(a,i,o),a=a.sibling}function zy(a){var i=a.stateNode,o=a.memoizedProps;try{for(var u=a.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);cn(i,u,o),i[Ut]=a,i[Qt]=o}catch(E){ua(a,a.return,E)}}var rr=!1,Ma=!1,Ng=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,tn=null;function LL(a,i){if(a=a.containerInfo,Jg=Mc,a=tA(a),Cm(a)){if("selectionStart"in a)var o={start:a.selectionStart,end:a.selectionEnd};else e:{o=(o=a.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var f=u.anchorOffset,E=u.focusNode;u=u.focusOffset;try{o.nodeType,E.nodeType}catch{o=null;break e}var D=0,P=-1,$=-1,he=0,ke=0,De=a,Ae=null;t:for(;;){for(var ye;De!==o||f!==0&&De.nodeType!==3||(P=D+f),De!==E||u!==0&&De.nodeType!==3||($=D+u),De.nodeType===3&&(D+=De.nodeValue.length),(ye=De.firstChild)!==null;)Ae=De,De=ye;for(;;){if(De===a)break t;if(Ae===o&&++he===f&&(P=D),Ae===E&&++ke===u&&($=D),(ye=De.nextSibling)!==null)break;De=Ae,Ae=De.parentNode}De=ye}o=P===-1||$===-1?null:{start:P,end:$}}else o=null}o=o||{start:0,end:0}}else o=null;for(Xg={focusedElem:a,selectionRange:o},Mc=!1,tn=i;tn!==null;)if(i=tn,a=i.child,(i.subtreeFlags&1024)!==0&&a!==null)a.return=i,tn=a;else for(;tn!==null;){switch(i=tn,E=i.alternate,a=i.flags,i.tag){case 0:break;case 11:case 15:break;case 1:if((a&1024)!==0&&E!==null){a=void 0,o=i,f=E.memoizedProps,E=E.memoizedState,u=o.stateNode;try{var ft=ws(o.type,f,o.elementType===o.type);a=u.getSnapshotBeforeUpdate(ft,E),u.__reactInternalSnapshotBeforeUpdate=a}catch(lt){ua(o,o.return,lt)}}break;case 3:if((a&1024)!==0){if(a=i.stateNode.containerInfo,o=a.nodeType,o===9)eh(a);else if(o===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":eh(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=i.sibling,a!==null){a.return=i.return,tn=a;break}tn=i.return}}function Ky(a,i,o){var u=o.flags;switch(o.tag){case 0:case 11:case 15:_r(a,o),u&4&&pl(5,o);break;case 1:if(_r(a,o),u&4)if(a=o.stateNode,i===null)try{a.componentDidMount()}catch(D){ua(o,o.return,D)}else{var f=ws(o.type,i.memoizedProps);i=i.memoizedState;try{a.componentDidUpdate(f,i,a.__reactInternalSnapshotBeforeUpdate)}catch(D){ua(o,o.return,D)}}u&64&&Py(o),u&512&&Al(o,o.return);break;case 3:if(_r(a,o),u&64&&(a=o.updateQueue,a!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{NA(a,i)}catch(D){ua(o,o.return,D)}}break;case 27:i===null&&u&4&&zy(o);case 26:case 5:_r(a,o),i===null&&u&4&&Hy(o),u&512&&Al(o,o.return);break;case 12:_r(a,o);break;case 13:_r(a,o),u&4&&qy(a,o),u&64&&(a=o.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(o=PL.bind(null,o),nD(a,o))));break;case 22:if(u=o.memoizedState!==null||rr,!u){i=i!==null&&i.memoizedState!==null||Ma,f=rr;var E=Ma;rr=u,(Ma=i)&&!E?Fr(a,o,(o.subtreeFlags&8772)!==0):_r(a,o),rr=f,Ma=E}break;case 30:break;default:_r(a,o)}}function Gy(a){var i=a.alternate;i!==null&&(a.alternate=null,Gy(i)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(i=a.stateNode,i!==null&&pa(i)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var ya=null,Dn=!1;function sr(a,i,o){for(o=o.child;o!==null;)Wy(a,i,o),o=o.sibling}function Wy(a,i,o){if(M&&typeof M.onCommitFiberUnmount=="function")try{M.onCommitFiberUnmount(qt,o)}catch{}switch(o.tag){case 26:Ma||xi(o,i),sr(a,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Ma||xi(o,i);var u=ya,f=Dn;zr(o.type)&&(ya=o.stateNode,Dn=!1),sr(a,i,o),Nl(o.stateNode),ya=u,Dn=f;break;case 5:Ma||xi(o,i);case 6:if(u=ya,f=Dn,ya=null,sr(a,i,o),ya=u,Dn=f,ya!==null)if(Dn)try{(ya.nodeType===9?ya.body:ya.nodeName==="HTML"?ya.ownerDocument.body:ya).removeChild(o.stateNode)}catch(E){ua(o,i,E)}else try{ya.removeChild(o.stateNode)}catch(E){ua(o,i,E)}break;case 18:ya!==null&&(Dn?(a=ya,B0(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.stateNode),Ml(a)):B0(ya,o.stateNode));break;case 4:u=ya,f=Dn,ya=o.stateNode.containerInfo,Dn=!0,sr(a,i,o),ya=u,Dn=f;break;case 0:case 11:case 14:case 15:Ma||Br(2,o,i),Ma||Br(4,o,i),sr(a,i,o);break;case 1:Ma||(xi(o,i),u=o.stateNode,typeof u.componentWillUnmount=="function"&&jy(o,i,u)),sr(a,i,o);break;case 21:sr(a,i,o);break;case 22:Ma=(u=Ma)||o.memoizedState!==null,sr(a,i,o),Ma=u;break;default:sr(a,i,o)}}function qy(a,i){if(i.memoizedState===null&&(a=i.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ml(a)}catch(o){ua(i,i.return,o)}}function DL(a){switch(a.tag){case 13:case 19:var i=a.stateNode;return i===null&&(i=a.stateNode=new Qy),i;case 22:return a=a.stateNode,i=a._retryCache,i===null&&(i=a._retryCache=new Qy),i;default:throw Error(r(435,a.tag))}}function Tg(a,i){var o=DL(a);i.forEach(function(u){var f=jL.bind(null,a,u);o.has(u)||(o.add(u),u.then(f,f))})}function zn(a,i){var o=i.deletions;if(o!==null)for(var u=0;u<o.length;u++){var f=o[u],E=a,D=i,P=D;e:for(;P!==null;){switch(P.tag){case 27:if(zr(P.type)){ya=P.stateNode,Dn=!1;break e}break;case 5:ya=P.stateNode,Dn=!1;break e;case 3:case 4:ya=P.stateNode.containerInfo,Dn=!0;break e}P=P.return}if(ya===null)throw Error(r(160));Wy(E,D,f),ya=null,Dn=!1,E=f.alternate,E!==null&&(E.return=null),f.return=null}if(i.subtreeFlags&13878)for(i=i.child;i!==null;)Yy(i,a),i=i.sibling}var Ai=null;function Yy(a,i){var o=a.alternate,u=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:zn(i,a),Qn(a),u&4&&(Br(3,a,a.return),pl(3,a),Br(5,a,a.return));break;case 1:zn(i,a),Qn(a),u&512&&(Ma||o===null||xi(o,o.return)),u&64&&rr&&(a=a.updateQueue,a!==null&&(u=a.callbacks,u!==null&&(o=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=o===null?u:o.concat(u))));break;case 26:var f=Ai;if(zn(i,a),Qn(a),u&512&&(Ma||o===null||xi(o,o.return)),u&4){var E=o!==null?o.memoizedState:null;if(u=a.memoizedState,o===null)if(u===null)if(a.stateNode===null){e:{u=a.type,o=a.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":E=f.getElementsByTagName("title")[0],(!E||E[_a]||E[Ut]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=f.createElement(u),f.head.insertBefore(E,f.querySelector("head > title"))),cn(E,u,o),E[Ut]=a,We(E),u=E;break e;case"link":var D=z0("link","href",f).get(u+(o.href||""));if(D){for(var P=0;P<D.length;P++)if(E=D[P],E.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&E.getAttribute("rel")===(o.rel==null?null:o.rel)&&E.getAttribute("title")===(o.title==null?null:o.title)&&E.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){D.splice(P,1);break t}}E=f.createElement(u),cn(E,u,o),f.head.appendChild(E);break;case"meta":if(D=z0("meta","content",f).get(u+(o.content||""))){for(P=0;P<D.length;P++)if(E=D[P],E.getAttribute("content")===(o.content==null?null:""+o.content)&&E.getAttribute("name")===(o.name==null?null:o.name)&&E.getAttribute("property")===(o.property==null?null:o.property)&&E.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&E.getAttribute("charset")===(o.charSet==null?null:o.charSet)){D.splice(P,1);break t}}E=f.createElement(u),cn(E,u,o),f.head.appendChild(E);break;default:throw Error(r(468,u))}E[Ut]=a,We(E),u=E}a.stateNode=u}else Q0(f,a.type,a.stateNode);else a.stateNode=V0(f,u,a.memoizedProps);else E!==u?(E===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):E.count--,u===null?Q0(f,a.type,a.stateNode):V0(f,u,a.memoizedProps)):u===null&&a.stateNode!==null&&Ig(a,a.memoizedProps,o.memoizedProps)}break;case 27:zn(i,a),Qn(a),u&512&&(Ma||o===null||xi(o,o.return)),o!==null&&u&4&&Ig(a,a.memoizedProps,o.memoizedProps);break;case 5:if(zn(i,a),Qn(a),u&512&&(Ma||o===null||xi(o,o.return)),a.flags&32){f=a.stateNode;try{Ni(f,"")}catch(ye){ua(a,a.return,ye)}}u&4&&a.stateNode!=null&&(f=a.memoizedProps,Ig(a,f,o!==null?o.memoizedProps:f)),u&1024&&(Ng=!0);break;case 6:if(zn(i,a),Qn(a),u&4){if(a.stateNode===null)throw Error(r(162));u=a.memoizedProps,o=a.stateNode;try{o.nodeValue=u}catch(ye){ua(a,a.return,ye)}}break;case 3:if(Dc=null,f=Ai,Ai=xc(i.containerInfo),zn(i,a),Ai=f,Qn(a),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Ml(i.containerInfo)}catch(ye){ua(a,a.return,ye)}Ng&&(Ng=!1,Jy(a));break;case 4:u=Ai,Ai=xc(a.stateNode.containerInfo),zn(i,a),Qn(a),Ai=u;break;case 12:zn(i,a),Qn(a);break;case 13:zn(i,a),Qn(a),a.child.flags&8192&&a.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ug=Fe()),u&4&&(u=a.updateQueue,u!==null&&(a.updateQueue=null,Tg(a,u)));break;case 22:f=a.memoizedState!==null;var $=o!==null&&o.memoizedState!==null,he=rr,ke=Ma;if(rr=he||f,Ma=ke||$,zn(i,a),Ma=ke,rr=he,Qn(a),u&8192)e:for(i=a.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(o===null||$||rr||Ma||Is(a)),o=null,i=a;;){if(i.tag===5||i.tag===26){if(o===null){$=o=i;try{if(E=$.stateNode,f)D=E.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{P=$.stateNode;var De=$.memoizedProps.style,Ae=De!=null&&De.hasOwnProperty("display")?De.display:null;P.style.display=Ae==null||typeof Ae=="boolean"?"":(""+Ae).trim()}}catch(ye){ua($,$.return,ye)}}}else if(i.tag===6){if(o===null){$=i;try{$.stateNode.nodeValue=f?"":$.memoizedProps}catch(ye){ua($,$.return,ye)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===a)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=a.updateQueue,u!==null&&(o=u.retryQueue,o!==null&&(u.retryQueue=null,Tg(a,o))));break;case 19:zn(i,a),Qn(a),u&4&&(u=a.updateQueue,u!==null&&(a.updateQueue=null,Tg(a,u)));break;case 30:break;case 21:break;default:zn(i,a),Qn(a)}}function Qn(a){var i=a.flags;if(i&2){try{for(var o,u=a.return;u!==null;){if(Vy(u)){o=u;break}u=u.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var f=o.stateNode,E=Cg(a);pc(a,E,f);break;case 5:var D=o.stateNode;o.flags&32&&(Ni(D,""),o.flags&=-33);var P=Cg(a);pc(a,P,D);break;case 3:case 4:var $=o.stateNode.containerInfo,he=Cg(a);Sg(a,he,$);break;default:throw Error(r(161))}}catch(ke){ua(a,a.return,ke)}a.flags&=-3}i&4096&&(a.flags&=-4097)}function Jy(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var i=a;Jy(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),a=a.sibling}}function _r(a,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Ky(a,i.alternate,i),i=i.sibling}function Is(a){for(a=a.child;a!==null;){var i=a;switch(i.tag){case 0:case 11:case 14:case 15:Br(4,i,i.return),Is(i);break;case 1:xi(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&jy(i,i.return,o),Is(i);break;case 27:Nl(i.stateNode);case 26:case 5:xi(i,i.return),Is(i);break;case 22:i.memoizedState===null&&Is(i);break;case 30:Is(i);break;default:Is(i)}a=a.sibling}}function Fr(a,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,f=a,E=i,D=E.flags;switch(E.tag){case 0:case 11:case 15:Fr(f,E,o),pl(4,E);break;case 1:if(Fr(f,E,o),u=E,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(he){ua(u,u.return,he)}if(u=E,f=u.updateQueue,f!==null){var P=u.stateNode;try{var $=f.shared.hiddenCallbacks;if($!==null)for(f.shared.hiddenCallbacks=null,f=0;f<$.length;f++)SA($[f],P)}catch(he){ua(u,u.return,he)}}o&&D&64&&Py(E),Al(E,E.return);break;case 27:zy(E);case 26:case 5:Fr(f,E,o),o&&u===null&&D&4&&Hy(E),Al(E,E.return);break;case 12:Fr(f,E,o);break;case 13:Fr(f,E,o),o&&D&4&&qy(f,E);break;case 22:E.memoizedState===null&&Fr(f,E,o),Al(E,E.return);break;case 30:break;default:Fr(f,E,o)}i=i.sibling}}function kg(a,i){var o=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),a=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),a!==o&&(a!=null&&a.refCount++,o!=null&&al(o))}function xg(a,i){a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&al(a))}function Li(a,i,o,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Xy(a,i,o,u),i=i.sibling}function Xy(a,i,o,u){var f=i.flags;switch(i.tag){case 0:case 11:case 15:Li(a,i,o,u),f&2048&&pl(9,i);break;case 1:Li(a,i,o,u);break;case 3:Li(a,i,o,u),f&2048&&(a=null,i.alternate!==null&&(a=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==a&&(i.refCount++,a!=null&&al(a)));break;case 12:if(f&2048){Li(a,i,o,u),a=i.stateNode;try{var E=i.memoizedProps,D=E.id,P=E.onPostCommit;typeof P=="function"&&P(D,i.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){ua(i,i.return,$)}}else Li(a,i,o,u);break;case 13:Li(a,i,o,u);break;case 23:break;case 22:E=i.stateNode,D=i.alternate,i.memoizedState!==null?E._visibility&2?Li(a,i,o,u):yl(a,i):E._visibility&2?Li(a,i,o,u):(E._visibility|=2,ro(a,i,o,u,(i.subtreeFlags&10256)!==0)),f&2048&&kg(D,i);break;case 24:Li(a,i,o,u),f&2048&&xg(i.alternate,i);break;default:Li(a,i,o,u)}}function ro(a,i,o,u,f){for(f=f&&(i.subtreeFlags&10256)!==0,i=i.child;i!==null;){var E=a,D=i,P=o,$=u,he=D.flags;switch(D.tag){case 0:case 11:case 15:ro(E,D,P,$,f),pl(8,D);break;case 23:break;case 22:var ke=D.stateNode;D.memoizedState!==null?ke._visibility&2?ro(E,D,P,$,f):yl(E,D):(ke._visibility|=2,ro(E,D,P,$,f)),f&&he&2048&&kg(D.alternate,D);break;case 24:ro(E,D,P,$,f),f&&he&2048&&xg(D.alternate,D);break;default:ro(E,D,P,$,f)}i=i.sibling}}function yl(a,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=a,u=i,f=u.flags;switch(u.tag){case 22:yl(o,u),f&2048&&kg(u.alternate,u);break;case 24:yl(o,u),f&2048&&xg(u.alternate,u);break;default:yl(o,u)}i=i.sibling}}var El=8192;function so(a){if(a.subtreeFlags&El)for(a=a.child;a!==null;)$y(a),a=a.sibling}function $y(a){switch(a.tag){case 26:so(a),a.flags&El&&a.memoizedState!==null&&pD(Ai,a.memoizedState,a.memoizedProps);break;case 5:so(a);break;case 3:case 4:var i=Ai;Ai=xc(a.stateNode.containerInfo),so(a),Ai=i;break;case 22:a.memoizedState===null&&(i=a.alternate,i!==null&&i.memoizedState!==null?(i=El,El=16777216,so(a),El=i):so(a));break;default:so(a)}}function Zy(a){var i=a.alternate;if(i!==null&&(a=i.child,a!==null)){i.child=null;do i=a.sibling,a.sibling=null,a=i;while(a!==null)}}function bl(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var u=i[o];tn=u,t0(u,a)}Zy(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)e0(a),a=a.sibling}function e0(a){switch(a.tag){case 0:case 11:case 15:bl(a),a.flags&2048&&Br(9,a,a.return);break;case 3:bl(a);break;case 12:bl(a);break;case 22:var i=a.stateNode;a.memoizedState!==null&&i._visibility&2&&(a.return===null||a.return.tag!==13)?(i._visibility&=-3,Ac(a)):bl(a);break;default:bl(a)}}function Ac(a){var i=a.deletions;if((a.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var u=i[o];tn=u,t0(u,a)}Zy(a)}for(a=a.child;a!==null;){switch(i=a,i.tag){case 0:case 11:case 15:Br(8,i,i.return),Ac(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,Ac(i));break;default:Ac(i)}a=a.sibling}}function t0(a,i){for(;tn!==null;){var o=tn;switch(o.tag){case 0:case 11:case 15:Br(8,o,i);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:al(o.memoizedState.cache)}if(u=o.child,u!==null)u.return=o,tn=u;else e:for(o=a;tn!==null;){u=tn;var f=u.sibling,E=u.return;if(Gy(u),u===o){tn=null;break e}if(f!==null){f.return=E,tn=f;break e}tn=E}}}var RL={getCacheForType:function(a){var i=pn(za),o=i.data.get(a);return o===void 0&&(o=a(),i.data.set(a,o)),o}},UL=typeof WeakMap=="function"?WeakMap:Map,aa=0,ha=null,Ft=null,Kt=0,na=0,Kn=null,Or=!1,oo=!1,Lg=!1,or=0,Ta=0,Pr=0,Cs=0,Dg=0,di=0,lo=0,vl=null,Rn=null,Rg=!1,Ug=0,yc=1/0,Ec=null,jr=null,dn=0,Hr=null,co=null,uo=0,Mg=0,Bg=null,a0=null,wl=0,_g=null;function Gn(){if((aa&2)!==0&&Kt!==0)return Kt&-Kt;if(J.T!==null){var a=Xs;return a!==0?a:zg()}return La()}function n0(){di===0&&(di=(Kt&536870912)===0||Xt?hi():536870912);var a=li.current;return a!==null&&(a.flags|=32),di}function Wn(a,i,o){(a===ha&&(na===2||na===9)||a.cancelPendingCommit!==null)&&(mo(a,0),Vr(a,Kt,di,!1)),Yt(a,o),((aa&2)===0||a!==ha)&&(a===ha&&((aa&2)===0&&(Cs|=o),Ta===4&&Vr(a,Kt,di,!1)),Di(a))}function i0(a,i,o){if((aa&6)!==0)throw Error(r(327));var u=!o&&(i&124)===0&&(i&a.expiredLanes)===0||It(a,i),f=u?_L(a,i):Pg(a,i,!0),E=u;do{if(f===0){oo&&!u&&Vr(a,i,0,!1);break}else{if(o=a.current.alternate,E&&!ML(o)){f=Pg(a,i,!1),E=!1;continue}if(f===2){if(E=i,a.errorRecoveryDisabledLanes&E)var D=0;else D=a.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){i=D;e:{var P=a;f=vl;var $=P.current.memoizedState.isDehydrated;if($&&(mo(P,D).flags|=256),D=Pg(P,D,!1),D!==2){if(Lg&&!$){P.errorRecoveryDisabledLanes|=E,Cs|=E,f=4;break e}E=Rn,Rn=f,E!==null&&(Rn===null?Rn=E:Rn.push.apply(Rn,E))}f=D}if(E=!1,f!==2)continue}}if(f===1){mo(a,0),Vr(a,i,0,!0);break}e:{switch(u=a,E=f,E){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:Vr(u,i,di,!Or);break e;case 2:Rn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(f=Ug+300-Fe(),10<f)){if(Vr(u,i,di,!Or),pt(u,0,!0)!==0)break e;u.timeoutHandle=U0(r0.bind(null,u,o,Rn,Ec,Rg,i,di,Cs,lo,Or,E,2,-0,0),f);break e}r0(u,o,Rn,Ec,Rg,i,di,Cs,lo,Or,E,0,-0,0)}}break}while(!0);Di(a)}function r0(a,i,o,u,f,E,D,P,$,he,ke,De,Ae,ye){if(a.timeoutHandle=-1,De=i.subtreeFlags,(De&8192||(De&16785408)===16785408)&&(xl={stylesheets:null,count:0,unsuspend:fD},$y(i),De=AD(),De!==null)){a.cancelPendingCommit=De(m0.bind(null,a,i,E,o,u,f,D,P,$,ke,1,Ae,ye)),Vr(a,E,D,!he);return}m0(a,i,E,o,u,f,D,P,$)}function ML(a){for(var i=a;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var u=0;u<o.length;u++){var f=o[u],E=f.getSnapshot;f=f.value;try{if(!Hn(E(),f))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===a)break;for(;i.sibling===null;){if(i.return===null||i.return===a)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Vr(a,i,o,u){i&=~Dg,i&=~Cs,a.suspendedLanes|=i,a.pingedLanes&=~i,u&&(a.warmLanes|=i),u=a.expirationTimes;for(var f=i;0<f;){var E=31-N(f),D=1<<E;u[E]=-1,f&=~D}o!==0&&Be(a,o,i)}function bc(){return(aa&6)===0?(Il(0),!1):!0}function Fg(){if(Ft!==null){if(na===0)var a=Ft.return;else a=Ft,Zi=ys=null,eg(a),no=null,gl=0,a=Ft;for(;a!==null;)Oy(a.alternate,a),a=a.return;Ft=null}}function mo(a,i){var o=a.timeoutHandle;o!==-1&&(a.timeoutHandle=-1,$L(o)),o=a.cancelPendingCommit,o!==null&&(a.cancelPendingCommit=null,o()),Fg(),ha=a,Ft=o=Ji(a.current,null),Kt=i,na=0,Kn=null,Or=!1,oo=It(a,i),Lg=!1,lo=di=Dg=Cs=Pr=Ta=0,Rn=vl=null,Rg=!1,(i&8)!==0&&(i|=i&32);var u=a.entangledLanes;if(u!==0)for(a=a.entanglements,u&=i;0<u;){var f=31-N(u),E=1<<f;i|=a[f],u&=~E}return or=i,Vd(),o}function s0(a,i){Dt=null,J.H=oc,i===il||i===Xd?(i=IA(),na=3):i===bA?(i=IA(),na=4):na=i===Cy?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Kn=i,Ft===null&&(Ta=1,mc(a,ii(i,a.current)))}function o0(){var a=J.H;return J.H=oc,a===null?oc:a}function l0(){var a=J.A;return J.A=RL,a}function Og(){Ta=4,Or||(Kt&4194048)!==Kt&&li.current!==null||(oo=!0),(Pr&134217727)===0&&(Cs&134217727)===0||ha===null||Vr(ha,Kt,di,!1)}function Pg(a,i,o){var u=aa;aa|=2;var f=o0(),E=l0();(ha!==a||Kt!==i)&&(Ec=null,mo(a,i)),i=!1;var D=Ta;e:do try{if(na!==0&&Ft!==null){var P=Ft,$=Kn;switch(na){case 8:Fg(),D=6;break e;case 3:case 2:case 9:case 6:li.current===null&&(i=!0);var he=na;if(na=0,Kn=null,go(a,P,$,he),o&&oo){D=0;break e}break;default:he=na,na=0,Kn=null,go(a,P,$,he)}}BL(),D=Ta;break}catch(ke){s0(a,ke)}while(!0);return i&&a.shellSuspendCounter++,Zi=ys=null,aa=u,J.H=f,J.A=E,Ft===null&&(ha=null,Kt=0,Vd()),D}function BL(){for(;Ft!==null;)d0(Ft)}function _L(a,i){var o=aa;aa|=2;var u=o0(),f=l0();ha!==a||Kt!==i?(Ec=null,yc=Fe()+500,mo(a,i)):oo=It(a,i);e:do try{if(na!==0&&Ft!==null){i=Ft;var E=Kn;t:switch(na){case 1:na=0,Kn=null,go(a,i,E,1);break;case 2:case 9:if(vA(E)){na=0,Kn=null,c0(i);break}i=function(){na!==2&&na!==9||ha!==a||(na=7),Di(a)},E.then(i,i);break e;case 3:na=7;break e;case 4:na=5;break e;case 7:vA(E)?(na=0,Kn=null,c0(i)):(na=0,Kn=null,go(a,i,E,7));break;case 5:var D=null;switch(Ft.tag){case 26:D=Ft.memoizedState;case 5:case 27:var P=Ft;if(!D||K0(D)){na=0,Kn=null;var $=P.sibling;if($!==null)Ft=$;else{var he=P.return;he!==null?(Ft=he,vc(he)):Ft=null}break t}}na=0,Kn=null,go(a,i,E,5);break;case 6:na=0,Kn=null,go(a,i,E,6);break;case 8:Fg(),Ta=6;break e;default:throw Error(r(462))}}FL();break}catch(ke){s0(a,ke)}while(!0);return Zi=ys=null,J.H=u,J.A=f,aa=o,Ft!==null?0:(ha=null,Kt=0,Vd(),Ta)}function FL(){for(;Ft!==null&&!Pt();)d0(Ft)}function d0(a){var i=_y(a.alternate,a,or);a.memoizedProps=a.pendingProps,i===null?vc(a):Ft=i}function c0(a){var i=a,o=i.alternate;switch(i.tag){case 15:case 0:i=Ly(o,i,i.pendingProps,i.type,void 0,Kt);break;case 11:i=Ly(o,i,i.pendingProps,i.type.render,i.ref,Kt);break;case 5:eg(i);default:Oy(o,i),i=Ft=uA(i,or),i=_y(o,i,or)}a.memoizedProps=a.pendingProps,i===null?vc(a):Ft=i}function go(a,i,o,u){Zi=ys=null,eg(i),no=null,gl=0;var f=i.return;try{if(NL(a,f,i,o,Kt)){Ta=1,mc(a,ii(o,a.current)),Ft=null;return}}catch(E){if(f!==null)throw Ft=f,E;Ta=1,mc(a,ii(o,a.current)),Ft=null;return}i.flags&32768?(Xt||u===1?a=!0:oo||(Kt&536870912)!==0?a=!1:(Or=a=!0,(u===2||u===9||u===3||u===6)&&(u=li.current,u!==null&&u.tag===13&&(u.flags|=16384))),u0(i,a)):vc(i)}function vc(a){var i=a;do{if((i.flags&32768)!==0){u0(i,Or);return}a=i.return;var o=kL(i.alternate,i,or);if(o!==null){Ft=o;return}if(i=i.sibling,i!==null){Ft=i;return}Ft=i=a}while(i!==null);Ta===0&&(Ta=5)}function u0(a,i){do{var o=xL(a.alternate,a);if(o!==null){o.flags&=32767,Ft=o;return}if(o=a.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(a=a.sibling,a!==null)){Ft=a;return}Ft=a=o}while(a!==null);Ta=6,Ft=null}function m0(a,i,o,u,f,E,D,P,$){a.cancelPendingCommit=null;do wc();while(dn!==0);if((aa&6)!==0)throw Error(r(327));if(i!==null){if(i===a.current)throw Error(r(177));if(E=i.lanes|i.childLanes,E|=xm,Vt(a,o,E,D,P,$),a===ha&&(Ft=ha=null,Kt=0),co=i,Hr=a,uo=o,Mg=E,Bg=f,a0=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,HL(je,function(){return A0(),null})):(a.callbackNode=null,a.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=J.T,J.T=null,f=ie.p,ie.p=2,D=aa,aa|=4;try{LL(a,i,o)}finally{aa=D,ie.p=f,J.T=u}}dn=1,g0(),h0(),f0()}}function g0(){if(dn===1){dn=0;var a=Hr,i=co,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=J.T,J.T=null;var u=ie.p;ie.p=2;var f=aa;aa|=4;try{Yy(i,a);var E=Xg,D=tA(a.containerInfo),P=E.focusedElem,$=E.selectionRange;if(D!==P&&P&&P.ownerDocument&&eA(P.ownerDocument.documentElement,P)){if($!==null&&Cm(P)){var he=$.start,ke=$.end;if(ke===void 0&&(ke=he),"selectionStart"in P)P.selectionStart=he,P.selectionEnd=Math.min(ke,P.value.length);else{var De=P.ownerDocument||document,Ae=De&&De.defaultView||window;if(Ae.getSelection){var ye=Ae.getSelection(),ft=P.textContent.length,lt=Math.min($.start,ft),la=$.end===void 0?lt:Math.min($.end,ft);!ye.extend&&lt>la&&(D=la,la=lt,lt=D);var oe=Zp(P,lt),re=Zp(P,la);if(oe&&re&&(ye.rangeCount!==1||ye.anchorNode!==oe.node||ye.anchorOffset!==oe.offset||ye.focusNode!==re.node||ye.focusOffset!==re.offset)){var ge=De.createRange();ge.setStart(oe.node,oe.offset),ye.removeAllRanges(),lt>la?(ye.addRange(ge),ye.extend(re.node,re.offset)):(ge.setEnd(re.node,re.offset),ye.addRange(ge))}}}}for(De=[],ye=P;ye=ye.parentNode;)ye.nodeType===1&&De.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<De.length;P++){var Le=De[P];Le.element.scrollLeft=Le.left,Le.element.scrollTop=Le.top}}Mc=!!Jg,Xg=Jg=null}finally{aa=f,ie.p=u,J.T=o}}a.current=i,dn=2}}function h0(){if(dn===2){dn=0;var a=Hr,i=co,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=J.T,J.T=null;var u=ie.p;ie.p=2;var f=aa;aa|=4;try{Ky(a,i.alternate,i)}finally{aa=f,ie.p=u,J.T=o}}dn=3}}function f0(){if(dn===4||dn===3){dn=0,Se();var a=Hr,i=co,o=uo,u=a0;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?dn=5:(dn=0,co=Hr=null,p0(a,a.pendingLanes));var f=a.pendingLanes;if(f===0&&(jr=null),Lt(o),i=i.stateNode,M&&typeof M.onCommitFiberRoot=="function")try{M.onCommitFiberRoot(qt,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=J.T,f=ie.p,ie.p=2,J.T=null;try{for(var E=a.onRecoverableError,D=0;D<u.length;D++){var P=u[D];E(P.value,{componentStack:P.stack})}}finally{J.T=i,ie.p=f}}(uo&3)!==0&&wc(),Di(a),f=a.pendingLanes,(o&4194090)!==0&&(f&42)!==0?a===_g?wl++:(wl=0,_g=a):wl=0,Il(0)}}function p0(a,i){(a.pooledCacheLanes&=i)===0&&(i=a.pooledCache,i!=null&&(a.pooledCache=null,al(i)))}function wc(a){return g0(),h0(),f0(),A0()}function A0(){if(dn!==5)return!1;var a=Hr,i=Mg;Mg=0;var o=Lt(uo),u=J.T,f=ie.p;try{ie.p=32>o?32:o,J.T=null,o=Bg,Bg=null;var E=Hr,D=uo;if(dn=0,co=Hr=null,uo=0,(aa&6)!==0)throw Error(r(331));var P=aa;if(aa|=4,e0(E.current),Xy(E,E.current,D,o),aa=P,Il(0,!1),M&&typeof M.onPostCommitFiberRoot=="function")try{M.onPostCommitFiberRoot(qt,E)}catch{}return!0}finally{ie.p=f,J.T=u,p0(a,i)}}function y0(a,i,o){i=ii(o,i),i=hg(a.stateNode,i,2),a=Dr(a,i,2),a!==null&&(Yt(a,2),Di(a))}function ua(a,i,o){if(a.tag===3)y0(a,a,o);else for(;i!==null;){if(i.tag===3){y0(i,a,o);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(jr===null||!jr.has(u))){a=ii(o,a),o=wy(2),u=Dr(i,o,2),u!==null&&(Iy(o,u,i,a),Yt(u,2),Di(u));break}}i=i.return}}function jg(a,i,o){var u=a.pingCache;if(u===null){u=a.pingCache=new UL;var f=new Set;u.set(i,f)}else f=u.get(i),f===void 0&&(f=new Set,u.set(i,f));f.has(o)||(Lg=!0,f.add(o),a=OL.bind(null,a,i,o),i.then(a,a))}function OL(a,i,o){var u=a.pingCache;u!==null&&u.delete(i),a.pingedLanes|=a.suspendedLanes&o,a.warmLanes&=~o,ha===a&&(Kt&o)===o&&(Ta===4||Ta===3&&(Kt&62914560)===Kt&&300>Fe()-Ug?(aa&2)===0&&mo(a,0):Dg|=o,lo===Kt&&(lo=0)),Di(a)}function E0(a,i){i===0&&(i=xa()),a=Ws(a,i),a!==null&&(Yt(a,i),Di(a))}function PL(a){var i=a.memoizedState,o=0;i!==null&&(o=i.retryLane),E0(a,o)}function jL(a,i){var o=0;switch(a.tag){case 13:var u=a.stateNode,f=a.memoizedState;f!==null&&(o=f.retryLane);break;case 19:u=a.stateNode;break;case 22:u=a.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(i),E0(a,o)}function HL(a,i){return it(a,i)}var Ic=null,ho=null,Hg=!1,Cc=!1,Vg=!1,Ss=0;function Di(a){a!==ho&&a.next===null&&(ho===null?Ic=ho=a:ho=ho.next=a),Cc=!0,Hg||(Hg=!0,zL())}function Il(a,i){if(!Vg&&Cc){Vg=!0;do for(var o=!1,u=Ic;u!==null;){if(a!==0){var f=u.pendingLanes;if(f===0)var E=0;else{var D=u.suspendedLanes,P=u.pingedLanes;E=(1<<31-N(42|a)+1)-1,E&=f&~(D&~P),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(o=!0,I0(u,E))}else E=Kt,E=pt(u,u===ha?E:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(E&3)===0||It(u,E)||(o=!0,I0(u,E));u=u.next}while(o);Vg=!1}}function VL(){b0()}function b0(){Cc=Hg=!1;var a=0;Ss!==0&&(XL()&&(a=Ss),Ss=0);for(var i=Fe(),o=null,u=Ic;u!==null;){var f=u.next,E=v0(u,i);E===0?(u.next=null,o===null?Ic=f:o.next=f,f===null&&(ho=o)):(o=u,(a!==0||(E&3)!==0)&&(Cc=!0)),u=f}Il(a)}function v0(a,i){for(var o=a.suspendedLanes,u=a.pingedLanes,f=a.expirationTimes,E=a.pendingLanes&-62914561;0<E;){var D=31-N(E),P=1<<D,$=f[D];$===-1?((P&o)===0||(P&u)!==0)&&(f[D]=At(P,i)):$<=i&&(a.expiredLanes|=P),E&=~P}if(i=ha,o=Kt,o=pt(a,a===i?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),u=a.callbackNode,o===0||a===i&&(na===2||na===9)||a.cancelPendingCommit!==null)return u!==null&&u!==null&&Ke(u),a.callbackNode=null,a.callbackPriority=0;if((o&3)===0||It(a,o)){if(i=o&-o,i===a.callbackPriority)return i;switch(u!==null&&Ke(u),Lt(o)){case 2:case 8:o=ze;break;case 32:o=je;break;case 268435456:o=wt;break;default:o=je}return u=w0.bind(null,a),o=it(o,u),a.callbackPriority=i,a.callbackNode=o,i}return u!==null&&u!==null&&Ke(u),a.callbackPriority=2,a.callbackNode=null,2}function w0(a,i){if(dn!==0&&dn!==5)return a.callbackNode=null,a.callbackPriority=0,null;var o=a.callbackNode;if(wc()&&a.callbackNode!==o)return null;var u=Kt;return u=pt(a,a===ha?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),u===0?null:(i0(a,u,i),v0(a,Fe()),a.callbackNode!=null&&a.callbackNode===o?w0.bind(null,a):null)}function I0(a,i){if(wc())return null;i0(a,i,!0)}function zL(){ZL(function(){(aa&6)!==0?it(Re,VL):b0()})}function zg(){return Ss===0&&(Ss=hi()),Ss}function C0(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Tn(""+a)}function S0(a,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,a.id&&o.setAttribute("form",a.id),i.parentNode.insertBefore(o,i),a=new FormData(a),o.parentNode.removeChild(o),a}function QL(a,i,o,u,f){if(i==="submit"&&o&&o.stateNode===f){var E=C0((f[Qt]||null).action),D=u.submitter;D&&(i=(i=D[Qt]||null)?C0(i.formAction):D.getAttribute("formAction"),i!==null&&(E=i,D=null));var P=new Ct("action","action",null,u,f);a.push({event:P,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Ss!==0){var $=D?S0(f,D):new FormData(f);dg(o,{pending:!0,data:$,method:f.method,action:E},null,$)}}else typeof E=="function"&&(P.preventDefault(),$=D?S0(f,D):new FormData(f),dg(o,{pending:!0,data:$,method:f.method,action:E},E,$))},currentTarget:f}]})}}for(var Qg=0;Qg<km.length;Qg++){var Kg=km[Qg],KL=Kg.toLowerCase(),GL=Kg[0].toUpperCase()+Kg.slice(1);pi(KL,"on"+GL)}pi(iA,"onAnimationEnd"),pi(rA,"onAnimationIteration"),pi(sA,"onAnimationStart"),pi("dblclick","onDoubleClick"),pi("focusin","onFocus"),pi("focusout","onBlur"),pi(dL,"onTransitionRun"),pi(cL,"onTransitionStart"),pi(uL,"onTransitionCancel"),pi(oA,"onTransitionEnd"),Ie("onMouseEnter",["mouseout","mouseover"]),Ie("onMouseLeave",["mouseout","mouseover"]),Ie("onPointerEnter",["pointerout","pointerover"]),Ie("onPointerLeave",["pointerout","pointerover"]),q("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),q("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),q("onBeforeInput",["compositionend","keypress","textInput","paste"]),q("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),q("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),q("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(" "),WL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Cl));function N0(a,i){i=(i&4)!==0;for(var o=0;o<a.length;o++){var u=a[o],f=u.event;u=u.listeners;e:{var E=void 0;if(i)for(var D=u.length-1;0<=D;D--){var P=u[D],$=P.instance,he=P.currentTarget;if(P=P.listener,$!==E&&f.isPropagationStopped())break e;E=P,f.currentTarget=he;try{E(f)}catch(ke){uc(ke)}f.currentTarget=null,E=$}else for(D=0;D<u.length;D++){if(P=u[D],$=P.instance,he=P.currentTarget,P=P.listener,$!==E&&f.isPropagationStopped())break e;E=P,f.currentTarget=he;try{E(f)}catch(ke){uc(ke)}f.currentTarget=null,E=$}}}}function Ot(a,i){var o=i[ga];o===void 0&&(o=i[ga]=new Set);var u=a+"__bubble";o.has(u)||(T0(i,a,2,!1),o.add(u))}function Gg(a,i,o){var u=0;i&&(u|=4),T0(o,a,u,i)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function Wg(a){if(!a[Sc]){a[Sc]=!0,ot.forEach(function(o){o!=="selectionchange"&&(WL.has(o)||Gg(o,!1,a),Gg(o,!0,a))});var i=a.nodeType===9?a:a.ownerDocument;i===null||i[Sc]||(i[Sc]=!0,Gg("selectionchange",!1,i))}}function T0(a,i,o,u){switch(X0(i)){case 2:var f=bD;break;case 8:f=vD;break;default:f=oh}o=f.bind(null,i,o,a),f=void 0,!ai||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),u?f!==void 0?a.addEventListener(i,o,{capture:!0,passive:f}):a.addEventListener(i,o,!0):f!==void 0?a.addEventListener(i,o,{passive:f}):a.addEventListener(i,o,!1)}function qg(a,i,o,u,f){var E=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var D=u.tag;if(D===3||D===4){var P=u.stateNode.containerInfo;if(P===f)break;if(D===4)for(D=u.return;D!==null;){var $=D.tag;if(($===3||$===4)&&D.stateNode.containerInfo===f)return;D=D.return}for(;P!==null;){if(D=Da(P),D===null)return;if($=D.tag,$===5||$===6||$===26||$===27){u=E=D;continue e}P=P.parentNode}}u=u.return}Ko(function(){var he=E,ke=qi(o),De=[];e:{var Ae=lA.get(a);if(Ae!==void 0){var ye=Ct,ft=a;switch(a){case"keypress":if(H(o)===0)break e;case"keydown":case"keyup":ye=mm;break;case"focusin":ft="focus",ye=Go;break;case"focusout":ft="blur",ye=Go;break;case"beforeblur":case"afterblur":ye=Go;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":ye=Bd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=em;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=hm;break;case iA:case rA:case sA:ye=nm;break;case oA:ye=pm;break;case"scroll":case"scrollend":ye=Aa;break;case"wheel":ye=Pd;break;case"copy":case"cut":case"paste":ye=rm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=Od;break;case"toggle":case"beforetoggle":ye=Em}var lt=(i&4)!==0,la=!lt&&(a==="scroll"||a==="scrollend"),oe=lt?Ae!==null?Ae+"Capture":null:Ae;lt=[];for(var re=he,ge;re!==null;){var Le=re;if(ge=Le.stateNode,Le=Le.tag,Le!==5&&Le!==26&&Le!==27||ge===null||oe===null||(Le=Sr(re,oe),Le!=null&&lt.push(Sl(re,Le,ge))),la)break;re=re.return}0<lt.length&&(Ae=new ye(Ae,ft,null,o,ke),De.push({event:Ae,listeners:lt}))}}if((i&7)===0){e:{if(Ae=a==="mouseover"||a==="pointerover",ye=a==="mouseout"||a==="pointerout",Ae&&o!==ti&&(ft=o.relatedTarget||o.fromElement)&&(Da(ft)||ft[Ht]))break e;if((ye||Ae)&&(Ae=ke.window===ke?ke:(Ae=ke.ownerDocument)?Ae.defaultView||Ae.parentWindow:window,ye?(ft=o.relatedTarget||o.toElement,ye=he,ft=ft?Da(ft):null,ft!==null&&(la=l(ft),lt=ft.tag,ft!==la||lt!==5&&lt!==27&&lt!==6)&&(ft=null)):(ye=null,ft=he),ye!==ft)){if(lt=Bd,Le="onMouseLeave",oe="onMouseEnter",re="mouse",(a==="pointerout"||a==="pointerover")&&(lt=Od,Le="onPointerLeave",oe="onPointerEnter",re="pointer"),la=ye==null?Ae:Oe(ye),ge=ft==null?Ae:Oe(ft),Ae=new lt(Le,re+"leave",ye,o,ke),Ae.target=la,Ae.relatedTarget=ge,Le=null,Da(ke)===he&&(lt=new lt(oe,re+"enter",ft,o,ke),lt.target=ge,lt.relatedTarget=la,Le=lt),la=Le,ye&&ft)t:{for(lt=ye,oe=ft,re=0,ge=lt;ge;ge=fo(ge))re++;for(ge=0,Le=oe;Le;Le=fo(Le))ge++;for(;0<re-ge;)lt=fo(lt),re--;for(;0<ge-re;)oe=fo(oe),ge--;for(;re--;){if(lt===oe||oe!==null&&lt===oe.alternate)break t;lt=fo(lt),oe=fo(oe)}lt=null}else lt=null;ye!==null&&k0(De,Ae,ye,lt,!1),ft!==null&&la!==null&&k0(De,la,ft,lt,!0)}}e:{if(Ae=he?Oe(he):window,ye=Ae.nodeName&&Ae.nodeName.toLowerCase(),ye==="select"||ye==="input"&&Ae.type==="file")var Je=Wp;else if(fn(Ae))if(qp)Je=sL;else{Je=iL;var Mt=nL}else ye=Ae.nodeName,!ye||ye.toLowerCase()!=="input"||Ae.type!=="checkbox"&&Ae.type!=="radio"?he&&wr(he.elementType)&&(Je=Wp):Je=rL;if(Je&&(Je=Je(a,he))){xn(De,Je,o,ke);break e}Mt&&Mt(a,Ae,he),a==="focusout"&&he&&Ae.type==="number"&&he.memoizedProps.value!=null&&js(Ae,"number",Ae.value)}switch(Mt=he?Oe(he):window,a){case"focusin":(fn(Mt)||Mt.contentEditable==="true")&&(Qs=Mt,Sm=he,Xo=null);break;case"focusout":Xo=Sm=Qs=null;break;case"mousedown":Nm=!0;break;case"contextmenu":case"mouseup":case"dragend":Nm=!1,aA(De,o,ke);break;case"selectionchange":if(lL)break;case"keydown":case"keyup":aA(De,o,ke)}var nt;if(Nr)e:{switch(a){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else ct?Ye(a,o)&&(ut="onCompositionEnd"):a==="keydown"&&o.keyCode===229&&(ut="onCompositionStart");ut&&(Yo&&o.locale!=="ko"&&(ct||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&ct&&(nt=R()):(ni=ke,y="value"in ni?ni.value:ni.textContent,ct=!0)),Mt=Nc(he,ut),0<Mt.length&&(ut=new Wo(ut,a,null,o,ke),De.push({event:ut,listeners:Mt}),nt?ut.data=nt:(nt=st(o),nt!==null&&(ut.data=nt)))),(nt=jd?Jt(a,o):Pn(a,o))&&(ut=Nc(he,"onBeforeInput"),0<ut.length&&(Mt=new Wo("onBeforeInput","beforeinput",null,o,ke),De.push({event:Mt,listeners:ut}),Mt.data=nt)),QL(De,a,he,o,ke)}N0(De,i)})}function Sl(a,i,o){return{instance:a,listener:i,currentTarget:o}}function Nc(a,i){for(var o=i+"Capture",u=[];a!==null;){var f=a,E=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||E===null||(f=Sr(a,o),f!=null&&u.unshift(Sl(a,f,E)),f=Sr(a,i),f!=null&&u.push(Sl(a,f,E))),a.tag===3)return u;a=a.return}return[]}function fo(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function k0(a,i,o,u,f){for(var E=i._reactName,D=[];o!==null&&o!==u;){var P=o,$=P.alternate,he=P.stateNode;if(P=P.tag,$!==null&&$===u)break;P!==5&&P!==26&&P!==27||he===null||($=he,f?(he=Sr(o,E),he!=null&&D.unshift(Sl(o,he,$))):f||(he=Sr(o,E),he!=null&&D.push(Sl(o,he,$)))),o=o.return}D.length!==0&&a.push({event:i,listeners:D})}var qL=/\r\n?/g,YL=/\u0000|\uFFFD/g;function x0(a){return(typeof a=="string"?a:""+a).replace(qL,`
`).replace(YL,"")}function L0(a,i){return i=x0(i),x0(a)===i}function Tc(){}function oa(a,i,o,u,f,E){switch(o){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||Ni(a,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&Ni(a,""+u);break;case"className":Fa(a,"class",u);break;case"tabIndex":Fa(a,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Fa(a,o,u);break;case"style":ls(a,u,E);break;case"data":if(i!=="object"){Fa(a,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||o!=="href")){a.removeAttribute(o);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){a.removeAttribute(o);break}u=Tn(""+u),a.setAttribute(o,u);break;case"action":case"formAction":if(typeof u=="function"){a.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 E=="function"&&(o==="formAction"?(i!=="input"&&oa(a,i,"name",f.name,f,null),oa(a,i,"formEncType",f.formEncType,f,null),oa(a,i,"formMethod",f.formMethod,f,null),oa(a,i,"formTarget",f.formTarget,f,null)):(oa(a,i,"encType",f.encType,f,null),oa(a,i,"method",f.method,f,null),oa(a,i,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){a.removeAttribute(o);break}u=Tn(""+u),a.setAttribute(o,u);break;case"onClick":u!=null&&(a.onclick=Tc);break;case"onScroll":u!=null&&Ot("scroll",a);break;case"onScrollEnd":u!=null&&Ot("scrollend",a);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(f.children!=null)throw Error(r(60));a.innerHTML=o}}break;case"multiple":a.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":a.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"){a.removeAttribute("xlink:href");break}o=Tn(""+u),a.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"?a.setAttribute(o,""+u):a.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"?a.setAttribute(o,""):a.removeAttribute(o);break;case"capture":case"download":u===!0?a.setAttribute(o,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?a.setAttribute(o,u):a.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?a.setAttribute(o,u):a.removeAttribute(o);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?a.removeAttribute(o):a.setAttribute(o,u);break;case"popover":Ot("beforetoggle",a),Ot("toggle",a),da(a,"popover",u);break;case"xlinkActuate":wa(a,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":wa(a,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":wa(a,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":wa(a,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":wa(a,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":wa(a,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":wa(a,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":wa(a,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":wa(a,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":da(a,"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=Wi.get(o)||o,da(a,o,u))}}function Yg(a,i,o,u,f,E){switch(o){case"style":ls(a,u,E);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(o=u.__html,o!=null){if(f.children!=null)throw Error(r(60));a.innerHTML=o}}break;case"children":typeof u=="string"?Ni(a,u):(typeof u=="number"||typeof u=="bigint")&&Ni(a,""+u);break;case"onScroll":u!=null&&Ot("scroll",a);break;case"onScrollEnd":u!=null&&Ot("scrollend",a);break;case"onClick":u!=null&&(a.onclick=Tc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Me.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(f=o.endsWith("Capture"),i=o.slice(2,f?o.length-7:void 0),E=a[Qt]||null,E=E!=null?E[o]:null,typeof E=="function"&&a.removeEventListener(i,E,f),typeof u=="function")){typeof E!="function"&&E!==null&&(o in a?a[o]=null:a.hasAttribute(o)&&a.removeAttribute(o)),a.addEventListener(i,u,f);break e}o in a?a[o]=u:u===!0?a.setAttribute(o,""):da(a,o,u)}}}function cn(a,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ot("error",a),Ot("load",a);var u=!1,f=!1,E;for(E in o)if(o.hasOwnProperty(E)){var D=o[E];if(D!=null)switch(E){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:oa(a,i,E,D,o,null)}}f&&oa(a,i,"srcSet",o.srcSet,o,null),u&&oa(a,i,"src",o.src,o,null);return;case"input":Ot("invalid",a);var P=E=D=f=null,$=null,he=null;for(u in o)if(o.hasOwnProperty(u)){var ke=o[u];if(ke!=null)switch(u){case"name":f=ke;break;case"type":D=ke;break;case"checked":$=ke;break;case"defaultChecked":he=ke;break;case"value":E=ke;break;case"defaultValue":P=ke;break;case"children":case"dangerouslySetInnerHTML":if(ke!=null)throw Error(r(137,i));break;default:oa(a,i,u,ke,o,null)}}br(a,E,P,$,he,D,f,!1),Ki(a);return;case"select":Ot("invalid",a),u=D=E=null;for(f in o)if(o.hasOwnProperty(f)&&(P=o[f],P!=null))switch(f){case"value":E=P;break;case"defaultValue":D=P;break;case"multiple":u=P;default:oa(a,i,f,P,o,null)}i=E,o=D,a.multiple=!!u,i!=null?vr(a,!!u,i,!1):o!=null&&vr(a,!!u,o,!0);return;case"textarea":Ot("invalid",a),E=f=u=null;for(D in o)if(o.hasOwnProperty(D)&&(P=o[D],P!=null))switch(D){case"value":u=P;break;case"defaultValue":f=P;break;case"children":E=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(91));break;default:oa(a,i,D,P,o,null)}Vo(a,u,f,E),Ki(a);return;case"option":for($ in o)if(o.hasOwnProperty($)&&(u=o[$],u!=null))switch($){case"selected":a.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:oa(a,i,$,u,o,null)}return;case"dialog":Ot("beforetoggle",a),Ot("toggle",a),Ot("cancel",a),Ot("close",a);break;case"iframe":case"object":Ot("load",a);break;case"video":case"audio":for(u=0;u<Cl.length;u++)Ot(Cl[u],a);break;case"image":Ot("error",a),Ot("load",a);break;case"details":Ot("toggle",a);break;case"embed":case"source":case"link":Ot("error",a),Ot("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(he in o)if(o.hasOwnProperty(he)&&(u=o[he],u!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:oa(a,i,he,u,o,null)}return;default:if(wr(i)){for(ke in o)o.hasOwnProperty(ke)&&(u=o[ke],u!==void 0&&Yg(a,i,ke,u,o,void 0));return}}for(P in o)o.hasOwnProperty(P)&&(u=o[P],u!=null&&oa(a,i,P,u,o,null))}function JL(a,i,o,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,E=null,D=null,P=null,$=null,he=null,ke=null;for(ye in o){var De=o[ye];if(o.hasOwnProperty(ye)&&De!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":$=De;default:u.hasOwnProperty(ye)||oa(a,i,ye,null,u,De)}}for(var Ae in u){var ye=u[Ae];if(De=o[Ae],u.hasOwnProperty(Ae)&&(ye!=null||De!=null))switch(Ae){case"type":E=ye;break;case"name":f=ye;break;case"checked":he=ye;break;case"defaultChecked":ke=ye;break;case"value":D=ye;break;case"defaultValue":P=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,i));break;default:ye!==De&&oa(a,i,Ae,ye,u,De)}}Ho(a,D,P,$,he,ke,E,f);return;case"select":ye=D=P=Ae=null;for(E in o)if($=o[E],o.hasOwnProperty(E)&&$!=null)switch(E){case"value":break;case"multiple":ye=$;default:u.hasOwnProperty(E)||oa(a,i,E,null,u,$)}for(f in u)if(E=u[f],$=o[f],u.hasOwnProperty(f)&&(E!=null||$!=null))switch(f){case"value":Ae=E;break;case"defaultValue":P=E;break;case"multiple":D=E;default:E!==$&&oa(a,i,f,E,u,$)}i=P,o=D,u=ye,Ae!=null?vr(a,!!o,Ae,!1):!!u!=!!o&&(i!=null?vr(a,!!o,i,!0):vr(a,!!o,o?[]:"",!1));return;case"textarea":ye=Ae=null;for(P in o)if(f=o[P],o.hasOwnProperty(P)&&f!=null&&!u.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:oa(a,i,P,null,u,f)}for(D in u)if(f=u[D],E=o[D],u.hasOwnProperty(D)&&(f!=null||E!=null))switch(D){case"value":Ae=f;break;case"defaultValue":ye=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==E&&oa(a,i,D,f,u,E)}Hs(a,Ae,ye);return;case"option":for(var ft in o)if(Ae=o[ft],o.hasOwnProperty(ft)&&Ae!=null&&!u.hasOwnProperty(ft))switch(ft){case"selected":a.selected=!1;break;default:oa(a,i,ft,null,u,Ae)}for($ in u)if(Ae=u[$],ye=o[$],u.hasOwnProperty($)&&Ae!==ye&&(Ae!=null||ye!=null))switch($){case"selected":a.selected=Ae&&typeof Ae!="function"&&typeof Ae!="symbol";break;default:oa(a,i,$,Ae,u,ye)}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 lt in o)Ae=o[lt],o.hasOwnProperty(lt)&&Ae!=null&&!u.hasOwnProperty(lt)&&oa(a,i,lt,null,u,Ae);for(he in u)if(Ae=u[he],ye=o[he],u.hasOwnProperty(he)&&Ae!==ye&&(Ae!=null||ye!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(Ae!=null)throw Error(r(137,i));break;default:oa(a,i,he,Ae,u,ye)}return;default:if(wr(i)){for(var la in o)Ae=o[la],o.hasOwnProperty(la)&&Ae!==void 0&&!u.hasOwnProperty(la)&&Yg(a,i,la,void 0,u,Ae);for(ke in u)Ae=u[ke],ye=o[ke],!u.hasOwnProperty(ke)||Ae===ye||Ae===void 0&&ye===void 0||Yg(a,i,ke,Ae,u,ye);return}}for(var oe in o)Ae=o[oe],o.hasOwnProperty(oe)&&Ae!=null&&!u.hasOwnProperty(oe)&&oa(a,i,oe,null,u,Ae);for(De in u)Ae=u[De],ye=o[De],!u.hasOwnProperty(De)||Ae===ye||Ae==null&&ye==null||oa(a,i,De,Ae,u,ye)}var Jg=null,Xg=null;function kc(a){return a.nodeType===9?a:a.ownerDocument}function D0(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function R0(a,i){if(a===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&i==="foreignObject"?0:a}function $g(a,i){return a==="textarea"||a==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Zg=null;function XL(){var a=window.event;return a&&a.type==="popstate"?a===Zg?!1:(Zg=a,!0):(Zg=null,!1)}var U0=typeof setTimeout=="function"?setTimeout:void 0,$L=typeof clearTimeout=="function"?clearTimeout:void 0,M0=typeof Promise=="function"?Promise:void 0,ZL=typeof queueMicrotask=="function"?queueMicrotask:typeof M0<"u"?function(a){return M0.resolve(null).then(a).catch(eD)}:U0;function eD(a){setTimeout(function(){throw a})}function zr(a){return a==="head"}function B0(a,i){var o=i,u=0,f=0;do{var E=o.nextSibling;if(a.removeChild(o),E&&E.nodeType===8)if(o=E.data,o==="/$"){if(0<u&&8>u){o=u;var D=a.ownerDocument;if(o&1&&Nl(D.documentElement),o&2&&Nl(D.body),o&4)for(o=D.head,Nl(o),D=o.firstChild;D;){var P=D.nextSibling,$=D.nodeName;D[_a]||$==="SCRIPT"||$==="STYLE"||$==="LINK"&&D.rel.toLowerCase()==="stylesheet"||o.removeChild(D),D=P}}if(f===0){a.removeChild(E),Ml(i);return}f--}else o==="$"||o==="$?"||o==="$!"?f++:u=o.charCodeAt(0)-48;else u=0;o=E}while(o);Ml(i)}function eh(a){var i=a.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":eh(o),pa(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}a.removeChild(o)}}function tD(a,i,o,u){for(;a.nodeType===1;){var f=o;if(a.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(u){if(!a[_a])switch(i){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(E=a.getAttribute("rel"),E==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(E!==f.rel||a.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||a.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||a.getAttribute("title")!==(f.title==null?null:f.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(E=a.getAttribute("src"),(E!==(f.src==null?null:f.src)||a.getAttribute("type")!==(f.type==null?null:f.type)||a.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&E&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(i==="input"&&a.type==="hidden"){var E=f.name==null?null:""+f.name;if(f.type==="hidden"&&a.getAttribute("name")===E)return a}else return a;if(a=yi(a.nextSibling),a===null)break}return null}function aD(a,i,o){if(i==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=yi(a.nextSibling),a===null))return null;return a}function th(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState==="complete"}function nD(a,i){var o=a.ownerDocument;if(a.data!=="$?"||o.readyState==="complete")i();else{var u=function(){i(),o.removeEventListener("DOMContentLoaded",u)};o.addEventListener("DOMContentLoaded",u),a._reactRetry=u}}function yi(a){for(;a!=null;a=a.nextSibling){var i=a.nodeType;if(i===1||i===3)break;if(i===8){if(i=a.data,i==="$"||i==="$!"||i==="$?"||i==="F!"||i==="F")break;if(i==="/$")return null}}return a}var ah=null;function _0(a){a=a.previousSibling;for(var i=0;a;){if(a.nodeType===8){var o=a.data;if(o==="$"||o==="$!"||o==="$?"){if(i===0)return a;i--}else o==="/$"&&i++}a=a.previousSibling}return null}function F0(a,i,o){switch(i=kc(o),a){case"html":if(a=i.documentElement,!a)throw Error(r(452));return a;case"head":if(a=i.head,!a)throw Error(r(453));return a;case"body":if(a=i.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Nl(a){for(var i=a.attributes;i.length;)a.removeAttributeNode(i[0]);pa(a)}var ci=new Map,O0=new Set;function xc(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var lr=ie.d;ie.d={f:iD,r:rD,D:sD,C:oD,L:lD,m:dD,X:uD,S:cD,M:mD};function iD(){var a=lr.f(),i=bc();return a||i}function rD(a){var i=de(a);i!==null&&i.tag===5&&i.type==="form"?iy(i):lr.r(a)}var po=typeof document>"u"?null:document;function P0(a,i,o){var u=po;if(u&&typeof i=="string"&&i){var f=Nn(i);f='link[rel="'+a+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),O0.has(f)||(O0.add(f),a={rel:a,crossOrigin:o,href:i},u.querySelector(f)===null&&(i=u.createElement("link"),cn(i,"link",a),We(i),u.head.appendChild(i)))}}function sD(a){lr.D(a),P0("dns-prefetch",a,null)}function oD(a,i){lr.C(a,i),P0("preconnect",a,i)}function lD(a,i,o){lr.L(a,i,o);var u=po;if(u&&a&&i){var f='link[rel="preload"][as="'+Nn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+Nn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+Nn(o.imageSizes)+'"]')):f+='[href="'+Nn(a)+'"]';var E=f;switch(i){case"style":E=Ao(a);break;case"script":E=yo(a)}ci.has(E)||(a=A({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:a,as:i},o),ci.set(E,a),u.querySelector(f)!==null||i==="style"&&u.querySelector(Tl(E))||i==="script"&&u.querySelector(kl(E))||(i=u.createElement("link"),cn(i,"link",a),We(i),u.head.appendChild(i)))}}function dD(a,i){lr.m(a,i);var o=po;if(o&&a){var u=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+Nn(u)+'"][href="'+Nn(a)+'"]',E=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=yo(a)}if(!ci.has(E)&&(a=A({rel:"modulepreload",href:a},i),ci.set(E,a),o.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(kl(E)))return}u=o.createElement("link"),cn(u,"link",a),We(u),o.head.appendChild(u)}}}function cD(a,i,o){lr.S(a,i,o);var u=po;if(u&&a){var f=Qe(u).hoistableStyles,E=Ao(a);i=i||"default";var D=f.get(E);if(!D){var P={loading:0,preload:null};if(D=u.querySelector(Tl(E)))P.loading=5;else{a=A({rel:"stylesheet",href:a,"data-precedence":i},o),(o=ci.get(E))&&nh(a,o);var $=D=u.createElement("link");We($),cn($,"link",a),$._p=new Promise(function(he,ke){$.onload=he,$.onerror=ke}),$.addEventListener("load",function(){P.loading|=1}),$.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Lc(D,i,u)}D={type:"stylesheet",instance:D,count:1,state:P},f.set(E,D)}}}function uD(a,i){lr.X(a,i);var o=po;if(o&&a){var u=Qe(o).hoistableScripts,f=yo(a),E=u.get(f);E||(E=o.querySelector(kl(f)),E||(a=A({src:a,async:!0},i),(i=ci.get(f))&&ih(a,i),E=o.createElement("script"),We(E),cn(E,"link",a),o.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},u.set(f,E))}}function mD(a,i){lr.M(a,i);var o=po;if(o&&a){var u=Qe(o).hoistableScripts,f=yo(a),E=u.get(f);E||(E=o.querySelector(kl(f)),E||(a=A({src:a,async:!0,type:"module"},i),(i=ci.get(f))&&ih(a,i),E=o.createElement("script"),We(E),cn(E,"link",a),o.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},u.set(f,E))}}function j0(a,i,o,u){var f=(f=Ee.current)?xc(f):null;if(!f)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Ao(o.href),o=Qe(f).hoistableStyles,u=o.get(i),u||(u={type:"style",instance:null,count:0,state:null},o.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){a=Ao(o.href);var E=Qe(f).hoistableStyles,D=E.get(a);if(D||(f=f.ownerDocument||f,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(a,D),(E=f.querySelector(Tl(a)))&&!E._p&&(D.instance=E,D.state.loading=5),ci.has(a)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},ci.set(a,o),E||gD(f,a,o,D.state))),i&&u===null)throw Error(r(528,""));return D}if(i&&u!==null)throw Error(r(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=yo(o),o=Qe(f).hoistableScripts,u=o.get(i),u||(u={type:"script",instance:null,count:0,state:null},o.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Ao(a){return'href="'+Nn(a)+'"'}function Tl(a){return'link[rel="stylesheet"]['+a+"]"}function H0(a){return A({},a,{"data-precedence":a.precedence,precedence:null})}function gD(a,i,o,u){a.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=a.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),cn(i,"link",o),We(i),a.head.appendChild(i))}function yo(a){return'[src="'+Nn(a)+'"]'}function kl(a){return"script[async]"+a}function V0(a,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var u=a.querySelector('style[data-href~="'+Nn(o.href)+'"]');if(u)return i.instance=u,We(u),u;var f=A({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return u=(a.ownerDocument||a).createElement("style"),We(u),cn(u,"style",f),Lc(u,o.precedence,a),i.instance=u;case"stylesheet":f=Ao(o.href);var E=a.querySelector(Tl(f));if(E)return i.state.loading|=4,i.instance=E,We(E),E;u=H0(o),(f=ci.get(f))&&nh(u,f),E=(a.ownerDocument||a).createElement("link"),We(E);var D=E;return D._p=new Promise(function(P,$){D.onload=P,D.onerror=$}),cn(E,"link",u),i.state.loading|=4,Lc(E,o.precedence,a),i.instance=E;case"script":return E=yo(o.src),(f=a.querySelector(kl(E)))?(i.instance=f,We(f),f):(u=o,(f=ci.get(E))&&(u=A({},o),ih(u,f)),a=a.ownerDocument||a,f=a.createElement("script"),We(f),cn(f,"link",u),a.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,Lc(u,o.precedence,a));return i.instance}function Lc(a,i,o){for(var u=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,E=f,D=0;D<u.length;D++){var P=u[D];if(P.dataset.precedence===i)E=P;else if(E!==f)break}E?E.parentNode.insertBefore(a,E.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(a,i.firstChild))}function nh(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.title==null&&(a.title=i.title)}function ih(a,i){a.crossOrigin==null&&(a.crossOrigin=i.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=i.referrerPolicy),a.integrity==null&&(a.integrity=i.integrity)}var Dc=null;function z0(a,i,o){if(Dc===null){var u=new Map,f=Dc=new Map;f.set(o,u)}else f=Dc,u=f.get(o),u||(u=new Map,f.set(o,u));if(u.has(a))return u;for(u.set(a,null),o=o.getElementsByTagName(a),f=0;f<o.length;f++){var E=o[f];if(!(E[_a]||E[Ut]||a==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var D=E.getAttribute(i)||"";D=a+D;var P=u.get(D);P?P.push(E):u.set(D,[E])}}return u}function Q0(a,i,o){a=a.ownerDocument||a,a.head.insertBefore(o,i==="title"?a.querySelector("head > title"):null)}function hD(a,i,o){if(o===1||i.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return a=i.disabled,typeof i.precedence=="string"&&a==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function K0(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}var xl=null;function fD(){}function pD(a,i,o){if(xl===null)throw Error(r(475));var u=xl;if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Ao(o.href),E=a.querySelector(Tl(f));if(E){a=E._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(u.count++,u=Rc.bind(u),a.then(u,u)),i.state.loading|=4,i.instance=E,We(E);return}E=a.ownerDocument||a,o=H0(o),(f=ci.get(f))&&nh(o,f),E=E.createElement("link"),We(E);var D=E;D._p=new Promise(function(P,$){D.onload=P,D.onerror=$}),cn(E,"link",o),i.instance=E}u.stylesheets===null&&(u.stylesheets=new Map),u.stylesheets.set(i,a),(a=i.state.preload)&&(i.state.loading&3)===0&&(u.count++,i=Rc.bind(u),a.addEventListener("load",i),a.addEventListener("error",i))}}function AD(){if(xl===null)throw Error(r(475));var a=xl;return a.stylesheets&&a.count===0&&rh(a,a.stylesheets),0<a.count?function(i){var o=setTimeout(function(){if(a.stylesheets&&rh(a,a.stylesheets),a.unsuspend){var u=a.unsuspend;a.unsuspend=null,u()}},6e4);return a.unsuspend=i,function(){a.unsuspend=null,clearTimeout(o)}}:null}function Rc(){if(this.count--,this.count===0){if(this.stylesheets)rh(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Uc=null;function rh(a,i){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Uc=new Map,i.forEach(yD,a),Uc=null,Rc.call(a))}function yD(a,i){if(!(i.state.loading&4)){var o=Uc.get(a);if(o)var u=o.get(null);else{o=new Map,Uc.set(a,o);for(var f=a.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<f.length;E++){var D=f[E];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(o.set(D.dataset.precedence,D),u=D)}u&&o.set(null,u)}f=i.instance,D=f.getAttribute("data-precedence"),E=o.get(D)||u,E===u&&o.set(null,f),o.set(D,f),this.count++,u=Rc.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),E?E.parentNode.insertBefore(f,E.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(f,a.firstChild)),i.state.loading|=4}}var Ll={$$typeof:x,Provider:null,Consumer:null,_currentValue:be,_currentValue2:be,_threadCount:0};function ED(a,i,o,u,f,E,D,P){this.tag=1,this.containerInfo=a,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=Sa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sa(0),this.hiddenUpdates=Sa(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=E,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function G0(a,i,o,u,f,E,D,P,$,he,ke,De){return a=new ED(a,i,o,D,P,$,he,De),i=1,E===!0&&(i|=24),E=Vn(3,null,null,i),a.current=E,E.stateNode=a,i=jm(),i.refCount++,a.pooledCache=i,i.refCount++,E.memoizedState={element:u,isDehydrated:o,cache:i},Qm(E),a}function W0(a){return a?(a=qs,a):qs}function q0(a,i,o,u,f,E){f=W0(f),u.context===null?u.context=f:u.pendingContext=f,u=Lr(i),u.payload={element:o},E=E===void 0?null:E,E!==null&&(u.callback=E),o=Dr(a,u,i),o!==null&&(Wn(o,a,i),sl(o,a,i))}function Y0(a,i){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var o=a.retryLane;a.retryLane=o!==0&&o<i?o:i}}function sh(a,i){Y0(a,i),(a=a.alternate)&&Y0(a,i)}function J0(a){if(a.tag===13){var i=Ws(a,67108864);i!==null&&Wn(i,a,67108864),sh(a,67108864)}}var Mc=!0;function bD(a,i,o,u){var f=J.T;J.T=null;var E=ie.p;try{ie.p=2,oh(a,i,o,u)}finally{ie.p=E,J.T=f}}function vD(a,i,o,u){var f=J.T;J.T=null;var E=ie.p;try{ie.p=8,oh(a,i,o,u)}finally{ie.p=E,J.T=f}}function oh(a,i,o,u){if(Mc){var f=lh(u);if(f===null)qg(a,i,u,Bc,o),$0(a,u);else if(ID(f,a,i,o,u))u.stopPropagation();else if($0(a,u),i&4&&-1<wD.indexOf(a)){for(;f!==null;){var E=de(f);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var D=ht(E.pendingLanes);if(D!==0){var P=E;for(P.pendingLanes|=2,P.entangledLanes|=2;D;){var $=1<<31-N(D);P.entanglements[1]|=$,D&=~$}Di(E),(aa&6)===0&&(yc=Fe()+500,Il(0))}}break;case 13:P=Ws(E,2),P!==null&&Wn(P,E,2),bc(),sh(E,2)}if(E=lh(u),E===null&&qg(a,i,u,Bc,o),E===f)break;f=E}f!==null&&u.stopPropagation()}else qg(a,i,u,null,o)}}function lh(a){return a=qi(a),dh(a)}var Bc=null;function dh(a){if(Bc=null,a=Da(a),a!==null){var i=l(a);if(i===null)a=null;else{var o=i.tag;if(o===13){if(a=c(i),a!==null)return a;a=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;a=null}else i!==a&&(a=null)}}return Bc=a,null}function X0(a){switch(a){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(fe()){case Re:return 2;case ze:return 8;case je:case at:return 32;case wt:return 268435456;default:return 32}default:return 32}}var ch=!1,Qr=null,Kr=null,Gr=null,Dl=new Map,Rl=new Map,Wr=[],wD="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 $0(a,i){switch(a){case"focusin":case"focusout":Qr=null;break;case"dragenter":case"dragleave":Kr=null;break;case"mouseover":case"mouseout":Gr=null;break;case"pointerover":case"pointerout":Dl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rl.delete(i.pointerId)}}function Ul(a,i,o,u,f,E){return a===null||a.nativeEvent!==E?(a={blockedOn:i,domEventName:o,eventSystemFlags:u,nativeEvent:E,targetContainers:[f]},i!==null&&(i=de(i),i!==null&&J0(i)),a):(a.eventSystemFlags|=u,i=a.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),a)}function ID(a,i,o,u,f){switch(i){case"focusin":return Qr=Ul(Qr,a,i,o,u,f),!0;case"dragenter":return Kr=Ul(Kr,a,i,o,u,f),!0;case"mouseover":return Gr=Ul(Gr,a,i,o,u,f),!0;case"pointerover":var E=f.pointerId;return Dl.set(E,Ul(Dl.get(E)||null,a,i,o,u,f)),!0;case"gotpointercapture":return E=f.pointerId,Rl.set(E,Ul(Rl.get(E)||null,a,i,o,u,f)),!0}return!1}function Z0(a){var i=Da(a.target);if(i!==null){var o=l(i);if(o!==null){if(i=o.tag,i===13){if(i=c(o),i!==null){a.blockedOn=i,on(a.priority,function(){if(o.tag===13){var u=Gn();u=kt(u);var f=Ws(o,u);f!==null&&Wn(f,o,u),sh(o,u)}});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){a.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}a.blockedOn=null}function _c(a){if(a.blockedOn!==null)return!1;for(var i=a.targetContainers;0<i.length;){var o=lh(a.nativeEvent);if(o===null){o=a.nativeEvent;var u=new o.constructor(o.type,o);ti=u,o.target.dispatchEvent(u),ti=null}else return i=de(o),i!==null&&J0(i),a.blockedOn=o,!1;i.shift()}return!0}function eE(a,i,o){_c(a)&&o.delete(i)}function CD(){ch=!1,Qr!==null&&_c(Qr)&&(Qr=null),Kr!==null&&_c(Kr)&&(Kr=null),Gr!==null&&_c(Gr)&&(Gr=null),Dl.forEach(eE),Rl.forEach(eE)}function Fc(a,i){a.blockedOn===i&&(a.blockedOn=null,ch||(ch=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,CD)))}var Oc=null;function tE(a){Oc!==a&&(Oc=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Oc===a&&(Oc=null);for(var i=0;i<a.length;i+=3){var o=a[i],u=a[i+1],f=a[i+2];if(typeof u!="function"){if(dh(u||o)===null)continue;break}var E=de(o);E!==null&&(a.splice(i,3),i-=3,dg(E,{pending:!0,data:f,method:o.method,action:u},u,f))}}))}function Ml(a){function i($){return Fc($,a)}Qr!==null&&Fc(Qr,a),Kr!==null&&Fc(Kr,a),Gr!==null&&Fc(Gr,a),Dl.forEach(i),Rl.forEach(i);for(var o=0;o<Wr.length;o++){var u=Wr[o];u.blockedOn===a&&(u.blockedOn=null)}for(;0<Wr.length&&(o=Wr[0],o.blockedOn===null);)Z0(o),o.blockedOn===null&&Wr.shift();if(o=(a.ownerDocument||a).$$reactFormReplay,o!=null)for(u=0;u<o.length;u+=3){var f=o[u],E=o[u+1],D=f[Qt]||null;if(typeof E=="function")D||tE(o);else if(D){var P=null;if(E&&E.hasAttribute("formAction")){if(f=E,D=E[Qt]||null)P=D.formAction;else if(dh(f)!==null)continue}else P=D.action;typeof P=="function"?o[u+1]=P:(o.splice(u,3),u-=3),tE(o)}}}function uh(a){this._internalRoot=a}Pc.prototype.render=uh.prototype.render=function(a){var i=this._internalRoot;if(i===null)throw Error(r(409));var o=i.current,u=Gn();q0(o,u,a,i,null,null)},Pc.prototype.unmount=uh.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var i=a.containerInfo;q0(a.current,2,null,a,null,null),bc(),i[Ht]=null}};function Pc(a){this._internalRoot=a}Pc.prototype.unstable_scheduleHydration=function(a){if(a){var i=La();a={blockedOn:null,target:a,priority:i};for(var o=0;o<Wr.length&&i!==0&&i<Wr[o].priority;o++);Wr.splice(o,0,a),o===0&&Z0(a)}};var aE=e.version;if(aE!=="19.1.0")throw Error(r(527,aE,"19.1.0"));ie.findDOMNode=function(a){var i=a._reactInternals;if(i===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(i),a=a!==null?g(a):null,a=a===null?null:a.stateNode,a};var SD={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:J,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var jc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!jc.isDisabled&&jc.supportsFiber)try{qt=jc.inject(SD),M=jc}catch{}}return _l.createRoot=function(a,i){if(!s(a))throw Error(r(299));var o=!1,u="",f=yy,E=Ey,D=by,P=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(D=i.onRecoverableError),i.unstable_transitionCallbacks!==void 0&&(P=i.unstable_transitionCallbacks)),i=G0(a,1,!1,null,null,o,u,f,E,D,P,null),a[Ht]=i.current,Wg(a),new uh(i)},_l.hydrateRoot=function(a,i,o){if(!s(a))throw Error(r(299));var u=!1,f="",E=yy,D=Ey,P=by,$=null,he=null;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(E=o.onUncaughtError),o.onCaughtError!==void 0&&(D=o.onCaughtError),o.onRecoverableError!==void 0&&(P=o.onRecoverableError),o.unstable_transitionCallbacks!==void 0&&($=o.unstable_transitionCallbacks),o.formState!==void 0&&(he=o.formState)),i=G0(a,1,!0,i,o??null,u,f,E,D,P,$,he),i.context=W0(null),o=i.current,u=Gn(),u=kt(u),f=Lr(u),f.callback=null,Dr(o,f,u),o=u,i.current.lanes=o,Yt(i,o),Di(i),a[Ht]=i.current,Wg(a),new Pc(i)},_l.version="19.1.0",_l}var mE;function OD(){if(mE)return gh.exports;mE=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),gh.exports=FD(),gh.exports}var PD=OD();const jD=ss(PD);var b=np();const rn=ss(b),HD=(t,e,n,r)=>{var l,c,m,h;const s=[n,{code:e,...r||{}}];if((c=(l=t==null?void 0:t.services)==null?void 0:l.logger)!=null&&c.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);Rs(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(h=(m=t==null?void 0:t.services)==null?void 0:m.logger)!=null&&h.warn?t.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},gE={},Sf=(t,e,n,r)=>{Rs(n)&&gE[n]||(Rs(n)&&(gE[n]=new Date),HD(t,e,n,r))},Vv=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},Nf=(t,e,n)=>{t.loadNamespaces(e,Vv(t,n))},hE=(t,e,n,r)=>{if(Rs(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return Nf(t,n,r);n.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,Vv(t,r))},VD=(t,e,n={})=>!e.languages||!e.languages.length?(Sf(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,s)=>{var l;if(((l=n.bindI18n)==null?void 0:l.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,t))return!1}}),Rs=t=>typeof t=="string",zD=t=>typeof t=="object"&&t!==null,QD=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,KD={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},GD=t=>KD[t],WD=t=>t.replace(QD,GD);let Tf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:WD};const qD=(t={})=>{Tf={...Tf,...t}},YD=()=>Tf;let zv;const JD=t=>{zv=t},XD=()=>zv,$D={type:"3rdParty",init(t){qD(t.options.react),JD(t)}},ZD=b.createContext();class eR{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const tR=(t,e)=>{const n=b.useRef();return b.useEffect(()=>{n.current=t},[t,e]),n.current},Qv=(t,e,n,r)=>t.getFixedT(e,n,r),aR=(t,e,n,r)=>b.useCallback(Qv(t,e,n,r),[t,e,n,r]),tt=(t,e={})=>{var F,B,V,O;const{i18n:n}=e,{i18n:r,defaultNS:s}=b.useContext(ZD)||{},l=n||r||XD();if(l&&!l.reportNamespaces&&(l.reportNamespaces=new eR),!l){Sf(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const _=(Q,K)=>Rs(K)?K:zD(K)&&Rs(K.defaultValue)?K.defaultValue:Array.isArray(Q)?Q[Q.length-1]:Q,z=[_,{},!1];return z.t=_,z.i18n={},z.ready=!1,z}(F=l.options.react)!=null&&F.wait&&Sf(l,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const c={...YD(),...l.options.react,...e},{useSuspense:m,keyPrefix:h}=c;let g=s||((B=l.options)==null?void 0:B.defaultNS);g=Rs(g)?[g]:g||["translation"],(O=(V=l.reportNamespaces).addUsedNamespaces)==null||O.call(V,g);const A=(l.isInitialized||l.initializedStoreOnce)&&g.every(_=>VD(_,l,c)),p=aR(l,e.lng||null,c.nsMode==="fallback"?g:g[0],h),v=()=>p,w=()=>Qv(l,e.lng||null,c.nsMode==="fallback"?g:g[0],h),[T,S]=b.useState(v);let k=g.join();e.lng&&(k=`${e.lng}${k}`);const L=tR(k),U=b.useRef(!0);b.useEffect(()=>{const{bindI18n:_,bindI18nStore:z}=c;U.current=!0,!A&&!m&&(e.lng?hE(l,e.lng,g,()=>{U.current&&S(w)}):Nf(l,g,()=>{U.current&&S(w)})),A&&L&&L!==k&&U.current&&S(w);const Q=()=>{U.current&&S(w)};return _&&(l==null||l.on(_,Q)),z&&(l==null||l.store.on(z,Q)),()=>{U.current=!1,l&&(_==null||_.split(" ").forEach(K=>l.off(K,Q))),z&&l&&z.split(" ").forEach(K=>l.store.off(K,Q))}},[l,k]),b.useEffect(()=>{U.current&&A&&S(v)},[l,h,A]);const x=[T,l,A];if(x.t=T,x.i18n=l,x.ready=A,A||!A&&!m)return x;throw new Promise(_=>{e.lng?hE(l,e.lng,g,()=>_()):Nf(l,g,()=>_())})};/**
 * 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 fE="popstate";function nR(t={}){function e(s,l){let{pathname:c="/",search:m="",hash:h=""}=Ms(s.location.hash.substring(1));return!c.startsWith("/")&&!c.startsWith(".")&&(c="/"+c),kf("",{pathname:c,search:m,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(s,l){let c=s.document.querySelector("base"),m="";if(c&&c.getAttribute("href")){let h=s.location.href,g=h.indexOf("#");m=g===-1?h:h.slice(0,g)}return m+"#"+(typeof l=="string"?l:hd(l))}function r(s,l){Bn(s.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(l)})`)}return rR(e,n,r,t)}function ba(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Bn(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function iR(){return Math.random().toString(36).substring(2,10)}function pE(t,e){return{usr:t.state,key:t.key,idx:e}}function kf(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Ms(e):e,state:n,key:e&&e.key||r||iR()}}function hd({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ms(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function rR(t,e,n,r={}){let{window:s=document.defaultView,v5Compat:l=!1}=r,c=s.history,m="POP",h=null,g=A();g==null&&(g=0,c.replaceState({...c.state,idx:g},""));function A(){return(c.state||{idx:null}).idx}function p(){m="POP";let k=A(),L=k==null?null:k-g;g=k,h&&h({action:m,location:S.location,delta:L})}function v(k,L){m="PUSH";let U=kf(S.location,k,L);n&&n(U,k),g=A()+1;let x=pE(U,g),F=S.createHref(U);try{c.pushState(x,"",F)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;s.location.assign(F)}l&&h&&h({action:m,location:S.location,delta:1})}function w(k,L){m="REPLACE";let U=kf(S.location,k,L);n&&n(U,k),g=A();let x=pE(U,g),F=S.createHref(U);c.replaceState(x,"",F),l&&h&&h({action:m,location:S.location,delta:0})}function T(k){return sR(k)}let S={get action(){return m},get location(){return t(s,c)},listen(k){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(fE,p),h=k,()=>{s.removeEventListener(fE,p),h=null}},createHref(k){return e(s,k)},createURL:T,encodeLocation(k){let L=T(k);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:v,replace:w,go(k){return c.go(k)}};return S}function sR(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),ba(n,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:hd(t);return r=r.replace(/ $/,"%20"),!e&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function Kv(t,e,n="/"){return oR(t,e,n,!1)}function oR(t,e,n,r){let s=typeof e=="string"?Ms(e):e,l=Er(s.pathname||"/",n);if(l==null)return null;let c=Gv(t);lR(c);let m=null;for(let h=0;m==null&&h<c.length;++h){let g=ER(l);m=AR(c[h],g,r)}return m}function Gv(t,e=[],n=[],r="",s=!1){let l=(c,m,h=s,g)=>{let A={relativePath:g===void 0?c.path||"":g,caseSensitive:c.caseSensitive===!0,childrenIndex:m,route:c};if(A.relativePath.startsWith("/")){if(!A.relativePath.startsWith(r)&&h)return;ba(A.relativePath.startsWith(r),`Absolute route path "${A.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),A.relativePath=A.relativePath.slice(r.length)}let p=Ar([r,A.relativePath]),v=n.concat(A);c.children&&c.children.length>0&&(ba(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Gv(c.children,e,v,p,h)),!(c.path==null&&!c.index)&&e.push({path:p,score:fR(p,c.index),routesMeta:v})};return t.forEach((c,m)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))l(c,m);else for(let g of Wv(c.path))l(c,m,!0,g)}),e}function Wv(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return s?[l,""]:[l];let c=Wv(r.join("/")),m=[];return m.push(...c.map(h=>h===""?l:[l,h].join("/"))),s&&m.push(...c),m.map(h=>t.startsWith("/")&&h===""?"/":h)}function lR(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:pR(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var dR=/^:[\w-]+$/,cR=3,uR=2,mR=1,gR=10,hR=-2,AE=t=>t==="*";function fR(t,e){let n=t.split("/"),r=n.length;return n.some(AE)&&(r+=hR),e&&(r+=uR),n.filter(s=>!AE(s)).reduce((s,l)=>s+(dR.test(l)?cR:l===""?mR:gR),r)}function pR(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function AR(t,e,n=!1){let{routesMeta:r}=t,s={},l="/",c=[];for(let m=0;m<r.length;++m){let h=r[m],g=m===r.length-1,A=l==="/"?e:e.slice(l.length)||"/",p=vu({path:h.relativePath,caseSensitive:h.caseSensitive,end:g},A),v=h.route;if(!p&&g&&n&&!r[r.length-1].route.index&&(p=vu({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},A)),!p)return null;Object.assign(s,p.params),c.push({params:s,pathname:Ar([l,p.pathname]),pathnameBase:IR(Ar([l,p.pathnameBase])),route:v}),p.pathnameBase!=="/"&&(l=Ar([l,p.pathnameBase]))}return c}function vu(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=yR(t.path,t.caseSensitive,t.end),s=e.match(n);if(!s)return null;let l=s[0],c=l.replace(/(.)\/+$/,"$1"),m=s.slice(1);return{params:r.reduce((g,{paramName:A,isOptional:p},v)=>{if(A==="*"){let T=m[v]||"";c=l.slice(0,l.length-T.length).replace(/(.)\/+$/,"$1")}const w=m[v];return p&&!w?g[A]=void 0:g[A]=(w||"").replace(/%2F/g,"/"),g},{}),pathname:l,pathnameBase:c,pattern:t}}function yR(t,e=!1,n=!0){Bn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,m,h)=>(r.push({paramName:m,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function ER(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Bn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Er(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}var qv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bR=t=>qv.test(t);function vR(t,e="/"){let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Ms(t):t,l;if(n)if(bR(n))l=n;else{if(n.includes("//")){let c=n;n=n.replace(/\/\/+/g,"/"),Bn(!1,`Pathnames cannot have embedded double slashes - normalizing ${c} -> ${n}`)}n.startsWith("/")?l=yE(n.substring(1),"/"):l=yE(n,e)}else l=e;return{pathname:l,search:CR(r),hash:SR(s)}}function yE(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function yh(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function wR(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function ip(t){let e=wR(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function rp(t,e,n,r=!1){let s;typeof t=="string"?s=Ms(t):(s={...t},ba(!s.pathname||!s.pathname.includes("?"),yh("?","pathname","search",s)),ba(!s.pathname||!s.pathname.includes("#"),yh("#","pathname","hash",s)),ba(!s.search||!s.search.includes("#"),yh("#","search","hash",s)));let l=t===""||s.pathname==="",c=l?"/":s.pathname,m;if(c==null)m=n;else{let p=e.length-1;if(!r&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),p-=1;s.pathname=v.join("/")}m=p>=0?e[p]:"/"}let h=vR(s,m),g=c&&c!=="/"&&c.endsWith("/"),A=(l||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(g||A)&&(h.pathname+="/"),h}var Ar=t=>t.join("/").replace(/\/\/+/g,"/"),IR=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),CR=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,SR=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,NR=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function TR(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function kR(t){return t.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Yv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Jv(t,e){let n=t;if(typeof n!="string"||!qv.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,s=!1;if(Yv)try{let l=new URL(window.location.href),c=n.startsWith("//")?new URL(l.protocol+n):new URL(n),m=Er(c.pathname,e);c.origin===l.origin&&m!=null?n=m+c.search+c.hash:s=!0}catch{Bn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Xv=["POST","PUT","PATCH","DELETE"];new Set(Xv);var xR=["GET",...Xv];new Set(xR);var Mo=b.createContext(null);Mo.displayName="DataRouter";var Hu=b.createContext(null);Hu.displayName="DataRouterState";var LR=b.createContext(!1),$v=b.createContext({isTransitioning:!1});$v.displayName="ViewTransition";var DR=b.createContext(new Map);DR.displayName="Fetchers";var RR=b.createContext(null);RR.displayName="Await";var ei=b.createContext(null);ei.displayName="Navigation";var Id=b.createContext(null);Id.displayName="Location";var vi=b.createContext({outlet:null,matches:[],isDataRoute:!1});vi.displayName="Route";var sp=b.createContext(null);sp.displayName="RouteError";var Zv="REACT_ROUTER_ERROR",UR="REDIRECT",MR="ROUTE_ERROR_RESPONSE";function BR(t){if(t.startsWith(`${Zv}:${UR}:{`))try{let e=JSON.parse(t.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 _R(t){if(t.startsWith(`${Zv}:${MR}:{`))try{let e=JSON.parse(t.slice(40));if(typeof e=="object"&&e&&typeof e.status=="number"&&typeof e.statusText=="string")return new NR(e.status,e.statusText,e.data)}catch{}}function FR(t,{relative:e}={}){ba(Bo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(ei),{hash:s,pathname:l,search:c}=Cd(t,{relative:e}),m=l;return n!=="/"&&(m=l==="/"?n:Ar([n,l])),r.createHref({pathname:m,search:c,hash:s})}function Bo(){return b.useContext(Id)!=null}function Ja(){return ba(Bo(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Id).location}var ew="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function tw(t){b.useContext(ei).static||b.useLayoutEffect(t)}function Va(){let{isDataRoute:t}=b.useContext(vi);return t?JR():OR()}function OR(){ba(Bo(),"useNavigate() may be used only in the context of a <Router> component.");let t=b.useContext(Mo),{basename:e,navigator:n}=b.useContext(ei),{matches:r}=b.useContext(vi),{pathname:s}=Ja(),l=JSON.stringify(ip(r)),c=b.useRef(!1);return tw(()=>{c.current=!0}),b.useCallback((h,g={})=>{if(Bn(c.current,ew),!c.current)return;if(typeof h=="number"){n.go(h);return}let A=rp(h,JSON.parse(l),s,g.relative==="path");t==null&&e!=="/"&&(A.pathname=A.pathname==="/"?e:Ar([e,A.pathname])),(g.replace?n.replace:n.push)(A,g.state,g)},[e,n,l,s,t])}b.createContext(null);function Vu(){let{matches:t}=b.useContext(vi),e=t[t.length-1];return e?e.params:{}}function Cd(t,{relative:e}={}){let{matches:n}=b.useContext(vi),{pathname:r}=Ja(),s=JSON.stringify(ip(n));return b.useMemo(()=>rp(t,JSON.parse(s),r,e==="path"),[t,s,r,e])}function PR(t,e){return aw(t,e)}function aw(t,e,n,r,s){var U;ba(Bo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=b.useContext(ei),{matches:c}=b.useContext(vi),m=c[c.length-1],h=m?m.params:{},g=m?m.pathname:"/",A=m?m.pathnameBase:"/",p=m&&m.route;{let x=p&&p.path||"";iw(g,!p||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${x}">) 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="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let v=Ja(),w;if(e){let x=typeof e=="string"?Ms(e):e;ba(A==="/"||((U=x.pathname)==null?void 0:U.startsWith(A)),`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 "${A}" but pathname "${x.pathname}" was given in the \`location\` prop.`),w=x}else w=v;let T=w.pathname||"/",S=T;if(A!=="/"){let x=A.replace(/^\//,"").split("/");S="/"+T.replace(/^\//,"").split("/").slice(x.length).join("/")}let k=Kv(t,{pathname:S});Bn(p||k!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Bn(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 "${w.pathname}${w.search}${w.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=QR(k&&k.map(x=>Object.assign({},x,{params:Object.assign({},h,x.params),pathname:Ar([A,l.encodeLocation?l.encodeLocation(x.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?A:Ar([A,l.encodeLocation?l.encodeLocation(x.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:x.pathnameBase])})),c,n,r,s);return e&&L?b.createElement(Id.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},L):L}function jR(){let t=YR(),e=TR(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:r},l={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:l},"ErrorBoundary")," or"," ",b.createElement("code",{style:l},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),n?b.createElement("pre",{style:s},n):null,c)}var HR=b.createElement(jR,null),nw=class extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=_R(t.digest);n&&(t=n)}let e=t!==void 0?b.createElement(vi.Provider,{value:this.props.routeContext},b.createElement(sp.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?b.createElement(VR,{error:t},e):e}};nw.contextType=LR;var Eh=new WeakMap;function VR({children:t,error:e}){let{basename:n}=b.useContext(ei);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=BR(e.digest);if(r){let s=Eh.get(e);if(s)throw s;let l=Jv(r.location,n);if(Yv&&!Eh.get(e))if(l.isExternal||r.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:r.replace}));throw Eh.set(e,c),c}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return t}function zR({routeContext:t,match:e,children:n}){let r=b.useContext(Mo);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),b.createElement(vi.Provider,{value:t},n)}function QR(t,e=[],n=null,r=null,s=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let l=t,c=n==null?void 0:n.errors;if(c!=null){let A=l.findIndex(p=>p.route.id&&(c==null?void 0:c[p.route.id])!==void 0);ba(A>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),l=l.slice(0,Math.min(l.length,A+1))}let m=!1,h=-1;if(n)for(let A=0;A<l.length;A++){let p=l[A];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(h=A),p.route.id){let{loaderData:v,errors:w}=n,T=p.route.loader&&!v.hasOwnProperty(p.route.id)&&(!w||w[p.route.id]===void 0);if(p.route.lazy||T){m=!0,h>=0?l=l.slice(0,h+1):l=[l[0]];break}}}let g=n&&r?(A,p)=>{var v,w;r(A,{location:n.location,params:((w=(v=n.matches)==null?void 0:v[0])==null?void 0:w.params)??{},unstable_pattern:kR(n.matches),errorInfo:p})}:void 0;return l.reduceRight((A,p,v)=>{let w,T=!1,S=null,k=null;n&&(w=c&&p.route.id?c[p.route.id]:void 0,S=p.route.errorElement||HR,m&&(h<0&&v===0?(iw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,k=null):h===v&&(T=!0,k=p.route.hydrateFallbackElement||null)));let L=e.concat(l.slice(0,v+1)),U=()=>{let x;return w?x=S:T?x=k:p.route.Component?x=b.createElement(p.route.Component,null):p.route.element?x=p.route.element:x=A,b.createElement(zR,{match:p,routeContext:{outlet:A,matches:L,isDataRoute:n!=null},children:x})};return n&&(p.route.ErrorBoundary||p.route.errorElement||v===0)?b.createElement(nw,{location:n.location,revalidation:n.revalidation,component:S,error:w,children:U(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:g}):U()},null)}function op(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function KR(t){let e=b.useContext(Mo);return ba(e,op(t)),e}function GR(t){let e=b.useContext(Hu);return ba(e,op(t)),e}function WR(t){let e=b.useContext(vi);return ba(e,op(t)),e}function lp(t){let e=WR(t),n=e.matches[e.matches.length-1];return ba(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function qR(){return lp("useRouteId")}function YR(){var r;let t=b.useContext(sp),e=GR("useRouteError"),n=lp("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function JR(){let{router:t}=KR("useNavigate"),e=lp("useNavigate"),n=b.useRef(!1);return tw(()=>{n.current=!0}),b.useCallback(async(s,l={})=>{Bn(n.current,ew),n.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:e,...l}))},[t,e])}var EE={};function iw(t,e,n){!e&&!EE[t]&&(EE[t]=!0,Bn(!1,n))}b.memo(XR);function XR({routes:t,future:e,state:n,onError:r}){return aw(t,void 0,n,r,e)}function $R({to:t,replace:e,state:n,relative:r}){ba(Bo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=b.useContext(ei);Bn(!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:l}=b.useContext(vi),{pathname:c}=Ja(),m=Va(),h=rp(t,ip(l),c,r==="path"),g=JSON.stringify(h);return b.useEffect(()=>{m(JSON.parse(g),{replace:e,state:n,relative:r})},[m,g,r,e,n]),null}function dp(t){ba(!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 ZR({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:s,static:l=!1,unstable_useTransitions:c}){ba(!Bo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=t.replace(/^\/*/,"/"),h=b.useMemo(()=>({basename:m,navigator:s,static:l,unstable_useTransitions:c,future:{}}),[m,s,l,c]);typeof n=="string"&&(n=Ms(n));let{pathname:g="/",search:A="",hash:p="",state:v=null,key:w="default"}=n,T=b.useMemo(()=>{let S=Er(g,m);return S==null?null:{location:{pathname:S,search:A,hash:p,state:v,key:w},navigationType:r}},[m,g,A,p,v,w,r]);return Bn(T!=null,`<Router basename="${m}"> is not able to match the URL "${g}${A}${p}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:b.createElement(ei.Provider,{value:h},b.createElement(Id.Provider,{children:e,value:T}))}function rw({children:t,location:e}){return PR(xf(t),e)}function xf(t,e=[]){let n=[];return b.Children.forEach(t,(r,s)=>{if(!b.isValidElement(r))return;let l=[...e,s];if(r.type===b.Fragment){n.push.apply(n,xf(r.props.children,l));return}ba(r.type===dp,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ba(!r.props.index||!r.props.children,"An index route cannot have child routes.");let c={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(c.children=xf(r.props.children,l)),n.push(c)}),n}var ou="get",lu="application/x-www-form-urlencoded";function zu(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function e2(t){return zu(t)&&t.tagName.toLowerCase()==="button"}function t2(t){return zu(t)&&t.tagName.toLowerCase()==="form"}function a2(t){return zu(t)&&t.tagName.toLowerCase()==="input"}function n2(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function i2(t,e){return t.button===0&&(!e||e==="_self")&&!n2(t)}function Lf(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function r2(t,e){let n=Lf(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(l=>{n.append(s,l)})}),n}var Hc=null;function s2(){if(Hc===null)try{new FormData(document.createElement("form"),0),Hc=!1}catch{Hc=!0}return Hc}var o2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bh(t){return t!=null&&!o2.has(t)?(Bn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${lu}"`),null):t}function l2(t,e){let n,r,s,l,c;if(t2(t)){let m=t.getAttribute("action");r=m?Er(m,e):null,n=t.getAttribute("method")||ou,s=bh(t.getAttribute("enctype"))||lu,l=new FormData(t)}else if(e2(t)||a2(t)&&(t.type==="submit"||t.type==="image")){let m=t.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=t.getAttribute("formaction")||m.getAttribute("action");if(r=h?Er(h,e):null,n=t.getAttribute("formmethod")||m.getAttribute("method")||ou,s=bh(t.getAttribute("formenctype"))||bh(m.getAttribute("enctype"))||lu,l=new FormData(m,t),!s2()){let{name:g,type:A,value:p}=t;if(A==="image"){let v=g?`${g}.`:"";l.append(`${v}x`,"0"),l.append(`${v}y`,"0")}else g&&l.append(g,p)}}else{if(zu(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ou,r=null,s=lu,c=t}return l&&s==="text/plain"&&(c=l,l=void 0),{action:r,method:n.toLowerCase(),encType:s,formData:l,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function cp(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function d2(t,e,n,r){let s=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${r}`:s.pathname=`${s.pathname}.${r}`:s.pathname==="/"?s.pathname=`_root.${r}`:e&&Er(s.pathname,e)==="/"?s.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function c2(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function u2(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function m2(t,e,n){let r=await Promise.all(t.map(async s=>{let l=e.routes[s.route.id];if(l){let c=await c2(l,n);return c.links?c.links():[]}return[]}));return p2(r.flat(1).filter(u2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function bE(t,e,n,r,s,l){let c=(h,g)=>n[g]?h.route.id!==n[g].route.id:!0,m=(h,g)=>{var A;return n[g].pathname!==h.pathname||((A=n[g].route.path)==null?void 0:A.endsWith("*"))&&n[g].params["*"]!==h.params["*"]};return l==="assets"?e.filter((h,g)=>c(h,g)||m(h,g)):l==="data"?e.filter((h,g)=>{var p;let A=r.routes[h.route.id];if(!A||!A.hasLoader)return!1;if(c(h,g)||m(h,g))return!0;if(h.route.shouldRevalidate){let v=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((p=n[0])==null?void 0:p.params)||{},nextUrl:new URL(t,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function g2(t,e,{includeHydrateFallback:n}={}){return h2(t.map(r=>{let s=e.routes[r.route.id];if(!s)return[];let l=[s.module];return s.clientActionModule&&(l=l.concat(s.clientActionModule)),s.clientLoaderModule&&(l=l.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(l=l.concat(s.hydrateFallbackModule)),s.imports&&(l=l.concat(s.imports)),l}).flat(1))}function h2(t){return[...new Set(t)]}function f2(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function p2(t,e){let n=new Set;return new Set(e),t.reduce((r,s)=>{let l=JSON.stringify(f2(s));return n.has(l)||(n.add(l),r.push({key:l,link:s})),r},[])}function sw(){let t=b.useContext(Mo);return cp(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function A2(){let t=b.useContext(Hu);return cp(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var up=b.createContext(void 0);up.displayName="FrameworkContext";function ow(){let t=b.useContext(up);return cp(t,"You must render this element inside a <HydratedRouter> element"),t}function y2(t,e){let n=b.useContext(up),[r,s]=b.useState(!1),[l,c]=b.useState(!1),{onFocus:m,onBlur:h,onMouseEnter:g,onMouseLeave:A,onTouchStart:p}=e,v=b.useRef(null);b.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let S=L=>{L.forEach(U=>{c(U.isIntersecting)})},k=new IntersectionObserver(S,{threshold:.5});return v.current&&k.observe(v.current),()=>{k.disconnect()}}},[t]),b.useEffect(()=>{if(r){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[r]);let w=()=>{s(!0)},T=()=>{s(!1),c(!1)};return n?t!=="intent"?[l,v,{}]:[l,v,{onFocus:Fl(m,w),onBlur:Fl(h,T),onMouseEnter:Fl(g,w),onMouseLeave:Fl(A,T),onTouchStart:Fl(p,w)}]:[!1,v,{}]}function Fl(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function E2({page:t,...e}){let{router:n}=sw(),r=b.useMemo(()=>Kv(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?b.createElement(v2,{page:t,matches:r,...e}):null}function b2(t){let{manifest:e,routeModules:n}=ow(),[r,s]=b.useState([]);return b.useEffect(()=>{let l=!1;return m2(t,e,n).then(c=>{l||s(c)}),()=>{l=!0}},[t,e,n]),r}function v2({page:t,matches:e,...n}){let r=Ja(),{future:s,manifest:l,routeModules:c}=ow(),{basename:m}=sw(),{loaderData:h,matches:g}=A2(),A=b.useMemo(()=>bE(t,e,g,l,r,"data"),[t,e,g,l,r]),p=b.useMemo(()=>bE(t,e,g,l,r,"assets"),[t,e,g,l,r]),v=b.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let S=new Set,k=!1;if(e.forEach(U=>{var F;let x=l.routes[U.route.id];!x||!x.hasLoader||(!A.some(B=>B.route.id===U.route.id)&&U.route.id in h&&((F=c[U.route.id])!=null&&F.shouldRevalidate)||x.hasClientLoader?k=!0:S.add(U.route.id))}),S.size===0)return[];let L=d2(t,m,s.unstable_trailingSlashAwareDataRequests,"data");return k&&S.size>0&&L.searchParams.set("_routes",e.filter(U=>S.has(U.route.id)).map(U=>U.route.id).join(",")),[L.pathname+L.search]},[m,s.unstable_trailingSlashAwareDataRequests,h,r,l,A,e,t,c]),w=b.useMemo(()=>g2(p,l),[p,l]),T=b2(p);return b.createElement(b.Fragment,null,v.map(S=>b.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...n})),w.map(S=>b.createElement("link",{key:S,rel:"modulepreload",href:S,...n})),T.map(({key:S,link:k})=>b.createElement("link",{key:S,nonce:n.nonce,...k})))}function w2(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var I2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{I2&&(window.__reactRouterVersion="7.12.0")}catch{}function C2({basename:t,children:e,unstable_useTransitions:n,window:r}){let s=b.useRef();s.current==null&&(s.current=nR({window:r,v5Compat:!0}));let l=s.current,[c,m]=b.useState({action:l.action,location:l.location}),h=b.useCallback(g=>{n===!1?m(g):b.startTransition(()=>m(g))},[n]);return b.useLayoutEffect(()=>l.listen(h),[l,h]),b.createElement(ZR,{basename:t,children:e,location:c.location,navigationType:c.action,navigator:l,unstable_useTransitions:n})}var lw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qu=b.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:s,reloadDocument:l,replace:c,state:m,target:h,to:g,preventScrollReset:A,viewTransition:p,unstable_defaultShouldRevalidate:v,...w},T){let{basename:S,unstable_useTransitions:k}=b.useContext(ei),L=typeof g=="string"&&lw.test(g),U=Jv(g,S);g=U.to;let x=FR(g,{relative:s}),[F,B,V]=y2(r,w),O=k2(g,{replace:c,state:m,target:h,preventScrollReset:A,relative:s,viewTransition:p,unstable_defaultShouldRevalidate:v,unstable_useTransitions:k});function _(Q){e&&e(Q),Q.defaultPrevented||O(Q)}let z=b.createElement("a",{...w,...V,href:U.absoluteURL||x,onClick:U.isExternal||l?e:_,ref:w2(T,B),target:h,"data-discover":!L&&n==="render"?"true":void 0});return F&&!L?b.createElement(b.Fragment,null,z,b.createElement(E2,{page:x})):z});Qu.displayName="Link";var S2=b.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:s=!1,style:l,to:c,viewTransition:m,children:h,...g},A){let p=Cd(c,{relative:g.relative}),v=Ja(),w=b.useContext(Hu),{navigator:T,basename:S}=b.useContext(ei),k=w!=null&&U2(p)&&m===!0,L=T.encodeLocation?T.encodeLocation(p).pathname:p.pathname,U=v.pathname,x=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;n||(U=U.toLowerCase(),x=x?x.toLowerCase():null,L=L.toLowerCase()),x&&S&&(x=Er(x,S)||x);const F=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let B=U===L||!s&&U.startsWith(L)&&U.charAt(F)==="/",V=x!=null&&(x===L||!s&&x.startsWith(L)&&x.charAt(L.length)==="/"),O={isActive:B,isPending:V,isTransitioning:k},_=B?e:void 0,z;typeof r=="function"?z=r(O):z=[r,B?"active":null,V?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let Q=typeof l=="function"?l(O):l;return b.createElement(Qu,{...g,"aria-current":_,className:z,ref:A,style:Q,to:c,viewTransition:m},typeof h=="function"?h(O):h)});S2.displayName="NavLink";var N2=b.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:s,state:l,method:c=ou,action:m,onSubmit:h,relative:g,preventScrollReset:A,viewTransition:p,unstable_defaultShouldRevalidate:v,...w},T)=>{let{unstable_useTransitions:S}=b.useContext(ei),k=D2(),L=R2(m,{relative:g}),U=c.toLowerCase()==="get"?"get":"post",x=typeof m=="string"&&lw.test(m),F=B=>{if(h&&h(B),B.defaultPrevented)return;B.preventDefault();let V=B.nativeEvent.submitter,O=(V==null?void 0:V.getAttribute("formmethod"))||c,_=()=>k(V||B.currentTarget,{fetcherKey:e,method:O,navigate:n,replace:s,state:l,relative:g,preventScrollReset:A,viewTransition:p,unstable_defaultShouldRevalidate:v});S&&n!==!1?b.startTransition(()=>_()):_()};return b.createElement("form",{ref:T,method:U,action:L,onSubmit:r?h:F,...w,"data-discover":!x&&t==="render"?"true":void 0})});N2.displayName="Form";function T2(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function dw(t){let e=b.useContext(Mo);return ba(e,T2(t)),e}function k2(t,{target:e,replace:n,state:r,preventScrollReset:s,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:m,unstable_useTransitions:h}={}){let g=Va(),A=Ja(),p=Cd(t,{relative:l});return b.useCallback(v=>{if(i2(v,e)){v.preventDefault();let w=n!==void 0?n:hd(A)===hd(p),T=()=>g(t,{replace:w,state:r,preventScrollReset:s,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:m});h?b.startTransition(()=>T()):T()}},[A,g,p,n,r,e,t,s,l,c,m,h])}function Ku(t){Bn(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=b.useRef(Lf(t)),n=b.useRef(!1),r=Ja(),s=b.useMemo(()=>r2(r.search,n.current?null:e.current),[r.search]),l=Va(),c=b.useCallback((m,h)=>{const g=Lf(typeof m=="function"?m(new URLSearchParams(s)):m);n.current=!0,l("?"+g,h)},[l,s]);return[s,c]}var x2=0,L2=()=>`__${String(++x2)}__`;function D2(){let{router:t}=dw("useSubmit"),{basename:e}=b.useContext(ei),n=qR(),r=t.fetch,s=t.navigate;return b.useCallback(async(l,c={})=>{let{action:m,method:h,encType:g,formData:A,body:p}=l2(l,e);if(c.navigate===!1){let v=c.fetcherKey||L2();await r(v,n,c.action||m,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:A,body:p,formMethod:c.method||h,formEncType:c.encType||g,flushSync:c.flushSync})}else await s(c.action||m,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:A,body:p,formMethod:c.method||h,formEncType:c.encType||g,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,s,e,n])}function R2(t,{relative:e}={}){let{basename:n}=b.useContext(ei),r=b.useContext(vi);ba(r,"useFormAction must be used inside a RouteContext");let[s]=r.matches.slice(-1),l={...Cd(t||".",{relative:e})},c=Ja();if(t==null){l.search=c.search;let m=new URLSearchParams(l.search),h=m.getAll("index");if(h.some(A=>A==="")){m.delete("index"),h.filter(p=>p).forEach(p=>m.append("index",p));let A=m.toString();l.search=A?`?${A}`:""}}return(!t||t===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:Ar([n,l.pathname])),hd(l)}function U2(t,{relative:e}={}){let n=b.useContext($v);ba(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=dw("useViewTransitionState"),s=Cd(t,{relative:e});if(!n.isTransitioning)return!1;let l=Er(n.currentLocation.pathname,r)||n.currentLocation.pathname,c=Er(n.nextLocation.pathname,r)||n.nextLocation.pathname;return vu(s.pathname,c)!=null||vu(s.pathname,l)!=null}var Co=Hv(),Vc={exports:{}},vE;function M2(){if(vE)return Vc.exports;vE=1;const t=n=>typeof crypto<"u"&&typeof crypto.getRandomValues=="function"?()=>{const r=crypto.getRandomValues(new Uint8Array(1))[0];return(r>=n?r%n:r).toString(n)}:()=>Math.floor(Math.random()*n).toString(n),e=(n=7,r=!1)=>Array.from({length:n},t(r?16:36)).join("");return Vc.exports=e,Vc.exports.default=e,Vc.exports}var B2=M2();const wu=ss(B2);var _2=()=>`uid::${wu(7)}`,F2=(t,e=["endpointName","fingerprint"])=>typeof t=="object"&&t!==null&&e.every(n=>n in t),O2=t=>{if(!F2(t))throw new TypeError("Invalid connection args");return JSON.stringify(t)},P2=()=>{let t=[];return{add:(...e)=>{t=[...t,...e]},remove:e=>{t=typeof e=="string"?t.filter(n=>n.message.transactionId!==e):t.filter(n=>!e.includes(n))},entries:()=>t}},vh=class{static toBackground(t,e){return t.postMessage(e)}static toExtensionContext(t,e){return t.postMessage(e)}},du={exports:{}},j2=du.exports,wE;function H2(){return wE||(wE=1,function(t,e){(function(n,r){r(t)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:j2,function(n){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 r="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)",l=c=>{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 h extends WeakMap{constructor(z,Q=void 0){super(Q),this.createItem=z}get(z){return this.has(z)||this.set(z,this.createItem(z)),super.get(z)}}const g=_=>_&&typeof _=="object"&&typeof _.then=="function",A=(_,z)=>(...Q)=>{c.runtime.lastError?_.reject(new Error(c.runtime.lastError.message)):z.singleCallbackArg||Q.length<=1&&z.singleCallbackArg!==!1?_.resolve(Q[0]):_.resolve(Q)},p=_=>_==1?"argument":"arguments",v=(_,z)=>function(K,...te){if(te.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${p(z.minArgs)} for ${_}(), got ${te.length}`);if(te.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${p(z.maxArgs)} for ${_}(), got ${te.length}`);return new Promise((ee,Y)=>{if(z.fallbackToNoCallback)try{K[_](...te,A({resolve:ee,reject:Y},z))}catch(le){console.warn(`${_} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,le),K[_](...te),z.fallbackToNoCallback=!1,z.noCallback=!0,ee()}else z.noCallback?(K[_](...te),ee()):K[_](...te,A({resolve:ee,reject:Y},z))})},w=(_,z,Q)=>new Proxy(z,{apply(K,te,ee){return Q.call(te,_,...ee)}});let T=Function.call.bind(Object.prototype.hasOwnProperty);const S=(_,z={},Q={})=>{let K=Object.create(null),te={has(Y,le){return le in _||le in K},get(Y,le,J){if(le in K)return K[le];if(!(le in _))return;let ie=_[le];if(typeof ie=="function")if(typeof z[le]=="function")ie=w(_,_[le],z[le]);else if(T(Q,le)){let be=v(le,Q[le]);ie=w(_,_[le],be)}else ie=ie.bind(_);else if(typeof ie=="object"&&ie!==null&&(T(z,le)||T(Q,le)))ie=S(ie,z[le],Q[le]);else if(T(Q,"*"))ie=S(ie,z[le],Q["*"]);else return Object.defineProperty(K,le,{configurable:!0,enumerable:!0,get(){return _[le]},set(be){_[le]=be}}),ie;return K[le]=ie,ie},set(Y,le,J,ie){return le in K?K[le]=J:_[le]=J,!0},defineProperty(Y,le,J){return Reflect.defineProperty(K,le,J)},deleteProperty(Y,le){return Reflect.deleteProperty(K,le)}},ee=Object.create(_);return new Proxy(ee,te)},k=_=>({addListener(z,Q,...K){z.addListener(_.get(Q),...K)},hasListener(z,Q){return z.hasListener(_.get(Q))},removeListener(z,Q){z.removeListener(_.get(Q))}}),L=new h(_=>typeof _!="function"?_:function(Q){const K=S(Q,{},{getContent:{minArgs:0,maxArgs:0}});_(K)});let U=!1;const x=new h(_=>typeof _!="function"?_:function(Q,K,te){let ee=!1,Y,le=new Promise(se=>{Y=function(j){U||(console.warn(s,new Error().stack),U=!0),ee=!0,se(j)}}),J;try{J=_(Q,K,Y)}catch(se){J=Promise.reject(se)}const ie=J!==!0&&g(J);if(J!==!0&&!ie&&!ee)return!1;const be=se=>{se.then(j=>{te(j)},j=>{let W;j&&(j instanceof Error||typeof j.message=="string")?W=j.message:W="An unexpected error occurred",te({__mozWebExtensionPolyfillReject__:!0,message:W})}).catch(j=>{console.error("Failed to send onMessage rejected reply",j)})};return be(ie?J:le),!0}),F=({reject:_,resolve:z},Q)=>{c.runtime.lastError?c.runtime.lastError.message===r?z():_(new Error(c.runtime.lastError.message)):Q&&Q.__mozWebExtensionPolyfillReject__?_(new Error(Q.message)):z(Q)},B=(_,z,Q,...K)=>{if(K.length<z.minArgs)throw new Error(`Expected at least ${z.minArgs} ${p(z.minArgs)} for ${_}(), got ${K.length}`);if(K.length>z.maxArgs)throw new Error(`Expected at most ${z.maxArgs} ${p(z.maxArgs)} for ${_}(), got ${K.length}`);return new Promise((te,ee)=>{const Y=F.bind(null,{resolve:te,reject:ee});K.push(Y),Q.sendMessage(...K)})},V={devtools:{network:{onRequestFinished:k(L)}},runtime:{onMessage:k(x),onMessageExternal:k(x),sendMessage:B.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:B.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},O={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return m.privacy={network:{"*":O},services:{"*":O},websites:{"*":O}},S(c,V,m)};n.exports=l(chrome)}else n.exports=globalThis.browser})}(du)),du.exports}var V2=H2();const z2=ss(V2);var Q2=(t="")=>{const e=_2();let n,r=[];const s=P2(),l=new Set,c=new Set,m=(g,A)=>{switch(g.status){case"undeliverable":r.some(p=>p.message.messageID===g.message.messageID)||(r=[...r,{message:g.message,resolvedDestination:g.resolvedDestination}]);return;case"deliverable":r=r.reduce((p,v)=>v.resolvedDestination===g.deliverableTo?(vh.toBackground(A,{type:"deliver",message:v.message}),p):[...p,v],[]);return;case"delivered":g.receipt.message.messageType==="message"&&s.add(g.receipt);return;case"incoming":g.message.messageType==="reply"&&s.remove(g.message.messageID),l.forEach(p=>p(g.message,A));return;case"terminated":{const p=s.entries().filter(v=>g.fingerprint===v.to);s.remove(p),p.forEach(({message:v})=>c.forEach(w=>w(v)))}}},h=()=>{n=z2.runtime.connect({name:O2({endpointName:t,fingerprint:e})}),n.onMessage.addListener(m),n.onDisconnect.addListener(h),vh.toBackground(n,{type:"sync",pendingResponses:s.entries(),pendingDeliveries:[...new Set(r.map(({resolvedDestination:g})=>g))]})};return h(),{onFailure(g){c.add(g)},onMessage(g){l.add(g)},postMessage(g){vh.toBackground(n,{type:"deliver",message:g})}}},K2=Object.defineProperty,G2=Object.defineProperties,W2=Object.getOwnPropertyDescriptors,IE=Object.getOwnPropertySymbols,q2=Object.prototype.hasOwnProperty,Y2=Object.prototype.propertyIsEnumerable,CE=(t,e,n)=>e in t?K2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cw=(t,e)=>{for(var n in e||(e={}))q2.call(e,n)&&CE(t,n,e[n]);if(IE)for(var n of IE(e))Y2.call(e,n)&&CE(t,n,e[n]);return t},uw=(t,e)=>G2(t,W2(e)),J2=/^((?:background$)|devtools|popup|options|content-script|window)(?:@(\d+)(?:\.(\d+))?)?$/,mw=t=>{const[,e,n,r]=t.match(J2)||[];return{context:e,tabId:+n,frameId:r?+r:void 0}};const X2=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],Df=Symbol(".toJSON was called"),$2=t=>{t[Df]=!0;const e=t.toJSON();return delete t[Df],e},gw=({from:t,seen:e,to_:n,forceEnumerable:r,maxDepth:s,depth:l})=>{const c=n||(Array.isArray(t)?[]:{});if(e.push(t),l>=s)return c;if(typeof t.toJSON=="function"&&t[Df]!==!0)return $2(t);for(const[m,h]of Object.entries(t)){if(typeof Buffer=="function"&&Buffer.isBuffer(h)){c[m]="[object Buffer]";continue}if(h!==null&&typeof h=="object"&&typeof h.pipe=="function"){c[m]="[object Stream]";continue}if(typeof h!="function"){if(!h||typeof h!="object"){c[m]=h;continue}if(!e.includes(t[m])){l++,c[m]=gw({from:t[m],seen:[...e],forceEnumerable:r,maxDepth:s,depth:l});continue}c[m]="[Circular]"}}for(const{property:m,enumerable:h}of X2)typeof t[m]=="string"&&Object.defineProperty(c,m,{value:t[m],enumerable:!0,configurable:!0,writable:!0});return c};function Z2(t,e={}){const{maxDepth:n=Number.POSITIVE_INFINITY}=e;return typeof t=="object"&&t!==null?gw({from:t,seen:[],forceEnumerable:!0,maxDepth:n,depth:0}):typeof t=="function"?`[Function: ${t.name||"anonymous"}]`:t}let hw=()=>({events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}});var eU=(t,e,n)=>{const r=wu(),s=new Map,l=new Map,c=m=>{if(m.destination.context===t&&!m.destination.frameId&&!m.destination.tabId){const{transactionId:h,messageID:g,messageType:A}=m,p=()=>{const w=s.get(h);if(w){const{err:T,data:S}=m;if(T){const k=T,L=self[k.name],U=new(typeof L=="function"?L:Error)(k.message);for(const x in k)U[x]=k[x];w.reject(U)}else w.resolve(S);s.delete(h)}},v=async()=>{let w,T,S=!1;try{const k=l.get(g);if(typeof k=="function")w=await k({sender:m.origin,id:g,data:m.data,timestamp:m.timestamp});else throw S=!0,new Error(`[webext-bridge] No handler registered in '${t}' to accept messages with id '${g}'`)}catch(k){T=k}finally{if(T&&(m.err=Z2(T)),c(uw(cw({},m),{messageType:"reply",data:w,origin:{context:t,tabId:null},destination:m.origin,hops:[]})),T&&!S)throw w}};switch(A){case"reply":return p();case"message":return v()}}return m.hops.push(`${t}::${r}`),e(m)};return{handleMessage:c,endTransaction:m=>{const h=s.get(m);h==null||h.reject("Transaction was ended before it could complete"),s.delete(m)},sendMessage:(m,h,g="background")=>{const A=typeof g=="string"?mw(g):g,p="Bridge#sendMessage ->";if(!A.context)throw new TypeError(`${p} Destination must be any one of known destinations`);return new Promise((v,w)=>{const T={messageID:m,data:h,destination:A,messageType:"message",transactionId:wu(),origin:{context:t,tabId:null},hops:[],timestamp:Date.now()};s.set(T.transactionId,{resolve:v,reject:w});try{c(T)}catch(S){s.delete(T.transactionId),w(S)}})},onMessage:(m,h)=>(l.set(m,h),()=>l.delete(m))}},Io=class{constructor(t,e){this.endpointRuntime=t,this.streamInfo=e,this.emitter=hw(),this.isClosed=!1,this.handleStreamClose=()=>{this.isClosed||(this.isClosed=!0,this.emitter.emit("closed",!0),this.emitter.events={})},Io.initDone||(t.onMessage("__crx_bridge_stream_transfer__",n=>{const{streamId:r,streamTransfer:s,action:l}=n.data,c=Io.openStreams.get(r);c&&!c.isClosed&&(l==="transfer"&&c.emitter.emit("message",s),l==="close"&&(Io.openStreams.delete(r),c.handleStreamClose()))}),Io.initDone=!0),Io.openStreams.set(this.streamInfo.streamId,this)}get info(){return this.streamInfo}send(t){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:t,action:"transfer"},this.streamInfo.endpoint)}close(t){t&&this.send(t),this.handleStreamClose(),this.endpointRuntime.sendMessage("__crx_bridge_stream_transfer__",{streamId:this.streamInfo.streamId,streamTransfer:null,action:"close"},this.streamInfo.endpoint)}onMessage(t){return this.getDisposable("message",t)}onClose(t){return this.getDisposable("closed",t)}getDisposable(t,e){const n=this.emitter.on(t,e);return Object.assign(n,{dispose:n,close:n})}},Iu=Io;Iu.initDone=!1;Iu.openStreams=new Map;var tU=t=>{const e=new Map,n=new Map,r=hw();t.onMessage("__crx_bridge_stream_open__",c=>new Promise(m=>{const{sender:h,data:g}=c,{channel:A}=g;let p=!1,v=()=>{};const w=()=>{const T=n.get(A);typeof T=="function"?(T(new Iu(t,uw(cw({},g),{endpoint:h}))),p&&v(),m(!0)):p||(p=!0,v=r.on("did-change-stream-callbacks",w))};w()}));async function s(c,m){if(e.has(c))throw new Error("webext-bridge: A Stream is already open at this channel");const h=typeof m=="string"?mw(m):m,g={streamId:wu(),channel:c,endpoint:h},A=new Iu(t,g);return A.onClose(()=>e.delete(c)),await t.sendMessage("__crx_bridge_stream_open__",g,h),e.set(c,A),A}function l(c,m){if(n.has(c))throw new Error("webext-bridge: This channel has already been claimed. Stream allows only one-on-one communication");n.set(c,m),r.emit("did-change-stream-callbacks")}return{openStream:s,onOpenStreamChannel:l}},fw=Q2("popup"),mp=eU("popup",t=>fw.postMessage(t));fw.onMessage(mp.handleMessage);var{sendMessage:St,onMessage:wh}=mp;tU(mp);const gp=b.forwardRef(({isVisible:t,colorClass:e="bg-orange-500"},n)=>{const r=b.useRef(null),s=c=>{setTimeout(()=>{r.current&&(r.current.style.transition="none",r.current.style.width="100%",r.current.offsetHeight,requestAnimationFrame(()=>{r.current&&(r.current.style.transition=`width ${c}s linear`,r.current.style.width="0%")}))},10)},l=()=>{r.current&&(r.current.style.transition="none",r.current.style.width="0%")};return b.useImperativeHandle(n,()=>({startAnimation:s,stopAnimation:l})),b.useEffect(()=>{t||l()},[t]),t?d.jsx("div",{className:"fixed top-0 left-0 right-0 z-[60] h-1 bg-gray-200 dark:bg-gray-700",children:d.jsx("div",{ref:r,className:`h-full ${e}`,style:{width:"100%",transition:"none"}})}):null});gp.displayName="CountdownBar";const aU=()=>{const[t,e]=b.useState(!1),n=b.useRef(null),r=b.useRef(0),s=(c,m)=>{var g;const h=c/m;(g=n.current)==null||g.startAnimation(c*h)},l=()=>{var c;(c=n.current)==null||c.stopAnimation()};return b.useEffect(()=>{St("GET_CLIPBOARD_COUNTDOWN_STATE",{},"background").then(g=>{const A=g;A&&A.remaining>0&&(r.current=A.id,e(!0),setTimeout(()=>{s(A.remaining,A.total)},0))}).catch(()=>{});const c=wh("CLIPBOARD_COUNTDOWN",({data:g})=>{const{remaining:A,total:p,id:v}=g;e(A>0),v!==r.current&&A>0&&(r.current=v,setTimeout(()=>{s(A,p)},0))}),m=wh("CLIPBOARD_CLEARED",()=>{e(!1),r.current=0,l()}),h=wh("CLIPBOARD_COUNTDOWN_CANCELLED",()=>{e(!1),r.current=0,l()});return()=>{c(),m(),h()}},[]),d.jsx(gp,{ref:n,isVisible:t,colorClass:"bg-orange-500"})},nU=()=>{const{t}=tt(),e=Va(),n=Ja(),[r,s]=b.useState("items");b.useEffect(()=>{const A=n.pathname.substring(1),v=["items","emails","settings"].find(w=>A===w||A.startsWith(`${w}/`));v&&s(v)},[n]);const l=A=>{s(A),A==="items"?e(`/${A}`,{state:{resetFilters:!0}}):e(`/${A}`)};return["/","/login","/auth-settings","/unlock","/unlock-success","/upgrade"].includes(n.pathname)||new URLSearchParams(window.location.search).get("mode")==="inline_unlock"?null:d.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:d.jsxs("div",{className:"flex justify-around items-center h-14",children:[d.jsxs("button",{onClick:()=>l("items"),id:"nav-vault",className:`flex flex-col items-center justify-center w-1/3 h-full ${r==="items"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[d.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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"})}),d.jsx("span",{className:"text-sm mt-1",children:t("menu.vault")})]}),d.jsxs("button",{onClick:()=>l("emails"),id:"nav-emails",className:`flex flex-col items-center justify-center w-1/3 h-full ${r==="emails"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[d.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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"})}),d.jsx("span",{className:"text-sm mt-1",children:t("menu.emails")})]}),d.jsxs("button",{onClick:()=>l("settings"),id:"nav-settings",className:`flex flex-col items-center justify-center w-1/3 h-full ${r==="settings"?"text-primary-600 dark:text-primary-500":"text-gray-500 dark:text-gray-400"}`,children:[d.jsxs("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[d.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"}),d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),d.jsx("span",{className:"text-sm mt-1",children:t("common.settings")})]})]})})},iU="#EEC170",rU=["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","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","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","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","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"],pw=({className:t="",width:e=200,height:n=50,showText:r=!0,color:s="currentColor"})=>d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",version:"1.1",viewBox:"0 0 2000 500",width:e,height:n,className:t,children:[rU.map((l,c)=>d.jsx("path",{d:l,fill:iU},c)),r&&d.jsx("text",{x:"550",y:"355",fontFamily:"Arial, Helvetica, sans-serif",fontWeight:"700",fontSize:"290",letterSpacing:"-7",fill:s,children:"AliasVault"})]});var SE=Object.prototype.hasOwnProperty;function Rf(t,e){var n,r;if(t===e)return!0;if(t&&e&&(n=t.constructor)===e.constructor){if(n===Date)return t.getTime()===e.getTime();if(n===RegExp)return t.toString()===e.toString();if(n===Array){if((r=t.length)===e.length)for(;r--&&Rf(t[r],e[r]););return r===-1}if(!n||typeof t=="object"){r=0;for(n in t)if(SE.call(t,n)&&++r&&!SE.call(e,n)||!(n in e)||!Rf(t[n],e[n]))return!1;return Object.keys(e).length===r}}return t!==t&&e!==e}const sU=new Error("request for lock canceled");var oU=function(t,e,n,r){function s(l){return l instanceof n?l:new n(function(c){c(l)})}return new(n||(n=Promise))(function(l,c){function m(A){try{g(r.next(A))}catch(p){c(p)}}function h(A){try{g(r.throw(A))}catch(p){c(p)}}function g(A){A.done?l(A.value):s(A.value).then(m,h)}g((r=r.apply(t,e||[])).next())})};class lU{constructor(e,n=sU){this._value=e,this._cancelError=n,this._queue=[],this._weightedWaiters=[]}acquire(e=1,n=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((r,s)=>{const l={resolve:r,reject:s,weight:e,priority:n},c=Aw(this._queue,m=>n<=m.priority);c===-1&&e<=this._value?this._dispatchItem(l):this._queue.splice(c+1,0,l)})}runExclusive(e){return oU(this,arguments,void 0,function*(n,r=1,s=0){const[l,c]=yield this.acquire(r,s);try{return yield n(l)}finally{c()}})}waitForUnlock(e=1,n=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,n)?Promise.resolve():new Promise(r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),dU(this._weightedWaiters[e-1],{resolve:r,priority:n})})}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 n=this._value;this._value-=e.weight,e.resolve([n,this._newReleaser(e.weight)])}_newReleaser(e){let n=!1;return()=>{n||(n=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const n=this._weightedWaiters[e-1];n&&(n.forEach(r=>r.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let n=this._value;n>0;n--){const r=this._weightedWaiters[n-1];if(!r)continue;const s=r.findIndex(l=>l.priority<=e);(s===-1?r:r.splice(0,s)).forEach(l=>l.resolve())}}}_couldLockImmediately(e,n){return(this._queue.length===0||this._queue[0].priority<n)&&e<=this._value}}function dU(t,e){const n=Aw(t,r=>e.priority<=r.priority);t.splice(n+1,0,e)}function Aw(t,e){for(let n=t.length-1;n>=0;n--)if(e(t[n]))return n;return-1}var cU=function(t,e,n,r){function s(l){return l instanceof n?l:new n(function(c){c(l)})}return new(n||(n=Promise))(function(l,c){function m(A){try{g(r.next(A))}catch(p){c(p)}}function h(A){try{g(r.throw(A))}catch(p){c(p)}}function g(A){A.done?l(A.value):s(A.value).then(m,h)}g((r=r.apply(t,e||[])).next())})};class uU{constructor(e){this._semaphore=new lU(1,e)}acquire(){return cU(this,arguments,void 0,function*(e=0){const[,n]=yield this._semaphore.acquire(1,e);return n})}runExclusive(e,n=0){return this._semaphore.runExclusive(()=>e(),1,n)}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 Fv,Ov;const cu=((Ov=(Fv=globalThis.browser)==null?void 0:Fv.runtime)==null?void 0:Ov.id)==null?globalThis.chrome:globalThis.browser,xe=mU();function mU(){const t={local:zc("local"),session:zc("session"),sync:zc("sync"),managed:zc("managed")},e=S=>{const k=t[S];if(k==null){const L=Object.keys(t).join(", ");throw Error(`Invalid area "${S}". Options: ${L}`)}return k},n=S=>{const k=S.indexOf(":"),L=S.substring(0,k),U=S.substring(k+1);if(U==null)throw Error(`Storage key should be in the form of "area:key", but received "${S}"`);return{driverArea:L,driverKey:U,driver:e(L)}},r=S=>S+"$",s=(S,k)=>{const L={...S};return Object.entries(k).forEach(([U,x])=>{x==null?delete L[U]:L[U]=x}),L},l=(S,k)=>S??k??null,c=S=>typeof S=="object"&&!Array.isArray(S)?S:{},m=async(S,k,L)=>{const U=await S.getItem(k);return l(U,(L==null?void 0:L.fallback)??(L==null?void 0:L.defaultValue))},h=async(S,k)=>{const L=r(k),U=await S.getItem(L);return c(U)},g=async(S,k,L)=>{await S.setItem(k,L??null)},A=async(S,k,L)=>{const U=r(k),x=c(await S.getItem(U));await S.setItem(U,s(x,L))},p=async(S,k,L)=>{if(await S.removeItem(k),L!=null&&L.removeMeta){const U=r(k);await S.removeItem(U)}},v=async(S,k,L)=>{const U=r(k);if(L==null)await S.removeItem(U);else{const x=c(await S.getItem(U));[L].flat().forEach(F=>delete x[F]),await S.setItem(U,x)}},w=(S,k,L)=>S.watch(k,L);return{getItem:async(S,k)=>{const{driver:L,driverKey:U}=n(S);return await m(L,U,k)},getItems:async S=>{const k=new Map,L=new Map,U=[];S.forEach(F=>{let B,V;typeof F=="string"?B=F:"getValue"in F?(B=F.key,V={fallback:F.fallback}):(B=F.key,V=F.options),U.push(B);const{driverArea:O,driverKey:_}=n(B),z=k.get(O)??[];k.set(O,z.concat(_)),L.set(B,V)});const x=new Map;return await Promise.all(Array.from(k.entries()).map(async([F,B])=>{(await t[F].getItems(B)).forEach(O=>{const _=`${F}:${O.key}`,z=L.get(_),Q=l(O.value,(z==null?void 0:z.fallback)??(z==null?void 0:z.defaultValue));x.set(_,Q)})})),U.map(F=>({key:F,value:x.get(F)}))},getMeta:async S=>{const{driver:k,driverKey:L}=n(S);return await h(k,L)},getMetas:async S=>{const k=S.map(x=>{const F=typeof x=="string"?x:x.key,{driverArea:B,driverKey:V}=n(F);return{key:F,driverArea:B,driverKey:V,driverMetaKey:r(V)}}),L=k.reduce((x,F)=>{var B;return x[B=F.driverArea]??(x[B]=[]),x[F.driverArea].push(F),x},{}),U={};return await Promise.all(Object.entries(L).map(async([x,F])=>{const B=await cu.storage[x].get(F.map(V=>V.driverMetaKey));F.forEach(V=>{U[V.key]=B[V.driverMetaKey]??{}})})),k.map(x=>({key:x.key,meta:U[x.key]}))},setItem:async(S,k)=>{const{driver:L,driverKey:U}=n(S);await g(L,U,k)},setItems:async S=>{const k={};S.forEach(L=>{const{driverArea:U,driverKey:x}=n("key"in L?L.key:L.item.key);k[U]??(k[U]=[]),k[U].push({key:x,value:L.value})}),await Promise.all(Object.entries(k).map(async([L,U])=>{await e(L).setItems(U)}))},setMeta:async(S,k)=>{const{driver:L,driverKey:U}=n(S);await A(L,U,k)},setMetas:async S=>{const k={};S.forEach(L=>{const{driverArea:U,driverKey:x}=n("key"in L?L.key:L.item.key);k[U]??(k[U]=[]),k[U].push({key:x,properties:L.meta})}),await Promise.all(Object.entries(k).map(async([L,U])=>{const x=e(L),F=U.map(({key:_})=>r(_));console.log(L,F);const B=await x.getItems(F),V=Object.fromEntries(B.map(({key:_,value:z})=>[_,c(z)])),O=U.map(({key:_,properties:z})=>{const Q=r(_);return{key:Q,value:s(V[Q]??{},z)}});await x.setItems(O)}))},removeItem:async(S,k)=>{const{driver:L,driverKey:U}=n(S);await p(L,U,k)},removeItems:async S=>{const k={};S.forEach(L=>{let U,x;typeof L=="string"?U=L:"getValue"in L?U=L.key:"item"in L?(U=L.item.key,x=L.options):(U=L.key,x=L.options);const{driverArea:F,driverKey:B}=n(U);k[F]??(k[F]=[]),k[F].push(B),x!=null&&x.removeMeta&&k[F].push(r(B))}),await Promise.all(Object.entries(k).map(async([L,U])=>{await e(L).removeItems(U)}))},clear:async S=>{await e(S).clear()},removeMeta:async(S,k)=>{const{driver:L,driverKey:U}=n(S);await v(L,U,k)},snapshot:async(S,k)=>{var x;const U=await e(S).snapshot();return(x=k==null?void 0:k.excludeKeys)==null||x.forEach(F=>{delete U[F],delete U[r(F)]}),U},restoreSnapshot:async(S,k)=>{await e(S).restoreSnapshot(k)},watch:(S,k)=>{const{driver:L,driverKey:U}=n(S);return w(L,U,k)},unwatch(){Object.values(t).forEach(S=>{S.unwatch()})},defineItem:(S,k)=>{const{driver:L,driverKey:U}=n(S),{version:x=1,migrations:F={}}=k??{};if(x<1)throw Error("Storage item version cannot be less than 1. Initial versions should be set to 1, not 0.");const B=async()=>{var J;const Q=r(U),[{value:K},{value:te}]=await L.getItems([U,Q]);if(K==null)return;const ee=(te==null?void 0:te.v)??1;if(ee>x)throw Error(`Version downgrade detected (v${ee} -> v${x}) for "${S}"`);if(ee===x)return;console.debug(`[@wxt-dev/storage] Running storage migration for ${S}: v${ee} -> v${x}`);const Y=Array.from({length:x-ee},(ie,be)=>ee+be+1);let le=K;for(const ie of Y)try{le=await((J=F==null?void 0:F[ie])==null?void 0:J.call(F,le))??le}catch(be){throw new gU(S,ie,{cause:be})}await L.setItems([{key:U,value:le},{key:Q,value:{...te,v:x}}]),console.debug(`[@wxt-dev/storage] Storage migration completed for ${S} v${x}`,{migratedValue:le})},V=(k==null?void 0:k.migrations)==null?Promise.resolve():B().catch(Q=>{console.error(`[@wxt-dev/storage] Migration failed for ${S}`,Q)}),O=new uU,_=()=>(k==null?void 0:k.fallback)??(k==null?void 0:k.defaultValue)??null,z=()=>O.runExclusive(async()=>{const Q=await L.getItem(U);if(Q!=null||(k==null?void 0:k.init)==null)return Q;const K=await k.init();return await L.setItem(U,K),K});return V.then(z),{key:S,get defaultValue(){return _()},get fallback(){return _()},getValue:async()=>(await V,k!=null&&k.init?await z():await m(L,U,k)),getMeta:async()=>(await V,await h(L,U)),setValue:async Q=>(await V,await g(L,U,Q)),setMeta:async Q=>(await V,await A(L,U,Q)),removeValue:async Q=>(await V,await p(L,U,Q)),removeMeta:async Q=>(await V,await v(L,U,Q)),watch:Q=>w(L,U,(K,te)=>Q(K??_(),te??_())),migrate:B}}}}function zc(t){const e=()=>{if(cu.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(cu.storage==null)throw Error("You must add the 'storage' permission to your manifest to use 'wxt/storage'");const r=cu.storage[t];if(r==null)throw Error(`"browser.storage.${t}" is undefined`);return r},n=new Set;return{getItem:async r=>(await e().get(r))[r],getItems:async r=>{const s=await e().get(r);return r.map(l=>({key:l,value:s[l]??null}))},setItem:async(r,s)=>{s==null?await e().remove(r):await e().set({[r]:s})},setItems:async r=>{const s=r.reduce((l,{key:c,value:m})=>(l[c]=m,l),{});await e().set(s)},removeItem:async r=>{await e().remove(r)},removeItems:async r=>{await e().remove(r)},clear:async()=>{await e().clear()},snapshot:async()=>await e().get(),restoreSnapshot:async r=>{await e().set(r)},watch(r,s){const l=c=>{const m=c[r];m!=null&&(Rf(m.newValue,m.oldValue)||s(m.newValue??null,m.oldValue??null))};return e().onChanged.addListener(l),n.add(l),()=>{e().onChanged.removeListener(l),n.delete(l)}},unwatch(){n.forEach(r=>{e().onChanged.removeListener(r)}),n.clear()}}}class gU extends Error{constructor(e,n,r){super(`v${n} migration failed for "${e}"`,r),this.key=e,this.version=n}}var Ih={exports:{}};const hU={},fU=Object.freeze(Object.defineProperty({__proto__:null,default:hU},Symbol.toStringTag,{value:"Module"})),NE=LD(fU);var TE;function pU(){return TE||(TE=1,function(t,e){var n=void 0,r=function(s){return n||(n=new Promise(function(l,c){var m=typeof s<"u"?s:{},h=m.onAbort;m.onAbort=function(y){c(new Error(y)),h&&h(y)},m.postRun=m.postRun||[],m.postRun.push(function(){l(m)}),t=void 0;var g;g||(g=typeof m<"u"?m:{});var A=typeof window=="object",p=typeof WorkerGlobalScope<"u",v=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";g.onRuntimeInitialized=function(){function y(ue,Ue){switch(typeof Ue){case"boolean":bm(ue,Ue?1:0);break;case"number":Am(ue,Ue);break;case"string":ym(ue,Ue,-1,-1);break;case"object":if(Ue===null)Pd(ue);else if(Ue.length!=null){var Ye=wr(Ue,ls);Em(ue,Ye,Ue.length,-1),Cr(Ye)}else Nr(ue,"Wrong API use : tried to return a value of an unknown type ("+Ue+").",-1);break;default:Pd(ue)}}function I(ue,Ue){for(var Ye=[],st=0;st<ue;st+=1){var ct=gt(Ue+4*st,"i32"),Jt=Od(ct);if(Jt===1||Jt===2)ct=pm(ct);else if(Jt===3)ct=hm(ct);else if(Jt===4){Jt=ct,ct=gm(Jt),Jt=fm(Jt);for(var Pn=new Uint8Array(ct),kn=0;kn<ct;kn+=1)Pn[kn]=Q[Jt+kn];ct=Pn}else ct=null;Ye.push(ct)}return Ye}function R(ue,Ue){this.Qa=ue,this.db=Ue,this.Oa=1,this.lb=[]}function H(ue,Ue){if(this.db=Ue,Ue=qt(ue)+1,this.eb=Vs(Ue),this.eb===null)throw Error("Unable to allocate memory for the SQL string");M(ue,K,this.eb,Ue),this.kb=this.eb,this.Za=this.pb=null}function Z(ue){if(this.filename="dbfile_"+(4294967295*Math.random()>>>0),ue!=null){var Ue=this.filename,Ye="/",st=Ue;if(Ye&&(Ye=typeof Ye=="string"?Ye:La(Ye),st=Ue?Re(Ye+"/"+Ue):Ye),Ue=ht(!0,!0),st=q(st,Ue),ue){if(typeof ue=="string"){Ye=Array(ue.length);for(var ct=0,Jt=ue.length;ct<Jt;++ct)Ye[ct]=ue.charCodeAt(ct);ue=Ye}wa(st,Ue|146),Ye=ca(st,577),Rd(Ye,ue,0,ue.length,0),On(Ye),wa(st,Ue)}}this.handleError(qe(this.filename,me)),this.db=gt(me,"i32"),jd(this.db),this.fb={},this.Sa={}}var me=ai(4),ve=g.cwrap,qe=ve("sqlite3_open","number",["string","number"]),Ct=ve("sqlite3_close_v2","number",["number"]),yt=ve("sqlite3_exec","number",["number","string","number","number","number"]),Aa=ve("sqlite3_changes","number",["number"]),Za=ve("sqlite3_prepare_v2","number",["number","string","number","number","number"]),zs=ve("sqlite3_sql","string",["number"]),ds=ve("sqlite3_normalized_sql","string",["number"]),cs=ve("sqlite3_prepare_v2","number",["number","number","number","number","number"]),Bd=ve("sqlite3_bind_text","number",["number","number","number","number","number"]),_d=ve("sqlite3_bind_blob","number",["number","number","number","number","number"]),em=ve("sqlite3_bind_double","number",["number","number","number"]),tm=ve("sqlite3_bind_int","number",["number","number","number"]),Go=ve("sqlite3_bind_parameter_index","number",["number","string"]),am=ve("sqlite3_step","number",["number"]),nm=ve("sqlite3_errmsg","string",["number"]),im=ve("sqlite3_column_count","number",["number"]),rm=ve("sqlite3_data_count","number",["number"]),sm=ve("sqlite3_column_double","number",["number","number"]),Wo=ve("sqlite3_column_text","string",["number","number"]),om=ve("sqlite3_column_blob","number",["number","number"]),lm=ve("sqlite3_column_bytes","number",["number","number"]),dm=ve("sqlite3_column_type","number",["number","number"]),cm=ve("sqlite3_column_name","string",["number","number"]),qo=ve("sqlite3_reset","number",["number"]),um=ve("sqlite3_clear_bindings","number",["number"]),mm=ve("sqlite3_finalize","number",["number"]),Fd=ve("sqlite3_create_function_v2","number","number string number number number number number number number".split(" ")),Od=ve("sqlite3_value_type","number",["number"]),gm=ve("sqlite3_value_bytes","number",["number"]),hm=ve("sqlite3_value_text","string",["number"]),fm=ve("sqlite3_value_blob","number",["number"]),pm=ve("sqlite3_value_double","number",["number"]),Am=ve("sqlite3_result_double","",["number","number"]),Pd=ve("sqlite3_result_null","",["number"]),ym=ve("sqlite3_result_text","",["number","string","number","number"]),Em=ve("sqlite3_result_blob","",["number","number","number","number"]),bm=ve("sqlite3_result_int","",["number","number"]),Nr=ve("sqlite3_result_error","",["number","string","number"]),Tr=ve("sqlite3_aggregate_context","number",["number","number"]),jd=ve("RegisterExtensionFunctions","number",["number"]),Yo=ve("sqlite3_update_hook","number",["number","number","number"]);R.prototype.bind=function(ue){if(!this.Qa)throw"Statement closed";return this.reset(),Array.isArray(ue)?this.Cb(ue):ue!=null&&typeof ue=="object"?this.Db(ue):!0},R.prototype.step=function(){if(!this.Qa)throw"Statement closed";this.Oa=1;var ue=am(this.Qa);switch(ue){case 100:return!0;case 101:return!1;default:throw this.db.handleError(ue)}},R.prototype.wb=function(ue){return ue==null&&(ue=this.Oa,this.Oa+=1),sm(this.Qa,ue)},R.prototype.Gb=function(ue){if(ue==null&&(ue=this.Oa,this.Oa+=1),ue=Wo(this.Qa,ue),typeof BigInt!="function")throw Error("BigInt is not supported");return BigInt(ue)},R.prototype.Hb=function(ue){return ue==null&&(ue=this.Oa,this.Oa+=1),Wo(this.Qa,ue)},R.prototype.getBlob=function(ue){ue==null&&(ue=this.Oa,this.Oa+=1);var Ue=lm(this.Qa,ue);ue=om(this.Qa,ue);for(var Ye=new Uint8Array(Ue),st=0;st<Ue;st+=1)Ye[st]=Q[ue+st];return Ye},R.prototype.get=function(ue,Ue){Ue=Ue||{},ue!=null&&this.bind(ue)&&this.step(),ue=[];for(var Ye=rm(this.Qa),st=0;st<Ye;st+=1)switch(dm(this.Qa,st)){case 1:var ct=Ue.useBigInt?this.Gb(st):this.wb(st);ue.push(ct);break;case 2:ue.push(this.wb(st));break;case 3:ue.push(this.Hb(st));break;case 4:ue.push(this.getBlob(st));break;default:ue.push(null)}return ue},R.prototype.getColumnNames=function(){for(var ue=[],Ue=im(this.Qa),Ye=0;Ye<Ue;Ye+=1)ue.push(cm(this.Qa,Ye));return ue},R.prototype.getAsObject=function(ue,Ue){ue=this.get(ue,Ue),Ue=this.getColumnNames();for(var Ye={},st=0;st<Ue.length;st+=1)Ye[Ue[st]]=ue[st];return Ye},R.prototype.getSQL=function(){return zs(this.Qa)},R.prototype.getNormalizedSQL=function(){return ds(this.Qa)},R.prototype.run=function(ue){return ue!=null&&this.bind(ue),this.step(),this.reset()},R.prototype.sb=function(ue,Ue){Ue==null&&(Ue=this.Oa,this.Oa+=1),ue=C(ue);var Ye=wr(ue,ls);this.lb.push(Ye),this.db.handleError(Bd(this.Qa,Ue,Ye,ue.length-1,0))},R.prototype.Bb=function(ue,Ue){Ue==null&&(Ue=this.Oa,this.Oa+=1);var Ye=wr(ue,ls);this.lb.push(Ye),this.db.handleError(_d(this.Qa,Ue,Ye,ue.length,0))},R.prototype.rb=function(ue,Ue){Ue==null&&(Ue=this.Oa,this.Oa+=1),this.db.handleError((ue===(ue|0)?tm:em)(this.Qa,Ue,ue))},R.prototype.Eb=function(ue){ue==null&&(ue=this.Oa,this.Oa+=1),_d(this.Qa,ue,0,0,0)},R.prototype.tb=function(ue,Ue){switch(Ue==null&&(Ue=this.Oa,this.Oa+=1),typeof ue){case"string":this.sb(ue,Ue);return;case"number":this.rb(ue,Ue);return;case"bigint":this.sb(ue.toString(),Ue);return;case"boolean":this.rb(ue+0,Ue);return;case"object":if(ue===null){this.Eb(Ue);return}if(ue.length!=null){this.Bb(ue,Ue);return}}throw"Wrong API use : tried to bind a value of an unknown type ("+ue+")."},R.prototype.Db=function(ue){var Ue=this;return Object.keys(ue).forEach(function(Ye){var st=Go(Ue.Qa,Ye);st!==0&&Ue.tb(ue[Ye],st)}),!0},R.prototype.Cb=function(ue){for(var Ue=0;Ue<ue.length;Ue+=1)this.tb(ue[Ue],Ue+1);return!0},R.prototype.reset=function(){return this.freemem(),um(this.Qa)===0&&qo(this.Qa)===0},R.prototype.freemem=function(){for(var ue;(ue=this.lb.pop())!==void 0;)Cr(ue)},R.prototype.free=function(){this.freemem();var ue=mm(this.Qa)===0;return delete this.db.fb[this.Qa],this.Qa=0,ue},H.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 ue=fi(),Ue=ai(4);Ke(me),Ke(Ue);try{this.db.handleError(cs(this.db.db,this.kb,-1,me,Ue)),this.kb=gt(Ue,"i32");var Ye=gt(me,"i32");return Ye===0?(this.mb(),{done:!0}):(this.Za=new R(Ye,this.db),this.db.fb[Ye]=this.Za,{value:this.Za,done:!1})}catch(st){throw this.pb=Fe(this.kb),this.mb(),st}finally{vn(ue)}},H.prototype.mb=function(){Cr(this.eb),this.eb=null},H.prototype.getRemainingSQL=function(){return this.pb!==null?this.pb:Fe(this.kb)},typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"&&(H.prototype[Symbol.iterator]=function(){return this}),Z.prototype.run=function(ue,Ue){if(!this.db)throw"Database closed";if(Ue){ue=this.prepare(ue,Ue);try{ue.step()}finally{ue.free()}}else this.handleError(yt(this.db,ue,0,0,me));return this},Z.prototype.exec=function(ue,Ue,Ye){if(!this.db)throw"Database closed";var st=fi(),ct=null;try{var Jt=zo(ue),Pn=ai(4);for(ue=[];gt(Jt,"i8")!==0;){Ke(me),Ke(Pn),this.handleError(cs(this.db,Jt,-1,me,Pn));var kn=gt(me,"i32");if(Jt=gt(Pn,"i32"),kn!==0){var fn=null;for(ct=new R(kn,this),Ue!=null&&ct.bind(Ue);ct.step();)fn===null&&(fn={columns:ct.getColumnNames(),values:[]},ue.push(fn)),fn.values.push(ct.get(null,Ye));ct.free()}}return ue}catch(xn){throw ct&&ct.free(),xn}finally{vn(st)}},Z.prototype.each=function(ue,Ue,Ye,st,ct){typeof Ue=="function"&&(st=Ye,Ye=Ue,Ue=void 0),ue=this.prepare(ue,Ue);try{for(;ue.step();)Ye(ue.getAsObject(null,ct))}finally{ue.free()}if(typeof st=="function")return st()},Z.prototype.prepare=function(ue,Ue){if(Ke(me),this.handleError(Za(this.db,ue,-1,me,0)),ue=gt(me,"i32"),ue===0)throw"Nothing to prepare";var Ye=new R(ue,this);return Ue!=null&&Ye.bind(Ue),this.fb[ue]=Ye},Z.prototype.iterateStatements=function(ue){return new H(ue,this)},Z.prototype.export=function(){Object.values(this.fb).forEach(function(Ue){Ue.free()}),Object.values(this.Sa).forEach(ti),this.Sa={},this.handleError(Ct(this.db));var ue=Ud(this.filename);return this.handleError(qe(this.filename,me)),this.db=gt(me,"i32"),jd(this.db),ue},Z.prototype.close=function(){this.db!==null&&(Object.values(this.fb).forEach(function(ue){ue.free()}),Object.values(this.Sa).forEach(ti),this.Sa={},this.Ya&&(ti(this.Ya),this.Ya=void 0),this.handleError(Ct(this.db)),$t("/"+this.filename),this.db=null)},Z.prototype.handleError=function(ue){if(ue===0)return null;throw ue=nm(this.db),Error(ue)},Z.prototype.getRowsModified=function(){return Aa(this.db)},Z.prototype.create_function=function(ue,Ue){Object.prototype.hasOwnProperty.call(this.Sa,ue)&&(ti(this.Sa[ue]),delete this.Sa[ue]);var Ye=qi(function(st,ct,Jt){ct=I(ct,Jt);try{var Pn=Ue.apply(null,ct)}catch(kn){Nr(st,kn,-1);return}y(st,Pn)},"viii");return this.Sa[ue]=Ye,this.handleError(Fd(this.db,ue,Ue.length,1,0,Ye,0,0,0)),this},Z.prototype.create_aggregate=function(ue,Ue){var Ye=Ue.init||function(){return null},st=Ue.finalize||function(fn){return fn},ct=Ue.step;if(!ct)throw"An aggregate function must have a step function in "+ue;var Jt={};Object.hasOwnProperty.call(this.Sa,ue)&&(ti(this.Sa[ue]),delete this.Sa[ue]),Ue=ue+"__finalize",Object.hasOwnProperty.call(this.Sa,Ue)&&(ti(this.Sa[Ue]),delete this.Sa[Ue]);var Pn=qi(function(fn,xn,Yi){var jn=Tr(fn,1);Object.hasOwnProperty.call(Jt,jn)||(Jt[jn]=Ye()),xn=I(xn,Yi),xn=[Jt[jn]].concat(xn);try{Jt[jn]=ct.apply(null,xn)}catch(vm){delete Jt[jn],Nr(fn,vm,-1)}},"viii"),kn=qi(function(fn){var xn=Tr(fn,1);try{var Yi=st(Jt[xn])}catch(jn){delete Jt[xn],Nr(fn,jn,-1);return}y(fn,Yi),delete Jt[xn]},"vi");return this.Sa[ue]=Pn,this.Sa[Ue]=kn,this.handleError(Fd(this.db,ue,ct.length-1,1,0,0,Pn,kn,0)),this},Z.prototype.updateHook=function(ue){this.Ya&&(Yo(this.db,0,0),ti(this.Ya),this.Ya=void 0),ue&&(this.Ya=qi(function(Ue,Ye,st,ct,Jt){switch(Ye){case 18:Ue="insert";break;case 23:Ue="update";break;case 9:Ue="delete";break;default:throw"unknown operationCode in updateHook callback: "+Ye}if(st=st?Se(K,st):"",ct=ct?Se(K,ct):"",Jt>Number.MAX_SAFE_INTEGER)throw"rowId too big to fit inside a Number";ue(Ue,st,ct,Number(Jt))},"viiiij"),Yo(this.db,this.Ya,0))},g.Database=Z};var w={...g},T="./this.program",S=(y,I)=>{throw I},k="",L,U;if(v){var x=NE;k=__dirname+"/",U=y=>(y=be(y)?new URL(y):y,x.readFileSync(y)),L=async y=>(y=be(y)?new URL(y):y,x.readFileSync(y,void 0)),!g.thisProgram&&1<process.argv.length&&(T=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),t.exports=g,S=(y,I)=>{throw process.exitCode=y,I}}else(A||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&&(U=y=>{var I=new XMLHttpRequest;return I.open("GET",y,!1),I.responseType="arraybuffer",I.send(null),new Uint8Array(I.response)}),L=async y=>{if(be(y))return new Promise((R,H)=>{var Z=new XMLHttpRequest;Z.open("GET",y,!0),Z.responseType="arraybuffer",Z.onload=()=>{Z.status==200||Z.status==0&&Z.response?R(Z.response):H(Z.status)},Z.onerror=H,Z.send(null)});var I=await fetch(y,{credentials:"same-origin"});if(I.ok)return I.arrayBuffer();throw Error(I.status+" : "+I.url)});var F=g.print||console.log.bind(console),B=g.printErr||console.error.bind(console);Object.assign(g,w),w=null,g.thisProgram&&(T=g.thisProgram);var V=g.wasmBinary,O,_=!1,z,Q,K,te,ee,Y,le,J,ie,be=y=>y.startsWith("file://");function se(){var y=O.buffer;g.HEAP8=Q=new Int8Array(y),g.HEAP16=te=new Int16Array(y),g.HEAPU8=K=new Uint8Array(y),g.HEAPU16=new Uint16Array(y),g.HEAP32=ee=new Int32Array(y),g.HEAPU32=Y=new Uint32Array(y),g.HEAPF32=le=new Float32Array(y),g.HEAPF64=ie=new Float64Array(y),g.HEAP64=J=new BigInt64Array(y),g.HEAPU64=new BigUint64Array(y)}var j=0,W=null;function X(y){var I;throw(I=g.onAbort)==null||I.call(g,y),y="Aborted("+y+")",B(y),_=!0,new WebAssembly.RuntimeError(y+". Build with -sASSERTIONS for more info.")}var ne;async function we(y){if(!V)try{var I=await L(y);return new Uint8Array(I)}catch{}if(y==ne&&V)y=new Uint8Array(V);else if(U)y=U(y);else throw"both async and sync fetching of the wasm failed";return y}async function ce(y,I){try{var R=await we(y);return await WebAssembly.instantiate(R,I)}catch(H){B(`failed to asynchronously prepare wasm: ${H}`),X(H)}}async function Ee(y){var I=ne;if(!V&&typeof WebAssembly.instantiateStreaming=="function"&&!be(I)&&!v)try{var R=fetch(I,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(R,y)}catch(H){B(`wasm streaming compile failed: ${H}`),B("falling back to ArrayBuffer instantiation")}return ce(I,y)}class Te{constructor(I){Ge(this,"name","ExitStatus");this.message=`Program terminated with exit(${I})`,this.status=I}}var Ce=y=>{for(;0<y.length;)y.shift()(g)},Pe=[],Ve=[],bt=()=>{var y=g.preRun.shift();Ve.unshift(y)};function gt(y,I="i8"){switch(I.endsWith("*")&&(I="*"),I){case"i1":return Q[y];case"i8":return Q[y];case"i16":return te[y>>1];case"i32":return ee[y>>2];case"i64":return J[y>>3];case"float":return le[y>>2];case"double":return ie[y>>3];case"*":return Y[y>>2];default:X(`invalid type for getValue: ${I}`)}}var it=g.noExitRuntime||!0;function Ke(y){var I="i32";switch(I.endsWith("*")&&(I="*"),I){case"i1":Q[y]=0;break;case"i8":Q[y]=0;break;case"i16":te[y>>1]=0;break;case"i32":ee[y>>2]=0;break;case"i64":J[y>>3]=BigInt(0);break;case"float":le[y>>2]=0;break;case"double":ie[y>>3]=0;break;case"*":Y[y>>2]=0;break;default:X(`invalid type for setValue: ${I}`)}}var Pt=typeof TextDecoder<"u"?new TextDecoder:void 0,Se=(y,I=0,R=NaN)=>{var H=I+R;for(R=I;y[R]&&!(R>=H);)++R;if(16<R-I&&y.buffer&&Pt)return Pt.decode(y.subarray(I,R));for(H="";I<R;){var Z=y[I++];if(Z&128){var me=y[I++]&63;if((Z&224)==192)H+=String.fromCharCode((Z&31)<<6|me);else{var ve=y[I++]&63;Z=(Z&240)==224?(Z&15)<<12|me<<6|ve:(Z&7)<<18|me<<12|ve<<6|y[I++]&63,65536>Z?H+=String.fromCharCode(Z):(Z-=65536,H+=String.fromCharCode(55296|Z>>10,56320|Z&1023))}}else H+=String.fromCharCode(Z)}return H},Fe=(y,I)=>y?Se(K,y,I):"",fe=(y,I)=>{for(var R=0,H=y.length-1;0<=H;H--){var Z=y[H];Z==="."?y.splice(H,1):Z===".."?(y.splice(H,1),R++):R&&(y.splice(H,1),R--)}if(I)for(;R;R--)y.unshift("..");return y},Re=y=>{var I=y.charAt(0)==="/",R=y.slice(-1)==="/";return(y=fe(y.split("/").filter(H=>!!H),!I).join("/"))||I||(y="."),y&&R&&(y+="/"),(I?"/":"")+y},ze=y=>{var I=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(y).slice(1);return y=I[0],I=I[1],!y&&!I?".":(I&&(I=I.slice(0,-1)),y+I)},je=y=>y&&y.match(/([^\/]+|\/)\/*$/)[1],at=()=>{if(v){var y=NE;return I=>y.randomFillSync(I)}return I=>crypto.getRandomValues(I)},wt=y=>{(wt=at())(y)},Rt=(...y)=>{for(var I="",R=!1,H=y.length-1;-1<=H&&!R;H--){if(R=0<=H?y[H]:"/",typeof R!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!R)return"";I=R+"/"+I,R=R.charAt(0)==="/"}return I=fe(I.split("/").filter(Z=>!!Z),!R).join("/"),(R?"/":"")+I||"."},Tt=[],qt=y=>{for(var I=0,R=0;R<y.length;++R){var H=y.charCodeAt(R);127>=H?I++:2047>=H?I+=2:55296<=H&&57343>=H?(I+=4,++R):I+=3}return I},M=(y,I,R,H)=>{if(!(0<H))return 0;var Z=R;H=R+H-1;for(var me=0;me<y.length;++me){var ve=y.charCodeAt(me);if(55296<=ve&&57343>=ve){var qe=y.charCodeAt(++me);ve=65536+((ve&1023)<<10)|qe&1023}if(127>=ve){if(R>=H)break;I[R++]=ve}else{if(2047>=ve){if(R+1>=H)break;I[R++]=192|ve>>6}else{if(65535>=ve){if(R+2>=H)break;I[R++]=224|ve>>12}else{if(R+3>=H)break;I[R++]=240|ve>>18,I[R++]=128|ve>>12&63}I[R++]=128|ve>>6&63}I[R++]=128|ve&63}}return I[R]=0,R-Z},C=(y,I)=>{var R=Array(qt(y)+1);return y=M(y,R,0,R.length),I&&(R.length=y),R},N=[];function G(y,I){N[y]={input:[],output:[],cb:I},We(y,ae)}var ae={open(y){var I=N[y.node.rdev];if(!I)throw new Be(43);y.tty=I,y.seekable=!1},close(y){y.tty.cb.fsync(y.tty)},fsync(y){y.tty.cb.fsync(y.tty)},read(y,I,R,H){if(!y.tty||!y.tty.cb.xb)throw new Be(60);for(var Z=0,me=0;me<H;me++){try{var ve=y.tty.cb.xb(y.tty)}catch{throw new Be(29)}if(ve===void 0&&Z===0)throw new Be(6);if(ve==null)break;Z++,I[R+me]=ve}return Z&&(y.node.atime=Date.now()),Z},write(y,I,R,H){if(!y.tty||!y.tty.cb.qb)throw new Be(60);try{for(var Z=0;Z<H;Z++)y.tty.cb.qb(y.tty,I[R+Z])}catch{throw new Be(29)}return H&&(y.node.mtime=y.node.ctime=Date.now()),Z}},pe={xb(){e:{if(!Tt.length){var y=null;if(v){var I=Buffer.alloc(256),R=0,H=process.stdin.fd;try{R=x.readSync(H,I,0,256)}catch(Z){if(Z.toString().includes("EOF"))R=0;else throw Z}0<R&&(y=I.slice(0,R).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(y=window.prompt("Input: "),y!==null&&(y+=`
`));if(!y){y=null;break e}Tt=C(y,!0)}y=Tt.shift()}return y},qb(y,I){I===null||I===10?(F(Se(y.output)),y.output=[]):I!=0&&y.output.push(I)},fsync(y){var I;0<((I=y.output)==null?void 0:I.length)&&(F(Se(y.output)),y.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]}},Ne={qb(y,I){I===null||I===10?(B(Se(y.output)),y.output=[]):I!=0&&y.output.push(I)},fsync(y){var I;0<((I=y.output)==null?void 0:I.length)&&(B(Se(y.output)),y.output=[])}},_e={Wa:null,Xa(){return _e.createNode(null,"/",16895,0)},createNode(y,I,R,H){if((R&61440)===24576||(R&61440)===4096)throw new Be(63);return _e.Wa||(_e.Wa={dir:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua,lookup:_e.La.lookup,hb:_e.La.hb,rename:_e.La.rename,unlink:_e.La.unlink,rmdir:_e.La.rmdir,readdir:_e.La.readdir,symlink:_e.La.symlink},stream:{Va:_e.Ma.Va}},file:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua},stream:{Va:_e.Ma.Va,read:_e.Ma.read,write:_e.Ma.write,ib:_e.Ma.ib,jb:_e.Ma.jb}},link:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua,readlink:_e.La.readlink},stream:{}},ub:{node:{Ta:_e.La.Ta,Ua:_e.La.Ua},stream:Qe}}),R=Qt(y,I,R,H),Ht(R.mode)?(R.La=_e.Wa.dir.node,R.Ma=_e.Wa.dir.stream,R.Na={}):(R.mode&61440)===32768?(R.La=_e.Wa.file.node,R.Ma=_e.Wa.file.stream,R.Ra=0,R.Na=null):(R.mode&61440)===40960?(R.La=_e.Wa.link.node,R.Ma=_e.Wa.link.stream):(R.mode&61440)===8192&&(R.La=_e.Wa.ub.node,R.Ma=_e.Wa.ub.stream),R.atime=R.mtime=R.ctime=Date.now(),y&&(y.Na[I]=R,y.atime=y.mtime=y.ctime=R.atime),R},Sb(y){return y.Na?y.Na.subarray?y.Na.subarray(0,y.Ra):new Uint8Array(y.Na):new Uint8Array(0)},La:{Ta(y){var I={};return I.dev=(y.mode&61440)===8192?y.id:1,I.ino=y.id,I.mode=y.mode,I.nlink=1,I.uid=0,I.gid=0,I.rdev=y.rdev,Ht(y.mode)?I.size=4096:(y.mode&61440)===32768?I.size=y.Ra:(y.mode&61440)===40960?I.size=y.link.length:I.size=0,I.atime=new Date(y.atime),I.mtime=new Date(y.mtime),I.ctime=new Date(y.ctime),I.blksize=4096,I.blocks=Math.ceil(I.size/I.blksize),I},Ua(y,I){for(var R of["mode","atime","mtime","ctime"])I[R]!=null&&(y[R]=I[R]);I.size!==void 0&&(I=I.size,y.Ra!=I&&(I==0?(y.Na=null,y.Ra=0):(R=y.Na,y.Na=new Uint8Array(I),R&&y.Na.set(R.subarray(0,Math.min(I,y.Ra))),y.Ra=I)))},lookup(){throw _e.vb},hb(y,I,R,H){return _e.createNode(y,I,R,H)},rename(y,I,R){try{var H=Ut(I,R)}catch{}if(H){if(Ht(y.mode))for(var Z in H.Na)throw new Be(55);jt(H)}delete y.parent.Na[y.name],I.Na[R]=y,y.name=R,I.ctime=I.mtime=y.parent.ctime=y.parent.mtime=Date.now()},unlink(y,I){delete y.Na[I],y.ctime=y.mtime=Date.now()},rmdir(y,I){var R=Ut(y,I),H;for(H in R.Na)throw new Be(55);delete y.Na[I],y.ctime=y.mtime=Date.now()},readdir(y){return[".","..",...Object.keys(y.Na)]},symlink(y,I,R){return y=_e.createNode(y,I,41471,0),y.link=R,y},readlink(y){if((y.mode&61440)!==40960)throw new Be(28);return y.link}},Ma:{read(y,I,R,H,Z){var me=y.node.Na;if(Z>=y.node.Ra)return 0;if(y=Math.min(y.node.Ra-Z,H),8<y&&me.subarray)I.set(me.subarray(Z,Z+y),R);else for(H=0;H<y;H++)I[R+H]=me[Z+H];return y},write(y,I,R,H,Z,me){if(I.buffer===Q.buffer&&(me=!1),!H)return 0;if(y=y.node,y.mtime=y.ctime=Date.now(),I.subarray&&(!y.Na||y.Na.subarray)){if(me)return y.Na=I.subarray(R,R+H),y.Ra=H;if(y.Ra===0&&Z===0)return y.Na=I.slice(R,R+H),y.Ra=H;if(Z+H<=y.Ra)return y.Na.set(I.subarray(R,R+H),Z),H}me=Z+H;var ve=y.Na?y.Na.length:0;if(ve>=me||(me=Math.max(me,ve*(1048576>ve?2:1.125)>>>0),ve!=0&&(me=Math.max(me,256)),ve=y.Na,y.Na=new Uint8Array(me),0<y.Ra&&y.Na.set(ve.subarray(0,y.Ra),0)),y.Na.subarray&&I.subarray)y.Na.set(I.subarray(R,R+H),Z);else for(me=0;me<H;me++)y.Na[Z+me]=I[R+me];return y.Ra=Math.max(y.Ra,Z+H),H},Va(y,I,R){if(R===1?I+=y.position:R===2&&(y.node.mode&61440)===32768&&(I+=y.node.Ra),0>I)throw new Be(28);return I},ib(y,I,R,H,Z){if((y.node.mode&61440)!==32768)throw new Be(43);if(y=y.node.Na,Z&2||!y||y.buffer!==Q.buffer){Z=!0,H=65536*Math.ceil(I/65536);var me=Ko(65536,H);if(me&&K.fill(0,me,me+H),H=me,!H)throw new Be(48);y&&((0<R||R+I<y.length)&&(y.subarray?y=y.subarray(R,R+I):y=Array.prototype.slice.call(y,R,R+I)),Q.set(y,H))}else Z=!1,H=y.byteOffset;return{Kb:H,Ab:Z}},jb(y,I,R,H){return _e.Ma.write(y,I,0,H,R,!1),0}}},ht=(y,I)=>{var R=0;return y&&(R|=365),I&&(R|=146),R},pt=null,It={},At=[],hi=1,xa=null,Sa=!1,Yt=!0,Vt={},Be=class{constructor(y){Ge(this,"name","ErrnoError");this.Pa=y}},sn=class{constructor(){Ge(this,"gb",{});Ge(this,"node",null)}get flags(){return this.gb.flags}set flags(y){this.gb.flags=y}get position(){return this.gb.position}set position(y){this.gb.position=y}},kt=class{constructor(y,I,R,H){Ge(this,"La",{});Ge(this,"Ma",{});Ge(this,"ab",null);y||(y=this),this.parent=y,this.Xa=y.Xa,this.id=hi++,this.name=I,this.mode=R,this.rdev=H,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&365)===365}set read(y){y?this.mode|=365:this.mode&=-366}get write(){return(this.mode&146)===146}set write(y){y?this.mode|=146:this.mode&=-147}};function Lt(y,I={}){if(!y)throw new Be(44);I.nb??(I.nb=!0),y.charAt(0)==="/"||(y="//"+y);var R=0;e:for(;40>R;R++){y=y.split("/").filter(qe=>!!qe);for(var H=pt,Z="/",me=0;me<y.length;me++){var ve=me===y.length-1;if(ve&&I.parent)break;if(y[me]!==".")if(y[me]==="..")Z=ze(Z),H=H.parent;else{Z=Re(Z+"/"+y[me]);try{H=Ut(H,y[me])}catch(qe){if((qe==null?void 0:qe.Pa)===44&&ve&&I.Jb)return{path:Z};throw qe}if(!H.ab||ve&&!I.nb||(H=H.ab.root),(H.mode&61440)===40960&&(!ve||I.$a)){if(!H.La.readlink)throw new Be(52);H=H.La.readlink(H),H.charAt(0)==="/"||(H=ze(Z)+"/"+H),y=H+"/"+y.slice(me+1).join("/");continue e}}}return{path:Z,node:H}}throw new Be(32)}function La(y){for(var I;;){if(y===y.parent)return y=y.Xa.zb,I?y[y.length-1]!=="/"?`${y}/${I}`:y+I:y;I=I?`${y.name}/${I}`:y.name,y=y.parent}}function on(y,I){for(var R=0,H=0;H<I.length;H++)R=(R<<5)-R+I.charCodeAt(H)|0;return(y+R>>>0)%xa.length}function jt(y){var I=on(y.parent.id,y.name);if(xa[I]===y)xa[I]=y.bb;else for(I=xa[I];I;){if(I.bb===y){I.bb=y.bb;break}I=I.bb}}function Ut(y,I){var R=Ht(y.mode)?(R=fa(y,"x"))?R:y.La.lookup?0:2:54;if(R)throw new Be(R);for(R=xa[on(y.id,I)];R;R=R.bb){var H=R.name;if(R.parent.id===y.id&&H===I)return R}return y.La.lookup(y,I)}function Qt(y,I,R,H){return y=new kt(y,I,R,H),I=on(y.parent.id,y.name),y.bb=xa[I],xa[I]=y}function Ht(y){return(y&61440)===16384}function ga(y){var I=["r","w","rw"][y&3];return y&512&&(I+="w"),I}function fa(y,I){if(Yt)return 0;if(!I.includes("r")||y.mode&292){if(I.includes("w")&&!(y.mode&146)||I.includes("x")&&!(y.mode&73))return 2}else return 2;return 0}function Xa(y,I){if(!Ht(y.mode))return 54;try{return Ut(y,I),20}catch{}return fa(y,"wx")}function $a(y,I,R){try{var H=Ut(y,I)}catch(Z){return Z.Pa}if(y=fa(y,"wx"))return y;if(R){if(!Ht(H.mode))return 54;if(H===H.parent||La(H)==="/")return 10}else if(Ht(H.mode))return 31;return 0}function _a(y){if(!y)throw new Be(63);return y}function pa(y){if(y=At[y],!y)throw new Be(8);return y}function Da(y,I=-1){if(y=Object.assign(new sn,y),I==-1)e:{for(I=0;4096>=I;I++)if(!At[I])break e;throw new Be(33)}return y.fd=I,At[I]=y}function de(y,I=-1){var R,H;return y=Da(y,I),(H=(R=y.Ma)==null?void 0:R.Rb)==null||H.call(R,y),y}function Oe(y,I,R){var H=y==null?void 0:y.Ma.Ua;y=H?y:I,H??(H=I.La.Ua),_a(H),H(y,R)}var Qe={open(y){var I,R;y.Ma=It[y.node.rdev].Ma,(R=(I=y.Ma).open)==null||R.call(I,y)},Va(){throw new Be(70)}};function We(y,I){It[y]={Ma:I}}function ot(y,I){var R=I==="/";if(R&&pt)throw new Be(10);if(!R&&I){var H=Lt(I,{nb:!1});if(I=H.path,H=H.node,H.ab)throw new Be(10);if(!Ht(H.mode))throw new Be(54)}I={type:y,Wb:{},zb:I,Ib:[]},y=y.Xa(I),y.Xa=I,I.root=y,R?pt=y:H&&(H.ab=I,H.Xa&&H.Xa.Ib.push(I))}function Me(y,I,R){var H=Lt(y,{parent:!0}).node;if(y=je(y),!y)throw new Be(28);if(y==="."||y==="..")throw new Be(20);var Z=Xa(H,y);if(Z)throw new Be(Z);if(!H.La.hb)throw new Be(63);return H.La.hb(H,y,I,R)}function q(y,I=438){return Me(y,I&4095|32768,0)}function Ie(y,I=511){return Me(y,I&1023|16384,0)}function He(y,I,R){typeof R>"u"&&(R=I,I=438),Me(y,I|8192,R)}function rt(y,I){if(!Rt(y))throw new Be(44);var R=Lt(I,{parent:!0}).node;if(!R)throw new Be(44);I=je(I);var H=Xa(R,I);if(H)throw new Be(H);if(!R.La.symlink)throw new Be(63);R.La.symlink(R,I,y)}function ia(y){var I=Lt(y,{parent:!0}).node;y=je(y);var R=Ut(I,y),H=$a(I,y,!0);if(H)throw new Be(H);if(!I.La.rmdir)throw new Be(63);if(R.ab)throw new Be(10);I.La.rmdir(I,y),jt(R)}function $t(y){var I=Lt(y,{parent:!0}).node;if(!I)throw new Be(44);y=je(y);var R=Ut(I,y),H=$a(I,y,!1);if(H)throw new Be(H);if(!I.La.unlink)throw new Be(63);if(R.ab)throw new Be(10);I.La.unlink(I,y),jt(R)}function da(y,I){return y=Lt(y,{$a:!I}).node,_a(y.La.Ta)(y)}function Fa(y,I,R,H){Oe(y,I,{mode:R&4095|I.mode&-4096,ctime:Date.now(),Fb:H})}function wa(y,I){y=typeof y=="string"?Lt(y,{$a:!0}).node:y,Fa(null,y,I)}function Si(y,I,R){if(Ht(I.mode))throw new Be(31);if((I.mode&61440)!==32768)throw new Be(28);var H=fa(I,"w");if(H)throw new Be(H);Oe(y,I,{size:R,timestamp:Date.now()})}function ca(y,I,R=438){if(y==="")throw new Be(44);if(typeof I=="string"){var H={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[I];if(typeof H>"u")throw Error(`Unknown file open mode: ${I}`);I=H}if(R=I&64?R&4095|32768:0,typeof y=="object")H=y;else{var Z=y.endsWith("/");y=Lt(y,{$a:!(I&131072),Jb:!0}),H=y.node,y=y.path}var me=!1;if(I&64)if(H){if(I&128)throw new Be(20)}else{if(Z)throw new Be(31);H=Me(y,R|511,0),me=!0}if(!H)throw new Be(44);if((H.mode&61440)===8192&&(I&=-513),I&65536&&!Ht(H.mode))throw new Be(54);if(!me&&(Z=H?(H.mode&61440)===40960?32:Ht(H.mode)&&(ga(I)!=="r"||I&576)?31:fa(H,ga(I)):44))throw new Be(Z);return I&512&&!me&&(Z=H,Z=typeof Z=="string"?Lt(Z,{$a:!0}).node:Z,Si(null,Z,0)),I&=-131713,Z=Da({node:H,path:La(H),flags:I,seekable:!0,position:0,Ma:H.Ma,Lb:[],error:!1}),Z.Ma.open&&Z.Ma.open(Z),me&&wa(H,R&511),!g.logReadFiles||I&1||y in Vt||(Vt[y]=1),Z}function On(y){if(y.fd===null)throw new Be(8);y.ob&&(y.ob=null);try{y.Ma.close&&y.Ma.close(y)}catch(I){throw I}finally{At[y.fd]=null}y.fd=null}function zi(y,I,R){if(y.fd===null)throw new Be(8);if(!y.seekable||!y.Ma.Va)throw new Be(70);if(R!=0&&R!=1&&R!=2)throw new Be(28);y.position=y.Ma.Va(y,I,R),y.Lb=[]}function Ps(y,I,R,H,Z){if(0>H||0>Z)throw new Be(28);if(y.fd===null)throw new Be(8);if((y.flags&2097155)===1)throw new Be(8);if(Ht(y.node.mode))throw new Be(31);if(!y.Ma.read)throw new Be(28);var me=typeof Z<"u";if(!me)Z=y.position;else if(!y.seekable)throw new Be(70);return I=y.Ma.read(y,I,R,H,Z),me||(y.position+=I),I}function Rd(y,I,R,H,Z){if(0>H||0>Z)throw new Be(28);if(y.fd===null)throw new Be(8);if((y.flags&2097155)===0)throw new Be(8);if(Ht(y.node.mode))throw new Be(31);if(!y.Ma.write)throw new Be(28);y.seekable&&y.flags&1024&&zi(y,0,2);var me=typeof Z<"u";if(!me)Z=y.position;else if(!y.seekable)throw new Be(70);return I=y.Ma.write(y,I,R,H,Z,void 0),me||(y.position+=I),I}function Ud(y){var I,R=ca(y,R||0);y=da(y).size;var H=new Uint8Array(y);return Ps(R,H,0,y,0),I=H,On(R),I}function Ra(y,I,R){y=Re("/dev/"+y);var H=ht(!!I,!!R);Ra.yb??(Ra.yb=64);var Z=Ra.yb++<<8|0;We(Z,{open(me){me.seekable=!1},close(){var me;(me=R==null?void 0:R.buffer)!=null&&me.length&&R(10)},read(me,ve,qe,Ct){for(var yt=0,Aa=0;Aa<Ct;Aa++){try{var Za=I()}catch{throw new Be(29)}if(Za===void 0&&yt===0)throw new Be(6);if(Za==null)break;yt++,ve[qe+Aa]=Za}return yt&&(me.node.atime=Date.now()),yt},write(me,ve,qe,Ct){for(var yt=0;yt<Ct;yt++)try{R(ve[qe+yt])}catch{throw new Be(29)}return Ct&&(me.node.mtime=me.node.ctime=Date.now()),yt}}),He(y,H,Z)}var ra={};function Qi(y,I,R){if(I.charAt(0)==="/")return I;if(y=y===-100?"/":pa(y).path,I.length==0){if(!R)throw new Be(44);return y}return y+"/"+I}function Ki(y,I){ee[y>>2]=I.dev,ee[y+4>>2]=I.mode,Y[y+8>>2]=I.nlink,ee[y+12>>2]=I.uid,ee[y+16>>2]=I.gid,ee[y+20>>2]=I.rdev,J[y+24>>3]=BigInt(I.size),ee[y+32>>2]=4096,ee[y+36>>2]=I.blocks;var R=I.atime.getTime(),H=I.mtime.getTime(),Z=I.ctime.getTime();return J[y+40>>3]=BigInt(Math.floor(R/1e3)),Y[y+48>>2]=R%1e3*1e6,J[y+56>>3]=BigInt(Math.floor(H/1e3)),Y[y+64>>2]=H%1e3*1e6,J[y+72>>3]=BigInt(Math.floor(Z/1e3)),Y[y+80>>2]=Z%1e3*1e6,J[y+88>>3]=BigInt(I.ino),0}var os=void 0,Gi=()=>{var y=ee[+os>>2];return os+=4,y},jo=0,Nn=[0,31,60,91,121,152,182,213,244,274,305,335],Ho=[0,31,59,90,120,151,181,212,243,273,304,334],br={},js=y=>{var I;z=y,it||0<jo||((I=g.onExit)==null||I.call(g,y),_=!0),S(y,new Te(y))},vr=y=>{if(!_)try{if(y(),!(it||0<jo))try{z=y=z,js(y)}catch(I){I instanceof Te||I=="unwind"||S(1,I)}}catch(I){I instanceof Te||I=="unwind"||S(1,I)}},Hs={},Vo=()=>{if(!Ni){var y={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",_:T||"./this.program"},I;for(I in Hs)Hs[I]===void 0?delete y[I]:y[I]=Hs[I];var R=[];for(I in y)R.push(`${I}=${y[I]}`);Ni=R}return Ni},Ni,zo=y=>{var I=qt(y)+1,R=ai(I);return M(y,K,R,I),R},Md=(y,I,R,H)=>{var Z={string:yt=>{var Aa=0;return yt!=null&&yt!==0&&(Aa=zo(yt)),Aa},array:yt=>{var Aa=ai(yt.length);return Q.set(yt,Aa),Aa}};y=g["_"+y];var me=[],ve=0;if(H)for(var qe=0;qe<H.length;qe++){var Ct=Z[R[qe]];Ct?(ve===0&&(ve=fi()),me[qe]=Ct(H[qe])):me[qe]=H[qe]}return R=y(...me),R=function(yt){return ve!==0&&vn(ve),I==="string"?yt?Se(K,yt):"":I==="boolean"?!!yt:yt}(R)},ls=0,wr=(y,I)=>(I=I==1?ai(y.length):Vs(y.length),y.subarray||y.slice||(y=new Uint8Array(y)),K.set(y,I),I),Wi,Qo=[],Tn,ti=y=>{Wi.delete(Tn.get(y)),Tn.set(y,null),Qo.push(y)},qi=(y,I)=>{if(!Wi){Wi=new WeakMap;var R=Tn.length;if(Wi)for(var H=0;H<0+R;H++){var Z=Tn.get(H);Z&&Wi.set(Z,H)}}if(R=Wi.get(y)||0)return R;if(Qo.length)R=Qo.pop();else{try{Tn.grow(1)}catch(Ct){throw Ct instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":Ct}R=Tn.length-1}try{Tn.set(R,y)}catch(Ct){if(!(Ct instanceof TypeError))throw Ct;if(typeof WebAssembly.Function=="function"){var me=WebAssembly.Function;H={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},Z={parameters:[],results:I[0]=="v"?[]:[H[I[0]]]};for(var ve=1;ve<I.length;++ve)Z.parameters.push(H[I[ve]]);I=new me(Z,y)}else{H=[1],Z=I.slice(0,1),I=I.slice(1),ve={i:127,p:127,j:126,f:125,d:124,e:111},H.push(96);var qe=I.length;128>qe?H.push(qe):H.push(qe%128|128,qe>>7);for(me of I)H.push(ve[me]);Z=="v"?H.push(0):H.push(1,ve[Z]),I=[0,97,115,109,1,0,0,0,1],me=H.length,128>me?I.push(me):I.push(me%128|128,me>>7),I.push(...H),I.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),I=new WebAssembly.Module(new Uint8Array(I)),I=new WebAssembly.Instance(I,{e:{f:y}}).exports.f}Tn.set(R,I)}return Wi.set(y,R),R};xa=Array(4096),ot(_e,"/"),Ie("/tmp"),Ie("/home"),Ie("/home/web_user"),function(){Ie("/dev"),We(259,{read:()=>0,write:(H,Z,me,ve)=>ve,Va:()=>0}),He("/dev/null",259),G(1280,pe),G(1536,Ne),He("/dev/tty",1280),He("/dev/tty1",1536);var y=new Uint8Array(1024),I=0,R=()=>(I===0&&(wt(y),I=y.byteLength),y[--I]);Ra("random",R),Ra("urandom",R),Ie("/dev/shm"),Ie("/dev/shm/tmp")}(),function(){Ie("/proc");var y=Ie("/proc/self");Ie("/proc/self/fd"),ot({Xa(){var I=Qt(y,"fd",16895,73);return I.Ma={Va:_e.Ma.Va},I.La={lookup(R,H){R=+H;var Z=pa(R);return R={parent:null,Xa:{zb:"fake"},La:{readlink:()=>Z.path},id:R+1},R.parent=R},readdir(){return Array.from(At.entries()).filter(([,R])=>R).map(([R])=>R.toString())}},I}},"/proc/self/fd")}(),_e.vb=new Be(44),_e.vb.stack="<generic error, no stack>";var Ir={a:(y,I,R,H)=>X(`Assertion failed: ${y?Se(K,y):""}, at: `+[I?I?Se(K,I):"":"unknown filename",R,H?H?Se(K,H):"":"unknown function"]),i:function(y,I){try{return y=y?Se(K,y):"",wa(y,I),0}catch(R){if(typeof ra>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},L:function(y,I,R){try{if(I=I?Se(K,I):"",I=Qi(y,I),R&-8)return-28;var H=Lt(I,{$a:!0}).node;return H?(y="",R&4&&(y+="r"),R&2&&(y+="w"),R&1&&(y+="x"),y&&fa(H,y)?-2:0):-44}catch(Z){if(typeof ra>"u"||Z.name!=="ErrnoError")throw Z;return-Z.Pa}},j:function(y,I){try{var R=pa(y);return Fa(R,R.node,I,!1),0}catch(H){if(typeof ra>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},h:function(y){try{var I=pa(y);return Oe(I,I.node,{timestamp:Date.now(),Fb:!1}),0}catch(R){if(typeof ra>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},b:function(y,I,R){os=R;try{var H=pa(y);switch(I){case 0:var Z=Gi();if(0>Z)break;for(;At[Z];)Z++;return de(H,Z).fd;case 1:case 2:return 0;case 3:return H.flags;case 4:return Z=Gi(),H.flags|=Z,0;case 12:return Z=Gi(),te[Z+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(me){if(typeof ra>"u"||me.name!=="ErrnoError")throw me;return-me.Pa}},g:function(y,I){try{var R=pa(y),H=R.node,Z=R.Ma.Ta;y=Z?R:H,Z??(Z=H.La.Ta),_a(Z);var me=Z(y);return Ki(I,me)}catch(ve){if(typeof ra>"u"||ve.name!=="ErrnoError")throw ve;return-ve.Pa}},H:function(y,I){I=-9007199254740992>I||9007199254740992<I?NaN:Number(I);try{if(isNaN(I))return 61;var R=pa(y);if(0>I||(R.flags&2097155)===0)throw new Be(28);return Si(R,R.node,I),0}catch(H){if(typeof ra>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},G:function(y,I){try{if(I===0)return-28;var R=qt("/")+1;return I<R?-68:(M("/",K,y,I),R)}catch(H){if(typeof ra>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},K:function(y,I){try{return y=y?Se(K,y):"",Ki(I,da(y,!0))}catch(R){if(typeof ra>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},C:function(y,I,R){try{return I=I?Se(K,I):"",I=Qi(y,I),Ie(I,R),0}catch(H){if(typeof ra>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},J:function(y,I,R,H){try{I=I?Se(K,I):"";var Z=H&256;return I=Qi(y,I,H&4096),Ki(R,Z?da(I,!0):da(I))}catch(me){if(typeof ra>"u"||me.name!=="ErrnoError")throw me;return-me.Pa}},x:function(y,I,R,H){os=H;try{I=I?Se(K,I):"",I=Qi(y,I);var Z=H?Gi():0;return ca(I,R,Z).fd}catch(me){if(typeof ra>"u"||me.name!=="ErrnoError")throw me;return-me.Pa}},v:function(y,I,R,H){try{if(I=I?Se(K,I):"",I=Qi(y,I),0>=H)return-28;var Z=Lt(I).node;if(!Z)throw new Be(44);if(!Z.La.readlink)throw new Be(28);var me=Z.La.readlink(Z),ve=Math.min(H,qt(me)),qe=Q[R+ve];return M(me,K,R,H+1),Q[R+ve]=qe,ve}catch(Ct){if(typeof ra>"u"||Ct.name!=="ErrnoError")throw Ct;return-Ct.Pa}},u:function(y){try{return y=y?Se(K,y):"",ia(y),0}catch(I){if(typeof ra>"u"||I.name!=="ErrnoError")throw I;return-I.Pa}},f:function(y,I){try{return y=y?Se(K,y):"",Ki(I,da(y))}catch(R){if(typeof ra>"u"||R.name!=="ErrnoError")throw R;return-R.Pa}},r:function(y,I,R){try{return I=I?Se(K,I):"",I=Qi(y,I),R===0?$t(I):R===512?ia(I):X("Invalid flags passed to unlinkat"),0}catch(H){if(typeof ra>"u"||H.name!=="ErrnoError")throw H;return-H.Pa}},q:function(y,I,R){try{I=I?Se(K,I):"",I=Qi(y,I,!0);var H=Date.now(),Z,me;if(R){var ve=Y[R>>2]+4294967296*ee[R+4>>2],qe=ee[R+8>>2];qe==1073741823?Z=H:qe==1073741822?Z=null:Z=1e3*ve+qe/1e6,R+=16,ve=Y[R>>2]+4294967296*ee[R+4>>2],qe=ee[R+8>>2],qe==1073741823?me=H:qe==1073741822?me=null:me=1e3*ve+qe/1e6}else me=Z=H;if((me??Z)!==null){y=Z;var Ct=Lt(I,{$a:!0}).node;_a(Ct.La.Ua)(Ct,{atime:y,mtime:me})}return 0}catch(yt){if(typeof ra>"u"||yt.name!=="ErrnoError")throw yt;return-yt.Pa}},m:()=>X(""),l:()=>{it=!1,jo=0},A:function(y,I){y=-9007199254740992>y||9007199254740992<y?NaN:Number(y),y=new Date(1e3*y),ee[I>>2]=y.getSeconds(),ee[I+4>>2]=y.getMinutes(),ee[I+8>>2]=y.getHours(),ee[I+12>>2]=y.getDate(),ee[I+16>>2]=y.getMonth(),ee[I+20>>2]=y.getFullYear()-1900,ee[I+24>>2]=y.getDay();var R=y.getFullYear();ee[I+28>>2]=(R%4!==0||R%100===0&&R%400!==0?Ho:Nn)[y.getMonth()]+y.getDate()-1|0,ee[I+36>>2]=-(60*y.getTimezoneOffset()),R=new Date(y.getFullYear(),6,1).getTimezoneOffset();var H=new Date(y.getFullYear(),0,1).getTimezoneOffset();ee[I+32>>2]=(R!=H&&y.getTimezoneOffset()==Math.min(H,R))|0},y:function(y,I,R,H,Z,me,ve){Z=-9007199254740992>Z||9007199254740992<Z?NaN:Number(Z);try{if(isNaN(Z))return 61;var qe=pa(H);if((I&2)!==0&&(R&2)===0&&(qe.flags&2097155)!==2)throw new Be(2);if((qe.flags&2097155)===1)throw new Be(2);if(!qe.Ma.ib)throw new Be(43);if(!y)throw new Be(28);var Ct=qe.Ma.ib(qe,y,Z,I,R),yt=Ct.Kb;return ee[me>>2]=Ct.Ab,Y[ve>>2]=yt,0}catch(Aa){if(typeof ra>"u"||Aa.name!=="ErrnoError")throw Aa;return-Aa.Pa}},z:function(y,I,R,H,Z,me){me=-9007199254740992>me||9007199254740992<me?NaN:Number(me);try{var ve=pa(Z);if(R&2){if(R=me,(ve.node.mode&61440)!==32768)throw new Be(43);if(!(H&2)){var qe=K.slice(y,y+I);ve.Ma.jb&&ve.Ma.jb(ve,qe,R,I,H)}}}catch(Ct){if(typeof ra>"u"||Ct.name!=="ErrnoError")throw Ct;return-Ct.Pa}},n:(y,I)=>{if(br[y]&&(clearTimeout(br[y].id),delete br[y]),!I)return 0;var R=setTimeout(()=>{delete br[y],vr(()=>Sr(y,performance.now()))},I);return br[y]={id:R,Xb:I},0},B:(y,I,R,H)=>{var Z=new Date().getFullYear(),me=new Date(Z,0,1).getTimezoneOffset();Z=new Date(Z,6,1).getTimezoneOffset(),Y[y>>2]=60*Math.max(me,Z),ee[I>>2]=+(me!=Z),I=ve=>{var qe=Math.abs(ve);return`UTC${0<=ve?"-":"+"}${String(Math.floor(qe/60)).padStart(2,"0")}${String(qe%60).padStart(2,"0")}`},y=I(me),I=I(Z),Z<me?(M(y,K,R,17),M(I,K,H,17)):(M(y,K,H,17),M(I,K,R,17))},d:()=>Date.now(),s:()=>2147483648,c:()=>performance.now(),o:y=>{var I=K.length;if(y>>>=0,2147483648<y)return!1;for(var R=1;4>=R;R*=2){var H=I*(1+.2/R);H=Math.min(H,y+100663296);e:{H=(Math.min(2147483648,65536*Math.ceil(Math.max(y,H)/65536))-O.buffer.byteLength+65535)/65536|0;try{O.grow(H),se();var Z=1;break e}catch{}Z=void 0}if(Z)return!0}return!1},E:(y,I)=>{var R=0;return Vo().forEach((H,Z)=>{var me=I+R;for(Z=Y[y+4*Z>>2]=me,me=0;me<H.length;++me)Q[Z++]=H.charCodeAt(me);Q[Z]=0,R+=H.length+1}),0},F:(y,I)=>{var R=Vo();Y[y>>2]=R.length;var H=0;return R.forEach(Z=>H+=Z.length+1),Y[I>>2]=H,0},e:function(y){try{var I=pa(y);return On(I),0}catch(R){if(typeof ra>"u"||R.name!=="ErrnoError")throw R;return R.Pa}},p:function(y,I){try{var R=pa(y);return Q[I]=R.tty?2:Ht(R.mode)?3:(R.mode&61440)===40960?7:4,te[I+2>>1]=0,J[I+8>>3]=BigInt(0),J[I+16>>3]=BigInt(0),0}catch(H){if(typeof ra>"u"||H.name!=="ErrnoError")throw H;return H.Pa}},w:function(y,I,R,H){try{e:{var Z=pa(y);y=I;for(var me,ve=I=0;ve<R;ve++){var qe=Y[y>>2],Ct=Y[y+4>>2];y+=8;var yt=Ps(Z,Q,qe,Ct,me);if(0>yt){var Aa=-1;break e}if(I+=yt,yt<Ct)break;typeof me<"u"&&(me+=yt)}Aa=I}return Y[H>>2]=Aa,0}catch(Za){if(typeof ra>"u"||Za.name!=="ErrnoError")throw Za;return Za.Pa}},D:function(y,I,R,H){I=-9007199254740992>I||9007199254740992<I?NaN:Number(I);try{if(isNaN(I))return 61;var Z=pa(y);return zi(Z,I,R),J[H>>3]=BigInt(Z.position),Z.ob&&I===0&&R===0&&(Z.ob=null),0}catch(me){if(typeof ra>"u"||me.name!=="ErrnoError")throw me;return me.Pa}},I:function(y){var R;try{var I=pa(y);return(R=I.Ma)!=null&&R.fsync?I.Ma.fsync(I):0}catch(H){if(typeof ra>"u"||H.name!=="ErrnoError")throw H;return H.Pa}},t:function(y,I,R,H){try{e:{var Z=pa(y);y=I;for(var me,ve=I=0;ve<R;ve++){var qe=Y[y>>2],Ct=Y[y+4>>2];y+=8;var yt=Rd(Z,Q,qe,Ct,me);if(0>yt){var Aa=-1;break e}if(I+=yt,yt<Ct)break;typeof me<"u"&&(me+=yt)}Aa=I}return Y[H>>2]=Aa,0}catch(Za){if(typeof ra>"u"||Za.name!=="ErrnoError")throw Za;return Za.Pa}},k:js},Ze;(async function(){var R;function y(H){var Z;return Ze=H.exports,O=Ze.M,se(),Tn=Ze.O,j--,(Z=g.monitorRunDependencies)==null||Z.call(g,j),j==0&&W&&(H=W,W=null,H()),Ze}j++,(R=g.monitorRunDependencies)==null||R.call(g,j);var I={a:Ir};return g.instantiateWasm?new Promise(H=>{g.instantiateWasm(I,(Z,me)=>{y(Z),H(Z.exports)})}):(ne??(ne=g.locateFile?g.locateFile("sql-wasm.wasm",k):k+"sql-wasm.wasm"),y((await Ee(I)).instance))})(),g._sqlite3_free=y=>(g._sqlite3_free=Ze.P)(y),g._sqlite3_value_text=y=>(g._sqlite3_value_text=Ze.Q)(y),g._sqlite3_prepare_v2=(y,I,R,H,Z)=>(g._sqlite3_prepare_v2=Ze.R)(y,I,R,H,Z),g._sqlite3_step=y=>(g._sqlite3_step=Ze.S)(y),g._sqlite3_reset=y=>(g._sqlite3_reset=Ze.T)(y),g._sqlite3_exec=(y,I,R,H,Z)=>(g._sqlite3_exec=Ze.U)(y,I,R,H,Z),g._sqlite3_finalize=y=>(g._sqlite3_finalize=Ze.V)(y),g._sqlite3_column_name=(y,I)=>(g._sqlite3_column_name=Ze.W)(y,I),g._sqlite3_column_text=(y,I)=>(g._sqlite3_column_text=Ze.X)(y,I),g._sqlite3_column_type=(y,I)=>(g._sqlite3_column_type=Ze.Y)(y,I),g._sqlite3_errmsg=y=>(g._sqlite3_errmsg=Ze.Z)(y),g._sqlite3_clear_bindings=y=>(g._sqlite3_clear_bindings=Ze._)(y),g._sqlite3_value_blob=y=>(g._sqlite3_value_blob=Ze.$)(y),g._sqlite3_value_bytes=y=>(g._sqlite3_value_bytes=Ze.aa)(y),g._sqlite3_value_double=y=>(g._sqlite3_value_double=Ze.ba)(y),g._sqlite3_value_int=y=>(g._sqlite3_value_int=Ze.ca)(y),g._sqlite3_value_type=y=>(g._sqlite3_value_type=Ze.da)(y),g._sqlite3_result_blob=(y,I,R,H)=>(g._sqlite3_result_blob=Ze.ea)(y,I,R,H),g._sqlite3_result_double=(y,I)=>(g._sqlite3_result_double=Ze.fa)(y,I),g._sqlite3_result_error=(y,I,R)=>(g._sqlite3_result_error=Ze.ga)(y,I,R),g._sqlite3_result_int=(y,I)=>(g._sqlite3_result_int=Ze.ha)(y,I),g._sqlite3_result_int64=(y,I)=>(g._sqlite3_result_int64=Ze.ia)(y,I),g._sqlite3_result_null=y=>(g._sqlite3_result_null=Ze.ja)(y),g._sqlite3_result_text=(y,I,R,H)=>(g._sqlite3_result_text=Ze.ka)(y,I,R,H),g._sqlite3_aggregate_context=(y,I)=>(g._sqlite3_aggregate_context=Ze.la)(y,I),g._sqlite3_column_count=y=>(g._sqlite3_column_count=Ze.ma)(y),g._sqlite3_data_count=y=>(g._sqlite3_data_count=Ze.na)(y),g._sqlite3_column_blob=(y,I)=>(g._sqlite3_column_blob=Ze.oa)(y,I),g._sqlite3_column_bytes=(y,I)=>(g._sqlite3_column_bytes=Ze.pa)(y,I),g._sqlite3_column_double=(y,I)=>(g._sqlite3_column_double=Ze.qa)(y,I),g._sqlite3_bind_blob=(y,I,R,H,Z)=>(g._sqlite3_bind_blob=Ze.ra)(y,I,R,H,Z),g._sqlite3_bind_double=(y,I,R)=>(g._sqlite3_bind_double=Ze.sa)(y,I,R),g._sqlite3_bind_int=(y,I,R)=>(g._sqlite3_bind_int=Ze.ta)(y,I,R),g._sqlite3_bind_text=(y,I,R,H,Z)=>(g._sqlite3_bind_text=Ze.ua)(y,I,R,H,Z),g._sqlite3_bind_parameter_index=(y,I)=>(g._sqlite3_bind_parameter_index=Ze.va)(y,I),g._sqlite3_sql=y=>(g._sqlite3_sql=Ze.wa)(y),g._sqlite3_normalized_sql=y=>(g._sqlite3_normalized_sql=Ze.xa)(y),g._sqlite3_changes=y=>(g._sqlite3_changes=Ze.ya)(y),g._sqlite3_close_v2=y=>(g._sqlite3_close_v2=Ze.za)(y),g._sqlite3_create_function_v2=(y,I,R,H,Z,me,ve,qe,Ct)=>(g._sqlite3_create_function_v2=Ze.Aa)(y,I,R,H,Z,me,ve,qe,Ct),g._sqlite3_update_hook=(y,I,R)=>(g._sqlite3_update_hook=Ze.Ba)(y,I,R),g._sqlite3_open=(y,I)=>(g._sqlite3_open=Ze.Ca)(y,I);var Vs=g._malloc=y=>(Vs=g._malloc=Ze.Da)(y),Cr=g._free=y=>(Cr=g._free=Ze.Ea)(y);g._RegisterExtensionFunctions=y=>(g._RegisterExtensionFunctions=Ze.Fa)(y);var Ko=(y,I)=>(Ko=Ze.Ga)(y,I),Sr=(y,I)=>(Sr=Ze.Ha)(y,I),vn=y=>(vn=Ze.Ia)(y),ai=y=>(ai=Ze.Ja)(y),fi=()=>(fi=Ze.Ka)();g.stackSave=()=>fi(),g.stackRestore=y=>vn(y),g.stackAlloc=y=>ai(y),g.cwrap=(y,I,R,H)=>{var Z=!R||R.every(me=>me==="number"||me==="boolean");return I!=="string"&&Z&&!H?g["_"+y]:(...me)=>Md(y,I,R,me)},g.addFunction=qi,g.removeFunction=ti,g.UTF8ToString=Fe,g.ALLOC_NORMAL=ls,g.allocate=wr,g.allocateUTF8OnStack=zo;function ni(){function y(){var Z;if(g.calledRun=!0,!_){if(!g.noFSInit&&!Sa){var I,R;Sa=!0,H??(H=g.stdin),I??(I=g.stdout),R??(R=g.stderr),H?Ra("stdin",H):rt("/dev/tty","/dev/stdin"),I?Ra("stdout",null,I):rt("/dev/tty","/dev/stdout"),R?Ra("stderr",null,R):rt("/dev/tty1","/dev/stderr"),ca("/dev/stdin",0),ca("/dev/stdout",1),ca("/dev/stderr",1)}if(Ze.N(),Yt=!1,(Z=g.onRuntimeInitialized)==null||Z.call(g),g.postRun)for(typeof g.postRun=="function"&&(g.postRun=[g.postRun]);g.postRun.length;){var H=g.postRun.shift();Pe.unshift(H)}Ce(Pe)}}if(0<j)W=ni;else{if(g.preRun)for(typeof g.preRun=="function"&&(g.preRun=[g.preRun]);g.preRun.length;)bt();Ce(Ve),0<j?W=ni:g.setStatus?(g.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>g.setStatus(""),1),y()},1)):y()}}if(g.preInit)for(typeof g.preInit=="function"&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.pop()();return ni(),m}),n)};t.exports=r,t.exports.default=r}(Ih)),Ih.exports}var AU=pU();const yU=ss(AU);var kE=`
\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;
`,xE={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;`},Ga=[{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"}],Uf=class{getCreateVaultSql(){try{return{success:!0,sqlCommands:[kE],version:Ga[Ga.length-1].version,migrationNumber:Ga[Ga.length-1].revision}}catch(t){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:t instanceof Error?t.message:"Unknown error creating vault SQL"}}}getUpgradeVaultSql(t,e){try{const n=e??Ga[Ga.length-1].revision,r=Ga.find(c=>c.revision===n);if(!r)return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:`Target migration number ${n} not found`};if(t>=n)return{success:!0,sqlCommands:[],version:r.version,migrationNumber:n};const s=Ga.filter(c=>c.revision>t&&c.revision<=n),l=[];for(const c of s){const m=c.revision-1,h=xE[m];h&&l.push(h)}return{success:!0,sqlCommands:l,version:r.version,migrationNumber:n}}catch(n){return{success:!1,sqlCommands:[],version:"0.0.0",migrationNumber:0,error:n instanceof Error?n.message:"Unknown error generating upgrade SQL"}}}getUpgradeToLatestSql(t){return this.getUpgradeVaultSql(t)}getUpgradeToVersionSql(t,e){const n=Ga.find(r=>r.version===e);return n?this.getUpgradeVaultSql(t,n.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(t,e,n){let r="0.0.0",s=0;t&&(e?r=e:(r="1.0.0",s=1),n&&(s=parseInt(n,10)));const l=Ga[Ga.length-1],c=s<l.revision,m=Ga.filter(h=>h.revision>s);return{currentVersion:r,currentMigrationNumber:s,targetVersion:l.version,targetMigrationNumber:l.revision,needsUpgrade:c,availableUpgrades:m}}validateVaultStructure(t){const e=["Aliases","Services","Credentials","Passwords","Attachments","EncryptionKeys","Settings","TotpCodes"];return t.filter(r=>e.includes(r)).length>=5}getAllVersions(){return[...Ga]}getLatestVersion(){return Ga[Ga.length-1]}getMigrationSql(t){return xE[t]}getCompleteSchemaSql(){return kE}};function LE(t){const n=/^(\d+)\.(\d+)\.(\d+)$/.exec(t);return n?{major:parseInt(n[1],10),minor:parseInt(n[2],10),patch:parseInt(n[3],10)}:null}function EU(t,e){const n=LE(t);if(!n)return{isCompatible:!1,databaseVersion:t,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const r=Ga.find(g=>g.version===t);if(r)return{isCompatible:!0,databaseVersion:t,clientVersion:r,isKnownVersion:!0,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const s=e?Ga.find(g=>g.version===e)??DE():DE(),l=LE(s.version);if(!l)return{isCompatible:!1,databaseVersion:t,isKnownVersion:!1,isMajorVersionDifference:!1,isMinorVersionDifference:!1};const c=n.major!==l.major,m=!c&&(n.minor!==l.minor||n.patch!==l.patch);return{isCompatible:!c,databaseVersion:t,clientVersion:s,isKnownVersion:!1,isMajorVersionDifference:c,isMinorVersionDifference:m}}function DE(){return Ga[Ga.length-1]}function bU(t){const n=/_(\d+\.\d+\.\d+)-/.exec(t);return(n==null?void 0:n[1])??null}class fd extends Error{constructor(e){super(e),this.name="VaultVersionIncompatibleError",Object.setPrototypeOf(this,fd.prototype)}}const yw={loginTitle:"Log på AliasVault",username:"Brugernavn eller e-mail",usernamePlaceholder:"navn / navn@firma.dk",passwordPlaceholder:"Indtast din adgangskode",rememberMe:"Husk mig",loginButton:"Log på",noAccount:"Endnu ingen konto?",createVault:"Opret ny boks",twoFactorTitle:"Indtast autentificeringskoden fra din autentificeringsapp.",authCode:"Bekræftelseskode",authCodePlaceholder:"Indtast 6-cifret kode",verify:"Bekræft",twoFactorNote:"Bemærk: Hvis du ikke har adgang til din autentificeringsenhed, kan du nulstille din 2FA med en gendannelseskode ved at logge på via hjemmesiden.",masterPassword:"Hovedadgangskode",unlockVault:"Oplås",unlockWithPin:"Oplås med PIN-kode",enterPinToUnlock:"Indtast din pinkode for at låse op for din boks",useMasterPassword:"Anvend Hovedadgangskode",unlockTitle:"Lås Din Boks op",logoutConfirm:"Er du sikker på, at du vil logge ud?",unlockSuccessTitle:"Din boks er oplåst",unlockSuccessDescription:"Du kan nu bruge autofyld i login-formularer i din browser.",closePopup:"Luk denne popup",browseVault:"Gennemse boksens indhold",autoCloseUnlockPopup:"Luk automatisk ved fremtidige log in",closingIn:"Lukker om {{seconds}}...",connectingTo:"Forbinder til",switchAccounts:"Skift konto?",loginWithMobile:"Log ind via mobilapp",unlockWithMobile:"Lås op ved hjælp af Mobil App",scanQrCode:"Skan denne QR-kode med din AliasVault-mobilapp for at logge ind og låse din boks op."},Ew={vault:"Boks",emails:"E-mails"},bw={loading:"Indlæser...",notice:"Besked",error:"Fejl",cancel:"Annuller",confirm:"Bekræft",remove:"Fjern",back:"Tilbage",next:"Næste",use:"Brug",add:"Tilføj",delete:"Slet",undo:"Fortryd",save:"Gem",saving:"Gemmer...",edit:"Rediger",create:"Opret",or:"Eller",close:"Luk",dismiss:"Afvis",logout:"Log ud",copied:"Kopieret!",openInNewWindow:"Åbn i nyt vindue",enabled:"Aktiveret",disabled:"Deaktiveret",showPassword:"Vis adgangskode",hidePassword:"Skjul adgangskode",show:"Vis",hide:"Skjul",showDetails:"Vis detaljer",hideDetails:"Skjul detaljer",copyToClipboard:"Kopier til udklipsholder",loadingEmails:"Indlæser e-mails...",loadingTotpCodes:"Indlæser TOTP-koder...",attachments:"Vedhæftede filer",loadingAttachments:"Indlæser vedhæftede filer...",settings:"Indstillinger",recentEmails:"Seneste e-mails",credentials:"Logonoplysninger",customFields:"Brugerdefinerede felter",twoFactorAuthentication:"To-faktor autentificering",alias:"Alias",notes:"Noter",email:"E-mail",username:"Brugernavn",password:"Adgangskode",generate:"Generer",serviceName:"Tjenestenavn",loggedIn:"Logget ind",syncingVault:"Synkroniserer boks",checkingVaultUpdates:"Tjekker for opdateringer til boks",syncingUpdatedVault:"Synkroniserer opdateret boks",loadMore:"Indlæs flere",offline:"Offline",offlineMode:"Arbejder i offline-tilstand",pendingSync:"Synkroniserer...",mergingVaultChanges:"Fletter ændringer i boks...",uploadingVault:"Uploader boks...",errors:{serverNotAvailable:"AliasVault-serveren er ikke tilgængelig. Prøv venligst igen senere eller kontakt support, hvis problemet fortsætter.",clientVersionNotSupported:"Denne version af AliasVault-browserudvidelsen understøttes ikke længere af serveren. Opdater venligst din browserudvidelse til den nyeste version.",browserExtensionOutdated:"Denne browserudvidelse er forældet og kan ikke bruges til at få adgang til denne boks. Opdater venligst browserudvidelsen for at fortsætte.",serverVersionNotSupported:"AliasVault-serveren skal opdateres til en nyere version for at kunne bruge denne browserudvidelse. Kontakt venligst support, hvis du har brug for hjælp.",serverVersionTooOld:"AliasVault-serveren skal opdateres til en nyere version for at bruge denne funktion. Kontakt venligst serveradministratoren, hvis du har brug for hjælp.",unknownError:"Der opstod en ukendt fejl",unknownErrorTryAgain:"Der opstod en ukendt fejl. Prøv venligst igen.",vaultNotAvailable:"Boksen er ikke tilgængelig",vaultIsLocked:"Boksen er låst",passwordChanged:"Din adgangskode er blevet ændret siden sidste logon. Log venligst ind igen af sikkerhedsmæssige årsager.",syncConflictMaxRetries:"Kunne ikke synkronisere boksen efter flere forsøg. Prøv venligst igen senere.",mergeFailed:"Kunne ikke flette ændringer i boks. Prøv venligst igen.",invalidCode:"Indtast venligst en gyldig 6-cifret autentificeringskode.",serverError:"Kunne ikke få forbindelse til AliasVault-serveren. Prøv venligst igen senere eller kontakt support, hvis problemet fortsætter.",wrongPassword:"Forkert adgangskode. Prøv venligst igen.",sessionExpired:"Din session er udløbet. Log venligst ind igen.",mobileLoginRequestExpired:"Anmodning om mobil-logon udløb. Genindlæs siden og prøv igen."},apiErrors:{UNKNOWN_ERROR:"Der opstod en ukendt fejl. Prøv venligst igen.",ACCOUNT_LOCKED:"Kontoen er midlertidigt låst på grund af for mange mislykkede forsøg. Prøv venligst igen senere.",ACCOUNT_BLOCKED:"Din konto er blevet deaktiveret. Hvis du mener, at dette er en fejl, bedes du kontakte support.",USER_NOT_FOUND:"Ugyldigt brugernavn eller adgangskode. Prøv venligst igen.",INVALID_AUTHENTICATOR_CODE:"Ugyldig autentificeringskode. Prøv venligst igen.",INVALID_RECOVERY_CODE:"Ugyldig gendannelseskode. Prøv venligst igen.",REFRESH_TOKEN_REQUIRED:"Refresh-token er påkrævet.",INVALID_REFRESH_TOKEN:"Ugyldigt refresh-token.",PUBLIC_REGISTRATION_DISABLED:"Oprettelse af nye konti er i øjeblikket deaktiveret på denne server. Kontakt venligst administratoren.",USERNAME_REQUIRED:"Brugernavn er påkrævet.",USERNAME_ALREADY_IN_USE:"Brugernavnet er allerede i brug.",USERNAME_AVAILABLE:"Brugernavnet er ledigt.",USERNAME_MISMATCH:"Brugernavnet matcher ikke den nuværende bruger.",PASSWORD_MISMATCH:"Den angivne adgangskode matcher ikke din nuværende adgangskode.",ACCOUNT_SUCCESSFULLY_DELETED:"Kontoen blev slettet korrekt.",USERNAME_EMPTY_OR_WHITESPACE:"Brugernavn må ikke være tomt eller kun indeholde mellemrum.",USERNAME_TOO_SHORT:"Brugernavnet er for kort: skal være mindst 3 tegn langt.",USERNAME_TOO_LONG:"Brugernavnet er for langt: må ikke være længere end 40 tegn.",USERNAME_INVALID_EMAIL:"Ugyldig e-mailadresse.",USERNAME_INVALID_CHARACTERS:"Brugernavnet er ugyldigt; kan kun indeholde bogstaver eller tal.",VAULT_NOT_UP_TO_DATE:"Din boks er ikke opdateret. Synkroniser venligst din boks og prøv igen.",INTERNAL_SERVER_ERROR:"Intern serverfejl.",VAULT_ERROR:"Den lokale boks er ikke opdateret. Synkroniser venligst din boks ved at genindlæse siden og prøv igen."}},vw={or:"eller",new:"Ny",vaultLocked:"AliasVault er låst.",creatingNewAlias:"Opretter nyt alias...",noMatchesFound:"Ingen match fundet",searchVault:"Søg i boks...",enterServiceName:"Indtast tjenestenavn",enterEmailAddress:"Indtast e-mailadresse",enterUsername:"Indtast brugernavn",hideFor1Hour:"Skjul i 1 time (nuværende side)",hidePermanently:"Skjul permanent (nuværende side)",createRandomAlias:"Opret tilfældigt alias",createUsernamePassword:"Opret brugernavn/adgangskode",randomAlias:"Tilfældigt alias",usernamePassword:"Brugernavn/adgangskode",createAndSaveAlias:"Opret og gem alias",createAndSaveCredential:"Opret og gem logonoplysning",randomIdentityDescription:"Generer en tilfældig identitet med en tilfældig e-mailadresse, der er tilgængelig i AliasVault.",randomIdentityDescriptionDropdown:"Tilfældig identitet med tilfældig e-mail",manualCredentialDescription:"Angiv din egen e-mailadresse og brugernavn.",manualCredentialDescriptionDropdown:"Manuelt brugernavn og adgangskode",failedToCreateIdentity:"Kunne ikke oprette identitet. Prøv venligst igen.",enterEmailAndOrUsername:"Indtast e-mail og/eller brugernavn",autofillWithAliasVault:"Autofyld med AliasVault",generateRandomPassword:"Generer tilfældig adgangskode (kopier til udklipsholder)",generateNewPassword:"Generer ny adgangskode",togglePasswordVisibility:"Vis/skjul adgangskode",passwordCopiedToClipboard:"Adgangskode kopieret til udklipsholder",openAliasVaultToUpgrade:"Åbn AliasVault for at opgradere",vaultUpgradeRequired:"Opgradering af boks påkrævet.",dismissPopup:"Luk popup",noTotpItemsFound:"Ingen 2FA kode match fundet",close:"Luk",savePrompt:{title:"Gem i AliasVault?",neverForThisSite:"Aldrig for dette websted",addUrlTitle:"Tilføj URL til legitimationsoplysninger?",addUrl:"Tilføj URL"}},ww={title:"Elementer",itemName:"Navn",loginCredentials:"Logonoplysninger",cardInformation:"Kortoplysninger",addItem:"Tilføj element",addNewItem:"Tilføj nyt element",saveItem:"Gem element",itemDetails:"Elementdetaljer",editItem:"Rediger element",untitled:"Uden titel",newFolder:"Ny mappe",createFolder:"Opret mappe",editFolder:"Rediger mappe",folderName:"Mappenavn",folderNameRequired:"Mappenavn er påkrævet",folder:"Mappe",welcomeTitle:"Velkommen til AliasVault!",welcomeDescription:"For at bruge AliasVault-browserudvidelsen: Gå til et websted og brug AliasVault-autofyld-popup'en til at oprette en ny logonoplysning.",noPasskeysFound:"Der er endnu ikke oprettet nogen passkeys. Passkeys oprettes ved at besøge et websted, der tilbyder passkeys som autentificeringsmetode.",noMatchingItems:"Ingen elementer matcher det valgte filter.",noMatchingItemsSearch:'Ingen elementer matcher "{{search}}"',noMatchingItemsWithFilter:'Ingen {{filter}}-elementer matcher "{{search}}"',clearSearch:"Ryd søgning",clearFilter:"Ryd filter",emptyFolderHint:"Denne mappe er tom. For at flytte elementer til denne mappe, skal du redigere elementet og trykke på mappe-ikonet i navnefeltet.",allItemsInFolders:"Alle dine elementer er organiseret i mapper. Klik på en mappe ovenfor for at se dine oplysninger, eller brug søgefunktionen til at finde specifikke elementer.",deleteFolder:"Slet mappe",deleteFolderKeepItems:"Slet kun mappe",deleteFolderKeepItemsDescription:"Elementer flyttes tilbage til hovedlisten.",deleteFolderAndItems:"Slet mappe og alle elementer",deleteFolderAndItemsDescription:"{{count}} element(er) vil blive flyttet til Senest Slettede.",filters:{folders:"Mapper",passkeys:"Passkeys",totp:"2FA Koder"},sort:{title:"Sorter efter",oldestFirst:"Ældste først",newestFirst:"Nyeste først",alphabetical:"Alfabetisk (A-Å)"},deleteItemTitle:"Slet element",deleteItemConfirm:"Er du sikker på, at du vil slette dette element?",viewHistory:"Vis historik",history:"Historik",noHistoryAvailable:"Ingen historik tilgængelig",tags:"Tags",changePasswordComplexity:"Skift adgangskodens kompleksitet",passwordLength:"Adgangskodens længde",includeLowercase:"Inkluder små bogstaver",includeUppercase:"Inkluder store bogstaver",includeNumbers:"Inkluder tal",includeSpecialChars:"Inkluder specialtegn",avoidAmbiguousChars:"Undgå tvetydige tegn (o, 0 osv.)",privateEmailTitle:"Privat e-mail",privateEmailAliasVaultServer:"AliasVault-server",privateEmailDescription:"E2E-krypteret, fuldt privat.",publicEmailTitle:"Offentlige midlertidige e-mailudbydere",publicEmailDescription:"Anonym men begrænset privatliv. E-mailindhold kan læses af alle, der kender adressen.",validation:{required:"Dette felt er påkrævet"}},Iw={selectType:"Tilføj nyt element",typeLabel:"Elementtype",creating:"Opretter",editing:"Redigerer",regenerateAlias:"Gengenerer alias",addCustomField:"Tilføj brugerdefineret felt",fieldLabel:"Feltnavn",enterFieldName:"Indtast feltnavn",fieldType:"Felttype",fieldTypes:{text:"Tekst",hidden:"Skjult (maskeret tekst)",email:"E-mail",url:"URL",phone:"Telefon",number:"Nummer",date:"Dato",textArea:"Tekstområde"},login:{title:"Log på"},alias:{title:"Alias"},creditCard:{title:"Betalingskort"},note:{title:"Sikker note"}},Cw={"login.url":"Websteds-URL","login.username":"Brugernavn","login.password":"Adgangskode","alias.first_name":"Fornavn","alias.last_name":"Efternavn","alias.gender":"Køn","alias.birthdate":"Fødselsdato","login.email":"E-mail","notes.content":"Noter","card.cardholder_name":"Kortholders navn","card.number":"Kortnummer","card.expiry_month":"Udløbsmåned","card.expiry_year":"Udløbsår","card.cvv":"CVV","card.pin":"PIN-kode"},Sw={addCode:"Tilføj 2FA-kode",instructions:"Indtast den hemmelige nøgle (secret key), der vises af webstedet, hvor du vil tilføje to-faktor autentificering.",nameOptional:"Navn (valgfrit)",secretKey:"Hemmelig nøgle",saveToViewCode:"Gem for at se kode",defaultName:"Godkender",deleteTotpCodeTitle:"Slet 2FA Kode",deleteTotpCodeConfirmation:'Er du sikker på, at du vil slette 2FA koden "{{name}}"?',errors:{invalidSecretKey:"Ugyldigt format for hemmelig nøgle."}},Nw={uploading:"Uploader...",uploadSuccess:"Filer blev uploadet korrekt.",deleteSuccess:"Vedhæftet fil slettet korrekt.",firefoxExpandRequired:"Brug det udvidede vindue for at uploade filer.",openExpandedWindow:"Åbn udvidet vindue"},Tw={title:"E-mails",deleteEmailTitle:"Slet e-mail",deleteEmailConfirm:"Er du sikker på, at du vil slette denne e-mail permanent?",from:"Fra",to:"Til",date:"Dato",emailContent:"E-mailindhold",emailNotFound:"E-mail blev ikke fundet",noEmails:"Ingen e-mails fundet",noEmailsDescription:"Du har endnu ikke modtaget nogen e-mails på dine private e-mailadresser. Når du modtager en ny e-mail, vil den blive vist her.",offlineMessage:"Du er offline. Opret venligst forbindelse til internettet for at indlæse dine e-mails.",dateFormat:{justNow:"lige nu",minutesAgo_single:"{{count}} min siden",minutesAgo_plural:"{{count}} min siden",hoursAgo_single:"{{count}} time siden",hoursAgo_plural:"{{count}} timer siden",yesterday:"i går"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Den valgte e-mailadresse er allerede i brug. Skift venligst e-mailadressen ved at redigere denne logonoplysning.",CLAIM_DOES_NOT_EXIST:"Der opstod en fejl under indlæsning af e-mails. Prøv venligst at redigere og gemme logonoplysningen for at synkronisere databasen, og prøv derefter igen."}},kw={serverUrl:"Server-URL",language:"Sprog",autofillEnabled:"Aktiver autofyld",version:"Version",openWebApp:"Åbn web-app",lock:"Lås",globalSettings:"Globale indstillinger",autofillPopup:"Autofyld-popup",activeOnAllSites:"Aktiv på alle websteder (medmindre deaktiveret nedenfor)",disabledOnAllSites:"Deaktiveret på alle websteder",rightClickContextMenu:"Højreklik-kontekstmenu",autofillMatching:"Autofyld-matching",autofillMatchingMode:"Matching-tilstand for autofyld",autofillMatchingModeDescription:"Bestemmer hvilke logonoplysninger der anses for at være et match og vises som forslag i autofyld-popup'en for et givet websted.",autofillMatchingDefault:"URL + underdomæne + navn wildcard",autofillMatchingUrlSubdomain:"URL + underdomæne",autofillMatchingUrlExact:"Kun eksakt URL-domæne",siteSpecificSettings:"Webstedsspecifikke indstillinger",autofillPopupOn:"Autofyld-popup på: ",enabledForThisSite:"Aktiveret for dette websted",disabledForThisSite:"Deaktiveret for dette websted",temporarilyDisabledUntil:"Midlertidigt deaktiveret indtil ",resetAllSiteSettings:"Nulstil alle webstedsspecifikke indstillinger",autofillPopupDescription:"Vis popup for autofyld når login-felter detekteres.",disabledSites:"Deaktiverede websteder",disabledSitesDescription:"Websteder hvor popup-vinduet for autofyld ikke vises.",clearAllDisabledSites:"Ryd alle deaktiverede websteder",temporaryUntil:"indtil",appearance:"Udseende",theme:"Tema",useDefault:"Brug standard",light:"Lys",dark:"Mørk",keyboardShortcuts:"Tastaturgenveje",configureKeyboardShortcuts:"Konfigurer tastaturgenveje",configure:"Konfigurer",clipboardClearTimeout:"Ryd udklipsholder efter kopiering",clipboardClearTimeoutDescription:"Ryd automatisk udklipsholderen efter kopiering af følsomme data",clipboardClearDisabled:"Ryd aldrig",clipboardClear5Seconds:"Ryd efter 5 sekunder",clipboardClear10Seconds:"Ryd efter 10 sekunder",clipboardClear15Seconds:"Ryd efter 15 sekunder",autoLockTimeout:"Auto-lås timeout",autoLockTimeoutDescription:"Lås automatisk boksen efter en periode med inaktivitet",autoLockTimeoutHelp:"Boksen vil kun låse efter den angivne periode med inaktivitet (ingen brug af autofyld eller åbning af udvidelsen). Boksen vil altid låse, når browseren lukkes, uanset denne indstilling.",autoLockNever:"Aldrig",autoLock15Seconds:"15 sekunder",autoLock1Minute:"1 minut",autoLock5Minutes:"5 minutter",autoLock15Minutes:"15 minutter",autoLock30Minutes:"30 minutter",autoLock1Hour:"1 time",autoLock4Hours:"4 timer",autoLock8Hours:"8 timer",autoLock24Hours:"24 timer",versionPrefix:"Version ",autofillSettings:"Indstillinger for autofyld",clipboardSettings:"Indstillinger for udklipsholder",contextMenuSettings:"Indstillinger for kontekstmenu",passkeySettings:"Indstillinger for passkey",contextMenu:"Kontekstmenu",contextMenuEnabled:"Kontekstmenu er aktiveret",contextMenuDisabled:"Kontekstmenu er deaktiveret",contextMenuDescription:"Højreklik på inputfelter for at få adgang til AliasVault-funktioner",selectLanguage:"Vælg sprog",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"Konfigurer AliasVault server-URL for selv-hostede instanser",customApiUrl:"API-URL",customClientUrl:"Klient-URL",apiUrlHint:"URL til API-endpoint (normalt klient-URL + /api)",clientUrlHint:"Web-interfacets URL for din selv-hostede instans",autofillSettingsDescription:"Aktiver eller deaktiver autofyld-popup på websider",autofillEnabledDescription:"Autofyld-forslag vil blive vist i login-formularer",autofillDisabledDescription:"Autofyld-forslag er deaktiveret globalt",languageSettings:"Sprog",validation:{apiUrlRequired:"API-URL er påkrævet",apiUrlInvalid:"Indtast venligst en gyldig API-URL",clientUrlRequired:"Klient-URL er påkrævet",clientUrlInvalid:"Indtast venligst en gyldig klient-URL"},identityGenerator:"Identitetsgenerator",identityGeneratorSettings:{description:"Konfigurer standardsprog og kønspræference for generering af nye identiteter.",languageSection:"Sprog",languageDescription:"Indstil det sprog, der skal bruges ved generering af nye identiteter.",genderSection:"Køn",genderDescription:"Indstil kønspræference for generering af nye identiteter.",ageRangeSection:"Aldersgruppe",ageRangeDescription:"Indstil aldersgruppen for generering af nye identiteter.",genderOptions:{random:"Tilfældig",male:"Mand",female:"Kvinde"}},loginSave:{title:"Gem Login-prompt",description:"Vis en prompt for at gemme loginoplysninger, når du indsender en login-formular på et websted.",blockedSites:"Blokerede websteder",blockedSitesDescription:"Websteder, hvor den gemte prompt aldrig vises.",clearAllBlockedSites:"Slet alle blokerede websteder"},unlockMethod:{title:"Oplåsningsmetode for boks",introText:"Vælg hvordan du vil låse din boks op. Du kan bruge din hovedadgangskode (altid tilgængelig) eller opsætte en PIN-kode for hurtigere adgang. Efter 3 mislykkede PIN-forsøg skal du bruge din hovedadgangskode.",password:"Hovedadgangskode",pin:"PIN-kode",pinDescription:"Lås boks op med PIN-kode",setupPin:"Opsæt PIN-kode",enterNewPinDescription:"Indtast en PIN-kode på mindst 6 cifre",confirmPin:"Bekræft PIN-kode",confirmPinDescription:"Indtast din PIN-kode igen for at bekræfte",invalidPinFormat:"Ugyldigt PIN-format",pinMismatch:"PIN-koderne matcher ikke",incorrectPin:"Forkert PIN-kode. {{attemptsRemaining}} forsøg tilbage.",incorrectPinSingular:"Forkert PIN-kode. 1 forsøg tilbage.",enableSuccess:"PIN-oplåsning blev aktiveret korrekt!",pinLocked:"PIN-oplåsning er blevet deaktiveret. Brug venligst din hovedadgangskode til at låse din boks op.",pinSecurityWarning:"PIN-oplåsning i browserudvidelsen kan være mindre sikker end din hovedadgangskode, da PIN-koder typisk har lavere entropi og kan brute-forces, hvis din enhed er kompromitteret. Brug det kun på enheder, du stoler fuldt på."}},xw={passkey:"Passkey",site:"Websted",helpText:"Passkeys oprettes på webstedet, når du bliver bedt om det. De kan ikke redigeres manuelt. For at fjerne denne passkey kan du slette den fra denne logonoplysning. For at erstatte denne passkey eller oprette en ny, skal du besøge webstedet og følge dets anvisninger.",passkeyMarkedForDeletion:"Passkey markeret til sletning",passkeyWillBeDeleted:"Denne passkey slettes, når du gemmer denne logonoplysning.",useBrowserPasskey:"Brug browser-passkey",bypass:{description:"Hvor længe vil du bruge browserens passkey-udbyder for {{origin}}?",thisTimeOnly:"Kun denne gang",alwaysForSite:"Altid for dette websted"},authenticate:{title:"Log ind med passkey",signInFor:"Log ind med passkey for",selectPasskey:"Vælg en passkey for at logge ind:",noPasskeysFound:"Ingen passkeys fundet for dette websted"},create:{title:"Opret passkey",createFor:"Opret en ny passkey for",titleLabel:"Titel",titlePlaceholder:"Indtast et navn til denne passkey",createButton:"Opret passkey",selectPasskeyToReplace:"Vælg en passkey der skal erstattes:",createNewPasskey:"Opret ny passkey",replacingPasskey:"Erstatter passkey: {{displayName}}",confirmReplace:"Bekræft erstatning",selectExistingLogin:"Tilføj til eksisterende login:",selectExistingLoginDescription:"Forbind denne passkey til en eksisterende logonoplysning for dette websted.",attachingToCredential:"Tilføjer passkey til: {{serviceName}}",attachPasskey:"Tilføj passkey"},settings:{passkeyProvider:"Passkey-udbyder",passkeyProviderOn:"Passkey-udbyder på "}},Lw={title:"Senest slettede",noItems:"Ingen slettede elementer",noItemsDescription:"Elementer du sletter, vil blive vist her i 30 dage, før de fjernes permanent.",description:"Disse elementer slettes permanent efter 30 dage. Du kan gendanne dem eller slette dem med det samme.",restore:"Gendan",deletePermanently:"Slet permanent",emptyAll:"Tøm alle",daysRemaining_one:"{{count}} dag tilbage",daysRemaining_other:"{{count}} dage tilbage",expiringSoon:"Udløber snart",confirmDeleteTitle:"Slet permanent?",confirmDeleteMessage:"Dette element vil blive slettet permanent og kan ikke gendannes.",confirmEmptyAllTitle:"Tøm senest slettede?",confirmEmptyAllMessage:"Alle {{count}} elementer vil blive slettet permanent og kan ikke gendannes."},Dw={title:"Opgrader boks",subtitle:"AliasVault er blevet opdateret, og din boks skal opgraderes. Dette bør kun tage et par sekunder.",versionInformation:"Versionsinformation",yourVault:"Din boks-version:",newVersion:"Ny tilgængelig version:",upgrade:"Opgrader boks",upgrading:"Opgraderer...",whatsNew:"Hvad er nyt",whatsNewDescription:"En opgradering er påkrævet for at understøtte følgende ændringer:",noDescriptionAvailable:"Ingen beskrivelse tilgængelig for denne version.",alerts:{unableToGetVersionInfo:"Kunne ikke hente versionsinformation. Prøv venligst igen.",selfHostedServer:"Selv-hosted server",selfHostedWarning:"Hvis du bruger en selv-hosted server, skal du sørge for også at opdatere din selv-hostede instans, da logon til webklienten ellers vil stoppe med at virke.",continueUpgrade:"Fortsæt opgradering",upgradeFailed:"Opgradering fejlede",failedToApplyMigration:"Kunne ikke anvende migrering ({{current}} af {{total}})"}},Rw={unsyncedChangesTitle:"Ikke-synkroniserede ændringer",unsyncedChangesWarning:"Du har ændringer, der ikke er synkroniseret, som vil gå tabt, hvis du logger ud nu. Er du sikker på, at du vil fortsætte?",logoutAnyway:"Log ud alligevel"},Uw={offline:"Offline",tapToRetry:"Tryk for at prøve synkronisering igen"},Mw={auth:yw,menu:Ew,common:bw,content:vw,items:ww,itemTypes:Iw,fieldLabels:Cw,totp:Sw,attachmentUploader:Nw,emails:Tw,settings:kw,passkeys:xw,recentlyDeleted:Lw,upgrade:Dw,logout:Rw,sync:Uw},vU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:Nw,auth:yw,common:bw,content:vw,default:Mw,emails:Tw,fieldLabels:Cw,itemTypes:Iw,items:ww,logout:Rw,menu:Ew,passkeys:xw,recentlyDeleted:Lw,settings:kw,sync:Uw,totp:Sw,upgrade:Dw},Symbol.toStringTag,{value:"Module"})),Bw={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},_w={vault:"Tresor",emails:"E-Mails"},Fw={loading:"Laden...",notice:"Hinweis",error:"Fehler",cancel:"Abbrechen",confirm:"Bestätigen",remove:"Remove",back:"Zurück",next:"Weiter",use:"Benutzen",add:"Hinzufügen",delete:"Löschen",undo:"Rückgängig machen",save:"Speichern",saving:"Wird gespeichert ...",edit:"Edit",create:"Erstellen",or:"Oder",close:"Schließen",dismiss:"Dismiss",logout:"Abmelden",copied:"Kopiert!",openInNewWindow:"In neuem Fenster öffnen",enabled:"Aktiviert",disabled:"Deaktiviert",showPassword:"Passwort anzeigen",hidePassword:"Passwort verbergen",show:"Show",hide:"Hide",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.",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."},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."}},Ow={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",noTotpItemsFound:"No 2FA code matches found",close:"Schließen",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},Pw={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.",noMatchingItems:"No items match the selected filter.",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:"Nur Ordner löschen",deleteFolderKeepItemsDescription:"Elemente werden zurück zur Hauptliste verschoben.",deleteFolderAndItems:"Ordner und alle Einträge löschen",deleteFolderAndItemsDescription:"{{count}} Elemente(n) werden nach kürzlich gelöschtem Element verschoben.",filters:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},jw={selectType:"Neuen Eintrag hinzufügen",typeLabel:"Item Type",creating:"Wird erstellt",editing:"Bearbeiten",regenerateAlias:"Alias neu generieren",addCustomField:"Benutzerdefiniertes Feld hinzufügen",fieldLabel:"Feldbezeichnung",enterFieldName:"Feldnamen eingeben",fieldType:"Feldtyp",fieldTypes:{text:"Text",hidden:"Versteckt (versteckter 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:"Sichere Notiz"}},Hw={"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"},Vw={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Ungültiges Format des Secret-Key"}},zw={uploading:"Hochladen...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Qw={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."}},Kw={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},Gw={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:"Passkey zu {{serviceName}} hinzufügen",attachPasskey:"Passkey hinzufügen"},settings:{passkeyProvider:"Passkey-Anbieter",passkeyProviderOn:"Passkey-Anbieter an "}},Ww={title:"Kürzlich gelöscht",noItems:"Keine gelöschten Elemente",noItemsDescription:"Elemente, die du löscht, werden hier 30 Tage lang erscheinen, bevor sie endgültig entfernt werden.",description:"Diese Elemente werden nach 30 Tagen dauerhaft gelöscht. Sie können sie wiederherstellen oder sofort löschen.",restore:"Wiederherstellen",deletePermanently:"Dauerhaft löschen",emptyAll:"Alle leeren",daysRemaining_one:"Noch {{count}} Tage",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."},qw={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}})"}},Yw={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"},Jw={offline:"Offline",tapToRetry:"Tap to retry sync"},Xw={auth:Bw,menu:_w,common:Fw,content:Ow,items:Pw,itemTypes:jw,fieldLabels:Hw,totp:Vw,attachmentUploader:zw,emails:Qw,settings:Kw,passkeys:Gw,recentlyDeleted:Ww,upgrade:qw,logout:Yw,sync:Jw},wU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:zw,auth:Bw,common:Fw,content:Ow,default:Xw,emails:Qw,fieldLabels:Hw,itemTypes:jw,items:Pw,logout:Yw,menu:_w,passkeys:Gw,recentlyDeleted:Ww,settings:Kw,sync:Jw,totp:Vw,upgrade:qw},Symbol.toStringTag,{value:"Module"})),$w={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},Zw={vault:"Vault",emails:"Emails"},eI={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",remove:"Remove",back:"Back",next:"Next",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",edit:"Edit",create:"Create",or:"Or",close:"Close",dismiss:"Dismiss",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",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.",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."},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."}},tI={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",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},aI={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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},nI={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"}},iI={"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"},rI={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},sI={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},oI={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."}},lI={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},dI={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 "}},cI={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."},uI={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}})"}},mI={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"},gI={offline:"Offline",tapToRetry:"Tap to retry sync"},hI={auth:$w,menu:Zw,common:eI,content:tI,items:aI,itemTypes:nI,fieldLabels:iI,totp:rI,attachmentUploader:sI,emails:oI,settings:lI,passkeys:dI,recentlyDeleted:cI,upgrade:uI,logout:mI,sync:gI},IU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:sI,auth:$w,common:eI,content:tI,default:hI,emails:oI,fieldLabels:iI,itemTypes:nI,items:aI,logout:mI,menu:Zw,passkeys:dI,recentlyDeleted:cI,settings:lI,sync:gI,totp:rI,upgrade:uI},Symbol.toStringTag,{value:"Module"})),fI={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",autoCloseUnlockPopup:"Auto-cerrar en futuros inicios de sesión",closingIn:"Cerrando en {{seconds}}...",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."},pI={vault:"Bóveda",emails:"Correos electrónicos"},AI={loading:"Cargando...",notice:"Aviso",error:"Error",cancel:"Cancelar",confirm:"Confirmar",remove:"Eliminar",back:"Atrás",next:"Siguiente",use:"Usar",add:"Añadir",delete:"Borrar",undo:"Deshacer",save:"Guardar",saving:"Guardando...",edit:"Edit",create:"Crear",or:"O",close:"Cerrar",dismiss:"Descartar",logout:"Cerrar sesión",copied:"¡Copiado!",openInNewWindow:"Abrir en una ventana nueva",enabled:"Habilitado",disabled:"Desactivado",showPassword:"Mostrar contraseña",hidePassword:"Ocultar contraseña",show:"Mostrar",hide:"Esconder",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.",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."},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."}},yI={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",noTotpItemsFound:"Ningún código 2FA encontrado",close:"Cerrar",savePrompt:{title:"¿Guardar en AliasVault?",neverForThisSite:"Nunca para este sitio",addUrlTitle:"¿Añadir URL a la credencial?",addUrl:"Añadir URL"}},EI={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.",noMatchingItems:"No hay elementos que coincidan con el filtro.",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:{folders:"Carpetas",passkeys:"Llaves de acceso",totp:"Códigos 2FA"},sort:{title:"Ordenar por",oldestFirst:"Más antiguos primero",newestFirst:"Más nuevos primero",alphabetical:"Alfabéticamente (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"}},bI={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"}},vI={"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"},wI={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",deleteTotpCodeTitle:"Eliminar código 2FA",deleteTotpCodeConfirmation:'¿Está seguro que desea eliminar el código 2FA "{{name}}"?',errors:{invalidSecretKey:"Formato de clave secreta inválida."}},II={uploading:"Subiendo...",uploadSuccess:"Archivos subidos con éxito.",deleteSuccess:"Adjunto eliminado correctamente.",firefoxExpandRequired:"Para subir archivos, utilice la ventana ampliada.",openExpandedWindow:"Abrir ventana ampliada"},CI={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."}},SI={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",autofillPopupDescription:"Mostrar el popup de autorrelleno cuando se detectan los campos de inicio de sesión.",disabledSites:"Sitios desactivados",disabledSitesDescription:"Sitios donde el popup de autorrelleno no aparecerá.",clearAllDisabledSites:"Borrar todos los sitios desactivados",temporaryUntil:"hasta",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"}},loginSave:{title:"Guardar registro",description:"Mostrar un mensaje para guardar las credenciales de inicio de sesión cuando envíe un formulario de inicio de sesión en un sitio web.",blockedSites:"Sitios bloqueados",blockedSitesDescription:"Sitios donde el indicador de guardado nunca aparecerá.",clearAllBlockedSites:"Borrar todos los sitios bloqueados"},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."}},NI={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 "}},TI={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."},kI={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}})"}},xI={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"},LI={offline:"Sin conexión",tapToRetry:"Toca para reintentar sincronizar"},DI={auth:fI,menu:pI,common:AI,content:yI,items:EI,itemTypes:bI,fieldLabels:vI,totp:wI,attachmentUploader:II,emails:CI,settings:SI,passkeys:NI,recentlyDeleted:TI,upgrade:kI,logout:xI,sync:LI},CU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:II,auth:fI,common:AI,content:yI,default:DI,emails:CI,fieldLabels:vI,itemTypes:bI,items:EI,logout:xI,menu:pI,passkeys:NI,recentlyDeleted:TI,settings:SI,sync:LI,totp:wI,upgrade:kI},Symbol.toStringTag,{value:"Module"})),RI={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öä",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},UI={vault:"Holvi",emails:"Sähköpostit"},MI={loading:"Ladataan...",notice:"Huomautus",error:"Virhe",cancel:"Peruuta",confirm:"Vahvista",remove:"Remove",back:"Takaisin",next:"Seuraava",use:"Käytä",add:"Lisää",delete:"Poista",undo:"Kumoa",save:"Tallenna",saving:"Saving...",edit:"Muokkaa",create:"Luo",or:"Tai",close:"Sulje",dismiss:"Dismiss",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",show:"Show",hide:"Hide",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.",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."},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."}},BI={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",noTotpItemsFound:"No 2FA code matches found",close:"Sulje",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},_I={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ä.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Sala-avaimet",totp:"2FA Codes"},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"}},FI={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"}},OI={"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"},PI={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Virheellinen salatun avaimen muoto."}},jI={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},HI={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."}},VI={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},zI={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ä "}},QI={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."},KI={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}})"}},GI={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"},WI={offline:"Offline",tapToRetry:"Tap to retry sync"},qI={auth:RI,menu:UI,common:MI,content:BI,items:_I,itemTypes:FI,fieldLabels:OI,totp:PI,attachmentUploader:jI,emails:HI,settings:VI,passkeys:zI,recentlyDeleted:QI,upgrade:KI,logout:GI,sync:WI},SU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:jI,auth:RI,common:MI,content:BI,default:qI,emails:HI,fieldLabels:OI,itemTypes:FI,items:_I,logout:GI,menu:UI,passkeys:zI,recentlyDeleted:QI,settings:VI,sync:WI,totp:PI,upgrade:KI},Symbol.toStringTag,{value:"Module"})),YI={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",autoCloseUnlockPopup:"Fermeture automatique lors des connexions futures",closingIn:"Fermeture dans {{seconds}}s...",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."},JI={vault:"Coffre-fort",emails:"Emails"},XI={loading:"Chargement...",notice:"Notification",error:"Erreur",cancel:"Annuler",confirm:"Confirmer",remove:"Supprimer",back:"Retour",next:"Suivant",use:"Utiliser",add:"Ajouter",delete:"Supprimer",undo:"Annuler",save:"Sauvegarder",saving:"Sauvegarde...",edit:"Editer",create:"Créer",or:"Ou",close:"Fermer",dismiss:"Ignorer",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",show:"Afficher",hide:"Masquer",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.",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."},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."}},$I={or:"ou",new:"Nouveau",vaultLocked:"AliasVault est verrouillé.",creatingNewAlias:"Création de nouveaux alias...",noMatchesFound:"Aucun résultat trouvé",searchVault:"Rechercher élément...",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",noTotpItemsFound:"Aucun code 2FA correspondant",close:"Fermer",savePrompt:{title:"Enregistrer dans AliasVault?",neverForThisSite:"Jamais pour ce site",addUrlTitle:"Ajouter l'URL à l'identifiant?",addUrl:"Ajouter l’URL"}},ZI={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.",noMatchingItems:"Aucun élément ne correspond au filtre sélectionné.",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:{folders:"Dossiers",passkeys:"Clés d'accès",totp:"Codes 2FA"},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"}},eC={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:"Identifiant"},alias:{title:"Alias"},creditCard:{title:"Carte de crédit"},note:{title:"Note sécurisée"}},tC={"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"},aC={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",deleteTotpCodeTitle:"Supprimer le code 2FA",deleteTotpCodeConfirmation:'Êtes-vous sûr de vouloir supprimer le code 2FA "{{name}} " ?',errors:{invalidSecretKey:"Format de clé secrète invalide."}},nC={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"},iC={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."}},rC={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",autofillPopupDescription:"Afficher la fenêtre de saisie automatique lorsque les champs de connexion sont détectés.",disabledSites:"Sites désactivés",disabledSitesDescription:"Les sites où la fenêtre de saisie automatique n'apparaîtra pas.",clearAllDisabledSites:"Effacer tous les sites désactivés",temporaryUntil:"jusqu'au",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"}},loginSave:{title:"Enregistrer l'invite de connexion",description:"Afficher une invite pour enregistrer les identifiants de connexion lorsque vous soumettez un formulaire de connexion sur un site Web.",blockedSites:"Sites bloqués",blockedSitesDescription:"Les sites où l'invite de sauvegarde n'apparaîtra jamais.",clearAllBlockedSites:"Effacer tous les sites bloqués"},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."}},sC={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é "}},oC={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."},lC={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}})"}},dC={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"},cC={offline:"Hors ligne",tapToRetry:"Appuyez pour réessayer"},uC={auth:YI,menu:JI,common:XI,content:$I,items:ZI,itemTypes:eC,fieldLabels:tC,totp:aC,attachmentUploader:nC,emails:iC,settings:rC,passkeys:sC,recentlyDeleted:oC,upgrade:lC,logout:dC,sync:cC},NU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:nC,auth:YI,common:XI,content:$I,default:uC,emails:iC,fieldLabels:tC,itemTypes:eC,items:ZI,logout:dC,menu:JI,passkeys:sC,recentlyDeleted:oC,settings:rC,sync:cC,totp:aC,upgrade:lC},Symbol.toStringTag,{value:"Module"})),mC={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:"עיון בתוכן הכספת",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},gC={vault:"Vault",emails:"הודעות דוא״ל"},hC={loading:"בטעינה…",notice:"לתשומת ליבך",error:"שגיאה",cancel:"ביטול",confirm:"אישור",remove:"Remove",back:"חזרה",next:"הבא",use:"להשתמש",add:"Add",delete:"מחיקה",undo:"הסגה",save:"שמירה",saving:"Saving...",edit:"עריכה",create:"יצירה",or:"או",close:"סגירה",dismiss:"Dismiss",logout:"יציאה",copied:"הועתק!",openInNewWindow:"פתיחה בחלון חדש",enabled:"פעיל",disabled:"כבוי",showPassword:"הצגת סיסמה",hidePassword:"הסתרת סיסמה",show:"Show",hide:"Hide",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.",invalidCode:"נא למלא קוד אימות באורך 6 ספרות.",serverError:"לא ניתן ליצור קשר עם השרת של AliasVault. נא לנסות שוב מאוחר יותר או ליצור קשר עם התמיכה אם הבעיה נשנית.",wrongPassword:"סיסמה שגויה. נא לנסות שוב.",sessionExpired:"תוקף ההפעלה שלך פג. נא להיכנס מחדש.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and 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:"הכספת המקומית אינה עדכנית. נא לסנכרן את הכספת שלך על ידי ריענון העמוד ולנסות שוב."}},fC={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:"התעלמות מחלונית",noTotpItemsFound:"No 2FA code matches found",close:"סגירה",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},pC={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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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:"שדה חובה"}},AC={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"}},yC={"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"},EC={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},bC={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},vC={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:"אירעה שגיאה בניסיון לטעון את הודעות הדוא״ל. נא לנסות לערוך ולשמור את רשומת פרטי הקשר כדי לסנכרן את מסד הנתונים ואז לנסות שוב."}},wC={serverUrl:"כתובת שרת",language:"שפה",autofillEnabled:"הפעלת השלמה אוטומטית",version:"גרסה",openWebApp:"פתיחת אתר",lock:"נעילה",globalSettings:"הגדרות מקיפות",autofillPopup:"חלונית השלמה אוטומטית",activeOnAllSites:"פעיל בכל האתרים (למעט אם נכבה להלן)",disabledOnAllSites:"כבוי בכל האתרים",rightClickContextMenu:"תפריט הקשר בלחיצה ימנית",autofillMatching:"התאמת השלמה אוטומטית",autofillMatchingMode:"מצב התאמת השלמה אוטומטית",autofillMatchingModeDescription:"הגדרה אילו פרטי גישה נחשבים תואמים ויופיעו כהצעות בחלונית ההשלמה האוטומטית לאתר מסוים.",autofillMatchingDefault:"כתובת + שם תת־תחום + תו כל על שם",autofillMatchingUrlSubdomain:"כתובת + שם תת־תחום",autofillMatchingUrlExact:"תחום כתובת מדויקת בלבד",siteSpecificSettings:"הגדרות תואמות אתר",autofillPopupOn:"חלונית השלמה אוטומטית ב־: ",enabledForThisSite:"פעיל לאתר הזה",disabledForThisSite:"כבוי לאתר הזה",temporarilyDisabledUntil:"כבוי זמנית עד ",resetAllSiteSettings:"איפוס כל ההגדרות הנקודתיות לאתרים",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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:"נקבה"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},IC={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 "}},CC={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."},SC={title:"שדרוג כספת",subtitle:"AliasVault התעדכן וצריך לשדרג את הכספת שלך. הפעולה הזאת אמורה לארוך מספר שניות.",versionInformation:"פרטי גרסה",yourVault:"גרסת הכספת שלך:",newVersion:"הגרסה החדשה הזמינה:",upgrade:"שדרוג כספת",upgrading:"משתדרגת…",whatsNew:"מה חדש",whatsNewDescription:"יש לשדרג כדי שתהיה תמיכה בשינויים הבאים:",noDescriptionAvailable:"אין תיאור זמין לגרסה הזאת.",alerts:{unableToGetVersionInfo:"לא ניתן לקבל את פרטי הגרסה. נא לנסות שוב מאוחר יותר.",selfHostedServer:"שרת באירוח עצמי",selfHostedWarning:"אם מדובר בשרת שמתארח עצמאית, נא לוודא שהעותק שמתארח אצלך גם כן מתעדכן כי אחרת הכניסה לאתר תפסיק לעבוד.",continueUpgrade:"להמשיך בשדרוג",upgradeFailed:"השדרוג נכשל",failedToApplyMigration:"החלת ההסבה נכשלה ({{current}} מתוך {{total}})"}},NC={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"},TC={offline:"Offline",tapToRetry:"Tap to retry sync"},kC={auth:mC,menu:gC,common:hC,content:fC,items:pC,itemTypes:AC,fieldLabels:yC,totp:EC,attachmentUploader:bC,emails:vC,settings:wC,passkeys:IC,recentlyDeleted:CC,upgrade:SC,logout:NC,sync:TC},TU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:bC,auth:mC,common:hC,content:fC,default:kC,emails:vC,fieldLabels:yC,itemTypes:AC,items:pC,logout:NC,menu:gC,passkeys:IC,recentlyDeleted:CC,settings:wC,sync:TC,totp:EC,upgrade:SC},Symbol.toStringTag,{value:"Module"})),xC={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",autoCloseUnlockPopup:"Chiusura automatica ai futuri accessi",closingIn:"Chiusura in {{seconds}}...",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."},LC={vault:"Cassaforte",emails:"E-Mail"},DC={loading:"Caricamento in corso...",notice:"Avviso",error:"Errore",cancel:"Annulla",confirm:"Conferma",remove:"Rimuovi",back:"Indietro",next:"Avanti",use:"Usa",add:"Aggiungi",delete:"Elimina",undo:"Annulla",save:"Salva",saving:"Salvataggio...",edit:"Modifica",create:"Creare",or:"O",close:"Chiudi",dismiss:"Annulla",logout:"Esci",copied:"Copiato!",openInNewWindow:"Apri in una nuova finestra",enabled:"Abilitato",disabled:"Disabilitato",showPassword:"Mostra password",hidePassword:"Nascondi password",show:"Mostra",hide:"Nascondi",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.",invalidCode:"Inserisci un codice di autenticazione a 6 cifre valido.",serverError:"Impossibile raggiungere il server AliasVault. Riprova più tardi o contatta il supporto se il problema persiste.",wrongPassword:"Password errata. Riprovare.",sessionExpired:"La tua sessione è scaduta. Effettua di nuovo il login.",mobileLoginRequestExpired:"Richiesta di accesso mobile scaduta. Ricarica la pagina e riprova."},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."}},RC={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",noTotpItemsFound:"Nessun codice 2FA trovato",close:"Chiudi",savePrompt:{title:"Salvare su AliasVault?",neverForThisSite:"Mai per questo sito",addUrlTitle:"Aggiungere URL alle credenziali?",addUrl:"Aggiungi URL"}},UC={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.",noMatchingItems:"Nessun elemento corrisponde ai filtri selezionati",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:{folders:"Cartelle",passkeys:"Passkey",totp:"Codici 2FA"},sort:{title:"Ordina per",oldestFirst:"Prima i più vecchi",newestFirst:"Prima i più recenti",alphabetical:"Alfabetico (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"}},MC={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"}},BC={"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"},_C={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",deleteTotpCodeTitle:"Elimina Il Codice 2FA",deleteTotpCodeConfirmation:'Sei sicuro di voler eliminare il codice 2FA "{{name}}"?',errors:{invalidSecretKey:"Formato chiave segreta non valido."}},FC={uploading:"Caricamento...",uploadSuccess:"File caricati correttamente",deleteSuccess:"Allegato eliminato con successo.",firefoxExpandRequired:"Per caricare i file, usa la finestra estesa.",openExpandedWindow:"Apri Finestra Estesa"},OC={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."}},PC={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",autofillPopupDescription:"Mostra il popup di riempimento automatico quando vengono rilevati i campi di accesso.",disabledSites:"Siti disabilitati",disabledSitesDescription:"Siti in cui non apparirà il popup di riempimento automatico.",clearAllDisabledSites:"Cancella tutti i siti disabilitati",temporaryUntil:"fino al",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"}},loginSave:{title:"Salva Avviso Di Login",description:"Mostra un prompt per salvare le credenziali di accesso quando si invia un modulo di accesso su un sito web.",blockedSites:"Siti bloccati",blockedSitesDescription:"Siti in cui il prompt di salvataggio non apparirà mai.",clearAllBlockedSites:"Cancella tutti i siti bloccati"},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."}},jC={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"}},HC={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."},VC={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}})"}},zC={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"},QC={offline:"Offline",tapToRetry:"Tocca per riprovare la sincronizzazione"},KC={auth:xC,menu:LC,common:DC,content:RC,items:UC,itemTypes:MC,fieldLabels:BC,totp:_C,attachmentUploader:FC,emails:OC,settings:PC,passkeys:jC,recentlyDeleted:HC,upgrade:VC,logout:zC,sync:QC},kU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:FC,auth:xC,common:DC,content:RC,default:KC,emails:OC,fieldLabels:BC,itemTypes:MC,items:UC,logout:zC,menu:LC,passkeys:jC,recentlyDeleted:HC,settings:PC,sync:QC,totp:_C,upgrade:VC},Symbol.toStringTag,{value:"Module"})),GC={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",autoCloseUnlockPopup:"Automatisch sluiten bij toekomstige logins",closingIn:"Sluiten in {{seconds}}s...",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."},WC={vault:"Vault",emails:"E-mails"},qC={loading:"Laden...",notice:"Melding",error:"Fout",cancel:"Annuleren",confirm:"Bevestigen",remove:"Verwijderen",back:"Terug",next:"Volgende",use:"Gebruik",add:"Toevoegen",delete:"Verwijderen",undo:"Ongedaan maken",save:"Opslaan",saving:"Opslaan...",edit:"Bewerken",create:"Aanmaken",or:"Of",close:"Sluiten",dismiss:"Sluiten",logout:"Uitloggen",copied:"Gekopieerd!",openInNewWindow:"Openen in nieuw venster",enabled:"Ingeschakeld",disabled:"Uitgeschakeld",showPassword:"Wachtwoord tonen",hidePassword:"Wachtwoord verbergen",show:"Toon",hide:"Verberg",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.",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:"De QR-code is verlopen. Herlaad de pagina en probeer 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."}},YC={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",noTotpItemsFound:"Geen 2FA code overeenkomsten gevonden",close:"Sluiten",savePrompt:{title:"Opslaan in AliasVault?",neverForThisSite:"Nooit voor deze site",addUrlTitle:"URL naar inloggegevens toevoegen?",addUrl:"URL toevoegen"}},JC={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.",noMatchingItems:"Geen items gevonden die overeenkomen met het geselecteerde filter.",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:{folders:"Mappen",passkeys:"Passkeys",totp:"2FA codes"},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"}},XC={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"}},$C={"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"},ZC={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",deleteTotpCodeTitle:"2FA code verwijderen",deleteTotpCodeConfirmation:'Weet je zeker dat je deze credential wilt verwijderen "{{name}}"?',errors:{invalidSecretKey:"Ongeldig formaat."}},eS={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"},tS={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."}},aS={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",autofillPopupDescription:"Toon de autofill popup wanneer login velden worden gedetecteerd.",disabledSites:"Uitgeschakelde sites",disabledSitesDescription:"Websites waar de autofill popup niet verschijnt.",clearAllDisabledSites:"Alle uitgeschakelde sites wissen",temporaryUntil:"tot",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"}},loginSave:{title:"Inloggegevens opslaan",description:"Toon een melding om inloggegevens op te slaan wanneer je inlogt op een website.",blockedSites:"Geblokkeerde websites",blockedSitesDescription:"Sites waar de inloggegevens opslaan prompt niet zal verschijnen.",clearAllBlockedSites:"Alle uitgeschakelde sites wissen"},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."}},nS={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"}},iS={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."},rS={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}})"}},sS={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"},oS={offline:"Offline",tapToRetry:"Probeer sync opnieuw"},lS={auth:GC,menu:WC,common:qC,content:YC,items:JC,itemTypes:XC,fieldLabels:$C,totp:ZC,attachmentUploader:eS,emails:tS,settings:aS,passkeys:nS,recentlyDeleted:iS,upgrade:rS,logout:sS,sync:oS},xU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:eS,auth:GC,common:qC,content:YC,default:lS,emails:tS,fieldLabels:$C,itemTypes:XC,items:JC,logout:sS,menu:WC,passkeys:nS,recentlyDeleted:iS,settings:aS,sync:oS,totp:ZC,upgrade:rS},Symbol.toStringTag,{value:"Module"})),dS={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",autoCloseUnlockPopup:"Automatyczne zamykanie przyszłych logowań",closingIn:"Zamknięcie w {{seconds}}s...",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."},cS={vault:"Sejf",emails:"Skrzynka odbiorcza"},uS={loading:"Wczytywanie…",notice:"Uwaga",error:"Błąd",cancel:"Anuluj",confirm:"Potwierdź",remove:"Usuń",back:"Powrót",next:"Dalej",use:"Użyj",add:"Dodaj",delete:"Usuń",undo:"Cofnij",save:"Zapisz",saving:"Zapisywanie...",edit:"Edytuj",create:"Utwórz",or:"lub",close:"Zamknąć",dismiss:"Odrzuć",logout:"Wyloguj się",copied:"Skopiowano",openInNewWindow:"Otwórz w nowym oknie.",enabled:"Aktywne",disabled:"Nie aktywne",showPassword:"Pokaż hasło",hidePassword:"Ukryj hasło",show:"Pokaż",hide:"Ukryj",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.",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 nadal występuje.",wrongPassword:"Nieprawidłowe hasło. 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."},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."}},mS={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",noTotpItemsFound:"Nie znaleziono kodu 2FA",close:"Zamknij",savePrompt:{title:"Zapisać w AliasVault?",neverForThisSite:"Nigdy dla tej strony",addUrlTitle:"Dodaj nowe dane logowania?",addUrl:"Dodaj adres URL"}},gS={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.",noMatchingItems:"Żaden element nie pasuje do wybranego filtra.",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:{folders:"Foldery",passkeys:"Klucze dostępu",totp:"Kody 2FA"},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"}},hS={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"}},fS={"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"},pS={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",deleteTotpCodeTitle:"Usuń kod 2FA",deleteTotpCodeConfirmation:'Czy na pewno chcesz usunąć ten kod TOTP "{{name}}?',errors:{invalidSecretKey:"Nieprawidłowy format tajnego klucza."}},AS={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"},yS={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."}},ES={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",autofillPopupDescription:"Pokaż wyskakujące okienko autouzupełniania po wykryciu pól logowania.",disabledSites:"Wyłączone witryny",disabledSitesDescription:"Witryny, w których okienko autouzupełniania nie będzie wyświetlane.",clearAllDisabledSites:"Usuń wszystkie wyłączone witryny",temporaryUntil:"do",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"}},loginSave:{title:"Zapisz monit logowania",description:"Pokaż monit o zapisanie danych logowania podczas przesyłania formularza logowania na stronie internetowej.",blockedSites:"Zablokowane witryny",blockedSitesDescription:"Witryny, w których nie pojawi się monit zapisu.",clearAllBlockedSites:"Wyczyść wszystkie zablokowane strony"},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."}},bS={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 "}},vS={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."},wS={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}})"}},IS={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"},CS={offline:"Jesteś w trybie offline",tapToRetry:"Dotknij, aby ponowić synchronizację"},SS={auth:dS,menu:cS,common:uS,content:mS,items:gS,itemTypes:hS,fieldLabels:fS,totp:pS,attachmentUploader:AS,emails:yS,settings:ES,passkeys:bS,recentlyDeleted:vS,upgrade:wS,logout:IS,sync:CS},LU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:AS,auth:dS,common:uS,content:mS,default:SS,emails:yS,fieldLabels:fS,itemTypes:hS,items:gS,logout:IS,menu:cS,passkeys:bS,recentlyDeleted:vS,settings:ES,sync:CS,totp:pS,upgrade:wS},Symbol.toStringTag,{value:"Module"})),NS={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",autoCloseUnlockPopup:"Fechar automaticamente nos próximos acessos",closingIn:"Fechando em {{seconds}}s...",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."},TS={vault:"Cofre",emails:"E-mails"},kS={loading:"Carregando...",notice:"Aviso",error:"Erro",cancel:"Cancelar",confirm:"Confirmar",remove:"Remover",back:"Voltar",next:"Próximo",use:"Utilizar",add:"Adicionar",delete:"Excluir",undo:"Desfazer",save:"Salvar",saving:"Salvando...",edit:"Editar",create:"Criar",or:"Ou",close:"Fechar",dismiss:"Ignorar",logout:"Sair",copied:"Copiado!",openInNewWindow:"Abrir em uma nova janela",enabled:"Habilitado",disabled:"Desabilitado",showPassword:"Mostrar senha",hidePassword:"Ocultar senha",show:"Mostrar",hide:"Esconder",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.",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."},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."}},xS={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",noTotpItemsFound:"Nenhum código 2FA encontrado",close:"Fechar",savePrompt:{title:"Salvar no AliasVault?",neverForThisSite:"Nunca para este site",addUrlTitle:"Adicionar URL na credencial?",addUrl:"Adicionar URL"}},LS={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.",noMatchingItems:"Nenhum item corresponde ao filtro selecionado.",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:{folders:"Pastas",passkeys:"Passkeys",totp:"Códigos de 2FA"},sort:{title:"Ordenar por",oldestFirst:"Mais antigos primeiro",newestFirst:"Mais novos primeiro",alphabetical:"Ordem Alfabética (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"}},DS={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"}},RS={"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"},US={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",deleteTotpCodeTitle:"Excluir Código 2FA",deleteTotpCodeConfirmation:'Tem certeza que deseja excluir o código 2FA "{{name}}"?',errors:{invalidSecretKey:"Formato de chave secreta inválido."}},MS={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"},BS={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."}},_S={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",autofillPopupDescription:"Mostrar o popup de autopreenchimento quando campos de login forem detectados.",disabledSites:"Sites desabilitados",disabledSitesDescription:"Sites onde o popup de autopreenchimento não vão aparecer.",clearAllDisabledSites:"Limpar todos os sites desabilitados",temporaryUntil:"até",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"}},loginSave:{title:"Salvar Prompt de Login",description:"Mostra um prompt para salvar credenciais de login quando você faz login em algum website.",blockedSites:"Sites bloqueados",blockedSitesDescription:"Sites onde o prompt para salvar nunca vão aparecer.",clearAllBlockedSites:"Limpar todos os sites bloqueados"},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."}},FS={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 "}},OS={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."},PS={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}})"}},jS={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"},HS={offline:"Offline",tapToRetry:"Toque para tentar sincronizar novamente"},VS={auth:NS,menu:TS,common:kS,content:xS,items:LS,itemTypes:DS,fieldLabels:RS,totp:US,attachmentUploader:MS,emails:BS,settings:_S,passkeys:FS,recentlyDeleted:OS,upgrade:PS,logout:jS,sync:HS},DU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:MS,auth:NS,common:kS,content:xS,default:VS,emails:BS,fieldLabels:RS,itemTypes:DS,items:LS,logout:jS,menu:TS,passkeys:FS,recentlyDeleted:OS,settings:_S,sync:HS,totp:US,upgrade:PS},Symbol.toStringTag,{value:"Module"})),zS={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",autoCloseUnlockPopup:"Închidere automată la următoarele autentificări",closingIn:"Se închide în {{seconds}}s...",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."},QS={vault:"Seif",emails:"E-mailuri"},KS={loading:"Se încarcă...",notice:"Notificare",error:"Eroare",cancel:"Anulează",confirm:"Confirmă",remove:"Elimină",back:"Înapoi",next:"Înainte",use:"Folosește",add:"Adaugă",delete:"Șterge",undo:"Revocă",save:"Salvează",saving:"Se salvează...",edit:"Editează",create:"Creează",or:"Sau",close:"Închide",dismiss:"Închide",logout:"Deconectare",copied:"Copiat!",openInNewWindow:"Deschide în fereastră nouă",enabled:"Activat",disabled:"Dezactivat",showPassword:"Afișează parola",hidePassword:"Ascunde parola",show:"Afișează",hide:"Ascunde",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.",invalidCode:"Introdu un cod de autentificare valid din 6 cifre.",serverError:"Nu s-a putut stabili conexiunea cu serverul AliasVault. Încearcă din nou mai târziu sau contactează asistența dacă problema persistă.",wrongPassword:"Parolă incorectă. Încearcă din nou.",sessionExpired:"Sesiunea ta a expirat. Autentifică-te din nou.",mobileLoginRequestExpired:"Cererea de autentificare de pe dispozitivul mobil a expirat. Reîncarcă pagina și î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 tău nu este actualizat. Sincronizează seiful și încearcă din nou.",INTERNAL_SERVER_ERROR:"Eroare internă de server.",VAULT_ERROR:"Seiful local nu este actualizat. Sincronizează seiful prin reîmprospătarea paginii și încearcă din nou."}},GS={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ă o 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",noTotpItemsFound:"Nu s-a găsit niciun cod 2FA corespunzător",close:"Închide",savePrompt:{title:"Salvează în AliasVault?",neverForThisSite:"Niciodată pentru acest site",addUrlTitle:"Adaugă URL la datele de autentificare?",addUrl:"Adaugă URL"}},WS={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.",noMatchingItems:"Niciun element nu corespunde filtrului selectat.",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:{folders:"Dosare",passkeys:"Passkeys",totp:"Coduri 2FA"},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"}},qS={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ă"}},YS={"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"},JS={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",deleteTotpCodeTitle:"Șterge codul 2FA",deleteTotpCodeConfirmation:"Sigur dorești să ștergi codul 2FA „{{name}}”?",errors:{invalidSecretKey:"Format cheie secretă invalid."}},XS={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ă"},$S={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."}},ZS={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ția cazului în care este dezactivat 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",autofillPopupDescription:"Afișează fereastra pop-up de completare automată când sunt detectate câmpurile de autentificare.",disabledSites:"Site-uri dezactivate",disabledSitesDescription:"Site-uri unde fereastra pop-up de completare automată nu va apărea.",clearAllDisabledSites:"Șterge toate site-urile dezactivate",temporaryUntil:"până",appearance:"Aspect",theme:"Temă",useDefault:"Implicită",light:"Luminoasă",dark:"Întunecată",keyboardShortcuts:"Comenzi rapide de la 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"}},loginSave:{title:"Salvează solicitarea de autentificare",description:"Afișează o solicitare de salvare a datelor de autentificare când trimiți un formular de conectare pe un site.",blockedSites:"Site-uri blocate",blockedSitesDescription:"Site-uri unde solicitarea de salvare nu va apărea niciodată.",clearAllBlockedSites:"Șterge toate site-urile blocate"},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ă."}},eN={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 "}},tN={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."},aN={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}})"}},nN={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"},iN={offline:"Offline",tapToRetry:"Apasă pentru a reîncerca sincronizarea"},rN={auth:zS,menu:QS,common:KS,content:GS,items:WS,itemTypes:qS,fieldLabels:YS,totp:JS,attachmentUploader:XS,emails:$S,settings:ZS,passkeys:eN,recentlyDeleted:tN,upgrade:aN,logout:nN,sync:iN},RU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:XS,auth:zS,common:KS,content:GS,default:rN,emails:$S,fieldLabels:YS,itemTypes:qS,items:WS,logout:nN,menu:QS,passkeys:eN,recentlyDeleted:tN,settings:ZS,sync:iN,totp:JS,upgrade:aN},Symbol.toStringTag,{value:"Module"})),sN={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:"Обзор содержимого хранилища",autoCloseUnlockPopup:"Закрывать окно после входа",closingIn:"Закроется через {{seconds}}с...",connectingTo:"Подключение к",switchAccounts:"Переключить аккаунт?",loginWithMobile:"Войти с помощью мобильного приложения",unlockWithMobile:"Разблокировать через мобильное приложение",scanQrCode:"Сканируйте QR-код в приложении AliasVault, чтобы войти."},oN={vault:"Хранилище",emails:"Почта"},lN={loading:"Загрузка...",notice:"Примечание",error:"Ошибка",cancel:"Отмена",confirm:"Подтвердить",remove:"Удалить",back:"Назад",next:"Далее",use:"Использовать",add:"Добавить",delete:"Удалить",undo:"Отменить",save:"Сохранить",saving:"Сохраняем...",edit:"Редактировать",create:"Создать",or:"Или",close:"Закрыть",dismiss:"Закрыть",logout:"Выйти",copied:"Скопировано!",openInNewWindow:"Открыть в новом окне",enabled:"Включено",disabled:"Отключено",showPassword:"Показать пароль",hidePassword:"Скрыть пароль",show:"Показать",hide:"Скрыть",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:"Не удалось объединить изменения. Попробуйте снова.",invalidCode:"Введите корректный 6-значный код подтверждения.",serverError:"Сервер AliasVault недоступен. Повторите попытку позже или свяжитесь с техподдержкой.",wrongPassword:"Неверный пароль. Повторите попытку.",sessionExpired:"Срок действия сессии истек. Войдите снова.",mobileLoginRequestExpired:"Срок запроса на вход истек. Обновите страницу и попробуйте снова."},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:"Локальное хранилище не обновлено. Пожалуйста, синхронизируйте ваше хранилище, обновив страницу, и повторите попытку."}},dN={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:"Закрыть окно",noTotpItemsFound:"2FA-коды не найдены",close:"Закрыть",savePrompt:{title:"Сохранить в AliasVault?",neverForThisSite:"Никогда для этого сайта",addUrlTitle:"Добавить URL к этой записи?",addUrl:"Добавить URL"}},cN={title:"Записи",itemName:"Имя",loginCredentials:"Учетные данные для авторизации",cardInformation:"Данные карты",addItem:"Добавить запись",addNewItem:"Добавить запись",saveItem:"Сохранить запись",itemDetails:"Детали записи",editItem:"Редактировать запись",untitled:"Без названия",newFolder:"Новая папка",createFolder:"Создать папку",editFolder:"Изменить папку",folderName:"Название папки",folderNameRequired:"Название папки обязательно",folder:"Папка",welcomeTitle:"Добро пожаловать в AliasVault!",welcomeDescription:"Чтобы использовать браузерное расширение AliasVault: перейдите на сайт и используйте всплывающее окно автозаполнения AliasVault для создания новых учетных данных.",noPasskeysFound:"Ключи доступа еще не созданы. Ключи доступа создаются при посещении веб-сайта, который предлагает их в качестве метода аутентификации.",noMatchingItems:"Нет записей, соответствующих выбранному фильтру.",noMatchingItemsSearch:'По запросу "{{search}}" ничего не найдено',noMatchingItemsWithFilter:'Ничего не найдено в "{{filter}}" по запросу "{{search}}"',clearSearch:"Очистить поиск",clearFilter:"Сбросить фильтр",emptyFolderHint:"Эта папка пуста. Чтобы переместить сюда записи, перейдите в режим редактирования записи и нажмите на иконку папки в поле имени.",allItemsInFolders:"Все ваши данные разложены по папкам. Выберите нужную папку выше или воспользуйтесь поиском, чтобы найти конкретную запись.",deleteFolder:"Удалить папку",deleteFolderKeepItems:"Удалить только папку",deleteFolderKeepItemsDescription:"Элементы будут перемещены обратно в основной список.",deleteFolderAndItems:"Удалить папку и все элементы",deleteFolderAndItemsDescription:"{{count}} объект(ов) будет перемещено в раздел «Недавно удалённые».",filters:{folders:"Папки",passkeys:"Ключи доступа",totp:"2FA-коды"},sort:{title:"Сортировка",oldestFirst:"Сначала старые",newestFirst:"Сначала новые",alphabetical:"По алфавиту (А–Я)"},deleteItemTitle:"Удалить элемент",deleteItemConfirm:"Вы уверены, что хотите удалить этот элемент?",viewHistory:"Посмотреть историю",history:"История",noHistoryAvailable:"История пока пуста",tags:"Теги",changePasswordComplexity:"Изменить сложность пароля",passwordLength:"Длина пароля",includeLowercase:"Включить строчные буквы",includeUppercase:"Включить заглавные буквы",includeNumbers:"Включить числа",includeSpecialChars:"Включить специальные символы",avoidAmbiguousChars:"Избегать двусмысленных символов (o, 0 и т.д.)",privateEmailTitle:"Личная электронная почта",privateEmailAliasVaultServer:"Сервер AliasVault",privateEmailDescription:"Шифрование E2E, полностью приватный.",publicEmailTitle:"Общедоступные временные поставщики электронной почты",publicEmailDescription:"Анонимность, но ограниченная конфиденциальность. Содержимое письма может прочитать любой, кому известен адрес.",validation:{required:"Это поле является обязательным"}},uN={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:"Защищенная заметка"}},mN={"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"},gN={addCode:"Добавить код 2FA",instructions:"Введите секретный ключ, указанный на веб-сайте, где вы хотите добавить двухфакторную аутентификацию.",nameOptional:"Имя (необязательно)",secretKey:"Секретный ключ",saveToViewCode:"Сохранить для просмотра кода",defaultName:"Аутентификатор",deleteTotpCodeTitle:"Удаление 2FA-кода",deleteTotpCodeConfirmation:'Вы уверены, что хотите удалить 2FA-код для "{{name}}"?',errors:{invalidSecretKey:"Неверный формат секретного ключа."}},hN={uploading:"Загрузка...",uploadSuccess:"Файлы успешно загружены.",deleteSuccess:"Вложение успешно удалено.",firefoxExpandRequired:"Для загрузки файлов используйте расширенное окно.",openExpandedWindow:"Открыть расширенное окно"},fN={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:"При попытке загрузить письма произошла ошибка. Пожалуйста, попробуйте отредактировать и сохранить данные для синхронизации базы данных, затем повторите попытку."}},pN={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:"Сбросить все настройки для сайтов",autofillPopupDescription:"Показывать автозаполнение при обнаружении полей входа.",disabledSites:"Исключения",disabledSitesDescription:"Сайты, на которых не будет появляться автозаполнение.",clearAllDisabledSites:"Очистить список исключений",temporaryUntil:"До",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:"Женский"}},loginSave:{title:"Запрос на сохранение",description:"Запрашивать сохранение пароля после входа на сайт.",blockedSites:"Заблокированные сайты",blockedSitesDescription:"Сайты, где запрос на сохранение никогда не появится.",clearAllBlockedSites:"Очистить весь список"},unlockMethod:{title:"Способ разблокировки хранилища",introText:"Выберите способ разблокировки хранилища. Вы можете использовать свой мастер-пароль (он доступен всегда) или установить ПИН-код для быстрого доступа. После 3 неудачных попыток ввода ПИН-кода необходимо будет ввести мастер-пароль.",password:"Мастер-пароль",pin:"ПИН-код",pinDescription:"Разблокировать хранилище ПИН-кодом",setupPin:"Установить ПИН-код",enterNewPinDescription:"Введите ПИН-код, состоящий как минимум из 6 цифр",confirmPin:"Подтвердите ПИН-код\uFEFF",confirmPinDescription:"Повторите ПИН-код для подтверждения",invalidPinFormat:"Неверный формат ПИН-кода\uFEFF",pinMismatch:"ПИН-коды не совпадают",incorrectPin:"Неверный ПИН-код. Осталось {{attemptsRemaining}} попытки.",incorrectPinSingular:"Неверный ПИН-код. Осталась 1 попытка.",enableSuccess:"Разблокировка по ПИН-коду успешно включена",pinLocked:"Разблокировка по ПИН-коду отключена. Пожалуйста, используйте ваш мастер-пароль для разблокировки хранилища.",pinSecurityWarning:"Разблокировка с помощью ПИН-кода в расширении для браузера может быть менее безопасной, чем использование вашего мастер-пароля, поскольку ПИН-коды обычно имеют более низкую энтропию и могут быть подобраны методом перебора (брутфорс), если ваше устройство будет скомпрометировано. Используйте этот способ только на устройствах, которым вы полностью доверяете."}},AN={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:"Провайдер ключей доступа включен "}},yN={title:"Недавно удаленные",noItems:"Нет удаленных элементов",noItemsDescription:"Удаленные элементы будут храниться здесь 30 дней, после чего они будут удалены безвозвратно.",description:"Эти элементы будут безвозвратно удалены через 30 дней. Вы можете восстановить их или удалить немедленно.",restore:"Восстановить",deletePermanently:"Удалить безвозвратно",emptyAll:"Очистить все",daysRemaining_one:"Остался {{count}} день",daysRemaining_other:"Осталось {{count}} дней",expiringSoon:"Скоро будут удалены",confirmDeleteTitle:"Удалить безвозвратно?",confirmDeleteMessage:"Этот элемент будет удален навсегда без возможности восстановления.",confirmEmptyAllTitle:"Очистить «Недавно удалённые»?",confirmEmptyAllMessage:"Все элементы {{count}} будут удалены навсегда без возможности восстановления."},EN={title:"Обновить хранилище",subtitle:"AliasVault обновился, и ваше хранилище необходимо обновить. Это займет всего несколько секунд.",versionInformation:"Информация о версии",yourVault:"Версия вашего хранилища:",newVersion:"Доступна новая версия:",upgrade:"Обновить хранилище",upgrading:"Обновление...",whatsNew:"Что нового",whatsNewDescription:"Для поддержки следующих изменений требуется обновление:",noDescriptionAvailable:"Описание для этой версии недоступно.",alerts:{unableToGetVersionInfo:"Не удалось получить информацию о версии. Пожалуйста, попробуйте снова.",selfHostedServer:"Автономный сервер",selfHostedWarning:"Если вы используете автономный сервер, обязательно обновите свой автономный экземпляр, так как в противном случае вход в веб-клиент перестанет работать.",continueUpgrade:"Продолжить обновление",upgradeFailed:"Ошибка обновления",failedToApplyMigration:"Не удалось применить перенос ({{current}} из {{total}})"}},bN={unsyncedChangesTitle:"Несинхронизированные изменения",unsyncedChangesWarning:"У вас есть несинхронизированные изменения, которые будут потеряны, если вы выйдете из аккаунта сейчас. Вы уверены, что хотите продолжить?",logoutAnyway:"Все равно выйти"},vN={offline:"Офлайн",tapToRetry:"Повторить синхронизацию"},wN={auth:sN,menu:oN,common:lN,content:dN,items:cN,itemTypes:uN,fieldLabels:mN,totp:gN,attachmentUploader:hN,emails:fN,settings:pN,passkeys:AN,recentlyDeleted:yN,upgrade:EN,logout:bN,sync:vN},UU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:hN,auth:sN,common:lN,content:dN,default:wN,emails:fN,fieldLabels:mN,itemTypes:uN,items:cN,logout:bN,menu:oN,passkeys:AN,recentlyDeleted:yN,settings:pN,sync:vN,totp:gN,upgrade:EN},Symbol.toStringTag,{value:"Module"})),IN={loginTitle:"Logga in på AliasVault",username:"Användarnamn eller e-post",usernamePlaceholder:"namn / namn@företag.com",passwordPlaceholder:"Ange ditt lösenord",rememberMe:"Förbli inloggad",loginButton:"Logga in",noAccount:"Inget konto än?",createVault:"Skapa ett nytt valv",twoFactorTitle:"Vänligen ange autentiseringskoden från din autentiseringsapp.",authCode:"Autentiseringskod",authCodePlaceholder:"Ange 6-siffrig kod",verify:"Bekräfta",twoFactorNote:"Obs! Om du inte har tillgång till din autentiseringsenhet kan du återställa din 2FA med en återställningskod genom att logga in via webbplatsen.",masterPassword:"Huvudlösenord",unlockVault:"Lås upp",unlockWithPin:"Lås upp med PIN-kod",enterPinToUnlock:"Ange din PIN-kod för att låsa upp valvet",useMasterPassword:"Använd huvudlösenord",unlockTitle:"Lås upp ditt valv",logoutConfirm:"Är du säker på att du vill logga ut?",unlockSuccessTitle:"Ditt valv har låsts upp",unlockSuccessDescription:"Du kan nu använda autofyll av inloggningsformulär i din webbläsare.",closePopup:"Stäng detta popup-fönster",browseVault:"Bläddra bland valvets innehåll",autoCloseUnlockPopup:"Stäng automatiskt vid framtida inloggningar",closingIn:"Stänger om {{seconds}}...",connectingTo:"Ansluter till",switchAccounts:"Växla konton?",loginWithMobile:"Logga in med hjälp av mobilapp",unlockWithMobile:"Lås upp med hjälp av mobilapp",scanQrCode:"Skanna denna QR-kod med din AliasVault-mobilapp för att logga in och låsa upp ditt valv."},CN={vault:"Valv",emails:"E-postadresser"},SN={loading:"Laddar...",notice:"Meddelande",error:"Fel",cancel:"Avbryt",confirm:"Bekräfta",remove:"Ta bort",back:"Tillbaka",next:"Nästa",use:"Använd",add:"Lägg till",delete:"Radera",undo:"Ångra",save:"Spara",saving:"Sparar...",edit:"Redigera",create:"Skapa",or:"Eller",close:"Stäng",dismiss:"Avfärda",logout:"Logga ut",copied:"Kopierad!",openInNewWindow:"Öppna i nytt fönster",enabled:"Aktiverad",disabled:"Inaktiverad",showPassword:"Visa lösenord",hidePassword:"Dölj lösenord",show:"Visa",hide:"Dölj",showDetails:"Visa detaljer",hideDetails:"Dölj detaljer",copyToClipboard:"Kopiera till urklipp",loadingEmails:"Laddar e-post...",loadingTotpCodes:"Laddar TOTP-koder...",attachments:"Bifogade filer",loadingAttachments:"Laddar bifogade filer...",settings:"Inställningar",recentEmails:"Senaste e-postmeddelanden",credentials:"Inloggningsuppgifter",customFields:"Anpassade fält",twoFactorAuthentication:"Tvåfaktorsautentisering",alias:"Alias",notes:"Anteckningar",email:"E-post",username:"Användarnamn",password:"Lösenord",generate:"Generera",serviceName:"Tjänstens namn",loggedIn:"Inloggad",syncingVault:"Synkroniserar valv",checkingVaultUpdates:"Söker efter valvuppdateringar",syncingUpdatedVault:"Synkroniserar uppdaterat valv",loadMore:"Läs in fler",offline:"Offline",offlineMode:"Arbetar i offline-läge",pendingSync:"Synkroniserar...",mergingVaultChanges:"Sammanfogar valvförändringar...",uploadingVault:"Laddar upp valvet...",errors:{serverNotAvailable:"AliasVault-servern är inte tillgänglig. Försök igen senare eller kontakta support om problemet kvarstår.",clientVersionNotSupported:"Denna version av webbläsartillägget AliasVault stöds inte längre av servern. Vänligen uppdatera ditt webbläsartillägg till den senaste versionen.",browserExtensionOutdated:"Detta webbläsartillägg är föråldrat och kan inte användas för att komma åt detta valv. Uppdatera detta webbläsartillägg för att fortsätta.",serverVersionNotSupported:"AliasVault-servern behöver uppdateras till en nyare version för att kunna använda detta webbläsartillägg. Kontakta support om du behöver hjälp.",serverVersionTooOld:"AliasVault-servern behöver uppdateras till en nyare version för att kunna använda denna funktion. Vänligen kontakta serveradministratören om du behöver hjälp.",unknownError:"Ett okänt fel har inträffat",unknownErrorTryAgain:"Ett okänt fel inträffade. Försök igen.",vaultNotAvailable:"Valvet är inte tillgängligt",vaultIsLocked:"Valvet är låst",passwordChanged:"Ditt lösenord har ändrats sedan du senast loggade in. Vänligen logga in igen av säkerhetsskäl.",syncConflictMaxRetries:"Kunde inte synkronisera valvet trots flera försök. Försök igen senare.",mergeFailed:"Det gick inte att sammanfoga valvförändringar. Försök igen.",invalidCode:"Ange en giltig 6-siffrig autentiseringskod.",serverError:"Kunde inte nå AliasVault-servern. Försök igen senare eller kontakta support om problemet kvarstår.",wrongPassword:"Felaktigt lösenord. Försök igen.",sessionExpired:"Din session har löpt ut. Logga in igen.",mobileLoginRequestExpired:"Mobil inloggningsbegäran har löpt ut. Ladda om sidan och försök igen."},apiErrors:{UNKNOWN_ERROR:"Ett okänt fel inträffade. Försök igen.",ACCOUNT_LOCKED:"Kontot är tillfälligt låst på grund av för många misslyckade försök. Försök igen senare.",ACCOUNT_BLOCKED:"Ditt konto har inaktiverats. Om du tror att detta är ett misstag, kontakta support.",USER_NOT_FOUND:"Felaktigt användarnamn eller lösenord. Försök igen.",INVALID_AUTHENTICATOR_CODE:"Ogiltig autentiseringskod. Försök igen.",INVALID_RECOVERY_CODE:"Ogiltig återställningskod. Försök igen.",REFRESH_TOKEN_REQUIRED:"Uppdateringstoken krävs.",INVALID_REFRESH_TOKEN:"Ogiltigt uppdateringstoken",PUBLIC_REGISTRATION_DISABLED:"Registrering av nytt konto är för närvarande inaktiverat på denna server. Kontakta administratören.",USERNAME_REQUIRED:"Ett användarnamn krävs.",USERNAME_ALREADY_IN_USE:"Användarnamnet används redan",USERNAME_AVAILABLE:"Användarnamnet är tillgängligt",USERNAME_MISMATCH:"Användarnamnet stämmer inte överens med den nuvarande användaren.",PASSWORD_MISMATCH:"Det angivna lösenordet stämmer inte överens med ditt nuvarande lösenord",ACCOUNT_SUCCESSFULLY_DELETED:"Kontot har raderats.",USERNAME_EMPTY_OR_WHITESPACE:"Användarnamnet kan inte vara tomt eller blanksteg.",USERNAME_TOO_SHORT:"Användarnamnet är för kort: måste vara minst 3 tecken långt.",USERNAME_TOO_LONG:"Användarnamnet är för långt: får inte vara längre än 40 tecken.",USERNAME_INVALID_EMAIL:"Ogiltig e-postadress.",USERNAME_INVALID_CHARACTERS:"Användarnamnet är ogiltigt, kan endast innehålla bokstäver eller siffror.",VAULT_NOT_UP_TO_DATE:"Ditt valv är inte uppdaterat. Synkronisera ditt valv och försök igen.",INTERNAL_SERVER_ERROR:"Internt serverfel.",VAULT_ERROR:"Det lokala valvet är inte uppdaterat. Synkronisera valvet genom att uppdatera sidan och försök igen."}},NN={or:"eller",new:"Nytt",vaultLocked:"AliasVault är låst.",creatingNewAlias:"Skapar nytt alias...",noMatchesFound:"Inga träffar hittades",searchVault:"Sök i valvet...",enterServiceName:"Ange tjänstens namn",enterEmailAddress:"Ange e-postadress",enterUsername:"Ange användarnamn",hideFor1Hour:"Dölj i 1 timme (nuvarande webbplats)",hidePermanently:"Dölj permanent (nuvarande webbplats)",createRandomAlias:"Skapa slumpmässigt alias",createUsernamePassword:"Skapa användarnamn/lösenord",randomAlias:"Slumpmässigt alias",usernamePassword:"Användarnamn/Lösenord",createAndSaveAlias:"Skapa och spara alias",createAndSaveCredential:"Skapa och spara autentiseringsuppgifter",randomIdentityDescription:"Generera en slumpmässig identitet med en slumpmässig e-postadress tillgänglig i AliasVault.",randomIdentityDescriptionDropdown:"Slumpmässig identitet med slumpmässig e-post",manualCredentialDescription:"Ange din egen e-postadress och användarnamn.",manualCredentialDescriptionDropdown:"Manuellt användarnamn och lösenord",failedToCreateIdentity:"Det gick inte att skapa identitet. Försök igen.",enterEmailAndOrUsername:"Ange e-postadress och/eller användarnamn",autofillWithAliasVault:"Autofyll med AliasVault",generateRandomPassword:"Generera slumpmässigt lösenord (kopiera till urklipp)",generateNewPassword:"Generera nytt lösenord",togglePasswordVisibility:"Visa/dölj lösenordet",passwordCopiedToClipboard:"Lösenord har kopierats till urklipp",openAliasVaultToUpgrade:"Öppna AliasVault för att uppgradera",vaultUpgradeRequired:"Uppgradering av valv krävs.",dismissPopup:"Avvisa popup",noTotpItemsFound:"Inga matchande 2FA-koder funna",close:"Stäng",savePrompt:{title:"Spara till AliasVault?",neverForThisSite:"Aldrig för denna webbplats",addUrlTitle:"Lägg till URL till posten?",addUrl:"Lägg till URL"}},TN={title:"Objekt",itemName:"Namn",loginCredentials:"Inloggningsuppgifter",cardInformation:"Kortinformation",addItem:"Lägg till objekt",addNewItem:"Lägg till nytt objekt",saveItem:"Spara objekt",itemDetails:"Objektdetaljer",editItem:"Redigera objekt",untitled:"Ingen titel",newFolder:"Ny mapp",createFolder:"Skapa mapp",editFolder:"Redigera mapp",folderName:"Mappens namn",folderNameRequired:"Mappnamn krävs",folder:"Mapp",welcomeTitle:"Välkommen till AliasVault!",welcomeDescription:"För att använda webbläsartillägget AliasVault: navigera till en webbplats och använd AliasVault-autofyllrutan för att skapa en ny inloggningsuppgift.",noPasskeysFound:"Inga passkeys har skapats än. Passkeys skapas genom att besöka en webbplats som erbjuder passkeys som en autentiseringsmetod.",noMatchingItems:"Inga objekt matchar de valda filtren",noMatchingItemsSearch:'Inga objekt matchar "{{search}}"',noMatchingItemsWithFilter:'Inga {{filter}} objekt som matchar "{{search}}"',clearSearch:"Rensa sökning",clearFilter:"Rensa filter",emptyFolderHint:"Mappen är tom. För att flytta objekt till den här mappen, redigera objektet och tryck på mappikonen i namnfältet.",allItemsInFolders:"Alla dina objekt är organiserade i mappar. Klicka på en mapp ovan för att visa dina uppgifter, eller använd sökningen för att hitta specifika objekt.",deleteFolder:"Radera mapp",deleteFolderKeepItems:"Ta endast bort mappen",deleteFolderKeepItemsDescription:"Objekt kommer att flyttas tillbaka till huvudlistan.",deleteFolderAndItems:"Radera mapp och alla objekt",deleteFolderAndItemsDescription:"{{count}} objekt kommer att flyttas till Nyligen borttagen.",filters:{folders:"Mappar",passkeys:"Passkeys",totp:"2FA-Koder"},sort:{title:"Sortera efter",oldestFirst:"Äldst först",newestFirst:"Nyast först",alphabetical:"Alfabetiskt (A-Z)"},deleteItemTitle:"Radera objekt",deleteItemConfirm:"Är du säker på att du vill radera det här objektet?",viewHistory:"Visa historik",history:"Historik",noHistoryAvailable:"Ingen historik är tillgänglig",tags:"Taggar",changePasswordComplexity:"Ändra lösenordets komplexitet",passwordLength:"Lösenordslängd",includeLowercase:"Inkludera små bokstäver",includeUppercase:"Inkludera stora bokstäver",includeNumbers:"Inkludera siffror",includeSpecialChars:"Inkludera specialtecken",avoidAmbiguousChars:"Undvik tvetydiga tecken (o, 0, etc.)",privateEmailTitle:"Privat e-post",privateEmailAliasVaultServer:"AliasVault server",privateEmailDescription:"E2E krypterad, helt privat.",publicEmailTitle:"Offentliga Temp e-postleverantörer",publicEmailDescription:"Anonym men begränsad integritet. E-postinnehåll kan läsas av alla som känner till adressen.",validation:{required:"Detta fält är obligatoriskt"}},kN={selectType:"Lägg till nytt objekt",typeLabel:"Objekttyp",creating:"Skapar",editing:"Redigerar",regenerateAlias:"Återskapa alias",addCustomField:"Lägg till anpassad fält",fieldLabel:"Fältetikett",enterFieldName:"Ange fältets namn",fieldType:"Fälttyp",fieldTypes:{text:"Text",hidden:"Dold (maskerad text)",email:"E-post",url:"Webbadress",phone:"Telefon",number:"Nummer",date:"Datum",textArea:"Textfält"},login:{title:"Inloggning"},alias:{title:"Alias"},creditCard:{title:"Betalkort"},note:{title:"Säker anteckning"}},xN={"login.url":"Webbplatsadress","login.username":"Användarnamn","login.password":"Lösenord","alias.first_name":"Förnamn","alias.last_name":"Efternamn","alias.gender":"Kön","alias.birthdate":"Födelsedatum","login.email":"E-postadress","notes.content":"Anteckningar","card.cardholder_name":"Kortinnehavarens namn","card.number":"Kortnummer","card.expiry_month":"Utgångsmånad","card.expiry_year":"Utgångsår","card.cvv":"Säkerhetskod","card.pin":"PIN-kod"},LN={addCode:"Lägg till 2FA kod",instructions:"Ange den hemliga nyckeln som visas av webbplatsen där du vill lägga till tvåfaktorsautentisering.",nameOptional:"Namn (valfritt)",secretKey:"Hemlig nyckel",saveToViewCode:"Spara för att visa kod",defaultName:"Autentiserare",deleteTotpCodeTitle:"Radera 2FA-kod",deleteTotpCodeConfirmation:'Är du säker på att du vill radera 2FA-koden"{{name}}"?',errors:{invalidSecretKey:"Ogiltigt format för hemlig nyckel."}},DN={uploading:"Laddar upp...",uploadSuccess:"Filerna har laddats upp.",deleteSuccess:"Bifogade filen har raderats.",firefoxExpandRequired:"För att ladda upp filer, använd det utökade fönstret.",openExpandedWindow:"Öppna utökat fönster"},RN={title:"E-post",deleteEmailTitle:"Radera e-post",deleteEmailConfirm:"Är du säker på att du vill radera detta meddelande permanent?",from:"Från",to:"Till",date:"Datum",emailContent:"E-postinnehåll",emailNotFound:"E-post hittades inte",noEmails:"Inga e-postmeddelanden hittades",noEmailsDescription:"Du har inte mottagit några e-postmeddelanden på dina privata e-postadresser än. När du fått ett nytt e-postmeddelande så visas det här.",offlineMessage:"Du är offline. Anslut till internet för att ladda dina e-postmeddelanden.",dateFormat:{justNow:"precis nu",minutesAgo_single:"{{count}} minut sedan",minutesAgo_plural:"{{count}} minuter sedan",hoursAgo_single:"{{count}} timme sedan",hoursAgo_plural:"{{count}} timmar sedan",yesterday:"igår"},apiErrors:{CLAIM_DOES_NOT_MATCH_USER:"Den aktuella valda e-postadressen används redan. Vänligen ändra e-postadressen genom att redigera denna post.",CLAIM_DOES_NOT_EXIST:"Ett fel inträffade när e-posten skulle laddas. Försök att redigera och spara posten för att synkronisera databasen, och försök sedan igen."}},UN={serverUrl:"Serverns webbadress",language:"Språk",autofillEnabled:"Aktivera Autofyll",version:"Version",openWebApp:"Öppna webbapp",lock:"Lås",globalSettings:"Globala inställningar",autofillPopup:"Autofyllrutan",activeOnAllSites:"Aktiv på alla webbplatser (om inte inaktiverat nedan)",disabledOnAllSites:"Inaktiverad på alla webbplatser",rightClickContextMenu:"Högerklicksmeny",autofillMatching:"Autofyllsmatchning",autofillMatchingMode:"Autofyll matchningsläge",autofillMatchingModeDescription:"Avgör vilka uppgifter som anses vara en matchning och visas som förslag i autofyllrutan för en viss webbplats.",autofillMatchingDefault:"URL + subdomän + namn wildcard",autofillMatchingUrlSubdomain:"URL + subdomän",autofillMatchingUrlExact:"Endast exakt URL domän",siteSpecificSettings:"Webbplatsspecifika inställningar",autofillPopupOn:"Autofyllruta på: ",enabledForThisSite:"Aktiverad för denna webbplats",disabledForThisSite:"Inaktiverad för denna webbplats",temporarilyDisabledUntil:"Tillfälligt inaktiverad tills",resetAllSiteSettings:"Återställ alla webbplatsspecifika inställningar",autofillPopupDescription:"Visa autofyllrutan när inloggningsfält upptäcks.",disabledSites:"Inaktiverade webbplatser",disabledSitesDescription:"Webbplatser där autofyllrutan inte kommer att visas.",clearAllDisabledSites:"Rensa alla inaktiverade sajter",temporaryUntil:"fram till",appearance:"Utseende",theme:"Tema",useDefault:"Använd standard",light:"Ljust",dark:"Mörkt",keyboardShortcuts:"Kortkommandon",configureKeyboardShortcuts:"Konfigurera kortkommandon",configure:"Konfigurera",clipboardClearTimeout:"Rensa urklipp efter kopiering",clipboardClearTimeoutDescription:"Rensa urklipp automatiskt efter kopiering av känsliga data",clipboardClearDisabled:"Rensa aldrig",clipboardClear5Seconds:"Rensa efter 5 sekunder",clipboardClear10Seconds:"Rensa efter 10 sekunder",clipboardClear15Seconds:"Rensa efter 15 sekunder",autoLockTimeout:"Timeout för automatisk låsning",autoLockTimeoutDescription:"Lås valvet automatiskt efter en period av inaktivitet",autoLockTimeoutHelp:"Valvet kommer endast att låsas efter den angivna perioden av inaktivitet (ingen användning av autofyll eller öppnande av tilläggsruta). Valvet kommer alltid att låsa när webbläsaren stängs, oavsett inställning.",autoLockNever:"Aldrig",autoLock15Seconds:"15 sekunder",autoLock1Minute:"1 minut",autoLock5Minutes:"5 minuter",autoLock15Minutes:"15 minuter",autoLock30Minutes:"30 minuter",autoLock1Hour:"1 timme",autoLock4Hours:"4 timmar",autoLock8Hours:"8 timmar",autoLock24Hours:"24 timmar",versionPrefix:"Version ",autofillSettings:"Inställningar för Autofyll",clipboardSettings:"Urklippsinställningar",contextMenuSettings:"Inställningar för snabbmenyn",passkeySettings:"Passkey-inställningar",contextMenu:"Snabbmeny",contextMenuEnabled:"Snabbmenyn är aktiverad",contextMenuDisabled:"Snabbmenyn är inaktiverad",contextMenuDescription:"Högerklicka på inmatningsfält för att komma åt AliasVault-alternativ",selectLanguage:"Välj Språk",serverConfiguration:"Serverkonfiguration",serverConfigurationDescription:"Konfigurera AliasVault-serverns URL för egenhostade instanser",customApiUrl:"API URL",customClientUrl:"Klientens URL",apiUrlHint:"API slutpunkts-URL (vanligtvis klientens URL + /api)",clientUrlHint:"Webbgränssnittets URL för din egenhostade instans",autofillSettingsDescription:"Aktivera eller inaktivera autofyllruta på webbsidor",autofillEnabledDescription:"Autofyll förslag visas på inloggningsformulär",autofillDisabledDescription:"Autofyll förslag är inaktiverade globalt",languageSettings:"Språk",validation:{apiUrlRequired:"API-URL krävs",apiUrlInvalid:"Ange en giltig API-URL",clientUrlRequired:"Klientens URL krävs",clientUrlInvalid:"Ange en giltig klient-URL"},identityGenerator:"Identitetsgenerator",identityGeneratorSettings:{description:"Konfigurera standardspråk och könspreferens för generering av nya identiteter.",languageSection:"Språk",languageDescription:"Ange det språk som ska användas för att generera nya identiteter.",genderSection:"Kön",genderDescription:"Ange könspreferens för generering av nya identiteter.",ageRangeSection:"Åldersintervall",ageRangeDescription:"Ange åldersintervall för generering av nya identiteter.",genderOptions:{random:"Slumpmässigt",male:"Man",female:"Kvinna"}},loginSave:{title:"Spara Inloggningsdialog",description:"Visa en dialogruta för att spara inloggningsuppgifter när du skickar in ett inloggningsformulär på en webbplats.",blockedSites:"Blockerade webbplatser",blockedSitesDescription:"Webbplatser där dialogrutan för att spara inloggning aldrig kommer att visas.",clearAllBlockedSites:"Rensa alla blockerade webbplatser"},unlockMethod:{title:"Valvupplåsningsmetod",introText:"Välj hur du vill låsa upp ditt valv. Du kan använda ditt huvudlösenord (alltid tillgängligt) eller ange en PIN-kod för snabbare åtkomst. Efter 3 misslyckade PIN-försök måste du använda ditt huvudlösenord.",password:"Huvudlösenord",pin:"PIN-Kod",pinDescription:"Lås upp valv med PIN-kod",setupPin:"Ställ in PIN-kod",enterNewPinDescription:"Ange en PIN-kod som består av minst 6 siffror",confirmPin:"Bekräfta PIN-kod",confirmPinDescription:"Ange din PIN-kod igen för att bekräfta",invalidPinFormat:"Ogiltigt PIN-format",pinMismatch:"PIN-koder matchar inte",incorrectPin:"Felaktig PIN-kod. {{attemptsRemaining}} försök återstår.",incorrectPinSingular:"Felaktig PIN-kod. 1 försök återstår.",enableSuccess:"PIN-upplåsning har aktiverats!",pinLocked:"PIN-upplåsning har inaktiverats. Använd ditt huvudlösenord för att låsa upp ditt valv.",pinSecurityWarning:"PIN-upplåsning i webbläsartillägget kan vara mindre säkert än ditt huvudlösenord, eftersom PIN-koder vanligtvis har lägre entropi och kan bli buret-force-attackerad"}},MN={passkey:"Passkey",site:"Webbplats",helpText:"Passkeys skapas på webbplatsen när du blir tillfrågad. De kan inte redigeras manuellt. För att radera denna passkey, kan du ta bort det från denna posten. För att byta ut denna passkey eller skapa en ny, besök webbplatsen och följ dess anvisningar.",passkeyMarkedForDeletion:"Passkey markerad för borttagning",passkeyWillBeDeleted:"Denna passkey kommer att tas bort när du sparar dessa uppgifter.",useBrowserPasskey:"Använd webbläsarens Passkey",bypass:{description:"Hur länge vill du använda webbläsarens passkey-leverantör till {{origin}}?",thisTimeOnly:"Endast denna gång",alwaysForSite:"Alltid för denna webbplats"},authenticate:{title:"Logga in med Passkey",signInFor:"Logga in med Passkey till",selectPasskey:"Välj en passkey för att logga in:",noPasskeysFound:"Inga passkeys hittades för denna webbplats"},create:{title:"Skapa Passkey",createFor:"Skapa ett nytt passkey till",titleLabel:"Titel",titlePlaceholder:"Ange ett namn för denna Passkey",createButton:"Skapa Passkey",selectPasskeyToReplace:"Välj en passkey att ersätta:",createNewPasskey:"Skapa ny Passkey",replacingPasskey:"Ersätter passkey: {{displayName}}",confirmReplace:"Bekräfta ersättande",selectExistingLogin:"Lägg till i befintlig inloggning:",selectExistingLoginDescription:"Bifoga denna passkey till en befintlig inloggningsuppgift för den här webbplatsen.",attachingToCredential:"Lägger till passkey till: {{serviceName}}",attachPasskey:"Lägg till Passkey"},settings:{passkeyProvider:"Passkey-leverantör",passkeyProviderOn:"Passkey-leverantör på "}},BN={title:"Senast raderade",noItems:"Inga raderade objekt",noItemsDescription:"Objekt som du tar bort visas här i 30 dagar innan de tas bort permanent.",description:"Dessa objekt kommer att raderas permanent efter 30 dagar. Du kan återställa dem eller ta bort dem omedelbart.",restore:"Återställ",deletePermanently:"Radera permanent",emptyAll:"Töm alla",daysRemaining_one:"{{count}} dag återstår",daysRemaining_other:"{{count}} dagar återstår",expiringSoon:"Löper snart ut",confirmDeleteTitle:"Radera permanent?",confirmDeleteMessage:"Detta objekt kommer att raderas permanent och kan inte återställas.",confirmEmptyAllTitle:"Töm nyligen borttagna?",confirmEmptyAllMessage:"Alla {{count}} objekt kommer att raderas permanent och kommer inte kunna återställas."},_N={title:"Uppgradera valv",subtitle:"AliasVault har uppdaterats och ditt valv måste uppgraderas. Detta bör bara ta några sekunder.",versionInformation:"Versionsinformation",yourVault:"Din valvversion:",newVersion:"Ny tillgänglig version:",upgrade:"Uppgradera valv",upgrading:"Uppgraderar ...",whatsNew:"Vad är nytt",whatsNewDescription:"En uppgradering krävs för att stödja följande ändringar:",noDescriptionAvailable:"Ingen beskrivning tillgänglig för denna version.",alerts:{unableToGetVersionInfo:"Det gick inte att hämta versionsinformation. Försök igen.",selfHostedServer:"Egenhostad server",selfHostedWarning:"Om du använder en egenhostad server, se till att även uppdatera din egenhostade instans eftersom inloggning på webbklienten annars kommer att sluta fungera.",continueUpgrade:"Fortsätt uppgraderingen",upgradeFailed:"Uppgraderingen misslyckades",failedToApplyMigration:"Misslyckades att tillämpa migrering ({{current}} av {{total}})"}},FN={unsyncedChangesTitle:"Osynkade ändringar",unsyncedChangesWarning:"Du har osynkade ändringar som kommer att gå förlorade om du loggar ut nu. Är du säker på att du vill fortsätta?",logoutAnyway:"Logga ut ändå"},ON={offline:"Offline",tapToRetry:"Tryck för att försöka synka igen"},PN={auth:IN,menu:CN,common:SN,content:NN,items:TN,itemTypes:kN,fieldLabels:xN,totp:LN,attachmentUploader:DN,emails:RN,settings:UN,passkeys:MN,recentlyDeleted:BN,upgrade:_N,logout:FN,sync:ON},MU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:DN,auth:IN,common:SN,content:NN,default:PN,emails:RN,fieldLabels:xN,itemTypes:kN,items:TN,logout:FN,menu:CN,passkeys:MN,recentlyDeleted:BN,settings:UN,sync:ON,totp:LN,upgrade:_N},Symbol.toStringTag,{value:"Module"})),jN={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:"Переглянути вміст сховища",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",connectingTo:"Підключення до",switchAccounts:"Змінити обліковий запис?",loginWithMobile:"Увійти за допомогою мобільного додатку",unlockWithMobile:"Розблокувати за допомогою мобільного додатку",scanQrCode:"Проскануйте цей QR-код за допомогою мобільного додатка AliasVault, щоб увійти та розблокувати сховище."},HN={vault:"Vault",emails:"Електронні адреси"},VN={loading:"Завантаження даних...",notice:"Примітка",error:"Помилка",cancel:"Скасувати",confirm:"Підтвердити",remove:"Remove",back:"Назад",next:"Далі",use:"Використовувати",add:"Add",delete:"Видалити",undo:"Скасувати",save:"Зберегти",saving:"Saving...",edit:"Edit",create:"Створити",or:"Або",close:"Закрити",dismiss:"Dismiss",logout:"Вихід",copied:"Скопійовано!",openInNewWindow:"Відкрити у новому вікні",enabled:"Увімкнено",disabled:"Вимкнено",showPassword:"Показати пароль",hidePassword:"Приховати пароль",show:"Show",hide:"Hide",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.",invalidCode:"Please enter a valid 6-digit authentication code.",serverError:"Не вдалося зв’язатися зі сервером AliasVault. Будь ласка, спробуйте пізніше або зверніться до служби підтримки, якщо проблема не зникне.",wrongPassword:"Невірний пароль. Будь ласка, спробуйте ще раз.",sessionExpired:"Час сеансу закінчився. Будь ласка, увійдіть знову.",mobileLoginRequestExpired:"Час очікування запиту на вхід у мобільний додаток закінчився. Перезавантажте сторінку та спробуйте ще раз."},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:"Локальне сховище не оновлене. Синхронізуйте своє сховище, оновивши сторінку, та повторіть спробу."}},zN={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:"Закрити спливаюче вікно",noTotpItemsFound:"No 2FA code matches found",close:"Закрити",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},QN={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:"Ключі доступу ще не створено. Ключі доступу створюються під час відвідування вебсайту, який пропонує ключі доступу як спосіб автентифікації.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Ключі доступу",totp:"2FA Codes"},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:"Це поле обов'язкове"}},KN={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"}},GN={"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"},WN={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},qN={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},YN={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:"Під час спроби завантажити електронні листи сталася помилка. Спробуйте відредагувати та зберегти запис облікових даних, щоб синхронізувати базу даних, а потім повторіть спробу."}},JN={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:"Скинути всі налаштування, характерні для сайту",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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:"Жіноча"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},XN={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 "}},$N={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."},ZN={title:"Оновлення сховища",subtitle:"AliasVault оновлено, і ваше сховище потрібно оновити. Це займе лише кілька секунд.",versionInformation:"Інформація про версію",yourVault:"Ваша версія сховища:",newVersion:"Доступна нова версія:",upgrade:"Оновлення сховища",upgrading:"Оновлення...",whatsNew:"Що нового",whatsNewDescription:"Для підтримки таких змін потрібне оновлення:",noDescriptionAvailable:"Для цієї версії немає опису.",alerts:{unableToGetVersionInfo:"Не вдалося отримати інформацію про версію. Спробуйте ще раз.",selfHostedServer:"Сервер із самостійним розміщенням",selfHostedWarning:"Якщо ви використовуєте власний сервер, обов’язково оновіть і свій власний екземпляр, інакше вхід до вебклієнта перестане працювати.",continueUpgrade:"Продовжити оновлення",upgradeFailed:"Помилка оновлення",failedToApplyMigration:"Не вдалося застосувати міграцію ({{current}} з {{total}})"}},eT={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"},tT={offline:"Offline",tapToRetry:"Tap to retry sync"},aT={auth:jN,menu:HN,common:VN,content:zN,items:QN,itemTypes:KN,fieldLabels:GN,totp:WN,attachmentUploader:qN,emails:YN,settings:JN,passkeys:XN,recentlyDeleted:$N,upgrade:ZN,logout:eT,sync:tT},BU=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:qN,auth:jN,common:VN,content:zN,default:aT,emails:YN,fieldLabels:GN,itemTypes:KN,items:QN,logout:eT,menu:HN,passkeys:XN,recentlyDeleted:$N,settings:JN,sync:tT,totp:WN,upgrade:ZN},Symbol.toStringTag,{value:"Module"})),nT={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:"浏览密码库内容",autoCloseUnlockPopup:"将来登录时自动关闭",closingIn:"{{seconds}} 秒后关闭…",connectingTo:"正在连接",switchAccounts:"切换账户？",loginWithMobile:"使用移动应用登录",unlockWithMobile:"使用移动应用解锁",scanQrCode:"使用 AliasVault 移动端应用扫描该二维码，即可登录并解锁您的密码库。"},iT={vault:"密码库",emails:"邮件"},rT={loading:"加载中…",notice:"注意",error:"错误",cancel:"取消",confirm:"确认",remove:"移除",back:"返回",next:"下一步",use:"使用",add:"添加",delete:"删除",undo:"撤销",save:"保存",saving:"保存中…",edit:"编辑",create:"创建",or:"或",close:"关闭",dismiss:"取消",logout:"退出登录",copied:"已复制！",openInNewWindow:"在新窗口中打开",enabled:"启用",disabled:"禁用",showPassword:"显示密码",hidePassword:"隐藏密码",show:"显示",hide:"隐藏",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:"合并密码库更改失败，请重试。",invalidCode:"请输入有效的 6 位身份验证码。",serverError:"无法访问 AliasVault 服务器。请稍后重试，若问题依旧，请联系支持人员。",wrongPassword:"密码错误，请重试。",sessionExpired:"您的会话已过期。请重新登录。",mobileLoginRequestExpired:"移动端登录请求超时，请重新加载页面后重试。"},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:"本地密码库不是最新的。请刷新页面同步密码库后重试。"}},sT={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:"关闭弹窗",noTotpItemsFound:"未找到匹配的两步验证码",close:"关闭",savePrompt:{title:"保存到 AliasVault？",neverForThisSite:"此网站不再显示",addUrlTitle:"将 URL 添加到凭据？",addUrl:"添加 URL"}},oT={title:"项目",itemName:"名称",loginCredentials:"登录凭据",cardInformation:"卡信息",addItem:"添加项目",addNewItem:"添加新项目",saveItem:"保存项目",itemDetails:"项目详情",editItem:"编辑项目",untitled:"无标题",newFolder:"新建文件夹",createFolder:"创建文件夹",editFolder:"编辑文件夹",folderName:"文件夹名称",folderNameRequired:"文件夹名称为必填项",folder:"文件夹",welcomeTitle:"欢迎使用 AliasVault!",welcomeDescription:"要使用AliasVault浏览器扩展：导航到某个网站，使用AliasVault自动填充弹窗创建新凭据。",noPasskeysFound:"尚未创建通行密钥。访问以通行密钥为认证方式的网站才能创建通行密钥。",noMatchingItems:"没有项目符合所选筛选器。",noMatchingItemsSearch:"未找到匹配“{{search}}”的项目",noMatchingItemsWithFilter:"未找到匹配“{{search}}”的 {{filter}} 项目",clearSearch:"清除搜索",clearFilter:"清除筛选器",emptyFolderHint:"此文件夹为空。要将项目移动到此文件夹，请编辑该项目，然后点击名称字段中的文件夹图标。",allItemsInFolders:"您的所有项目都已整理到文件夹中。点击上方文件夹即可查看您的凭据，或使用搜索查找特定的项目。",deleteFolder:"删除文件夹",deleteFolderKeepItems:"仅删除文件夹",deleteFolderKeepItemsDescription:"项目将被移回主列表。",deleteFolderAndItems:"删除文件夹和所有项目",deleteFolderAndItemsDescription:"{{count}} 个项目将被移至“近期删除”。",filters:{folders:"文件夹",passkeys:"通行密钥",totp:"两步验证码"},sort:{title:"排序方式",oldestFirst:"最早在前",newestFirst:"最新在前",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:"此字段为必填项"}},lT={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:"安全笔记"}},dT={"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"},cT={addCode:"添加两步验证码",instructions:"输入要添加两步验证的网站显示的密钥。",nameOptional:"名称（可选）",secretKey:"密钥",saveToViewCode:"保存以查看验证码",defaultName:"身份验证器",deleteTotpCodeTitle:"删除两步验证码",deleteTotpCodeConfirmation:"您确定要删除两步验证码“{{name}}”吗？",errors:{invalidSecretKey:"密钥格式无效。"}},uT={uploading:"上传中…",uploadSuccess:"文件上传成功。",deleteSuccess:"附件删除成功。",firefoxExpandRequired:"要上传文件，请使用展开的窗口。",openExpandedWindow:"打开展开的窗口"},mT={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:"加载邮件时发生错误。请尝试编辑并保存凭据条目以同步数据库，然后重试。"}},gT={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:"重置所有网站特定设置",autofillPopupDescription:"检测到登录字段时，显示自动填充弹窗。",disabledSites:"禁用的网站",disabledSitesDescription:"自动填充弹窗不会出现的网站。",clearAllDisabledSites:"清除所有禁用的网站",temporaryUntil:"直到",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:"女"}},loginSave:{title:"保存登录提示",description:"在网站上提交登录表单时，显示保存登录凭据的提示。",blockedSites:"屏蔽的网站",blockedSitesDescription:"永远不会出现保存提示的网站。",clearAllBlockedSites:"清除所有屏蔽的网站"},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 码的熵值通常较低，若您的设备遭到入侵，则可能被暴力破解。请仅在您完全信任的设备上使用该方式。"}},hT={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:"通行密钥提供程序于"}},fT={title:"近期删除",noItems:"没有删除的项目",noItemsDescription:"您删除的项目将在此处停留 30 天，随后永久移除。",description:"这些项目将在 30 天后永久删除。您可以立即还原或永久删除。",restore:"还原",deletePermanently:"永久删除",emptyAll:"全部清空",daysRemaining_one:"剩余 {{count}} 天",daysRemaining_other:"剩余 {{count}} 天",expiringSoon:"即将到期",confirmDeleteTitle:"永久删除吗？",confirmDeleteMessage:"此项目将被永久删除，且无法恢复。",confirmEmptyAllTitle:"清空“近期删除”吗？",confirmEmptyAllMessage:"所有 {{count}} 个项目将被永久删除，且无法恢复。"},pT={title:"升级密码库",subtitle:"AliasVault已更新，您的密码库需要升级，仅需数秒。",versionInformation:"版本信息",yourVault:"您的密码库版本：",newVersion:"新可用版本：",upgrade:"升级密码库",upgrading:"升级中…",whatsNew:"新功能",whatsNewDescription:"需要升级才能支持以下更改：",noDescriptionAvailable:"此版本无可用说明。",alerts:{unableToGetVersionInfo:"无法获取版本信息。请重试。",selfHostedServer:"自托管服务器",selfHostedWarning:"如果您使用的是自托管服务器，请确保同时更新您的自托管实例，否则将无法登录网页客户端。",continueUpgrade:"继续升级",upgradeFailed:"升级失败",failedToApplyMigration:"应用迁移失败（{{current}} / {{total}}）"}},AT={unsyncedChangesTitle:"未同步的更改",unsyncedChangesWarning:"您有更改尚未同步，若您现在退出登录，这些更改将会丢失。您确定要继续吗？",logoutAnyway:"仍要退出登录"},yT={offline:"离线",tapToRetry:"点击重试同步"},ET={auth:nT,menu:iT,common:rT,content:sT,items:oT,itemTypes:lT,fieldLabels:dT,totp:cT,attachmentUploader:uT,emails:mT,settings:gT,passkeys:hT,recentlyDeleted:fT,upgrade:pT,logout:AT,sync:yT},_U=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:uT,auth:nT,common:rT,content:sT,default:ET,emails:mT,fieldLabels:dT,itemTypes:lT,items:oT,logout:AT,menu:iT,passkeys:hT,recentlyDeleted:fT,settings:gT,sync:yT,totp:cT,upgrade:pT},Symbol.toStringTag,{value:"Module"})),$l={da:{translation:Mw},de:{translation:Xw},en:{translation:hI},es:{translation:DI},fi:{translation:qI},fr:{translation:uC},he:{translation:kC},it:{translation:KC},nl:{translation:lS},pl:{translation:SS},pt:{translation:VS},ro:{translation:rN},ru:{translation:wN},sv:{translation:PN},uk:{translation:aT},zh:{translation:ET}},ad=[{code:"da",name:"Danish",nativeName:"Dansk",flag:"🇩🇰"},{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:"sv",name:"Swedish",nativeName:"Svenska",flag:"🇸🇪"},{code:"uk",name:"Ukrainian",nativeName:"Українська",flag:"🇺🇦"},{code:"zh",name:"Chinese",nativeName:"简体中文",flag:"🇨🇳"}],Oi="en",Cu=ad.map(t=>t.code),Qc=new Map;async function RE(t){const e=`all:${t}`;if(Qc.has(e))return Qc.get(e);if($l[t]){const n=$l[t].translation;return Qc.set(e,n),n}if(t!==Oi&&$l[Oi]){console.warn(`Translations not found for ${t}, falling back to ${Oi}`);const n=$l[Oi].translation;return Qc.set(e,n),n}return console.warn(`No translations found for ${t} and no fallback available`),{}}function FU(t){return ad.find(e=>e.code===t)}function UE(t,e){return e.split(".").reduce((n,r)=>n&&typeof n=="object"&&n!==null&&r in n?n[r]:void 0,t)}async function OU(){try{const t=await xe.getItem("local:language");if(t&&Cu.includes(t))return t;const e=navigator.language.split("-")[0],n=Cu.includes(e)?e:Oi;return await xe.setItem("local:language",n),n}catch(t){return console.error("Failed to get current language:",t),Oi}}async function PU(t,e){try{const n=await OU(),r=await RE(n),s=UE(r,t);if(s&&typeof s=="string")return s;if(n!==Oi){const l=await RE(Oi),c=UE(l,t);if(c&&typeof c=="string")return c}return e||t}catch(n){return console.error("Translation error:",n),e||t}}function jU(t){return t.toISOString().replace("T"," ").replace("Z","").substring(0,23)}function Ch(){return jU(new Date)}class Sd{constructor(e){this.client=e}async withTransaction(e){this.client.beginTransaction();try{const n=await e();return await this.client.commitTransaction(),n}catch(n){throw this.client.rollbackTransaction(),n}}softDelete(e,n){const r=Ch();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?`,[r,n])}softDeleteByForeignKey(e,n,r){const s=Ch();return this.client.executeUpdate(`UPDATE ${e} SET IsDeleted = 1, UpdatedAt = ? WHERE ${n} = ?`,[s,r])}hardDelete(e,n){return this.client.executeUpdate(`DELETE FROM ${e} WHERE Id = ?`,[n])}hardDeleteByForeignKey(e,n,r){return this.client.executeUpdate(`DELETE FROM ${e} WHERE ${n} = ?`,[r])}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 Ch()}buildInClause(e){return{placeholders:e.map(()=>"?").join(","),values:e}}}var gn={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"},Ea={Login:"Login",Alias:"Alias",CreditCard:"CreditCard",Note:"Note"},ea={Text:"Text",Password:"Password",Hidden:"Hidden",Email:"Email",URL:"URL",Date:"Date",Number:"Number",Phone:"Phone",TextArea:"TextArea"},mt={Primary:"Primary",Login:"Login",Alias:"Alias",Card:"Card",Custom:"Custom",Notes:"Notes",Metadata:"Metadata"},hp={"login.email":{FieldKey:"login.email",FieldType:"Email",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!1},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:mt.Login,DefaultDisplayOrder:10},"login.username":{FieldKey:"login.username",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:mt.Login,DefaultDisplayOrder:15},"login.password":{FieldKey:"login.password",FieldType:"Password",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!0,Category:mt.Login,DefaultDisplayOrder:20},"login.url":{FieldKey:"login.url",FieldType:"URL",IsHidden:!1,IsMultiValue:!0,ApplicableToTypes:{Login:{ShowByDefault:!0},Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Primary,DefaultDisplayOrder:5},"alias.first_name":{FieldKey:"alias.first_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:20},"alias.last_name":{FieldKey:"alias.last_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:30},"alias.gender":{FieldKey:"alias.gender",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:50},"alias.birthdate":{FieldKey:"alias.birthdate",FieldType:"Date",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{Alias:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Alias,DefaultDisplayOrder:60},"card.cardholder_name":{FieldKey:"card.cardholder_name",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:10},"card.number":{FieldKey:"card.number",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:20},"card.expiry_month":{FieldKey:"card.expiry_month",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:30},"card.expiry_year":{FieldKey:"card.expiry_year",FieldType:"Text",IsHidden:!1,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:40},"card.cvv":{FieldKey:"card.cvv",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!0}},EnableHistory:!1,Category:mt.Card,DefaultDisplayOrder:50},"card.pin":{FieldKey:"card.pin",FieldType:"Hidden",IsHidden:!0,IsMultiValue:!1,ApplicableToTypes:{CreditCard:{ShowByDefault:!1}},EnableHistory:!1,Category:mt.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:mt.Notes,DefaultDisplayOrder:100}};function No(t){return hp[t]}function nd(t,e){return e in t.ApplicableToTypes}function Zl(t,e){const n=t.ApplicableToTypes[e];return(n==null?void 0:n.ShowByDefault)??!1}function HU(t){return Object.values(hp).filter(e=>nd(e,t)).sort((e,n)=>e.DefaultDisplayOrder-n.DefaultDisplayOrder)}function VU(t){return Object.values(hp).filter(e=>nd(e,t)&&!Zl(e,t)).sort((e,n)=>e.DefaultDisplayOrder-n.DefaultDisplayOrder)}function Kc(t,e){const n=t.Fields.find(r=>r.FieldKey===e);if(n)return Array.isArray(n.Value)?n.Value[0]:n.Value}function zU(t,e){const n={};return t.Fields.forEach(r=>{const s=e(r);n[s]||(n[s]=[]),n[s].push(r)}),n}function QU(t){const e=zU(t,n=>n.FieldKey.startsWith("login.")?mt.Login:n.FieldKey.startsWith("alias.")?mt.Alias:n.FieldKey.startsWith("card.")?mt.Card:n.FieldKey.startsWith("notes.")?mt.Notes:n.FieldKey.startsWith("metadata.")?mt.Metadata:mt.Custom);for(const n of Object.keys(e))e[n].sort((r,s)=>(r.DisplayOrder??0)-(s.DisplayOrder??0));return e}function Gc(t,e){const n=No(t);if(!n)throw new Error(`Unknown system field: ${t}. Use createCustomField for custom fields.`);return{FieldKey:t,Label:e.label??t,FieldType:n.FieldType,Value:e.value,IsHidden:n.IsHidden,DisplayOrder:e.displayOrder??n.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:n.EnableHistory}}var Sh=10;class Nh{static processFieldRows(e){const n=e.map(l=>this.processFieldRow(l)),r=new Map,s=new Map;for(const l of n){const c=`${l.ItemId}_${l.FieldKey}`;s.has(c)||s.set(c,[]),s.get(c).push(l.Value),r.has(l.ItemId)||r.set(l.ItemId,[]);const m=r.get(l.ItemId);m.find(g=>g.FieldKey===l.FieldKey)||m.push({FieldKey:l.FieldKey,Label:l.Label,FieldType:l.FieldType,Value:"",IsHidden:l.IsHidden===1,DisplayOrder:l.DisplayOrder,IsCustomField:l.IsCustomField,EnableHistory:l.EnableHistory})}for(const[l,c]of r)for(const m of c){const h=`${l}_${m.FieldKey}`,g=s.get(h)||[];g.length===1?m.Value=g[0]:m.Value=g}return r}static processFieldRow(e){if(e.FieldKey){const n=No(e.FieldKey);return{ItemId:e.ItemId,FieldKey:e.FieldKey,Label:e.FieldKey,FieldType:(n==null?void 0:n.FieldType)||ea.Text,IsHidden:n!=null&&n.IsHidden?1:0,Value:e.Value,DisplayOrder:(n==null?void 0:n.DefaultDisplayOrder)??e.DisplayOrder,IsCustomField:!1,EnableHistory:(n==null?void 0:n.EnableHistory)??!1}}else return{ItemId:e.ItemId,FieldKey:e.FieldDefinitionId||"",Label:e.CustomLabel||"",FieldType:e.CustomFieldType||ea.Text,IsHidden:e.CustomIsHidden||0,Value:e.Value,DisplayOrder:e.DisplayOrder,IsCustomField:!0,EnableHistory:e.CustomEnableHistory===1}}static processFieldRowsForSingleItem(e){const n=new Map,r=new Map;for(const s of e){const l=s.FieldKey||s.FieldDefinitionId||"";if(n.has(l)||n.set(l,[]),n.get(l).push(s.Value),!r.has(l))if(s.FieldKey){const c=No(s.FieldKey);r.set(l,{FieldKey:s.FieldKey,Label:s.FieldKey,FieldType:(c==null?void 0:c.FieldType)||ea.Text,IsHidden:c!=null&&c.IsHidden?1:0,DisplayOrder:(c==null?void 0:c.DefaultDisplayOrder)??s.DisplayOrder,IsCustomField:!1,EnableHistory:(c==null?void 0:c.EnableHistory)??!1})}else r.set(l,{FieldKey:l,Label:s.CustomLabel||"",FieldType:s.CustomFieldType||ea.Text,IsHidden:s.CustomIsHidden||0,DisplayOrder:s.DisplayOrder,IsCustomField:!0,EnableHistory:s.CustomEnableHistory===1})}return Array.from(r.entries()).map(([s,l])=>{const c=n.get(s)||[];return{...l,FieldType:l.FieldType,Value:c.length===1?c[0]:c,IsHidden:l.IsHidden===1,IsCustomField:l.IsCustomField,EnableHistory:l.EnableHistory}})}}class Ol{static mapRow(e,n=[],r=[]){return{Id:e.Id,Name:e.Name,ItemType:e.ItemType,Logo:e.Logo??void 0,FolderId:e.FolderId,FolderPath:e.FolderPath||null,Tags:r,Fields:n,HasPasskey:e.HasPasskey===1,HasAttachment:e.HasAttachment===1,HasTotp:e.HasTotp===1,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}static mapRows(e,n,r){return e.map(s=>this.mapRow(s,n.get(s.Id)||[],r.get(s.Id)||[]))}static groupTagsByItem(e){const n=new Map;for(const r of e)n.has(r.ItemId)||n.set(r.ItemId,[]),n.get(r.ItemId).push({Id:r.Id,Name:r.Name,Color:r.Color||void 0});return n}static mapTagRows(e){return e.map(n=>({Id:n.Id,Name:n.Name,Color:n.Color||void 0}))}static mapDeletedItemRow(e,n=[]){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:n,CreatedAt:e.CreatedAt,UpdatedAt:e.UpdatedAt}}}function ME(t){return new Date(t).getTime()}class Th{static mapRow(e){return{Id:e.Id,ItemId:e.ItemId,RpId:e.RpId,UserHandle:e.UserHandle?new Uint8Array(e.UserHandle):void 0,PublicKey:e.PublicKey,PrivateKey:e.PrivateKey,DisplayName:e.DisplayName,PrfKey:e.PrfKey?new Uint8Array(e.PrfKey):void 0,AdditionalData:e.AdditionalData,CreatedAt:ME(e.CreatedAt),UpdatedAt:ME(e.UpdatedAt),IsDeleted:e.IsDeleted}}static mapRowWithItem(e){return{...this.mapRow(e),Username:e.Username,ServiceName:e.ServiceName}}static mapRows(e){return e.map(n=>this.mapRow(n))}static mapRowsWithItem(e){return e.map(n=>this.mapRowWithItem(n))}}const Ka=class Ka{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`}};Ge(Ka,"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`),Ge(Ka,"GET_ALL_ACTIVE",`
    ${Ka.BASE_SELECT}
    WHERE i.IsDeleted = 0 AND i.DeletedAt IS NULL
    ORDER BY i.CreatedAt DESC`),Ge(Ka,"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`),Ge(Ka,"GET_RECENTLY_DELETED",`
    ${Ka.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`),Ge(Ka,"COUNT_RECENTLY_DELETED",`
    SELECT COUNT(*) as count
    FROM Items
    WHERE IsDeleted = 0 AND DeletedAt IS NOT NULL`),Ge(Ka,"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`),Ge(Ka,"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`),Ge(Ka,"INSERT_ITEM",`
    INSERT INTO Items (Id, Name, ItemType, LogoId, FolderId, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?)`),Ge(Ka,"UPDATE_ITEM",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = COALESCE(?, LogoId),
        UpdatedAt = ?
    WHERE Id = ?`),Ge(Ka,"UPDATE_ITEM_WITH_LOGO",`
    UPDATE Items
    SET Name = ?,
        ItemType = ?,
        FolderId = ?,
        LogoId = ?,
        UpdatedAt = ?
    WHERE Id = ?`),Ge(Ka,"TRASH_ITEM",`
    UPDATE Items
    SET DeletedAt = ?,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0`),Ge(Ka,"RESTORE_ITEM",`
    UPDATE Items
    SET DeletedAt = NULL,
        UpdatedAt = ?
    WHERE Id = ? AND IsDeleted = 0 AND DeletedAt IS NOT NULL`),Ge(Ka,"TOMBSTONE_ITEM",`
    UPDATE Items
    SET IsDeleted = 1,
        Name = NULL,
        LogoId = NULL,
        FolderId = NULL,
        UpdatedAt = ?
    WHERE Id = ?`),Ge(Ka,"GET_LOGO_ID",`
    SELECT LogoId FROM Items WHERE Id = ?`),Ge(Ka,"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 un=Ka;class Ei{}Ge(Ei,"GET_EXISTING_FOR_ITEM",`
    SELECT Id, FieldKey, FieldDefinitionId, Value, Weight
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0`),Ge(Ei,"INSERT",`
    INSERT INTO FieldValues (Id, ItemId, FieldDefinitionId, FieldKey, Value, Weight, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),Ge(Ei,"UPDATE",`
    UPDATE FieldValues
    SET Value = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`),Ge(Ei,"SOFT_DELETE",`
    UPDATE FieldValues
    SET IsDeleted = 1,
        UpdatedAt = ?
    WHERE Id = ?`),Ge(Ei,"GET_FOR_HISTORY",`
    SELECT FieldKey, Value
    FROM FieldValues
    WHERE ItemId = ? AND IsDeleted = 0 AND FieldKey IS NOT NULL`);class gr{}Ge(gr,"EXISTS",`
    SELECT Id FROM FieldDefinitions WHERE Id = ?`),Ge(gr,"EXISTS_ACTIVE",`
    SELECT Id FROM FieldDefinitions WHERE Id = ? AND IsDeleted = 0`),Ge(gr,"INSERT",`
    INSERT INTO FieldDefinitions (Id, FieldType, Label, IsMultiValue, IsHidden, EnableHistory, Weight, ApplicableToTypes, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`),Ge(gr,"UPDATE",`
    UPDATE FieldDefinitions
    SET Label = ?,
        FieldType = ?,
        IsHidden = ?,
        Weight = ?,
        UpdatedAt = ?
    WHERE Id = ?`);class Fi{static softDeleteOld(e){return`
      UPDATE FieldHistories
      SET IsDeleted = 1, UpdatedAt = ?
      WHERE Id IN (${Array(e).fill("?").join(",")})`}}Ge(Fi,"INSERT",`
    INSERT INTO FieldHistories (Id, ItemId, FieldDefinitionId, FieldKey, ValueSnapshot, ChangedAt, CreatedAt, UpdatedAt, IsDeleted)
    VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`),Ge(Fi,"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 ?`),Ge(Fi,"GET_FOR_PRUNING",`
    SELECT Id, ChangedAt
    FROM FieldHistories
    WHERE ItemId = ? AND FieldKey = ? AND IsDeleted = 0
    ORDER BY ChangedAt DESC`),Ge(Fi,"SOFT_DELETE",`
    UPDATE FieldHistories
    SET IsDeleted = 1, UpdatedAt = ?
    WHERE Id = ?`);class KU extends Sd{constructor(e,n){super(e),this.logoRepository=n}getAll(){let e;try{e=this.client.executeQuery(un.GET_ALL_ACTIVE)}catch(m){if(m instanceof Error&&m.message.includes("no such table"))return[];throw m}if(e.length===0)return[];const n=e.map(m=>m.Id),r=this.client.executeQuery(un.getFieldValuesForItems(n.length),n),s=Nh.processFieldRows(r),l=this.client.executeQuery(un.getTagsForItems(n.length),n),c=Ol.groupTagsByItem(l);return Ol.mapRows(e,s,c)}getById(e){const n=this.client.executeQuery(un.GET_BY_ID,[e]);if(n.length===0)return null;const r=this.client.executeQuery(un.GET_FIELD_VALUES_FOR_ITEM,[e]),s=Nh.processFieldRowsForSingleItem(r),l=this.client.executeQuery(un.GET_TAGS_FOR_ITEM,[e]),c=Ol.mapTagRows(l);return Ol.mapRow(n[0],s,c)}getAllEmailAddresses(){return this.client.executeQuery(un.GET_ALL_EMAIL_ADDRESSES,[gn.LoginEmail]).map(n=>n.Email)}async create(e,n=[],r=[]){return this.withTransaction(async()=>{const s=this.now(),l=e.Id||this.generateId(),c=this.resolveLogoId(e,s);return this.client.executeUpdate(un.INSERT_ITEM,[l,e.Name??null,e.ItemType,c,e.FolderId??null,s,s,0]),e.Fields&&e.Fields.length>0&&this.insertFieldValues(l,e.Fields,e.ItemType,s),this.insertTotpCodes(l,r,s),this.insertAttachments(l,n,s),l})}async update(e,n=[],r=[],s=[],l=[]){return this.withTransaction(async()=>{const c=this.now(),m=this.resolveLogoId(e,c),h=this.client.executeQuery("SELECT Name, ItemType, FolderId, LogoId FROM Items WHERE Id = ?",[e.Id])[0];if(h){const g=(e.Name??null)!==h.Name,A=String(e.ItemType)!==String(h.ItemType),p=(e.FolderId??null)!==h.FolderId,v=m!==h.LogoId;(g||A||p||v)&&this.client.executeUpdate(un.UPDATE_ITEM_WITH_LOGO,[e.Name??null,e.ItemType,e.FolderId??null,m,c,e.Id])}return await this.trackFieldHistory(e.Id,e.Fields,c),this.updateFieldValues(e,c),this.handleTotpCodes(e.Id,l,s,c),this.handleAttachments(e.Id,r,n,c),1})}async trash(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(un.TRASH_ITEM,[n,n,e])})}async restore(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(un.RESTORE_ITEM,[n,e])})}async permanentlyDelete(e){return this.withTransaction(async()=>{const n=this.now(),r=this.client.executeQuery(un.GET_LOGO_ID,[e]),s=r.length>0?r[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 l=this.client.executeUpdate(un.TOMBSTONE_ITEM,[n,e]);return s&&this.logoRepository.cleanupOrphanedLogo(s),l})}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(l){if(l instanceof Error&&l.message.includes("no such table"))return[];throw l}if(e.length===0)return[];const n=e.map(l=>l.Id),r=this.client.executeQuery(un.getFieldValuesForItems(n.length),n),s=Nh.processFieldRows(r);return e.map(l=>Ol.mapDeletedItemRow(l,s.get(l.Id)||[]))}getRecentlyDeletedCount(){var e;try{return((e=this.client.executeQuery(un.COUNT_RECENTLY_DELETED)[0])==null?void 0:e.count)||0}catch(n){if(n instanceof Error&&n.message.includes("no such table"))return 0;throw n}}getFieldHistory(e,n){return this.client.executeQuery(Fi.GET_FOR_FIELD,[e,n,Sh]).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 n=this.now();return this.client.executeUpdate(Fi.SOFT_DELETE,[n,e])})}resolveLogoId(e,n){var m;const r=(m=e.Fields)==null?void 0:m.find(h=>h.FieldKey==="login.url"),s=r==null?void 0:r.Value,l=Array.isArray(s)?s[0]:s,c=this.logoRepository.extractSourceFromUrl(l);if(e.Logo){const h=this.logoRepository.convertLogoToUint8Array(e.Logo);if(h)return this.logoRepository.getOrCreate(c,h,n)}else if(c!=="unknown")return this.logoRepository.getIdForSource(c);return null}insertFieldValues(e,n,r,s){for(const l of n){if((!l.Value||typeof l.Value=="string"&&l.Value.trim()==="")&&!l.IsCustomField)continue;let m=null;l.IsCustomField&&(m=this.ensureFieldDefinition(l,r,s));const g=(Array.isArray(l.Value)?l.Value:[l.Value]).filter(p=>p&&p.trim()!==""),A=l.IsCustomField&&g.length===0?[""]:g;for(const p of A)this.client.executeUpdate(Ei.INSERT,[this.generateId(),e,m,l.IsCustomField?null:l.FieldKey,p,l.DisplayOrder??0,s,s,0]);if(l.EnableHistory&&g.length>0){const p=this.generateId(),v=JSON.stringify(g);this.client.executeUpdate(Fi.INSERT,[p,e,null,l.FieldKey,v,s,s,s,0])}}}ensureFieldDefinition(e,n,r){return this.client.executeQuery(gr.EXISTS,[e.FieldKey]).length===0&&this.client.executeUpdate(gr.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,n,r,r,0]),e.FieldKey}updateFieldValues(e,n){const r=this.client.executeQuery(Ei.GET_EXISTING_FOR_ITEM,[e.Id]),s=new Map,l=new Map;for(const m of r){const h=m.FieldKey||m.FieldDefinitionId||"",g=l.get(h)||0;s.set(`${h}:${g}`,{Id:m.Id,Value:m.Value,Weight:m.Weight}),l.set(h,g+1)}const c=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,n));const A=Array.isArray(m.Value)?m.Value:[m.Value],p=m.FieldKey,v=A.filter(T=>T&&(typeof T!="string"||T.trim()!=="")),w=m.IsCustomField&&v.length===0?[""]:v;for(let T=0;T<w.length;T++){const S=w[T],k=`${p}:${T}`,L=s.get(k);if(L){c.add(L.Id);const U=m.DisplayOrder??0;(L.Value!==S||L.Weight!==U)&&this.client.executeUpdate(Ei.UPDATE,[S,U,n,L.Id])}else this.client.executeUpdate(Ei.INSERT,[this.generateId(),e.Id,g,m.IsCustomField?null:m.FieldKey,S,m.DisplayOrder??0,n,n,0])}}for(const m of r)c.has(m.Id)||this.client.executeUpdate(Ei.SOFT_DELETE,[n,m.Id])}ensureOrUpdateFieldDefinition(e,n,r){return this.client.executeQuery(gr.EXISTS_ACTIVE,[e.FieldKey]).length===0?this.client.executeUpdate(gr.INSERT,[e.FieldKey,e.FieldType,e.Label,0,e.IsHidden?1:0,0,e.DisplayOrder??0,n,r,r,0]):this.client.executeUpdate(gr.UPDATE,[e.Label,e.FieldType,e.IsHidden?1:0,e.DisplayOrder??0,r,e.FieldKey]),e.FieldKey}async trackFieldHistory(e,n,r){const s=this.client.executeQuery(Ei.GET_FOR_HISTORY,[e]),l={};for(const c of s)l[c.FieldKey]||(l[c.FieldKey]=[]),l[c.FieldKey].push(c.Value);for(const c of n){if(!c.EnableHistory)continue;const m=l[c.FieldKey]||[],g=(Array.isArray(c.Value)?c.Value:[c.Value]).filter(p=>p&&p.trim()!=="");if((m.length!==g.length||!m.every((p,v)=>p===g[v]))&&g.length>0){const p=this.generateId(),v=JSON.stringify(g);this.client.executeUpdate(Fi.INSERT,[p,e,null,c.FieldKey,v,r,r,r,0]),await this.pruneFieldHistory(e,c.FieldKey,r)}}}async pruneFieldHistory(e,n,r){const s=this.client.executeQuery(Fi.GET_FOR_PRUNING,[e,n]);if(s.length>Sh){const c=s.slice(Sh).map(m=>m.Id);c.length>0&&this.client.executeUpdate(Fi.softDeleteOld(c.length),[r,...c])}}insertTotpCodes(e,n,r){for(const s of n)this.client.executeUpdate(`INSERT INTO TotpCodes (Id, Name, SecretKey, ItemId, CreatedAt, UpdatedAt, IsDeleted)
         VALUES (?, ?, ?, ?, ?, ?, ?)`,[s.Id||this.generateId(),s.Name,s.SecretKey,e,r,r,0])}handleTotpCodes(e,n,r,s){const l=this.client.executeQuery("SELECT Id, Name, SecretKey FROM TotpCodes WHERE ItemId = ? AND IsDeleted = 0",[e]),c=new Map(l.map(m=>[m.Id,m]));for(const m of n){const h=r.includes(m.Id);if(m.IsDeleted)h&&this.client.executeUpdate("UPDATE TotpCodes SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,m.Id]);else if(h){const g=c.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,n,r){for(const s of n){const l=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,l,e,r,r,0])}}handleAttachments(e,n,r,s){const l=new Set(n.map(c=>c.Id));for(const c of r)l.has(c)||this.client.executeUpdate("UPDATE Attachments SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,c]);for(const c of n){const m=r.includes(c.Id);if(c.IsDeleted)m&&this.client.executeUpdate("UPDATE Attachments SET IsDeleted = 1, UpdatedAt = ? WHERE Id = ?",[s,c.Id]);else if(!m){const h=c.Blob instanceof Uint8Array?c.Blob:new Uint8Array(c.Blob);this.client.executeUpdate(`INSERT INTO Attachments (Id, Filename, Blob, ItemId, CreatedAt, UpdatedAt, IsDeleted)
           VALUES (?, ?, ?, ?, ?, ?, ?)`,[c.Id||this.generateId(),c.Filename,h,e,s,s,0])}}}}const Ns={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 = '${gn.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 = '${gn.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 GU extends Sd{getByRpId(e){const n=this.client.executeQuery(Ns.GET_BY_RP_ID,[e]);return Th.mapRowsWithItem(n)}getById(e){const n=this.client.executeQuery(Ns.GET_BY_ID_WITH_ITEM,[e]);return n.length===0?null:Th.mapRowWithItem(n[0])}getByItemId(e){const n=this.client.executeQuery(Ns.GET_BY_ITEM_ID,[e]);return Th.mapRows(n)}async create(e){return this.withTransaction(async()=>{const n=this.now();let r=null;e.PrfKey&&(r=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(Ns.INSERT,[e.Id,e.ItemId,e.RpId,s,e.PublicKey,e.PrivateKey,r,e.DisplayName,e.AdditionalData??null,n,n,0])})}async deleteById(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(Ns.SOFT_DELETE,[n,e])})}async deleteByItemId(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(Ns.SOFT_DELETE_BY_ITEM,[n,e])})}async updateDisplayName(e,n){return this.withTransaction(async()=>{const r=this.now();return this.client.executeUpdate(Ns.UPDATE_DISPLAY_NAME,[n,r,e])})}}const dr={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 WU extends Sd{async create(e,n){return this.withTransaction(async()=>{const r=crypto.randomUUID().toUpperCase(),s=this.now();return this.client.executeUpdate(dr.INSERT,[r,e,n||null,s,s]),r})}getAll(){try{return this.client.executeQuery(dr.GET_ALL)}catch(e){if(e instanceof Error&&e.message.includes("no such table"))return[];throw e}}getById(e){const n=this.client.executeQuery(dr.GET_BY_ID,[e]);return n.length>0?n[0]:null}async update(e,n){return this.withTransaction(async()=>{const r=this.now();return this.client.executeUpdate(dr.UPDATE_NAME,[n,r,e])})}async delete(e){return this.withTransaction(async()=>{const n=this.now();return this.client.executeUpdate(dr.CLEAR_ITEMS_FOLDER,[n,e]),this.client.executeUpdate(dr.SOFT_DELETE,[n,e])})}async deleteWithContents(e){return this.withTransaction(async()=>{const n=this.now(),r=this.client.executeUpdate(dr.TRASH_ITEMS_IN_FOLDER,[n,n,e]);return this.client.executeUpdate(dr.SOFT_DELETE,[n,e]),r})}async moveItem(e,n){return this.withTransaction(async()=>{const r=this.now();return this.client.executeUpdate(dr.MOVE_ITEM,[n,r,e])})}}const Wc={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 qU extends Sd{getSetting(e,n=""){const r=this.client.executeQuery(Wc.GET_SETTING,[e]);return r.length>0?r[0].Value:n}getDefaultIdentityLanguage(){return this.getSetting("DefaultIdentityLanguage")}getDefaultIdentityGender(){return this.getSetting("DefaultIdentityGender","random")}getDefaultIdentityAgeRange(){return this.getSetting("DefaultIdentityAgeRange","random")}getPasswordSettings(){const e=this.getSetting("PasswordGenerationSettings"),n={Length:18,UseLowercase:!0,UseUppercase:!0,UseNumbers:!0,UseSpecialChars:!0,UseNonAmbiguousChars:!1};try{if(e)return{...n,...JSON.parse(e)}}catch(r){console.warn("Failed to parse password settings:",r)}return n}getAllEncryptionKeys(){return this.client.executeQuery(Wc.GET_ENCRYPTION_KEYS)}getTotpCodesForItem(e){try{return this.tableExists("TotpCodes")?this.client.executeQuery(Wc.GET_TOTP_FOR_ITEM,[e]):[]}catch(n){return console.error("Error getting TOTP codes for item:",n),[]}}getAttachmentsForItem(e){try{return this.tableExists("Attachments")?this.client.executeQuery(Wc.GET_ATTACHMENTS_FOR_ITEM,[e]):[]}catch(n){return console.error("Error getting attachments for item:",n),[]}}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,n){var c;const r=this.now();((c=this.client.executeQuery("SELECT COUNT(*) as count FROM Settings WHERE Key = ?",[e])[0])==null?void 0:c.count)>0?this.client.executeUpdate("UPDATE Settings SET Value = ?, UpdatedAt = ? WHERE Key = ?",[n,r,e]):this.client.executeUpdate("INSERT INTO Settings (Key, Value, CreatedAt, UpdatedAt, IsDeleted) VALUES (?, ?, ?, ?, ?)",[e,n,r,r,0])}setCredentialsSortOrder(e){this.updateSetting("CredentialsSortOrder",e)}}const Pl={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 YU extends Sd{hasLogoForSource(e){return this.client.executeQuery(Pl.GET_ID_FOR_SOURCE,[e]).length>0}getIdForSource(e){const n=this.client.executeQuery(Pl.GET_ID_FOR_SOURCE,[e]);return n.length>0?n[0].Id:null}getOrCreate(e,n,r){const s=this.getIdForSource(e);if(s)return s;const l=this.generateId();return this.client.executeUpdate(Pl.INSERT,[l,e,n,r,r,0]),l}cleanupOrphanedLogo(e){const n=this.client.executeQuery(Pl.COUNT_USAGE,[e]);(n.length>0?n[0].count:0)===0&&(this.client.executeUpdate(Pl.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 n=Object.values(e);return new Uint8Array(n)}if(Array.isArray(e)||e instanceof ArrayBuffer||e instanceof Uint8Array)return new Uint8Array(e)}catch(n){console.warn("Failed to convert logo to Uint8Array:",n)}return null}}class Mf{constructor(){Ge(this,"db",null);Ge(this,"isInTransaction",!1);Ge(this,"_items",null);Ge(this,"_passkeys",null);Ge(this,"_folders",null);Ge(this,"_settings",null);Ge(this,"_logos",null)}get items(){return this._items||(this._items=new KU(this,this.logos)),this._items}get passkeys(){return this._passkeys||(this._passkeys=new GU(this)),this._passkeys}get folders(){return this._folders||(this._folders=new WU(this)),this._folders}get settings(){return this._settings||(this._settings=new qU(this)),this._settings}get logos(){return this._logos||(this._logos=new YU(this)),this._logos}getDb(){return this.db}async initializeFromBase64(e){try{const n=atob(e),r=new Uint8Array(n.length);for(let l=0;l<n.length;l++)r[l]=n.charCodeAt(l);const s=await yU({locateFile:l=>`src/${l}`});this.db=new s.Database(r),this._items=null,this._passkeys=null,this._folders=null,this._settings=null,this._logos=null}catch(n){throw console.error("Error initializing SQLite database:",n),n}}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 n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}catch(e){throw console.error("Error exporting SQLite database:",e),e}}executeQuery(e,n=[]){if(!this.db)throw new Error("Database not initialized");try{const r=this.db.prepare(e);r.bind(n);const s=[];for(;r.step();)s.push(r.getAsObject());return r.free(),s}catch(r){throw console.error("Error executing query:",r),r}}executeUpdate(e,n=[]){if(!this.db)throw new Error("Database not initialized");try{const r=this.db.prepare(e);r.bind(n),r.step();const s=this.db.getRowsModified();return r.free(),s}catch(r){throw console.error("Error executing update:",r),r}}executeRaw(e){if(!this.db)throw new Error("Database not initialized");try{const n=e.split(";");for(const r of n){const s=r.trim();s.length===0||s.toUpperCase().startsWith("BEGIN TRANSACTION")||s.toUpperCase().startsWith("COMMIT")||s.toUpperCase().startsWith("ROLLBACK")||this.db.run(s)}}catch(n){throw console.error("Error executing raw SQL:",n),n}}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 n=e[0].MigrationId,r=bU(n);if(!r)throw new Error("Could not extract version from migration ID");const s=EU(r);if(!s.isCompatible){const m=await PU("common.errors.browserExtensionOutdated");throw new fd(m)}if(s.isKnownVersion&&s.clientVersion)return s.clientVersion;const c=new Uf().getLatestVersion();return{revision:c.revision,version:r,description:`Unknown version ${r} (backwards compatible)`,releaseVersion:c.releaseVersion,compatibleUpToVersion:c.compatibleUpToVersion}}catch(e){throw console.error("Error getting database version:",e),e}}async getLatestDatabaseVersion(){const n=new Uf().getAllVersions();return n[n.length-1]}async hasPendingMigrations(){try{const e=await this.getDatabaseVersion(),n=await this.getLatestDatabaseVersion();return e.revision<n.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 n=this.toUint8Array(e),r=this.base64Encode(n);return r?`data:${this.detectMimeType(n)};base64,${r}`:null}catch(n){return console.error("Error setting logo:",n),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 n=()=>{const l=new TextDecoder().decode(e.slice(0,5)).toLowerCase();return l.includes("<?xml")||l.includes("<svg")},r=()=>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 n()?"image/svg+xml":r()?"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 n=Object.keys(e).length,r=new Uint8Array(n);for(let s=0;s<n;s++)r[s]=e[s];return r}static base64Encode(e){try{const n=Array.from(this.toUint8Array(e));return btoa(n.reduce((r,s)=>r+String.fromCharCode(s),""))}catch(n){return console.error("Error encoding to base64:",n),null}}}const BE={"local:publicEmailDomains":"session:publicEmailDomains","local:privateEmailDomains":"session:privateEmailDomains","local:hiddenPrivateEmailDomains":"session:hiddenPrivateEmailDomains","local:encryptionKeyDerivationParams":"session:encryptionKeyDerivationParams"};async function id(t){let e=await xe.getItem(t);if(e===null&&t in BE){const n=BE[t];e=await xe.getItem(n),e!==null&&(await xe.setItem(t,e),await xe.removeItem(n))}return e}const bT=b.createContext(void 0),JU=({children:t})=>{const[e,n]=b.useState(null),[r,s]=b.useState(!1),[l,c]=b.useState(!1),[m,h]=b.useState(!1),g=b.useRef(!1),[A,p]=b.useState(!1),[v,w]=b.useState(!1),[T,S]=b.useState(!1),[k,L]=b.useState(0),U=b.useCallback(()=>A||v,[A,v]),x=b.useCallback(async Y=>{g.current=Y,h(Y),await xe.setItem("local:isOfflineMode",Y)},[]);b.useEffect(()=>{(async()=>{const[le,J,ie]=await Promise.all([xe.getItem("local:isOfflineMode"),xe.getItem("local:isDirty"),xe.getItem("local:serverRevision")]);g.current=le??!1,h(le??!1),p(J??!1),L(ie??0)})()},[]);const F=b.useCallback(async Y=>{const le=new Mf;return await le.initializeFromBase64(Y),n(le),s(!0),c(!0),le},[]),B=b.useCallback(async()=>{try{const Y=await St("GET_VAULT",{},"background");if(!(Y!=null&&Y.success)&&(Y!=null&&Y.error))throw new Error(Y.error);if(Y!=null&&Y.vault){const le=new Mf;return await le.initializeFromBase64(Y.vault),n(le),s(!0),c(!0),le}else return s(!0),c(!1),null}catch(Y){throw console.error("Error retrieving vault from background:",Y),s(!0),c(!1),Y}},[]),V=b.useCallback(async()=>{try{const Y=await id("local:publicEmailDomains"),le=await id("local:privateEmailDomains"),J=await id("local:hiddenPrivateEmailDomains"),ie=await xe.getItem("local:serverRevision");return!Y&&!le?null:{publicEmailDomains:Y??[],privateEmailDomains:le??[],hiddenPrivateEmailDomains:J??[],serverRevision:ie??0}}catch(Y){return console.error("Error getting vault metadata from local storage:",Y),null}},[]),O=b.useCallback(async()=>{const[Y,le]=await Promise.all([xe.getItem("local:isDirty"),xe.getItem("local:serverRevision")]);p(Y??!1),L(le??0)},[]),_=b.useCallback(async()=>e?await e.hasPendingMigrations():!1,[e]);b.useEffect(()=>{r||B()},[r,B]);const z=b.useCallback(async Y=>{await St("STORE_ENCRYPTION_KEY",Y,"background")},[]),Q=b.useCallback(async Y=>{await St("STORE_ENCRYPTION_KEY_DERIVATION_PARAMS",Y,"background")},[]),K=b.useCallback(()=>{n(null),s(!1),c(!1)},[]),te=b.useCallback(()=>g.current,[]),ee=b.useMemo(()=>({sqliteClient:e,dbInitialized:r,dbAvailable:l,isOffline:m,getIsOffline:te,isDirty:A,isSyncing:v,isUploading:T,serverRevision:k,setIsOffline:x,setIsSyncing:w,setIsUploading:S,shouldSuppressEmailErrors:U,loadDatabase:F,loadStoredDatabase:B,storeEncryptionKey:z,storeEncryptionKeyDerivationParams:Q,clearDatabase:K,getVaultMetadata:V,refreshSyncState:O,hasPendingMigrations:_}),[e,r,l,m,te,A,v,T,k,x,U,F,B,z,Q,K,V,O,_]);return d.jsx(bT.Provider,{value:ee,children:t})},ta=()=>{const t=b.useContext(bT);if(t===void 0)throw new Error("useDb must be used within a DbProvider");return t},vt={DISABLED_SITES:"local:aliasvault_disabled_sites",TEMPORARY_DISABLED_SITES:"local:aliasvault_temporary_disabled_sites",PASSKEY_DISABLED_SITES:"local:aliasvault_passkey_disabled_sites",GLOBAL_AUTOFILL_POPUP_ENABLED:"local:aliasvault_global_autofill_popup_enabled",GLOBAL_CONTEXT_MENU_ENABLED:"local:aliasvault_global_context_menu_enabled",PASSKEY_PROVIDER_ENABLED:"local:aliasvault_passkey_provider_enabled",CLIPBOARD_CLEAR_TIMEOUT:"local:aliasvault_clipboard_clear_timeout",AUTO_LOCK_TIMEOUT:"local:aliasvault_auto_lock_timeout",VAULT_LOCKED_DISMISS_UNTIL:"local:aliasvault_vault_locked_dismiss_until",AUTOFILL_MATCHING_MODE:"local:aliasvault_autofill_matching_mode",CUSTOM_EMAIL_HISTORY:"local:aliasvault_custom_email_history",CUSTOM_USERNAME_HISTORY:"local:aliasvault_custom_username_history",SHOW_FOLDERS:"local:aliasvault_show_folders",AUTO_CLOSE_UNLOCK_POPUP:"local:aliasvault_auto_close_unlock_popup",LOGIN_SAVE_ENABLED:"local:loginSaveEnabled",LOGIN_SAVE_AUTO_DISMISS_SECONDS:"local:loginSaveAutoDismissSeconds",LOGIN_SAVE_BLOCKED_DOMAINS:"local:loginSaveBlockedDomains",PENDING_REDIRECT_URL:"session:pendingRedirectUrl",SKIP_FORM_RESTORE:"local:aliasvault_skip_form_restore"};var ed=(t=>(t.DEFAULT="default",t.URL_SUBDOMAIN="url_subdomain",t.URL_EXACT="url_exact",t))(ed||{});const dt={async getShowFolders(){return await xe.getItem(vt.SHOW_FOLDERS)??!0},async setShowFolders(t){await xe.setItem(vt.SHOW_FOLDERS,t)},async getAutoCloseUnlockPopup(){return await xe.getItem(vt.AUTO_CLOSE_UNLOCK_POPUP)??!0},async setAutoCloseUnlockPopup(t){await xe.setItem(vt.AUTO_CLOSE_UNLOCK_POPUP,t)},async getGlobalAutofillPopupEnabled(){return await xe.getItem(vt.GLOBAL_AUTOFILL_POPUP_ENABLED)!==!1},async setGlobalAutofillPopupEnabled(t){await xe.setItem(vt.GLOBAL_AUTOFILL_POPUP_ENABLED,t)},async getAutofillMatchingMode(){return await xe.getItem(vt.AUTOFILL_MATCHING_MODE)??"default"},async setAutofillMatchingMode(t){await xe.setItem(vt.AUTOFILL_MATCHING_MODE,t)},async getDisabledSites(){return await xe.getItem(vt.DISABLED_SITES)??[]},async setDisabledSites(t){await xe.setItem(vt.DISABLED_SITES,t)},async getTemporaryDisabledSites(){return await xe.getItem(vt.TEMPORARY_DISABLED_SITES)??{}},async setTemporaryDisabledSites(t){await xe.setItem(vt.TEMPORARY_DISABLED_SITES,t)},async getGlobalContextMenuEnabled(){return await xe.getItem(vt.GLOBAL_CONTEXT_MENU_ENABLED)!==!1},async setGlobalContextMenuEnabled(t){await xe.setItem(vt.GLOBAL_CONTEXT_MENU_ENABLED,t)},async getPasskeyProviderEnabled(){return await xe.getItem(vt.PASSKEY_PROVIDER_ENABLED)!==!1},async setPasskeyProviderEnabled(t){await xe.setItem(vt.PASSKEY_PROVIDER_ENABLED,t)},async getPasskeyDisabledSites(){return await xe.getItem(vt.PASSKEY_DISABLED_SITES)??[]},async setPasskeyDisabledSites(t){await xe.setItem(vt.PASSKEY_DISABLED_SITES,t)},async getClipboardClearTimeout(){return await xe.getItem(vt.CLIPBOARD_CLEAR_TIMEOUT)??10},async setClipboardClearTimeout(t){await xe.setItem(vt.CLIPBOARD_CLEAR_TIMEOUT,t)},async getAutoLockTimeout(){return await xe.getItem(vt.AUTO_LOCK_TIMEOUT)??0},async setAutoLockTimeout(t){await xe.setItem(vt.AUTO_LOCK_TIMEOUT,t)},async getVaultLockedDismissUntil(){return await xe.getItem(vt.VAULT_LOCKED_DISMISS_UNTIL)??0},async setVaultLockedDismissUntil(t){await xe.setItem(vt.VAULT_LOCKED_DISMISS_UNTIL,t)},async getCustomEmailHistory(){return await xe.getItem(vt.CUSTOM_EMAIL_HISTORY)??[]},async setCustomEmailHistory(t){await xe.setItem(vt.CUSTOM_EMAIL_HISTORY,t)},async getCustomUsernameHistory(){return await xe.getItem(vt.CUSTOM_USERNAME_HISTORY)??[]},async setCustomUsernameHistory(t){await xe.setItem(vt.CUSTOM_USERNAME_HISTORY,t)},async clearUiPreferences(){await xe.removeItem(vt.SHOW_FOLDERS)},async resetAllSiteSettings(){await xe.setItem(vt.DISABLED_SITES,[]),await xe.setItem(vt.TEMPORARY_DISABLED_SITES,{}),await xe.setItem(vt.PASSKEY_DISABLED_SITES,[])},async clearAll(){await Promise.all(Object.values(vt).map(t=>xe.removeItem(t)))},async getPendingRedirectUrl(){return await xe.getItem(vt.PENDING_REDIRECT_URL)??null},async setPendingRedirectUrl(t){t===null?await xe.removeItem(vt.PENDING_REDIRECT_URL):await xe.setItem(vt.PENDING_REDIRECT_URL,t)},async getSkipFormRestore(){return await xe.getItem(vt.SKIP_FORM_RESTORE)??!1},async setSkipFormRestore(t){await xe.setItem(vt.SKIP_FORM_RESTORE,t)},async getLoginSaveEnabled(){return await xe.getItem(vt.LOGIN_SAVE_ENABLED)!==!1},async setLoginSaveEnabled(t){await xe.setItem(vt.LOGIN_SAVE_ENABLED,t)},async getLoginSaveAutoDismissSeconds(){return await xe.getItem(vt.LOGIN_SAVE_AUTO_DISMISS_SECONDS)??15},async setLoginSaveAutoDismissSeconds(t){await xe.setItem(vt.LOGIN_SAVE_AUTO_DISMISS_SECONDS,t)},async getLoginSaveBlockedDomains(){return await xe.getItem(vt.LOGIN_SAVE_BLOCKED_DOMAINS)??[]},async setLoginSaveBlockedDomains(t){await xe.setItem(vt.LOGIN_SAVE_BLOCKED_DOMAINS,t)}};var uu={exports:{}},XU=uu.exports,_E;function $U(){return _E||(_E=1,function(t,e){(function(n,r){t.exports=r()})(XU,function(){return(()=>{var n,r,s={773:(m,h,g)=>{var A,p=typeof self<"u"&&self.Module!==void 0?self.Module:{},v={};for(A in p)p.hasOwnProperty(A)&&(v[A]=p[A]);var w,T,S,k;w=typeof window=="object",T=typeof importScripts=="function",S=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",k=!w&&!S&&!T;var L,U,x,F,B,V="";S?(V=T?g(967).dirname(V)+"/":"//",L=function(Se,Fe){return F||(F=g(145)),B||(B=g(967)),Se=B.normalize(Se),F.readFileSync(Se,Fe?null:"utf8")},x=function(Se){var Fe=L(Se,!0);return Fe.buffer||(Fe=new Uint8Array(Fe)),K(Fe.buffer),Fe},process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),m.exports=p,process.on("uncaughtException",function(Se){if(!(Se instanceof Ke))throw Se}),process.on("unhandledRejection",X),p.inspect=function(){return"[Emscripten Module object]"}):k?(typeof read<"u"&&(L=function(Se){return read(Se)}),x=function(Se){var Fe;return typeof readbuffer=="function"?new Uint8Array(readbuffer(Se)):(K(typeof(Fe=read(Se,"binary"))=="object"),Fe)},typeof scriptArgs<"u"&&scriptArgs,typeof print<"u"&&(typeof console>"u"&&(console={}),console.log=print,console.warn=console.error=typeof printErr<"u"?printErr:print)):(w||T)&&(T?V=self.location.href:typeof document<"u"&&document.currentScript&&(V=document.currentScript.src),V=V.indexOf("blob:")!==0?V.substr(0,V.lastIndexOf("/")+1):"",L=function(Se){var Fe=new XMLHttpRequest;return Fe.open("GET",Se,!1),Fe.send(null),Fe.responseText},T&&(x=function(Se){var Fe=new XMLHttpRequest;return Fe.open("GET",Se,!1),Fe.responseType="arraybuffer",Fe.send(null),new Uint8Array(Fe.response)}),U=function(Se,Fe,fe){var Re=new XMLHttpRequest;Re.open("GET",Se,!0),Re.responseType="arraybuffer",Re.onload=function(){Re.status==200||Re.status==0&&Re.response?Fe(Re.response):fe()},Re.onerror=fe,Re.send(null)}),p.print||console.log.bind(console);var O,_,z=p.printErr||console.warn.bind(console);for(A in v)v.hasOwnProperty(A)&&(p[A]=v[A]);v=null,p.arguments&&p.arguments,p.thisProgram&&p.thisProgram,p.quit&&p.quit,p.wasmBinary&&(O=p.wasmBinary),p.noExitRuntime,typeof WebAssembly!="object"&&X("no native wasm support detected");var Q=!1;function K(Se,Fe){Se||X("Assertion failed: "+Fe)}var te,ee,Y=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function le(Se){te=Se,p.HEAP8=new Int8Array(Se),p.HEAP16=new Int16Array(Se),p.HEAP32=new Int32Array(Se),p.HEAPU8=ee=new Uint8Array(Se),p.HEAPU16=new Uint16Array(Se),p.HEAPU32=new Uint32Array(Se),p.HEAPF32=new Float32Array(Se),p.HEAPF64=new Float64Array(Se)}p.INITIAL_MEMORY;var J,ie=[],be=[],se=[],j=0,W=null;function X(Se){throw p.onAbort&&p.onAbort(Se),z(Se+=""),Q=!0,Se="abort("+Se+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(Se)}function ne(Se){return Se.startsWith("data:application/octet-stream;base64,")}function we(Se){return Se.startsWith("file://")}p.preloadedImages={},p.preloadedAudios={};var ce,Ee="argon2.wasm";function Te(Se){try{if(Se==Ee&&O)return new Uint8Array(O);if(x)return x(Se);throw"both async and sync fetching of the wasm failed"}catch(Fe){X(Fe)}}function Ce(Se){for(;Se.length>0;){var Fe=Se.shift();if(typeof Fe!="function"){var fe=Fe.func;typeof fe=="number"?Fe.arg===void 0?J.get(fe)():J.get(fe)(Fe.arg):fe(Fe.arg===void 0?null:Fe.arg)}else Fe(p)}}function Pe(Se){try{return _.grow(Se-te.byteLength+65535>>>16),le(_.buffer),1}catch{}}ne(Ee)||(ce=Ee,Ee=p.locateFile?p.locateFile(ce,V):V+ce);var Ve,bt={a:function(Se,Fe,fe){ee.copyWithin(Se,Fe,Fe+fe)},b:function(Se){var Fe,fe=ee.length,Re=2147418112;if((Se>>>=0)>Re)return!1;for(var ze=1;ze<=4;ze*=2){var je=fe*(1+.2/ze);if(je=Math.min(je,Se+100663296),Pe(Math.min(Re,((Fe=Math.max(Se,je))%65536>0&&(Fe+=65536-Fe%65536),Fe))))return!0}return!1}},gt=(function(){var Se={a:bt};function Fe(ze,je){var at,wt=ze.exports;p.asm=wt,le((_=p.asm.c).buffer),J=p.asm.k,at=p.asm.d,be.unshift(at),function(Rt){if(j--,p.monitorRunDependencies&&p.monitorRunDependencies(j),j==0&&W){var Tt=W;W=null,Tt()}}()}function fe(ze){Fe(ze.instance)}function Re(ze){return function(){if(!O&&(w||T)){if(typeof fetch=="function"&&!we(Ee))return fetch(Ee,{credentials:"same-origin"}).then(function(je){if(!je.ok)throw"failed to load wasm binary file at '"+Ee+"'";return je.arrayBuffer()}).catch(function(){return Te(Ee)});if(U)return new Promise(function(je,at){U(Ee,function(wt){je(new Uint8Array(wt))},at)})}return Promise.resolve().then(function(){return Te(Ee)})}().then(function(je){return WebAssembly.instantiate(je,Se)}).then(ze,function(je){z("failed to asynchronously prepare wasm: "+je),X(je)})}if(j++,p.monitorRunDependencies&&p.monitorRunDependencies(j),p.instantiateWasm)try{return p.instantiateWasm(Se,Fe)}catch(ze){return z("Module.instantiateWasm callback failed with error: "+ze),!1}O||typeof WebAssembly.instantiateStreaming!="function"||ne(Ee)||we(Ee)||typeof fetch!="function"?Re(fe):fetch(Ee,{credentials:"same-origin"}).then(function(ze){return WebAssembly.instantiateStreaming(ze,Se).then(fe,function(je){return z("wasm streaming compile failed: "+je),z("falling back to ArrayBuffer instantiation"),Re(fe)})})}(),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(gt=p._malloc=p.asm.f).apply(null,arguments)}),it=(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(it=p.stackAlloc=p.asm.n).apply(null,arguments)});function Ke(Se){this.name="ExitStatus",this.message="Program terminated with exit("+Se+")",this.status=Se}function Pt(Se){function Fe(){Ve||(Ve=!0,p.calledRun=!0,Q||(Ce(be),p.onRuntimeInitialized&&p.onRuntimeInitialized(),function(){if(p.postRun)for(typeof p.postRun=="function"&&(p.postRun=[p.postRun]);p.postRun.length;)fe=p.postRun.shift(),se.unshift(fe);var fe;Ce(se)}()))}j>0||(function(){if(p.preRun)for(typeof p.preRun=="function"&&(p.preRun=[p.preRun]);p.preRun.length;)fe=p.preRun.shift(),ie.unshift(fe);var fe;Ce(ie)}(),j>0||(p.setStatus?(p.setStatus("Running..."),setTimeout(function(){setTimeout(function(){p.setStatus("")},1),Fe()},1)):Fe()))}if(p.allocate=function(Se,Fe){var fe;return fe=Fe==1?it(Se.length):gt(Se.length),Se.subarray||Se.slice?ee.set(Se,fe):ee.set(new Uint8Array(Se),fe),fe},p.UTF8ToString=function(Se,Fe){return Se?function(fe,Re,ze){for(var je=Re+ze,at=Re;fe[at]&&!(at>=je);)++at;if(at-Re>16&&fe.subarray&&Y)return Y.decode(fe.subarray(Re,at));for(var wt="";Re<at;){var Rt=fe[Re++];if(128&Rt){var Tt=63&fe[Re++];if((224&Rt)!=192){var qt=63&fe[Re++];if((Rt=(240&Rt)==224?(15&Rt)<<12|Tt<<6|qt:(7&Rt)<<18|Tt<<12|qt<<6|63&fe[Re++])<65536)wt+=String.fromCharCode(Rt);else{var M=Rt-65536;wt+=String.fromCharCode(55296|M>>10,56320|1023&M)}}else wt+=String.fromCharCode((31&Rt)<<6|Tt)}else wt+=String.fromCharCode(Rt)}return wt}(ee,Se,Fe):""},p.ALLOC_NORMAL=0,W=function Se(){Ve||Pt(),Ve||(W=Se)},p.run=Pt,p.preInit)for(typeof p.preInit=="function"&&(p.preInit=[p.preInit]);p.preInit.length>0;)p.preInit.pop()();Pt(),m.exports=p,p.unloadRuntime=function(){typeof self<"u"&&delete self.Module,p=_=J=te=ee=void 0,delete m.exports}},631:function(m,h,g){var A,p;(p=typeof(A=function(){const v=typeof self<"u"?self:this,w={Argon2d:0,Argon2i:1,Argon2id:2};function T(x){if(T._promise)return T._promise;if(T._module)return Promise.resolve(T._module);let F;return F=v.process&&v.process.versions&&v.process.versions.node?S().then(B=>new Promise(V=>{B.postRun=()=>V(B)})):(v.loadArgon2WasmBinary?v.loadArgon2WasmBinary():Promise.resolve(g(721)).then(B=>function(V){const O=atob(V),_=new Uint8Array(new ArrayBuffer(O.length));for(let z=0;z<O.length;z++)_[z]=O.charCodeAt(z);return _}(B))).then(B=>function(V,O){return new Promise(_=>(v.Module={wasmBinary:V,wasmMemory:O,postRun(){_(Module)}},S()))}(B,x?function(V){const Q=Math.min(Math.max(Math.ceil(V*1024/65536),256)+256,32767);return new WebAssembly.Memory({initial:Q,maximum:32767})}(x):void 0)),T._promise=F,F.then(B=>(T._module=B,delete T._promise,B))}function S(){return v.loadArgon2WasmModule?v.loadArgon2WasmModule():Promise.resolve(g(773))}function k(x,F){return x.allocate(F,"i8",x.ALLOC_NORMAL)}function L(x,F){return k(x,new Uint8Array([...F,0]))}function U(x){if(typeof x!="string")return x;if(typeof TextEncoder=="function")return new TextEncoder().encode(x);if(typeof Buffer=="function")return Buffer.from(x);throw new Error("Don't know how to encode UTF8")}return{ArgonType:w,hash:function(x){const F=x.mem||1024;return T(F).then(B=>{const V=x.time||1,O=x.parallelism||1,_=U(x.pass),z=L(B,_),Q=_.length,K=U(x.salt),te=L(B,K),ee=K.length,Y=x.type||w.Argon2d,le=B.allocate(new Array(x.hashLen||24),"i8",B.ALLOC_NORMAL),J=x.secret?k(B,x.secret):0,ie=x.secret?x.secret.byteLength:0,be=x.ad?k(B,x.ad):0,se=x.ad?x.ad.byteLength:0,j=x.hashLen||24,W=B._argon2_encodedlen(V,F,O,ee,j,Y),X=B.allocate(new Array(W+1),"i8",B.ALLOC_NORMAL);let ne,we,ce;try{we=B._argon2_hash_ext(V,F,O,z,Q,te,ee,le,j,X,W,Y,J,ie,be,se,19)}catch(Ee){ne=Ee}if(we!==0||ne){try{ne||(ne=B.UTF8ToString(B._argon2_error_message(we)))}catch{}ce={message:ne,code:we}}else{let Ee="";const Te=new Uint8Array(j);for(let Ce=0;Ce<j;Ce++){const Pe=B.HEAP8[le+Ce];Te[Ce]=Pe,Ee+=("0"+(255&Pe).toString(16)).slice(-2)}ce={hash:Te,hashHex:Ee,encoded:B.UTF8ToString(X)}}try{B._free(z),B._free(te),B._free(le),B._free(X),be&&B._free(be),J&&B._free(J)}catch{}if(ne)throw ce;return ce})},verify:function(x){return T().then(F=>{const B=U(x.pass),V=L(F,B),O=B.length,_=x.secret?k(F,x.secret):0,z=x.secret?x.secret.byteLength:0,Q=x.ad?k(F,x.ad):0,K=x.ad?x.ad.byteLength:0,te=L(F,U(x.encoded));let ee,Y,le,J=x.type;if(J===void 0){let ie=x.encoded.split("$")[1];ie&&(ie=ie.replace("a","A"),J=w[ie]||w.Argon2d)}try{Y=F._argon2_verify_ext(te,V,O,_,z,Q,K,J)}catch(ie){ee=ie}if(Y||ee){try{ee||(ee=F.UTF8ToString(F._argon2_error_message(Y)))}catch{}le={message:ee,code:Y}}try{F._free(V),F._free(te)}catch{}if(ee)throw le;return le})},unloadRuntime:function(){T._module&&(T._module.unloadRuntime(),delete T._promise,delete T._module)}}})=="function"?A.apply(h,[]):A)===void 0||(m.exports=p)},721:function(m,h){m.exports=" "},145:()=>{},967:()=>{}},l={};function c(m){var h=l[m];if(h!==void 0)return h.exports;var g=l[m]={exports:{}};return s[m].call(g.exports,g,g.exports,c),g.exports}return r=Object.getPrototypeOf?m=>Object.getPrototypeOf(m):m=>m.__proto__,c.t=function(m,h){if(1&h&&(m=this(m)),8&h||typeof m=="object"&&m&&(4&h&&m.__esModule||16&h&&typeof m.then=="function"))return m;var g=Object.create(null);c.r(g);var A={};n=n||[null,r({}),r([]),r(r)];for(var p=2&h&&m;typeof p=="object"&&!~n.indexOf(p);p=r(p))Object.getOwnPropertyNames(p).forEach(v=>A[v]=()=>m[v]);return A.default=()=>m,c.d(g,A),g},c.d=(m,h)=>{for(var g in h)c.o(h,g)&&!c.o(m,g)&&Object.defineProperty(m,g,{enumerable:!0,get:h[g]})},c.o=(m,h)=>Object.prototype.hasOwnProperty.call(m,h),c.r=m=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(m,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(m,"__esModule",{value:!0})},c(631)})()})}(uu)),uu.exports}var ZU=$U();const vT=ss(ZU);var Pv,jv;const eM=(jv=(Pv=globalThis.browser)==null?void 0:Pv.runtime)!=null&&jv.id?globalThis.browser:globalThis.chrome,yr=eM,fp="local:aliasvault_pin_enabled",pp="local:aliasvault_pin_encrypted_key",Ap="local:aliasvault_pin_salt",yp="local:aliasvault_pin_length",Do="local:aliasvault_pin_failed_attempts",Bf=4;class mu extends Error{constructor(){super("PIN locked after too many failed attempts"),this.name="PinLockedError"}}class pd extends Error{constructor(){super("Invalid PIN format"),this.name="InvalidPinFormatError"}}class _f extends Error{constructor(n){super(`Incorrect PIN. ${n} attempts remaining.`);Ge(this,"attemptsRemaining");this.name="IncorrectPinError",this.attemptsRemaining=n}}async function wT(){try{return await xe.getItem(fp)===!0}catch{return!1}}async function tM(){try{return await xe.getItem(yp)||null}catch{return null}}function Ep(t){return/^\d{6,8}$/.test(t)}async function IT(){try{return await xe.getItem(Do)||0}catch{return 0}}async function CT(){return await IT()>=Bf}async function aM(t,e){if(!Ep(t))throw new pd;try{const n=crypto.getRandomValues(new Uint8Array(16)),r=Ff(n.buffer),s=await ST(n),l=await NT(t,s),c=crypto.getRandomValues(new Uint8Array(12)),m=await crypto.subtle.encrypt({name:"AES-GCM",iv:c},l,new TextEncoder().encode(e)),h=new Uint8Array(c.length+m.byteLength);h.set(c,0),h.set(new Uint8Array(m),c.length);const g=Ff(h.buffer);await Promise.all([xe.setItem(fp,!0),xe.setItem(pp,g),xe.setItem(Ap,r),xe.setItem(yp,t.length),xe.setItem(Do,0)])}catch(n){throw n instanceof pd||console.error("[PinUnlockService] Failed to setup PIN:",n),n}}async function nM(t){if(!Ep(t))throw new pd;if(await CT())throw new mu;try{const[e,n]=await Promise.all([xe.getItem(pp),xe.getItem(Ap)]);if(!e||!n)throw new mu;const r=new Uint8Array(OE(e)),s=r.slice(0,12),l=r.slice(12),c=new Uint8Array(OE(n)),m=await ST(c),h=await NT(t,m),g=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},h,l),A=new TextDecoder().decode(g);return await xe.setItem(Do,0),A}catch{const n=await IT()+1;throw await xe.setItem(Do,n),n>=Bf?(await bp(),new mu):new _f(Bf-n)}}async function bp(){try{await Promise.all([xe.removeItem(fp),xe.removeItem(pp),xe.removeItem(Ap),xe.removeItem(yp),xe.removeItem(Do)])}catch(t){throw console.error("[PinUnlockService] Failed to disable PIN:",t),t}}async function FE(){try{await xe.setItem(Do,0)}catch(t){console.error("[PinUnlockService] Failed to reset failed attempts:",t)}}async function iM(){const t=yr.runtime.id,e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",e);return new Uint8Array(n)}async function ST(t){const e=await iM(),n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n}async function NT(t,e){const n=Ff(e.buffer),r=await vT.hash({pass:t,salt:n,time:3,mem:65536,parallelism:1,hashLen:32,type:2});return await crypto.subtle.importKey("raw",r.hash,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}function Ff(t){const e=new Uint8Array(t);let n="";for(let r=0;r<e.byteLength;r++)n+=String.fromCharCode(e[r]);return btoa(n)}function OE(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n.buffer}const TT=b.createContext(void 0),rM=({children:t})=>{const[e,n]=b.useState(!1),[r,s]=b.useState(null),[l,c]=b.useState(null),m=ta(),h=b.useCallback(async()=>{const T=await xe.getItem("local:accessToken"),S=await xe.getItem("local:refreshToken"),k=await xe.getItem("local:username");return n(!0),T&&S&&k?(s(k),!0):!1},[s]),g=b.useCallback(async(T,S,k)=>{await xe.setItem("local:username",T),await xe.setItem("local:accessToken",S),await xe.setItem("local:refreshToken",k),await dt.setVaultLockedDismissUntil(0),s(T)},[]),A=b.useCallback(async T=>{await St("CLEAR_SESSION",{},"background"),m==null||m.clearDatabase();try{await bp()}catch(S){console.error("Failed to remove PIN data:",S)}T&&c(T)},[m]),p=b.useCallback(async T=>{await A(T),await St("CLEAR_VAULT_DATA",{},"background"),s(null)},[A]),v=b.useCallback(()=>{c(null)},[]),w=b.useMemo(()=>({isInitialized:e,username:r,initializeAuth:h,setAuthTokens:g,clearAuthUserInitiated:p,clearAuthForced:A,globalMessage:l,clearGlobalMessage:v}),[e,r,h,l,g,p,A,v]);return d.jsx(TT.Provider,{value:w,children:t})},Nd=()=>{const t=b.useContext(TT);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t};class sM{constructor(){Ge(this,"listeners",new Set)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(e){this.listeners.forEach(n=>{try{n(e)}catch(r){console.error("Error in logout listener:",r)}})}}const kT=new sM,mr=class mr{constructor(){}static isServerVersionSupported(e){return this.versionGreaterThanOrEqualTo(e,this.MIN_SERVER_VERSION)}static versionGreaterThanOrEqualTo(e,n){const[r,s]=e.split("-"),[l,c]=n.split("-"),m=r.split(".").map(Number),h=l.split(".").map(Number);for(let g=0;g<Math.max(m.length,h.length);g++){const A=m[g]??0,p=h[g]??0;if(A>p)return!0;if(A<p)return!1}return!s&&c?!0:s&&!c?!1:!s&&!c?!0:s>=c}};Ge(mr,"VERSION","0.27.1"),Ge(mr,"API_VERSION",mr.VERSION.split("-")[0]),Ge(mr,"MIN_SERVER_VERSION","0.12.0-dev"),Ge(mr,"CLIENT_NAME","chrome"),Ge(mr,"DEFAULT_CLIENT_URL","https://app.aliasvault.net"),Ge(mr,"DEFAULT_API_URL","https://app.aliasvault.net/api");let hn=mr;class is extends Error{constructor(e){super(e),this.name="ApiAuthError"}}class rd extends Error{constructor(e="Network error",n){super(e),this.name="NetworkError",this.cause=n,Object.setPrototypeOf(this,rd.prototype)}}class oM{async getBaseUrl(){return(await this.getApiUrl()).replace(/\/$/,"")+"/v1/"}async isSelfHosted(){return await this.getApiUrl()!==hn.DEFAULT_API_URL}async authFetch(e,n={},r=!0,s=!0){const l=new Headers(n.headers??{}),c=await this.getAccessToken();c&&l.set("Authorization",`Bearer ${c}`);const m={...n,headers:l};try{const h=await this.rawFetch(e,m);if(h.status===401){const g=await this.refreshAccessToken();if(g.token){l.set("Authorization",`Bearer ${g.token}`);const A=await this.rawFetch(e,{...m,headers:l});if(!A.ok)throw new is("Request failed after token refresh");return r?A.json():A}else throw g.isAuthError?(kT.emit("common.errors.sessionExpired"),new is("Session expired")):new rd("Token refresh failed due to network error")}if(!h.ok&&s)throw new Error(`HTTP error! status: ${h.status}`);return r?h.json():h}catch(h){throw console.error("API request failed:",h),h}}async rawFetch(e,n={}){const s=await this.getBaseUrl()+e,l=new Headers(n.headers??{});l.set("X-AliasVault-Client",`${hn.CLIENT_NAME}-${hn.API_VERSION}`);const c={...n,headers:l};try{return await fetch(s,c)}catch(m){throw console.error("API request failed:",m),new rd(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 r=await(await this.authFetch(e,{method:"GET",headers:{Accept:"application/octet-stream"}},!1)).arrayBuffer();return new Uint8Array(r)}catch(n){throw console.error("Error downloading blob:",n),n}}async post(e,n,r=!0){return this.authFetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},r)}async put(e,n){return this.authFetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}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 revokeCurrentTokens(){try{const e=await this.getRefreshToken();e&&await this.post("Auth/revoke-token",{token:await this.getAccessToken(),refreshToken:e},!1)}catch(e){console.error("WebApi revoke current token error:",e)}}async getStatus(){try{return await this.get("Auth/status")}catch(e){if(e instanceof is)throw e;return{clientVersionSupported:!0,serverVersion:"0.0.0",vaultRevision:0,srpSalt:""}}}validateStatusResponse(e){return e.clientVersionSupported?hn.isServerVersionSupported(e.serverVersion)?null:"serverVersionNotSupported":"clientVersionNotSupported"}async refreshAccessToken(){const e=await this.getRefreshToken();if(!e)return{token:null,isAuthError:!0};try{const n=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(n.ok){const r=await n.json();return this.updateTokens(r.token,r.refreshToken),{token:r.token,isAuthError:!1}}return n.status===401||n.status===403?{token:null,isAuthError:!0}:(console.warn(`Token refresh failed with status ${n.status}, treating as offline`),{token:null,isAuthError:!1})}catch(n){return n instanceof rd?(console.warn("Token refresh failed due to network error, treating as offline"),{token:null,isAuthError:!1}):(console.error("Unexpected error during token refresh:",n),{token:null,isAuthError:!0})}}async getAccessToken(){return await xe.getItem("local:accessToken")??null}async getRefreshToken(){return await xe.getItem("local:refreshToken")??null}async updateTokens(e,n){await xe.setItem("local:accessToken",e),await xe.setItem("local:refreshToken",n)}async getApiUrl(){const e=await xe.getItem("local:apiUrl");return!e||e.length===0?hn.DEFAULT_API_URL:e}}const xT=b.createContext(null),lM=({children:t})=>{const[e,n]=b.useState(null);return b.useEffect(()=>{const r=new oM;n(r)},[]),e?d.jsx(xT.Provider,{value:e,children:t}):null},Vi=()=>{const t=b.useContext(xT);if(!t)throw new Error("useWebApi must be used within a WebApiProvider");return t},LT=b.createContext(void 0),dM=({children:t})=>{const e=Nd(),n=Vi(),[r,s]=b.useState(!1),l=b.useRef(!1),{t:c}=tt(),m=b.useCallback(async p=>{if(!l.current)try{l.current=!0,await n.revokeTokens(),await e.clearAuthForced(p)}catch(v){console.error("Error during logout:",v)}finally{l.current=!1,s(!1)}},[e,n]),h=b.useCallback(async()=>{const p=await e.initializeAuth();return s(p),p},[e]),g=b.useCallback(async(p,v,w)=>{await e.setAuthTokens(p,v,w),s(!0)},[e]);b.useEffect(()=>kT.subscribe(async v=>{await m(c(v))}),[m,c]),b.useEffect(()=>{h()},[h]);const A=b.useMemo(()=>({isInitialized:e.isInitialized,username:e.username,globalMessage:e.globalMessage,logout:m,initializeAuth:h,setAuthTokens:g,clearGlobalMessage:e.clearGlobalMessage,isLoggedIn:r}),[e.isInitialized,e.username,e.globalMessage,e.clearGlobalMessage,m,h,g,r]);return d.jsx(LT.Provider,{value:A,children:t})},wi=()=>{const t=b.useContext(LT);if(t===void 0)throw new Error("useApp must be used within an AppProvider");return t};class Ba{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,n){const l=window.screen.width/2-400,c=window.screen.height/2-1e3/2,m=e||window.location.hash.replace("#",""),h=new URLSearchParams;h.set("expanded","true"),n&&h.set("returnTo",n);const g=`popup.html?${h.toString()}#${m}`;window.open(g,"AliasVaultPopup",`width=800,height=1000,left=${l},top=${c},popup=true`),window.close()}}const cM=1e3,uM=()=>{const{t}=tt(),e=wi(),n=ta(),[r,s]=b.useState(!1),[l,c]=b.useState(!1),m=b.useRef(null);b.useEffect(()=>{if(n.isSyncing)c(!0),m.current=Date.now();else if(m.current!==null){const g=Date.now()-m.current,A=cM-g;if(A>0){const p=setTimeout(()=>{c(!1),m.current=null},A);return()=>{clearTimeout(p)}}else c(!1),m.current=null}},[n.isSyncing]);const h=b.useCallback(async()=>{if(!r){s(!0),n.isDirty&&n.setIsUploading(!0);try{const g=await St("FULL_VAULT_SYNC",{},"background");if(g.requiresLogout){const A=g.errorKey?t("common.errors."+g.errorKey):g.error;await e.logout(A);return}g.wasOffline?await n.setIsOffline(!0):n.isOffline&&await n.setIsOffline(!1),g.hasNewVault&&await n.loadStoredDatabase(),await n.refreshSyncState()}catch(g){console.error("Retry sync error:",g)}finally{s(!1),n.setIsUploading(!1)}}},[r,n,e,t]);return!e.isLoggedIn||!n.dbAvailable?null:n.isOffline?d.jsxs("button",{onClick:h,disabled:r,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 cursor-pointer hover:opacity-80 active:opacity-60 transition-colors",title:t("sync.tapToRetry"),children:[d.jsx("div",{className:"relative",children:r?d.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}):d.jsxs(d.Fragment,{children:[d.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),n.isDirty&&d.jsx("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 bg-red-500 rounded-full"})]})}),d.jsx("span",{children:t("sync.offline")})]}):l?d.jsx("div",{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",title:t("common.syncingVault"),children:d.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}):n.isUploading?d.jsx("div",{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:d.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}):n.isDirty?d.jsx("button",{onClick:h,disabled:r,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 cursor-pointer hover:opacity-80 active:opacity-60 transition-colors",title:t("sync.tapToRetry"),children:r?d.jsx("svg",{className:"w-3.5 h-3.5 animate-spin",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}):d.jsxs("div",{className:"relative",children:[d.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),d.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},DT=({routes:t=[],rightButtons:e})=>{const{t:n}=tt(),r=wi(),s=Va(),l=Ja(),[c]=Ku(),m=t==null?void 0:t.find(p=>{const v=p.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${v}$`).test(l.pathname)}),h=b.useCallback(()=>{const p=Ba.getReturnPath(),v=c.get("returnSearch");/^\/items\/[^/]+$/.test(l.pathname)&&v?s(`/items?search=${encodeURIComponent(v)}`):p&&Ba.isPopup()&&window.history.length<=2?s(p):s(-1)},[s,c,l.pathname]),g=()=>{s("/auth-settings")},A=()=>{l.pathname==="/upgrade"||l.pathname==="/login"||l.pathname==="/unlock"||(r.isLoggedIn?s("/items"):s("/"))};return d.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:d.jsxs("div",{className:"flex items-center h-16 px-4",children:[m!=null&&m.showBackButton?d.jsx("button",{id:"back",onClick:h,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:d.jsxs("div",{className:"flex items-center",children:[d.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:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})}),m.title&&d.jsx("h1",{className:"text-lg font-medium text-gray-900 dark:text-white ml-2",children:m.title})]})}):d.jsx("div",{className:"flex items-center",children:d.jsxs("button",{onClick:()=>A(),className:"flex items-center hover:opacity-80 transition-opacity",children:[d.jsx(pw,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),d.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),d.jsx("div",{className:"flex-grow"}),d.jsx(uM,{}),d.jsx("div",{className:"flex items-center gap-2",children:r.isLoggedIn?e:d.jsxs(d.Fragment,{children:[e,d.jsxs("button",{id:"settings",onClick:g,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:[d.jsx("span",{className:"sr-only",children:n("common.settings")}),d.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:d.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"})})]})]})})]})})},mM=({routes:t,headerButtons:e,message:n,children:r})=>{const s=b.useRef(null),l=Ja();return b.useEffect(()=>{s.current&&(s.current.scrollTop=0)},[l.pathname]),d.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[d.jsx(aU,{}),d.jsx(DT,{routes:t,rightButtons:e}),d.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:d.jsxs("div",{className:"px-4 pb-4 pt-2 mb-16",children:[n&&d.jsx("p",{className:"text-red-500 mb-4",children:n}),r||d.jsx(rw,{children:t.map(c=>d.jsx(dp,{path:c.path,element:c.element},c.path))})]})}),d.jsx(nU,{})]})},gM=({children:t})=>d.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[d.jsx("header",{className:"fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700",children:d.jsxs("div",{className:"flex items-center justify-center h-16 px-4",children:[d.jsx(pw,{width:125,height:40,showText:!0,className:"text-gray-900 dark:text-white"}),d.jsx("span",{className:"text-primary-500 text-[10px] font-normal",children:"BETA"})]})}),d.jsx("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px"},children:d.jsx("div",{className:"p-4",children:t})})]}),mi=()=>{const t={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},e=d.jsxs(d.Fragment,{children:[d.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),d.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:t})]});return d.jsx("div",{className:"inline-flex items-center",children:e})},RT=b.createContext(void 0),hM=({children:t})=>{const[e,n]=b.useState(null),r=b.useCallback(l=>{n(l)},[]),s=b.useMemo(()=>({setHeaderButtons:r,headerButtons:e}),[r,e]);return d.jsx(RT.Provider,{value:s,children:t})},Ii=()=>{const t=b.useContext(RT);if(t===void 0)throw new Error("useHeaderButtons must be used within a HeaderButtonsProvider");return t},fM=()=>{const{isLoading:t}=va();if(!t)return null;const e={width:"40px",height:"40px",borderRadius:"50%",animation:"spin 1s linear infinite"},n=d.jsxs(d.Fragment,{children:[d.jsx("style",{children:`
        @keyframes spin {
          0% { transform: rotate(0deg); }
          100% { transform: rotate(360deg); }
        }
      `}),d.jsx("div",{className:"border-[4px] border-solid border-current/10 dark:border-white/10 border-t-current dark:border-t-white",style:e})]});return d.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:d.jsx("div",{className:"relative",children:n})})},UT=b.createContext(void 0),pM=({children:t})=>{const[e,n]=b.useState(!0),[r,s]=b.useState(!1),[l,c]=b.useState(void 0),m=A=>{s(!0),c(A)},h=()=>{s(!1),c(void 0)},g=b.useMemo(()=>({isLoading:r,loadingMessage:l,showLoading:m,hideLoading:h,isInitialLoading:e,setIsInitialLoading:n}),[r,l,e]);return d.jsxs(UT.Provider,{value:g,children:[d.jsx(fM,{message:l}),t]})},va=()=>{const t=b.useContext(UT);if(t===void 0)throw new Error("useLoading must be used within a LoadingProvider");return t},AM="session:lastVisitedPage",yM="session:lastVisitedTime",EM="session:navigationHistory",MT=b.createContext(void 0),bM=({children:t})=>{const e=Ja(),n=Va(),{isInitialized:r,isLoggedIn:s}=wi(),{dbInitialized:l,dbAvailable:c}=ta(),m=r&&l,h=m&&(!s||!c),g=b.useCallback(async()=>{if(m&&!h&&!["/","/reinitialize","/login","/unlock","/unlock-success","/auth-settings","/upgrade","/passkeys/create","/passkeys/authenticate"].includes(e.pathname)){const v=e.pathname.split("/").filter(Boolean),w=[];let T="";for(let S=0;S<v.length;S++)T+="/"+v[S],w.push({pathname:T,search:e.search,hash:e.hash});await Promise.all([xe.setItem(AM,e.pathname),xe.setItem(yM,Date.now()),xe.setItem(EM,w)])}},[e,m,h]);b.useEffect(()=>{m&&g()},[e.pathname,e.search,e.hash,m,g]),b.useEffect(()=>{m&&!s&&n("/login",{replace:!0})},[m,s]);const A=b.useMemo(()=>({storeCurrentPage:g,isFullyInitialized:m,requiresAuth:h}),[g,m,h]);return d.jsx(MT.Provider,{value:A,children:t})},vM=()=>{const t=b.useContext(MT);if(t===void 0)throw new Error("useNavigation must be used within a NavigationProvider");return t};var kh,PE;function wM(){if(PE)return kh;PE=1;function t(L){this._maxSize=L,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(L){return this._values[L]},t.prototype.set=function(L,U){return this._size>=this._maxSize&&this.clear(),L in this._values||this._size++,this._values[L]=U};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,n=/^\d+$/,r=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,l=/^\s*(['"]?)(.*?)(\1)\s*$/,c=512,m=new t(c),h=new t(c),g=new t(c);kh={Cache:t,split:p,normalizePath:A,setter:function(L){var U=A(L);return h.get(L)||h.set(L,function(F,B){for(var V=0,O=U.length,_=F;V<O-1;){var z=U[V];if(z==="__proto__"||z==="constructor"||z==="prototype")return F;_=_[U[V++]]}_[U[V]]=B})},getter:function(L,U){var x=A(L);return g.get(L)||g.set(L,function(B){for(var V=0,O=x.length;V<O;)if(B!=null||!U)B=B[x[V++]];else return;return B})},join:function(L){return L.reduce(function(U,x){return U+(w(x)||n.test(x)?"["+x+"]":(U?".":"")+x)},"")},forEach:function(L,U,x){v(Array.isArray(L)?L:p(L),U,x)}};function A(L){return m.get(L)||m.set(L,p(L).map(function(U){return U.replace(l,"$2")}))}function p(L){return L.match(e)||[""]}function v(L,U,x){var F=L.length,B,V,O,_;for(V=0;V<F;V++)B=L[V],B&&(k(B)&&(B='"'+B+'"'),_=w(B),O=!_&&/^\d+$/.test(B),U.call(x,B,_,O,V,L))}function w(L){return typeof L=="string"&&L&&["'",'"'].indexOf(L.charAt(0))!==-1}function T(L){return L.match(r)&&!L.match(n)}function S(L){return s.test(L)}function k(L){return!w(L)&&(T(L)||S(L))}return kh}var Us=wM(),xh,jE;function IM(){if(jE)return xh;jE=1;const t=/[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=A=>A.match(t)||[],n=A=>A[0].toUpperCase()+A.slice(1),r=(A,p)=>e(A).join(p).toLowerCase(),s=A=>e(A).reduce((p,v)=>`${p}${p?v[0].toUpperCase()+v.slice(1).toLowerCase():v.toLowerCase()}`,"");return xh={words:e,upperFirst:n,camelCase:s,pascalCase:A=>n(s(A)),snakeCase:A=>r(A,"_"),kebabCase:A=>r(A,"-"),sentenceCase:A=>n(r(A," ")),titleCase:A=>e(A).map(n).join(" ")},xh}var Lh=IM(),qc={exports:{}},HE;function CM(){if(HE)return qc.exports;HE=1,qc.exports=function(s){return t(e(s),s)},qc.exports.array=t;function t(s,l){var c=s.length,m=new Array(c),h={},g=c,A=n(l),p=r(s);for(l.forEach(function(w){if(!p.has(w[0])||!p.has(w[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});g--;)h[g]||v(s[g],g,new Set);return m;function v(w,T,S){if(S.has(w)){var k;try{k=", node was:"+JSON.stringify(w)}catch{k=""}throw new Error("Cyclic dependency"+k)}if(!p.has(w))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(w));if(!h[T]){h[T]=!0;var L=A.get(w)||new Set;if(L=Array.from(L),T=L.length){S.add(w);do{var U=L[--T];v(U,p.get(U),S)}while(T);S.delete(w)}m[--c]=w}}}function e(s){for(var l=new Set,c=0,m=s.length;c<m;c++){var h=s[c];l.add(h[0]),l.add(h[1])}return Array.from(l)}function n(s){for(var l=new Map,c=0,m=s.length;c<m;c++){var h=s[c];l.has(h[0])||l.set(h[0],new Set),l.has(h[1])||l.set(h[1],new Set),l.get(h[0]).add(h[1])}return l}function r(s){for(var l=new Map,c=0,m=s.length;c<m;c++)l.set(s[c],c);return l}return qc.exports}var SM=CM();const NM=ss(SM),TM=Object.prototype.toString,kM=Error.prototype.toString,xM=RegExp.prototype.toString,LM=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",DM=/^Symbol\((.*)\)(.*)$/;function RM(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function VE(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const n=typeof t;if(n==="number")return RM(t);if(n==="string")return e?`"${t}"`:t;if(n==="function")return"[Function "+(t.name||"anonymous")+"]";if(n==="symbol")return LM.call(t).replace(DM,"Symbol($1)");const r=TM.call(t).slice(8,-1);return r==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):r==="Error"||t instanceof Error?"["+kM.call(t)+"]":r==="RegExp"?xM.call(t):null}function rs(t,e){let n=VE(t,e);return n!==null?n:JSON.stringify(t,function(r,s){let l=VE(this[r],e);return l!==null?l:s},2)}function BT(t){return t==null?[]:[].concat(t)}let _T,FT,OT,UM=/\$\{\s*(\w+)\s*\}/g;_T=Symbol.toStringTag;class zE{constructor(e,n,r,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[_T]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=s,this.errors=[],this.inner=[],BT(e).forEach(l=>{if(En.isError(l)){this.errors.push(...l.errors);const c=l.inner.length?l.inner:[l];this.inner.push(...c)}else this.errors.push(l)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}FT=Symbol.hasInstance;OT=Symbol.toStringTag;class En extends Error{static formatError(e,n){const r=n.label||n.path||"this";return n=Object.assign({},n,{path:r,originalPath:n.path}),typeof e=="string"?e.replace(UM,(s,l)=>rs(n[l])):typeof e=="function"?e(n):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,n,r,s,l){const c=new zE(e,n,r,s);if(l)return c;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[OT]="Error",this.name=c.name,this.message=c.message,this.type=c.type,this.value=c.value,this.path=c.path,this.errors=c.errors,this.inner=c.inner,Error.captureStackTrace&&Error.captureStackTrace(this,En)}static[FT](e){return zE[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let _i={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:t,type:e,value:n,originalValue:r})=>{const s=r!=null&&r!==n?` (cast from the value \`${rs(r,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${rs(n,!0)}\``+s:`${t} must match the configured type. The validated value was: \`${rs(n,!0)}\``+s}},Un={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"},MM={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"},Of={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},BM={isValue:"${path} field must be ${value}"},gu={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},_M={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"},FM={notType:t=>{const{path:e,value:n,spec:r}=t,s=r.types.length;if(Array.isArray(n)){if(n.length<s)return`${e} tuple value has too few items, expected a length of ${s} but got ${n.length} for value: \`${rs(n,!0)}\``;if(n.length>s)return`${e} tuple value has too many items, expected a length of ${s} but got ${n.length} for value: \`${rs(n,!0)}\``}return En.formatError(_i.notType,t)}};Object.assign(Object.create(null),{mixed:_i,string:Un,number:MM,date:Of,object:gu,array:_M,boolean:BM,tuple:FM});const vp=t=>t&&t.__isYupSchema__;class Su{static fromOptions(e,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:s,otherwise:l}=n,c=typeof r=="function"?r:(...m)=>m.every(h=>h===r);return new Su(e,(m,h)=>{var g;let A=c(...m)?s:l;return(g=A==null?void 0:A(h))!=null?g:h})}constructor(e,n){this.fn=void 0,this.refs=e,this.refs=e,this.fn=n}resolve(e,n){let r=this.refs.map(l=>l.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),s=this.fn(r,e,n);if(s===void 0||s===e)return e;if(!vp(s))throw new TypeError("conditions must return a schema object");return s.resolve(n)}}const Yc={context:"$",value:"."};class Bs{constructor(e,n={}){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]===Yc.context,this.isValue=this.key[0]===Yc.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?Yc.context:this.isValue?Yc.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&Us.getter(this.path,!0),this.map=n.map}getValue(e,n,r){let s=this.isContext?r:this.isValue?e:n;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(e,n){return this.getValue(e,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}Bs.prototype.__isYupRef=!0;const Ds=t=>t==null;function Eo(t){function e({value:n,path:r="",options:s,originalValue:l,schema:c},m,h){const{name:g,test:A,params:p,message:v,skipAbsent:w}=t;let{parent:T,context:S,abortEarly:k=c.spec.abortEarly,disableStackTrace:L=c.spec.disableStackTrace}=s;function U(K){return Bs.isRef(K)?K.getValue(n,T,S):K}function x(K={}){const te=Object.assign({value:n,originalValue:l,label:c.spec.label,path:K.path||r,spec:c.spec,disableStackTrace:K.disableStackTrace||L},p,K.params);for(const Y of Object.keys(te))te[Y]=U(te[Y]);const ee=new En(En.formatError(K.message||v,te),n,te.path,K.type||g,te.disableStackTrace);return ee.params=te,ee}const F=k?m:h;let B={path:r,parent:T,type:g,from:s.from,createError:x,resolve:U,options:s,originalValue:l,schema:c};const V=K=>{En.isError(K)?F(K):K?h(null):F(x())},O=K=>{En.isError(K)?F(K):m(K)};if(w&&Ds(n))return V(!0);let z;try{var Q;if(z=A.call(B,n,B),typeof((Q=z)==null?void 0:Q.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${B.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(z).then(V,O)}}catch(K){O(K);return}V(z)}return e.OPTIONS=t,e}function OM(t,e,n,r=n){let s,l,c;return e?(Us.forEach(e,(m,h,g)=>{let A=h?m.slice(1,m.length-1):m;t=t.resolve({context:r,parent:s,value:n});let p=t.type==="tuple",v=g?parseInt(A,10):0;if(t.innerType||p){if(p&&!g)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${c}" must contain an index to the tuple element, e.g. "${c}[0]"`);if(n&&v>=n.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=n,n=n&&n[v],t=p?t.spec.types[v]:t.innerType}if(!g){if(!t.fields||!t.fields[A])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${c} which is a type: "${t.type}")`);s=n,n=n&&n[A],t=t.fields[A]}l=A,c=h?"["+m+"]":"."+m}),{schema:t,parent:s,parentPath:l}):{parent:s,parentPath:e,schema:t}}class Nu extends Set{describe(){const e=[];for(const n of this.values())e.push(Bs.isRef(n)?n.describe():n);return e}resolveAll(e){let n=[];for(const r of this.values())n.push(e(r));return n}clone(){return new Nu(this.values())}merge(e,n){const r=this.clone();return e.forEach(s=>r.add(s)),n.forEach(s=>r.delete(s)),r}}function So(t,e=new Map){if(vp(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let r=0;r<t.length;r++)n[r]=So(t[r],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[r,s]of t.entries())n.set(r,So(s,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(So(r,e))}else if(t instanceof Object){n={},e.set(t,n);for(const[r,s]of Object.entries(t))n[r]=So(s,e)}else throw Error(`Unable to clone ${t}`);return n}class ji{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 Nu,this._blacklist=new Nu,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(_i.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(n=>{n.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=So(Object.assign({},this.spec,e)),n}label(e){let n=this.clone();return n.spec.label=e,n}meta(...e){if(e.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},e[0]),n}withMutation(e){let n=this._mutate;this._mutate=!0;let r=e(this);return this._mutate=n,r}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 n=this,r=e.clone();const s=Object.assign({},n.spec,r.spec);return r.spec=s,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(e._whitelist,e._blacklist),r._blacklist=n._blacklist.merge(e._blacklist,e._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(l=>{e.tests.forEach(c=>{l.test(c.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((s,l)=>l.resolve(s,e),n),n=n.resolve(e)}return n}resolveOptions(e){var n,r,s,l;return Object.assign({},e,{from:e.from||[],strict:(n=e.strict)!=null?n:this.spec.strict,abortEarly:(r=e.abortEarly)!=null?r:this.spec.abortEarly,recursive:(s=e.recursive)!=null?s:this.spec.recursive,disableStackTrace:(l=e.disableStackTrace)!=null?l:this.spec.disableStackTrace})}cast(e,n={}){let r=this.resolve(Object.assign({value:e},n)),s=n.assert==="ignore-optionality",l=r._cast(e,n);if(n.assert!==!1&&!r.isType(l)){if(s&&Ds(l))return l;let c=rs(e),m=rs(l);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". 

attempted value: ${c} 
`+(m!==c?`result of cast: ${m}`:""))}return l}_cast(e,n){let r=e===void 0?e:this.transforms.reduce((s,l)=>l.call(this,s,e,this),e);return r===void 0&&(r=this.getDefault(n)),r}_validate(e,n={},r,s){let{path:l,originalValue:c=e,strict:m=this.spec.strict}=n,h=e;m||(h=this._cast(h,Object.assign({assert:!1},n)));let g=[];for(let A of Object.values(this.internalTests))A&&g.push(A);this.runTests({path:l,value:h,originalValue:c,options:n,tests:g},r,A=>{if(A.length)return s(A,h);this.runTests({path:l,value:h,originalValue:c,options:n,tests:this.tests},r,s)})}runTests(e,n,r){let s=!1,{tests:l,value:c,originalValue:m,path:h,options:g}=e,A=S=>{s||(s=!0,n(S,c))},p=S=>{s||(s=!0,r(S,c))},v=l.length,w=[];if(!v)return p([]);let T={value:c,originalValue:m,path:h,options:g,schema:this};for(let S=0;S<l.length;S++){const k=l[S];k(T,A,function(U){U&&(Array.isArray(U)?w.push(...U):w.push(U)),--v<=0&&p(w)})}}asNestedTest({key:e,index:n,parent:r,parentPath:s,originalParent:l,options:c}){const m=e??n;if(m==null)throw TypeError("Must include `key` or `index` for nested validations");const h=typeof m=="number";let g=r[m];const A=Object.assign({},c,{strict:!0,parent:r,value:g,originalValue:l[m],key:void 0,[h?"index":"key"]:m,path:h||m.includes(".")?`${s||""}[${h?m:`"${m}"`}]`:(s?`${s}.`:"")+e});return(p,v,w)=>this.resolve(A)._validate(g,A,v,w)}validate(e,n){var r;let s=this.resolve(Object.assign({},n,{value:e})),l=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return new Promise((c,m)=>s._validate(e,n,(h,g)=>{En.isError(h)&&(h.value=g),m(h)},(h,g)=>{h.length?m(new En(h,g,void 0,void 0,l)):c(g)}))}validateSync(e,n){var r;let s=this.resolve(Object.assign({},n,{value:e})),l,c=(r=n==null?void 0:n.disableStackTrace)!=null?r:s.spec.disableStackTrace;return s._validate(e,Object.assign({},n,{sync:!0}),(m,h)=>{throw En.isError(m)&&(m.value=h),m},(m,h)=>{if(m.length)throw new En(m,e,void 0,void 0,c);l=h}),l}isValid(e,n){return this.validate(e,n).then(()=>!0,r=>{if(En.isError(r))return!1;throw r})}isValidSync(e,n){try{return this.validateSync(e,n),!0}catch(r){if(En.isError(r))return!1;throw r}}_getDefault(e){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,e):So(n)}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,n){const r=this.clone({nullable:e});return r.internalTests.nullable=Eo({message:n,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),r}optionality(e,n){const r=this.clone({optional:e});return r.internalTests.optionality=Eo({message:n,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(e=_i.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=_i.notNull){return this.nullability(!1,e)}required(e=_i.required){return this.clone().withMutation(n=>n.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let n=this.clone();return n.transforms.push(e),n}test(...e){let n;if(e.length===1?typeof e[0]=="function"?n={test:e[0]}:n=e[0]:e.length===2?n={name:e[0],test:e[1]}:n={name:e[0],message:e[1],test:e[2]},n.message===void 0&&(n.message=_i.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),s=Eo(n),l=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(c=>!(c.OPTIONS.name===n.name&&(l||c.OPTIONS.test===s.OPTIONS.test))),r.tests.push(s),r}when(e,n){!Array.isArray(e)&&typeof e!="string"&&(n=e,e=".");let r=this.clone(),s=BT(e).map(l=>new Bs(l));return s.forEach(l=>{l.isSibling&&r.deps.push(l.key)}),r.conditions.push(typeof n=="function"?new Su(s,n):Su.fromOptions(s,n)),r}typeError(e){let n=this.clone();return n.internalTests.typeError=Eo({message:e,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(e,n=_i.oneOf){let r=this.clone();return e.forEach(s=>{r._whitelist.add(s),r._blacklist.delete(s)}),r.internalTests.whiteList=Eo({message:n,name:"oneOf",skipAbsent:!0,test(s){let l=this.schema._whitelist,c=l.resolveAll(this.resolve);return c.includes(s)?!0:this.createError({params:{values:Array.from(l).join(", "),resolved:c}})}}),r}notOneOf(e,n=_i.notOneOf){let r=this.clone();return e.forEach(s=>{r._blacklist.add(s),r._whitelist.delete(s)}),r.internalTests.blacklist=Eo({message:n,name:"notOneOf",test(s){let l=this.schema._blacklist,c=l.resolveAll(this.resolve);return c.includes(s)?this.createError({params:{values:Array.from(l).join(", "),resolved:c}}):!0}}),r}strip(e=!0){let n=this.clone();return n.spec.strip=e,n}describe(e){const n=(e?this.resolve(e):this).clone(),{label:r,meta:s,optional:l,nullable:c}=n.spec;return{meta:s,label:r,optional:l,nullable:c,default:n.getDefault(e),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(h=>({name:h.OPTIONS.name,params:h.OPTIONS.params})).filter((h,g,A)=>A.findIndex(p=>p.name===h.name)===g)}}}ji.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])ji.prototype[`${t}At`]=function(e,n,r={}){const{parent:s,parentPath:l,schema:c}=OM(this,e,n,r.context);return c[t](s&&s[l],Object.assign({},r,{parent:s,path:e}))};for(const t of["equals","is"])ji.prototype[t]=ji.prototype.oneOf;for(const t of["not","nope"])ji.prototype[t]=ji.prototype.notOneOf;const PM=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function jM(t){const e=Pf(t);if(!e)return Date.parse?Date.parse(t):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 n=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(n=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(n=0-n)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+n,e.second,e.millisecond)}function Pf(t){var e,n;const r=PM.exec(t);return r?{year:cr(r[1]),month:cr(r[2],1)-1,day:cr(r[3],1),hour:cr(r[4]),minute:cr(r[5]),second:cr(r[6]),millisecond:r[7]?cr(r[7].substring(0,3)):0,precision:(e=(n=r[7])==null?void 0:n.length)!=null?e:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:cr(r[10]),minuteOffset:cr(r[11])}:null}function cr(t,e=0){return Number(t)||e}let HM=/^[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])?)*$/,VM=/^((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,zM=/^(?:[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,QM="^\\d{4}-\\d{2}-\\d{2}",KM="\\d{2}:\\d{2}:\\d{2}",GM="(([+-]\\d{2}(:?\\d{2})?)|Z)",WM=new RegExp(`${QM}T${KM}(\\.\\d+)?${GM}$`),qM=t=>Ds(t)||t===t.trim(),YM={}.toString();function jf(){return new PT}class PT extends ji{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,n,r)=>{if(!r.spec.coerce||r.isType(e)||Array.isArray(e))return e;const s=e!=null&&e.toString?e.toString():e;return s===YM?e:s})})}required(e){return super.required(e).withMutation(n=>n.test({message:e||_i.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(n=>n.OPTIONS.name!=="required"),e))}length(e,n=Un.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(r){return r.length===this.resolve(e)}})}min(e,n=Un.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(r){return r.length>=this.resolve(e)}})}max(e,n=Un.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:e},skipAbsent:!0,test(r){return r.length<=this.resolve(e)}})}matches(e,n){let r=!1,s,l;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:s,name:l}=n:s=n),this.test({name:l||"matches",message:s||Un.matches,params:{regex:e},skipAbsent:!0,test:c=>c===""&&r||c.search(e)!==-1})}email(e=Un.email){return this.matches(HM,{name:"email",message:e,excludeEmptyString:!0})}url(e=Un.url){return this.matches(VM,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Un.uuid){return this.matches(zM,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let n="",r,s;return e&&(typeof e=="object"?{message:n="",allowOffset:r=!1,precision:s=void 0}=e:n=e),this.matches(WM,{name:"datetime",message:n||Un.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||Un.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:l=>{if(!l||r)return!0;const c=Pf(l);return c?!!c.z:!1}}).test({name:"datetime_precision",message:n||Un.datetime_precision,params:{precision:s},skipAbsent:!0,test:l=>{if(!l||s==null)return!0;const c=Pf(l);return c?c.precision===s:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Un.trim){return this.transform(n=>n!=null?n.trim():n).test({message:e,name:"trim",test:qM})}lowercase(e=Un.lowercase){return this.transform(n=>Ds(n)?n:n.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ds(n)||n===n.toLowerCase()})}uppercase(e=Un.uppercase){return this.transform(n=>Ds(n)?n:n.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Ds(n)||n===n.toUpperCase()})}}jf.prototype=PT.prototype;let JM=new Date(""),XM=t=>Object.prototype.toString.call(t)==="[object Date]";class wp extends ji{constructor(){super({type:"date",check(e){return XM(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,n,r)=>!r.spec.coerce||r.isType(e)||e===null?e:(e=jM(e),isNaN(e)?wp.INVALID_DATE:new Date(e)))})}prepareParam(e,n){let r;if(Bs.isRef(e))r=e;else{let s=this.cast(e);if(!this._typeCheck(s))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=s}return r}min(e,n=Of.min){let r=this.prepareParam(e,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(s){return s>=this.resolve(r)}})}max(e,n=Of.max){let r=this.prepareParam(e,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(s){return s<=this.resolve(r)}})}}wp.INVALID_DATE=JM;function $M(t,e=[]){let n=[],r=new Set,s=new Set(e.map(([c,m])=>`${c}-${m}`));function l(c,m){let h=Us.split(c)[0];r.add(h),s.has(`${m}-${h}`)||n.push([m,h])}for(const c of Object.keys(t)){let m=t[c];r.add(c),Bs.isRef(m)&&m.isSibling?l(m.path,c):vp(m)&&"deps"in m&&m.deps.forEach(h=>l(h,c))}return NM.array(Array.from(r),n).reverse()}function QE(t,e){let n=1/0;return t.some((r,s)=>{var l;if((l=e.path)!=null&&l.includes(r))return n=s,!0}),n}function jT(t){return(e,n)=>QE(t,e)-QE(t,n)}const ZM=(t,e,n)=>{if(typeof t!="string")return t;let r=t;try{r=JSON.parse(t)}catch{}return n.isType(r)?r:t};function hu(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=hu(r);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=hu(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(hu)}):"optional"in t?t.optional():t}const eB=(t,e)=>{const n=[...Us.normalizePath(e)];if(n.length===1)return n[0]in t;let r=n.pop(),s=Us.getter(Us.join(n),!0)(t);return!!(s&&r in s)};let KE=t=>Object.prototype.toString.call(t)==="[object Object]";function GE(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter(r=>n.indexOf(r)===-1)}const tB=jT([]);function HT(t){return new VT(t)}class VT extends ji{constructor(e){super({type:"object",check(n){return KE(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=tB,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,n={}){var r;let s=super._cast(e,n);if(s===void 0)return this.getDefault(n);if(!this._typeCheck(s))return s;let l=this.fields,c=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,m=[].concat(this._nodes,Object.keys(s).filter(p=>!this._nodes.includes(p))),h={},g=Object.assign({},n,{parent:h,__validating:n.__validating||!1}),A=!1;for(const p of m){let v=l[p],w=p in s;if(v){let T,S=s[p];g.path=(n.path?`${n.path}.`:"")+p,v=v.resolve({value:S,context:n.context,parent:h});let k=v instanceof ji?v.spec:void 0,L=k==null?void 0:k.strict;if(k!=null&&k.strip){A=A||p in s;continue}T=!n.__validating||!L?v.cast(s[p],g):s[p],T!==void 0&&(h[p]=T)}else w&&!c&&(h[p]=s[p]);(w!==p in h||h[p]!==s[p])&&(A=!0)}return A?h:s}_validate(e,n={},r,s){let{from:l=[],originalValue:c=e,recursive:m=this.spec.recursive}=n;n.from=[{schema:this,value:c},...l],n.__validating=!0,n.originalValue=c,super._validate(e,n,r,(h,g)=>{if(!m||!KE(g)){s(h,g);return}c=c||g;let A=[];for(let p of this._nodes){let v=this.fields[p];!v||Bs.isRef(v)||A.push(v.asNestedTest({options:n,key:p,parent:g,parentPath:n.path,originalParent:c}))}this.runTests({tests:A,value:g,originalValue:c,options:n},r,p=>{s(p.sort(this._sortErrors).concat(h),g)})})}clone(e){const n=super.clone(e);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(e){let n=super.concat(e),r=n.fields;for(let[s,l]of Object.entries(this.fields)){const c=r[s];r[s]=c===void 0?l:c}return n.withMutation(s=>s.setFields(r,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var s;const l=this.fields[r];let c=e;(s=c)!=null&&s.value&&(c=Object.assign({},c,{parent:c.value,value:c.value[r]})),n[r]=l&&"getDefault"in l?l.getDefault(c):void 0}),n}setFields(e,n){let r=this.clone();return r.fields=e,r._nodes=$M(e,n),r._sortErrors=jT(Object.keys(e)),n&&(r._excludedEdges=n),r}shape(e,n=[]){return this.clone().withMutation(r=>{let s=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),s=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,e),s)})}partial(){const e={};for(const[n,r]of Object.entries(this.fields))e[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(e)}deepPartial(){return hu(this)}pick(e){const n={};for(const r of e)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,s])=>e.includes(r)&&e.includes(s)))}omit(e){const n=[];for(const r of Object.keys(this.fields))e.includes(r)||n.push(r);return this.pick(n)}from(e,n,r){let s=Us.getter(e,!0);return this.transform(l=>{if(!l)return l;let c=l;return eB(l,e)&&(c=Object.assign({},l),r||delete c[e],c[n]=s(l)),c})}json(){return this.transform(ZM)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||gu.exact,test(n){if(n==null)return!0;const r=GE(this.schema,n);return r.length===0||this.createError({params:{properties:r.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,n=gu.noUnknown){typeof e!="boolean"&&(n=e,e=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(s){if(s==null)return!0;const l=GE(this.schema,s);return!e||l.length===0||this.createError({params:{unknown:l.join(", ")}})}});return r.spec.noUnknown=e,r}unknown(e=!0,n=gu.noUnknown){return this.noUnknown(!e,n)}transformKeys(e){return this.transform(n=>{if(!n)return n;const r={};for(const s of Object.keys(n))r[e(s)]=n[s];return r})}camelCase(){return this.transformKeys(Lh.camelCase)}snakeCase(){return this.transformKeys(Lh.snakeCase)}constantCase(){return this.transformKeys(e=>Lh.snakeCase(e).toUpperCase())}describe(e){const n=(e?this.resolve(e):this).clone(),r=super.describe(e);r.fields={};for(const[l,c]of Object.entries(n.fields)){var s;let m=e;(s=m)!=null&&s.value&&(m=Object.assign({},m,{parent:m.value,value:m.value[l]})),r.fields[l]=c.describe(m)}return r}}HT.prototype=VT.prototype;const zT=({variant:t="dropdown",size:e="md"})=>{const{i18n:n}=tt(),[r,s]=b.useState(!1),l=b.useRef(null),c=FU(n.language)||ad[0];b.useEffect(()=>{const h=g=>{l.current&&!l.current.contains(g.target)&&s(!1)};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]);const m=async h=>{await n.changeLanguage(h),await xe.setItem("local:language",h),s(!1),n.emit("languageChanged",h)};return t==="buttons"?d.jsx("div",{className:"flex space-x-2",children:ad.map(h=>d.jsxs("button",{onClick:()=>m(h.code),className:`flex items-center space-x-1 px-2 py-1 text-xs rounded transition-colors ${n.language===h.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:h.nativeName,children:[d.jsx("span",{className:"text-sm",children:h.flag}),d.jsx("span",{children:h.code.toUpperCase()})]},h.code))}):d.jsxs("div",{className:"relative",ref:l,children:[d.jsxs("button",{onClick:()=>s(!r),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:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("span",{className:"text-lg",children:c.flag}),d.jsx("span",{children:c.nativeName})]}),d.jsx("svg",{className:`w-4 h-4 transition-transform duration-200 ${r?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),r&&d.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:ad.map(h=>d.jsxs("button",{onClick:()=>m(h.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:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx("span",{className:"text-lg",children:h.flag}),d.jsx("span",{className:"text-gray-700 dark:text-gray-200",children:h.nativeName})]}),n.language===h.code&&d.jsx("svg",{className:"w-4 h-4 text-primary-500",fill:"currentColor",viewBox:"0 0 20 20",children:d.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"})})]},h.code))})]})},Dh=[{label:"Aliasvault.net",value:hn.DEFAULT_API_URL},{label:"Self-hosted",value:"custom"}],aB=t=>HT().shape({apiUrl:jf().required(t("settings.validation.apiUrlRequired")).test("is-valid-api-url",t("settings.validation.apiUrlInvalid"),e=>{if(!e)return!0;try{const n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}}),clientUrl:jf().required(t("settings.validation.clientUrlRequired")).test("is-valid-client-url",t("settings.validation.clientUrlInvalid"),e=>{if(!e)return!0;try{const n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return!1}})}),nB=()=>{const{t}=tt(),[e,n]=b.useState(""),[r,s]=b.useState(""),[l,c]=b.useState(""),[m,h]=b.useState(!0),[g,A]=b.useState({}),{setIsInitialLoading:p}=va(),v=aB(t),w=b.useRef(null),T=b.useRef(null),S=b.useRef(null),k=b.useRef(null);b.useEffect(()=>()=>{if(w.current&&clearTimeout(w.current),T.current&&clearTimeout(T.current),S.current!==null){const B=S.current;xe.setItem("local:apiUrl",B)}if(k.current!==null){const B=k.current;xe.setItem("local:clientUrl",B)}},[]),b.useEffect(()=>{(async()=>{const V=await xe.getItem("local:apiUrl"),O=await xe.getItem("local:clientUrl"),_=await dt.getGlobalAutofillPopupEnabled(),z=await dt.getVaultLockedDismissUntil();h(z?!1:_);const Q=Dh.find(K=>K.value===V);Q?n(Q.value):V?(n("custom"),s(V),c(O??"")):n(Dh[0].value),p(!1)})()},[p]);const L=async B=>{const V=B.target.value;n(V),V!=="custom"&&(await xe.setItem("local:apiUrl",""),await xe.setItem("local:clientUrl",""),s(""),c(""),A({}))},U=b.useCallback(B=>{const V=B.target.value;s(V),S.current=V,w.current&&clearTimeout(w.current),w.current=setTimeout(async()=>{try{await v.validateAt("apiUrl",{apiUrl:V}),A(O=>({...O,apiUrl:void 0})),await xe.setItem("local:apiUrl",V),S.current=null}catch(O){O instanceof En&&(A(_=>({..._,apiUrl:O.message})),await xe.setItem("local:apiUrl",hn.DEFAULT_API_URL),await xe.setItem("local:clientUrl",hn.DEFAULT_CLIENT_URL),S.current=null)}},150)},[v]),x=b.useCallback(B=>{const V=B.target.value;c(V),k.current=V,T.current&&clearTimeout(T.current),T.current=setTimeout(async()=>{try{await v.validateAt("clientUrl",{clientUrl:V}),A(O=>({...O,clientUrl:void 0})),await xe.setItem("local:clientUrl",V),k.current=null}catch(O){O instanceof En&&(A(_=>({..._,clientUrl:O.message})),k.current=null)}},150)},[v]),F=async()=>{const B=!m;await dt.setGlobalAutofillPopupEnabled(B),B&&(await dt.setDisabledSites([]),await dt.setVaultLockedDismissUntil(0)),h(B)};return d.jsxs("div",{className:"p-4 space-y-6",children:[d.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:t("settings.serverConfiguration","Server Configuration")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("settings.serverConfigurationDescription","Configure the AliasVault server URL for self-hosted instances")})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"api-connection",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:t("settings.serverUrl")}),d.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:Dh.map(B=>d.jsx("option",{value:B.value,children:B.label},B.value))})]}),e==="custom"&&d.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary-500",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"custom-api-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:t("settings.customApiUrl","API URL")}),d.jsx("input",{id:"custom-api-url",type:"text",value:r,onChange:U,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&&d.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.apiUrl}),d.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:t("settings.apiUrlHint","The API endpoint URL (usually client URL + /api)")})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"custom-client-url",className:"block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2",children:t("settings.customClientUrl","Client URL")}),d.jsx("input",{id:"custom-client-url",type:"text",value:l,onChange:x,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&&d.jsx("p",{className:"mt-1 text-sm text-red-500",children:g.clientUrl}),d.jsx("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:t("settings.clientUrlHint","The web interface URL of your self-hosted instance")})]})]})]}),d.jsxs("div",{className:"space-y-4 pb-6 border-b border-gray-200 dark:border-gray-700",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:t("settings.autofillSettings","Autofill Settings")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("settings.autofillSettingsDescription","Enable or disable the autofill popup on web pages")})]}),d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white",children:t("settings.autofillEnabled")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:m?t("settings.autofillEnabledDescription","Autofill suggestions will appear on login forms"):t("settings.autofillDisabledDescription","Autofill suggestions are disabled globally")})]}),d.jsx("button",{onClick:F,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?t("common.enabled","Enabled"):t("common.disabled","Disabled")})]})]}),d.jsxs("div",{className:"space-y-4 pb-6",children:[d.jsx("div",{children:d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-1",children:t("settings.languageSettings","Language")})}),d.jsx("div",{children:d.jsx(zT,{variant:"dropdown",size:"sm"})})]}),d.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:[t("settings.version"),": ",hn.VERSION]})]})},Ca=b.forwardRef(({onClick:t,id:e,children:n,type:r="button",variant:s="primary"},l)=>{const c={primary:"bg-primary-500 hover:bg-primary-600",secondary:"bg-gray-500 hover:bg-gray-600"};return d.jsx("button",{ref:l,className:`${c[s]} text-white font-medium rounded-lg px-4 py-2 text-sm w-full`,onClick:t,type:r,id:e,children:n})});Ca.displayName="Button";var bo={},Rh,WE;function iB(){return WE||(WE=1,Rh=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Rh}var Uh={},Yr={},qE;function _s(){if(qE)return Yr;qE=1;let t;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 Yr.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},Yr.getSymbolTotalCodewords=function(r){return e[r]},Yr.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},Yr.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');t=r},Yr.isKanjiModeEnabled=function(){return typeof t<"u"},Yr.toSJIS=function(r){return t(r)},Yr}var Mh={},YE;function Ip(){return YE||(YE=1,function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},t.from=function(r,s){if(t.isValid(r))return r;try{return e(r)}catch{return s}}}(Mh)),Mh}var Bh,JE;function rB(){if(JE)return Bh;JE=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let r=0;r<n;r++)this.putBit((e>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Bh=t,Bh}var _h,XE;function sB(){if(XE)return _h;XE=1;function t(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 t.prototype.set=function(e,n,r,s){const l=e*this.size+n;this.data[l]=r,s&&(this.reservedBit[l]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,r){this.data[e*this.size+n]^=r},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},_h=t,_h}var Fh={},$E;function oB(){return $E||($E=1,function(t){const e=_s().getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,l=e(r),c=l===145?26:Math.ceil((l-13)/(2*s-2))*2,m=[l-7];for(let h=1;h<s-1;h++)m[h]=m[h-1]-c;return m.push(6),m.reverse()},t.getPositions=function(r){const s=[],l=t.getRowColCoords(r),c=l.length;for(let m=0;m<c;m++)for(let h=0;h<c;h++)m===0&&h===0||m===0&&h===c-1||m===c-1&&h===0||s.push([l[m],l[h]]);return s}}(Fh)),Fh}var Oh={},ZE;function lB(){if(ZE)return Oh;ZE=1;const t=_s().getSymbolSize,e=7;return Oh.getPositions=function(r){const s=t(r);return[[0,0],[s-e,0],[0,s-e]]},Oh}var Ph={},eb;function dB(){return eb||(eb=1,function(t){t.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};t.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},t.from=function(s){return t.isValid(s)?parseInt(s,10):void 0},t.getPenaltyN1=function(s){const l=s.size;let c=0,m=0,h=0,g=null,A=null;for(let p=0;p<l;p++){m=h=0,g=A=null;for(let v=0;v<l;v++){let w=s.get(p,v);w===g?m++:(m>=5&&(c+=e.N1+(m-5)),g=w,m=1),w=s.get(v,p),w===A?h++:(h>=5&&(c+=e.N1+(h-5)),A=w,h=1)}m>=5&&(c+=e.N1+(m-5)),h>=5&&(c+=e.N1+(h-5))}return c},t.getPenaltyN2=function(s){const l=s.size;let c=0;for(let m=0;m<l-1;m++)for(let h=0;h<l-1;h++){const g=s.get(m,h)+s.get(m,h+1)+s.get(m+1,h)+s.get(m+1,h+1);(g===4||g===0)&&c++}return c*e.N2},t.getPenaltyN3=function(s){const l=s.size;let c=0,m=0,h=0;for(let g=0;g<l;g++){m=h=0;for(let A=0;A<l;A++)m=m<<1&2047|s.get(g,A),A>=10&&(m===1488||m===93)&&c++,h=h<<1&2047|s.get(A,g),A>=10&&(h===1488||h===93)&&c++}return c*e.N3},t.getPenaltyN4=function(s){let l=0;const c=s.data.length;for(let h=0;h<c;h++)l+=s.data[h];return Math.abs(Math.ceil(l*100/c/5)-10)*e.N4};function n(r,s,l){switch(r){case t.Patterns.PATTERN000:return(s+l)%2===0;case t.Patterns.PATTERN001:return s%2===0;case t.Patterns.PATTERN010:return l%3===0;case t.Patterns.PATTERN011:return(s+l)%3===0;case t.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(l/3))%2===0;case t.Patterns.PATTERN101:return s*l%2+s*l%3===0;case t.Patterns.PATTERN110:return(s*l%2+s*l%3)%2===0;case t.Patterns.PATTERN111:return(s*l%3+(s+l)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(s,l){const c=l.size;for(let m=0;m<c;m++)for(let h=0;h<c;h++)l.isReserved(h,m)||l.xor(h,m,n(s,h,m))},t.getBestMask=function(s,l){const c=Object.keys(t.Patterns).length;let m=0,h=1/0;for(let g=0;g<c;g++){l(g),t.applyMask(g,s);const A=t.getPenaltyN1(s)+t.getPenaltyN2(s)+t.getPenaltyN3(s)+t.getPenaltyN4(s);t.applyMask(g,s),A<h&&(h=A,m=g)}return m}}(Ph)),Ph}var Jc={},tb;function QT(){if(tb)return Jc;tb=1;const t=Ip(),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],n=[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 Jc.getBlocksCount=function(s,l){switch(l){case t.L:return e[(s-1)*4+0];case t.M:return e[(s-1)*4+1];case t.Q:return e[(s-1)*4+2];case t.H:return e[(s-1)*4+3];default:return}},Jc.getTotalCodewordsCount=function(s,l){switch(l){case t.L:return n[(s-1)*4+0];case t.M:return n[(s-1)*4+1];case t.Q:return n[(s-1)*4+2];case t.H:return n[(s-1)*4+3];default:return}},Jc}var jh={},jl={},ab;function cB(){if(ab)return jl;ab=1;const t=new Uint8Array(512),e=new Uint8Array(256);return function(){let r=1;for(let s=0;s<255;s++)t[s]=r,e[r]=s,r<<=1,r&256&&(r^=285);for(let s=255;s<512;s++)t[s]=t[s-255]}(),jl.log=function(r){if(r<1)throw new Error("log("+r+")");return e[r]},jl.exp=function(r){return t[r]},jl.mul=function(r,s){return r===0||s===0?0:t[e[r]+e[s]]},jl}var nb;function uB(){return nb||(nb=1,function(t){const e=cB();t.mul=function(r,s){const l=new Uint8Array(r.length+s.length-1);for(let c=0;c<r.length;c++)for(let m=0;m<s.length;m++)l[c+m]^=e.mul(r[c],s[m]);return l},t.mod=function(r,s){let l=new Uint8Array(r);for(;l.length-s.length>=0;){const c=l[0];for(let h=0;h<s.length;h++)l[h]^=e.mul(s[h],c);let m=0;for(;m<l.length&&l[m]===0;)m++;l=l.slice(m)}return l},t.generateECPolynomial=function(r){let s=new Uint8Array([1]);for(let l=0;l<r;l++)s=t.mul(s,new Uint8Array([1,e.exp(l)]));return s}}(jh)),jh}var Hh,ib;function mB(){if(ib)return Hh;ib=1;const t=uB();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(r){this.degree=r,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const s=new Uint8Array(r.length+this.degree);s.set(r);const l=t.mod(s,this.genPoly),c=this.degree-l.length;if(c>0){const m=new Uint8Array(this.degree);return m.set(l,c),m}return l},Hh=e,Hh}var Vh={},zh={},Qh={},rb;function KT(){return rb||(rb=1,Qh.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),Qh}var Ri={},sb;function GT(){if(sb)return Ri;sb=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
]))+`;Ri.KANJI=new RegExp(n,"g"),Ri.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ri.BYTE=new RegExp(r,"g"),Ri.NUMERIC=new RegExp(t,"g"),Ri.ALPHANUMERIC=new RegExp(e,"g");const s=new RegExp("^"+n+"$"),l=new RegExp("^"+t+"$"),c=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ri.testKanji=function(h){return s.test(h)},Ri.testNumeric=function(h){return l.test(h)},Ri.testAlphanumeric=function(h){return c.test(h)},Ri}var ob;function Fs(){return ob||(ob=1,function(t){const e=KT(),n=GT();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(l,c){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!e.isValid(c))throw new Error("Invalid version: "+c);return c>=1&&c<10?l.ccBits[0]:c<27?l.ccBits[1]:l.ccBits[2]},t.getBestModeForData=function(l){return n.testNumeric(l)?t.NUMERIC:n.testAlphanumeric(l)?t.ALPHANUMERIC:n.testKanji(l)?t.KANJI:t.BYTE},t.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},t.isValid=function(l){return l&&l.bit&&l.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+s)}}t.from=function(l,c){if(t.isValid(l))return l;try{return r(l)}catch{return c}}}(zh)),zh}var lb;function gB(){return lb||(lb=1,function(t){const e=_s(),n=QT(),r=Ip(),s=Fs(),l=KT(),c=7973,m=e.getBCHDigit(c);function h(v,w,T){for(let S=1;S<=40;S++)if(w<=t.getCapacity(S,T,v))return S}function g(v,w){return s.getCharCountIndicator(v,w)+4}function A(v,w){let T=0;return v.forEach(function(S){const k=g(S.mode,w);T+=k+S.getBitsLength()}),T}function p(v,w){for(let T=1;T<=40;T++)if(A(v,T)<=t.getCapacity(T,w,s.MIXED))return T}t.from=function(w,T){return l.isValid(w)?parseInt(w,10):T},t.getCapacity=function(w,T,S){if(!l.isValid(w))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=s.BYTE);const k=e.getSymbolTotalCodewords(w),L=n.getTotalCodewordsCount(w,T),U=(k-L)*8;if(S===s.MIXED)return U;const x=U-g(S,w);switch(S){case s.NUMERIC:return Math.floor(x/10*3);case s.ALPHANUMERIC:return Math.floor(x/11*2);case s.KANJI:return Math.floor(x/13);case s.BYTE:default:return Math.floor(x/8)}},t.getBestVersionForData=function(w,T){let S;const k=r.from(T,r.M);if(Array.isArray(w)){if(w.length>1)return p(w,k);if(w.length===0)return 1;S=w[0]}else S=w;return h(S.mode,S.getLength(),k)},t.getEncodedBits=function(w){if(!l.isValid(w)||w<7)throw new Error("Invalid QR Code version");let T=w<<12;for(;e.getBCHDigit(T)-m>=0;)T^=c<<e.getBCHDigit(T)-m;return w<<12|T}}(Vh)),Vh}var Kh={},db;function hB(){if(db)return Kh;db=1;const t=_s(),e=1335,n=21522,r=t.getBCHDigit(e);return Kh.getEncodedBits=function(l,c){const m=l.bit<<3|c;let h=m<<10;for(;t.getBCHDigit(h)-r>=0;)h^=e<<t.getBCHDigit(h)-r;return(m<<10|h)^n},Kh}var Gh={},Wh,cb;function fB(){if(cb)return Wh;cb=1;const t=Fs();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%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(r){let s,l,c;for(s=0;s+3<=this.data.length;s+=3)l=this.data.substr(s,3),c=parseInt(l,10),r.put(c,10);const m=this.data.length-s;m>0&&(l=this.data.substr(s),c=parseInt(l,10),r.put(c,m*3+1))},Wh=e,Wh}var qh,ub;function pB(){if(ub)return qh;ub=1;const t=Fs(),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 n(r){this.mode=t.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(s){return 11*Math.floor(s/2)+6*(s%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(s){let l;for(l=0;l+2<=this.data.length;l+=2){let c=e.indexOf(this.data[l])*45;c+=e.indexOf(this.data[l+1]),s.put(c,11)}this.data.length%2&&s.put(e.indexOf(this.data[l]),6)},qh=n,qh}var Yh,mb;function AB(){if(mb)return Yh;mb=1;const t=Fs();function e(n){this.mode=t.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return e.getBitsLength=function(r){return r*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(n){for(let r=0,s=this.data.length;r<s;r++)n.put(this.data[r],8)},Yh=e,Yh}var Jh,gb;function yB(){if(gb)return Jh;gb=1;const t=Fs(),e=_s();function n(r){this.mode=t.KANJI,this.data=r}return n.getBitsLength=function(s){return s*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let s;for(s=0;s<this.data.length;s++){let l=e.toSJIS(this.data[s]);if(l>=33088&&l<=40956)l-=33088;else if(l>=57408&&l<=60351)l-=49472;else throw new Error("Invalid SJIS character: "+this.data[s]+`
Make sure your charset is UTF-8`);l=(l>>>8&255)*192+(l&255),r.put(l,13)}},Jh=n,Jh}var Xh={exports:{}},hb;function EB(){return hb||(hb=1,function(t){var e={single_source_shortest_paths:function(n,r,s){var l={},c={};c[r]=0;var m=e.PriorityQueue.make();m.push(r,0);for(var h,g,A,p,v,w,T,S,k;!m.empty();){h=m.pop(),g=h.value,p=h.cost,v=n[g]||{};for(A in v)v.hasOwnProperty(A)&&(w=v[A],T=p+w,S=c[A],k=typeof c[A]>"u",(k||S>T)&&(c[A]=T,m.push(A,T),l[A]=g))}if(typeof s<"u"&&typeof c[s]>"u"){var L=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(L)}return l},extract_shortest_path_from_predecessor_list:function(n,r){for(var s=[],l=r;l;)s.push(l),n[l],l=n[l];return s.reverse(),s},find_path:function(n,r,s){var l=e.single_source_shortest_paths(n,r,s);return e.extract_shortest_path_from_predecessor_list(l,s)},PriorityQueue:{make:function(n){var r=e.PriorityQueue,s={},l;n=n||{};for(l in r)r.hasOwnProperty(l)&&(s[l]=r[l]);return s.queue=[],s.sorter=n.sorter||r.default_sorter,s},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var s={value:n,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e}(Xh)),Xh.exports}var fb;function bB(){return fb||(fb=1,function(t){const e=Fs(),n=fB(),r=pB(),s=AB(),l=yB(),c=GT(),m=_s(),h=EB();function g(L){return unescape(encodeURIComponent(L)).length}function A(L,U,x){const F=[];let B;for(;(B=L.exec(x))!==null;)F.push({data:B[0],index:B.index,mode:U,length:B[0].length});return F}function p(L){const U=A(c.NUMERIC,e.NUMERIC,L),x=A(c.ALPHANUMERIC,e.ALPHANUMERIC,L);let F,B;return m.isKanjiModeEnabled()?(F=A(c.BYTE,e.BYTE,L),B=A(c.KANJI,e.KANJI,L)):(F=A(c.BYTE_KANJI,e.BYTE,L),B=[]),U.concat(x,F,B).sort(function(O,_){return O.index-_.index}).map(function(O){return{data:O.data,mode:O.mode,length:O.length}})}function v(L,U){switch(U){case e.NUMERIC:return n.getBitsLength(L);case e.ALPHANUMERIC:return r.getBitsLength(L);case e.KANJI:return l.getBitsLength(L);case e.BYTE:return s.getBitsLength(L)}}function w(L){return L.reduce(function(U,x){const F=U.length-1>=0?U[U.length-1]:null;return F&&F.mode===x.mode?(U[U.length-1].data+=x.data,U):(U.push(x),U)},[])}function T(L){const U=[];for(let x=0;x<L.length;x++){const F=L[x];switch(F.mode){case e.NUMERIC:U.push([F,{data:F.data,mode:e.ALPHANUMERIC,length:F.length},{data:F.data,mode:e.BYTE,length:F.length}]);break;case e.ALPHANUMERIC:U.push([F,{data:F.data,mode:e.BYTE,length:F.length}]);break;case e.KANJI:U.push([F,{data:F.data,mode:e.BYTE,length:g(F.data)}]);break;case e.BYTE:U.push([{data:F.data,mode:e.BYTE,length:g(F.data)}])}}return U}function S(L,U){const x={},F={start:{}};let B=["start"];for(let V=0;V<L.length;V++){const O=L[V],_=[];for(let z=0;z<O.length;z++){const Q=O[z],K=""+V+z;_.push(K),x[K]={node:Q,lastCount:0},F[K]={};for(let te=0;te<B.length;te++){const ee=B[te];x[ee]&&x[ee].node.mode===Q.mode?(F[ee][K]=v(x[ee].lastCount+Q.length,Q.mode)-v(x[ee].lastCount,Q.mode),x[ee].lastCount+=Q.length):(x[ee]&&(x[ee].lastCount=Q.length),F[ee][K]=v(Q.length,Q.mode)+4+e.getCharCountIndicator(Q.mode,U))}}B=_}for(let V=0;V<B.length;V++)F[B[V]].end=0;return{map:F,table:x}}function k(L,U){let x;const F=e.getBestModeForData(L);if(x=e.from(U,F),x!==e.BYTE&&x.bit<F.bit)throw new Error('"'+L+'" cannot be encoded with mode '+e.toString(x)+`.
 Suggested mode is: `+e.toString(F));switch(x===e.KANJI&&!m.isKanjiModeEnabled()&&(x=e.BYTE),x){case e.NUMERIC:return new n(L);case e.ALPHANUMERIC:return new r(L);case e.KANJI:return new l(L);case e.BYTE:return new s(L)}}t.fromArray=function(U){return U.reduce(function(x,F){return typeof F=="string"?x.push(k(F,null)):F.data&&x.push(k(F.data,F.mode)),x},[])},t.fromString=function(U,x){const F=p(U,m.isKanjiModeEnabled()),B=T(F),V=S(B,x),O=h.find_path(V.map,"start","end"),_=[];for(let z=1;z<O.length-1;z++)_.push(V.table[O[z]].node);return t.fromArray(w(_))},t.rawSplit=function(U){return t.fromArray(p(U,m.isKanjiModeEnabled()))}}(Gh)),Gh}var pb;function vB(){if(pb)return Uh;pb=1;const t=_s(),e=Ip(),n=rB(),r=sB(),s=oB(),l=lB(),c=dB(),m=QT(),h=mB(),g=gB(),A=hB(),p=Fs(),v=bB();function w(V,O){const _=V.size,z=l.getPositions(O);for(let Q=0;Q<z.length;Q++){const K=z[Q][0],te=z[Q][1];for(let ee=-1;ee<=7;ee++)if(!(K+ee<=-1||_<=K+ee))for(let Y=-1;Y<=7;Y++)te+Y<=-1||_<=te+Y||(ee>=0&&ee<=6&&(Y===0||Y===6)||Y>=0&&Y<=6&&(ee===0||ee===6)||ee>=2&&ee<=4&&Y>=2&&Y<=4?V.set(K+ee,te+Y,!0,!0):V.set(K+ee,te+Y,!1,!0))}}function T(V){const O=V.size;for(let _=8;_<O-8;_++){const z=_%2===0;V.set(_,6,z,!0),V.set(6,_,z,!0)}}function S(V,O){const _=s.getPositions(O);for(let z=0;z<_.length;z++){const Q=_[z][0],K=_[z][1];for(let te=-2;te<=2;te++)for(let ee=-2;ee<=2;ee++)te===-2||te===2||ee===-2||ee===2||te===0&&ee===0?V.set(Q+te,K+ee,!0,!0):V.set(Q+te,K+ee,!1,!0)}}function k(V,O){const _=V.size,z=g.getEncodedBits(O);let Q,K,te;for(let ee=0;ee<18;ee++)Q=Math.floor(ee/3),K=ee%3+_-8-3,te=(z>>ee&1)===1,V.set(Q,K,te,!0),V.set(K,Q,te,!0)}function L(V,O,_){const z=V.size,Q=A.getEncodedBits(O,_);let K,te;for(K=0;K<15;K++)te=(Q>>K&1)===1,K<6?V.set(K,8,te,!0):K<8?V.set(K+1,8,te,!0):V.set(z-15+K,8,te,!0),K<8?V.set(8,z-K-1,te,!0):K<9?V.set(8,15-K-1+1,te,!0):V.set(8,15-K-1,te,!0);V.set(z-8,8,1,!0)}function U(V,O){const _=V.size;let z=-1,Q=_-1,K=7,te=0;for(let ee=_-1;ee>0;ee-=2)for(ee===6&&ee--;;){for(let Y=0;Y<2;Y++)if(!V.isReserved(Q,ee-Y)){let le=!1;te<O.length&&(le=(O[te]>>>K&1)===1),V.set(Q,ee-Y,le),K--,K===-1&&(te++,K=7)}if(Q+=z,Q<0||_<=Q){Q-=z,z=-z;break}}}function x(V,O,_){const z=new n;_.forEach(function(Y){z.put(Y.mode.bit,4),z.put(Y.getLength(),p.getCharCountIndicator(Y.mode,V)),Y.write(z)});const Q=t.getSymbolTotalCodewords(V),K=m.getTotalCodewordsCount(V,O),te=(Q-K)*8;for(z.getLengthInBits()+4<=te&&z.put(0,4);z.getLengthInBits()%8!==0;)z.putBit(0);const ee=(te-z.getLengthInBits())/8;for(let Y=0;Y<ee;Y++)z.put(Y%2?17:236,8);return F(z,V,O)}function F(V,O,_){const z=t.getSymbolTotalCodewords(O),Q=m.getTotalCodewordsCount(O,_),K=z-Q,te=m.getBlocksCount(O,_),ee=z%te,Y=te-ee,le=Math.floor(z/te),J=Math.floor(K/te),ie=J+1,be=le-J,se=new h(be);let j=0;const W=new Array(te),X=new Array(te);let ne=0;const we=new Uint8Array(V.buffer);for(let Pe=0;Pe<te;Pe++){const Ve=Pe<Y?J:ie;W[Pe]=we.slice(j,j+Ve),X[Pe]=se.encode(W[Pe]),j+=Ve,ne=Math.max(ne,Ve)}const ce=new Uint8Array(z);let Ee=0,Te,Ce;for(Te=0;Te<ne;Te++)for(Ce=0;Ce<te;Ce++)Te<W[Ce].length&&(ce[Ee++]=W[Ce][Te]);for(Te=0;Te<be;Te++)for(Ce=0;Ce<te;Ce++)ce[Ee++]=X[Ce][Te];return ce}function B(V,O,_,z){let Q;if(Array.isArray(V))Q=v.fromArray(V);else if(typeof V=="string"){let le=O;if(!le){const J=v.rawSplit(V);le=g.getBestVersionForData(J,_)}Q=v.fromString(V,le||40)}else throw new Error("Invalid data");const K=g.getBestVersionForData(Q,_);if(!K)throw new Error("The amount of data is too big to be stored in a QR Code");if(!O)O=K;else if(O<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 te=x(O,_,Q),ee=t.getSymbolSize(O),Y=new r(ee);return w(Y,O),T(Y),S(Y,O),L(Y,_,0),O>=7&&k(Y,O),U(Y,te),isNaN(z)&&(z=c.getBestMask(Y,L.bind(null,Y,_))),c.applyMask(z,Y),L(Y,_,z),{modules:Y,version:O,errorCorrectionLevel:_,maskPattern:z,segments:Q}}return Uh.create=function(O,_){if(typeof O>"u"||O==="")throw new Error("No input text");let z=e.M,Q,K;return typeof _<"u"&&(z=e.from(_.errorCorrectionLevel,e.M),Q=g.from(_.version),K=c.from(_.maskPattern),_.toSJISFunc&&t.setToSJISFunction(_.toSJISFunc)),B(O,Q,z,K)},Uh}var $h={},Zh={},Ab;function WT(){return Ab||(Ab=1,function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(l){return[l,l]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,l=r.width&&r.width>=21?r.width:void 0,c=r.scale||4;return{width:l,scale:l?4:c,margin:s,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},t.getImageWidth=function(r,s){const l=t.getScale(r,s);return Math.floor((r+s.margin*2)*l)},t.qrToImageData=function(r,s,l){const c=s.modules.size,m=s.modules.data,h=t.getScale(c,l),g=Math.floor((c+l.margin*2)*h),A=l.margin*h,p=[l.color.light,l.color.dark];for(let v=0;v<g;v++)for(let w=0;w<g;w++){let T=(v*g+w)*4,S=l.color.light;if(v>=A&&w>=A&&v<g-A&&w<g-A){const k=Math.floor((v-A)/h),L=Math.floor((w-A)/h);S=p[m[k*c+L]?1:0]}r[T++]=S.r,r[T++]=S.g,r[T++]=S.b,r[T]=S.a}}}(Zh)),Zh}var yb;function wB(){return yb||(yb=1,function(t){const e=WT();function n(s,l,c){s.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=c,l.width=c,l.style.height=c+"px",l.style.width=c+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(l,c,m){let h=m,g=c;typeof h>"u"&&(!c||!c.getContext)&&(h=c,c=void 0),c||(g=r()),h=e.getOptions(h);const A=e.getImageWidth(l.modules.size,h),p=g.getContext("2d"),v=p.createImageData(A,A);return e.qrToImageData(v.data,l,h),n(p,g,A),p.putImageData(v,0,0),g},t.renderToDataURL=function(l,c,m){let h=m;typeof h>"u"&&(!c||!c.getContext)&&(h=c,c=void 0),h||(h={});const g=t.render(l,c,h),A=h.type||"image/png",p=h.rendererOpts||{};return g.toDataURL(A,p.quality)}}($h)),$h}var ef={},Eb;function IB(){if(Eb)return ef;Eb=1;const t=WT();function e(s,l){const c=s.a/255,m=l+'="'+s.hex+'"';return c<1?m+" "+l+'-opacity="'+c.toFixed(2).slice(1)+'"':m}function n(s,l,c){let m=s+l;return typeof c<"u"&&(m+=" "+c),m}function r(s,l,c){let m="",h=0,g=!1,A=0;for(let p=0;p<s.length;p++){const v=Math.floor(p%l),w=Math.floor(p/l);!v&&!g&&(g=!0),s[p]?(A++,p>0&&v>0&&s[p-1]||(m+=g?n("M",v+c,.5+w+c):n("m",h,0),h=0,g=!1),v+1<l&&s[p+1]||(m+=n("h",A),A=0)):h++}return m}return ef.render=function(l,c,m){const h=t.getOptions(c),g=l.modules.size,A=l.modules.data,p=g+h.margin*2,v=h.color.light.a?"<path "+e(h.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",w="<path "+e(h.color.dark,"stroke")+' d="'+r(A,g,h.margin)+'"/>',T='viewBox="0 0 '+p+" "+p+'"',k='<svg xmlns="http://www.w3.org/2000/svg" '+(h.width?'width="'+h.width+'" height="'+h.width+'" ':"")+T+' shape-rendering="crispEdges">'+v+w+`</svg>
`;return typeof m=="function"&&m(null,k),k},ef}var bb;function CB(){if(bb)return bo;bb=1;const t=iB(),e=vB(),n=wB(),r=IB();function s(l,c,m,h,g){const A=[].slice.call(arguments,1),p=A.length,v=typeof A[p-1]=="function";if(!v&&!t())throw new Error("Callback required as last argument");if(v){if(p<2)throw new Error("Too few arguments provided");p===2?(g=m,m=c,c=h=void 0):p===3&&(c.getContext&&typeof g>"u"?(g=h,h=void 0):(g=h,h=m,m=c,c=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(m=c,c=h=void 0):p===2&&!c.getContext&&(h=m,m=c,c=void 0),new Promise(function(w,T){try{const S=e.create(m,h);w(l(S,c,h))}catch(S){T(S)}})}try{const w=e.create(m,h);g(null,l(w,c,h))}catch(w){g(w)}}return bo.create=e.create,bo.toCanvas=s.bind(null,n.render),bo.toDataURL=s.bind(null,n.renderToDataURL),bo.toString=s.bind(null,function(l,c,m){return r.render(l,m)}),bo}var SB=CB();const qT=ss(SB),Zn=({isOpen:t,onClose:e,title:n,children:r,maxWidth:s="max-w-md",showCloseButton:l=!0,footer:c,showHeaderBorder:m=!0,bodyClassName:h="px-6 py-4"})=>{const{t:g}=tt(),A=b.useCallback(v=>{v.key==="Escape"&&e()},[e]);if(b.useEffect(()=>{if(t)return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[t,A]),!t)return null;const p=v=>{v.target===v.currentTarget&&e()};return d.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[d.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:e}),d.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:p,children:d.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&&d.jsxs("div",{className:`px-6 py-4 flex items-center justify-between ${m?"border-b border-gray-200 dark:border-gray-700":""}`,children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:n}),l&&d.jsxs("button",{type:"button",className:"text-gray-400 hover:text-gray-500 focus:outline-none",onClick:e,children:[d.jsx("span",{className:"sr-only",children:g("common.close")}),d.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})]}),!n&&l&&d.jsxs("button",{type:"button",className:"absolute top-3 right-3 text-gray-400 hover:text-gray-500 focus:outline-none z-10",onClick:e,children:[d.jsx("span",{className:"sr-only",children:g("common.close")}),d.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),d.jsx("div",{className:h,children:r}),c&&d.jsx("div",{className:"px-6 py-4 border-t border-gray-200 dark:border-gray-700",children:c})]})})]})};var Xn=(t=>(t.TIMEOUT="TIMEOUT",t.GENERIC="GENERIC",t))(Xn||{}),tf={},Hl={},vb;function NB(){if(vb)return Hl;vb=1,Hl.byteLength=m,Hl.toByteArray=g,Hl.fromByteArray=v;for(var t=[],e=[],n=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=r.length;s<l;++s)t[s]=r[s],e[r.charCodeAt(s)]=s;e[45]=62,e[95]=63;function c(w){var T=w.length;if(T%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var S=w.indexOf("=");S===-1&&(S=T);var k=S===T?0:4-S%4;return[S,k]}function m(w){var T=c(w),S=T[0],k=T[1];return(S+k)*3/4-k}function h(w,T,S){return(T+S)*3/4-S}function g(w){var T,S=c(w),k=S[0],L=S[1],U=new n(h(w,k,L)),x=0,F=L>0?k-4:k,B;for(B=0;B<F;B+=4)T=e[w.charCodeAt(B)]<<18|e[w.charCodeAt(B+1)]<<12|e[w.charCodeAt(B+2)]<<6|e[w.charCodeAt(B+3)],U[x++]=T>>16&255,U[x++]=T>>8&255,U[x++]=T&255;return L===2&&(T=e[w.charCodeAt(B)]<<2|e[w.charCodeAt(B+1)]>>4,U[x++]=T&255),L===1&&(T=e[w.charCodeAt(B)]<<10|e[w.charCodeAt(B+1)]<<4|e[w.charCodeAt(B+2)]>>2,U[x++]=T>>8&255,U[x++]=T&255),U}function A(w){return t[w>>18&63]+t[w>>12&63]+t[w>>6&63]+t[w&63]}function p(w,T,S){for(var k,L=[],U=T;U<S;U+=3)k=(w[U]<<16&16711680)+(w[U+1]<<8&65280)+(w[U+2]&255),L.push(A(k));return L.join("")}function v(w){for(var T,S=w.length,k=S%3,L=[],U=16383,x=0,F=S-k;x<F;x+=U)L.push(p(w,x,x+U>F?F:x+U));return k===1?(T=w[S-1],L.push(t[T>>2]+t[T<<4&63]+"==")):k===2&&(T=(w[S-2]<<8)+w[S-1],L.push(t[T>>10]+t[T>>4&63]+t[T<<2&63]+"=")),L.join("")}return Hl}var Xc={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var wb;function TB(){return wb||(wb=1,Xc.read=function(t,e,n,r,s){var l,c,m=s*8-r-1,h=(1<<m)-1,g=h>>1,A=-7,p=n?s-1:0,v=n?-1:1,w=t[e+p];for(p+=v,l=w&(1<<-A)-1,w>>=-A,A+=m;A>0;l=l*256+t[e+p],p+=v,A-=8);for(c=l&(1<<-A)-1,l>>=-A,A+=r;A>0;c=c*256+t[e+p],p+=v,A-=8);if(l===0)l=1-g;else{if(l===h)return c?NaN:(w?-1:1)*(1/0);c=c+Math.pow(2,r),l=l-g}return(w?-1:1)*c*Math.pow(2,l-r)},Xc.write=function(t,e,n,r,s,l){var c,m,h,g=l*8-s-1,A=(1<<g)-1,p=A>>1,v=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=r?0:l-1,T=r?1:-1,S=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(m=isNaN(e)?1:0,c=A):(c=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+p>=1?e+=v/h:e+=v*Math.pow(2,1-p),e*h>=2&&(c++,h/=2),c+p>=A?(m=0,c=A):c+p>=1?(m=(e*h-1)*Math.pow(2,s),c=c+p):(m=e*Math.pow(2,p-1)*Math.pow(2,s),c=0));s>=8;t[n+w]=m&255,w+=T,m/=256,s-=8);for(c=c<<s|m,g+=s;g>0;t[n+w]=c&255,w+=T,c/=256,g-=8);t[n+w-T]|=S*128}),Xc}/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */var Ib;function kB(){return Ib||(Ib=1,function(t){const e=NB(),n=TB(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=m,t.SlowBuffer=U,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s,m.TYPED_ARRAY_SUPPORT=l(),!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 l(){try{const M=new Uint8Array(1),C={foo:function(){return 42}};return Object.setPrototypeOf(C,Uint8Array.prototype),Object.setPrototypeOf(M,C),M.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 c(M){if(M>s)throw new RangeError('The value "'+M+'" is invalid for option "size"');const C=new Uint8Array(M);return Object.setPrototypeOf(C,m.prototype),C}function m(M,C,N){if(typeof M=="number"){if(typeof C=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(M)}return h(M,C,N)}m.poolSize=8192;function h(M,C,N){if(typeof M=="string")return v(M,C);if(ArrayBuffer.isView(M))return T(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(at(M,ArrayBuffer)||M&&at(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(at(M,SharedArrayBuffer)||M&&at(M.buffer,SharedArrayBuffer)))return S(M,C,N);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=M.valueOf&&M.valueOf();if(G!=null&&G!==M)return m.from(G,C,N);const ae=k(M);if(ae)return ae;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return m.from(M[Symbol.toPrimitive]("string"),C,N);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}m.from=function(M,C,N){return h(M,C,N)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array);function g(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function A(M,C,N){return g(M),M<=0?c(M):C!==void 0?typeof N=="string"?c(M).fill(C,N):c(M).fill(C):c(M)}m.alloc=function(M,C,N){return A(M,C,N)};function p(M){return g(M),c(M<0?0:L(M)|0)}m.allocUnsafe=function(M){return p(M)},m.allocUnsafeSlow=function(M){return p(M)};function v(M,C){if((typeof C!="string"||C==="")&&(C="utf8"),!m.isEncoding(C))throw new TypeError("Unknown encoding: "+C);const N=x(M,C)|0;let G=c(N);const ae=G.write(M,C);return ae!==N&&(G=G.slice(0,ae)),G}function w(M){const C=M.length<0?0:L(M.length)|0,N=c(C);for(let G=0;G<C;G+=1)N[G]=M[G]&255;return N}function T(M){if(at(M,Uint8Array)){const C=new Uint8Array(M);return S(C.buffer,C.byteOffset,C.byteLength)}return w(M)}function S(M,C,N){if(C<0||M.byteLength<C)throw new RangeError('"offset" is outside of buffer bounds');if(M.byteLength<C+(N||0))throw new RangeError('"length" is outside of buffer bounds');let G;return C===void 0&&N===void 0?G=new Uint8Array(M):N===void 0?G=new Uint8Array(M,C):G=new Uint8Array(M,C,N),Object.setPrototypeOf(G,m.prototype),G}function k(M){if(m.isBuffer(M)){const C=L(M.length)|0,N=c(C);return N.length===0||M.copy(N,0,0,C),N}if(M.length!==void 0)return typeof M.length!="number"||wt(M.length)?c(0):w(M);if(M.type==="Buffer"&&Array.isArray(M.data))return w(M.data)}function L(M){if(M>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return M|0}function U(M){return+M!=M&&(M=0),m.alloc(+M)}m.isBuffer=function(C){return C!=null&&C._isBuffer===!0&&C!==m.prototype},m.compare=function(C,N){if(at(C,Uint8Array)&&(C=m.from(C,C.offset,C.byteLength)),at(N,Uint8Array)&&(N=m.from(N,N.offset,N.byteLength)),!m.isBuffer(C)||!m.isBuffer(N))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(C===N)return 0;let G=C.length,ae=N.length;for(let pe=0,Ne=Math.min(G,ae);pe<Ne;++pe)if(C[pe]!==N[pe]){G=C[pe],ae=N[pe];break}return G<ae?-1:ae<G?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,N){if(!Array.isArray(C))throw new TypeError('"list" argument must be an Array of Buffers');if(C.length===0)return m.alloc(0);let G;if(N===void 0)for(N=0,G=0;G<C.length;++G)N+=C[G].length;const ae=m.allocUnsafe(N);let pe=0;for(G=0;G<C.length;++G){let Ne=C[G];if(at(Ne,Uint8Array))pe+Ne.length>ae.length?(m.isBuffer(Ne)||(Ne=m.from(Ne)),Ne.copy(ae,pe)):Uint8Array.prototype.set.call(ae,Ne,pe);else if(m.isBuffer(Ne))Ne.copy(ae,pe);else throw new TypeError('"list" argument must be an Array of Buffers');pe+=Ne.length}return ae};function x(M,C){if(m.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||at(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const N=M.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&N===0)return 0;let ae=!1;for(;;)switch(C){case"ascii":case"latin1":case"binary":return N;case"utf8":case"utf-8":return Fe(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N*2;case"hex":return N>>>1;case"base64":return ze(M).length;default:if(ae)return G?-1:Fe(M).length;C=(""+C).toLowerCase(),ae=!0}}m.byteLength=x;function F(M,C,N){let G=!1;if((C===void 0||C<0)&&(C=0),C>this.length||((N===void 0||N>this.length)&&(N=this.length),N<=0)||(N>>>=0,C>>>=0,N<=C))return"";for(M||(M="utf8");;)switch(M){case"hex":return se(this,C,N);case"utf8":case"utf-8":return Y(this,C,N);case"ascii":return ie(this,C,N);case"latin1":case"binary":return be(this,C,N);case"base64":return ee(this,C,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,C,N);default:if(G)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),G=!0}}m.prototype._isBuffer=!0;function B(M,C,N){const G=M[C];M[C]=M[N],M[N]=G}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 N=0;N<C;N+=2)B(this,N,N+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 N=0;N<C;N+=4)B(this,N,N+3),B(this,N+1,N+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 N=0;N<C;N+=8)B(this,N,N+7),B(this,N+1,N+6),B(this,N+2,N+5),B(this,N+3,N+4);return this},m.prototype.toString=function(){const C=this.length;return C===0?"":arguments.length===0?Y(this,0,C):F.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 N=t.INSPECT_MAX_BYTES;return C=this.toString("hex",0,N).replace(/(.{2})/g,"$1 ").trim(),this.length>N&&(C+=" ... "),"<Buffer "+C+">"},r&&(m.prototype[r]=m.prototype.inspect),m.prototype.compare=function(C,N,G,ae,pe){if(at(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(N===void 0&&(N=0),G===void 0&&(G=C?C.length:0),ae===void 0&&(ae=0),pe===void 0&&(pe=this.length),N<0||G>C.length||ae<0||pe>this.length)throw new RangeError("out of range index");if(ae>=pe&&N>=G)return 0;if(ae>=pe)return-1;if(N>=G)return 1;if(N>>>=0,G>>>=0,ae>>>=0,pe>>>=0,this===C)return 0;let Ne=pe-ae,_e=G-N;const ht=Math.min(Ne,_e),pt=this.slice(ae,pe),It=C.slice(N,G);for(let At=0;At<ht;++At)if(pt[At]!==It[At]){Ne=pt[At],_e=It[At];break}return Ne<_e?-1:_e<Ne?1:0};function V(M,C,N,G,ae){if(M.length===0)return-1;if(typeof N=="string"?(G=N,N=0):N>2147483647?N=2147483647:N<-2147483648&&(N=-2147483648),N=+N,wt(N)&&(N=ae?0:M.length-1),N<0&&(N=M.length+N),N>=M.length){if(ae)return-1;N=M.length-1}else if(N<0)if(ae)N=0;else return-1;if(typeof C=="string"&&(C=m.from(C,G)),m.isBuffer(C))return C.length===0?-1:O(M,C,N,G,ae);if(typeof C=="number")return C=C&255,typeof Uint8Array.prototype.indexOf=="function"?ae?Uint8Array.prototype.indexOf.call(M,C,N):Uint8Array.prototype.lastIndexOf.call(M,C,N):O(M,[C],N,G,ae);throw new TypeError("val must be string, number or Buffer")}function O(M,C,N,G,ae){let pe=1,Ne=M.length,_e=C.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(M.length<2||C.length<2)return-1;pe=2,Ne/=2,_e/=2,N/=2}function ht(It,At){return pe===1?It[At]:It.readUInt16BE(At*pe)}let pt;if(ae){let It=-1;for(pt=N;pt<Ne;pt++)if(ht(M,pt)===ht(C,It===-1?0:pt-It)){if(It===-1&&(It=pt),pt-It+1===_e)return It*pe}else It!==-1&&(pt-=pt-It),It=-1}else for(N+_e>Ne&&(N=Ne-_e),pt=N;pt>=0;pt--){let It=!0;for(let At=0;At<_e;At++)if(ht(M,pt+At)!==ht(C,At)){It=!1;break}if(It)return pt}return-1}m.prototype.includes=function(C,N,G){return this.indexOf(C,N,G)!==-1},m.prototype.indexOf=function(C,N,G){return V(this,C,N,G,!0)},m.prototype.lastIndexOf=function(C,N,G){return V(this,C,N,G,!1)};function _(M,C,N,G){N=Number(N)||0;const ae=M.length-N;G?(G=Number(G),G>ae&&(G=ae)):G=ae;const pe=C.length;G>pe/2&&(G=pe/2);let Ne;for(Ne=0;Ne<G;++Ne){const _e=parseInt(C.substr(Ne*2,2),16);if(wt(_e))return Ne;M[N+Ne]=_e}return Ne}function z(M,C,N,G){return je(Fe(C,M.length-N),M,N,G)}function Q(M,C,N,G){return je(fe(C),M,N,G)}function K(M,C,N,G){return je(ze(C),M,N,G)}function te(M,C,N,G){return je(Re(C,M.length-N),M,N,G)}m.prototype.write=function(C,N,G,ae){if(N===void 0)ae="utf8",G=this.length,N=0;else if(G===void 0&&typeof N=="string")ae=N,G=this.length,N=0;else if(isFinite(N))N=N>>>0,isFinite(G)?(G=G>>>0,ae===void 0&&(ae="utf8")):(ae=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const pe=this.length-N;if((G===void 0||G>pe)&&(G=pe),C.length>0&&(G<0||N<0)||N>this.length)throw new RangeError("Attempt to write outside buffer bounds");ae||(ae="utf8");let Ne=!1;for(;;)switch(ae){case"hex":return _(this,C,N,G);case"utf8":case"utf-8":return z(this,C,N,G);case"ascii":case"latin1":case"binary":return Q(this,C,N,G);case"base64":return K(this,C,N,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,C,N,G);default:if(Ne)throw new TypeError("Unknown encoding: "+ae);ae=(""+ae).toLowerCase(),Ne=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ee(M,C,N){return C===0&&N===M.length?e.fromByteArray(M):e.fromByteArray(M.slice(C,N))}function Y(M,C,N){N=Math.min(M.length,N);const G=[];let ae=C;for(;ae<N;){const pe=M[ae];let Ne=null,_e=pe>239?4:pe>223?3:pe>191?2:1;if(ae+_e<=N){let ht,pt,It,At;switch(_e){case 1:pe<128&&(Ne=pe);break;case 2:ht=M[ae+1],(ht&192)===128&&(At=(pe&31)<<6|ht&63,At>127&&(Ne=At));break;case 3:ht=M[ae+1],pt=M[ae+2],(ht&192)===128&&(pt&192)===128&&(At=(pe&15)<<12|(ht&63)<<6|pt&63,At>2047&&(At<55296||At>57343)&&(Ne=At));break;case 4:ht=M[ae+1],pt=M[ae+2],It=M[ae+3],(ht&192)===128&&(pt&192)===128&&(It&192)===128&&(At=(pe&15)<<18|(ht&63)<<12|(pt&63)<<6|It&63,At>65535&&At<1114112&&(Ne=At))}}Ne===null?(Ne=65533,_e=1):Ne>65535&&(Ne-=65536,G.push(Ne>>>10&1023|55296),Ne=56320|Ne&1023),G.push(Ne),ae+=_e}return J(G)}const le=4096;function J(M){const C=M.length;if(C<=le)return String.fromCharCode.apply(String,M);let N="",G=0;for(;G<C;)N+=String.fromCharCode.apply(String,M.slice(G,G+=le));return N}function ie(M,C,N){let G="";N=Math.min(M.length,N);for(let ae=C;ae<N;++ae)G+=String.fromCharCode(M[ae]&127);return G}function be(M,C,N){let G="";N=Math.min(M.length,N);for(let ae=C;ae<N;++ae)G+=String.fromCharCode(M[ae]);return G}function se(M,C,N){const G=M.length;(!C||C<0)&&(C=0),(!N||N<0||N>G)&&(N=G);let ae="";for(let pe=C;pe<N;++pe)ae+=Rt[M[pe]];return ae}function j(M,C,N){const G=M.slice(C,N);let ae="";for(let pe=0;pe<G.length-1;pe+=2)ae+=String.fromCharCode(G[pe]+G[pe+1]*256);return ae}m.prototype.slice=function(C,N){const G=this.length;C=~~C,N=N===void 0?G:~~N,C<0?(C+=G,C<0&&(C=0)):C>G&&(C=G),N<0?(N+=G,N<0&&(N=0)):N>G&&(N=G),N<C&&(N=C);const ae=this.subarray(C,N);return Object.setPrototypeOf(ae,m.prototype),ae};function W(M,C,N){if(M%1!==0||M<0)throw new RangeError("offset is not uint");if(M+C>N)throw new RangeError("Trying to access beyond buffer length")}m.prototype.readUintLE=m.prototype.readUIntLE=function(C,N,G){C=C>>>0,N=N>>>0,G||W(C,N,this.length);let ae=this[C],pe=1,Ne=0;for(;++Ne<N&&(pe*=256);)ae+=this[C+Ne]*pe;return ae},m.prototype.readUintBE=m.prototype.readUIntBE=function(C,N,G){C=C>>>0,N=N>>>0,G||W(C,N,this.length);let ae=this[C+--N],pe=1;for(;N>0&&(pe*=256);)ae+=this[C+--N]*pe;return ae},m.prototype.readUint8=m.prototype.readUInt8=function(C,N){return C=C>>>0,N||W(C,1,this.length),this[C]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function(C,N){return C=C>>>0,N||W(C,2,this.length),this[C]|this[C+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function(C,N){return C=C>>>0,N||W(C,2,this.length),this[C]<<8|this[C+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function(C,N){return C=C>>>0,N||W(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,N){return C=C>>>0,N||W(C,4,this.length),this[C]*16777216+(this[C+1]<<16|this[C+2]<<8|this[C+3])},m.prototype.readBigUInt64LE=Tt(function(C){C=C>>>0,it(C,"offset");const N=this[C],G=this[C+7];(N===void 0||G===void 0)&&Ke(C,this.length-8);const ae=N+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24,pe=this[++C]+this[++C]*2**8+this[++C]*2**16+G*2**24;return BigInt(ae)+(BigInt(pe)<<BigInt(32))}),m.prototype.readBigUInt64BE=Tt(function(C){C=C>>>0,it(C,"offset");const N=this[C],G=this[C+7];(N===void 0||G===void 0)&&Ke(C,this.length-8);const ae=N*2**24+this[++C]*2**16+this[++C]*2**8+this[++C],pe=this[++C]*2**24+this[++C]*2**16+this[++C]*2**8+G;return(BigInt(ae)<<BigInt(32))+BigInt(pe)}),m.prototype.readIntLE=function(C,N,G){C=C>>>0,N=N>>>0,G||W(C,N,this.length);let ae=this[C],pe=1,Ne=0;for(;++Ne<N&&(pe*=256);)ae+=this[C+Ne]*pe;return pe*=128,ae>=pe&&(ae-=Math.pow(2,8*N)),ae},m.prototype.readIntBE=function(C,N,G){C=C>>>0,N=N>>>0,G||W(C,N,this.length);let ae=N,pe=1,Ne=this[C+--ae];for(;ae>0&&(pe*=256);)Ne+=this[C+--ae]*pe;return pe*=128,Ne>=pe&&(Ne-=Math.pow(2,8*N)),Ne},m.prototype.readInt8=function(C,N){return C=C>>>0,N||W(C,1,this.length),this[C]&128?(255-this[C]+1)*-1:this[C]},m.prototype.readInt16LE=function(C,N){C=C>>>0,N||W(C,2,this.length);const G=this[C]|this[C+1]<<8;return G&32768?G|4294901760:G},m.prototype.readInt16BE=function(C,N){C=C>>>0,N||W(C,2,this.length);const G=this[C+1]|this[C]<<8;return G&32768?G|4294901760:G},m.prototype.readInt32LE=function(C,N){return C=C>>>0,N||W(C,4,this.length),this[C]|this[C+1]<<8|this[C+2]<<16|this[C+3]<<24},m.prototype.readInt32BE=function(C,N){return C=C>>>0,N||W(C,4,this.length),this[C]<<24|this[C+1]<<16|this[C+2]<<8|this[C+3]},m.prototype.readBigInt64LE=Tt(function(C){C=C>>>0,it(C,"offset");const N=this[C],G=this[C+7];(N===void 0||G===void 0)&&Ke(C,this.length-8);const ae=this[C+4]+this[C+5]*2**8+this[C+6]*2**16+(G<<24);return(BigInt(ae)<<BigInt(32))+BigInt(N+this[++C]*2**8+this[++C]*2**16+this[++C]*2**24)}),m.prototype.readBigInt64BE=Tt(function(C){C=C>>>0,it(C,"offset");const N=this[C],G=this[C+7];(N===void 0||G===void 0)&&Ke(C,this.length-8);const ae=(N<<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+G)}),m.prototype.readFloatLE=function(C,N){return C=C>>>0,N||W(C,4,this.length),n.read(this,C,!0,23,4)},m.prototype.readFloatBE=function(C,N){return C=C>>>0,N||W(C,4,this.length),n.read(this,C,!1,23,4)},m.prototype.readDoubleLE=function(C,N){return C=C>>>0,N||W(C,8,this.length),n.read(this,C,!0,52,8)},m.prototype.readDoubleBE=function(C,N){return C=C>>>0,N||W(C,8,this.length),n.read(this,C,!1,52,8)};function X(M,C,N,G,ae,pe){if(!m.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(C>ae||C<pe)throw new RangeError('"value" argument is out of bounds');if(N+G>M.length)throw new RangeError("Index out of range")}m.prototype.writeUintLE=m.prototype.writeUIntLE=function(C,N,G,ae){if(C=+C,N=N>>>0,G=G>>>0,!ae){const _e=Math.pow(2,8*G)-1;X(this,C,N,G,_e,0)}let pe=1,Ne=0;for(this[N]=C&255;++Ne<G&&(pe*=256);)this[N+Ne]=C/pe&255;return N+G},m.prototype.writeUintBE=m.prototype.writeUIntBE=function(C,N,G,ae){if(C=+C,N=N>>>0,G=G>>>0,!ae){const _e=Math.pow(2,8*G)-1;X(this,C,N,G,_e,0)}let pe=G-1,Ne=1;for(this[N+pe]=C&255;--pe>=0&&(Ne*=256);)this[N+pe]=C/Ne&255;return N+G},m.prototype.writeUint8=m.prototype.writeUInt8=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,1,255,0),this[N]=C&255,N+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,2,65535,0),this[N]=C&255,this[N+1]=C>>>8,N+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,2,65535,0),this[N]=C>>>8,this[N+1]=C&255,N+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,4,4294967295,0),this[N+3]=C>>>24,this[N+2]=C>>>16,this[N+1]=C>>>8,this[N]=C&255,N+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,4,4294967295,0),this[N]=C>>>24,this[N+1]=C>>>16,this[N+2]=C>>>8,this[N+3]=C&255,N+4};function ne(M,C,N,G,ae){gt(C,G,ae,M,N,7);let pe=Number(C&BigInt(4294967295));M[N++]=pe,pe=pe>>8,M[N++]=pe,pe=pe>>8,M[N++]=pe,pe=pe>>8,M[N++]=pe;let Ne=Number(C>>BigInt(32)&BigInt(4294967295));return M[N++]=Ne,Ne=Ne>>8,M[N++]=Ne,Ne=Ne>>8,M[N++]=Ne,Ne=Ne>>8,M[N++]=Ne,N}function we(M,C,N,G,ae){gt(C,G,ae,M,N,7);let pe=Number(C&BigInt(4294967295));M[N+7]=pe,pe=pe>>8,M[N+6]=pe,pe=pe>>8,M[N+5]=pe,pe=pe>>8,M[N+4]=pe;let Ne=Number(C>>BigInt(32)&BigInt(4294967295));return M[N+3]=Ne,Ne=Ne>>8,M[N+2]=Ne,Ne=Ne>>8,M[N+1]=Ne,Ne=Ne>>8,M[N]=Ne,N+8}m.prototype.writeBigUInt64LE=Tt(function(C,N=0){return ne(this,C,N,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=Tt(function(C,N=0){return we(this,C,N,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function(C,N,G,ae){if(C=+C,N=N>>>0,!ae){const ht=Math.pow(2,8*G-1);X(this,C,N,G,ht-1,-ht)}let pe=0,Ne=1,_e=0;for(this[N]=C&255;++pe<G&&(Ne*=256);)C<0&&_e===0&&this[N+pe-1]!==0&&(_e=1),this[N+pe]=(C/Ne>>0)-_e&255;return N+G},m.prototype.writeIntBE=function(C,N,G,ae){if(C=+C,N=N>>>0,!ae){const ht=Math.pow(2,8*G-1);X(this,C,N,G,ht-1,-ht)}let pe=G-1,Ne=1,_e=0;for(this[N+pe]=C&255;--pe>=0&&(Ne*=256);)C<0&&_e===0&&this[N+pe+1]!==0&&(_e=1),this[N+pe]=(C/Ne>>0)-_e&255;return N+G},m.prototype.writeInt8=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,1,127,-128),C<0&&(C=255+C+1),this[N]=C&255,N+1},m.prototype.writeInt16LE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,2,32767,-32768),this[N]=C&255,this[N+1]=C>>>8,N+2},m.prototype.writeInt16BE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,2,32767,-32768),this[N]=C>>>8,this[N+1]=C&255,N+2},m.prototype.writeInt32LE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,4,2147483647,-2147483648),this[N]=C&255,this[N+1]=C>>>8,this[N+2]=C>>>16,this[N+3]=C>>>24,N+4},m.prototype.writeInt32BE=function(C,N,G){return C=+C,N=N>>>0,G||X(this,C,N,4,2147483647,-2147483648),C<0&&(C=4294967295+C+1),this[N]=C>>>24,this[N+1]=C>>>16,this[N+2]=C>>>8,this[N+3]=C&255,N+4},m.prototype.writeBigInt64LE=Tt(function(C,N=0){return ne(this,C,N,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=Tt(function(C,N=0){return we(this,C,N,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ce(M,C,N,G,ae,pe){if(N+G>M.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("Index out of range")}function Ee(M,C,N,G,ae){return C=+C,N=N>>>0,ae||ce(M,C,N,4),n.write(M,C,N,G,23,4),N+4}m.prototype.writeFloatLE=function(C,N,G){return Ee(this,C,N,!0,G)},m.prototype.writeFloatBE=function(C,N,G){return Ee(this,C,N,!1,G)};function Te(M,C,N,G,ae){return C=+C,N=N>>>0,ae||ce(M,C,N,8),n.write(M,C,N,G,52,8),N+8}m.prototype.writeDoubleLE=function(C,N,G){return Te(this,C,N,!0,G)},m.prototype.writeDoubleBE=function(C,N,G){return Te(this,C,N,!1,G)},m.prototype.copy=function(C,N,G,ae){if(!m.isBuffer(C))throw new TypeError("argument should be a Buffer");if(G||(G=0),!ae&&ae!==0&&(ae=this.length),N>=C.length&&(N=C.length),N||(N=0),ae>0&&ae<G&&(ae=G),ae===G||C.length===0||this.length===0)return 0;if(N<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=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-N<ae-G&&(ae=C.length-N+G);const pe=ae-G;return this===C&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(N,G,ae):Uint8Array.prototype.set.call(C,this.subarray(G,ae),N),pe},m.prototype.fill=function(C,N,G,ae){if(typeof C=="string"){if(typeof N=="string"?(ae=N,N=0,G=this.length):typeof G=="string"&&(ae=G,G=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 Ne=C.charCodeAt(0);(ae==="utf8"&&Ne<128||ae==="latin1")&&(C=Ne)}}else typeof C=="number"?C=C&255:typeof C=="boolean"&&(C=Number(C));if(N<0||this.length<N||this.length<G)throw new RangeError("Out of range index");if(G<=N)return this;N=N>>>0,G=G===void 0?this.length:G>>>0,C||(C=0);let pe;if(typeof C=="number")for(pe=N;pe<G;++pe)this[pe]=C;else{const Ne=m.isBuffer(C)?C:m.from(C,ae),_e=Ne.length;if(_e===0)throw new TypeError('The value "'+C+'" is invalid for argument "value"');for(pe=0;pe<G-N;++pe)this[pe+N]=Ne[pe%_e]}return this};const Ce={};function Pe(M,C,N){Ce[M]=class extends N{constructor(){super(),Object.defineProperty(this,"message",{value:C.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${M}]`,this.stack,delete this.name}get code(){return M}set code(ae){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ae,writable:!0})}toString(){return`${this.name} [${M}]: ${this.message}`}}}Pe("ERR_BUFFER_OUT_OF_BOUNDS",function(M){return M?`${M} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Pe("ERR_INVALID_ARG_TYPE",function(M,C){return`The "${M}" argument must be of type number. Received type ${typeof C}`},TypeError),Pe("ERR_OUT_OF_RANGE",function(M,C,N){let G=`The value of "${M}" is out of range.`,ae=N;return Number.isInteger(N)&&Math.abs(N)>2**32?ae=Ve(String(N)):typeof N=="bigint"&&(ae=String(N),(N>BigInt(2)**BigInt(32)||N<-(BigInt(2)**BigInt(32)))&&(ae=Ve(ae)),ae+="n"),G+=` It must be ${C}. Received ${ae}`,G},RangeError);function Ve(M){let C="",N=M.length;const G=M[0]==="-"?1:0;for(;N>=G+4;N-=3)C=`_${M.slice(N-3,N)}${C}`;return`${M.slice(0,N)}${C}`}function bt(M,C,N){it(C,"offset"),(M[C]===void 0||M[C+N]===void 0)&&Ke(C,M.length-(N+1))}function gt(M,C,N,G,ae,pe){if(M>N||M<C){const Ne=typeof C=="bigint"?"n":"";let _e;throw C===0||C===BigInt(0)?_e=`>= 0${Ne} and < 2${Ne} ** ${(pe+1)*8}${Ne}`:_e=`>= -(2${Ne} ** ${(pe+1)*8-1}${Ne}) and < 2 ** ${(pe+1)*8-1}${Ne}`,new Ce.ERR_OUT_OF_RANGE("value",_e,M)}bt(G,ae,pe)}function it(M,C){if(typeof M!="number")throw new Ce.ERR_INVALID_ARG_TYPE(C,"number",M)}function Ke(M,C,N){throw Math.floor(M)!==M?(it(M,N),new Ce.ERR_OUT_OF_RANGE("offset","an integer",M)):C<0?new Ce.ERR_BUFFER_OUT_OF_BOUNDS:new Ce.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${C}`,M)}const Pt=/[^+/0-9A-Za-z-_]/g;function Se(M){if(M=M.split("=")[0],M=M.trim().replace(Pt,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function Fe(M,C){C=C||1/0;let N;const G=M.length;let ae=null;const pe=[];for(let Ne=0;Ne<G;++Ne){if(N=M.charCodeAt(Ne),N>55295&&N<57344){if(!ae){if(N>56319){(C-=3)>-1&&pe.push(239,191,189);continue}else if(Ne+1===G){(C-=3)>-1&&pe.push(239,191,189);continue}ae=N;continue}if(N<56320){(C-=3)>-1&&pe.push(239,191,189),ae=N;continue}N=(ae-55296<<10|N-56320)+65536}else ae&&(C-=3)>-1&&pe.push(239,191,189);if(ae=null,N<128){if((C-=1)<0)break;pe.push(N)}else if(N<2048){if((C-=2)<0)break;pe.push(N>>6|192,N&63|128)}else if(N<65536){if((C-=3)<0)break;pe.push(N>>12|224,N>>6&63|128,N&63|128)}else if(N<1114112){if((C-=4)<0)break;pe.push(N>>18|240,N>>12&63|128,N>>6&63|128,N&63|128)}else throw new Error("Invalid code point")}return pe}function fe(M){const C=[];for(let N=0;N<M.length;++N)C.push(M.charCodeAt(N)&255);return C}function Re(M,C){let N,G,ae;const pe=[];for(let Ne=0;Ne<M.length&&!((C-=2)<0);++Ne)N=M.charCodeAt(Ne),G=N>>8,ae=N%256,pe.push(ae),pe.push(G);return pe}function ze(M){return e.toByteArray(Se(M))}function je(M,C,N,G){let ae;for(ae=0;ae<G&&!(ae+N>=C.length||ae>=M.length);++ae)C[ae+N]=M[ae];return ae}function at(M,C){return M instanceof C||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===C.name}function wt(M){return M!==M}const Rt=function(){const M="0123456789abcdef",C=new Array(256);for(let N=0;N<16;++N){const G=N*16;for(let ae=0;ae<16;++ae)C[G+ae]=M[N]+M[ae]}return C}();function Tt(M){return typeof BigInt>"u"?qt:M}function qt(){throw new Error("BigInt not supported")}}(tf)),tf}var To=kB();class Zt{static async deriveKeyFromPassword(e,n,r="Argon2Id",s='{"Iterations":2,"MemorySize":19456,"DegreeOfParallelism":1}'){const l=JSON.parse(s);try{if(r!=="Argon2Id")throw new Error("Unsupported encryption type");return(await vT.hash({pass:e,salt:n,time:l.Iterations,mem:l.MemorySize,parallelism:l.DegreeOfParallelism,hashLen:32,type:2})).hash}catch(c){throw console.error("Argon2 hashing failed:",c),c}}static async symmetricEncrypt(e,n){if(!e)return e;const r=await crypto.subtle.importKey("raw",Uint8Array.from(atob(n),g=>g.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["encrypt"]),s=crypto.getRandomValues(new Uint8Array(12)),c=new TextEncoder().encode(e),m=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},r,c),h=new Uint8Array(s.length+m.byteLength);return h.set(s,0),h.set(new Uint8Array(m),s.length),btoa(Array.from(h).map(g=>String.fromCharCode(g)).join(""))}static async symmetricDecrypt(e,n){if(!e)return e;const r=await crypto.subtle.importKey("raw",Uint8Array.from(atob(n),g=>g.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=Uint8Array.from(atob(e),g=>g.charCodeAt(0)),l=s.slice(0,12),c=s.slice(12),m=await crypto.subtle.decrypt({name:"AES-GCM",iv:l},r,c);return new TextDecoder().decode(m)}static async symmetricDecryptBytes(e,n){if(!e||e.length===0)return e;const r=await crypto.subtle.importKey("raw",Uint8Array.from(atob(n),m=>m.charCodeAt(0)),{name:"AES-GCM",length:256},!1,["decrypt"]),s=e.slice(0,12),l=e.slice(12),c=await crypto.subtle.decrypt({name:"AES-GCM",iv:s},r,l);return new Uint8Array(c)}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"]),n=await crypto.subtle.exportKey("jwk",e.publicKey),r=await crypto.subtle.exportKey("jwk",e.privateKey);return{publicKey:JSON.stringify(n),privateKey:JSON.stringify(r)}}static async encryptWithPublicKey(e,n){const r=await crypto.subtle.importKey("jwk",JSON.parse(n),{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),s=new TextEncoder().encode(e),l=await crypto.subtle.encrypt({name:"RSA-OAEP"},r,s);return btoa(String.fromCharCode.apply(null,Array.from(new Uint8Array(l))))}static async decryptWithPrivateKey(e,n){try{const r=await crypto.subtle.importKey("jwk",JSON.parse(n),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),s=Uint8Array.from(atob(e),c=>c.charCodeAt(0)),l=await crypto.subtle.decrypt({name:"RSA-OAEP"},r,s);return new Uint8Array(l)}catch(r){throw console.error("RSA decryption failed:",r),new Error(`Failed to decrypt: ${r instanceof Error?r.message:"Unknown error"}`)}}static async decryptEmail(e,n){try{const r=n.find(m=>m.PublicKey===e.encryptionKey);if(!r)throw new Error("Encryption key not found");const s=await Zt.decryptWithPrivateKey(e.encryptedSymmetricKey,r.PrivateKey),l=To.Buffer.from(s).toString("base64"),c={...e};return c.subject=await Zt.symmetricDecrypt(e.subject,l),c.fromDisplay=await Zt.symmetricDecrypt(e.fromDisplay,l),c.fromDomain=await Zt.symmetricDecrypt(e.fromDomain,l),c.fromLocal=await Zt.symmetricDecrypt(e.fromLocal,l),e.messageHtml&&(c.messageHtml=await Zt.symmetricDecrypt(e.messageHtml,l)),e.messagePlain&&(c.messagePlain=await Zt.symmetricDecrypt(e.messagePlain,l)),c}catch(r){throw new Error(r instanceof Error?r.message:"Failed to decrypt email")}}static async decryptEmailList(e,n){return Promise.all(e.map(async r=>{try{const s=n.find(h=>h.PublicKey===r.encryptionKey);if(!s)throw new Error("Encryption key not found");const l=await Zt.decryptWithPrivateKey(r.encryptedSymmetricKey,s.PrivateKey),c=To.Buffer.from(l).toString("base64"),m={...r};return m.subject=await Zt.symmetricDecrypt(r.subject,c),m.fromDisplay=await Zt.symmetricDecrypt(r.fromDisplay,c),m.fromDomain=await Zt.symmetricDecrypt(r.fromDomain,c),m.fromLocal=await Zt.symmetricDecrypt(r.fromLocal,c),r.messagePreview&&(m.messagePreview=await Zt.symmetricDecrypt(r.messagePreview,c)),m}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt email")}}))}static async decryptAttachment(e,n,r){try{const s=r.find(m=>m.PublicKey===n.encryptionKey);if(!s)throw new Error("Encryption key not found");const l=await Zt.decryptWithPrivateKey(n.encryptedSymmetricKey,s.PrivateKey),c=To.Buffer.from(l).toString("base64");return await Zt.symmetricDecryptBytes(e,c)}catch(s){throw new Error(s instanceof Error?s.message:"Failed to decrypt attachment")}}}class xB{constructor(e){Ge(this,"webApi");Ge(this,"pollingInterval",null);Ge(this,"requestId",null);Ge(this,"privateKey",null);Ge(this,"publicKeyHash",null);this.webApi=e}async computePublicKeyHash(e){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest("SHA-256",r);return Array.from(new Uint8Array(s)).map(m=>m.toString(16).padStart(2,"0")).join("").substring(0,16)}async initiate(){try{const e=await Zt.generateRsaKeyPair();this.privateKey=e.privateKey,this.publicKeyHash=await this.computePublicKeyHash(e.publicKey);const n=await this.webApi.rawFetch("auth/mobile-login/initiate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientPublicKey:e.publicKey})});if(!n.ok)throw Xn.GENERIC;const r=await n.json();return this.requestId=r.requestId,{requestId:this.requestId,publicKeyHash:this.publicKeyHash}}catch(e){throw typeof e=="string"&&Object.values(Xn).includes(e)?e:Xn.GENERIC}}async startPolling(e,n){if(!this.requestId||!this.privateKey)throw new Error("Must call initiate() before starting polling");const r=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,n(Xn.TIMEOUT);return}throw new Error(`Polling failed: ${s.status}`)}const l=await s.json();if(l.fulfilled&&l.encryptedSymmetricKey){this.stopPolling();const c=await Zt.decryptWithPrivateKey(l.encryptedDecryptionKey,this.privateKey),m=To.Buffer.from(c).toString("base64"),h=await Zt.decryptWithPrivateKey(l.encryptedSymmetricKey,this.privateKey),g=To.Buffer.from(h).toString("base64"),A=await Zt.symmetricDecrypt(l.encryptedToken,g),p=await Zt.symmetricDecrypt(l.encryptedRefreshToken,g),v=await Zt.symmetricDecrypt(l.encryptedUsername,g);this.privateKey=null,this.requestId=null;const w=await this.webApi.rawFetch("auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:v})});if(!w.ok){n(Xn.GENERIC);return}const T=await w.json(),S={username:v,token:A,refreshToken:p,decryptionKey:m,salt:T.salt,encryptionType:T.encryptionType,encryptionSettings:T.encryptionSettings};e(S)}}catch{this.stopPolling(),this.privateKey=null,this.requestId=null,n(Xn.GENERIC)}};this.pollingInterval=setInterval(r,3e3),setTimeout(()=>{this.pollingInterval&&(this.stopPolling(),this.privateKey=null,this.requestId=null,n(Xn.TIMEOUT))},21e4)}stopPolling(){this.pollingInterval&&(clearInterval(this.pollingInterval),this.pollingInterval=null)}cleanup(){this.stopPolling(),this.privateKey=null,this.requestId=null,this.publicKeyHash=null}}const YT=({isOpen:t,onClose:e,onSuccess:n,webApi:r,mode:s="login"})=>{const{t:l}=tt(),[c,m]=b.useState(null),[h,g]=b.useState(null),[A,p]=b.useState(120),v=b.useRef(null),w=b.useRef(null),T=x=>{switch(x){case Xn.TIMEOUT:return l("common.errors.mobileLoginRequestExpired");case Xn.GENERIC:default:return l("common.errors.unknownError")}};b.useEffect(()=>{if(c&&A>0&&t)return w.current=setInterval(()=>{p(x=>x<=1?(w.current&&clearInterval(w.current),0):x-1)},1e3),()=>{w.current&&clearInterval(w.current)}},[c,A,t]),b.useEffect(()=>t?((async()=>{try{g(null),m(null),p(120),v.current||(v.current=new xB(r));const{requestId:F,publicKeyHash:B}=await v.current.initiate(),V=`aliasvault://open/mobile-unlock/${F}?pk=${B}`,O=await qT.toDataURL(V,{width:256,margin:2});m(O),await v.current.startPolling(async _=>{try{await n(_),S()}catch{m(null),g(Xn.GENERIC)}},_=>{m(null),g(_)})}catch(F){typeof F=="string"&&Object.values(Xn).includes(F)?g(F):g(Xn.GENERIC)}})(),()=>{v.current&&v.current.cleanup(),w.current&&clearInterval(w.current)}):void 0,[t]);const S=()=>{v.current&&v.current.cleanup(),w.current&&clearInterval(w.current),m(null),g(null),p(120),e()},k=x=>{const F=Math.floor(x/60),B=x%60;return`${F}:${B.toString().padStart(2,"0")}`},L=l(s==="unlock"?"auth.unlockWithMobile":"auth.loginWithMobile"),U=l("auth.scanQrCode");return d.jsxs(Zn,{isOpen:t,onClose:S,title:L,showHeaderBorder:!1,bodyClassName:"px-6 pb-6",children:[d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:U}),h&&d.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:T(h)}),c&&d.jsxs("div",{className:"flex flex-col items-center mb-4",children:[d.jsx("img",{src:c,alt:"QR Code",className:"border-4 border-gray-200 dark:border-gray-600 rounded mb-3"}),d.jsx("div",{className:"text-gray-700 dark:text-gray-300 text-sm font-medium",children:k(A)})]}),!c&&!h&&d.jsx("div",{className:"flex justify-center py-8",children:d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}),d.jsx("button",{type:"button",onClick:S,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:l("common.cancel")})]})};var qa=(t=>(t.EXPAND="expand",t.EDIT="edit",t.DELETE="delete",t.SETTINGS="settings",t.RELOAD="reload",t.EXTERNAL_LINK="external_link",t.SAVE="save",t.PLUS="plus",t.TAB="tab",t.EYE="eye",t.EYE_OFF="eye_off",t))(qa||{});const Cp=({type:t,className:e="w-5 h-5"})=>({expand:d.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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:d.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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:d.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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:d.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[d.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"}),d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),reload:d.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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:d.jsxs("svg",{className:e,fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:[d.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"}),d.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:d.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),plus:d.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),tab:d.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[d.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"}),d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z"})]}),eye:d.jsxs("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),d.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:d.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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"})})})[t]||null,_n=({onClick:t,title:e,iconType:n,variant:r="default",id:s,disabled:l=!1,isLoading:c=!1})=>{const m={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"},h=l||c;return d.jsx("button",{id:s,onClick:t,disabled:h,className:`p-2 rounded-lg ${m[r]} ${h?"opacity-50 cursor-not-allowed":""}`,title:e,children:c?d.jsxs("svg",{className:"animate-spin h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[d.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),d.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):d.jsx(Cp,{type:n})})},JT=()=>{const[t,e]=b.useState(hn.DEFAULT_API_URL);return{apiUrl:t,setApiUrl:e,loadApiUrl:async()=>{const s=await xe.getItem("local:apiUrl");s&&s.length>0?e(s):e(hn.DEFAULT_API_URL)},getDisplayUrl:()=>{const s=t.replace("https://","").replace("http://","").replace(":443","").replace("/api","");return s==="app.aliasvault.net"?"aliasvault.net":s}}},LB=()=>{const{loadApiUrl:t,getDisplayUrl:e}=JT(),n=Va(),{t:r}=tt();b.useEffect(()=>{t()},[t]);const s=()=>{n("/auth-settings")};return d.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:["(",r("auth.connectingTo")," ",d.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 $e;function _t(t){od===fr.length&&fr.push(fr.length+1);const e=od;return od=fr[e],fr[e]=t,e}function Hf(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const s=t.description;return s==null?"Symbol":`Symbol(${s})`}if(e=="function"){const s=t.name;return typeof s=="string"&&s.length>0?`Function(${s})`:"Function"}if(Array.isArray(t)){const s=t.length;let l="[";s>0&&(l+=Hf(t[0]));for(let c=1;c<s;c++)l+=", "+Hf(t[c]);return l+="]",l}const n=/\[object ([^\]]+)\]/.exec(toString.call(t));let r;if(n&&n.length>1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message}
${t.stack}`:r}function DB(t){t<132||(fr[t]=od,od=t)}function Cb(t,e){return t=t>>>0,sd().subarray(t/1,t/1+e)}let ks=null;function Gt(){return(ks===null||ks.buffer.detached===!0||ks.buffer.detached===void 0&&ks.buffer!==$e.memory.buffer)&&(ks=new DataView($e.memory.buffer)),ks}function hr(t,e){return t=t>>>0,UB(t,e)}let td=null;function sd(){return(td===null||td.byteLength===0)&&(td=new Uint8Array($e.memory.buffer)),td}function et(t){return fr[t]}function Ts(t,e){try{return t.apply(this,e)}catch(n){$e.__wbindgen_export3(_t(n))}}let fr=new Array(128).fill(void 0);fr.push(void 0,null,!0,!1);let od=fr.length;function Ui(t){return t==null}function Mn(t,e,n){if(n===void 0){const m=ld.encode(t),h=e(m.length,1)>>>0;return sd().subarray(h,h+m.length).set(m),bn=m.length,h}let r=t.length,s=e(r,1)>>>0;const l=sd();let c=0;for(;c<r;c++){const m=t.charCodeAt(c);if(m>127)break;l[s+c]=m}if(c!==r){c!==0&&(t=t.slice(c)),s=n(s,r,r=c+t.length*3,1)>>>0;const m=sd().subarray(s+c,s+r),h=ld.encodeInto(t,m);c+=h.written,s=n(s,r,c,1)>>>0}return bn=c,s}function $n(t){const e=et(t);return DB(t),e}let fu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});fu.decode();const RB=2146435072;let af=0;function UB(t,e){return af+=e,af>=RB&&(fu=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),fu.decode(),af=e),fu.decode(sd().subarray(t,t+e))}const ld=new TextEncoder;"encodeInto"in ld||(ld.encodeInto=function(t,e){const n=ld.encode(t);return e.set(n),{read:t.length,written:n.length}});let bn=0;function MB(t){let e,n;try{const l=$e.__wbindgen_add_to_stack_pointer(-16),c=Mn(t,$e.__wbindgen_export,$e.__wbindgen_export2),m=bn;$e.extractDomain(l,c,m);var r=Gt().getInt32(l+4*0,!0),s=Gt().getInt32(l+4*1,!0);return e=r,n=s,hr(r,s)}finally{$e.__wbindgen_add_to_stack_pointer(16),$e.__wbindgen_export4(e,n,1)}}function BB(t){try{const s=$e.__wbindgen_add_to_stack_pointer(-16);$e.filterCredentials(s,_t(t));var e=Gt().getInt32(s+4*0,!0),n=Gt().getInt32(s+4*1,!0),r=Gt().getInt32(s+4*2,!0);if(r)throw $n(n);return $n(e)}finally{$e.__wbindgen_add_to_stack_pointer(16)}}function _B(t,e,n){let r,s;try{const p=$e.__wbindgen_add_to_stack_pointer(-16),v=Mn(t,$e.__wbindgen_export,$e.__wbindgen_export2),w=bn,T=Mn(e,$e.__wbindgen_export,$e.__wbindgen_export2),S=bn,k=Mn(n,$e.__wbindgen_export,$e.__wbindgen_export2),L=bn;$e.srpDerivePrivateKey(p,v,w,T,S,k,L);var l=Gt().getInt32(p+4*0,!0),c=Gt().getInt32(p+4*1,!0),m=Gt().getInt32(p+4*2,!0),h=Gt().getInt32(p+4*3,!0),g=l,A=c;if(h)throw g=0,A=0,$n(m);return r=g,s=A,hr(g,A)}finally{$e.__wbindgen_add_to_stack_pointer(16),$e.__wbindgen_export4(r,s,1)}}function FB(t,e,n,r,s){try{const h=$e.__wbindgen_add_to_stack_pointer(-16),g=Mn(t,$e.__wbindgen_export,$e.__wbindgen_export2),A=bn,p=Mn(e,$e.__wbindgen_export,$e.__wbindgen_export2),v=bn,w=Mn(n,$e.__wbindgen_export,$e.__wbindgen_export2),T=bn,S=Mn(r,$e.__wbindgen_export,$e.__wbindgen_export2),k=bn,L=Mn(s,$e.__wbindgen_export,$e.__wbindgen_export2),U=bn;$e.srpDeriveSession(h,g,A,p,v,w,T,S,k,L,U);var l=Gt().getInt32(h+4*0,!0),c=Gt().getInt32(h+4*1,!0),m=Gt().getInt32(h+4*2,!0);if(m)throw $n(c);return $n(l)}finally{$e.__wbindgen_add_to_stack_pointer(16)}}function OB(t){let e,n;try{const g=$e.__wbindgen_add_to_stack_pointer(-16),A=Mn(t,$e.__wbindgen_export,$e.__wbindgen_export2),p=bn;$e.srpDeriveVerifier(g,A,p);var r=Gt().getInt32(g+4*0,!0),s=Gt().getInt32(g+4*1,!0),l=Gt().getInt32(g+4*2,!0),c=Gt().getInt32(g+4*3,!0),m=r,h=s;if(c)throw m=0,h=0,$n(l);return e=m,n=h,hr(m,h)}finally{$e.__wbindgen_add_to_stack_pointer(16),$e.__wbindgen_export4(e,n,1)}}function PB(){try{const r=$e.__wbindgen_add_to_stack_pointer(-16);$e.srpGenerateEphemeral(r);var t=Gt().getInt32(r+4*0,!0),e=Gt().getInt32(r+4*1,!0),n=Gt().getInt32(r+4*2,!0);if(n)throw $n(e);return $n(t)}finally{$e.__wbindgen_add_to_stack_pointer(16)}}function jB(){let t,e;try{const s=$e.__wbindgen_add_to_stack_pointer(-16);$e.srpGenerateSalt(s);var n=Gt().getInt32(s+4*0,!0),r=Gt().getInt32(s+4*1,!0);return t=n,e=r,hr(n,r)}finally{$e.__wbindgen_add_to_stack_pointer(16),$e.__wbindgen_export4(t,e,1)}}const HB=new Set(["basic","cors","default"]);async function VB(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){if(t.ok&&HB.has(t.type)&&t.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",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function zB(){const t={};return t.wbg={},t.wbg.__wbg_Error_52673b7de5a0ca89=function(e,n){const r=Error(hr(e,n));return _t(r)},t.wbg.__wbg_Number_2d1dcfcf4ec51736=function(e){return Number(et(e))},t.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){const r=String(et(n)),s=Mn(r,$e.__wbindgen_export,$e.__wbindgen_export2),l=bn;Gt().setInt32(e+4*1,l,!0),Gt().setInt32(e+4*0,s,!0)},t.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d=function(e,n){const r=et(n),s=typeof r=="bigint"?r:void 0;Gt().setBigInt64(e+8*1,Ui(s)?BigInt(0):s,!0),Gt().setInt32(e+4*0,!Ui(s),!0)},t.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b=function(e){const n=et(e),r=typeof n=="boolean"?n:void 0;return Ui(r)?16777215:r?1:0},t.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(e,n){const r=Hf(et(n)),s=Mn(r,$e.__wbindgen_export,$e.__wbindgen_export2),l=bn;Gt().setInt32(e+4*1,l,!0),Gt().setInt32(e+4*0,s,!0)},t.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317=function(e,n){return et(e)in et(n)},t.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27=function(e){return typeof et(e)=="bigint"},t.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd=function(e){return typeof et(e)=="function"},t.wbg.__wbg___wbindgen_is_object_ce774f3490692386=function(e){const n=et(e);return typeof n=="object"&&n!==null},t.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030=function(e){return typeof et(e)=="string"},t.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269=function(e){return et(e)===void 0},t.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36=function(e,n){return et(e)===et(n)},t.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d=function(e,n){return et(e)==et(n)},t.wbg.__wbg___wbindgen_number_get_9619185a74197f95=function(e,n){const r=et(n),s=typeof r=="number"?r:void 0;Gt().setFloat64(e+8*1,Ui(s)?0:s,!0),Gt().setInt32(e+4*0,!Ui(s),!0)},t.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42=function(e,n){const r=et(n),s=typeof r=="string"?r:void 0;var l=Ui(s)?0:Mn(s,$e.__wbindgen_export,$e.__wbindgen_export2),c=bn;Gt().setInt32(e+4*1,c,!0),Gt().setInt32(e+4*0,l,!0)},t.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(e,n){throw new Error(hr(e,n))},t.wbg.__wbg_call_3020136f7a2d6e44=function(){return Ts(function(e,n,r){const s=et(e).call(et(n),et(r));return _t(s)},arguments)},t.wbg.__wbg_call_abb4ff46ce38be40=function(){return Ts(function(e,n){const r=et(e).call(et(n));return _t(r)},arguments)},t.wbg.__wbg_crypto_86f2631e91b51511=function(e){const n=et(e).crypto;return _t(n)},t.wbg.__wbg_done_62ea16af4ce34b24=function(e){return et(e).done},t.wbg.__wbg_entries_83c79938054e065f=function(e){const n=Object.entries(et(e));return _t(n)},t.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,n){let r,s;try{r=e,s=n,console.error(hr(e,n))}finally{$e.__wbindgen_export4(r,s,1)}},t.wbg.__wbg_getRandomValues_b3f15fcbfabb0f8b=function(){return Ts(function(e,n){et(e).getRandomValues(et(n))},arguments)},t.wbg.__wbg_get_6b7bd52aca3f9671=function(e,n){const r=et(e)[n>>>0];return _t(r)},t.wbg.__wbg_get_af9dab7e9603ea93=function(){return Ts(function(e,n){const r=Reflect.get(et(e),et(n));return _t(r)},arguments)},t.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe=function(e,n){const r=et(e)[et(n)];return _t(r)},t.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355=function(e){let n;try{n=et(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_instanceof_Map_084be8da74364158=function(e){let n;try{n=et(e)instanceof Map}catch{n=!1}return n},t.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434=function(e){let n;try{n=et(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbg_isArray_51fd9e6422c0a395=function(e){return Array.isArray(et(e))},t.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16=function(e){return Number.isSafeInteger(et(e))},t.wbg.__wbg_iterator_27b7c8b35ab3e86b=function(){return _t(Symbol.iterator)},t.wbg.__wbg_length_22ac23eaec9d8053=function(e){return et(e).length},t.wbg.__wbg_length_d45040a40c570362=function(e){return et(e).length},t.wbg.__wbg_msCrypto_d562bbe83e0d4b91=function(e){const n=et(e).msCrypto;return _t(n)},t.wbg.__wbg_new_1ba21ce319a06297=function(){const e=new Object;return _t(e)},t.wbg.__wbg_new_25f239778d6112b9=function(){const e=new Array;return _t(e)},t.wbg.__wbg_new_6421f6084cc5bc5a=function(e){const n=new Uint8Array(et(e));return _t(n)},t.wbg.__wbg_new_8a6f238a6ece86ea=function(){const e=new Error;return _t(e)},t.wbg.__wbg_new_b546ae120718850e=function(){return _t(new Map)},t.wbg.__wbg_new_no_args_cb138f77cf6151ee=function(e,n){const r=new Function(hr(e,n));return _t(r)},t.wbg.__wbg_new_with_length_aa5eaf41d35235e5=function(e){const n=new Uint8Array(e>>>0);return _t(n)},t.wbg.__wbg_next_138a17bbf04e926c=function(e){const n=et(e).next;return _t(n)},t.wbg.__wbg_next_3cfe5c0fe2a4cc53=function(){return Ts(function(e){const n=et(e).next();return _t(n)},arguments)},t.wbg.__wbg_node_e1f24f89a7336c2e=function(e){const n=et(e).node;return _t(n)},t.wbg.__wbg_process_3975fd6c72f520aa=function(e){const n=et(e).process;return _t(n)},t.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd=function(e,n,r){Uint8Array.prototype.set.call(Cb(e,n),et(r))},t.wbg.__wbg_randomFillSync_f8c153b79f285817=function(){return Ts(function(e,n){et(e).randomFillSync($n(n))},arguments)},t.wbg.__wbg_require_b74f47fc2d022fd6=function(){return Ts(function(){const e=aL.require;return _t(e)},arguments)},t.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,r){et(e)[$n(n)]=$n(r)},t.wbg.__wbg_set_7df433eea03a5c14=function(e,n,r){et(e)[n>>>0]=$n(r)},t.wbg.__wbg_set_efaaf145b9377369=function(e,n,r){const s=et(e).set(et(n),et(r));return _t(s)},t.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,n){const r=et(n).stack,s=Mn(r,$e.__wbindgen_export,$e.__wbindgen_export2),l=bn;Gt().setInt32(e+4*1,l,!0),Gt().setInt32(e+4*0,s,!0)},t.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335=function(){const e=typeof global>"u"?null:global;return Ui(e)?0:_t(e)},t.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1=function(){const e=typeof globalThis>"u"?null:globalThis;return Ui(e)?0:_t(e)},t.wbg.__wbg_static_accessor_SELF_08f5a74c69739274=function(){const e=typeof self>"u"?null:self;return Ui(e)?0:_t(e)},t.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024=function(){const e=typeof window>"u"?null:window;return Ui(e)?0:_t(e)},t.wbg.__wbg_subarray_845f2f5bce7d061a=function(e,n,r){const s=et(e).subarray(n>>>0,r>>>0);return _t(s)},t.wbg.__wbg_value_57b7b035e117f7ee=function(e){const n=et(e).value;return _t(n)},t.wbg.__wbg_versions_4e31226f5e8dc909=function(e){const n=et(e).versions;return _t(n)},t.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,n){const r=hr(e,n);return _t(r)},t.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(e){const n=BigInt.asUintN(64,e);return _t(n)},t.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return _t(e)},t.wbg.__wbindgen_cast_cb9088102bce6b30=function(e,n){const r=Cb(e,n);return _t(r)},t.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return _t(e)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=et(e);return _t(n)},t.wbg.__wbindgen_object_drop_ref=function(e){$n(e)},t}function QB(t,e){return $e=t.exports,Sp.__wbindgen_wasm_module=e,ks=null,td=null,$e.__wbindgen_start(),$e}async function Sp(t){if($e!==void 0)return $e;typeof t<"u"&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof t>"u"&&(t=new URL("aliasvault_core_bg.wasm",self.location.href));const e=zB();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await VB(await t,e);return QB(n,r)}const $c={type:"Argon2Id",settings:JSON.stringify({DegreeOfParallelism:1,MemorySize:19456,Iterations:2})},ja=class ja{static async initWasm(){if(!this.wasmInitialized)return this.wasmInitPromise?this.wasmInitPromise:(this.wasmInitPromise=(async()=>{try{const e=yr.runtime.getURL("src/aliasvault_core_bg.wasm"),r=await(await fetch(e)).arrayBuffer();await Sp({module_or_path:r}),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(),jB()}static bytesToHexString(e){return Array.from(e).map(n=>n.toString(16).padStart(2,"0")).join("").toUpperCase()}static bytesToBase64(e){return btoa(String.fromCharCode(...e))}static async derivePrivateKey(e,n,r){return await this.initWasm(),_B(e,ja.normalizeUsername(n),r)}static async deriveVerifier(e){return await this.initWasm(),OB(e)}static async generateEphemeral(){return await this.initWasm(),PB()}static async deriveSession(e,n,r,s,l){return await this.initWasm(),FB(e,n,r,ja.normalizeUsername(s),l)}static async prepareCredentials(e,n,r,s){const l=await Zt.deriveKeyFromPassword(e,n,r,s);return{passwordHashString:ja.bytesToHexString(l),passwordHashBase64:ja.bytesToBase64(l)}}static generateSrpIdentity(){return crypto.randomUUID()}static async prepareRegistration(e,n){const r=ja.normalizeUsername(e),s=await ja.generateSalt(),l=ja.generateSrpIdentity(),c=await ja.prepareCredentials(n,s,$c.type,$c.settings),m=await ja.derivePrivateKey(s,l,c.passwordHashString),h=await ja.deriveVerifier(m);return{username:r,salt:s,verifier:h,encryptionType:$c.type,encryptionSettings:$c.settings,srpIdentity:l}}static async registerUser(e,n,r){try{const s=await ja.prepareRegistration(n,r),l=e.replace(/\/$/,"")+"/v1/",c=await fetch(`${l}Auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!c.ok){const h=await c.text();let g=`Registration failed with status ${c.status}`;try{g=JSON.parse(h).title||g}catch{g=h||g}return{success:!1,error:g}}return{success:!0,token:await c.json()}}catch(s){return{success:!1,error:s instanceof Error?s.message:"Unknown error occurred"}}}static async login(e,n,r,s=!1){try{const l=e.replace(/\/$/,"")+"/v1/",c=ja.normalizeUsername(n),m=await fetch(`${l}Auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:c})});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 h=await m.json(),g=h.srpIdentity??c,A=await ja.prepareCredentials(r,h.salt,h.encryptionType,h.encryptionSettings),p=await ja.generateEphemeral(),v=await ja.derivePrivateKey(h.salt,g,A.passwordHashString),w=await ja.deriveSession(p.secret,h.serverEphemeral,h.salt,g,v),T=await fetch(`${l}Auth/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:c,rememberMe:s,clientPublicEphemeral:p.public,clientSessionProof:w.proof})});if(!T.ok){const k=await T.text();try{return{success:!1,error:JSON.parse(k).title}}catch{return{success:!1,error:k||"Login validation failed"}}}const S=await T.json();return S.requiresTwoFactor?{success:!1,requiresTwoFactor:!0,loginResponse:h,passwordHashBase64:A.passwordHashBase64}:{success:!0,token:S.token,passwordHashBase64:A.passwordHashBase64,loginResponse:h}}catch(l){return{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}}};Ge(ja,"wasmInitialized",!1),Ge(ja,"wasmInitPromise",null);let yn=ja;class XT{constructor(e){Ge(this,"webApiService");this.webApiService=e}async initiateLogin(e){const n=yn.normalizeUsername(e),r=await this.webApiService.rawFetch("Auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:n})});if(r.status===400){const l=await r.json();throw new is(l.title)}return await r.json()}async validateLogin(e,n,r,s){const l=yn.normalizeUsername(e),c=s.srpIdentity??l,m=await yn.generateEphemeral(),h=await yn.derivePrivateKey(s.salt,c,n),g=await yn.deriveSession(m.secret,s.serverEphemeral,s.salt,c,h),A={username:l,rememberMe:r,clientPublicEphemeral:m.public,clientSessionProof:g.proof},p=await this.webApiService.rawFetch("Auth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(p.status===400){const w=await p.json();throw new is(w.title)}return await p.json()}async validateLogin2Fa(e,n,r,s,l){const c=yn.normalizeUsername(e),m=s.srpIdentity??c,h=await yn.generateEphemeral(),g=await yn.derivePrivateKey(s.salt,m,n),A=await yn.deriveSession(h.secret,s.serverEphemeral,s.salt,m,g),p={username:c,rememberMe:r,clientPublicEphemeral:h.public,clientSessionProof:A.proof,code2Fa:l},v=await this.webApiService.rawFetch("Auth/validate-2fa",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(v.status===400){const T=await v.json();throw new is(T.title)}return await v.json()}}var Tu=(t=>(t.UNKNOWN_ERROR="E-001",t.AUTH_STATUS_CHECK_FAILED="E-101",t.AUTH_STATUS_MIGRATION_CHECK_FAILED="E-102",t.AUTH_VERSION_CHECK_FAILED="E-103",t.VAULT_NOT_FOUND="E-201",t.VAULT_LOCKED="E-202",t.VAULT_DECRYPT_FAILED="E-203",t.VAULT_METADATA_READ_FAILED="E-204",t.ITEM_CREATE_FAILED="E-301",t.ITEM_UPDATE_FAILED="E-302",t.ITEM_DELETE_FAILED="E-303",t.ITEM_READ_FAILED="E-304",t.PASSKEY_CREATE_FAILED="E-401",t.PASSKEY_GET_FAILED="E-402",t.SYNC_STATUS_CHECK_FAILED="E-501",t.SYNC_VAULT_FETCH_FAILED="E-502",t.SYNC_VAULT_DECRYPT_FAILED="E-503",t.SYNC_STORE_FAILED="E-504",t.STORAGE_READ_FAILED="E-601",t.STORAGE_WRITE_FAILED="E-602",t.DATABASE_INIT_FAILED="E-603",t.ENCRYPTION_KEY_NOT_FOUND="E-604",t.MERGE_FAILED="E-701",t.MERGE_CONFLICT="E-702",t.MERGE_UPLOAD_FAILED="E-703",t.UPLOAD_FAILED="E-801",t.UPLOAD_OUTDATED="E-802",t.UPLOAD_ENCRYPT_FAILED="E-803",t.MIGRATION_CHECK_FAILED="E-901",t.VERSION_INCOMPATIBLE="E-902",t))(Tu||{});const KB=new Set(Object.values(Tu));function GB(t){return KB.has(t)}function ku(t){const e=t.match(/E-\d{3}/);return e&&GB(e[0])?e[0]:null}function ko(t){return t instanceof Error?ku(t.message)!==null:typeof t=="string"?ku(t)!==null:!1}function ns(t,e){return t instanceof Error?t.message:typeof t=="string"?t:e}let nf=!1,Sb=!1;const WB=()=>{const{t}=tt(),e=Va(),n=wi(),r=ta(),{setHeaderButtons:s}=Ii(),[l,c]=b.useState({username:"",password:""}),{showLoading:m,hideLoading:h,setIsInitialLoading:g}=va(),[A,p]=b.useState(!0),[v,w]=b.useState(!1),[T,S]=b.useState(null),[k,L]=b.useState(null),[U,x]=b.useState(null),[F,B]=b.useState(!1),[V,O]=b.useState(""),[_,z]=b.useState(null),[Q,K]=b.useState(null),[te,ee]=b.useState(!1),Y=Vi(),le=new XT(Y),J=async(X,ne,we)=>{const ce=await xe.getItem("local:encryptedVault"),Ee=await xe.getItem("local:serverRevision"),Te=await xe.getItem("local:username");let Ce=X.vault.blob;if(ce&&Ee!==null){const Ve=we.toLowerCase().trim(),bt=Te==null?void 0:Te.toLowerCase().trim();if(Te&&bt!==Ve)console.info(`Existing vault belongs to different user (${Te}), using server vault for ${we}`);else try{const gt=await Zt.symmetricDecrypt(ce,ne);if(Ee>=X.vault.currentRevisionNumber){console.info(`Existing vault is more advanced (rev ${Ee} >= ${X.vault.currentRevisionNumber}), preserving local vault and will upload to server`),Ce=ce,await St("STORE_VAULT_METADATA",{publicEmailDomainList:X.vault.publicEmailDomainList,privateEmailDomainList:X.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:X.vault.hiddenPrivateEmailDomainList},"background"),await r.loadDatabase(gt);return}console.info(`Server vault is more advanced (rev ${X.vault.currentRevisionNumber} > ${Ee}), using server vault`)}catch{console.info("Existing vault could not be decrypted (password changed), using server vault")}}await St("STORE_ENCRYPTED_VAULT",{vaultBlob:X.vault.blob,serverRevision:X.vault.currentRevisionNumber},"background"),await St("STORE_VAULT_METADATA",{publicEmailDomainList:X.vault.publicEmailDomainList,privateEmailDomainList:X.vault.privateEmailDomainList,hiddenPrivateEmailDomainList:X.vault.hiddenPrivateEmailDomainList},"background");const Pe=await Zt.symmetricDecrypt(Ce,ne);await r.loadDatabase(Pe)},ie=async(X,ne,we,ce,Ee)=>{const Te=await Y.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${ne}`}});await n.setAuthTokens(X,ne,we),await r.storeEncryptionKey(ce),await r.storeEncryptionKeyDerivationParams({salt:Ee.salt,encryptionType:Ee.encryptionType,encryptionSettings:Ee.encryptionSettings}),await J(Te,ce,X),nf=!1,e("/reinitialize",{replace:!0}),h()};b.useEffect(()=>{(async()=>{const ne=await xe.getItem("local:clientUrl");let we=hn.DEFAULT_CLIENT_URL;if(ne&&ne.length>0&&(we=ne),z(we),!Sb){Sb=!0;const ce=await St("GET_TWO_FACTOR_STATE",null,"background");if(ce){c({username:ce.username,password:""}),S(ce.loginResponse),L(ce.passwordHashString),x(ce.passwordHashBase64),p(ce.rememberMe),B(!0),g(!1);return}}if(!nf){nf=!0;const ce=await xe.getItem("local:username");ce&&c(Ee=>({...Ee,username:ce}))}g(!1)})()},[g]),b.useEffect(()=>{const X=Ba.isPopup()?null:d.jsx(d.Fragment,{children:d.jsx(_n,{onClick:()=>Ba.openInNewPopup(),title:"Open in new window",iconType:qa.EXPAND})});return s(X),()=>{s(null)}},[s]);const be=async X=>{X.preventDefault(),K(null);try{m(),n.clearGlobalMessage();const ne=yn.normalizeUsername(l.username),we=await le.initiateLogin(ne),{passwordHashString:ce,passwordHashBase64:Ee}=await yn.prepareCredentials(l.password,we.salt,we.encryptionType,we.encryptionSettings),Te=await le.validateLogin(ne,ce,A,we);if(Te.requiresTwoFactor){S(we),L(ce),x(Ee),B(!0),await St("STORE_TWO_FACTOR_STATE",{username:ne,loginResponse:we,passwordHashString:ce,passwordHashBase64:Ee,rememberMe:A},"background"),h();return}if(!Te.token)throw new Error(t("common.errors.unknownError"));await ie(ne,Te.token.token,Te.token.refreshToken,Ee,we)}catch(ne){ne instanceof is?K(t("common.apiErrors."+ne.message)):ko(ne)?K(ns(ne,t("common.errors.serverError"))):K(t("common.errors.serverError")),h()}},se=async X=>{X.preventDefault(),K(null);try{if(m(),!k||!U||!T)throw new Error(t("common.errors.unknownError"));const ne=V.trim();if(!/^\d{6}$/.test(ne))throw new Error(t("common.errors.invalidCode"));const we=yn.normalizeUsername(l.username),ce=await le.validateLogin2Fa(we,k,A,T,parseInt(V));if(!ce.token)throw new Error(t("common.errors.unknownError"));await St("CLEAR_TWO_FACTOR_STATE",null,"background"),await ie(we,ce.token.token,ce.token.refreshToken,U,T),B(!1),O(""),L(null),x(null),S(null)}catch(ne){console.error("2FA error:",ne),ne instanceof is?K(t("common.apiErrors."+ne.message)):ko(ne)?K(ns(ne,t("common.errors.serverError"))):K(t("common.errors.serverError")),h()}},j=async X=>{m();try{n.clearGlobalMessage();const ne=await Y.authFetch("Vault",{method:"GET",headers:{Authorization:`Bearer ${X.token}`}});await n.setAuthTokens(X.username,X.token,X.refreshToken),await r.storeEncryptionKey(X.decryptionKey),await r.storeEncryptionKeyDerivationParams({salt:X.salt,encryptionType:X.encryptionType,encryptionSettings:X.encryptionSettings}),await J(ne,X.decryptionKey,X.username),h(),g(!1),e("/reinitialize",{replace:!0})}catch(ne){throw K(ne instanceof Error?ne.message:t("common.errors.unknownError")),h(),ne}},W=X=>{const{name:ne,value:we}=X.target;c(ce=>({...ce,[ne]:we}))};return F?d.jsx("div",{children:d.jsxs("form",{onSubmit:se,className:"bg-white dark:bg-gray-700 w-full shadow-md rounded px-8 pt-6 pb-8 mb-4",children:[Q&&d.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Q}),d.jsxs("div",{className:"mb-6",children:[d.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:t("auth.twoFactorTitle")}),d.jsx("label",{className:"block text-gray-700 dark:text-gray-200 text-sm font-bold mb-2",htmlFor:"twoFactorCode",children:t("auth.authCode")}),d.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:V,onChange:X=>O(X.target.value),placeholder:t("auth.authCodePlaceholder"),required:!0})]}),d.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[d.jsx(Ca,{type:"submit",children:t("auth.verify")}),d.jsx(Ca,{type:"button",onClick:async()=>{await St("CLEAR_TWO_FACTOR_STATE",null,"background"),c({username:"",password:""}),B(!1),O(""),L(null),x(null),S(null),K(null)},variant:"secondary",children:t("common.cancel")})]}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-4 text-center",children:t("auth.twoFactorNote")})]})}):d.jsx("div",{className:"flex flex-col items-center justify-center p-4",children:d.jsxs("div",{className:"w-full max-w-md",children:[d.jsxs("form",{onSubmit:be,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[d.jsxs("div",{className:"text-center mb-6",children:[d.jsx("h2",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t("auth.loginTitle")}),d.jsx(LB,{})]}),Q&&d.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:Q}),d.jsxs("div",{className:"mb-4",children:[d.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"username",children:t("auth.username")}),d.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:t("auth.usernamePlaceholder"),value:l.username,onChange:W,required:!0})]}),d.jsxs("div",{className:"mb-4",children:[d.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:t("common.password")}),d.jsxs("div",{className:"relative",children:[d.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:v?"text":"password",name:"password",placeholder:t("auth.passwordPlaceholder"),value:l.password,onChange:W,required:!0}),d.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:()=>w(!v),tabIndex:-1,children:d.jsx(Cp,{type:v?qa.EYE_OFF:qa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),d.jsx("div",{className:"mb-6",children:d.jsxs("label",{className:"flex items-center",children:[d.jsx("input",{type:"checkbox",checked:A,onChange:X=>p(X.target.checked),className:"mr-2"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-200",children:t("auth.rememberMe")})]})}),d.jsx(Ca,{type:"submit",children:d.jsx("div",{className:"flex items-center justify-center gap-2",children:t("auth.loginButton")})}),d.jsxs("button",{type:"button",onClick:()=>ee(!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:[d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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"})}),t("auth.loginWithMobile")]}),d.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[t("auth.noAccount")," ",d.jsx("a",{href:_??"",target:"_blank",rel:"noopener noreferrer",className:"text-orange-500 hover:text-orange-600 dark:text-orange-400 dark:hover:text-orange-500",children:t("auth.createVault")})]})]}),d.jsx(YT,{isOpen:te,onClose:()=>ee(!1),onSuccess:j,webApi:Y,mode:"login"})]})})},Ls=({type:t,message:e,className:n=""})=>{const r=()=>{const s="p-3 border rounded-md text-sm";switch(t){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 d.jsx("div",{className:`${r()} ${n}`,children:e})},Np=({isOpen:t,onClose:e,onConfirm:n})=>{const{t:r}=tt(),[s,l]=b.useState(null),c=b.useCallback(async()=>{try{const m=await St("GET_SYNC_STATE",{},"background");l(m.isDirty)}catch(m){console.error("Failed to check sync state:",m),l(!1)}},[]);return b.useEffect(()=>{t&&(l(null),c())},[t,c]),!t||s===null?null:s?d.jsxs(Zn,{isOpen:t,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[d.jsxs("div",{className:"flex items-start mb-4",children:[d.jsx("div",{className:"flex-shrink-0",children:d.jsx("svg",{className:"h-6 w-6 text-amber-500",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:d.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"})})}),d.jsx("div",{className:"ml-3",children:d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:r("logout.unsyncedChangesTitle")})})]}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:r("logout.unsyncedChangesWarning")}),d.jsxs("div",{className:"flex gap-3",children:[d.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:r("common.cancel")}),d.jsx("button",{onClick:n,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:r("logout.logoutAnyway")})]})]}):d.jsxs(Zn,{isOpen:t,onClose:e,maxWidth:"max-w-sm",showHeaderBorder:!1,showCloseButton:!1,bodyClassName:"p-6",children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-3",children:r("common.logout")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:r("auth.logoutConfirm")}),d.jsxs("div",{className:"flex gap-3",children:[d.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:r("common.cancel")}),d.jsx("button",{onClick:n,className:"flex-1 px-4 py-2 bg-red-500 hover:bg-red-600 text-white rounded-md transition-colors",children:r("common.logout")})]})]})},Nb=()=>{var n;const{t}=tt(),{username:e}=Nd();return d.jsxs("div",{className:"flex flex-col items-center mb-6",children:[d.jsx("div",{className:"w-12 h-12 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center mb-3",children:d.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-2xl font-medium",children:((n=e==null?void 0:e[0])==null?void 0:n.toUpperCase())||"?"})}),d.jsx("p",{className:"font-medium text-gray-900 dark:text-white text-base",children:e}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("common.loggedIn")})]})},qB=()=>{const{t}=tt(),e=wi(),n=Nd(),r=ta(),s=Va(),{setHeaderButtons:l}=Ii(),c=Vi(),m=new XT(c),[h,g]=b.useState("password"),[A,p]=b.useState(!1),[v,w]=b.useState(""),[T,S]=b.useState(!1),[k,L]=b.useState(""),[U,x]=b.useState(6),F=b.useRef(null),B=b.useRef(null),[V,O]=b.useState(null),{showLoading:_,hideLoading:z,setIsInitialLoading:Q}=va(),[K,te]=b.useState(!1),[ee,Y]=b.useState(!1),le=async()=>{try{const Te=await c.getStatus();if(Te.serverVersion==="0.0.0")return Q(!1),await r.setIsOffline(!0),{online:!1,error:null};const Ce=c.validateStatusResponse(Te);return Ce!==null?(await e.logout(t("common.errors."+Ce)),{online:!1,error:Ce}):(Q(!1),await r.setIsOffline(!1),{online:!0,error:null})}catch{return Q(!1),{online:!1,error:"sessionExpired"}}};b.useEffect(()=>{(async()=>{const[Ce,Pe]=await Promise.all([wT(),tM()]);p(Ce),x(Pe||6),g(Ce?"pin":"password"),await le()})()},[]),b.useEffect(()=>{const Te=Ba.isPopup()?null:d.jsx(_n,{onClick:()=>Ba.openInNewPopup(),title:t("common.openInNewWindow"),iconType:qa.EXPAND});return l(Te),()=>{l(null)}},[l,t]),b.useEffect(()=>{if(h!=="pin")return;const Te=()=>{F.current&&F.current.focus()},Ce=()=>{Te()},Pe=()=>{Te()};Te();const Ve=B.current;return Ve&&Ve.addEventListener("click",Ce),window.addEventListener("focus",Pe),()=>{Ve&&Ve.removeEventListener("click",Ce),window.removeEventListener("focus",Pe)}},[h]);const J=async Te=>{Te.preventDefault(),O(null),_();const Ce=await le();if(Ce.error){z();return}try{let Pe;if(Ce.online){const bt=await m.initiateLogin(n.username);Pe=(await yn.prepareCredentials(v,bt.salt,bt.encryptionType,bt.encryptionSettings)).passwordHashBase64,await r.storeEncryptionKeyDerivationParams({salt:bt.salt,encryptionType:bt.encryptionType,encryptionSettings:bt.encryptionSettings})}else{const bt=await St("GET_ENCRYPTION_KEY_DERIVATION_PARAMS",{},"background");if(!bt){O(t("common.errors.serverNotAvailable")),z();return}Pe=(await yn.prepareCredentials(v,bt.salt,bt.encryptionType,bt.encryptionSettings)).passwordHashBase64,await r.setIsOffline(!0)}await r.storeEncryptionKey(Pe);const Ve=await r.loadStoredDatabase();if(!Ve)throw new Error(t("common.errors.wrongPassword"));if(await Ve.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await dt.setVaultLockedDismissUntil(0),await FE(),s("/reinitialize",{replace:!0})}catch(Pe){Pe instanceof fd?await e.logout(Pe.message):ko(Pe)?ku(ns(Pe,""))===Tu.VAULT_DECRYPT_FAILED?O(t("common.errors.wrongPassword")):O(ns(Pe,t("common.errors.wrongPassword"))):O(t("common.errors.wrongPassword")),console.error("Unlock error:",Pe)}finally{z()}},ie=b.useCallback(async Te=>{L(Te),O(null),Te.length===U&&(await new Promise(Ce=>setTimeout(Ce,50)),await j(Te))},[U]),be=Te=>{k.length<8&&ie(k+Te)},se=()=>{L(k.slice(0,-1)),O(null)},j=async(Te=k)=>{if(Te.length===U){O(null),_();try{const Ce=await nM(Te);(await le()).online||await r.setIsOffline(!0),await r.storeEncryptionKey(Ce);const Ve=await r.loadStoredDatabase();if(!Ve)throw new _f(3);if(await Ve.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await dt.setVaultLockedDismissUntil(0),s("/reinitialize",{replace:!0}),z()}catch(Ce){if(Ce instanceof mu)p(!1),g("password"),O(t("settings.unlockMethod.pinLocked"));else if(Ce instanceof _f){const Pe=Ce.attemptsRemaining;O(Pe===1?t("settings.unlockMethod.incorrectPinSingular"):t("settings.unlockMethod.incorrectPin",{attemptsRemaining:Pe})),L("")}else Ce instanceof pd?(O(t("settings.unlockMethod.invalidPinFormat")),L("")):ko(Ce)?(ku(ns(Ce,""))===Tu.VAULT_DECRYPT_FAILED?(console.error("PIN unlock failed (decryption error):",Ce),O(t("settings.unlockMethod.incorrectPin",{attemptsRemaining:3}))):(console.error("PIN unlock failed:",Ce),O(ns(Ce,t("common.errors.unknownErrorTryAgain")))),L("")):(console.error("PIN unlock failed:",Ce),O(t("common.errors.unknownErrorTryAgain")),L(""));z()}}},W=()=>{Y(!0)},X=async()=>{Y(!1);try{await c.revokeTokens(),await n.clearAuthUserInitiated()}catch(Te){console.error("Error during logout:",Te)}},ne=async Te=>{_();try{await c.revokeCurrentTokens(),await n.setAuthTokens(Te.username,Te.token,Te.refreshToken),await r.storeEncryptionKey(Te.decryptionKey),await r.storeEncryptionKeyDerivationParams({salt:Te.salt,encryptionType:Te.encryptionType,encryptionSettings:Te.encryptionSettings});const Ce=await r.loadStoredDatabase();if(!Ce)throw new Error(t("common.errors.unknownErrorTryAgain"));if(await Ce.hasPendingMigrations()){s("/upgrade",{replace:!0}),z();return}await dt.setVaultLockedDismissUntil(0),await FE(),s("/reinitialize",{replace:!0})}catch(Ce){Ce instanceof fd?await e.logout(Ce.message):ko(Ce)?O(ns(Ce,t("common.errors.unknownErrorTryAgain"))):O(t("common.errors.unknownErrorTryAgain")),console.error("Mobile unlock error:",Ce)}finally{z()}},we=()=>{g("password"),O(null)},ce=()=>{g("pin"),O(null)},Ee=Array.from({length:U},(Te,Ce)=>d.jsx("div",{className:`w-4 h-4 rounded-full border-2 transition-all ${Ce<k.length?"bg-primary-500 border-primary-500":"bg-transparent border-gray-300 dark:border-gray-600"}`},Ce));return h==="pin"?d.jsx("div",{ref:B,className:"flex flex-col items-center justify-center p-4",children:d.jsxs("div",{className:"w-full max-w-md",children:[d.jsx(Nb,{}),d.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[d.jsxs("div",{className:"text-center mb-4",children:[d.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white mb-1",children:t("auth.unlockTitle")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("auth.enterPinToUnlock")})]}),d.jsx("div",{className:"flex justify-center gap-2 mb-4",children:Ee}),V&&d.jsx(Ls,{type:"error",message:V,className:"mb-3 text-center"}),d.jsx("input",{ref:F,type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:k,onChange:Te=>ie(Te.target.value.replace(/\D/g,"")),className:"w-0 h-0 opacity-0 absolute",autoFocus:!0,"aria-label":"PIN input"}),d.jsx("div",{children:d.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[[1,2,3,4,5,6,7,8,9].map(Te=>d.jsx("button",{type:"button",onClick:()=>be(Te.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:Te},Te)),d.jsx("div",{}),d.jsx("button",{type:"button",onClick:()=>be("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"}),d.jsx("button",{type:"button",onClick:se,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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]})})]}),d.jsx("div",{className:"mt-4",children:d.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:d.jsx("button",{type:"button",onClick:we,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:t("auth.useMasterPassword")})})})]})}):d.jsxs("div",{className:"flex flex-col items-center justify-center p-4",children:[d.jsxs("div",{className:"w-full max-w-md",children:[d.jsx(Nb,{}),d.jsxs("form",{onSubmit:J,className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6",children:[d.jsx("div",{className:"text-center mb-6",children:d.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t("auth.unlockTitle")})}),V&&d.jsx(Ls,{type:"error",message:V,className:"mb-4 text-center"}),d.jsxs("div",{className:"mb-4",children:[d.jsx("label",{className:"block text-gray-700 dark:text-gray-200 font-medium mb-2",htmlFor:"password",children:t("auth.masterPassword")}),d.jsxs("div",{className:"relative",children:[d.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:T?"text":"password",value:v,onChange:Te=>w(Te.target.value),placeholder:t("auth.passwordPlaceholder"),required:!0,autoFocus:!0}),d.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:()=>S(!T),tabIndex:-1,children:d.jsx(Cp,{type:T?qa.EYE_OFF:qa.EYE,className:"w-5 h-5 text-gray-400 dark:text-gray-500"})})]})]}),d.jsx(Ca,{type:"submit",children:t("auth.unlockVault")}),!r.isOffline&&d.jsxs("button",{type:"button",onClick:()=>te(!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:[d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:d.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"})}),t("auth.unlockWithMobile")]}),d.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:[t("auth.switchAccounts")," ",d.jsx("button",{type:"button",onClick:W,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:t("common.logout")})]})]})]}),A&&d.jsx("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400 mt-6",children:d.jsx("button",{type:"button",onClick:ce,className:"text-primary-600 hover:text-primary-700 dark:text-primary-500 dark:hover:text-primary-400 hover:underline font-medium",children:t("auth.unlockWithPin")})}),d.jsx(YT,{isOpen:K,onClose:()=>te(!1),onSuccess:ne,webApi:c,mode:"unlock"}),d.jsx(Np,{isOpen:ee,onClose:()=>Y(!1),onConfirm:X})]})},Tb=2.5,YB=()=>{const t=Va(),{t:e}=tt(),[n,r]=b.useState(!1),[s,l]=b.useState(null),[c,m]=b.useState(!0),h=b.useRef(null),g=b.useRef(null),A=b.useCallback(()=>{h.current&&(clearInterval(h.current),h.current=null)},[]),p=b.useCallback(()=>{var k;A(),l(Tb),(k=g.current)==null||k.startAnimation(Tb),h.current=setInterval(()=>{l(L=>L===null||L<=1?(A(),window.close(),null):L-1)},1e3)},[A]),v=b.useCallback(()=>{var k;A(),l(null),(k=g.current)==null||k.stopAnimation()},[A]),w=async k=>{r(k),await dt.setAutoCloseUnlockPopup(k),k?p():v()},T=()=>{v();const k=new URL(window.location.href);k.searchParams.delete("mode"),window.history.replaceState({},"",k),t("/items")},S=()=>{v(),window.close()};return b.useEffect(()=>((async()=>{const L=await dt.getAutoCloseUnlockPopup();r(L),m(!1),L&&setTimeout(()=>{p()},0)})(),()=>{A()}),[A,p]),d.jsxs("div",{className:"flex flex-col items-center justify-center p-6 text-center",children:[d.jsx(gp,{ref:g,isVisible:s!==null,colorClass:"bg-primary-500"}),d.jsx("div",{className:"mb-4 text-green-600 dark:text-green-400",children:d.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}),d.jsx("h2",{className:"text-xl font-semibold mb-4 text-gray-900 dark:text-white",children:e("auth.unlockSuccessTitle")}),d.jsx("p",{className:"mb-6 text-gray-600 dark:text-gray-400",children:e("auth.unlockSuccessDescription")}),d.jsxs("div",{className:"space-y-3 w-full",children:[d.jsx("button",{onClick:S,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")}),d.jsx("button",{onClick:T,className:"w-full px-4 py-2 text-gray-900 bg-white border border-gray-300 rounded hover:bg-gray-50 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 dark:border-gray-600",children:e("auth.browseVault")})]}),d.jsx("div",{className:"w-full mt-6 pt-4 border-t border-gray-200 dark:border-gray-700",children:d.jsxs("label",{className:"flex items-center justify-center gap-2 cursor-pointer text-xs text-gray-400 dark:text-gray-500",children:[d.jsx("input",{type:"checkbox",checked:n,onChange:k=>w(k.target.checked),disabled:c,className:"w-3.5 h-3.5 rounded border-gray-300 text-gray-400 focus:ring-gray-400 dark:border-gray-600 dark:bg-gray-700"}),d.jsx("span",{children:e("auth.autoCloseUnlockPopup")})]})})]})},xu=({isOpen:t,onClose:e,onConfirm:n,title:r,message:s,confirmText:l="",cancelText:c="",variant:m="default"})=>{const h=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 d.jsxs(Zn,{isOpen:t,onClose:e,maxWidth:"max-w-lg",showHeaderBorder:!1,bodyClassName:"px-4 pb-4 pt-5",children:[d.jsxs("div",{className:"sm:flex sm:items-start",children:[m==="danger"&&d.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:d.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:d.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"})})}),d.jsxs("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[d.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:r}),d.jsx("div",{className:"mt-2",children:d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s})})]})]}),d.jsxs("div",{className:"mt-5 sm:mt-4 sm:flex sm:flex-row-reverse",children:[l&&d.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 ${h}`,onClick:n,children:l}),c&&d.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:c})]})]})};function Os(){const t=ta(),e=b.useRef(null),n=b.useCallback(async c=>{await c();const m=t.sqliteClient.exportToBase64(),h=await St("GET_ENCRYPTION_KEY",{},"background"),g=await Zt.symmetricEncrypt(m,h);await St("STORE_ENCRYPTED_VAULT",{vaultBlob:g,markDirty:!0},"background"),await t.refreshSyncState()},[t]),r=b.useCallback(()=>{e.current&&clearInterval(e.current),console.info("[VaultMutate] Starting to poll for sync completion"),e.current=setInterval(async()=>{try{const c=await St("GET_SYNC_STATE",{},"background");!c.isDirty&&!c.isSyncInProgress&&(console.info("[VaultMutate] Sync completed (isDirty=false, isSyncInProgress=false), clearing uploading indicator"),t.setIsUploading(!1),t.setIsSyncing(!1),await t.refreshSyncState(),e.current&&(clearInterval(e.current),e.current=null))}catch(c){console.error("[VaultMutate] Error polling sync state:",c)}},500)},[t]),s=b.useCallback(()=>{t.setIsUploading(!0),St("FULL_VAULT_SYNC",{},"background").then(async c=>{c.hasNewVault&&await t.loadStoredDatabase()}).catch(c=>{console.error("Background sync error:",c)}),r()},[t,r]);return{executeVaultMutationAsync:b.useCallback(async c=>{await n(c),s()},[n,s])}}const Tp=()=>{const{t}=tt(),e=wi(),n=ta();return{syncVault:b.useCallback(async(s={})=>{const{onSuccess:l,onError:c,onStatus:m,onOffline:h,onUpgradeRequired:g}=s;try{if(!await e.initializeAuth())return!1;m==null||m(t("common.checkingVaultUpdates"));const p=await St("CHECK_SYNC_STATUS",{},"background");if(p.requiresLogout){const w=p.errorKey?t("common.errors."+p.errorKey):void 0;return await e.logout(w),!1}p.hasNewerVault?n.setIsSyncing(!0):p.hasDirtyChanges&&!p.isOffline&&n.setIsUploading(!0);const v=await St("FULL_VAULT_SYNC",{},"background");if(v.requiresLogout){const w=v.errorKey?t("common.errors."+v.errorKey):v.error;return await e.logout(w),!1}if(v.wasOffline)return await n.setIsOffline(!0),m==null||m(t("common.offlineMode")),h==null||h(),l==null||l(!1),!0;if(n.isOffline&&await n.setIsOffline(!1),v.upgradeRequired)return g==null||g(),!1;if(!v.success){const w=v.errorKey?t("common.errors."+v.errorKey):v.error??t("common.errors.unknownError");return c==null||c(w),!1}return v.hasNewVault&&(m==null||m(t("common.syncingUpdatedVault")),await n.loadStoredDatabase()),await n.refreshSyncState(),l==null||l(v.hasNewVault),!0}catch(A){const p=A instanceof Error?A.message:"Unknown error during vault sync";return console.error("Vault sync error:",A),c==null||c(p),!1}finally{n.setIsSyncing(!1)}},[e,n,t])}},JB=()=>{var J;const{t}=tt(),{username:e}=wi(),n=Nd(),r=ta(),{sqliteClient:s}=r,{setHeaderButtons:l}=Ii(),[c,m]=b.useState(!1),[h,g]=b.useState(null),[A,p]=b.useState(null),[v,w]=b.useState(null),[T,S]=b.useState(!1),[k,L]=b.useState(!1),[U,x]=b.useState(!1),{setIsInitialLoading:F}=va(),B=Vi(),{executeVaultMutationAsync:V}=Os(),{syncVault:O}=Tp(),_=Va();b.useEffect(()=>{const ie=Ba.isPopup()?null:d.jsx(d.Fragment,{children:d.jsx(_n,{onClick:()=>Ba.openInNewPopup(),title:t("common.openInNewWindow"),iconType:qa.EXPAND})});return l(ie),()=>{l(null)}},[l,t]);const z=b.useCallback(async()=>{try{if(s){const ie=await s.getDatabaseVersion(),be=await s.getLatestDatabaseVersion();g(ie),p(be)}}catch(ie){console.error("Failed to load version information:",ie),w(t("upgrade.alerts.unableToGetVersionInfo"))}finally{F(!1)}},[s,F,t]);b.useEffect(()=>{z()},[z]);const Q=async()=>{if(!s||!h||!A){w(t("upgrade.alerts.unableToGetVersionInfo"));return}if(await B.isSelfHosted()){S(!0);return}await K()},K=async()=>{if(!s||!h||!A){w(t("upgrade.alerts.unableToGetVersionInfo"));return}m(!0),w(null);try{const be=new Uf().getUpgradeVaultSql(h.revision,A.revision);if(!be.success)throw new Error(be.error??t("upgrade.alerts.upgradeFailed"));if(be.sqlCommands.length===0){await te();return}await V(async()=>{for(let se=0;se<be.sqlCommands.length;se++){const j=be.sqlCommands[se];try{s.executeRaw(j)}catch(W){throw console.error(`Error executing SQL command ${se+1}:`,j,W),new Error(t("upgrade.alerts.failedToApplyMigration",{current:se+1,total:be.sqlCommands.length}))}}}),await te()}catch(ie){console.error("Upgrade failed:",ie),w(ie instanceof Error?ie.message:t("common.errors.unknownError"))}finally{m(!1)}},te=async()=>{try{await O({onSuccess:()=>{_("/items")},onError:ie=>{console.error("Sync error after upgrade:",ie),_("/items")}})}catch(ie){console.error("Error during post-upgrade sync:",ie),_("/items")}},ee=()=>{x(!0)},Y=async()=>{x(!1);try{await B.revokeTokens(),await n.clearAuthUserInitiated()}catch(ie){console.error("Error during logout:",ie)}},le=()=>{L(!0)};return d.jsxs("div",{children:[c&&d.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:[d.jsx(mi,{}),d.jsx("div",{className:"text-sm text-gray-500 mt-2",children:t("upgrade.upgrading")})]}),d.jsx(xu,{isOpen:T,onClose:()=>S(!1),onConfirm:()=>{S(!1),K()},title:t("upgrade.alerts.selfHostedServer"),message:t("upgrade.alerts.selfHostedWarning"),confirmText:t("upgrade.alerts.continueUpgrade"),cancelText:t("common.cancel")}),d.jsx(xu,{isOpen:k,onClose:()=>L(!1),onConfirm:()=>L(!1),title:t("upgrade.whatsNew"),message:`${t("upgrade.whatsNewDescription")}

${(A==null?void 0:A.description)??t("upgrade.noDescriptionAvailable")}`}),d.jsxs("form",{className:"w-full px-2 pt-2 pb-2 mb-4",children:[v&&d.jsx("div",{className:"mb-4 text-red-500 dark:text-red-400",children:v}),d.jsxs("div",{className:"flex items-center space-x-3 mb-4",children:[d.jsx("div",{className:"flex-shrink-0",children:d.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:d.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((J=e==null?void 0:e[0])==null?void 0:J.toUpperCase())||"?"})})}),d.jsx("div",{children:d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e})})]}),d.jsx("h2",{className:"text-xl font-bold dark:text-gray-200 mb-4",children:t("upgrade.title")}),d.jsxs("div",{className:"mb-6",children:[d.jsx("p",{className:"text-gray-700 dark:text-gray-200 mb-4",children:t("upgrade.subtitle")}),d.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded p-4 mb-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"font-medium text-gray-700 dark:text-gray-200",children:t("upgrade.versionInformation")}),d.jsx("button",{type:"button",onClick:le,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:t("upgrade.whatsNew"),children:"?"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("upgrade.yourVault")}),d.jsx("span",{className:"text-sm font-bold text-orange-600 dark:text-orange-400",children:(h==null?void 0:h.compatibleUpToVersion)??"..."})]}),d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("upgrade.newVersion")}),d.jsx("span",{className:"text-sm font-bold text-green-600 dark:text-green-400",children:(A==null?void 0:A.releaseVersion)??"..."})]})]})]})]}),d.jsxs("div",{className:"flex flex-col w-full space-y-2",children:[d.jsx(Ca,{type:"button",id:"upgrade-button",onClick:Q,children:t(c?"upgrade.upgrading":"upgrade.upgrade")}),d.jsx("button",{type:"button",onClick:ee,className:"text-red-500 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 text-sm font-medium py-2",disabled:c,children:t("common.logout")})]})]}),d.jsx(Np,{isOpen:U,onClose:()=>x(!1),onConfirm:Y})]})};/*! @license DOMPurify 3.3.2 | (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.2/LICENSE */const{entries:$T,setPrototypeOf:kb,isFrozen:XB,getPrototypeOf:$B,getOwnPropertyDescriptor:ZB}=Object;let{freeze:Cn,seal:gi,create:pu}=Object,{apply:Vf,construct:zf}=typeof Reflect<"u"&&Reflect;Cn||(Cn=function(e){return e});gi||(gi=function(e){return e});Vf||(Vf=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return e.apply(n,s)});zf||(zf=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const Zc=Sn(Array.prototype.forEach),e_=Sn(Array.prototype.lastIndexOf),xb=Sn(Array.prototype.pop),Vl=Sn(Array.prototype.push),t_=Sn(Array.prototype.splice),Au=Sn(String.prototype.toLowerCase),rf=Sn(String.prototype.toString),sf=Sn(String.prototype.match),zl=Sn(String.prototype.replace),a_=Sn(String.prototype.indexOf),n_=Sn(String.prototype.trim),Jn=Sn(Object.prototype.hasOwnProperty),In=Sn(RegExp.prototype.test),Ql=i_(TypeError);function Sn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return Vf(t,e,r)}}function i_(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return zf(t,n)}}function Bt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Au;kb&&kb(t,null);let r=e.length;for(;r--;){let s=e[r];if(typeof s=="string"){const l=n(s);l!==s&&(XB(e)||(e[r]=l),s=l)}t[s]=!0}return t}function r_(t){for(let e=0;e<t.length;e++)Jn(t,e)||(t[e]=null);return t}function Bi(t){const e=pu(null);for(const[n,r]of $T(t))Jn(t,n)&&(Array.isArray(r)?e[n]=r_(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=Bi(r):e[n]=r);return e}function Kl(t,e){for(;t!==null;){const r=ZB(t,e);if(r){if(r.get)return Sn(r.get);if(typeof r.value=="function")return Sn(r.value)}t=$B(t)}function n(){return null}return n}const Lb=Cn(["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"]),of=Cn(["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"]),lf=Cn(["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"]),s_=Cn(["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"]),df=Cn(["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"]),o_=Cn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Db=Cn(["#text"]),Rb=Cn(["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"]),cf=Cn(["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"]),Ub=Cn(["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"]),eu=Cn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),l_=gi(/\{\{[\w\W]*|[\w\W]*\}\}/gm),d_=gi(/<%[\w\W]*|[\w\W]*%>/gm),c_=gi(/\$\{[\w\W]*/gm),u_=gi(/^data-[\-\w.\u00B7-\uFFFF]+$/),m_=gi(/^aria-[\-\w]+$/),ZT=gi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),g_=gi(/^(?:\w+script|data):/i),h_=gi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ek=gi(/^html$/i),f_=gi(/^[a-z][.\w]*(-[.\w]+)+$/i);var Mb=Object.freeze({__proto__:null,ARIA_ATTR:m_,ATTR_WHITESPACE:h_,CUSTOM_ELEMENT:f_,DATA_ATTR:u_,DOCTYPE_NAME:ek,ERB_EXPR:d_,IS_ALLOWED_URI:ZT,IS_SCRIPT_OR_DATA:g_,MUSTACHE_EXPR:l_,TMPLIT_EXPR:c_});const Gl={element:1,text:3,progressingInstruction:7,comment:8,document:9},p_=function(){return typeof window>"u"?null:window},A_=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const l="dompurify"+(r?"#"+r:"");try{return e.createPolicy(l,{createHTML(c){return c},createScriptURL(c){return c}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Bb=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function tk(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p_();const e=Me=>tk(Me);if(e.version="3.3.2",e.removed=[],!t||!t.document||t.document.nodeType!==Gl.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,s=r.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:m,Element:h,NodeFilter:g,NamedNodeMap:A=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:v,trustedTypes:w}=t,T=h.prototype,S=Kl(T,"cloneNode"),k=Kl(T,"remove"),L=Kl(T,"nextSibling"),U=Kl(T,"childNodes"),x=Kl(T,"parentNode");if(typeof c=="function"){const Me=n.createElement("template");Me.content&&Me.content.ownerDocument&&(n=Me.content.ownerDocument)}let F,B="";const{implementation:V,createNodeIterator:O,createDocumentFragment:_,getElementsByTagName:z}=n,{importNode:Q}=r;let K=Bb();e.isSupported=typeof $T=="function"&&typeof x=="function"&&V&&V.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:te,ERB_EXPR:ee,TMPLIT_EXPR:Y,DATA_ATTR:le,ARIA_ATTR:J,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:be,CUSTOM_ELEMENT:se}=Mb;let{IS_ALLOWED_URI:j}=Mb,W=null;const X=Bt({},[...Lb,...of,...lf,...df,...Db]);let ne=null;const we=Bt({},[...Rb,...cf,...Ub,...eu]);let ce=Object.seal(pu(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}})),Ee=null,Te=null;const Ce=Object.seal(pu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pe=!0,Ve=!0,bt=!1,gt=!0,it=!1,Ke=!0,Pt=!1,Se=!1,Fe=!1,fe=!1,Re=!1,ze=!1,je=!0,at=!1;const wt="user-content-";let Rt=!0,Tt=!1,qt={},M=null;const C=Bt({},["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 N=null;const G=Bt({},["audio","video","img","source","image","track"]);let ae=null;const pe=Bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ne="http://www.w3.org/1998/Math/MathML",_e="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml";let pt=ht,It=!1,At=null;const hi=Bt({},[Ne,_e,ht],rf);let xa=Bt({},["mi","mo","mn","ms","mtext"]),Sa=Bt({},["annotation-xml"]);const Yt=Bt({},["title","style","font","a","script"]);let Vt=null;const Be=["application/xhtml+xml","text/html"],sn="text/html";let kt=null,Lt=null;const La=n.createElement("form"),on=function(q){return q instanceof RegExp||q instanceof Function},jt=function(){let q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Lt&&Lt===q)){if((!q||typeof q!="object")&&(q={}),q=Bi(q),Vt=Be.indexOf(q.PARSER_MEDIA_TYPE)===-1?sn:q.PARSER_MEDIA_TYPE,kt=Vt==="application/xhtml+xml"?rf:Au,W=Jn(q,"ALLOWED_TAGS")?Bt({},q.ALLOWED_TAGS,kt):X,ne=Jn(q,"ALLOWED_ATTR")?Bt({},q.ALLOWED_ATTR,kt):we,At=Jn(q,"ALLOWED_NAMESPACES")?Bt({},q.ALLOWED_NAMESPACES,rf):hi,ae=Jn(q,"ADD_URI_SAFE_ATTR")?Bt(Bi(pe),q.ADD_URI_SAFE_ATTR,kt):pe,N=Jn(q,"ADD_DATA_URI_TAGS")?Bt(Bi(G),q.ADD_DATA_URI_TAGS,kt):G,M=Jn(q,"FORBID_CONTENTS")?Bt({},q.FORBID_CONTENTS,kt):C,Ee=Jn(q,"FORBID_TAGS")?Bt({},q.FORBID_TAGS,kt):Bi({}),Te=Jn(q,"FORBID_ATTR")?Bt({},q.FORBID_ATTR,kt):Bi({}),qt=Jn(q,"USE_PROFILES")?q.USE_PROFILES:!1,Pe=q.ALLOW_ARIA_ATTR!==!1,Ve=q.ALLOW_DATA_ATTR!==!1,bt=q.ALLOW_UNKNOWN_PROTOCOLS||!1,gt=q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,it=q.SAFE_FOR_TEMPLATES||!1,Ke=q.SAFE_FOR_XML!==!1,Pt=q.WHOLE_DOCUMENT||!1,fe=q.RETURN_DOM||!1,Re=q.RETURN_DOM_FRAGMENT||!1,ze=q.RETURN_TRUSTED_TYPE||!1,Fe=q.FORCE_BODY||!1,je=q.SANITIZE_DOM!==!1,at=q.SANITIZE_NAMED_PROPS||!1,Rt=q.KEEP_CONTENT!==!1,Tt=q.IN_PLACE||!1,j=q.ALLOWED_URI_REGEXP||ZT,pt=q.NAMESPACE||ht,xa=q.MATHML_TEXT_INTEGRATION_POINTS||xa,Sa=q.HTML_INTEGRATION_POINTS||Sa,ce=q.CUSTOM_ELEMENT_HANDLING||{},q.CUSTOM_ELEMENT_HANDLING&&on(q.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ce.tagNameCheck=q.CUSTOM_ELEMENT_HANDLING.tagNameCheck),q.CUSTOM_ELEMENT_HANDLING&&on(q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ce.attributeNameCheck=q.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),q.CUSTOM_ELEMENT_HANDLING&&typeof q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ce.allowCustomizedBuiltInElements=q.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),it&&(Ve=!1),Re&&(fe=!0),qt&&(W=Bt({},Db),ne=pu(null),qt.html===!0&&(Bt(W,Lb),Bt(ne,Rb)),qt.svg===!0&&(Bt(W,of),Bt(ne,cf),Bt(ne,eu)),qt.svgFilters===!0&&(Bt(W,lf),Bt(ne,cf),Bt(ne,eu)),qt.mathMl===!0&&(Bt(W,df),Bt(ne,Ub),Bt(ne,eu))),Jn(q,"ADD_TAGS")||(Ce.tagCheck=null),Jn(q,"ADD_ATTR")||(Ce.attributeCheck=null),q.ADD_TAGS&&(typeof q.ADD_TAGS=="function"?Ce.tagCheck=q.ADD_TAGS:(W===X&&(W=Bi(W)),Bt(W,q.ADD_TAGS,kt))),q.ADD_ATTR&&(typeof q.ADD_ATTR=="function"?Ce.attributeCheck=q.ADD_ATTR:(ne===we&&(ne=Bi(ne)),Bt(ne,q.ADD_ATTR,kt))),q.ADD_URI_SAFE_ATTR&&Bt(ae,q.ADD_URI_SAFE_ATTR,kt),q.FORBID_CONTENTS&&(M===C&&(M=Bi(M)),Bt(M,q.FORBID_CONTENTS,kt)),q.ADD_FORBID_CONTENTS&&(M===C&&(M=Bi(M)),Bt(M,q.ADD_FORBID_CONTENTS,kt)),Rt&&(W["#text"]=!0),Pt&&Bt(W,["html","head","body"]),W.table&&(Bt(W,["tbody"]),delete Ee.tbody),q.TRUSTED_TYPES_POLICY){if(typeof q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ql('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ql('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');F=q.TRUSTED_TYPES_POLICY,B=F.createHTML("")}else F===void 0&&(F=A_(w,s)),F!==null&&typeof B=="string"&&(B=F.createHTML(""));Cn&&Cn(q),Lt=q}},Ut=Bt({},[...of,...lf,...s_]),Qt=Bt({},[...df,...o_]),Ht=function(q){let Ie=x(q);(!Ie||!Ie.tagName)&&(Ie={namespaceURI:pt,tagName:"template"});const He=Au(q.tagName),rt=Au(Ie.tagName);return At[q.namespaceURI]?q.namespaceURI===_e?Ie.namespaceURI===ht?He==="svg":Ie.namespaceURI===Ne?He==="svg"&&(rt==="annotation-xml"||xa[rt]):!!Ut[He]:q.namespaceURI===Ne?Ie.namespaceURI===ht?He==="math":Ie.namespaceURI===_e?He==="math"&&Sa[rt]:!!Qt[He]:q.namespaceURI===ht?Ie.namespaceURI===_e&&!Sa[rt]||Ie.namespaceURI===Ne&&!xa[rt]?!1:!Qt[He]&&(Yt[He]||!Ut[He]):!!(Vt==="application/xhtml+xml"&&At[q.namespaceURI]):!1},ga=function(q){Vl(e.removed,{element:q});try{x(q).removeChild(q)}catch{k(q)}},fa=function(q,Ie){try{Vl(e.removed,{attribute:Ie.getAttributeNode(q),from:Ie})}catch{Vl(e.removed,{attribute:null,from:Ie})}if(Ie.removeAttribute(q),q==="is")if(fe||Re)try{ga(Ie)}catch{}else try{Ie.setAttribute(q,"")}catch{}},Xa=function(q){let Ie=null,He=null;if(Fe)q="<remove></remove>"+q;else{const $t=sf(q,/^[\r\n\t ]+/);He=$t&&$t[0]}Vt==="application/xhtml+xml"&&pt===ht&&(q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+q+"</body></html>");const rt=F?F.createHTML(q):q;if(pt===ht)try{Ie=new v().parseFromString(rt,Vt)}catch{}if(!Ie||!Ie.documentElement){Ie=V.createDocument(pt,"template",null);try{Ie.documentElement.innerHTML=It?B:rt}catch{}}const ia=Ie.body||Ie.documentElement;return q&&He&&ia.insertBefore(n.createTextNode(He),ia.childNodes[0]||null),pt===ht?z.call(Ie,Pt?"html":"body")[0]:Pt?Ie.documentElement:ia},$a=function(q){return O.call(q.ownerDocument||q,q,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},_a=function(q){return q instanceof p&&(typeof q.nodeName!="string"||typeof q.textContent!="string"||typeof q.removeChild!="function"||!(q.attributes instanceof A)||typeof q.removeAttribute!="function"||typeof q.setAttribute!="function"||typeof q.namespaceURI!="string"||typeof q.insertBefore!="function"||typeof q.hasChildNodes!="function")},pa=function(q){return typeof m=="function"&&q instanceof m};function Da(Me,q,Ie){Zc(Me,He=>{He.call(e,q,Ie,Lt)})}const de=function(q){let Ie=null;if(Da(K.beforeSanitizeElements,q,null),_a(q))return ga(q),!0;const He=kt(q.nodeName);if(Da(K.uponSanitizeElement,q,{tagName:He,allowedTags:W}),Ke&&q.hasChildNodes()&&!pa(q.firstElementChild)&&In(/<[/\w!]/g,q.innerHTML)&&In(/<[/\w!]/g,q.textContent)||q.nodeType===Gl.progressingInstruction||Ke&&q.nodeType===Gl.comment&&In(/<[/\w]/g,q.data))return ga(q),!0;if(!(Ce.tagCheck instanceof Function&&Ce.tagCheck(He))&&(!W[He]||Ee[He])){if(!Ee[He]&&Qe(He)&&(ce.tagNameCheck instanceof RegExp&&In(ce.tagNameCheck,He)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(He)))return!1;if(Rt&&!M[He]){const rt=x(q)||q.parentNode,ia=U(q)||q.childNodes;if(ia&&rt){const $t=ia.length;for(let da=$t-1;da>=0;--da){const Fa=S(ia[da],!0);Fa.__removalCount=(q.__removalCount||0)+1,rt.insertBefore(Fa,L(q))}}}return ga(q),!0}return q instanceof h&&!Ht(q)||(He==="noscript"||He==="noembed"||He==="noframes")&&In(/<\/no(script|embed|frames)/i,q.innerHTML)?(ga(q),!0):(it&&q.nodeType===Gl.text&&(Ie=q.textContent,Zc([te,ee,Y],rt=>{Ie=zl(Ie,rt," ")}),q.textContent!==Ie&&(Vl(e.removed,{element:q.cloneNode()}),q.textContent=Ie)),Da(K.afterSanitizeElements,q,null),!1)},Oe=function(q,Ie,He){if(Te[Ie]||je&&(Ie==="id"||Ie==="name")&&(He in n||He in La))return!1;if(!(Ve&&!Te[Ie]&&In(le,Ie))){if(!(Pe&&In(J,Ie))){if(!(Ce.attributeCheck instanceof Function&&Ce.attributeCheck(Ie,q))){if(!ne[Ie]||Te[Ie]){if(!(Qe(q)&&(ce.tagNameCheck instanceof RegExp&&In(ce.tagNameCheck,q)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(q))&&(ce.attributeNameCheck instanceof RegExp&&In(ce.attributeNameCheck,Ie)||ce.attributeNameCheck instanceof Function&&ce.attributeNameCheck(Ie,q))||Ie==="is"&&ce.allowCustomizedBuiltInElements&&(ce.tagNameCheck instanceof RegExp&&In(ce.tagNameCheck,He)||ce.tagNameCheck instanceof Function&&ce.tagNameCheck(He))))return!1}else if(!ae[Ie]){if(!In(j,zl(He,be,""))){if(!((Ie==="src"||Ie==="xlink:href"||Ie==="href")&&q!=="script"&&a_(He,"data:")===0&&N[q])){if(!(bt&&!In(ie,zl(He,be,"")))){if(He)return!1}}}}}}}return!0},Qe=function(q){return q!=="annotation-xml"&&sf(q,se)},We=function(q){Da(K.beforeSanitizeAttributes,q,null);const{attributes:Ie}=q;if(!Ie||_a(q))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let rt=Ie.length;for(;rt--;){const ia=Ie[rt],{name:$t,namespaceURI:da,value:Fa}=ia,wa=kt($t),Si=Fa;let ca=$t==="value"?Si:n_(Si);if(He.attrName=wa,He.attrValue=ca,He.keepAttr=!0,He.forceKeepAttr=void 0,Da(K.uponSanitizeAttribute,q,He),ca=He.attrValue,at&&(wa==="id"||wa==="name")&&(fa($t,q),ca=wt+ca),Ke&&In(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ca)){fa($t,q);continue}if(wa==="attributename"&&sf(ca,"href")){fa($t,q);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){fa($t,q);continue}if(!gt&&In(/\/>/i,ca)){fa($t,q);continue}it&&Zc([te,ee,Y],zi=>{ca=zl(ca,zi," ")});const On=kt(q.nodeName);if(!Oe(On,wa,ca)){fa($t,q);continue}if(F&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!da)switch(w.getAttributeType(On,wa)){case"TrustedHTML":{ca=F.createHTML(ca);break}case"TrustedScriptURL":{ca=F.createScriptURL(ca);break}}if(ca!==Si)try{da?q.setAttributeNS(da,$t,ca):q.setAttribute($t,ca),_a(q)?ga(q):xb(e.removed)}catch{fa($t,q)}}Da(K.afterSanitizeAttributes,q,null)},ot=function Me(q){let Ie=null;const He=$a(q);for(Da(K.beforeSanitizeShadowDOM,q,null);Ie=He.nextNode();)Da(K.uponSanitizeShadowNode,Ie,null),de(Ie),We(Ie),Ie.content instanceof l&&Me(Ie.content);Da(K.afterSanitizeShadowDOM,q,null)};return e.sanitize=function(Me){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ie=null,He=null,rt=null,ia=null;if(It=!Me,It&&(Me="<!-->"),typeof Me!="string"&&!pa(Me))if(typeof Me.toString=="function"){if(Me=Me.toString(),typeof Me!="string")throw Ql("dirty is not a string, aborting")}else throw Ql("toString is not a function");if(!e.isSupported)return Me;if(Se||jt(q),e.removed=[],typeof Me=="string"&&(Tt=!1),Tt){if(Me.nodeName){const Fa=kt(Me.nodeName);if(!W[Fa]||Ee[Fa])throw Ql("root node is forbidden and cannot be sanitized in-place")}}else if(Me instanceof m)Ie=Xa("<!---->"),He=Ie.ownerDocument.importNode(Me,!0),He.nodeType===Gl.element&&He.nodeName==="BODY"||He.nodeName==="HTML"?Ie=He:Ie.appendChild(He);else{if(!fe&&!it&&!Pt&&Me.indexOf("<")===-1)return F&&ze?F.createHTML(Me):Me;if(Ie=Xa(Me),!Ie)return fe?null:ze?B:""}Ie&&Fe&&ga(Ie.firstChild);const $t=$a(Tt?Me:Ie);for(;rt=$t.nextNode();)de(rt),We(rt),rt.content instanceof l&&ot(rt.content);if(Tt)return Me;if(fe){if(Re)for(ia=_.call(Ie.ownerDocument);Ie.firstChild;)ia.appendChild(Ie.firstChild);else ia=Ie;return(ne.shadowroot||ne.shadowrootmode)&&(ia=Q.call(r,ia,!0)),ia}let da=Pt?Ie.outerHTML:Ie.innerHTML;return Pt&&W["!doctype"]&&Ie.ownerDocument&&Ie.ownerDocument.doctype&&Ie.ownerDocument.doctype.name&&In(ek,Ie.ownerDocument.doctype.name)&&(da="<!DOCTYPE "+Ie.ownerDocument.doctype.name+`>
`+da),it&&Zc([te,ee,Y],Fa=>{da=zl(da,Fa," ")}),F&&ze?F.createHTML(da):da},e.setConfig=function(){let Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};jt(Me),Se=!0},e.clearConfig=function(){Lt=null,Se=!1},e.isValidAttribute=function(Me,q,Ie){Lt||jt({});const He=kt(Me),rt=kt(q);return Oe(He,rt,Ie)},e.addHook=function(Me,q){typeof q=="function"&&Vl(K[Me],q)},e.removeHook=function(Me,q){if(q!==void 0){const Ie=e_(K[Me],q);return Ie===-1?void 0:t_(K[Me],Ie,1)[0]}return xb(K[Me])},e.removeHooks=function(Me){K[Me]=[]},e.removeAllHooks=function(){K=Bb()},e}var y_=tk();const E_={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 b_{sanitizeHtmlForEmailViewing(e){if(!e||e.trim()==="")return e;try{return y_.sanitize(e,E_)}catch(n){return console.error(`Error in sanitizeHtmlForEmailViewing: ${n instanceof Error?n.message:String(n)}`),""}}sanitizeAndPrepareEmailHtml(e){if(!e||e.trim()==="")return e;const n=this.sanitizeHtmlForEmailViewing(e);return this.convertAnchorTagsToOpenInNewTab(n)}convertAnchorTagsToOpenInNewTab(e){try{const r=new DOMParser().parseFromString(e,"text/html"),s=r.querySelectorAll("a[href]");return s.length>0&&s.forEach(l=>{if((!l.hasAttribute("target")||l.getAttribute("target")!=="_blank")&&l.setAttribute("target","_blank"),!l.hasAttribute("rel"))l.setAttribute("rel","noopener noreferrer");else{const c=l.getAttribute("rel")??"",m=new Set(c.split(" ").filter(h=>h.trim()!==""));m.add("noopener"),m.add("noreferrer"),l.setAttribute("rel",Array.from(m).join(" "))}}),r.documentElement.outerHTML}catch(n){return console.error(`Error in convertAnchorTagsToOpenInNewTab: ${n instanceof Error?n.message:String(n)}`),e}}normalizeUsername(e){return e.toLowerCase().trim()}}const v_=new b_,Td=(t=!1,e=300)=>{const[n,r]=b.useState(t),s=b.useRef(null),l=b.useRef(null),c=b.useCallback(m=>{if(m)r(!0),l.current=Date.now();else{const h=l.current?Date.now()-l.current:0,g=Math.max(0,e-h);g===0?r(!1):(s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{r(!1)},g))}},[e]);return b.useEffect(()=>{t&&(r(!0),l.current=Date.now())},[t,r]),b.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]),[n,c]},w_=()=>{const{t}=tt(),{id:e}=Vu(),n=Va(),r=ta(),s=Vi(),[l,c]=b.useState(null),[m,h]=b.useState(null),[g,A]=Td(!0,150),[p,v]=b.useState(!1),[w,T]=b.useState(!1),{setIsInitialLoading:S}=va(),{setHeaderButtons:k}=Ii(),[L,U]=b.useState(!1);b.useEffect(()=>{Ba.isPopup()&&(window.history.replaceState({},"","popup.html#/emails"),window.history.pushState({},"",`popup.html#/emails/${e}`)),(async()=>{try{if(A(!0),c(null),!(r!=null&&r.sqliteClient)||!e)return;if(r.isOffline){c(t("emails.offlineMessage")),A(!1),S(!1);return}const O=await s.get(`Email/${e}`),_=r.sqliteClient.settings.getAllEncryptionKeys(),z=await Zt.decryptEmail(O,_);h(z)}catch(O){c(O instanceof Error?O.message:"An error occurred")}finally{A(!1),S(!1)}})()},[e,r==null?void 0:r.sqliteClient,r.isOffline,t,s,A,S]);const x=b.useCallback(async()=>{try{await s.delete(`Email/${e}`),Ba.isPopup()?window.close():n("/emails")}catch(V){c(V instanceof Error?V.message:"Failed to delete email")}},[e,s,n]),F=b.useCallback(()=>{Ba.openInNewPopup(`/emails/${e}`)},[e]),B=async V=>{try{const O=await s.downloadBlob(`Email/${e}/attachments/${V.id}`);if(!(r!=null&&r.sqliteClient)||!m){c("Database context or email not available");return}const _=r.sqliteClient.settings.getAllEncryptionKeys(),z=await Zt.decryptAttachment(O,m,_);if(!z){c("Failed to decrypt attachment");return}const Q=new Blob([new Uint8Array(z)],{type:V.mimeType??"application/octet-stream"}),K=window.URL.createObjectURL(Q),te=document.createElement("a");te.href=K,te.download=V.filename,document.body.appendChild(te),te.click(),window.URL.revokeObjectURL(K),document.body.removeChild(te)}catch(O){console.error("handleDownloadAttachment error",O),c(O instanceof Error?O.message:"Failed to download attachment")}};return b.useEffect(()=>{if(!L){const V=d.jsxs("div",{className:"flex items-center gap-2",children:[!Ba.isPopup()&&d.jsx(_n,{onClick:F,title:t("common.openInNewWindow"),iconType:qa.EXPAND}),d.jsx(_n,{onClick:()=>v(!0),title:t("emails.deleteEmailTitle"),iconType:qa.DELETE,variant:"danger"})]});k(V),U(!0)}return()=>{}},[k,L,F,t]),b.useEffect(()=>()=>k(null),[k]),g?d.jsx("div",{className:"flex justify-center items-center p-8",children:d.jsx(mi,{})}):l?d.jsxs("div",{className:"text-red-500",children:[t("common.error")," ",l]}):m?d.jsxs("div",{className:"max-w-4xl mx-auto",children:[d.jsx(xu,{isOpen:p,onClose:()=>v(!1),onConfirm:()=>{v(!1),x()},title:t("emails.deleteEmailTitle"),message:t("emails.deleteEmailConfirm"),confirmText:t("common.delete"),cancelText:t("common.cancel"),variant:"danger"}),d.jsxs("div",{children:[d.jsxs("div",{children:[d.jsx("div",{className:"flex justify-between items-start",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:m.subject}),d.jsx("button",{onClick:()=>T(!w),className:"p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors",title:t(w?"common.hideDetails":"common.showDetails"),children:d.jsx("svg",{className:`w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform ${w?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]})}),w&&d.jsxs("div",{className:"space-y-1 text-sm text-gray-600 dark:text-gray-400 mt-2",children:[d.jsxs("p",{children:[d.jsx("span",{className:"font-bold",children:t("emails.from")})," ",d.jsx("span",{title:m.fromLocal+"@"+m.fromDomain,children:m.fromDisplay})]}),d.jsxs("p",{children:[d.jsx("span",{className:"font-bold",children:t("emails.to")})," ",d.jsxs("span",{title:m.toLocal+"@"+m.toDomain,children:[m.toLocal,"@",m.toDomain]})]}),d.jsxs("p",{children:[d.jsx("span",{className:"font-bold",children:t("emails.date")})," ",new Date(m.dateSystem).toLocaleString()]})]})]}),d.jsx("div",{className:"bg-white mt-4",children:m.messageHtml?d.jsx("iframe",{srcDoc:v_.sanitizeAndPrepareEmailHtml(m.messageHtml),className:"w-full min-h-[500px] border-0",title:t("emails.emailContent"),sandbox:"allow-popups allow-popups-to-escape-sandbox"}):d.jsx("pre",{className:"whitespace-pre-wrap text-gray-800 p-3",children:m.messagePlain})}),m.attachments&&m.attachments.length>0&&d.jsxs("div",{className:"p-6 border-t border-gray-200 dark:border-gray-700",children:[d.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:t("common.attachments")}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:m.attachments.map(V=>d.jsxs("button",{onClick:()=>B(V),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:[d.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),d.jsxs("span",{children:[V.filename," (",Math.ceil(V.filesize/1024)," KB)"]})]},V.id))})]})]})]}):d.jsx("div",{className:"text-gray-500",children:t("emails.emailNotFound")})},Qf=({onClick:t})=>d.jsxs("div",{className:"px-2 items-center",children:[d.jsxs("div",{className:"relative inline-flex items-center",children:[d.jsx("button",{id:"reload-vault",onClick:t,className:"absolute p-2 hover:bg-gray-200 rounded-2xl",children:d.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:d.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"})})}),d.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:[d.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"}),d.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"})]})]}),d.jsx("span",{className:"sr-only",children:"Loading..."})]}),I_=()=>{const{t}=tt(),e=ta(),n=Vi(),{setHeaderButtons:r}=Ii(),[s,l]=b.useState(null),[c,m]=b.useState([]),{setIsInitialLoading:h}=va(),[g,A]=Td(!0,100),p=b.useCallback(async()=>{try{if(A(!0),l(null),!(e!=null&&e.sqliteClient))return;if(e.isOffline){A(!1),h(!1);return}const w=e.sqliteClient.items.getAllEmailAddresses();try{const T=await n.post("EmailBox/bulk",{addresses:w,page:1,pageSize:50}),S=e.sqliteClient.settings.getAllEncryptionKeys(),k=await Zt.decryptEmailList(T.mails,S);m(k)}catch(T){throw console.error(T),new Error(t("common.errors.unknownError"))}}catch(w){l(w instanceof Error?w.message:t("common.errors.unknownError"))}finally{A(!1),h(!1)}},[e==null?void 0:e.sqliteClient,e.isOffline,n,A,h,t]);b.useEffect(()=>{p()},[p]),b.useEffect(()=>{const w=Ba.isPopup()?null:d.jsx(_n,{onClick:()=>Ba.openInNewPopup(),title:t("common.openInNewWindow"),iconType:qa.EXPAND});return r(w),()=>{r(null)}},[r,t]);const v=w=>{const T=new Date,S=new Date(w),k=Math.floor((T.getTime()-S.getTime())/1e3);if(k<60)return t("emails.dateFormat.justNow");if(k<3600){const L=Math.floor(k/60);return L===1?t("emails.dateFormat.minutesAgo_single",{count:L}):t("emails.dateFormat.minutesAgo_plural",{count:L})}else if(k<86400){const L=Math.floor(k/3600);return L===1?t("emails.dateFormat.hoursAgo_single",{count:L}):t("emails.dateFormat.hoursAgo_plural",{count:L})}else return k<172800?t("emails.dateFormat.yesterday"):S.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit"})};return g?d.jsx("div",{className:"flex justify-center items-center p-8",children:d.jsx(mi,{})}):s?d.jsxs("div",{className:"text-red-500",children:[t("common.error"),": ",s]}):e.isOffline?d.jsxs("div",{children:[d.jsx("div",{className:"flex justify-between items-center mb-4",children:d.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("emails.title")})}),d.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:d.jsx("p",{className:"text-sm",children:t("emails.offlineMessage")})})]}):c.length===0?d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("emails.title")}),d.jsx(Qf,{onClick:p})]}),d.jsx("div",{className:"text-gray-500 dark:text-gray-400 space-y-2",children:d.jsx("p",{className:"text-sm",children:t("emails.noEmailsDescription")})})]}):d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("emails.title")}),d.jsx(Qf,{onClick:p})]}),d.jsx("div",{className:"space-y-2",children:c.map(w=>d.jsxs(Qu,{to:`/emails/${w.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:[d.jsxs("div",{className:"flex justify-between items-start mb-2",children:[d.jsx("div",{className:"text-gray-900 dark:text-white mb-1 font-bold",children:w.subject}),d.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:v(w.dateSystem)})]}),d.jsx("div",{className:"text-gray-600 text-sm dark:text-gray-300 line-clamp-2",children:w.messagePreview})]},w.id))})]})},C_=()=>{const{isFullyInitialized:t}=vM();return t?d.jsx($R,{to:"/reinitialize",replace:!0}):null},S_=()=>d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),N_=()=>d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),T_=()=>d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),Lu=()=>d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),k_=t=>{switch(t){case mt.Notes:return d.jsx(S_,{});default:return d.jsx(Lu,{})}},x_=t=>{switch(t){case"2fa":return d.jsx(N_,{});case"attachments":return d.jsx(T_,{});default:return d.jsx(Lu,{})}},L_=({optionalSystemFields:t,visibleFieldKeys:e,optionalSections:n,callbacks:r})=>{const{t:s}=tt(),[l,c]=b.useState(!1),[m,h]=b.useState(!1),[g,A]=b.useState(""),[p,v]=b.useState("Text"),w=b.useCallback(()=>{h(!0),c(!1)},[]),T=b.useCallback(()=>{g.trim()&&(r.onAddCustomField(g,p),A(""),v("Text"),h(!1))},[g,p,r]),S=b.useCallback(()=>{A(""),v("Text"),h(!1)},[]),k=b.useCallback(x=>{r.onAddSystemField(x),c(!1)},[r]),L=b.useCallback(x=>{x(),c(!1)},[]),U=b.useMemo(()=>{const x=[];return t.forEach(F=>{e.has(F.FieldKey)||x.push({key:F.FieldKey,label:s(`fieldLabels.${F.FieldKey}`,{defaultValue:F.FieldKey}),icon:k_(F.Category),action:()=>k(F.FieldKey)})}),n.forEach(F=>{F.isVisible||x.push({key:F.key,label:s(`common.${F.key==="2fa"?"twoFactorAuthentication":F.key}`),icon:x_(F.key),action:()=>L(F.onAdd)})}),x},[t,e,n,s,k,L]);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"relative",children:[d.jsx("button",{type:"button",id:"add-field-menu",onClick:()=>c(!l),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:d.jsx(Lu,{})}),l&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50",onClick:()=>c(!1)}),d.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:[U.map(x=>d.jsxs("button",{type:"button",onClick:x.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:[d.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:x.icon}),d.jsx("span",{children:x.label})]},x.key)),d.jsxs("button",{type:"button",onClick:w,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:[d.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:d.jsx(Lu,{})}),d.jsx("span",{children:s("itemTypes.addCustomField")})]})]})]})]}),d.jsx(Zn,{isOpen:m,onClose:S,title:s("itemTypes.addCustomField"),footer:d.jsxs("div",{className:"flex gap-3",children:[d.jsx("button",{type:"button",onClick:T,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")}),d.jsx("button",{type:"button",onClick:S,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:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldLabel")}),d.jsx("input",{type:"text",value:g,onChange:x=>A(x.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})]}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:s("itemTypes.fieldType")}),d.jsxs("select",{value:p,onChange:x=>v(x.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:[d.jsx("option",{value:"Text",children:s("itemTypes.fieldTypes.text")}),d.jsx("option",{value:"Hidden",children:s("itemTypes.fieldTypes.hidden")}),d.jsx("option",{value:"Email",children:s("itemTypes.fieldTypes.email")}),d.jsx("option",{value:"URL",children:s("itemTypes.fieldTypes.url")}),d.jsx("option",{value:"Phone",children:s("itemTypes.fieldTypes.phone")}),d.jsx("option",{value:"Number",children:s("itemTypes.fieldTypes.number")}),d.jsx("option",{value:"Date",children:s("itemTypes.fieldTypes.date")}),d.jsx("option",{value:"TextArea",children:s("itemTypes.fieldTypes.textArea")})]})]})]})})]})};function D_(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.useMemo(()=>r=>{e.forEach(s=>s(r))},e)}const Gu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function _o(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function kp(t){return"nodeType"in t}function Fn(t){var e,n;return t?_o(t)?t:kp(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function xp(t){const{Document:e}=Fn(t);return t instanceof e}function kd(t){return _o(t)?!1:t instanceof Fn(t).HTMLElement}function ak(t){return t instanceof Fn(t).SVGElement}function Fo(t){return t?_o(t)?t.document:kp(t)?xp(t)?t:kd(t)||ak(t)?t.ownerDocument:document:document:document}const Hi=Gu?b.useLayoutEffect:b.useEffect;function Lp(t){const e=b.useRef(t);return Hi(()=>{e.current=t}),b.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function R_(){const t=b.useRef(null),e=b.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=b.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function Ad(t,e){e===void 0&&(e=[t]);const n=b.useRef(t);return Hi(()=>{n.current!==t&&(n.current=t)},e),n}function xd(t,e){const n=b.useRef();return b.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Du(t){const e=Lp(t),n=b.useRef(null),r=b.useCallback(s=>{s!==n.current&&(e==null||e(s,n.current)),n.current=s},[]);return[n,r]}function Kf(t){const e=b.useRef();return b.useEffect(()=>{e.current=t},[t]),e.current}let uf={};function Ld(t,e){return b.useMemo(()=>{if(e)return e;const n=uf[t]==null?0:uf[t]+1;return uf[t]=n,t+"-"+n},[t,e])}function nk(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((l,c)=>{const m=Object.entries(c);for(const[h,g]of m){const A=l[h];A!=null&&(l[h]=A+t*g)}return l},{...e})}}const xo=nk(1),yd=nk(-1);function U_(t){return"clientX"in t&&"clientY"in t}function Dp(t){if(!t)return!1;const{KeyboardEvent:e}=Fn(t.target);return e&&t instanceof e}function M_(t){if(!t)return!1;const{TouchEvent:e}=Fn(t.target);return e&&t instanceof e}function Gf(t){if(M_(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return U_(t)?{x:t.clientX,y:t.clientY}:null}const Ed=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[Ed.Translate.toString(t),Ed.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),_b="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function B_(t){return t.matches(_b)?t:t.querySelector(_b)}const __={display:"none"};function F_(t){let{id:e,value:n}=t;return rn.createElement("div",{id:e,style:__},n)}function O_(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return rn.createElement("div",{id:e,style:s,role:"status","aria-live":r,"aria-atomic":!0},n)}function P_(){const[t,e]=b.useState("");return{announce:b.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const ik=b.createContext(null);function j_(t){const e=b.useContext(ik);b.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function H_(){const[t]=b.useState(()=>new Set),e=b.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[b.useCallback(r=>{let{type:s,event:l}=r;t.forEach(c=>{var m;return(m=c[s])==null?void 0:m.call(c,l)})},[t]),e]}const V_={draggable:`
    To pick up a draggable item, press the space bar.
    While dragging, use the arrow keys to move the item.
    Press space again to drop the item in its new position, or press escape to cancel.
  `},z_={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function Q_(t){let{announcements:e=z_,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=V_}=t;const{announce:l,announcement:c}=P_(),m=Ld("DndLiveRegion"),[h,g]=b.useState(!1);if(b.useEffect(()=>{g(!0)},[]),j_(b.useMemo(()=>({onDragStart(p){let{active:v}=p;l(e.onDragStart({active:v}))},onDragMove(p){let{active:v,over:w}=p;e.onDragMove&&l(e.onDragMove({active:v,over:w}))},onDragOver(p){let{active:v,over:w}=p;l(e.onDragOver({active:v,over:w}))},onDragEnd(p){let{active:v,over:w}=p;l(e.onDragEnd({active:v,over:w}))},onDragCancel(p){let{active:v,over:w}=p;l(e.onDragCancel({active:v,over:w}))}}),[l,e])),!h)return null;const A=rn.createElement(rn.Fragment,null,rn.createElement(F_,{id:r,value:s.draggable}),rn.createElement(O_,{id:m,announcement:c}));return n?Co.createPortal(A,n):A}var Wa;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Wa||(Wa={}));function Ru(){}function Fb(t,e){return b.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function K_(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return b.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const bi=Object.freeze({x:0,y:0});function rk(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function sk(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function G_(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function Ob(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function ok(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Pb(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const W_=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=Pb(e,e.left,e.top),l=[];for(const c of r){const{id:m}=c,h=n.get(m);if(h){const g=rk(Pb(h),s);l.push({id:m,data:{droppableContainer:c,value:g}})}}return l.sort(sk)},q_=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=Ob(e),l=[];for(const c of r){const{id:m}=c,h=n.get(m);if(h){const g=Ob(h),A=s.reduce((v,w,T)=>v+rk(g[T],w),0),p=Number((A/4).toFixed(4));l.push({id:m,data:{droppableContainer:c,value:p}})}}return l.sort(sk)};function Y_(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),l=Math.min(e.top+e.height,t.top+t.height),c=s-r,m=l-n;if(r<s&&n<l){const h=e.width*e.height,g=t.width*t.height,A=c*m,p=A/(h+g-A);return Number(p.toFixed(4))}return 0}const J_=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const l of r){const{id:c}=l,m=n.get(c);if(m){const h=Y_(m,e);h>0&&s.push({id:c,data:{droppableContainer:l,value:h}})}}return s.sort(G_)};function X_(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function lk(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:bi}function $_(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),l=1;l<r;l++)s[l-1]=arguments[l];return s.reduce((c,m)=>({...c,top:c.top+t*m.y,bottom:c.bottom+t*m.y,left:c.left+t*m.x,right:c.right+t*m.x}),{...n})}}const Z_=$_(1);function eF(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function tF(t,e,n){const r=eF(e);if(!r)return t;const{scaleX:s,scaleY:l,x:c,y:m}=r,h=t.left-c-(1-s)*parseFloat(n),g=t.top-m-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),A=s?t.width/s:t.width,p=l?t.height/l:t.height;return{width:A,height:p,top:g,right:h+A,bottom:g+p,left:h}}const aF={ignoreTransform:!1};function Oo(t,e){e===void 0&&(e=aF);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:g,transformOrigin:A}=Fn(t).getComputedStyle(t);g&&(n=tF(n,g,A))}const{top:r,left:s,width:l,height:c,bottom:m,right:h}=n;return{top:r,left:s,width:l,height:c,bottom:m,right:h}}function jb(t){return Oo(t,{ignoreTransform:!0})}function nF(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function iF(t,e){return e===void 0&&(e=Fn(t).getComputedStyle(t)),e.position==="fixed"}function rF(t,e){e===void 0&&(e=Fn(t).getComputedStyle(t));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(s=>{const l=e[s];return typeof l=="string"?n.test(l):!1})}function Wu(t,e){const n=[];function r(s){if(e!=null&&n.length>=e||!s)return n;if(xp(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!kd(s)||ak(s)||n.includes(s))return n;const l=Fn(t).getComputedStyle(s);return s!==t&&rF(s,l)&&n.push(s),iF(s,l)?n:r(s.parentNode)}return t?r(t):n}function dk(t){const[e]=Wu(t,1);return e??null}function mf(t){return!Gu||!t?null:_o(t)?t:kp(t)?xp(t)||t===Fo(t).scrollingElement?window:kd(t)?t:null:null}function ck(t){return _o(t)?t.scrollX:t.scrollLeft}function uk(t){return _o(t)?t.scrollY:t.scrollTop}function Wf(t){return{x:ck(t),y:uk(t)}}var nn;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(nn||(nn={}));function mk(t){return!Gu||!t?!1:t===document.scrollingElement}function gk(t){const e={x:0,y:0},n=mk(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},r={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=e.y,l=t.scrollLeft<=e.x,c=t.scrollTop>=r.y,m=t.scrollLeft>=r.x;return{isTop:s,isLeft:l,isBottom:c,isRight:m,maxScroll:r,minScroll:e}}const sF={x:.2,y:.2};function oF(t,e,n,r,s){let{top:l,left:c,right:m,bottom:h}=n;r===void 0&&(r=10),s===void 0&&(s=sF);const{isTop:g,isBottom:A,isLeft:p,isRight:v}=gk(t),w={x:0,y:0},T={x:0,y:0},S={height:e.height*s.y,width:e.width*s.x};return!g&&l<=e.top+S.height?(w.y=nn.Backward,T.y=r*Math.abs((e.top+S.height-l)/S.height)):!A&&h>=e.bottom-S.height&&(w.y=nn.Forward,T.y=r*Math.abs((e.bottom-S.height-h)/S.height)),!v&&m>=e.right-S.width?(w.x=nn.Forward,T.x=r*Math.abs((e.right-S.width-m)/S.width)):!p&&c<=e.left+S.width&&(w.x=nn.Backward,T.x=r*Math.abs((e.left+S.width-c)/S.width)),{direction:w,speed:T}}function lF(t){if(t===document.scrollingElement){const{innerWidth:l,innerHeight:c}=window;return{top:0,left:0,right:l,bottom:c,width:l,height:c}}const{top:e,left:n,right:r,bottom:s}=t.getBoundingClientRect();return{top:e,left:n,right:r,bottom:s,width:t.clientWidth,height:t.clientHeight}}function hk(t){return t.reduce((e,n)=>xo(e,Wf(n)),bi)}function dF(t){return t.reduce((e,n)=>e+ck(n),0)}function cF(t){return t.reduce((e,n)=>e+uk(n),0)}function uF(t,e){if(e===void 0&&(e=Oo),!t)return;const{top:n,left:r,bottom:s,right:l}=e(t);dk(t)&&(s<=0||l<=0||n>=window.innerHeight||r>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const mF=[["x",["left","right"],dF],["y",["top","bottom"],cF]];class Rp{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Wu(n),s=hk(r);this.rect={...e},this.width=e.width,this.height=e.height;for(const[l,c,m]of mF)for(const h of c)Object.defineProperty(this,h,{get:()=>{const g=m(r),A=s[l]-g;return this.rect[h]+A},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dd{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=e}add(e,n,r){var s;(s=this.target)==null||s.addEventListener(e,n,r),this.listeners.push([e,n,r])}}function gF(t){const{EventTarget:e}=Fn(t);return t instanceof e?t:Fo(t)}function gf(t,e){const n=Math.abs(t.x),r=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+r**2)>e:"x"in e&&"y"in e?n>e.x&&r>e.y:"x"in e?n>e.x:"y"in e?r>e.y:!1}var ui;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(ui||(ui={}));function Hb(t){t.preventDefault()}function hF(t){t.stopPropagation()}var zt;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(zt||(zt={}));const fk={start:[zt.Space,zt.Enter],cancel:[zt.Esc],end:[zt.Space,zt.Enter,zt.Tab]},fF=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case zt.Right:return{...n,x:n.x+25};case zt.Left:return{...n,x:n.x-25};case zt.Down:return{...n,y:n.y+25};case zt.Up:return{...n,y:n.y-25}}};class Up{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new dd(Fo(n)),this.windowListeners=new dd(Fn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ui.Resize,this.handleCancel),this.windowListeners.add(ui.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ui.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,r=e.node.current;r&&uF(r),n(bi)}handleKeyDown(e){if(Dp(e)){const{active:n,context:r,options:s}=this.props,{keyboardCodes:l=fk,coordinateGetter:c=fF,scrollBehavior:m="smooth"}=s,{code:h}=e;if(l.end.includes(h)){this.handleEnd(e);return}if(l.cancel.includes(h)){this.handleCancel(e);return}const{collisionRect:g}=r.current,A=g?{x:g.left,y:g.top}:bi;this.referenceCoordinates||(this.referenceCoordinates=A);const p=c(e,{active:n,context:r.current,currentCoordinates:A});if(p){const v=yd(p,A),w={x:0,y:0},{scrollableAncestors:T}=r.current;for(const S of T){const k=e.code,{isTop:L,isRight:U,isLeft:x,isBottom:F,maxScroll:B,minScroll:V}=gk(S),O=lF(S),_={x:Math.min(k===zt.Right?O.right-O.width/2:O.right,Math.max(k===zt.Right?O.left:O.left+O.width/2,p.x)),y:Math.min(k===zt.Down?O.bottom-O.height/2:O.bottom,Math.max(k===zt.Down?O.top:O.top+O.height/2,p.y))},z=k===zt.Right&&!U||k===zt.Left&&!x,Q=k===zt.Down&&!F||k===zt.Up&&!L;if(z&&_.x!==p.x){const K=S.scrollLeft+v.x,te=k===zt.Right&&K<=B.x||k===zt.Left&&K>=V.x;if(te&&!v.y){S.scrollTo({left:K,behavior:m});return}te?w.x=S.scrollLeft-K:w.x=k===zt.Right?S.scrollLeft-B.x:S.scrollLeft-V.x,w.x&&S.scrollBy({left:-w.x,behavior:m});break}else if(Q&&_.y!==p.y){const K=S.scrollTop+v.y,te=k===zt.Down&&K<=B.y||k===zt.Up&&K>=V.y;if(te&&!v.x){S.scrollTo({top:K,behavior:m});return}te?w.y=S.scrollTop-K:w.y=k===zt.Down?S.scrollTop-B.y:S.scrollTop-V.y,w.y&&S.scrollBy({top:-w.y,behavior:m});break}}this.handleMove(e,xo(yd(p,this.referenceCoordinates),w))}}}handleMove(e,n){const{onMove:r}=this.props;e.preventDefault(),r(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Up.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:r=fk,onActivation:s}=e,{active:l}=n;const{code:c}=t.nativeEvent;if(r.start.includes(c)){const m=l.activatorNode.current;return m&&t.target!==m?!1:(t.preventDefault(),s==null||s({event:t.nativeEvent}),!0)}return!1}}];function Vb(t){return!!(t&&"distance"in t)}function zb(t){return!!(t&&"delay"in t)}class Mp{constructor(e,n,r){var s;r===void 0&&(r=gF(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:l}=e,{target:c}=l;this.props=e,this.events=n,this.document=Fo(c),this.documentListeners=new dd(this.document),this.listeners=new dd(r),this.windowListeners=new dd(Fn(c)),this.initialCoordinates=(s=Gf(l))!=null?s:bi,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ui.Resize,this.handleCancel),this.windowListeners.add(ui.DragStart,Hb),this.windowListeners.add(ui.VisibilityChange,this.handleCancel),this.windowListeners.add(ui.ContextMenu,Hb),this.documentListeners.add(ui.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(zb(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Vb(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:r,onPending:s}=this.props;s(r,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(ui.Click,hF,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ui.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:r,initialCoordinates:s,props:l}=this,{onMove:c,options:{activationConstraint:m}}=l;if(!s)return;const h=(n=Gf(e))!=null?n:bi,g=yd(s,h);if(!r&&m){if(Vb(m)){if(m.tolerance!=null&&gf(g,m.tolerance))return this.handleCancel();if(gf(g,m.distance))return this.handleStart()}if(zb(m)&&gf(g,m.tolerance))return this.handleCancel();this.handlePending(m,g);return}e.cancelable&&e.preventDefault(),c(h)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===zt.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const pF={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Bp extends Mp{constructor(e){const{event:n}=e,r=Fo(n.target);super(e,pF,r)}}Bp.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const AF={move:{name:"mousemove"},end:{name:"mouseup"}};var qf;(function(t){t[t.RightClick=2]="RightClick"})(qf||(qf={}));class yF extends Mp{constructor(e){super(e,AF,Fo(e.event.target))}}yF.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;return n.button===qf.RightClick?!1:(r==null||r({event:n}),!0)}}];const hf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class EF extends Mp{constructor(e){super(e,hf)}static setup(){return window.addEventListener(hf.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(hf.move.name,e)};function e(){}}}EF.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:r}=e;const{touches:s}=n;return s.length>1?!1:(r==null||r({event:n}),!0)}}];var cd;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(cd||(cd={}));var Uu;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Uu||(Uu={}));function bF(t){let{acceleration:e,activator:n=cd.Pointer,canScroll:r,draggingRect:s,enabled:l,interval:c=5,order:m=Uu.TreeOrder,pointerCoordinates:h,scrollableAncestors:g,scrollableAncestorRects:A,delta:p,threshold:v}=t;const w=wF({delta:p,disabled:!l}),[T,S]=R_(),k=b.useRef({x:0,y:0}),L=b.useRef({x:0,y:0}),U=b.useMemo(()=>{switch(n){case cd.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case cd.DraggableRect:return s}},[n,s,h]),x=b.useRef(null),F=b.useCallback(()=>{const V=x.current;if(!V)return;const O=k.current.x*L.current.x,_=k.current.y*L.current.y;V.scrollBy(O,_)},[]),B=b.useMemo(()=>m===Uu.TreeOrder?[...g].reverse():g,[m,g]);b.useEffect(()=>{if(!l||!g.length||!U){S();return}for(const V of B){if((r==null?void 0:r(V))===!1)continue;const O=g.indexOf(V),_=A[O];if(!_)continue;const{direction:z,speed:Q}=oF(V,_,U,e,v);for(const K of["x","y"])w[K][z[K]]||(Q[K]=0,z[K]=0);if(Q.x>0||Q.y>0){S(),x.current=V,T(F,c),k.current=Q,L.current=z;return}}k.current={x:0,y:0},L.current={x:0,y:0},S()},[e,F,r,S,l,c,JSON.stringify(U),JSON.stringify(w),T,g,B,A,JSON.stringify(v)])}const vF={x:{[nn.Backward]:!1,[nn.Forward]:!1},y:{[nn.Backward]:!1,[nn.Forward]:!1}};function wF(t){let{delta:e,disabled:n}=t;const r=Kf(e);return xd(s=>{if(n||!r||!s)return vF;const l={x:Math.sign(e.x-r.x),y:Math.sign(e.y-r.y)};return{x:{[nn.Backward]:s.x[nn.Backward]||l.x===-1,[nn.Forward]:s.x[nn.Forward]||l.x===1},y:{[nn.Backward]:s.y[nn.Backward]||l.y===-1,[nn.Forward]:s.y[nn.Forward]||l.y===1}}},[n,e,r])}function IF(t,e){const n=e!=null?t.get(e):void 0,r=n?n.node.current:null;return xd(s=>{var l;return e==null?null:(l=r??s)!=null?l:null},[r,e])}function CF(t,e){return b.useMemo(()=>t.reduce((n,r)=>{const{sensor:s}=r,l=s.activators.map(c=>({eventName:c.eventName,handler:e(c.handler,r)}));return[...n,...l]},[]),[t,e])}var bd;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(bd||(bd={}));var Yf;(function(t){t.Optimized="optimized"})(Yf||(Yf={}));const Qb=new Map;function SF(t,e){let{dragging:n,dependencies:r,config:s}=e;const[l,c]=b.useState(null),{frequency:m,measure:h,strategy:g}=s,A=b.useRef(t),p=k(),v=Ad(p),w=b.useCallback(function(L){L===void 0&&(L=[]),!v.current&&c(U=>U===null?L:U.concat(L.filter(x=>!U.includes(x))))},[v]),T=b.useRef(null),S=xd(L=>{if(p&&!n)return Qb;if(!L||L===Qb||A.current!==t||l!=null){const U=new Map;for(let x of t){if(!x)continue;if(l&&l.length>0&&!l.includes(x.id)&&x.rect.current){U.set(x.id,x.rect.current);continue}const F=x.node.current,B=F?new Rp(h(F),F):null;x.rect.current=B,B&&U.set(x.id,B)}return U}return L},[t,l,n,p,h]);return b.useEffect(()=>{A.current=t},[t]),b.useEffect(()=>{p||w()},[n,p]),b.useEffect(()=>{l&&l.length>0&&c(null)},[JSON.stringify(l)]),b.useEffect(()=>{p||typeof m!="number"||T.current!==null||(T.current=setTimeout(()=>{w(),T.current=null},m))},[m,p,w,...r]),{droppableRects:S,measureDroppableContainers:w,measuringScheduled:l!=null};function k(){switch(g){case bd.Always:return!1;case bd.BeforeDragging:return n;default:return!n}}}function pk(t,e){return xd(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function NF(t,e){return pk(t,e)}function TF(t){let{callback:e,disabled:n}=t;const r=Lp(e),s=b.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(r)},[r,n]);return b.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function qu(t){let{callback:e,disabled:n}=t;const r=Lp(e),s=b.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(r)},[n]);return b.useEffect(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function kF(t){return new Rp(Oo(t),t)}function Kb(t,e,n){e===void 0&&(e=kF);const[r,s]=b.useState(null);function l(){s(h=>{if(!t)return null;if(t.isConnected===!1){var g;return(g=h??n)!=null?g:null}const A=e(t);return JSON.stringify(h)===JSON.stringify(A)?h:A})}const c=TF({callback(h){if(t)for(const g of h){const{type:A,target:p}=g;if(A==="childList"&&p instanceof HTMLElement&&p.contains(t)){l();break}}}}),m=qu({callback:l});return Hi(()=>{l(),t?(m==null||m.observe(t),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(m==null||m.disconnect(),c==null||c.disconnect())},[t]),r}function xF(t){const e=pk(t);return lk(t,e)}const Gb=[];function LF(t){const e=b.useRef(t),n=xd(r=>t?r&&r!==Gb&&t&&e.current&&t.parentNode===e.current.parentNode?r:Wu(t):Gb,[t]);return b.useEffect(()=>{e.current=t},[t]),n}function DF(t){const[e,n]=b.useState(null),r=b.useRef(t),s=b.useCallback(l=>{const c=mf(l.target);c&&n(m=>m?(m.set(c,Wf(c)),new Map(m)):null)},[]);return b.useEffect(()=>{const l=r.current;if(t!==l){c(l);const m=t.map(h=>{const g=mf(h);return g?(g.addEventListener("scroll",s,{passive:!0}),[g,Wf(g)]):null}).filter(h=>h!=null);n(m.length?new Map(m):null),r.current=t}return()=>{c(t),c(l)};function c(m){m.forEach(h=>{const g=mf(h);g==null||g.removeEventListener("scroll",s)})}},[s,t]),b.useMemo(()=>t.length?e?Array.from(e.values()).reduce((l,c)=>xo(l,c),bi):hk(t):bi,[t,e])}function Wb(t,e){e===void 0&&(e=[]);const n=b.useRef(null);return b.useEffect(()=>{n.current=null},e),b.useEffect(()=>{const r=t!==bi;r&&!n.current&&(n.current=t),!r&&n.current&&(n.current=null)},[t]),n.current?yd(t,n.current):bi}function RF(t){b.useEffect(()=>{if(!Gu)return;const e=t.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of e)n==null||n()}},t.map(e=>{let{sensor:n}=e;return n}))}function UF(t,e){return b.useMemo(()=>t.reduce((n,r)=>{let{eventName:s,handler:l}=r;return n[s]=c=>{l(c,e)},n},{}),[t,e])}function Ak(t){return b.useMemo(()=>t?nF(t):null,[t])}const qb=[];function MF(t,e){e===void 0&&(e=Oo);const[n]=t,r=Ak(n?Fn(n):null),[s,l]=b.useState(qb);function c(){l(()=>t.length?t.map(h=>mk(h)?r:new Rp(e(h),h)):qb)}const m=qu({callback:c});return Hi(()=>{m==null||m.disconnect(),c(),t.forEach(h=>m==null?void 0:m.observe(h))},[t]),s}function BF(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return kd(e)?e:t}function _F(t){let{measure:e}=t;const[n,r]=b.useState(null),s=b.useCallback(g=>{for(const{target:A}of g)if(kd(A)){r(p=>{const v=e(A);return p?{...p,width:v.width,height:v.height}:v});break}},[e]),l=qu({callback:s}),c=b.useCallback(g=>{const A=BF(g);l==null||l.disconnect(),A&&(l==null||l.observe(A)),r(A?e(A):null)},[e,l]),[m,h]=Du(c);return b.useMemo(()=>({nodeRef:m,rect:n,setRef:h}),[n,m,h])}const FF=[{sensor:Bp,options:{}},{sensor:Up,options:{}}],OF={current:{}},yu={draggable:{measure:jb},droppable:{measure:jb,strategy:bd.WhileDragging,frequency:Yf.Optimized},dragOverlay:{measure:Oo}};class ud extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,r;return(n=(r=this.get(e))==null?void 0:r.node.current)!=null?n:void 0}}const PF={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ud,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ru},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yu,measureDroppableContainers:Ru,windowRect:null,measuringScheduled:!1},jF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ru,draggableNodes:new Map,over:null,measureDroppableContainers:Ru},Yu=b.createContext(jF),yk=b.createContext(PF);function HF(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ud}}}function VF(t,e){switch(e.type){case Wa.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case Wa.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case Wa.DragEnd:case Wa.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Wa.RegisterDroppable:{const{element:n}=e,{id:r}=n,s=new ud(t.droppable.containers);return s.set(r,n),{...t,droppable:{...t.droppable,containers:s}}}case Wa.SetDroppableDisabled:{const{id:n,key:r,disabled:s}=e,l=t.droppable.containers.get(n);if(!l||r!==l.key)return t;const c=new ud(t.droppable.containers);return c.set(n,{...l,disabled:s}),{...t,droppable:{...t.droppable,containers:c}}}case Wa.UnregisterDroppable:{const{id:n,key:r}=e,s=t.droppable.containers.get(n);if(!s||r!==s.key)return t;const l=new ud(t.droppable.containers);return l.delete(n),{...t,droppable:{...t.droppable,containers:l}}}default:return t}}function zF(t){let{disabled:e}=t;const{active:n,activatorEvent:r,draggableNodes:s}=b.useContext(Yu),l=Kf(r),c=Kf(n==null?void 0:n.id);return b.useEffect(()=>{if(!e&&!r&&l&&c!=null){if(!Dp(l)||document.activeElement===l.target)return;const m=s.get(c);if(!m)return;const{activatorNode:h,node:g}=m;if(!h.current&&!g.current)return;requestAnimationFrame(()=>{for(const A of[h.current,g.current]){if(!A)continue;const p=B_(A);if(p){p.focus();break}}})}},[r,e,s,c,l]),null}function QF(t,e){let{transform:n,...r}=e;return t!=null&&t.length?t.reduce((s,l)=>l({transform:s,...r}),n):n}function KF(t){return b.useMemo(()=>({draggable:{...yu.draggable,...t==null?void 0:t.draggable},droppable:{...yu.droppable,...t==null?void 0:t.droppable},dragOverlay:{...yu.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function GF(t){let{activeNode:e,measure:n,initialRect:r,config:s=!0}=t;const l=b.useRef(!1),{x:c,y:m}=typeof s=="boolean"?{x:s,y:s}:s;Hi(()=>{if(!c&&!m||!e){l.current=!1;return}if(l.current||!r)return;const g=e==null?void 0:e.node.current;if(!g||g.isConnected===!1)return;const A=n(g),p=lk(A,r);if(c||(p.x=0),m||(p.y=0),l.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const v=dk(g);v&&v.scrollBy({top:p.y,left:p.x})}},[e,c,m,r,n])}const Ek=b.createContext({...bi,scaleX:1,scaleY:1});var ts;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(ts||(ts={}));const WF=b.memo(function(e){var n,r,s,l;let{id:c,accessibility:m,autoScroll:h=!0,children:g,sensors:A=FF,collisionDetection:p=J_,measuring:v,modifiers:w,...T}=e;const S=b.useReducer(VF,void 0,HF),[k,L]=S,[U,x]=H_(),[F,B]=b.useState(ts.Uninitialized),V=F===ts.Initialized,{draggable:{active:O,nodes:_,translate:z},droppable:{containers:Q}}=k,K=O!=null?_.get(O):null,te=b.useRef({initial:null,translated:null}),ee=b.useMemo(()=>{var Yt;return O!=null?{id:O,data:(Yt=K==null?void 0:K.data)!=null?Yt:OF,rect:te}:null},[O,K]),Y=b.useRef(null),[le,J]=b.useState(null),[ie,be]=b.useState(null),se=Ad(T,Object.values(T)),j=Ld("DndDescribedBy",c),W=b.useMemo(()=>Q.getEnabled(),[Q]),X=KF(v),{droppableRects:ne,measureDroppableContainers:we,measuringScheduled:ce}=SF(W,{dragging:V,dependencies:[z.x,z.y],config:X.droppable}),Ee=IF(_,O),Te=b.useMemo(()=>ie?Gf(ie):null,[ie]),Ce=Sa(),Pe=NF(Ee,X.draggable.measure);GF({activeNode:O!=null?_.get(O):null,config:Ce.layoutShiftCompensation,initialRect:Pe,measure:X.draggable.measure});const Ve=Kb(Ee,X.draggable.measure,Pe),bt=Kb(Ee?Ee.parentElement:null),gt=b.useRef({activatorEvent:null,active:null,activeNode:Ee,collisionRect:null,collisions:null,droppableRects:ne,draggableNodes:_,draggingNode:null,draggingNodeRect:null,droppableContainers:Q,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),it=Q.getNodeFor((n=gt.current.over)==null?void 0:n.id),Ke=_F({measure:X.dragOverlay.measure}),Pt=(r=Ke.nodeRef.current)!=null?r:Ee,Se=V?(s=Ke.rect)!=null?s:Ve:null,Fe=!!(Ke.nodeRef.current&&Ke.rect),fe=xF(Fe?null:Ve),Re=Ak(Pt?Fn(Pt):null),ze=LF(V?it??Ee:null),je=MF(ze),at=QF(w,{transform:{x:z.x-fe.x,y:z.y-fe.y,scaleX:1,scaleY:1},activatorEvent:ie,active:ee,activeNodeRect:Ve,containerNodeRect:bt,draggingNodeRect:Se,over:gt.current.over,overlayNodeRect:Ke.rect,scrollableAncestors:ze,scrollableAncestorRects:je,windowRect:Re}),wt=Te?xo(Te,z):null,Rt=DF(ze),Tt=Wb(Rt),qt=Wb(Rt,[Ve]),M=xo(at,Tt),C=Se?Z_(Se,at):null,N=ee&&C?p({active:ee,collisionRect:C,droppableRects:ne,droppableContainers:W,pointerCoordinates:wt}):null,G=ok(N,"id"),[ae,pe]=b.useState(null),Ne=Fe?at:xo(at,qt),_e=X_(Ne,(l=ae==null?void 0:ae.rect)!=null?l:null,Ve),ht=b.useRef(null),pt=b.useCallback((Yt,Vt)=>{let{sensor:Be,options:sn}=Vt;if(Y.current==null)return;const kt=_.get(Y.current);if(!kt)return;const Lt=Yt.nativeEvent,La=new Be({active:Y.current,activeNode:kt,event:Lt,options:sn,context:gt,onAbort(jt){if(!_.get(jt))return;const{onDragAbort:Qt}=se.current,Ht={id:jt};Qt==null||Qt(Ht),U({type:"onDragAbort",event:Ht})},onPending(jt,Ut,Qt,Ht){if(!_.get(jt))return;const{onDragPending:fa}=se.current,Xa={id:jt,constraint:Ut,initialCoordinates:Qt,offset:Ht};fa==null||fa(Xa),U({type:"onDragPending",event:Xa})},onStart(jt){const Ut=Y.current;if(Ut==null)return;const Qt=_.get(Ut);if(!Qt)return;const{onDragStart:Ht}=se.current,ga={activatorEvent:Lt,active:{id:Ut,data:Qt.data,rect:te}};Co.unstable_batchedUpdates(()=>{Ht==null||Ht(ga),B(ts.Initializing),L({type:Wa.DragStart,initialCoordinates:jt,active:Ut}),U({type:"onDragStart",event:ga}),J(ht.current),be(Lt)})},onMove(jt){L({type:Wa.DragMove,coordinates:jt})},onEnd:on(Wa.DragEnd),onCancel:on(Wa.DragCancel)});ht.current=La;function on(jt){return async function(){const{active:Qt,collisions:Ht,over:ga,scrollAdjustedTranslate:fa}=gt.current;let Xa=null;if(Qt&&fa){const{cancelDrop:$a}=se.current;Xa={activatorEvent:Lt,active:Qt,collisions:Ht,delta:fa,over:ga},jt===Wa.DragEnd&&typeof $a=="function"&&await Promise.resolve($a(Xa))&&(jt=Wa.DragCancel)}Y.current=null,Co.unstable_batchedUpdates(()=>{L({type:jt}),B(ts.Uninitialized),pe(null),J(null),be(null),ht.current=null;const $a=jt===Wa.DragEnd?"onDragEnd":"onDragCancel";if(Xa){const _a=se.current[$a];_a==null||_a(Xa),U({type:$a,event:Xa})}})}}},[_]),It=b.useCallback((Yt,Vt)=>(Be,sn)=>{const kt=Be.nativeEvent,Lt=_.get(sn);if(Y.current!==null||!Lt||kt.dndKit||kt.defaultPrevented)return;const La={active:Lt};Yt(Be,Vt.options,La)===!0&&(kt.dndKit={capturedBy:Vt.sensor},Y.current=sn,pt(Be,Vt))},[_,pt]),At=CF(A,It);RF(A),Hi(()=>{Ve&&F===ts.Initializing&&B(ts.Initialized)},[Ve,F]),b.useEffect(()=>{const{onDragMove:Yt}=se.current,{active:Vt,activatorEvent:Be,collisions:sn,over:kt}=gt.current;if(!Vt||!Be)return;const Lt={active:Vt,activatorEvent:Be,collisions:sn,delta:{x:M.x,y:M.y},over:kt};Co.unstable_batchedUpdates(()=>{Yt==null||Yt(Lt),U({type:"onDragMove",event:Lt})})},[M.x,M.y]),b.useEffect(()=>{const{active:Yt,activatorEvent:Vt,collisions:Be,droppableContainers:sn,scrollAdjustedTranslate:kt}=gt.current;if(!Yt||Y.current==null||!Vt||!kt)return;const{onDragOver:Lt}=se.current,La=sn.get(G),on=La&&La.rect.current?{id:La.id,rect:La.rect.current,data:La.data,disabled:La.disabled}:null,jt={active:Yt,activatorEvent:Vt,collisions:Be,delta:{x:kt.x,y:kt.y},over:on};Co.unstable_batchedUpdates(()=>{pe(on),Lt==null||Lt(jt),U({type:"onDragOver",event:jt})})},[G]),Hi(()=>{gt.current={activatorEvent:ie,active:ee,activeNode:Ee,collisionRect:C,collisions:N,droppableRects:ne,draggableNodes:_,draggingNode:Pt,draggingNodeRect:Se,droppableContainers:Q,over:ae,scrollableAncestors:ze,scrollAdjustedTranslate:M},te.current={initial:Se,translated:C}},[ee,Ee,N,C,_,Pt,Se,ne,Q,ae,ze,M]),bF({...Ce,delta:z,draggingRect:C,pointerCoordinates:wt,scrollableAncestors:ze,scrollableAncestorRects:je});const hi=b.useMemo(()=>({active:ee,activeNode:Ee,activeNodeRect:Ve,activatorEvent:ie,collisions:N,containerNodeRect:bt,dragOverlay:Ke,draggableNodes:_,droppableContainers:Q,droppableRects:ne,over:ae,measureDroppableContainers:we,scrollableAncestors:ze,scrollableAncestorRects:je,measuringConfiguration:X,measuringScheduled:ce,windowRect:Re}),[ee,Ee,Ve,ie,N,bt,Ke,_,Q,ne,ae,we,ze,je,X,ce,Re]),xa=b.useMemo(()=>({activatorEvent:ie,activators:At,active:ee,activeNodeRect:Ve,ariaDescribedById:{draggable:j},dispatch:L,draggableNodes:_,over:ae,measureDroppableContainers:we}),[ie,At,ee,Ve,L,j,_,ae,we]);return rn.createElement(ik.Provider,{value:x},rn.createElement(Yu.Provider,{value:xa},rn.createElement(yk.Provider,{value:hi},rn.createElement(Ek.Provider,{value:_e},g)),rn.createElement(zF,{disabled:(m==null?void 0:m.restoreFocus)===!1})),rn.createElement(Q_,{...m,hiddenTextDescribedById:j}));function Sa(){const Yt=(le==null?void 0:le.autoScrollEnabled)===!1,Vt=typeof h=="object"?h.enabled===!1:h===!1,Be=V&&!Yt&&!Vt;return typeof h=="object"?{...h,enabled:Be}:{enabled:Be}}}),qF=b.createContext(null),Yb="button",YF="Draggable";function JF(t){let{id:e,data:n,disabled:r=!1,attributes:s}=t;const l=Ld(YF),{activators:c,activatorEvent:m,active:h,activeNodeRect:g,ariaDescribedById:A,draggableNodes:p,over:v}=b.useContext(Yu),{role:w=Yb,roleDescription:T="draggable",tabIndex:S=0}=s??{},k=(h==null?void 0:h.id)===e,L=b.useContext(k?Ek:qF),[U,x]=Du(),[F,B]=Du(),V=UF(c,e),O=Ad(n);Hi(()=>(p.set(e,{id:e,key:l,node:U,activatorNode:F,data:O}),()=>{const z=p.get(e);z&&z.key===l&&p.delete(e)}),[p,e]);const _=b.useMemo(()=>({role:w,tabIndex:S,"aria-disabled":r,"aria-pressed":k&&w===Yb?!0:void 0,"aria-roledescription":T,"aria-describedby":A.draggable}),[r,w,S,k,T,A.draggable]);return{active:h,activatorEvent:m,activeNodeRect:g,attributes:_,isDragging:k,listeners:r?void 0:V,node:U,over:v,setNodeRef:x,setActivatorNodeRef:B,transform:L}}function XF(){return b.useContext(yk)}const $F="Droppable",ZF={timeout:25};function eO(t){let{data:e,disabled:n=!1,id:r,resizeObserverConfig:s}=t;const l=Ld($F),{active:c,dispatch:m,over:h,measureDroppableContainers:g}=b.useContext(Yu),A=b.useRef({disabled:n}),p=b.useRef(!1),v=b.useRef(null),w=b.useRef(null),{disabled:T,updateMeasurementsFor:S,timeout:k}={...ZF,...s},L=Ad(S??r),U=b.useCallback(()=>{if(!p.current){p.current=!0;return}w.current!=null&&clearTimeout(w.current),w.current=setTimeout(()=>{g(Array.isArray(L.current)?L.current:[L.current]),w.current=null},k)},[k]),x=qu({callback:U,disabled:T||!c}),F=b.useCallback((_,z)=>{x&&(z&&(x.unobserve(z),p.current=!1),_&&x.observe(_))},[x]),[B,V]=Du(F),O=Ad(e);return b.useEffect(()=>{!x||!B.current||(x.disconnect(),p.current=!1,x.observe(B.current))},[B,x]),b.useEffect(()=>(m({type:Wa.RegisterDroppable,element:{id:r,key:l,disabled:n,node:B,rect:v,data:O}}),()=>m({type:Wa.UnregisterDroppable,key:l,id:r})),[r]),b.useEffect(()=>{n!==A.current.disabled&&(m({type:Wa.SetDroppableDisabled,id:r,key:l,disabled:n}),A.current.disabled=n)},[r,l,n,m]),{active:c,rect:v,isOver:(h==null?void 0:h.id)===r,node:B,over:h,setNodeRef:V}}function _p(t,e,n){const r=t.slice();return r.splice(n<0?r.length+n:n,0,r.splice(e,1)[0]),r}function tO(t,e){return t.reduce((n,r,s)=>{const l=e.get(r);return l&&(n[s]=l),n},Array(t.length))}function tu(t){return t!==null&&t>=0}function aO(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function nO(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const bk=t=>{let{rects:e,activeIndex:n,overIndex:r,index:s}=t;const l=_p(e,r,n),c=e[s],m=l[s];return!m||!c?null:{x:m.left-c.left,y:m.top-c.top,scaleX:m.width/c.width,scaleY:m.height/c.height}},au={scaleX:1,scaleY:1},iO=t=>{var e;let{activeIndex:n,activeNodeRect:r,index:s,rects:l,overIndex:c}=t;const m=(e=l[n])!=null?e:r;if(!m)return null;if(s===n){const g=l[c];return g?{x:0,y:n<c?g.top+g.height-(m.top+m.height):g.top-m.top,...au}:null}const h=rO(l,s,n);return s>n&&s<=c?{x:0,y:-m.height-h,...au}:s<n&&s>=c?{x:0,y:m.height+h,...au}:{x:0,y:0,...au}};function rO(t,e,n){const r=t[e],s=t[e-1],l=t[e+1];return r?n<e?s?r.top-(s.top+s.height):l?l.top-(r.top+r.height):0:l?l.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const vk="Sortable",wk=rn.createContext({activeIndex:-1,containerId:vk,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:bk,disabled:{draggable:!1,droppable:!1}});function sO(t){let{children:e,id:n,items:r,strategy:s=bk,disabled:l=!1}=t;const{active:c,dragOverlay:m,droppableRects:h,over:g,measureDroppableContainers:A}=XF(),p=Ld(vk,n),v=m.rect!==null,w=b.useMemo(()=>r.map(V=>typeof V=="object"&&"id"in V?V.id:V),[r]),T=c!=null,S=c?w.indexOf(c.id):-1,k=g?w.indexOf(g.id):-1,L=b.useRef(w),U=!aO(w,L.current),x=k!==-1&&S===-1||U,F=nO(l);Hi(()=>{U&&T&&A(w)},[U,w,T,A]),b.useEffect(()=>{L.current=w},[w]);const B=b.useMemo(()=>({activeIndex:S,containerId:p,disabled:F,disableTransforms:x,items:w,overIndex:k,useDragOverlay:v,sortedRects:tO(w,h),strategy:s}),[S,p,F.draggable,F.droppable,x,w,k,h,v,s]);return rn.createElement(wk.Provider,{value:B},e)}const oO=t=>{let{id:e,items:n,activeIndex:r,overIndex:s}=t;return _p(n,r,s).indexOf(e)},lO=t=>{let{containerId:e,isSorting:n,wasDragging:r,index:s,items:l,newIndex:c,previousItems:m,previousContainerId:h,transition:g}=t;return!g||!r||m!==l&&s===c?!1:n?!0:c!==s&&e===h},dO={duration:200,easing:"ease"},Ik="transform",cO=Ed.Transition.toString({property:Ik,duration:0,easing:"linear"}),uO={roleDescription:"sortable"};function mO(t){let{disabled:e,index:n,node:r,rect:s}=t;const[l,c]=b.useState(null),m=b.useRef(n);return Hi(()=>{if(!e&&n!==m.current&&r.current){const h=s.current;if(h){const g=Oo(r.current,{ignoreTransform:!0}),A={x:h.left-g.left,y:h.top-g.top,scaleX:h.width/g.width,scaleY:h.height/g.height};(A.x||A.y)&&c(A)}}n!==m.current&&(m.current=n)},[e,n,r,s]),b.useEffect(()=>{l&&c(null)},[l]),l}function gO(t){let{animateLayoutChanges:e=lO,attributes:n,disabled:r,data:s,getNewIndex:l=oO,id:c,strategy:m,resizeObserverConfig:h,transition:g=dO}=t;const{items:A,containerId:p,activeIndex:v,disabled:w,disableTransforms:T,sortedRects:S,overIndex:k,useDragOverlay:L,strategy:U}=b.useContext(wk),x=hO(r,w),F=A.indexOf(c),B=b.useMemo(()=>({sortable:{containerId:p,index:F,items:A},...s}),[p,s,F,A]),V=b.useMemo(()=>A.slice(A.indexOf(c)),[A,c]),{rect:O,node:_,isOver:z,setNodeRef:Q}=eO({id:c,data:B,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:V,...h}}),{active:K,activatorEvent:te,activeNodeRect:ee,attributes:Y,setNodeRef:le,listeners:J,isDragging:ie,over:be,setActivatorNodeRef:se,transform:j}=JF({id:c,data:B,attributes:{...uO,...n},disabled:x.draggable}),W=D_(Q,le),X=!!K,ne=X&&!T&&tu(v)&&tu(k),we=!L&&ie,ce=we&&ne?j:null,Te=ne?ce??(m??U)({rects:S,activeNodeRect:ee,activeIndex:v,overIndex:k,index:F}):null,Ce=tu(v)&&tu(k)?l({id:c,items:A,activeIndex:v,overIndex:k}):F,Pe=K==null?void 0:K.id,Ve=b.useRef({activeId:Pe,items:A,newIndex:Ce,containerId:p}),bt=A!==Ve.current.items,gt=e({active:K,containerId:p,isDragging:ie,isSorting:X,id:c,index:F,items:A,newIndex:Ve.current.newIndex,previousItems:Ve.current.items,previousContainerId:Ve.current.containerId,transition:g,wasDragging:Ve.current.activeId!=null}),it=mO({disabled:!gt,index:F,node:_,rect:O});return b.useEffect(()=>{X&&Ve.current.newIndex!==Ce&&(Ve.current.newIndex=Ce),p!==Ve.current.containerId&&(Ve.current.containerId=p),A!==Ve.current.items&&(Ve.current.items=A)},[X,Ce,p,A]),b.useEffect(()=>{if(Pe===Ve.current.activeId)return;if(Pe!=null&&Ve.current.activeId==null){Ve.current.activeId=Pe;return}const Pt=setTimeout(()=>{Ve.current.activeId=Pe},50);return()=>clearTimeout(Pt)},[Pe]),{active:K,activeIndex:v,attributes:Y,data:B,rect:O,index:F,newIndex:Ce,items:A,isOver:z,isSorting:X,isDragging:ie,listeners:J,node:_,overIndex:k,over:be,setNodeRef:W,setActivatorNodeRef:se,setDroppableNodeRef:Q,setDraggableNodeRef:le,transform:it??Te,transition:Ke()};function Ke(){if(it||bt&&Ve.current.newIndex===F)return cO;if(!(we&&!Dp(te)||!g)&&(X||gt))return Ed.Transition.toString({...g,property:Ik})}}function hO(t,e){var n,r;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(n=t==null?void 0:t.draggable)!=null?n:e.draggable,droppable:(r=t==null?void 0:t.droppable)!=null?r:e.droppable}}function Mu(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const fO=[zt.Down,zt.Right,zt.Up,zt.Left],pO=(t,e)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:l,over:c,scrollableAncestors:m}}=e;if(fO.includes(t.code)){if(t.preventDefault(),!n||!r)return;const h=[];l.getEnabled().forEach(p=>{if(!p||p!=null&&p.disabled)return;const v=s.get(p.id);if(v)switch(t.code){case zt.Down:r.top<v.top&&h.push(p);break;case zt.Up:r.top>v.top&&h.push(p);break;case zt.Left:r.left>v.left&&h.push(p);break;case zt.Right:r.left<v.left&&h.push(p);break}});const g=q_({collisionRect:r,droppableRects:s,droppableContainers:h});let A=ok(g,"id");if(A===(c==null?void 0:c.id)&&g.length>1&&(A=g[1].id),A!=null){const p=l.get(n.id),v=l.get(A),w=v?s.get(v.id):null,T=v==null?void 0:v.node.current;if(T&&w&&p&&v){const k=Wu(T).some((V,O)=>m[O]!==V),L=Ck(p,v),U=AO(p,v),x=k||!L?{x:0,y:0}:{x:U?r.width-w.width:0,y:U?r.height-w.height:0},F={x:w.left,y:w.top};return x.x&&x.y?F:yd(F,x)}}}};function Ck(t,e){return!Mu(t)||!Mu(e)?!1:t.data.current.sortable.containerId===e.data.current.sortable.containerId}function AO(t,e){return!Mu(t)||!Mu(e)||!Ck(t,e)?!1:t.data.current.sortable.index<e.data.current.sortable.index}const yO=({htmlFor:t,label:e,onLabelChange:n,onDelete:r})=>{const[s,l]=b.useState(!1),[c,m]=b.useState(e),h=()=>{c.trim()&&(n(c.trim()),l(!1))},g=()=>{m(e),l(!1)},A=p=>{p.key==="Enter"?h():p.key==="Escape"&&g()};return s?d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("input",{type:"text",value:c,onChange:p=>m(p.target.value),onKeyDown:A,onBlur:h,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}),d.jsx("button",{type:"button",onClick:h,className:"text-green-600 dark:text-green-400 hover:text-green-700 dark:hover:text-green-300 text-xs px-2 py-1",children:"✓"}),d.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:"✕"})]}):d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("label",{htmlFor:t,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:e}),d.jsx("button",{type:"button",onClick:()=>l(!0),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-xs",title:"Edit label",children:d.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}),r&&d.jsx("button",{type:"button",onClick:r,className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 text-xs",title:"Delete field",children:d.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]})},EO=({name:t})=>{switch(t){case"visibility":return d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),d.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return d.jsxs(d.Fragment,{children:[d.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"}),d.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"refresh":return d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M23 4v6h-6"}),d.jsx("path",{d:"M1 20v-6h6"}),d.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 d.jsxs(d.Fragment,{children:[d.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"}),d.jsx("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]});default:return null}},Dd=b.forwardRef(({id:t,label:e,value:n,onChange:r,type:s="text",placeholder:l,required:c=!1,multiline:m=!1,rows:h=1,error:g,buttons:A=[],showPassword:p,onShowPasswordChange:v},w)=>{const{t:T}=tt(),[S,k]=rn.useState(!1),L=p!==void 0?p:S,U=B=>{p!==void 0?v==null||v(B):k(B)},x=`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`,F=s==="password"?[...A,{icon:L?"visibility-off":"visibility",onClick:()=>U(!L),title:T(L?"common.hidePassword":"common.showPassword")}]:A;return d.jsxs("div",{children:[d.jsxs("label",{htmlFor:t,className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,c&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[m?d.jsx("textarea",{id:t,value:n,onChange:B=>r(B.target.value),rows:h,placeholder:l,className:x}):d.jsx("input",{ref:w,type:s==="password"&&!L?"password":"text",id:t,value:n,onChange:B=>r(B.target.value),placeholder:l,className:x}),F.length>0&&d.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:F.map((B,V)=>d.jsx("button",{type:"button",onClick:B.onClick,title:B.title,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",children:d.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx(EO,{name:B.icon})})},V))})]}),g&&d.jsx("p",{className:"mt-1 text-sm text-red-500",children:g})]})});Dd.displayName="FormInput";const Sk=({id:t,label:e,value:n,onChange:r,placeholder:s,error:l,showValue:c,onShowValueChange:m})=>{const{t:h}=tt(),[g,A]=b.useState(!1),p=c!==void 0?c:g,v=b.useCallback(T=>{c!==void 0?m==null||m(T):A(T)},[c,m]),w=b.useCallback(()=>{v(!p)},[p,v]);return d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),d.jsxs("div",{className:"flex",children:[d.jsx("div",{className:"relative flex-grow",children:d.jsx("input",{type:p?"text":"password",id:t,value:n,onChange:T=>r(T.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"})}),d.jsx("div",{className:"flex",children:d.jsx("button",{type:"button",onClick:w,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:h(p?"common.hidePassword":"common.showPassword"),children:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:p?d.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"}):d.jsxs(d.Fragment,{children:[d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),d.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&&d.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l})]})},bO=({field:t,value:e,onValueChange:n,onLabelChange:r,onDelete:s})=>{const{attributes:l,listeners:c,setNodeRef:m,transform:h,transition:g,isDragging:A}=gO({id:t.tempId}),p={transform:Ed.Transform.toString(h),transition:g,opacity:A?.5:1,zIndex:A?1e3:"auto"},v=()=>t.fieldType===ea.TextArea?d.jsx("textarea",{id:t.tempId,value:e,onChange:w=>n(w.target.value),rows:4,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"}):t.isHidden||t.fieldType===ea.Hidden||t.fieldType===ea.Password?d.jsx(Sk,{id:t.tempId,label:"",value:e,onChange:n}):d.jsx(Dd,{id:t.tempId,label:"",value:e,onChange:n,type:"text"});return d.jsxs("div",{ref:m,style:p,className:"relative bg-white dark:bg-gray-800",children:[d.jsx("div",{className:"cursor-grab active:cursor-grabbing",...l,...c,children:d.jsx(yO,{htmlFor:t.tempId,label:t.label,onLabelChange:r,onDelete:s})}),v()]})},vO=({customFields:t,fieldValues:e,onFieldsReorder:n,onFieldValueChange:r,onFieldLabelChange:s,onFieldDelete:l})=>{const c=K_(Fb(Bp,{activationConstraint:{distance:8}}),Fb(Up,{coordinateGetter:pO})),m=b.useCallback(h=>{const{active:g,over:A}=h;if(A&&g.id!==A.id){const p=t.findIndex(S=>S.tempId===g.id),v=t.findIndex(S=>S.tempId===A.id),T=_p(t,p,v).map((S,k)=>({...S,displayOrder:k}));n(T)}},[t,n]);return t.length===0?null:d.jsx(WF,{sensors:c,collisionDetection:W_,onDragEnd:m,children:d.jsx(sO,{items:t.map(h=>h.tempId),strategy:iO,children:d.jsx("div",{className:"space-y-3",children:t.map(h=>d.jsx(bO,{field:h,value:e[h.tempId]||"",onValueChange:g=>r(h.tempId,g),onLabelChange:g=>s(h.tempId,g),onDelete:()=>l(h.tempId)},h.tempId))})})})},wO=({id:t,value:e,onChange:n,error:r,required:s=!1,onRemove:l,onGenerateAlias:c,isEmailMode:m,onEmailModeChange:h})=>{const{t:g}=tt(),A=ta(),p=m!==void 0,[v,w]=b.useState(!0),T=p?m:v,S=b.useCallback(se=>{const j=typeof se=="function"?se(T):se;p&&h?h(j):w(j)},[p,h,T]),[k,L]=b.useState(""),[U,x]=b.useState(""),[F,B]=b.useState(!1),[V,O]=b.useState([]),[_,z]=b.useState([]),[Q,K]=b.useState([]),te=b.useRef(null),ee=b.useRef(!1);b.useEffect(()=>{(async()=>{const j=await A.getVaultMetadata();O((j==null?void 0:j.publicEmailDomains)??[]),z((j==null?void 0:j.privateEmailDomains)??[]),K((j==null?void 0:j.hiddenPrivateEmailDomains)??[])})()},[A]);const Y=b.useMemo(()=>_.length>0&&!(_.length===1&&(_[0]==="DISABLED.TLD"||_[0]==="")),[_]);b.useEffect(()=>{if(!e){L(""),U||(Y&&_[0]?x(_[0]):V[0]&&x(V[0]));return}if(e.includes("@")){const[se,j]=e.split("@");if(L(se),x(j),!ee.current){const W=V.includes(j)||_.includes(j)||Q.includes(j);p&&h?h(!W):p||S(!W)}}else L(e),!U&&!e.includes("@")&&(Y&&_[0]?x(_[0]):V[0]&&x(V[0]))},[e,V,_,Q,Y,p,h,U,S]),b.useEffect(()=>{if(ee.current||!e||!e.includes("@"))return;const se=e.split("@")[1];if(!se)return;const j=V.includes(se)||_.includes(se)||Q.includes(se);p&&h?h(!j):p||j&&T&&S(!1)},[V,_,Q,e,T,p,h,S]),b.useEffect(()=>{if(!T&&e&&!e.includes("@")&&e.trim()){const se=Y&&_[0]?_[0]:V[0],j=U||se;j&&(!U&&se&&x(se),n(`${e}@${j}`))}},[e,T,U,Y,_,V,n]);const le=b.useCallback(se=>{const j=se.target.value;if(ee.current=!1,T){n(j);return}if(j.includes("@")){S(!0),n(j);return}if(L(j),!j||j.trim()==="")n("");else{const W=U||(Y&&_[0]?_[0]:V[0]||"");W?(n(`${j}@${W}`),U||x(W)):n(j)}},[T,U,n,S,Y,_,V]),J=b.useCallback(se=>{x(se);const j=k.includes("@")?k.split("@")[0]:k;!j||j.trim()===""?n(""):n(`${j}@${se}`),S(!1),B(!1)},[k,n,S]),ie=b.useCallback(()=>{ee.current=!0;const se=!T;if(S(se),se)n(""),L("");else{const j=Y&&_[0]?_[0]:V[0];x(j),L(""),n("")}},[T,Y,V,_,n,S]);b.useEffect(()=>{const se=j=>{te.current&&!te.current.contains(j.target)&&B(!1)};if(F)return document.addEventListener("mousedown",se),()=>{document.removeEventListener("mousedown",se)}},[F]);const be=b.useCallback(()=>{ee.current=!0,S(!1);const se=Y&&_[0]?_[0]:V[0];se&&x(se),L(""),n(""),c&&c()},[c,S,Y,_,V,n]);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{className:"flex items-center",children:d.jsxs("div",{className:"flex items-center",children:[d.jsx("button",{type:"button",onClick:T?void 0:ie,className:`text-sm font-medium transition-colors ${T?"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")}),d.jsx("span",{className:"mx-2 text-gray-400 dark:text-gray-500",children:"/"}),d.jsx("button",{type:"button",onClick:T?be:void 0,className:`text-sm font-medium transition-colors ${T?"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&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}),l&&d.jsx("button",{type:"button",onClick:l,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:d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),d.jsxs("div",{className:"relative w-full",children:[d.jsxs("div",{className:"flex w-full",children:[d.jsx("input",{type:"text",id:t,className:`flex-1 min-w-0 px-3 py-2 border text-sm ${r?"border-red-500":"border-gray-300 dark:border-gray-600"} ${T?"rounded-md":"rounded-l-md"} focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:text-white`,value:T?e:k,onChange:le}),!T&&d.jsxs("button",{type:"button",onClick:()=>B(!F),className:`inline-flex items-center px-2 py-2 border border-l-0 border-gray-300 dark:border-gray-600 ${c?"":"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:[d.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"@"}),d.jsx("span",{className:"truncate ml-0.5",children:U})]}),!T&&c&&d.jsx("button",{type:"button",onClick:c,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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]}),F&&!T&&d.jsx("div",{ref:te,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:d.jsxs("div",{className:"p-4",children:[Y&&d.jsxs("div",{className:"mb-4",children:[d.jsxs("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:[g("items.privateEmailTitle")," ",d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",g("items.privateEmailAliasVaultServer"),")"]})]}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.privateEmailDescription")}),d.jsx("div",{className:"flex flex-wrap gap-2",children:_.filter(se=>!Q.includes(se)).map(se=>d.jsx("button",{type:"button",onClick:()=>J(se),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${U===se?"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:se},se))})]}),d.jsxs("div",{className:Y?"border-t border-gray-200 dark:border-gray-600 pt-4":"",children:[d.jsx("h4",{className:"text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2",children:g("items.publicEmailTitle")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-3",children:g("items.publicEmailDescription")}),d.jsx("div",{className:"flex flex-wrap gap-2",children:V.map(se=>d.jsx("button",{type:"button",onClick:()=>J(se),className:`px-3 py-1.5 text-sm rounded-md transition-colors ${U===se?"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:se},se))})]})]})})]}),r&&d.jsx("p",{className:"text-sm text-red-500 mt-1",children:r})]})},nu=({title:t,children:e,actions:n})=>d.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[t&&d.jsxs("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white flex items-center justify-between",children:[typeof t=="string"?d.jsx("span",{children:t}):t,n&&d.jsx("div",{className:"flex items-center gap-2",children:n})]}),d.jsx("div",{className:"space-y-4",children:e})]});var IO=class{constructor(t){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,t&&this.applySettings(t)}applySettings(t){return this.length=t.Length,this.useLowercase=t.UseLowercase,this.useUppercase=t.UseUppercase,this.useNumbers=t.UseNumbers,this.useSpecial=t.UseSpecialChars,this.useNonAmbiguous=t.UseNonAmbiguousChars,this}setLength(t){return this.length=t,this}useLowercaseLetters(t){return this.useLowercase=t,this}useUppercaseLetters(t){return this.useUppercase=t,this}useNumericCharacters(t){return this.useNumbers=t,this}useSpecialCharacters(t){return this.useSpecial=t,this}useNonAmbiguousCharacters(t){return this.useNonAmbiguous=t,this}getUnbiasedRandomIndex(t){const e=Math.floor(4294967296/t)*t;for(;;){const n=new Uint32Array(1);crypto.getRandomValues(n);const r=n[0];if(r<e)return r%t}}generateRandomPassword(){const t=this.buildCharacterSet();let e=this.generateInitialPassword(t);return e=this.ensureRequirements(e),e}buildCharacterSet(){let t="";return this.useLowercase&&(t+=this.lowercaseChars),this.useUppercase&&(t+=this.uppercaseChars),this.useNumbers&&(t+=this.numberChars),this.useSpecial&&(t+=this.specialChars),t.length===0&&(t=this.lowercaseChars),this.useNonAmbiguous&&(t=this.removeAmbiguousCharacters(t)),t}removeAmbiguousCharacters(t){for(const e of this.ambiguousChars)t=t.replace(e,"");return t}generateInitialPassword(t){let e="";for(let n=0;n<this.length;n++)e+=t[this.getUnbiasedRandomIndex(t.length)];return e}ensureRequirements(t){return this.useLowercase&&!/[a-z]/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.lowercaseChars))),this.useUppercase&&!/[A-Z]/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.uppercaseChars))),this.useNumbers&&!/\d/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.numberChars))),this.useSpecial&&!/[!@#$%^&*()_+\-=[\]{}|;:,.<>?]/.exec(t)&&(t=this.addCharacterFromSet(t,this.getSafeCharacterSet(this.specialChars))),t}getSafeCharacterSet(t){return this.useNonAmbiguous?this.removeAmbiguousCharacters(t):t}addCharacterFromSet(t,e){const n=this.getUnbiasedRandomIndex(this.length),r=e[this.getUnbiasedRandomIndex(e.length)];return t.substring(0,n)+r+t.substring(n+1)}},Fp=t=>new IO(t);const CO=({isOpen:t,onClose:e,onSave:n,onSettingsChange:r,initialSettings:s})=>{const{t:l}=tt(),[c,m]=b.useState(s),[h,g]=b.useState(""),A=b.useCallback(T=>{try{const k=Fp(T).generateRandomPassword();g(k)}catch(S){console.error("Error generating preview password:",S),g("")}},[]);b.useEffect(()=>{t&&(m({...s}),A({...s}))},[t,s,A]);const p=b.useCallback((T,S)=>{const k={...c,[T]:S};m(k),A(k),r==null||r(k)},[c,A,r]),v=b.useCallback(()=>{A(c)},[c,A]),w=b.useCallback(()=>{n(h),e()},[h,n,e]);return d.jsx(Zn,{isOpen:t,onClose:e,title:l("items.changePasswordComplexity"),maxWidth:"max-w-lg",footer:d.jsx("div",{className:"flex justify-end",children:d.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:w,children:[d.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),l("common.use")]})}),children:d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{type:"text",value:h,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"}),d.jsx("button",{type:"button",onClick:v,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:l("common.generate"),children:d.jsx("svg",{className:"w-4 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]})}),d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[d.jsx("button",{type:"button",onClick:()=>p("UseLowercase",!c.UseLowercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.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:l("items.includeLowercase"),children:d.jsx("span",{className:"font-mono text-base",children:"a-z"})}),d.jsx("button",{type:"button",onClick:()=>p("UseUppercase",!c.UseUppercase),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.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:l("items.includeUppercase"),children:d.jsx("span",{className:"font-mono text-base",children:"A-Z"})}),d.jsx("button",{type:"button",onClick:()=>p("UseNumbers",!c.UseNumbers),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.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:l("items.includeNumbers"),children:d.jsx("span",{className:"font-mono text-base",children:"0-9"})}),d.jsx("button",{type:"button",onClick:()=>p("UseSpecialChars",!c.UseSpecialChars),className:`flex items-center justify-center px-3 py-2 rounded-md text-sm font-medium transition-colors ${c.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:l("items.includeSpecialChars"),children:d.jsx("span",{className:"font-mono text-base",children:"!@#"})})]}),d.jsxs("div",{className:"flex items-center",children:[d.jsx("input",{id:"use-non-ambiguous",type:"checkbox",checked:c.UseNonAmbiguousChars,onChange:T=>p("UseNonAmbiguousChars",T.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"}),d.jsx("label",{htmlFor:"use-non-ambiguous",className:"ml-2 text-sm text-gray-700 dark:text-gray-300",children:l("items.avoidAmbiguousChars")})]})]})]})})},md=8,Jf=256,SO=0,Op=100,Nk=2;function NO(t){const e=Math.max(0,Math.min(1,t/Op)),n=Math.pow(e,Nk),r=md+n*(Jf-md);return Math.round(r)}function TO(t){const n=(Math.max(md,Math.min(Jf,t))-md)/(Jf-md);return Math.pow(n,1/Nk)*Op}const kO=({id:t,label:e,value:n,onChange:r,placeholder:s,error:l,showPassword:c,onShowPasswordChange:m,initialSettings:h,onSettingsChange:g})=>{const{t:A}=tt(),p=ta(),[v,w]=b.useState(!1),[T,S]=b.useState(!1),[k,L]=b.useState(null),[U,x]=b.useState(!1),F=c!==void 0?c:v,B=b.useCallback(ee=>{c!==void 0?m==null||m(ee):w(ee)},[c,m]);b.useEffect(()=>{(async()=>{try{if(p.sqliteClient){if(h!==void 0)L(h);else{const Y=p.sqliteClient.settings.getPasswordSettings();L(Y)}x(!0)}}catch(Y){console.error("Error loading password settings:",Y)}})()},[p.sqliteClient,h]);const V=b.useCallback(ee=>{try{const le=Fp(ee).generateRandomPassword();r(le),B(!0)}catch(Y){console.error("Error generating password:",Y)}},[r,B]),O=b.useCallback(ee=>{if(!k)return;const Y=parseFloat(ee.target.value),le=NO(Y),J={...k,Length:le};L(J),g==null||g(J),V(J)},[k,V,g]),_=b.useCallback(()=>{k&&V(k)},[V,k]),z=b.useCallback(ee=>{r(ee),B(!0)},[r,B]),Q=b.useCallback(ee=>{L(ee),g==null||g(ee)},[g]),K=b.useCallback(()=>{B(!F)},[F,B]),te=b.useCallback(()=>{S(!0)},[]);return!k||!U?d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),d.jsx("div",{className:"animate-pulse bg-gray-200 dark:bg-gray-700 h-10 rounded-lg"})]}):d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),d.jsxs("div",{className:"flex",children:[d.jsx("div",{className:"relative flex-grow",children:d.jsx("input",{type:F?"text":"password",id:t,value:n,onChange:ee=>r(ee.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"})}),d.jsxs("div",{className:"flex",children:[d.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:A(F?"common.hidePassword":"common.showPassword"),children:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:F?d.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"}):d.jsxs(d.Fragment,{children:[d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),d.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"})]})})}),d.jsx("button",{type:"button",onClick:_,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:A("common.generate"),children:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]})]}),d.jsxs("div",{className:"pt-2",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("label",{htmlFor:`${t}-length`,className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:A("items.passwordLength")}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 font-mono",children:k.Length}),d.jsx("button",{type:"button",onClick:te,className:"text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300",title:A("items.changePasswordComplexity"),children:d.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[d.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"}),d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})]}),d.jsx("input",{type:"range",id:`${t}-length`,min:SO,max:Op,step:"0.1",value:TO(k.Length),onChange:O,className:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"})]}),l&&d.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l}),d.jsx(CO,{isOpen:T,onClose:()=>S(!1),onSave:z,onSettingsChange:Q,initialSettings:k})]})},xO=({id:t,label:e,value:n,onChange:r,placeholder:s,error:l,onRegenerate:c})=>{const{t:m}=tt(),h=b.useCallback(A=>{r(A.target.value)},[r]),g=b.useCallback(()=>{c()},[c]);return d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:t,className:"block text-sm font-medium text-gray-900 dark:text-white",children:e}),d.jsxs("div",{className:"flex",children:[d.jsx("div",{className:"relative flex-grow",children:d.jsx("input",{type:"text",id:t,value:n,onChange:h,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"})}),d.jsx("div",{className:"flex",children:d.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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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&&d.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:l})]})},LO=({attachments:t,onAttachmentsChange:e,itemId:n})=>{const{t:r}=tt(),[s,l]=b.useState(""),c=async g=>{const A=g.target.files;if(!(!A||A.length===0)){l(r("attachmentUploader.uploading"));try{const p=[...t];for(const v of Array.from(A)){const w=await v.arrayBuffer(),T=new Uint8Array(w),S={Id:crypto.randomUUID().toUpperCase(),Filename:v.name,Blob:T,ItemId:"",CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString(),IsDeleted:!1};p.push(S)}e(p),l(r("attachmentUploader.uploadSuccess")),setTimeout(()=>l(""),3e3)}catch(p){console.error("Error uploading files:",p),l(r("common.errors.unknownErrorTryAgain")),setTimeout(()=>l(""),3e3)}g.target.value=""}},m=g=>{try{const A=[...t],p=A.findIndex(v=>v.Id===g.Id);p!==-1&&A.splice(p,1),e(A),l(r("attachmentUploader.deleteSuccess")),setTimeout(()=>l(""),3e3)}catch(A){console.error("Error deleting attachment:",A),l(r("common.errors.unknownErrorTryAgain")),setTimeout(()=>l(""),3e3)}},h=t.filter(g=>!g.IsDeleted);return d.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[d.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:r("common.attachments")}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{children:d.jsx("input",{type:"file",multiple:!0,onChange:c,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&&d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:s}),h.length>0&&d.jsx("div",{children:d.jsx("div",{className:"space-y-2",children:h.map(g=>d.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:[d.jsxs("div",{className:"flex flex-col",children:[d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:g.Filename}),d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(g.CreatedAt).toLocaleDateString()})]}),d.jsx("button",{type:"button",onClick:()=>m(g),className:"text-red-500 hover:text-red-700 focus:outline-none","aria-label":`Delete ${g.Filename}`,children:d.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]},g.Id))})})]})]})},Xf=({className:t="w-5 h-5"})=>d.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.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"})}),DO=({itemId:t})=>{const{t:e}=tt(),n=ta(),[r,s]=b.useState([]),[l,c]=b.useState(!0);return b.useEffect(()=>{if(!(n!=null&&n.sqliteClient)||!t){c(!1);return}try{const m=n.sqliteClient.passkeys.getByItemId(t);s(m)}catch(m){console.error("Error loading passkeys:",m)}finally{c(!1)}},[n==null?void 0:n.sqliteClient,t]),l?d.jsx("div",{className:"flex justify-center p-2",children:d.jsx(mi,{})}):r.length===0?null:d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:e("passkeys.passkey")}),r.map(m=>d.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Xf,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"mb-1",children:d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:m.DisplayName||e("passkeys.passkey")})}),d.jsx("div",{className:"space-y-1 mb-2",children:m.RpId&&d.jsxs("div",{children:[d.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[e("passkeys.site"),":"," "]}),d.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:m.RpId})]})}),d.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:e("passkeys.helpText")})]})]})},m.Id))]})},RO=({itemId:t,passkeyIdsMarkedForDeletion:e,onPasskeyMarkedForDeletion:n})=>{const{t:r}=tt(),s=ta(),[l,c]=b.useState([]),[m,h]=b.useState(!0);b.useEffect(()=>{if(!(s!=null&&s.sqliteClient)||!t){h(!1);return}try{const p=s.sqliteClient.passkeys.getByItemId(t);c(p)}catch(p){console.error("Error loading passkeys:",p)}finally{h(!1)}},[s==null?void 0:s.sqliteClient,t]);const g=p=>{e.includes(p)||n([...e,p])},A=p=>{n(e.filter(v=>v!==p))};return m?d.jsx("div",{className:"flex justify-center p-2",children:d.jsx(mi,{})}):l.length===0?null:d.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[d.jsx("h2",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-white",children:r("passkeys.passkey")}),d.jsx("div",{className:"space-y-3",children:l.map(p=>e.includes(p.Id)?d.jsx("div",{className:"p-3 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Xf,{className:"w-5 h-5 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"flex-1",children:[d.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-medium text-red-900 dark:text-red-100",children:r("passkeys.passkeyMarkedForDeletion")}),d.jsx("button",{type:"button",onClick:()=>A(p.Id),className:"text-gray-600 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:r("common.undo"),children:d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M3 7v6h6"}),d.jsx("path",{d:"M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13"})]})})]}),d.jsx("p",{className:"text-xs text-red-800 dark:text-red-200",children:r("passkeys.passkeyWillBeDeleted")})]})]})},p.Id):d.jsx("div",{className:"p-3 rounded bg-gray-50 dark:bg-gray-900 border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Xf,{className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"flex-1",children:[d.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:p.DisplayName||r("passkeys.passkey")}),d.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:r("common.delete"),children:d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("polyline",{points:"3 6 5 6 21 6"}),d.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"}),d.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),d.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]}),d.jsx("div",{className:"space-y-1 mb-2",children:p.RpId&&d.jsxs("div",{children:[d.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[r("passkeys.site"),":"," "]}),d.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:p.RpId})]})}),d.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:r("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 UO=t=>{const e=new ArrayBuffer(8),n=new Uint8Array(e);let r=t;for(let s=7;s>=0&&r!==0;s--)n[s]=r&255,r-=n[s],r/=256;return n};function Bu(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function MO(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Ju(t,...e){if(!MO(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function BO(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Bu(t.outputLen),Bu(t.blockLen)}function Ro(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Tk(t,e){Ju(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function _O(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function ff(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function Mi(t,e){return t<<32-e|t>>>e}function pf(t,e){return t<<e|t>>>32-e>>>0}const Jb=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function FO(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}function Xb(t){for(let e=0;e<t.length;e++)t[e]=FO(t[e])}function OO(t){if(typeof t!="string")throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array(new TextEncoder().encode(t))}function Xu(t){return typeof t=="string"&&(t=OO(t)),Ju(t),t}class Pp{clone(){return this._cloneInto()}}function Po(t){const e=r=>t().update(Xu(r)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}class kk extends Pp{update(e){return Ro(this),this.iHash.update(e),this}digestInto(e){Ro(this),Ju(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:n,iHash:r,finished:s,destroyed:l,blockLen:c,outputLen:m}=this;return e=e,e.finished=s,e.destroyed=l,e.blockLen=c,e.outputLen=m,e.oHash=n._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}constructor(e,n){super(),this.finished=!1,this.destroyed=!1,BO(e);const r=Xu(n);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,l=new Uint8Array(s);l.set(r.length>s?e.create().update(r).digest():r);for(let c=0;c<l.length;c++)l[c]^=54;this.iHash.update(l),this.oHash=e.create();for(let c=0;c<l.length;c++)l[c]^=106;this.oHash.update(l),l.fill(0)}}const $f=(t,e,n)=>new kk(t,e).update(n).digest();$f.create=(t,e)=>new kk(t,e);function PO(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);const s=BigInt(32),l=BigInt(4294967295),c=Number(n>>s&l),m=Number(n&l),h=r?4:0,g=r?0:4;t.setUint32(e+h,c,r),t.setUint32(e+g,m,r)}function xk(t,e,n){return t&e^~t&n}function Lk(t,e,n){return t&e^t&n^e&n}class jp extends Pp{update(e){Ro(this);const{view:n,buffer:r,blockLen:s}=this;e=Xu(e);const l=e.length;for(let c=0;c<l;){const m=Math.min(s-this.pos,l-c);if(m===s){const h=ff(e);for(;s<=l-c;c+=s)this.process(h,c);continue}r.set(e.subarray(c,c+m),this.pos),this.pos+=m,c+=m,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ro(this),Tk(e,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:l}=this;let{pos:c}=this;n[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>s-c&&(this.process(r,0),c=0);for(let p=c;p<s;p++)n[p]=0;PO(r,s-8,BigInt(this.length*8),l),this.process(r,0);const m=ff(e),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const g=h/4,A=this.get();if(g>A.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<g;p++)m.setUint32(4*p,A[p],l)}digest(){const{buffer:e,outputLen:n}=this;this.digestInto(e);const r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:l,destroyed:c,pos:m}=this;return e.length=s,e.pos=m,e.finished=l,e.destroyed=c,s%n&&e.buffer.set(r),e}constructor(e,n,r,s){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ff(this.buffer)}}const Wl=new Uint32Array([1732584193,4023233417,2562383102,271733878,3285377520]),Jr=new Uint32Array(80);class jO extends jp{get(){const{A:e,B:n,C:r,D:s,E:l}=this;return[e,n,r,s,l]}set(e,n,r,s,l){this.A=e|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=l|0}process(e,n){for(let h=0;h<16;h++,n+=4)Jr[h]=e.getUint32(n,!1);for(let h=16;h<80;h++)Jr[h]=pf(Jr[h-3]^Jr[h-8]^Jr[h-14]^Jr[h-16],1);let{A:r,B:s,C:l,D:c,E:m}=this;for(let h=0;h<80;h++){let g,A;h<20?(g=xk(s,l,c),A=1518500249):h<40?(g=s^l^c,A=1859775393):h<60?(g=Lk(s,l,c),A=2400959708):(g=s^l^c,A=3395469782);const p=pf(r,5)+g+m+A+Jr[h]|0;m=c,c=l,l=pf(s,30),s=r,r=p}r=r+this.A|0,s=s+this.B|0,l=l+this.C|0,c=c+this.D|0,m=m+this.E|0,this.set(r,s,l,c,m)}roundClean(){Jr.fill(0)}destroy(){this.set(0,0,0,0,0),this.buffer.fill(0)}constructor(){super(64,20,8,!1),this.A=Wl[0]|0,this.B=Wl[1]|0,this.C=Wl[2]|0,this.D=Wl[3]|0,this.E=Wl[4]|0}}const HO=Po(()=>new jO),VO=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]),Xr=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),$r=new Uint32Array(64);class Dk extends jp{get(){const{A:e,B:n,C:r,D:s,E:l,F:c,G:m,H:h}=this;return[e,n,r,s,l,c,m,h]}set(e,n,r,s,l,c,m,h){this.A=e|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=l|0,this.F=c|0,this.G=m|0,this.H=h|0}process(e,n){for(let p=0;p<16;p++,n+=4)$r[p]=e.getUint32(n,!1);for(let p=16;p<64;p++){const v=$r[p-15],w=$r[p-2],T=Mi(v,7)^Mi(v,18)^v>>>3,S=Mi(w,17)^Mi(w,19)^w>>>10;$r[p]=S+$r[p-7]+T+$r[p-16]|0}let{A:r,B:s,C:l,D:c,E:m,F:h,G:g,H:A}=this;for(let p=0;p<64;p++){const v=Mi(m,6)^Mi(m,11)^Mi(m,25),w=A+v+xk(m,h,g)+VO[p]+$r[p]|0,S=(Mi(r,2)^Mi(r,13)^Mi(r,22))+Lk(r,s,l)|0;A=g,g=h,h=m,m=c+w|0,c=l,l=s,s=r,r=w+S|0}r=r+this.A|0,s=s+this.B|0,l=l+this.C|0,c=c+this.D|0,m=m+this.E|0,h=h+this.F|0,g=g+this.G|0,A=A+this.H|0,this.set(r,s,l,c,m,h,g,A)}roundClean(){$r.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=Xr[0]|0,this.B=Xr[1]|0,this.C=Xr[2]|0,this.D=Xr[3]|0,this.E=Xr[4]|0,this.F=Xr[5]|0,this.G=Xr[6]|0,this.H=Xr[7]|0}}class zO extends Dk{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 QO=Po(()=>new Dk),KO=Po(()=>new zO),iu=BigInt(2**32-1),Zf=BigInt(32);function Rk(t,e=!1){return e?{h:Number(t&iu),l:Number(t>>Zf&iu)}:{h:Number(t>>Zf&iu)|0,l:Number(t&iu)|0}}function Uk(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let s=0;s<t.length;s++){const{h:l,l:c}=Rk(t[s],e);[n[s],r[s]]=[l,c]}return[n,r]}const GO=(t,e)=>BigInt(t>>>0)<<Zf|BigInt(e>>>0),WO=(t,e,n)=>t>>>n,qO=(t,e,n)=>t<<32-n|e>>>n,YO=(t,e,n)=>t>>>n|e<<32-n,JO=(t,e,n)=>t<<32-n|e>>>n,XO=(t,e,n)=>t<<64-n|e>>>n-32,$O=(t,e,n)=>t>>>n-32|e<<64-n,ZO=(t,e)=>e,eP=(t,e)=>t,Mk=(t,e,n)=>t<<n|e>>>32-n,Bk=(t,e,n)=>e<<n|t>>>32-n,_k=(t,e,n)=>e<<n-32|t>>>64-n,Fk=(t,e,n)=>t<<n-32|e>>>64-n;function tP(t,e,n,r){const s=(e>>>0)+(r>>>0);return{h:t+n+(s/2**32|0)|0,l:s|0}}const aP=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),nP=(t,e,n,r)=>e+n+r+(t/2**32|0)|0,iP=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),rP=(t,e,n,r,s)=>e+n+r+s+(t/2**32|0)|0,sP=(t,e,n,r,s)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(s>>>0),oP=(t,e,n,r,s,l)=>e+n+r+s+l+(t/2**32|0)|0,xt={fromBig:Rk,split:Uk,toBig:GO,shrSH:WO,shrSL:qO,rotrSH:YO,rotrSL:JO,rotrBH:XO,rotrBL:$O,rotr32H:ZO,rotr32L:eP,rotlSH:Mk,rotlSL:Bk,rotlBH:_k,rotlBL:Fk,add:tP,add3L:aP,add3H:nP,add4L:iP,add4H:rP,add5H:oP,add5L:sP},[lP,dP]=xt.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(t=>BigInt(t))),Zr=new Uint32Array(80),es=new Uint32Array(80);class Ok extends jp{get(){const{Ah:e,Al:n,Bh:r,Bl:s,Ch:l,Cl:c,Dh:m,Dl:h,Eh:g,El:A,Fh:p,Fl:v,Gh:w,Gl:T,Hh:S,Hl:k}=this;return[e,n,r,s,l,c,m,h,g,A,p,v,w,T,S,k]}set(e,n,r,s,l,c,m,h,g,A,p,v,w,T,S,k){this.Ah=e|0,this.Al=n|0,this.Bh=r|0,this.Bl=s|0,this.Ch=l|0,this.Cl=c|0,this.Dh=m|0,this.Dl=h|0,this.Eh=g|0,this.El=A|0,this.Fh=p|0,this.Fl=v|0,this.Gh=w|0,this.Gl=T|0,this.Hh=S|0,this.Hl=k|0}process(e,n){for(let x=0;x<16;x++,n+=4)Zr[x]=e.getUint32(n),es[x]=e.getUint32(n+=4);for(let x=16;x<80;x++){const F=Zr[x-15]|0,B=es[x-15]|0,V=xt.rotrSH(F,B,1)^xt.rotrSH(F,B,8)^xt.shrSH(F,B,7),O=xt.rotrSL(F,B,1)^xt.rotrSL(F,B,8)^xt.shrSL(F,B,7),_=Zr[x-2]|0,z=es[x-2]|0,Q=xt.rotrSH(_,z,19)^xt.rotrBH(_,z,61)^xt.shrSH(_,z,6),K=xt.rotrSL(_,z,19)^xt.rotrBL(_,z,61)^xt.shrSL(_,z,6),te=xt.add4L(O,K,es[x-7],es[x-16]),ee=xt.add4H(te,V,Q,Zr[x-7],Zr[x-16]);Zr[x]=ee|0,es[x]=te|0}let{Ah:r,Al:s,Bh:l,Bl:c,Ch:m,Cl:h,Dh:g,Dl:A,Eh:p,El:v,Fh:w,Fl:T,Gh:S,Gl:k,Hh:L,Hl:U}=this;for(let x=0;x<80;x++){const F=xt.rotrSH(p,v,14)^xt.rotrSH(p,v,18)^xt.rotrBH(p,v,41),B=xt.rotrSL(p,v,14)^xt.rotrSL(p,v,18)^xt.rotrBL(p,v,41),V=p&w^~p&S,O=v&T^~v&k,_=xt.add5L(U,B,O,dP[x],es[x]),z=xt.add5H(_,L,F,V,lP[x],Zr[x]),Q=_|0,K=xt.rotrSH(r,s,28)^xt.rotrBH(r,s,34)^xt.rotrBH(r,s,39),te=xt.rotrSL(r,s,28)^xt.rotrBL(r,s,34)^xt.rotrBL(r,s,39),ee=r&l^r&m^l&m,Y=s&c^s&h^c&h;L=S|0,U=k|0,S=w|0,k=T|0,w=p|0,T=v|0,{h:p,l:v}=xt.add(g|0,A|0,z|0,Q|0),g=m|0,A=h|0,m=l|0,h=c|0,l=r|0,c=s|0;const le=xt.add3L(Q,te,Y);r=xt.add3H(le,z,K,ee),s=le|0}({h:r,l:s}=xt.add(this.Ah|0,this.Al|0,r|0,s|0)),{h:l,l:c}=xt.add(this.Bh|0,this.Bl|0,l|0,c|0),{h:m,l:h}=xt.add(this.Ch|0,this.Cl|0,m|0,h|0),{h:g,l:A}=xt.add(this.Dh|0,this.Dl|0,g|0,A|0),{h:p,l:v}=xt.add(this.Eh|0,this.El|0,p|0,v|0),{h:w,l:T}=xt.add(this.Fh|0,this.Fl|0,w|0,T|0),{h:S,l:k}=xt.add(this.Gh|0,this.Gl|0,S|0,k|0),{h:L,l:U}=xt.add(this.Hh|0,this.Hl|0,L|0,U|0),this.set(r,s,l,c,m,h,g,A,p,v,w,T,S,k,L,U)}roundClean(){Zr.fill(0),es.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 cP extends Ok{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 uP=Po(()=>new Ok),mP=Po(()=>new cP),Pk=[],jk=[],Hk=[],gP=BigInt(0),ql=BigInt(1),hP=BigInt(2),fP=BigInt(7),pP=BigInt(256),AP=BigInt(113);for(let t=0,e=ql,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],Pk.push(2*(5*r+n)),jk.push((t+1)*(t+2)/2%64);let s=gP;for(let l=0;l<7;l++)e=(e<<ql^(e>>fP)*AP)%pP,e&hP&&(s^=ql<<(ql<<BigInt(l))-ql);Hk.push(s)}const[yP,EP]=Uk(Hk,!0),$b=(t,e,n)=>n>32?_k(t,e,n):Mk(t,e,n),Zb=(t,e,n)=>n>32?Fk(t,e,n):Bk(t,e,n);function bP(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let c=0;c<10;c++)n[c]=t[c]^t[c+10]^t[c+20]^t[c+30]^t[c+40];for(let c=0;c<10;c+=2){const m=(c+8)%10,h=(c+2)%10,g=n[h],A=n[h+1],p=$b(g,A,1)^n[m],v=Zb(g,A,1)^n[m+1];for(let w=0;w<50;w+=10)t[c+w]^=p,t[c+w+1]^=v}let s=t[2],l=t[3];for(let c=0;c<24;c++){const m=jk[c],h=$b(s,l,m),g=Zb(s,l,m),A=Pk[c];s=t[A],l=t[A+1],t[A]=h,t[A+1]=g}for(let c=0;c<50;c+=10){for(let m=0;m<10;m++)n[m]=t[c+m];for(let m=0;m<10;m++)t[c+m]^=~n[(m+2)%10]&n[(m+4)%10]}t[0]^=yP[r],t[1]^=EP[r]}n.fill(0)}class Hp extends Pp{keccak(){Jb||Xb(this.state32),bP(this.state32,this.rounds),Jb||Xb(this.state32),this.posOut=0,this.pos=0}update(e){Ro(this);const{blockLen:n,state:r}=this;e=Xu(e);const s=e.length;for(let l=0;l<s;){const c=Math.min(n-this.pos,s-l);for(let m=0;m<c;m++)r[this.pos++]^=e[l++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:n,pos:r,blockLen:s}=this;e[r]^=n,(n&128)!==0&&r===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){Ro(this,!1),Ju(e),this.finish();const n=this.state,{blockLen:r}=this;for(let s=0,l=e.length;s<l;){this.posOut>=r&&this.keccak();const c=Math.min(r-this.posOut,l-s);e.set(n.subarray(this.posOut,this.posOut+c),s),this.posOut+=c,s+=c}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Bu(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Tk(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:n,suffix:r,outputLen:s,rounds:l,enableXOF:c}=this;return e||(e=new Hp(n,r,s,c,l)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=l,e.suffix=r,e.outputLen=s,e.enableXOF=c,e.destroyed=this.destroyed,e}constructor(e,n,r,s=!1,l=24){if(super(),this.blockLen=e,this.suffix=n,this.outputLen=r,this.enableXOF=s,this.rounds=l,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Bu(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=_O(this.state)}}const $u=(t,e,n)=>Po(()=>new Hp(e,t,n)),vP=$u(6,144,224/8),wP=$u(6,136,256/8),IP=$u(6,104,384/8),CP=$u(6,72,512/8),Uo=(()=>{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})(),ev={SHA1:HO,SHA224:KO,SHA256:QO,SHA384:mP,SHA512:uP,"SHA3-224":vP,"SHA3-256":wP,"SHA3-384":IP,"SHA3-512":CP},Vp=t=>{switch(!0){case/^(?:SHA-?1|SSL3-SHA1)$/i.test(t):return"SHA1";case/^SHA(?:2?-)?224$/i.test(t):return"SHA224";case/^SHA(?:2?-)?256$/i.test(t):return"SHA256";case/^SHA(?:2?-)?384$/i.test(t):return"SHA384";case/^SHA(?:2?-)?512$/i.test(t):return"SHA512";case/^SHA3-224$/i.test(t):return"SHA3-224";case/^SHA3-256$/i.test(t):return"SHA3-256";case/^SHA3-384$/i.test(t):return"SHA3-384";case/^SHA3-512$/i.test(t):return"SHA3-512";default:throw new TypeError(`Unknown hash algorithm: ${t}`)}},SP=(t,e,n)=>{if($f){const r=ev[t]??ev[Vp(t)];return $f(r,e,n)}else throw new Error("Missing HMAC function")},ep="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",NP=t=>{t=t.replace(/ /g,"");let e=t.length;for(;t[e-1]==="=";)--e;t=(e<t.length?t.substring(0,e):t).toUpperCase();const n=new ArrayBuffer(t.length*5/8|0),r=new Uint8Array(n);let s=0,l=0,c=0;for(let m=0;m<t.length;m++){const h=ep.indexOf(t[m]);if(h===-1)throw new TypeError(`Invalid character found: ${t[m]}`);l=l<<5|h,s+=5,s>=8&&(s-=8,r[c++]=l>>>s)}return r},TP=t=>{let e=0,n=0,r="";for(let s=0;s<t.length;s++)for(n=n<<8|t[s],e+=8;e>=5;)r+=ep[n>>>e-5&31],e-=5;return e>0&&(r+=ep[n<<5-e&31]),r},kP=t=>{t=t.replace(/ /g,"");const e=new ArrayBuffer(t.length/2),n=new Uint8Array(e);for(let r=0;r<t.length;r+=2)n[r/2]=parseInt(t.substring(r,r+2),16);return n},xP=t=>{let e="";for(let n=0;n<t.length;n++){const r=t[n].toString(16);r.length===1&&(e+="0"),e+=r}return e.toUpperCase()},LP=t=>{const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r)&255;return n},DP=t=>{let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},tv=Uo.TextEncoder?new Uo.TextEncoder:null,av=Uo.TextDecoder?new Uo.TextDecoder:null,RP=t=>{if(!tv)throw new Error("Encoding API not available");return tv.encode(t)},UP=t=>{if(!av)throw new Error("Encoding API not available");return av.decode(t)},MP=t=>{var e;if((e=Uo.crypto)!=null&&e.getRandomValues)return Uo.crypto.getRandomValues(new Uint8Array(t));throw new Error("Cryptography API not available")};class pr{static fromLatin1(e){return new pr({buffer:LP(e).buffer})}static fromUTF8(e){return new pr({buffer:RP(e).buffer})}static fromBase32(e){return new pr({buffer:NP(e).buffer})}static fromHex(e){return new pr({buffer:kP(e).buffer})}get buffer(){return this.bytes.buffer}get latin1(){return Object.defineProperty(this,"latin1",{enumerable:!0,writable:!1,configurable:!1,value:DP(this.bytes)}),this.latin1}get utf8(){return Object.defineProperty(this,"utf8",{enumerable:!0,writable:!1,configurable:!1,value:UP(this.bytes)}),this.utf8}get base32(){return Object.defineProperty(this,"base32",{enumerable:!0,writable:!1,configurable:!1,value:TP(this.bytes)}),this.base32}get hex(){return Object.defineProperty(this,"hex",{enumerable:!0,writable:!1,configurable:!1,value:xP(this.bytes)}),this.hex}constructor({buffer:e,size:n=20}={}){this.bytes=typeof e>"u"?MP(n):new Uint8Array(e),Object.defineProperty(this,"bytes",{enumerable:!0,writable:!1,configurable:!1,value:this.bytes})}}const BP=(t,e)=>{{if(t.length!==e.length)throw new TypeError("Input strings must have the same length");let n=-1,r=0;for(;++n<t.length;)r|=t.charCodeAt(n)^e.charCodeAt(n);return r===0}};class Ha{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,counter:0,window:1}}static generate({secret:e,algorithm:n=Ha.defaults.algorithm,digits:r=Ha.defaults.digits,counter:s=Ha.defaults.counter}){const l=SP(n,e.bytes,UO(s)),c=l[l.byteLength-1]&15;return(((l[c]&127)<<24|(l[c+1]&255)<<16|(l[c+2]&255)<<8|l[c+3]&255)%10**r).toString().padStart(r,"0")}generate({counter:e=this.counter++}={}){return Ha.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:e})}static validate({token:e,secret:n,algorithm:r,digits:s=Ha.defaults.digits,counter:l=Ha.defaults.counter,window:c=Ha.defaults.window}){if(e.length!==s)return null;let m=null;const h=g=>{const A=Ha.generate({secret:n,algorithm:r,digits:s,counter:g});BP(e,A)&&(m=g-l)};h(l);for(let g=1;g<=c&&m===null&&(h(l-g),!(m!==null||(h(l+g),m!==null)));++g);return m}validate({token:e,counter:n=this.counter,window:r}){return Ha.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,counter:n,window:r})}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=Ha.defaults.issuer,label:n=Ha.defaults.label,issuerInLabel:r=Ha.defaults.issuerInLabel,secret:s=new pr,algorithm:l=Ha.defaults.algorithm,digits:c=Ha.defaults.digits,counter:m=Ha.defaults.counter}={}){this.issuer=e,this.label=n,this.issuerInLabel=r,this.secret=typeof s=="string"?pr.fromBase32(s):s,this.algorithm=Vp(l),this.digits=c,this.counter=m}}class ka{static get defaults(){return{issuer:"",label:"OTPAuth",issuerInLabel:!0,algorithm:"SHA1",digits:6,period:30,window:1}}static counter({period:e=ka.defaults.period,timestamp:n=Date.now()}={}){return Math.floor(n/1e3/e)}counter({timestamp:e=Date.now()}={}){return ka.counter({period:this.period,timestamp:e})}static remaining({period:e=ka.defaults.period,timestamp:n=Date.now()}={}){return e*1e3-n%(e*1e3)}remaining({timestamp:e=Date.now()}={}){return ka.remaining({period:this.period,timestamp:e})}static generate({secret:e,algorithm:n,digits:r,period:s=ka.defaults.period,timestamp:l=Date.now()}){return Ha.generate({secret:e,algorithm:n,digits:r,counter:ka.counter({period:s,timestamp:l})})}generate({timestamp:e=Date.now()}={}){return ka.generate({secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:e})}static validate({token:e,secret:n,algorithm:r,digits:s,period:l=ka.defaults.period,timestamp:c=Date.now(),window:m}){return Ha.validate({token:e,secret:n,algorithm:r,digits:s,counter:ka.counter({period:l,timestamp:c}),window:m})}validate({token:e,timestamp:n,window:r}){return ka.validate({token:e,secret:this.secret,algorithm:this.algorithm,digits:this.digits,period:this.period,timestamp:n,window:r})}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=ka.defaults.issuer,label:n=ka.defaults.label,issuerInLabel:r=ka.defaults.issuerInLabel,secret:s=new pr,algorithm:l=ka.defaults.algorithm,digits:c=ka.defaults.digits,period:m=ka.defaults.period}={}){this.issuer=e,this.label=n,this.issuerInLabel=r,this.secret=typeof s=="string"?pr.fromBase32(s):s,this.algorithm=Vp(l),this.digits=c,this.period=m}}const _P=/^otpauth:\/\/([ht]otp)\/(.+)\?([A-Z0-9.~_-]+=[^?&]*(?:&[A-Z0-9.~_-]+=[^?&]*)*)$/i,FP=/^[2-7A-Z]+=*$/i,OP=/^SHA(?:1|224|256|384|512|3-224|3-256|3-384|3-512)$/i,PP=/^[+-]?\d+$/,nv=/^\+?[1-9]\d*$/;class jP{static parse(e){let n;try{n=e.match(_P)}catch{}if(!Array.isArray(n))throw new URIError("Invalid URI format");const r=n[1].toLowerCase(),s=n[2].split(/(?::|%3A) *(.+)/i,2).map(decodeURIComponent),l=n[3].split("&").reduce((h,g)=>{const A=g.split(/=(.*)/,2).map(decodeURIComponent),p=A[0].toLowerCase(),v=A[1],w=h;return w[p]=v,w},{});let c;const m={};if(r==="hotp")if(c=Ha,typeof l.counter<"u"&&PP.test(l.counter))m.counter=parseInt(l.counter,10);else throw new TypeError("Missing or invalid 'counter' parameter");else if(r==="totp"){if(c=ka,typeof l.period<"u")if(nv.test(l.period))m.period=parseInt(l.period,10);else throw new TypeError("Invalid 'period' parameter")}else throw new TypeError("Unknown OTP type");if(typeof l.issuer<"u"&&(m.issuer=l.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 l.secret<"u"&&FP.test(l.secret))m.secret=l.secret;else throw new TypeError("Missing or invalid 'secret' parameter");if(typeof l.algorithm<"u")if(OP.test(l.algorithm))m.algorithm=l.algorithm;else throw new TypeError("Invalid 'algorithm' parameter");if(typeof l.digits<"u")if(nv.test(l.digits))m.digits=parseInt(l.digits,10);else throw new TypeError("Invalid 'digits' parameter");return new c(m)}static stringify(e){if(e instanceof Ha||e instanceof ka)return e.toString();throw new TypeError("Invalid 'HOTP/TOTP' object")}}const tp=({isOpen:t,onClose:e,onConfirm:n,title:r,message:s,confirmText:l})=>{const{t:c}=tt();return d.jsx(Zn,{isOpen:t,onClose:e,title:r,maxWidth:"max-w-sm",footer:d.jsxs("div",{className:"flex justify-end gap-2",children:[d.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:c("common.cancel")}),d.jsx("button",{onClick:n,className:"px-4 py-2 text-sm bg-red-600 text-white rounded hover:bg-red-700",children:l})]}),children:d.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:s})})},HP=({totpCodes:t,onTotpCodesChange:e,originalTotpCodeIds:n,isAddFormVisible:r,formData:s,onStateChange:l,itemDisplayName:c,itemUsername:m})=>{const{t:h}=tt(),[g,A]=b.useState(null),[p,v]=b.useState(!1),[w,T]=b.useState(null),[S,k]=b.useState(""),[L,U]=b.useState(""),[x,F]=b.useState(!1),[B,V]=b.useState(null),[O,_]=b.useState(!1),[z,Q]=b.useState(null),K=(ce,Ee)=>{let Te=ce.trim(),Ce=Ee.trim();if(Te.toLowerCase().startsWith("otpauth://totp/"))try{const Pe=jP.parse(Te);Pe instanceof ka&&(Te=Pe.secret.base32,!Ce&&Pe.label&&(Ce=Pe.label))}catch{throw new Error(h("totp.errors.invalidSecretKey"))}if(Te=Te.replace(/\s/g,""),!/^[A-Z2-7]+=*$/i.test(Te))throw new Error(h("totp.errors.invalidSecretKey"));return{secretKey:Te,name:Ce||h("totp.defaultName")}},te=()=>{l({isAddFormVisible:!0,formData:{name:"",secretKey:""}}),A(null)},ee=()=>{l({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),A(null)},Y=ce=>{l({isAddFormVisible:r,formData:{...s,...ce}})},le=ce=>{if(ce==null||ce.preventDefault(),A(null),!s.secretKey){A(h("items.validation.required"));return}try{const{secretKey:Ee,name:Te}=K(s.secretKey,s.name),Ce={Id:crypto.randomUUID().toUpperCase(),Name:Te,SecretKey:Ee,ItemId:""},Pe=[...t,Ce];e(Pe),ee()}catch(Ee){Ee instanceof Error?A(Ee.message):A(h("common.errors.unknownErrorTryAgain"))}},J=ce=>{Q(ce),_(!0)},ie=()=>{if(!z)return;const ce=n.includes(z.Id);let Ee;ce?Ee=t.map(Te=>Te.Id===z.Id?{...Te,IsDeleted:!0}:Te):Ee=t.filter(Te=>Te.Id!==z.Id),e(Ee),_(!1),Q(null)},be=()=>{_(!1),Q(null)},se=ce=>{T(ce),k(ce.Name),U(ce.SecretKey),v(!0),F(!1)},j=()=>{v(!1),T(null),k(""),U(""),F(!1),V(null)},W=()=>{if(!w)return;const ce=t.map(Ee=>Ee.Id===w.Id?{...Ee,Name:S,SecretKey:L}:Ee);e(ce),j()},X=()=>{if(!x&&w){const ce=c||"AliasVault",Ee=m||w.Name,Ce=`otpauth://totp/${`${encodeURIComponent(ce)}:${encodeURIComponent(Ee)}`}?secret=${w.SecretKey}&issuer=${encodeURIComponent(ce)}`;qT.toDataURL(Ce,{width:256,margin:2,color:{dark:"#000000",light:"#FFFFFF"}}).then(Pe=>V(Pe)).catch(Pe=>console.error("Failed to generate QR code:",Pe))}F(!x)},ne=t.filter(ce=>!ce.IsDeleted),we=ne.length>0;return d.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:h("common.twoFactorAuthentication")}),we&&!r&&d.jsx("button",{type:"button",onClick:te,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:h("totp.addCode"),children:d.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),d.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})]}),!we&&!r&&d.jsxs("button",{type:"button",onClick:te,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:[d.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),d.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),d.jsx("span",{children:h("totp.addCode")})]}),r&&d.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:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsx("h4",{className:"text-lg font-medium text-gray-900 dark:text-white",children:h("totp.addCode")}),we&&d.jsx("button",{type:"button",onClick:ee,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:d.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 14 14",children:d.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})})})]}),d.jsx("p",{className:"mb-4 text-sm text-gray-500 dark:text-gray-400",children:h("totp.instructions")}),g&&d.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:d.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:g})}),d.jsxs("div",{className:"mb-4",children:[d.jsx("label",{htmlFor:"totp-name",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:h("totp.nameOptional")}),d.jsx("input",{id:"totp-name",type:"text",value:s.name,onChange:ce=>Y({name:ce.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"})]}),d.jsxs("div",{className:"mb-4",children:[d.jsx("label",{htmlFor:"totp-secret",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:h("totp.secretKey")}),d.jsx("input",{id:"totp-secret",type:"text",value:s.secretKey,onChange:ce=>Y({secretKey:ce.target.value}),onKeyDown:ce=>{ce.key==="Enter"&&(ce.preventDefault(),le(ce))},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"})]}),d.jsx("div",{className:"flex justify-end",children:d.jsx("button",{type:"button",onClick:ce=>le(ce),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:h("common.save")})})]}),we&&d.jsx("div",{className:"grid grid-cols-1 gap-4 mt-4",children:ne.map(ce=>d.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:d.jsxs("div",{className:"flex justify-between items-center gap-2",children:[d.jsx("div",{className:"flex items-center flex-1",children:d.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:ce.Name})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("div",{className:"flex flex-col items-end",children:d.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:h("totp.saveToViewCode")})}),d.jsx("button",{type:"button",onClick:()=>se(ce),className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:h("common.edit"),children:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}),d.jsx("button",{type:"button",onClick:()=>J(ce),className:"text-red-600 hover:text-red-800 dark:text-red-500 dark:hover:text-red-400",title:h("common.delete"),children:d.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",children:d.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"})})})]})]})},ce.Id))}),d.jsx(Zn,{isOpen:p,onClose:j,title:h("common.edit"),maxWidth:"max-w-lg",children:d.jsx("div",{className:"space-y-4",children:w&&d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium text-gray-900 dark:text-white mb-2",children:h("totp.nameOptional")}),d.jsx("input",{type:"text",value:S,onChange:ce=>k(ce.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-700 dark:border-gray-600 dark:text-white",placeholder:h("totp.nameOptional")})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("label",{className:"text-sm font-medium text-gray-900 dark:text-white",children:h("totp.secretKey")}),d.jsx("button",{type:"button",onClick:X,className:"text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 p-1",title:x?h("common.hide")+" QR Code":h("common.show")+" QR Code",children:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v1m6 11h2m-6 0h-2v4m0-11v3m0 0h.01M12 12h4.01M16 20h4M4 12h4m12 0h.01M5 8h2a1 1 0 001-1V5a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1zm12 0h2a1 1 0 001-1V5a1 1 0 00-1-1h-2a1 1 0 00-1 1v2a1 1 0 001 1zM5 20h2a1 1 0 001-1v-2a1 1 0 00-1-1H5a1 1 0 00-1 1v2a1 1 0 001 1z"})})})]}),d.jsx("input",{type:"text",value:L,onChange:ce=>U(ce.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-700 dark:border-gray-600 dark:text-white font-mono",placeholder:h("totp.secretKey")}),x&&B&&d.jsx("div",{className:"flex justify-center mt-3",children:d.jsx("div",{className:"bg-white border-2 border-white rounded-lg",children:d.jsx("img",{src:B,alt:"TOTP QR Code",className:"w-64 h-64"})})})]}),d.jsx("button",{type:"button",onClick:W,className:"w-full 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 text-center dark:bg-primary-600 dark:hover:bg-primary-700 dark:focus:ring-primary-800",children:h("common.save")})]})})}),d.jsx(tp,{isOpen:O,onClose:be,onConfirm:ie,title:h("totp.deleteTotpCodeTitle"),message:h("totp.deleteTotpCodeConfirmation",{name:z==null?void 0:z.Name}),confirmText:h("common.delete")})]})},VP=({inputRef:t,value:e,onChange:n,folders:r,selectedFolderId:s,onFolderChange:l})=>{const{t:c}=tt(),[m,h]=b.useState(!1),g=r.find(T=>T.Id===s),A=b.useCallback(T=>{l(T),h(!1)},[l]),p=b.useCallback(T=>{n(T.target.value)},[n]),v=b.useCallback(()=>{h(!0)},[]),w=b.useCallback(()=>{h(!1)},[]);return d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsxs("label",{htmlFor:"itemName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:[c("items.itemName")," ",d.jsx("span",{className:"text-red-500",children:"*"})]}),d.jsxs("div",{className:"relative flex items-center",children:[d.jsx("input",{ref:t,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}),d.jsxs("button",{type:"button",onClick:v,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:[d.jsx("svg",{className:"w-4 h-4 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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&&d.jsx("span",{className:"max-w-16 truncate",children:g==null?void 0:g.Name})]})]})]}),m&&d.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[d.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-80 transition-opacity",onClick:w}),d.jsx("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:d.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:[d.jsxs("button",{type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-500 focus:outline-none",onClick:w,children:[d.jsx("span",{className:"sr-only",children:c("common.close")}),d.jsx("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]}),d.jsx("div",{className:"mb-4",children:d.jsx("h3",{className:"text-lg font-semibold leading-6 text-gray-900 dark:text-white",children:c("items.folder")})}),d.jsxs("div",{className:"space-y-1 max-h-64 overflow-y-auto",children:[d.jsxs("button",{type:"button",onClick:()=>A(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:[d.jsx("svg",{className:`w-5 h-5 ${s?"text-gray-400":"text-primary-500"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),d.jsx("span",{className:"font-medium",children:"—"}),!s&&d.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:d.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"})})]}),r.map(T=>d.jsxs("button",{type:"button",onClick:()=>A(T.Id),className:`w-full px-3 py-2 text-left rounded-md flex items-center gap-3 transition-colors ${s===T.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:[d.jsx("svg",{className:`w-5 h-5 ${s===T.Id?"text-primary-500":"text-gray-400"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})}),d.jsx("span",{className:"font-medium",children:T.Name}),s===T.Id&&d.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:d.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"})})]},T.Id))]})]})})]})]})},_u=[{type:Ea.Login,titleKey:"itemTypes.login.title",iconSvg:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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:Ea.Alias,titleKey:"itemTypes.alias.title",iconSvg:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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:Ea.CreditCard,titleKey:"itemTypes.creditCard.title",iconSvg:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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:Ea.Note,titleKey:"itemTypes.note.title",iconSvg:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}],zP=({selectedType:t,isEditMode:e,showDropdown:n,onDropdownToggle:r,onTypeChange:s,onRegenerateAlias:l})=>{const{t:c}=tt(),m=_u.find(h=>h.type===t);return d.jsxs("div",{className:"relative",children:[d.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:[d.jsxs("button",{type:"button",onClick:()=>r(!n),className:"flex-1 flex items-center justify-between hover:opacity-80 transition-opacity",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:m==null?void 0:m.iconSvg}),d.jsxs("span",{className:"text-primary-700 dark:text-primary-300 font-medium text-sm",children:[c(e?"itemTypes.editing":"itemTypes.creating")," ",m?c(m.titleKey):""]})]}),d.jsx("svg",{className:`w-4 h-4 text-primary-500 transition-transform ${n?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),t===Ea.Alias&&!e&&l&&d.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),l()},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:c("itemTypes.regenerateAlias"),children:d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M23 4v6h-6"}),d.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})]}),n&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>r(!1)}),d.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:_u.map(h=>d.jsxs("button",{type:"button",onClick:()=>s(h.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 ${t===h.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[d.jsx("span",{className:t===h.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:h.iconSvg}),d.jsx("span",{className:"font-medium",children:c(h.titleKey)}),t===h.type&&d.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:d.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"})})]},h.type))})]})]})};var Vk=(t=>(t.Male="Male",t.Female="Female",t.Other="Other",t))(Vk||{}),zp=class ur{constructor(){this.symbols=[".","-"]}generateUsername(e){let n=this.generateEmailPrefix(e);return n=n.replace(/[^a-zA-Z0-9]/g,""),n.length<ur.MIN_LENGTH?n+=this.generateRandomString(ur.MIN_LENGTH-n.length):n.length>ur.MAX_LENGTH&&(n=n.substring(0,ur.MAX_LENGTH)),n}generateEmailPrefix(e){const n=[];switch(typeof e.birthDate=="string"&&(e.birthDate=new Date(e.birthDate)),this.getSecureRandom(4)){case 0:n.push(e.firstName.substring(0,1).toLowerCase()+e.lastName.toLowerCase());break;case 1:n.push((e.firstName+e.lastName).toLowerCase());break;case 2:n.push(e.firstName.toLowerCase()+e.lastName.substring(0,1).toLowerCase());break;case 3:n.push(e.firstName.substring(0,Math.min(3,e.firstName.length)).toLowerCase()+e.lastName.toLowerCase());break}switch(this.getSecureRandom(2)){case 0:n.push(e.birthDate.getFullYear().toString());break;case 1:n.push(e.birthDate.getFullYear().toString().substring(2));break}let r=n.join(this.getRandomSymbol());if(this.getSecureRandom(2)===0){const s=this.getSecureRandom(r.length);r=r.slice(0,s)+this.getRandomSymbol()+r.slice(s)}return r=this.sanitizeEmailPrefix(r),r.length<ur.MIN_LENGTH?r+=this.generateRandomString(ur.MIN_LENGTH-r.length):r.length>ur.MAX_LENGTH&&(r=r.substring(0,ur.MAX_LENGTH)),r}generateRandomEmailPrefix(e=14){return this.generateRandomString(e)}sanitizeEmailPrefix(e){let n=e.replace(/[^a-zA-Z0-9._-]/g,"");return n=n.replace(/[-_.]{2,}/g,r=>r[0]),n=n.replace(/^[-._]+/,""),n=n.replace(/[-._]*$/,""),n}getRandomSymbol(){return this.getSecureRandom(3)===0?this.symbols[this.getSecureRandom(this.symbols.length)]:""}generateRandomString(e){const n="abcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:e},()=>n.charAt(this.getSecureRandom(n.length))).join("")}getSecureRandom(e){const n=new Uint32Array(1);return crypto.getRandomValues(n),n[0]%e}};zp.MIN_LENGTH=6;zp.MAX_LENGTH=20;var Qp=zp,Ci=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(t){if(t){const{targetYear:m,yearDeviation:h}=t;if(h===0){const g=new Date(m,0,1),A=new Date(m,11,31),p=g.getTime()+this.random()*(A.getTime()-g.getTime());return new Date(p)}else{const g=m-h,A=m+h,p=new Date(g,0,1),v=new Date(A,11,31),w=p.getTime()+this.random()*(v.getTime()-p.getTime());return new Date(w)}}const e=new Date,n=21,r=65,s=new Date(e.getFullYear()-r,e.getMonth(),e.getDate()),l=new Date(e.getFullYear()-n,e.getMonth(),e.getDate()),c=s.getTime()+this.random()*(l.getTime()-s.getTime());return new Date(c)}selectFirstnamesForBirthdate(t,e){const n=t.getFullYear(),r=e?this.getFirstNamesMaleByDecade():this.getFirstNamesFemaleByDecade();if(r.length===0)return e?this.firstNamesMale:this.firstNamesFemale;const s=r.filter(c=>n>=c.startYear&&n<=c.endYear);if(s.length>0){const c=[];return s.forEach(m=>c.push(...m.names)),c}const l=[];return r.forEach(c=>l.push(...c.names)),l.length>0?l:e?this.firstNamesMale:this.firstNamesFemale}generateRandomIdentity(t,e){const n={firstName:"",lastName:"",gender:"Male",birthDate:new Date,emailPrefix:"",nickName:""};let r;t==="random"||t===void 0?r=this.random()<.5?"Male":"Female":t==="male"?r="Male":t==="female"?r="Female":r="Male",n.gender=r,n.birthDate=this.generateRandomDateOfBirth(e);let s;if(r==="Male")s=this.selectFirstnamesForBirthdate(n.birthDate,!0);else if(r==="Female")s=this.selectFirstnamesForBirthdate(n.birthDate,!1);else{const c=this.random()<.5;s=this.selectFirstnamesForBirthdate(n.birthDate,c)}n.firstName=s[Math.floor(this.random()*s.length)],n.lastName=this.lastNames[Math.floor(this.random()*this.lastNames.length)];const l=new Qp;return n.emailPrefix=l.generateEmailPrefix(n),n.nickName=l.generateUsername(n),n}},QP=["William","Karl","Emil","Oscar","Malthe","Noah","Valdemar","Aksel","August","Oliver","Lucas","Alfred","Theo","Elias","Arthur","Otto","Elliot","Felix","Victor","Magnus","Hugo","Viggo","Matheo","Louie","Liam","Lauge","Anton","Theodor","Anker","Konrad","Peter","Michael","Lars","Jens","Thomas","Henrik","Søren","Christian","Martin","Jan","Morten","Jesper","Anders","Niels","Mads","Rasmus","Per","Mikkel","Kim","Hans","Ole","Jørgen","Erik","Frederik","John","Jonas","Mathias","Claus","Daniel","Asger","Albert","Arne","Børge","Carl","Cornelius","Ebbe","Edvard","Egon","Ejvind","Elmer","Eskild","Finn","Frode","Georg","Gerhard","Gorm","Gregers","Gunnar","Harald","Henning","Ib","Ivar","Jakob","Jeppe","Joakim","Johan","Johannes","Julius","Kaj","Kasper","Kenneth","Kevin","Kristian","Kurt","Kåre","Lasse","Leif","Marius","Nicklas"],KP=["Emma","Ella","Luna","Alma","Frida","Olivia","Agnes","Clara","Sofia","Karla","Ida","Asta","Josefine","Anna","Ellie","Victoria","Laura","Freja","Maja","Isabella","Mathilde","Lærke","Sara","Caroline","Alberte","Nikoline","Emilie","Katrine","Julie","Merle","Signe","Nanna","Rosa","Esther","Simone","Edith","Augusta","Dagmar","Ingrid","Astrid","Gerda","Bodil","Gudrun","Gunhild","Thora","Thyra","Helga","Olga","Oda","Margrethe","Anne","Mette","Kirsten","Hanne","Marianne","Lene","Susanne","Pia","Gitte","Bente","Dorte","Lone","Tina","Camilla","Louise","Cecilie","Sofie","Line","Trine","Sanne","Rikke","Malene","Pernille","Henriette","Charlotte","Amalie","Mille","Silje","Tilde","Liv","Ea","Vega","Vilje","Elva","Thea","Caya","Lotus","Carla","Agnete","Alice","Alvilda","Annie","Ane","Almine","Doris","Dorthea"],GP=["Nielsen","Jensen","Hansen","Pedersen","Andersen","Christensen","Larsen","Sørensen","Rasmussen","Jørgensen","Petersen","Madsen","Kristensen","Olsen","Thomsen","Christiansen","Poulsen","Johansen","Møller","Schmidt","Holm","Knudsen","Mortensen","Jacobsen","Jakobsen","Henriksen","Lauridsen","Bendtsen","Jepsen","Bach","Krogh","Bech","Bøgh","Friis","Nygaard","Winther","Bachmann","Vinther","Kragh","Storm","Berg","Buhl","Kjeldsen","Hedegaard","Kjær","Damgaard","Dam","Brandt","Vestergaard","Lund","Schou","Overgaard","Søndergaard","Ravn","Steensen","Brodersen","Holst","Skov","Iversen","Krog","Aagaard","Frost","Lauesen","Gade","Grøn","Fog","Hjorth","Bloch","Hvid","Busk","Buhmann","Klitgaard","Kofod","Borup","Bramsen","Bredesen","Breum","Brock","Brøndum","Bundgaard","Bødker","Bøttcher","Carlsen","Clausen","Dahl","Dalgaard","Dalsgaard","Daugaard","Davidsen","Degn","Dietz","Dirksen","Dreyer","Due","Duelund","Duus","Ebbesen","Edelberg"],WP=class extends Ci{getFirstNamesMaleJson(){return QP}getFirstNamesFemaleJson(){return KP}getLastNamesJson(){return GP}},qP=["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"],YP=["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"],JP=["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"],XP=["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"],$P=["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"],ZP=["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"],ej=["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"],tj=["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"],aj=["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"],nj=["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"],ij=["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"],rj=["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"],sj=["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"],oj=["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"],lj=["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"],dj=["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"],cj=["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"],uj=class extends Ci{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return qP}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:YP},{startYear:1960,endYear:1969,names:JP},{startYear:1970,endYear:1979,names:XP},{startYear:1980,endYear:1989,names:$P},{startYear:1990,endYear:1999,names:ZP},{startYear:2e3,endYear:2009,names:ej},{startYear:2010,endYear:2019,names:tj},{startYear:2020,endYear:2029,names:aj}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:nj},{startYear:1960,endYear:1969,names:ij},{startYear:1970,endYear:1979,names:rj},{startYear:1980,endYear:1989,names:sj},{startYear:1990,endYear:1999,names:oj},{startYear:2e3,endYear:2009,names:lj},{startYear:2010,endYear:2019,names:dj},{startYear:2020,endYear:2029,names:cj}]}},mj=["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"],gj=["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"],hj=["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"],iv=class extends Ci{getFirstNamesMaleJson(){return mj}getFirstNamesFemaleJson(){return gj}getLastNamesJson(){return hj}},fj=["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"],pj=["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"],Aj=["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"],yj=class extends Ci{getFirstNamesMaleJson(){return fj}getFirstNamesFemaleJson(){return pj}getLastNamesJson(){return Aj}},Ej=["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"],bj=["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"],vj=["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"],wj=class extends Ci{getFirstNamesMaleJson(){return Ej}getFirstNamesFemaleJson(){return bj}getLastNamesJson(){return vj}},Ij=["Gabriel","Raphaël","Léo","Louis","Noah","Arthur","Adam","Jules","Maël","Eden","Léon","Liam","Isaac","Sacha","Marceau","Elio","Noé","Lucas","Gabin","Mohamed","Aaron","Imrân","Ayden","Malo","Paul","Ethan","Hugo","Naël","Ibrahim","Marius","Eliott","Nathan","Victor","Théo","Martin","Tom","Ezio","Gaspard","Mathis","Ismaël","Côme","Léandre","Amir","Augustin","Lyam","Aylan","Nino","Antoine","Milo","Robin"],Cj=["Louise","Jade","Ambre","Alba","Emma","Alma","Romy","Rose","Alice","Anna","Mia","Lou","Inaya","Adèle","Lina","Eva","Julia","Iris","Agathe","Elena","Giulia","Léna","Noûr","Jeanne","Olivia","Luna","Victoire","Juliette","Léonie","Zoé","Chloé","Nina","Sofia","Léa","Alya","Charlotte","Romane","Victoria","Inès","Esmée","Ava","Lucie","Lola","Lya","Albane","Emy","Mila","Margot","Lyna","Gabrielle"],Sj=["Martin","Bernard","Thomas","Petit","Robert","Richard","Durand","Dubois","Moreau","Laurent","Simon","Michel","Lefebvre","Leroy","Roux","David","Bertrand","Morel","Fournier","Girard","Bonnet","Dupont","Lambert","Fontaine","Rousseau","Vincent","Muller","Lefevre","Faure","Andre","Mercier","Blanc","Guerin","Boyer","Garnier","Chevalier","Francois","Legrand","Gauthier","Garcia","Perrin","Robin","Clement","Morin","Nicolas","Henry","Roussel","Mathieu","Gautier","Masson","Marchand","Duval","Denis","Dumont","Marie","Lemaire","Noel","Meyer","Dufour","Meunier","Brun","Blanchard","Giraud","Joly","Riviere","Lucas","Brunet","Gaillard","Barbier","Arnaud","Martinez","Gerard","Roche","Renard","Schmitt","Roy","Leroux","Colin","Vidal","Caron","Picard","Roger","Fabre","Aubert","Lemoine","Renaud","Dumas","Lacroix","Olivier","Philippe","Bourgeois","Pierre","Benoit","Rey","Leclerc","Payet","Rolland","Leclercq","Guillaume","Lecomte"],Nj=class extends Ci{getFirstNamesMaleJson(){return Ij}getFirstNamesFemaleJson(){return Cj}getLastNamesJson(){return Sj}},Tj=["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"],kj=["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"],xj=["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"],Lj=["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"],Dj=["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"],Rj=["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"],Uj=["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"],Mj=["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"],Bj=["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"],_j=["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"],Fj=["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"],Oj=["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"],Pj=["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"],jj=["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"],Hj=["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"],Vj=class extends Ci{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return Tj}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:kj},{startYear:1960,endYear:1969,names:xj},{startYear:1970,endYear:1979,names:Lj},{startYear:1980,endYear:1989,names:Dj},{startYear:1990,endYear:1999,names:Rj},{startYear:2e3,endYear:2009,names:Uj},{startYear:2010,endYear:2019,names:Mj}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:Bj},{startYear:1960,endYear:1969,names:_j},{startYear:1970,endYear:1979,names:Fj},{startYear:1980,endYear:1989,names:Oj},{startYear:1990,endYear:1999,names:Pj},{startYear:2e3,endYear:2009,names:jj},{startYear:2010,endYear:2019,names:Hj}]}},zj=["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"],Qj=["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"],Kj=["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"],Gj=class extends Ci{getFirstNamesMaleJson(){return zj}getFirstNamesFemaleJson(){return Qj}getLastNamesJson(){return Kj}},Wj=["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"],qj=["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"],Yj=["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"],Jj=["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"],Xj=["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"],$j=["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"],Zj=["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"],e4=["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"],t4=["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"],a4=["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"],n4=["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"],i4=["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"],r4=["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"],s4=["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"],o4=["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"],l4=class extends Ci{getFirstNamesMaleJson(){return[]}getFirstNamesFemaleJson(){return[]}getLastNamesJson(){return Wj}getFirstNamesMaleByDecade(){return[{startYear:1950,endYear:1959,names:qj},{startYear:1960,endYear:1969,names:Yj},{startYear:1970,endYear:1979,names:Jj},{startYear:1980,endYear:1989,names:Xj},{startYear:1990,endYear:1999,names:$j},{startYear:2e3,endYear:2009,names:Zj},{startYear:2010,endYear:2019,names:e4}]}getFirstNamesFemaleByDecade(){return[{startYear:1950,endYear:1959,names:t4},{startYear:1960,endYear:1969,names:a4},{startYear:1970,endYear:1979,names:n4},{startYear:1980,endYear:1989,names:i4},{startYear:1990,endYear:1999,names:r4},{startYear:2e3,endYear:2009,names:s4},{startYear:2010,endYear:2019,names:o4}]}},d4=["Adam","Adrian","Albin","Alex","Alexander","Alf","Alfred","Ali","Allan","Alvin","Anders","André","Andreas","Anton","Arne","Aron","Arthur","Arvid","August","Axel","Bengt","Benjamin","Bernt","Bertil","Billy","Birger","Bjarne","Björn","Bo","Börje","Carl","Casper","Christer","Christian","Christoffer","Claes","Conny","Curt","Dan","Daniel","David","Dennis","Dick","Douglas","Eddie","Edvin","Einar","Elias","Elliot","Elton","Emil","Eric","Erik","Erland","Evert","Felix","Filip","Folke","Frank","Fredrik","Gabriel","Gert","Glenn","Gunnar","Gustaf","Gustav","Göran","Gösta","Hampus","Hans","Harald","Harry","Hasse","Helge","Henrik","Herbert","Hjalmar","Holger","Hugo","Håkan","Ingemar","Ingvar","Isak","Ivan","Ivar","Jack","Jacob","Jakob","Jan","Jan-Erik","Jan-Olof","Jens","Jerry","Jesper","Jimmy","Joachim","Joakim","Joel","Johan","Johannes","John","Johnny","Jon","Jonas","Jonathan","Josef","Julian","Jörgen","Kaj","Kalle","Karl","Karl-Erik","Karl-Johan","Kenneth","Kent","Kevin","Kjell","Knut","Krister","Kristian","Kristoffer","Kurt","Lars","Lars-Erik","Lars-Göran","Lars-Olof","Leif","Lennart","Leo","Leon","Liam","Linus","Love","Lucas","Ludvig","Lukas","Magnus","Malte","Manfred","Marcus","Markus","Martin","Mathias","Mats","Matteo","Mattias","Max","Melker","Melvin","Mikael","Milo","Milton","Morgan","Måns","Mårten","Nicklas","Niclas","Niklas","Nils","Noah","Noel","Ola","Oliver","Olle","Olof","Olov","Oscar","Oskar","Ove","Patrik","Paul","Peder","Per","Per-Anders","Per-Arne","Per-Erik","Per-Olof","Peter","Petter","Philip","Pierre","Pontus","Pär","Ralf","Rasmus","Reine","Rickard","Rikard","Robert","Robin","Roger","Roland","Rolf","Ronny","Roy","Ruben","Rune","Samuel","Sebastian","Sigge","Simon","Sixten","Sonny","Staffan","Stefan","Sten","Stig","Sture","Sune","Svante","Sven","Sven-Erik","Sören","Tage","Ted","Teodor","Theo","Theodor","Thomas","Tim","Timmie","Tobias","Tomas","Tommy","Tony","Torbjörn","Tord","Tore","Torsten","Ulf","Uno","Urban","Valter","Verner","Victor","Vidar","Viggo","Viktor","Vilhelm","Vilgot","Vincent","Walter","William","Willy","Åke","Örjan"],c4=["Agnes","Agneta","Alexandra","Alice","Alicia","Alma","Alva","Amanda","Andrea","Anette","Angela","Angelica","Anita","Ann","Ann-Charlott","Ann-Christin","Ann-Kristin","Ann-Louise","Ann-Marie","Ann-Sofie","Anna","Anna-Carin","Anna-Karin","Anna-Lena","Anna-Maria","Anne","Anneli","Annelie","Annika","Astrid","Barbro","Beatrice","Berit","Bettan","Birgit","Birgitta","Bodil","Britt","Britt-Inger","Britt-Marie","Britta","Camilla","Carina","Carita","Carola","Caroline","Catarina","Catrin","Cecilia","Charlotta","Charlotte","Christina","Cornelia","Daniela","Desirée","Doris","Ebba","Edit","Eivor","Elena","Elin","Elina","Elisabet","Elisabeth","Ella","Ellen","Ellinor","Elsa","Elvira","Emelie","Emilia","Emma","Erika","Eva","Eva-Lena","Eva-Marie","Ewa","Fanny","Felicia","Filippa","Freja","Frida","Gabriella","Gerd","Gertrud","Gull-Britt","Gun","Gun-Britt","Gunborg","Gunhild","Gunilla","Gunnel","Hanna","Harriet","Helen","Helena","Helene","Hilma","Ida","Ines","Inga","Inga-Lill","Ingeborg","Ingegärd","Inger","Ingrid","Irene","Iris","Isabell","Isabella","Isabelle","Jeanette","Jennie","Jennifer","Jenny","Jessica","Jill","Joanna","Johanna","Jonna","Josefin","Josephine","Judith","Julia","Kajsa","Karin","Karolina","Katarina","Kerstin","Klara","Kristin","Kristina","Laila","Lena","Lilian","Lilly","Lina","Linda","Linn","Linnea","Linnéa","Lisa","Liselotte","Lisbeth","Liv","Lotta","Louise","Lovisa","Madeleine","Magdalena","Maj","Maj-Britt","Maja","Malin","Margareta","Margit","Margot","Maria","Marianne","Marie","Marie-Louise","Marina","Marita","Marlene","Martina","Matilda","Maud","Melissa","Mikaela","Mimmi","Moa","Molly","Mona","Monica","Märta","Nathalie","Nellie","Nicole","Nicki","Nikki","Nina","Nora","Nova","Olivia","Patricia","Paula","Paulina","Pernilla","Petra","Pia","Rakel","Rebecca","Rebecka","Regina","Renée","Rigmor","Ronja","Rose-Marie","Rosita","Rut","Sabina","Saga","Sandra","Sanna","Sara","Selma","Signe","Sigrid","Siri","Siv","Siw","Sofia","Sofie","Solveig","Sonja","Stella","Stina","Susanne","Svea","Sylvia","Tanja","Terese","Teresia","Therese","Tilde","Tindra","Tina","Tove","Tyra","Ulla","Ulla-Britt","Ulrika","Vanja","Vera","Veronica","Victoria","Viola","Viktoria","Wilma","Yvonne","Åsa","Åse"],u4=["Abrahamsson","Adamsson","Adolfsson","Ahl","Ahlberg","Ahlgren","Ahlqvist","Ahlström","Alexandersson","Alfredsson","Alm","Almgren","Almquist","Almqvist","Andersson","Andreasson","Arvidsson","Asplund","Augustsson","Axelsson","Backman","Bengtsson","Berg","Berggren","Bergh","Berglund","Bergman","Bergqvist","Bergsten","Bergström","Björk","Björklund","Björkman","Blom","Blomberg","Blomgren","Blomqvist","Boberg","Boman","Borg","Boström","Bäckman","Bäckström","Carlsson","Claesson","Dahl","Dahlberg","Dahlgren","Dahlin","Dahlqvist","Dahlström","Danielsson","Davidsson","Edlund","Ek","Ekberg","Ekblad","Eklund","Ekman","Ekström","Eliasson","Elm","Engberg","Englund","Engman","Engström","Eriksson","Erlandsson","Fagerberg","Falk","Fors","Forsberg","Forsgren","Forslund","Forsman","Fransson","Fredriksson","Friberg","Frisk","Grahn","Granberg","Granlund","Gunnarsson","Gustafsson","Göransson","Hagberg","Haglund","Hagman","Hagström","Hall","Hallberg","Hallgren","Hammar","Hammarström","Hansson","Hedin","Hedlund","Hedman","Hellberg","Hellgren","Hellman","Hellqvist","Hellström","Henriksson","Hermansson","Hjort","Holm","Holmberg","Holmgren","Holmqvist","Holmström","Håkansson","Hägg","Hägglund","Högberg","Höglund","Ingvarsson","Isaksson","Israelson","Ivarsson","Jakobsson","Jansson","Jensen","Johannesson","Johansson","Johnsson","Jonas","Jonsson","Jönsson","Karlsson","Karlström","Kjellberg","Knutsson","Kristiansson","Kron","Kullberg","Lager","Landgren","Lantz","Larsson","Leander","Lennartsson","Lilja","Liljeblad","Liljedahl","Liljegren","Lind","Lindberg","Lindblad","Lindblom","Lindell","Lindén","Linder","Lindgren","Lindholm","Lindkvist","Lindman","Lindqvist","Lindstedt","Lindström","Lindvall","Ljung","Ljungberg","Ljunggren","Lund","Lundberg","Lundblad","Lundgren","Lundh","Lundin","Lundmark","Lundqvist","Lundstedt","Lundström","Löfgren","Magnusson","Malm","Malmberg","Malmgren","Malmqvist","Malmström","Martinsson","Mattsson","Melin","Moberg","Molin","Månsson","Mårtensson","Nilsson","Norberg","Nordin","Nordlund","Nordström","Norén","Norlin","Norman","Nyberg","Nygren","Nylander","Nyman","Nyström","Ohlsson","Olofsson","Olsson","Ottosson","Palm","Palmqvist","Paulsson","Persson","Pettersson","Pihl","Pålsson","Rickardsson","Ring","Robertsson","Rosell","Rosén","Rosenberg","Rundqvist","Rydberg","Rydén","Sahlin","Samuelsson","Sandberg","Sandell","Sandin","Sandström","Sjöberg","Sjögren","Sjöholm","Sjölander","Sjölund","Sjöstedt","Sjöström","Skog","Skoglund","Sköld","Stenberg","Stenlund","Stenström","Strand","Strandberg","Ström","Strömberg","Sundberg","Sundell","Sundgren","Sundin","Sundqvist","Sundström","Svanberg","Svedberg","Svensson","Svärd","Söderberg","Södergren","Söderholm","Söderlund","Söderqvist","Söderström","Tholin","Thor","Thulin","Thunberg","Törnblom","Törnqvist","Ullberg","Wahlberg","Wahlgren","Wahlström","Wall","Wallén","Wallgren","Wallin","Wennberg","Wennerberg","Werner","Westberg","Wester","Westerberg","Westerlund","Westin","Westlund","Westman","Wiberg","Wickman","Widén","Wiklund","Wikström","Åberg","Ågren","Åkerberg","Åkerlund","Åkerman","Åkerström","Ålund","Åsberg","Åström","Öberg","Ögren","Öhlin","Öhman","Östberg","Östlund","Östman"],m4=class extends Ci{getFirstNamesMaleJson(){return d4}getFirstNamesFemaleJson(){return c4}getLastNamesJson(){return u4}},g4=["Aabid","Aadil","Aaftab","Aahad","Aalam","Aamir","Aarif","Aariz","Aasim","Aatif","Abaan","Abbas","Abdul","Abdul Ahad","Abdul Aziz","Abdul Basit","Abdul Ghafoor","Abdul Hameed","Abdul Hannan","Abdul Jabbar","Abdul Kareem","Abdul Latif","Abdul Malik","Abdul Mannan","Abdul Qadir","Abdul Rahim","Abdul Rashid","Abdul Rauf","Abdul Rehman","Abdul Sattar","Abdul Wahab","Abdullah","Abid","Abrar","Absaar","Adil","Adnan","Afaq","Afzal","Agha","Ahad","Ahmad","Ahmar","Ahsen","Ahsan","Aijaz","Akbar","Akhtar","Akif","Alauddin","Alam","Ali","Altaf","Amaan","Ameen","Amir","Ammar","Anas","Anis","Anwar","Aqeel","Arif","Arman","Arqam","Arsalan","Asad","Ashar","Ashfaq","Ashraf","Asif","Asim","Ata","Athar","Ateeq","Atif","Aun","Aurangzeb","Awais","Ayaz","Azam","Azhar","Aziz","Babar","Babur","Badar","Badr","Badruddin","Bahadur","Bahram","Bakhtiar","Baligh","Baqir","Bari","Bashar","Bashir","Basheer","Basit","Bayazid","Bihzad","Bilal","Binyamin","Bismil","Burhan","Burhanuddin","Cemal","Chaman","Chand","Changez","Chaudhry","Chiragh","Daamir","Daanish","Dabir","Daniyal","Danyal","Dar","Dara","Danish","Daud","Dawood","Deen","Dilawar","Dildar","Dost","Faakhir","Faaris","Faazil","Fahad","Fahim","Faizan","Fakhar","Fakhruddin","Falah","Faran","Faraz","Fareed","Farhad","Faris","Farooq","Farrukh","Faryad","Fateh","Fayyaz","Feroz","Fida","Firdous","Firoz","Furqan","Jabbar","Jabir","Jafar","Jahan","Jahangir","Jahanzaib","Jahanzeb","Jalal","Jalaluddin","Jalib","Jamal","Jameel","Jamshaid","Jamshed","Javed","Jawad","Jibran","Junaid","Kabeer","Kabir","Kaleem","Kamal","Kamil","Kashif","Kazim","Khaleel","Khalid","Khalil","Khan","Khizr","Khurshid","Khurram","Kifayat","Kiran","Kisra","Kumail","Labeeb","Laeeq","Laith","Lais","Latif","Liaqat","Lutf","Lutfi","Lutfullah","Luqman","Maaz","Mahboob","Mahdi","Mahmood","Majid","Malik","Mansoor","Maqbool","Masood","Mehmood","Mehdi","Mehrab","Mian","Mir","Mirza","Mohammad","Mohib","Mohsin","Mohtashim","Moiz","Mubarak","Mubashir","Mudassir","Mufeed","Mujahid","Mukarram","Mukhtar","Mumtaz","Munawar","Munir","Murad","Mustafa","Muzaffar","Nadeem","Nadir","Naeem","Naim","Najam","Najib","Najeeb","Naseem","Nashit","Nasir","Natiq","Nawab","Naveed","Nazim","Nihal","Noor","Nouman","Obaid","Omair","Omar","Osama","Owais","Parsa","Parvez","Pervez","Pervaiz","Qadir","Qaiser","Qasim","Qazi","Qudrat","Qudratullah","Qurban","Qutbuddin","Rabbani","Rafi","Rafique","Rahim","Rahman","Rais","Rajab","Rameez","Rashid","Rauf","Rehan","Riaz","Rizwan","Rohail","Rumi","Sabit","Sadiq","Saeed","Safdar","Safi","Sahir","Salam","Salman","Sameer","Sami","Sarmad","Sarwar","Shabbir","Shafaq","Shahid","Shaheen","Shahbaz","Shahzaib","Shahnawaz","Shahryar","Shams","Sharif","Shaukat","Shehryar","Shoaib","Sibtain","Sikandar","Siraj","Sohail","Suhail","Suleman","Tabish","Tahir","Taj","Talat","Talha","Tameem","Tanveer","Tariq","Tasawwar","Taufiq","Tauqeer","Tayyab","Tufail","Turab","Ubaid","Ubaidullah","Ubayd","Ulfat","Umar","Umair","Usama","Usman","Uwais","Vali","Vasif","Waheed","Wahid","Wajahat","Wajid","Waleed","Wali","Wasif","Waqas","Yaqub","Yahya","Yameen","Yasir","Yaseen","Yousaf","Yousuf","Yunus","Zafar","Zahid","Zahir","Zain","Zakir","Zaman","Zeeshan","Zia","Zubair","Zulfiqar"],h4=["Aabida","Aafiya","Aaliya","Aamina","Aamira","Aaniya","Aarifa","Aasia","Aasiya","Abeer","Abeera","Adeelah","Adeena","Adila","Afifa","Afiya","Afsana","Aiman","Aina","Ainy","Aisha","Aiza","Ajwa","Akira","Aleena","Alia","Alina","Alishba","Almas","Amal","Amani","Ameena","Amira","Anabia","Anam","Anaya","Aneeqa","Anisa","Anum","Aqsa","Arfa","Arisha","Arooba","Arsala","Asfiya","Asma","Atika","Ayesha","Azka","Baano","Bahar","Bahira","Bakhtawar","Balqees","Bano","Bareera","Basma","Batool","Beena","Behjat","Benazir","Bibi","Bisma","Bushra","Cahira","Chahat","Chaman","Chanda","Chandni","Chand","Chinar","Dabira","Dalia","Dania","Dareen","Darina","Deeba","Dilara","Dilawar","Dilnasheen","Dina","Durdanah","Durre","Durriya","Eeman","Eesha","Efa","Ehraam","Eila","Eiliya","Eiman","Eira","Emaan","Eman","Eram","Erisha","Erum","Eshaal","Eshal","Eshita","Faariha","Fabiha","Fahima","Faiza","Fakhira","Falaq","Fareeha","Fariha","Farisa","Fariya","Farzana","Faryal","Fasiha","Fatemah","Fatima","Fawzia","Fehmida","Feroza","Fiza","Gehna","Ghazal","Ghazala","Gohar","Gul","Gulab","Gulalai","Gulbahar","Gulbano","Gulchehra","Gulchin","Gulnar","Gulnaz","Gulraiz","Gulshan","Gulsaba","Gulzar","Habeeba","Habiba","Hadia","Hafsa","Haleema","Hamda","Hameeda","Hania","Hareem","Haseena","Hasna","Haya","Hiba","Hifza","Hina","Hira","Hoor","Huda","Huma","Ibadah","Iffat","Ifra","Ijlal","Ikra","Ila","Ilma","Iman","Inaya","Iqra","Irha","Irum","Isra","Izza","Jabeen","Jahan","Jahanara","Jalila","Jamila","Jannat","Jasmin","Javeria","Jiya","Joya","Juleeha","Kaif","Kainat","Kalsoom","Kanza","Kashaf","Kashifa","Kausar","Khadija","Khalida","Khanam","Khansa","Khawla","Khizra","Kinza","Kiran","Komal","Kubra","Kulsoom","Labeeba","Ladan","Laila","Laiba","Laraib","Latifa","Lina","Liyana","Lubna","Lujaina","Luma","Luqia","Maham","Maheen","Mahira","Mahjabeen","Mahnoor","Mahveen","Malaika","Manahil","Marwa","Maryam","Mehak","Meher","Mehreen","Mehvish","Mishal","Momina","Muneeza","Munira","Naaila","Nabeela","Nadia","Naeema","Naila","Nashita","Nashmia","Natasha","Nazia","Neema","Nighat","Nihal","Nida","Nimra","Nooreen","Nosheen","Omaima","Omera","Ommarah","Omnia","Oraina","Owaiza","Parisa","Parveen","Parvin","Pervaiz","Parween","Parizay","Pehlaaj","Perveen","Pinar","Qamar","Qandeel","Qanita","Qasia","Qirat","Qudsia","Qurratulain","Quratulain","Rabia","Rafia","Rahat","Raima","Rakhshanda","Ramsha","Rania","Rashida","Reema","Rida","Rimsha","Rizwana","Rubab","Rubina","Rukhsana","Saba","Sabeena","Sabreen","Sadia","Safiya","Sahar","Sajida","Sakina","Saliha","Samaira","Sameena","Sanober","Saniya","Saraab","Savera","Sehar","Shabana","Shagufta","Shaheena","Shaista","Shanza","Sharmeen","Shazma","Shehla","Shehnaz","Sidra","Sobia","Sumbal","Sumaira","Sundas","Tabassum","Tahira","Tahseen","Tajwar","Tamanna","Tania","Tasneem","Tayyaba","Tazeen","Tehmina","Tehreem","Tooba","Tuba","Ulfat","Ulya","Umara","Ummara","Ummehabiba","Ummehani","Ummehuma","Ummejaveria","Urooj","Uzma","Vaneeza","Veena","Vibha","Wajiha","Waheeda","Wahida","Waniya","Warda","Wardah","Waseela","Waseema","Widad","Yamna","Yara","Yasira","Yasmeen","Yasmin","Yumna","Zahida","Zahra","Zaiba","Zainab","Zakia","Zamurrad","Zara","Zareena","Zarmeen","Zaynab","Zeba","Zehra","Zohra","Zoya","Zubia","Zulekha","Zunaira"],f4=["Abbasi","Abbas","Abidi","Afridi","Agha","Ahmad","Ahmed","Akbar","Akhtar","Ali","Alvi","Amrohi","Ansari","Anwar","Arain","Ashraf","Asghar","Attari","Awan","Azam","Babar","Badayuni","Bajwa","Bakhtiar","Baloch","Bangash","Barlas","Bashir","Batool","Beg","Behzad","Bengali","Bukhari","Bundi","Butt","Chandio","Chaudhary","Chauhan","Chishti","Chughtai","Chundrigar","Dahri","Dakhani","Dalvi","Dard","Dars","Daud","Dehlavi","Dhariwal","Durrani","Edhi","Ehsan","Ejaz","Elahi","Ebrahim","Farooqi","Faruqi","Fateh","Faizi","Fakhri","Firdausi","Gardezi","Gilani","Ghaznavi","Ghauri","Gondal","Habib","Haider","Hakeem","Hamdani","Hashmi","Hassan","Hussain","Hyder","Ibrahim","Idrisi","Iftikhar","Ilahi","Imami","Isfahani","Jafri","Jahangir","Jalali","Jalal","Jamali","Jatoi","Jilani","Junaidi","Kakakhel","Kamal","Kashif","Kazmi","Khan","Khurshid","Kirmani","Kiyani","Lahori","Lakhnavi","Lari","Leghari","Lughari","Madani","Mahmood","Malik","Mansoor","Marvi","Mashhadi","Masoodi","Mir","Mirza","Mughal","Mufti","Nadvi","Naqvi","Nasir","Niazi","Nizami","Noori","Noorani","Osmani","Panhwar","Paracha","Parvez","Pirzada","Qadri","Qasmi","Qureshi","Rabbani","Rafique","Rahman","Rashid","Rizvi","Sabri","Sadiqi","Saeed","Safi","Safvi","Samarqandi","Siddiqui","Syed","Tabrizi","Tajik","Tariq","Thanvi","Tirmizi","Usmani","Yousafzai","Yunus","Zaidi","Zubairi"],p4=class extends Ci{getFirstNamesMaleJson(){return g4}getFirstNamesFemaleJson(){return h4}getLastNamesJson(){return f4}},A4=class{static normalizeBirthDate(t){if(!t||t.trim()===""||t.startsWith("0001-01-01"))return"";const e=t.trim(),n=e.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n){const[,s,l,c]=n;return`${s}-${l}-${c}`}const r=new Date(e);if(!isNaN(r.getTime())){const s=r.getFullYear().toString().padStart(4,"0"),l=(r.getMonth()+1).toString().padStart(2,"0"),c=r.getDate().toString().padStart(2,"0");return`${s}-${l}-${c}`}return""}static isValidBirthDate(t){if(!t||t.trim()===""||t.startsWith("0001-01-01"))return!1;const e=new Date(t);return isNaN(e.getTime())?!1:e.getFullYear()>1&&e.getFullYear()<9999}};function y4(){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 E4(t){if(t==="random"||!t)return null;const e=t.split("-");if(e.length!==2)return null;const n=parseInt(e[0],10),r=parseInt(e[1],10);if(isNaN(n)||isNaN(r))return null;const s=new Date().getFullYear(),l=Math.floor((n+r)/2),c=s-l,m=Math.floor((r-n)/2);return{targetYear:c,yearDeviation:m}}function b4(){return[{value:"da",label:"Dansk",flag:"🇩🇰",alternativeCodes:["da-DK"]},{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:"fr",label:"Français",flag:"🇫🇷",alternativeCodes:["fr-FR","fr-CA","fr-BE","fr-CH","fr-LU","fr-MC"]},{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:"sv",label:"Svenska",flag:"🇸🇪",alternativeCodes:["sv-SE","sv-FI"]},{value:"ur",label:"اردو",flag:"🇵🇰",alternativeCodes:["ur-PK","ur-IN"]},{value:"fa",label:"فارسی",flag:"🇮🇷",alternativeCodes:["fa-IR","fa-AF"]}].sort((e,n)=>e.label.localeCompare(n.label))}var v4=t=>{switch(t.toLowerCase()){case"da":return new WP;case"de":return new uj;case"en":return new iv;case"es":return new yj;case"fa":return new wj;case"fr":return new Nj;case"it":return new Vj;case"nl":return new Gj;case"ro":return new l4;case"sv":return new m4;case"ur":return new p4;default:return console.warn(`Language '${t}' is not supported. Falling back to English.`),new iv}};const w4=()=>{const t=ta(),[e,n]=b.useState({username:null,password:null,email:null}),r=b.useCallback(async()=>{if(!(t!=null&&t.sqliteClient))throw new Error("Database not initialized");const c=t.sqliteClient.settings.getEffectiveIdentityLanguage(),m=v4(c),h=t.sqliteClient.settings.getPasswordSettings(),g=Fp(h);return{identityGenerator:m,passwordGenerator:g}},[t==null?void 0:t.sqliteClient]),s=b.useCallback(async()=>{if(!(t!=null&&t.sqliteClient))return null;try{const{identityGenerator:c,passwordGenerator:m}=await r(),h=t.sqliteClient.settings.getDefaultIdentityGender(),g=t.sqliteClient.settings.getDefaultIdentityAgeRange(),A=E4(g),p=c.generateRandomIdentity(h,A),v=m.generateRandomPassword(),w=t.sqliteClient.settings.getDefaultEmailDomain(),T=w?`${p.emailPrefix}@${w}`:p.emailPrefix,S={email:T,firstName:p.firstName,lastName:p.lastName,gender:p.gender,birthdate:A4.normalizeBirthDate(p.birthDate.toISOString()),username:p.nickName,password:v};return n({username:p.nickName,password:v,email:T}),S}catch(c){return console.error("Error generating random alias:",c),null}},[t==null?void 0:t.sqliteClient,r]),l=b.useCallback(()=>new Qp().generateRandomEmailPrefix(),[]);return{generateAlias:s,generateRandomEmailPrefix:l,lastGeneratedValues:e,setLastGeneratedValues:n}},I4=({formId:t,isLoading:e,formData:n,onRestore:r,skipRestore:s=!1})=>{const l=b.useRef(!1),c=b.useCallback(async()=>{if(e)return;await St("PERSIST_FORM_VALUES",JSON.stringify({formId:t,data:n}),"background")},[t,n,e]),m=b.useCallback(async()=>{if(s||l.current)return!1;const g=await St("GET_PERSISTED_FORM_VALUES",null,"background");try{if(!g)return!1;let A=null;try{A=JSON.parse(g)}catch(v){return console.error("Error parsing persisted form data:",v),!1}return A.formId===t?(l.current=!0,r(A.data),!0):!1}catch(A){return console.error("Error loading persisted form data:",A),!1}},[t,r,s]),h=b.useCallback(async()=>{await St("CLEAR_PERSISTED_FORM_VALUES",null,"background")},[]);return b.useEffect(()=>{e||c()},[e,c]),b.useEffect(()=>()=>{h()},[h]),{loadPersistedValues:m,clearPersistedValues:h,persistFormValues:c}},zk={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:"Провери",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:"Отключи",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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},Qk={vault:"Vault",emails:"Emails"},Kk={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Отмени",confirm:"Confirm",remove:"Remove",back:"Back",next:"Следващ",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",edit:"Edit",create:"Create",or:"Or",close:"Затвори",dismiss:"Dismiss",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",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.",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."},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."}},Gk={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",noTotpItemsFound:"No 2FA code matches found",close:"Затвори",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},Wk={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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},qk={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"}},Yk={"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"},Jk={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},Xk={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},$k={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."}},Zk={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},ex={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:"Създаване на ключ за достъп",createFor:"Create a new passkey for",titleLabel:"Title",titlePlaceholder:"Enter a name for this passkey",createButton:"Създаване на ключ за достъп",selectPasskeyToReplace:"Select a passkey to replace:",createNewPasskey:"Създаване на ключ за достъп",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 "}},tx={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."},ax={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}})"}},nx={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"},ix={offline:"Offline",tapToRetry:"Tap to retry sync"},C4={auth:zk,menu:Qk,common:Kk,content:Gk,items:Wk,itemTypes:qk,fieldLabels:Yk,totp:Jk,attachmentUploader:Xk,emails:$k,settings:Zk,passkeys:ex,recentlyDeleted:tx,upgrade:ax,logout:nx,sync:ix},S4=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:Xk,auth:zk,common:Kk,content:Gk,default:C4,emails:$k,fieldLabels:Yk,itemTypes:qk,items:Wk,logout:nx,menu:Qk,passkeys:ex,recentlyDeleted:tx,settings:Zk,sync:ix,totp:Jk,upgrade:ax},Symbol.toStringTag,{value:"Module"})),rx={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:"Codi d'autenticació",authCodePlaceholder:"Introduïu el codi de 6 dígits",verify:"Verifica",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:"Contrasenya Mestra",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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",connectingTo:"Connectant a",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."},sx={vault:"Vault",emails:"Emails"},ox={loading:"S'està carregant...",notice:"Notice",error:"Error",cancel:"Cancel·la",confirm:"Confirma",remove:"Remove",back:"Enrere",next:"Següent",use:"Utilitza",add:"Add",delete:"Suprimeix",undo:"Undo",save:"Desa",saving:"Saving...",edit:"Edita",create:"Create",or:"Or",close:"Tanca",dismiss:"Dismiss",logout:"Tanca la sessió",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Mostra la contrasenya",hidePassword:"Amaga la contrasenya",show:"Show",hide:"Hide",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:"Correu electrònic",username:"Nom d’usuari",password:"Contrasenya",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.",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."},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."}},lx={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",noTotpItemsFound:"No 2FA code matches found",close:"Tanca",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},dx={title:"Items",itemName:"Nom",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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},cx={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:"Correu electrònic",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"}},ux={"login.url":"Website URL","login.username":"Nom d’usuari","login.password":"Contrasenya","alias.first_name":"First Name","alias.last_name":"Last Name","alias.gender":"Gender","alias.birthdate":"Birthdate","login.email":"Correu electrònic","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"},mx={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},gx={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},hx={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."}},fx={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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:"Contrasenya Mestra",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."}},px={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:"Títol",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 "}},Ax={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."},yx={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}})"}},Ex={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"},bx={offline:"Offline",tapToRetry:"Tap to retry sync"},N4={auth:rx,menu:sx,common:ox,content:lx,items:dx,itemTypes:cx,fieldLabels:ux,totp:mx,attachmentUploader:gx,emails:hx,settings:fx,passkeys:px,recentlyDeleted:Ax,upgrade:yx,logout:Ex,sync:bx},T4=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:gx,auth:rx,common:ox,content:lx,default:N4,emails:hx,fieldLabels:ux,itemTypes:cx,items:dx,logout:Ex,menu:sx,passkeys:px,recentlyDeleted:Ax,settings:fx,sync:bx,totp:mx,upgrade:yx},Symbol.toStringTag,{value:"Module"})),vx={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},wx={vault:"Vault",emails:"Emails"},Ix={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",remove:"Remove",back:"Back",next:"Next",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",edit:"Edit",create:"Create",or:"Or",close:"Close",dismiss:"Dismiss",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",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.",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."},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."}},Cx={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",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},Sx={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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},Nx={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"}},Tx={"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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},xx={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Lx={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."}},Dx={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},Rx={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 "}},Ux={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."},Mx={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}})"}},Bx={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"},_x={offline:"Offline",tapToRetry:"Tap to retry sync"},k4={auth:vx,menu:wx,common:Ix,content:Cx,items:Sx,itemTypes:Nx,fieldLabels:Tx,totp:kx,attachmentUploader:xx,emails:Lx,settings:Dx,passkeys:Rx,recentlyDeleted:Ux,upgrade:Mx,logout:Bx,sync:_x},x4=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:xx,auth:vx,common:Ix,content:Cx,default:k4,emails:Lx,fieldLabels:Tx,itemTypes:Nx,items:Sx,logout:Bx,menu:wx,passkeys:Rx,recentlyDeleted:Ux,settings:Dx,sync:_x,totp:kx,upgrade:Mx},Symbol.toStringTag,{value:"Module"})),Fx={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},Ox={vault:"Vault",emails:"Emails"},Px={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",remove:"Remove",back:"Back",next:"Next",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",edit:"Edit",create:"Create",or:"Or",close:"Close",dismiss:"Dismiss",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",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.",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."},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."}},jx={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",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},Hx={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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},zx={"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"},Qx={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},Kx={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},Gx={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."}},Wx={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},qx={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 "}},Yx={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."},Jx={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}})"}},Xx={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"},$x={offline:"Offline",tapToRetry:"Tap to retry sync"},L4={auth:Fx,menu:Ox,common:Px,content:jx,items:Hx,itemTypes:Vx,fieldLabels:zx,totp:Qx,attachmentUploader:Kx,emails:Gx,settings:Wx,passkeys:qx,recentlyDeleted:Yx,upgrade:Jx,logout:Xx,sync:$x},D4=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:Kx,auth:Fx,common:Px,content:jx,default:L4,emails:Gx,fieldLabels:zx,itemTypes:Vx,items:Hx,logout:Xx,menu:Ox,passkeys:qx,recentlyDeleted:Yx,settings:Wx,sync:$x,totp:Qx,upgrade:Jx},Symbol.toStringTag,{value:"Module"})),Zx={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},e1={vault:"Vault",emails:"Emails"},t1={loading:"Loading...",notice:"Notice",error:"Error",cancel:"Cancel",confirm:"Confirm",remove:"Remove",back:"Back",next:"Next",use:"Use",add:"Add",delete:"Delete",undo:"Undo",save:"Save",saving:"Saving...",edit:"Edit",create:"Create",or:"Or",close:"Close",dismiss:"Dismiss",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",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.",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."},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."}},a1={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",noTotpItemsFound:"No 2FA code matches found",close:"Close",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},n1={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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},i1={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"}},r1={"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"},s1={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},o1={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},l1={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."}},d1={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},c1={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 "}},u1={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."},m1={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}})"}},g1={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"},h1={offline:"Offline",tapToRetry:"Tap to retry sync"},R4={auth:Zx,menu:e1,common:t1,content:a1,items:n1,itemTypes:i1,fieldLabels:r1,totp:s1,attachmentUploader:o1,emails:l1,settings:d1,passkeys:c1,recentlyDeleted:u1,upgrade:m1,logout:g1,sync:h1},U4=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:o1,auth:Zx,common:t1,content:a1,default:R4,emails:l1,fieldLabels:r1,itemTypes:i1,items:n1,logout:g1,menu:e1,passkeys:c1,recentlyDeleted:u1,settings:d1,sync:h1,totp:s1,upgrade:m1},Symbol.toStringTag,{value:"Module"})),f1={loginTitle:"Log in to AliasVault",username:"Kullanıcı adı veya e-posta",usernamePlaceholder:"isim / isim@sirket.com",passwordPlaceholder:"Parolanızı girin",rememberMe:"Remember me",loginButton:"Giriş Yap",noAccount:"Henüz hesabınız yok mu?",createVault:"Yeni kasa oluştur",twoFactorTitle:"Please enter the authentication code from your authenticator app.",authCode:"Doğrulama Kodu",authCodePlaceholder:"6 rakamlı kodu yazın",verify:"Doğrula",twoFactorNote:"Not: Kimlik doğrulayıcı cihazınıza erişiminiz yoksa, web sitesinden giriş yaparak kurtarma kodu ile iki adımlı doğrulamayı sıfırlayabilirsiniz.",masterPassword:"Master Password",unlockVault:"Kilidi aç",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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",connectingTo:"Bağlanıyor",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."},p1={vault:"Vault",emails:"E-postalar"},A1={loading:"Yükleniyor...",notice:"Notice",error:"Hata",cancel:"İptal",confirm:"Onayla",remove:"Remove",back:"Geri",next:"İleri",use:"Kullan",add:"Add",delete:"Sil",undo:"Undo",save:"Kaydet",saving:"Saving...",edit:"Düzenle",create:"Create",or:"Or",close:"Kapat",dismiss:"Dismiss",logout:"Çıkış yap",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",showDetails:"Show details",hideDetails:"Hide details",copyToClipboard:"Copy to clipboard",loadingEmails:"E-postalar yükleniyor…",loadingTotpCodes:"Loading TOTP codes...",attachments:"Ekler",loadingAttachments:"Ekler yükleniyor...",settings:"Ayarlar",recentEmails:"Son e-postalar",credentials:"Kimlik Bilgileri",customFields:"Custom Fields",twoFactorAuthentication:"İki faktörlü kimlik doğrulama",alias:"Alias",notes:"Notlar",email:"E-Posta",username:"Kullanıcı Adı",password:"Parola",generate:"Generate",serviceName:"Hizmet Adı",loggedIn:"Logged in",syncingVault:"Kasa senkronize ediliyor",checkingVaultUpdates:"Kasa güncellemeleri kontrol ediliyor",syncingUpdatedVault:"Güncellenmiş kasa senkronize ediliyor",loadMore:"Daha fazla yükle",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:"Parolanız, en son giriş yaptığınızdan bu yana değişti. Güvenlik nedeniyle lütfen tekrar giriş yapın.",syncConflictMaxRetries:"Could not sync vault after multiple attempts. Please try again later.",mergeFailed:"Failed to merge vault changes. Please try again.",invalidCode:"Lütfen geçerli 6 haneli doğrulama kodunu girin.",serverError:"AliasVault sunucusuna ulaşılamadı. Lütfen daha sonra tekrar deneyin veya sorun devam ederse destek ile iletişime geçin.",wrongPassword:"Parola yanlış. Lütfen yeniden deneyin.",sessionExpired:"Your session has expired. Please log in again.",mobileLoginRequestExpired:"Mobile login request timed out. Please reload the page and 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:"Kullanıcı adı gereklidir.",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."}},y1={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",noTotpItemsFound:"No 2FA code matches found",close:"Kapat",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},E1={title:"Items",itemName:"Ad",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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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:"Özel E-posta",privateEmailAliasVaultServer:"AliasVault sunucusu",privateEmailDescription:"Uçtan uca şifreli, tamamen özel.",publicEmailTitle:"Herkese Açık Geçici E-Posta Sağlayıcıları",publicEmailDescription:"Anonim ama mahremiyeti sınırlı. E-posta içeriği, adresi bilen herkes tarafından okunabilir.",validation:{required:"Bu alan zorunludur"}},b1={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:"E-Posta",url:"URL",phone:"Phone",number:"Number",date:"Tarih",textArea:"Text Area"},login:{title:"Login"},alias:{title:"Alias"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},v1={"login.url":"Website URL","login.username":"Kullanıcı Adı","login.password":"Parola","alias.first_name":"Adı","alias.last_name":"Soyadı","alias.gender":"Cinsiyet","alias.birthdate":"Birthdate","login.email":"E-Posta","notes.content":"Notlar","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"},w1={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},I1={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},C1={title:"E-postalar",deleteEmailTitle:"E-postayı sil",deleteEmailConfirm:"Are you sure you want to permanently delete this email?",from:"Gönderici",to:"Alıcı",date:"Tarih",emailContent:"Email content",emailNotFound:"E-posta bulunamadı",noEmails:"No emails found",noEmailsDescription:"Özel e-posta adreslerinize henüz bir e-posta gelmedi. Yeni bir e-posta aldığınızda burada görünecektir.",offlineMessage:"Çevrimdışısınız. E-postalarınızı yüklemek için lütfen internet bağlantısı sağlayın.",dateFormat:{justNow:"biraz önce",minutesAgo_single:"{{count}} dakika önce",minutesAgo_plural:"{{count}} dakika önce",hoursAgo_single:"{{count}} saat önce",hoursAgo_plural:"{{count}} saat önce",yesterday:"dün"},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."}},S1={serverUrl:"Server URL",language:"Dil",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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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:"Otomatik Kilit Süresi",autoLockTimeoutDescription:"Automatically lock the vault after a period of inactivity",autoLockTimeoutHelp:"Kasa, yalnızca belirtilen süre boyunca herhangi bir işlem yapılmadığında (otomatik doldurma kullanılmadığında veya uzantı açılmadığında) kilitlenecektir. Ancak, bu ayardan bağımsız olarak tarayıcı kapatıldığında her zaman kilitlenir.",autoLockNever:"Asla",autoLock15Seconds:"15 saniye",autoLock1Minute:"1 dakika",autoLock5Minutes:"5 dakika",autoLock15Minutes:"15 dakika",autoLock30Minutes:"30 dakika",autoLock1Hour:"1 saat",autoLock4Hours:"4 saat",autoLock8Hours:"8 saat",autoLock24Hours:"24 saat",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:"Dil",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:"Kimlik Oluşturucu",identityGeneratorSettings:{description:"Yeni kimlikler oluştururken varsayılan dil ve cinsiyet tercihlerini yapılandırın.",languageSection:"Dil",languageDescription:"Yeni kimlikler oluşturulurken kullanılacak dili belirleyin.",genderSection:"Cinsiyet",genderDescription:"Yeni kimlikler oluştururken cinsiyet tercihlerini belirleyin.",ageRangeSection:"Age Range",ageRangeDescription:"Set the age range for generating new identities.",genderOptions:{random:"Rastgele",male:"Erkek",female:"Kadın"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},unlockMethod:{title:"Kasa Açma Yöntemi",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."}},N1={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:"Başlık",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 "}},T1={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."},k1={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}})"}},x1={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"},L1={offline:"Offline",tapToRetry:"Tap to retry sync"},M4={auth:f1,menu:p1,common:A1,content:y1,items:E1,itemTypes:b1,fieldLabels:v1,totp:w1,attachmentUploader:I1,emails:C1,settings:S1,passkeys:N1,recentlyDeleted:T1,upgrade:k1,logout:x1,sync:L1},B4=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:I1,auth:f1,common:A1,content:y1,default:M4,emails:C1,fieldLabels:v1,itemTypes:b1,items:E1,logout:x1,menu:p1,passkeys:N1,recentlyDeleted:T1,settings:S1,sync:L1,totp:w1,upgrade:k1},Symbol.toStringTag,{value:"Module"})),D1={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",autoCloseUnlockPopup:"Auto-close on future sign ins",closingIn:"Closing in {{seconds}}s...",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."},R1={vault:"Vault",emails:"Emails"},U1={loading:"لوڈ ہو رہا ہے۔۔۔",notice:"Notice",error:"خرابی",cancel:"منسوخ کریں",confirm:"تصدیق کریں",remove:"Remove",back:"واپس جائیں",next:"آگے جائیں",use:"Use",add:"Add",delete:"ڈیلیٹ کریں",undo:"Undo",save:"محفوظ کریں",saving:"Saving...",edit:"ترمیم کریں",create:"Create",or:"Or",close:"بند کریں",dismiss:"Dismiss",logout:"Logout",copied:"Copied!",openInNewWindow:"Open in new window",enabled:"Enabled",disabled:"Disabled",showPassword:"Show password",hidePassword:"Hide password",show:"Show",hide:"Hide",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:"نوٹس",email:"ای میل",username:"صارف کا نام",password:"پاس ورڈ",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:"ایک نامعلوم مسئلہ پیش آ گیا ہے۔ براہِ کرم دوبارہ کوشش کریں۔",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.",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."},apiErrors:{UNKNOWN_ERROR:"ایک نامعلوم مسئلہ پیش آ گیا ہے۔ براہِ کرم دوبارہ کوشش کریں۔",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."}},M1={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",noTotpItemsFound:"No 2FA code matches found",close:"بند کریں",savePrompt:{title:"Save to AliasVault?",neverForThisSite:"Never for this site",addUrlTitle:"Add URL to credential?",addUrl:"Add URL"}},B1={title:"Items",itemName:"نام",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.",noMatchingItems:"No items match the selected filter.",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:{folders:"Folders",passkeys:"Passkeys",totp:"2FA Codes"},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"}},_1={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:"Login"},alias:{title:"Alias"},creditCard:{title:"Credit Card"},note:{title:"Secure Note"}},F1={"login.url":"Website URL","login.username":"صارف کا نام","login.password":"پاس ورڈ","alias.first_name":"First Name","alias.last_name":"Last Name","alias.gender":"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"},O1={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",deleteTotpCodeTitle:"Delete 2FA Code",deleteTotpCodeConfirmation:'Are you sure you want to delete the 2FA code "{{name}}"?',errors:{invalidSecretKey:"Invalid secret key format."}},P1={uploading:"Uploading...",uploadSuccess:"Files uploaded successfully.",deleteSuccess:"Attachment deleted successfully.",firefoxExpandRequired:"To upload files, use the expanded window.",openExpandedWindow:"Open Expanded Window"},j1={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."}},H1={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",autofillPopupDescription:"Show the autofill popup when login fields are detected.",disabledSites:"Disabled sites",disabledSitesDescription:"Sites where the autofill popup will not appear.",clearAllDisabledSites:"Clear all disabled sites",temporaryUntil:"until",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"}},loginSave:{title:"Save Login Prompt",description:"Show a prompt to save login credentials when you submit a login form on a website.",blockedSites:"Blocked sites",blockedSitesDescription:"Sites where the save prompt will never appear.",clearAllBlockedSites:"Clear all blocked sites"},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."}},V1={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:"عنوان",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 "}},z1={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."},Q1={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}})"}},K1={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"},G1={offline:"Offline",tapToRetry:"Tap to retry sync"},_4={auth:D1,menu:R1,common:U1,content:M1,items:B1,itemTypes:_1,fieldLabels:F1,totp:O1,attachmentUploader:P1,emails:j1,settings:H1,passkeys:V1,recentlyDeleted:z1,upgrade:Q1,logout:K1,sync:G1},F4=Object.freeze(Object.defineProperty({__proto__:null,attachmentUploader:P1,auth:D1,common:U1,content:M1,default:_4,emails:j1,fieldLabels:F1,itemTypes:_1,items:B1,logout:K1,menu:R1,passkeys:V1,recentlyDeleted:z1,settings:H1,sync:G1,totp:O1,upgrade:Q1},Symbol.toStringTag,{value:"Module"})),O4=Object.assign({"../../i18n/locales/bg.json":S4,"../../i18n/locales/ca.json":T4,"../../i18n/locales/cs.json":x4,"../../i18n/locales/da.json":vU,"../../i18n/locales/de.json":wU,"../../i18n/locales/en.json":IU,"../../i18n/locales/es.json":CU,"../../i18n/locales/fa.json":D4,"../../i18n/locales/fi.json":SU,"../../i18n/locales/fr.json":NU,"../../i18n/locales/he.json":TU,"../../i18n/locales/it.json":kU,"../../i18n/locales/ko.json":U4,"../../i18n/locales/nl.json":xU,"../../i18n/locales/pl.json":LU,"../../i18n/locales/pt.json":DU,"../../i18n/locales/ro.json":RU,"../../i18n/locales/ru.json":UU,"../../i18n/locales/sv.json":MU,"../../i18n/locales/tr.json":B4,"../../i18n/locales/uk.json":BU,"../../i18n/locales/ur.json":F4,"../../i18n/locales/zh.json":_U}),P4=Object.values(O4).map(t=>t.default);function Kp(t){const e=new Set;for(const n of P4){const r=j4(n,t);if(r&&typeof r=="string"){const s=r.toLowerCase().trim();e.add(s)}}return Array.from(e)}function j4(t,e){const n=e.split(".");let r=t;for(const s of n)if(r&&typeof r=="object"&&s in r)r=r[s];else return;return r}const H4=Kp("common.email"),V4=Kp("common.username"),z4=Kp("common.password"),qn={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"],totp:["totp","otp","one-time","onetime","six-digit","digit-code","token","authenticator","2fa","twofa","two-factor","mfa","security-code","auth-code","passcode","pin-code","pincode","google_code","verification-code","verificationcode","tfa","tfacode","second-factor"]},Af={male:["male","man","m","gender1","mr","mr."],female:["female","woman","f","gender2","mrs","mrs.","ms","ms."],other:["other","diverse","custom","prefer not","unknown","gender3"]},rv={resendCode:[/resend/i,/re-send/i,/send\s+again/i,/send\s+code\s+again/i],changeEmail:[/different\s+email/i,/change\s+email/i,/update\s+email/i,/use\s+another\s+email/i]},Q4=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"]),Yn={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"],totp:["verificatiecode","eenmalig","authenticatie","tweefactor","beveiligingscode"]},yf={male:["man","mannelijk","heer"],female:["vrouw","vrouwelijk","mevrouw"],other:["anders","iets","overig","onbekend"]},sv={resendCode:[/opnieuw\s+verzenden/i,/verstuur\s+opnieuw/i,/code\s+opnieuw/i,/opnieuw\s+versturen/i],changeEmail:[/ander\s+e-?mail/i,/wijzig\s+e-?mail/i,/e-?mail\s+wijzigen/i,/ander\s+e-?mailadres/i]},K4=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"]),ma={username:[...new Set([...qn.username,...Yn.username,...V4])],fullName:[...new Set([...qn.fullName,...Yn.fullName])],firstName:[...new Set([...qn.firstName,...Yn.firstName])],lastName:[...new Set([...qn.lastName,...Yn.lastName])],email:[...new Set([...Yn.email,...qn.email,...H4])],emailConfirm:[...new Set([...qn.emailConfirm,...Yn.emailConfirm])],password:[...new Set([...qn.password,...Yn.password,...z4])],birthdate:[...new Set([...qn.birthdate,...Yn.birthdate])],gender:[...new Set([...qn.gender,...Yn.gender])],birthDateDay:[...new Set([...qn.birthDateDay,...Yn.birthDateDay])],birthDateMonth:[...new Set([...qn.birthDateMonth,...Yn.birthDateMonth])],birthDateYear:[...new Set([...qn.birthDateYear,...Yn.birthDateYear])],totp:[...new Set([...qn.totp,...Yn.totp])]},Yl={male:[...new Set([...Af.male,...yf.male])],female:[...new Set([...Af.female,...yf.female])],other:[...new Set([...Af.other,...yf.other])]},ov=new Set([...Q4,...K4]),lv={resendCode:[...rv.resendCode,...sv.resendCode],changeEmail:[...rv.changeEmail,...sv.changeEmail]};var xs=(t=>(t.Username="username",t.Password="password",t.Email="email",t.Totp="totp",t))(xs||{});class dv{constructor(e,n){Ge(this,"document");Ge(this,"clickedElement");Ge(this,"visibilityCache");var r;if(this.document=e,this.visibilityCache=new Map,n){let s=n.parentElement,l=!0;for(;s&&s!==this.document.body;){if(!this.isElementVisible(s,!0)){l=!1;break}s=s.parentElement}const c=(r=e.defaultView)==null?void 0:r.getComputedStyle(n),m=(c==null?void 0:c.display)==="none"||(c==null?void 0:c.visibility)==="hidden";l&&!m?this.clickedElement=n:this.clickedElement=null}else this.clickedElement=null}containsLoginForm(){let e=this.getFormWrapper();if((e==null?void 0:e.getAttribute("role"))==="dialog"&&(e=e.querySelector("form")??e),e||(e=this.document.body),e.querySelectorAll("input").length>200)return!1;const r=this.containsPasswordField(e),s=this.containsLikelyUsernameOrEmailField(e),l=this.containsTotpField(e);return!!(r||s||l)}getForm(){if(!this.clickedElement)return null;const e=this.getFormWrapper();return this.detectFormFields(e)}static getSuggestedServiceName(e,n){const r=e.title,s=4,l=50,c=T=>{const S=T.length>=3&&T.length<=l,k=T.split(/[\s|\-—/\\]+/).length<=s;return S&&k},m=T=>{const S=T.toLowerCase().split(" ").map(U=>U.toLowerCase());let k=0;for(;k<S.length&&ov.has(S[k].toLowerCase());)k++;let L=S.length-1;for(;L>k&&ov.has(S[L].toLowerCase());)L--;return S.slice(k,L+1)},h=(T,S)=>T.split(/[\s|]+/).filter(k=>S.includes(k.toLowerCase())).join(" "),g=n.hostname.replace(/^www\./,""),p=/[|\-—/\\:]/.exec(r);if(p){const T=p.index,S=r.substring(0,T).trim(),k=r.substring(T+1).trim(),L=m(S),U=m(k),x=h(S,L),F=h(k,U),B=c(x),V=c(F);if(B&&V)return[x,F,g];if(B)return[x,g];if(V)return[F,g]}const v=m(r),w=h(r,v);return c(w)?[w,g]:[g]}getFormWrapper(){var n;return(n=this.clickedElement)==null?void 0:n.closest('form, [role="dialog"]')}isLikelyFakeField(e){var m,h;const n=(e.getAttribute("name")||"").toLowerCase(),r=(e.id||"").toLowerCase(),s=(e.className||"").toLowerCase();if(n.includes("fake")||r.includes("fake")||s.includes("fake")||["honeypot","bot-field","hp-","hidden-field","bot_check","antispam"].some(g=>n.includes(g)||r.includes(g))||e.getAttribute("aria-hidden")==="true"||e.getAttribute("role")==="presentation")return!0;if(e.getAttribute("tabindex")==="-1"){const g=e.parentElement;if(g){const A=(m=this.document.defaultView)==null?void 0:m.getComputedStyle(g);if(A){const p=parseFloat(A.height),v=A.overflow;if(p===0&&v==="hidden")return!0}}}if(e.readOnly){const g=(h=this.document.defaultView)==null?void 0:h.getComputedStyle(e);if(g&&(g.display==="none"||g.visibility==="hidden"))return!0}return!1}getActualInputElement(e){if(e.tagName.toLowerCase()==="input")return e;const n=e;if(n.shadowRoot){const s=n.shadowRoot.querySelector("input, textarea");if(s)return s}const r=e.querySelector("input, textarea");return r||e}isElementVisible(e,n=!0){var s;if(!e)return!1;if(n&&this.visibilityCache.has(e))return this.visibilityCache.get(e);let r=e;for(;r;){try{const l=(s=this.document.defaultView)==null?void 0:s.getComputedStyle(r);if(!l){let p=r;for(;p;)n&&this.visibilityCache.set(p,!0),p=p.parentElement;return!0}if(l.display==="none"){let p=r;for(;p;)n&&this.visibilityCache.set(p,!1),p=p.parentElement;return!1}if(l.visibility==="hidden"){let p=r;for(;p;)n&&this.visibilityCache.set(p,!1),p=p.parentElement;return!1}if(n&&parseFloat(l.opacity)===0){let p=r;for(;p;)this.visibilityCache.set(p,!1),p=p.parentElement;return!1}const c=parseFloat(l.height),m=parseFloat(l.width),h=parseFloat(l.maxHeight),g=parseFloat(l.maxWidth);if(c===0||m===0||h===0||g===0){let p=r;for(;p;)n&&this.visibilityCache.set(p,!1),p=p.parentElement;return!1}if(l.position==="absolute"||l.position==="fixed"){const p=parseFloat(l.left),v=parseFloat(l.top),w=parseFloat(l.right),T=parseFloat(l.bottom);if(p<-5e3||v<-5e3||w<-5e3||T<-5e3){let S=r;for(;S;)n&&this.visibilityCache.set(S,!1),S=S.parentElement;return!1}}const A=l.getPropertyValue("clip");if(A&&A!=="auto"&&A.includes("0")){const p=A.match(/rect\((\d+)[^\d]+(\d+)[^\d]+(\d+)[^\d]+(\d+)\)/);if(p){const[,v,w,T,S]=p.map(Number);if(v===0&&w===0&&T===0&&S===0){let k=r;for(;k;)n&&this.visibilityCache.set(k,!1),k=k.parentElement;return!1}}}}catch{let l=r;for(;l;)n&&this.visibilityCache.set(l,!0),l=l.parentElement;return!0}r=r.parentElement}return n&&this.visibilityCache.set(e,!0),!0}findAllInputFields(e,n,r,s=[],l=!0){var v,w,T,S,k,L,U,x,F,B,V;const c=e?Array.from(e.querySelectorAll("input, select, [type]")):Array.from(this.document.querySelectorAll("input, select, [type]")),h=(e?Array.from(e.querySelectorAll("*")):Array.from(this.document.querySelectorAll("*"))).filter(O=>{const _=O;return _.shadowRoot?_.shadowRoot.querySelector("input, textarea")!==null:!1}),A=[...c,...h].filter((O,_,z)=>z.indexOf(O)===_),p=[];for(const O of Array.from(A)){if(s.includes(O)||this.isLikelyFakeField(O))continue;if(l){if(!this.isElementVisible(O,!0))continue}else if(!this.isElementVisible(O,!1))continue;let z=O.tagName.toLowerCase()==="select"?"select":((v=O.type)==null?void 0:v.toLowerCase())||((w=O.getAttribute("type"))==null?void 0:w.toLowerCase())||"";const Q=O,K=Q.shadowRoot&&Q.shadowRoot.querySelector("input, textarea");if(K&&!z){const W=Q.shadowRoot.querySelector("input, textarea");W&&(z=((T=W.type)==null?void 0:T.toLowerCase())||"text")}if(!r.includes(z)&&!(K&&r.includes("text")&&!z))continue;if(r.includes("email")&&z==="email"){p.push({input:O,score:-1});continue}const te=((S=O.getAttribute("data-av-autocomplete")??O.getAttribute("autocomplete"))==null?void 0:S.toLowerCase())??"";if(te){if(n===ma.username&&te==="username"){p.push({input:O,score:-2});continue}if(n===ma.email&&te==="email"){p.push({input:O,score:-2});continue}if(n===ma.password&&(te==="current-password"||te==="new-password")){p.push({input:O,score:-2});continue}}const ee=((k=O.getAttribute("aria-describedby"))==null?void 0:k.toLowerCase())??"";if(ee&&n===ma.username&&ee.includes("username")){p.push({input:O,score:-2});continue}const Y=[O.id,O.getAttribute("name"),O.getAttribute("placeholder"),O.getAttribute("class"),te].map(W=>(W==null?void 0:W.toLowerCase())??"");if(O.id||O.getAttribute("name")){const W=this.document.querySelector(`label[for="${O.id||O.getAttribute("name")}"]`);W&&Y.push(((L=W.textContent)==null?void 0:L.toLowerCase())??"")}const le=O.getAttribute("aria-describedby");if(le){const W=le.split(/\s+/);for(const X of W){const ne=this.document.getElementById(X);ne&&Y.push(((U=ne.textContent)==null?void 0:U.toLowerCase())??"")}}const J=O.getAttribute("aria-label");J&&Y.push(J.toLowerCase());let ie=O;for(let W=0;W<3&&ie;W++){const X=ie.querySelectorAll('[slot="label"], [slot="helper-text"]');for(const ne of Array.from(X)){const we=((x=ne.textContent)==null?void 0:x.toLowerCase())??"";we&&Y.push(we)}if(ie.shadowRoot){const ne=ie.shadowRoot.querySelectorAll('slot[name="label"], slot[name="helper-text"]');for(const we of Array.from(ne)){const ce=we.assignedNodes();for(const Ee of ce)Ee.textContent&&Y.push(Ee.textContent.toLowerCase())}}ie=ie.parentElement}const be=O.parentElement;if(be)for(const W of Array.from(be.children))W!==O&&Array.from(W.classList).some(X=>X.toLowerCase().includes("label"))&&Y.push(((F=W.textContent)==null?void 0:F.toLowerCase())??"");let se=O;for(let W=0;W<5&&se&&!(se.children.length>15);W++){const X=se.querySelector("label");if(X){Y.push(((B=X.textContent)==null?void 0:B.toLowerCase())??"");break}const ne=se.closest("td");if(ne){const we=ne.closest("tr");if(we){for(const ce of Array.from(we.querySelectorAll("td")))if(ce!==ne){Y.push(((V=ce.textContent)==null?void 0:V.toLowerCase())??"");break}}break}se=se.parentElement}let j=n.length;for(let W=0;W<n.length;W++)if(Y.some(X=>X.includes(n[W]))){j=W;break}j<n.length&&p.push({input:O,score:j})}return p.sort((O,_)=>O.score-_.score).map(O=>O.input)}findInputField(e,n,r,s=[],l=!0){const c=this.findAllInputFields(e,n,r,s,l),m=this.filterOutNestedDuplicates(c,s);if(r.includes("email")){const h=m.find(g=>(g.type||"").toLowerCase()==="email");if(h)return h}return m.length>0?m[0]:null}findEmailField(e,n=!0){const r=this.findAllInputFields(e,ma.email,["text","email"],[],n),c=this.filterOutNestedDuplicates(r).filter(A=>{const p=(A.getAttribute("name")||"").toLowerCase(),v=(A.id||"").toLowerCase(),w=`${p} ${v}`;let T="";if(A.id||p){const L=this.document.querySelector(`label[for="${A.id||p}"]`);L&&(T=(L.textContent||"").toLowerCase())}const S=ma.username.some(L=>T.includes(L)),k=ma.email.some(L=>T.includes(L));if(S&&k){const L=ma.username.some(x=>w.includes(x)),U=ma.email.some(x=>w.includes(x));if(L&&!U)return!1}return!0})[0]??null,m=c?this.findAllInputFields(e,ma.emailConfirm,["text","email"],[c],n):[],g=this.filterOutNestedDuplicates(m)[0]??null;return{primary:c,confirm:g}}findBirthdateFields(e,n=[]){const r=this.findInputField(e,ma.birthdate,["date","text"],n);let s="yyyy-mm-dd";if(e&&r){const h=r.closest("div");if(h){const A=[...Array.from(h.getElementsByTagName("label")),...Array.from(h.getElementsByTagName("span")),h].map(p=>{var v;return((v=p.textContent)==null?void 0:v.toLowerCase())??""}).join(" ").replace(/[\s\u00A0]/g,"").toLowerCase();if(/dd[-/]mm[-/]jj/i.test(A)||/dd[-/]mm[-/]yyyy/i.test(A)?s=A.includes("/")?"dd/mm/yyyy":"dd-mm-yyyy":/mm[-/]dd[-/]yyyy/i.test(A)?s=A.includes("/")?"mm/dd/yyyy":"mm-dd-yyyy":/yyyy[-/]mm[-/]dd/i.test(A)&&(s=A.includes("/")?"yyyy/mm/dd":"yyyy-mm-dd"),s==="yyyy-mm-dd"&&r.placeholder){const p=r.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(r)return{single:r,format:s,day:null,month:null,year:null};const l=this.findInputField(e,ma.birthDateDay,["text","number","select"],n),c=this.findInputField(e,ma.birthDateMonth,["text","number","select"],n),m=this.findInputField(e,ma.birthDateYear,["text","number","select"],n);return{single:null,format:"yyyy-mm-dd",day:l,month:c,year:m}}findGenderField(e,n=[]){const r=this.findInputField(e,ma.gender,["select"],n);if((r==null?void 0:r.tagName.toLowerCase())==="select")return{type:"select",field:r};const s=e?e.querySelectorAll('input[type="radio"][name*="gender"], input[type="radio"][name*="sex"]'):null;if(s&&s.length>0){const c=(m,h=!1)=>Array.from(s).find(g=>{var p,v;const A=[g.value,g.id,g.name,((v=(p=g.labels)==null?void 0:p[0])==null?void 0:v.textContent)??""].map(w=>(w==null?void 0:w.toLowerCase())??"");return h&&(Yl.male.some(w=>A.some(T=>T.includes(w)))||Yl.female.some(w=>A.some(T=>T.includes(w))))?!1:m.some(w=>A.some(T=>T.includes(w)))})??null;return{type:"radio",field:null,radioButtons:{male:c(Yl.male),female:c(Yl.female),other:c(Yl.other)}}}return{type:"text",field:this.findInputField(e,ma.gender,["text"],n)}}filterOutNestedDuplicates(e,n=[]){if(e.length===0)return e;const r=[];for(const s of e){let l=!0;for(const c of n){if(s===c){l=!1;break}if(c.contains(s)){l=!1;break}if(s.contains(c)){l=!1;break}const m=s,h=c;if(h.shadowRoot&&h.shadowRoot.contains(s)){l=!1;break}if(m.shadowRoot&&m.shadowRoot.contains(c)){l=!1;break}const g=this.getActualInputElement(s),A=this.getActualInputElement(c);if(g===A){l=!1;break}}if(l){for(const c of e)if(s!==c){if(s.contains(c)){l=!1;break}const m=s;if(m.shadowRoot&&m.shadowRoot.contains(c)){l=!1;break}}if(l){const c=this.getActualInputElement(s);if(c!==s&&e.includes(c))continue;r.push(s)}}}return r}findPasswordField(e,n=!0){const r=this.findAllInputFields(e,ma.password,["password"],[],n),s=this.filterOutNestedDuplicates(r);return{primary:s[0]??null,confirm:s[1]??null}}containsPasswordField(e){const n=this.findPasswordField(e);return!!(n.primary&&this.isElementVisible(n.primary))}containsTotpField(e){const n=this.findTotpField(e);return n!==null&&this.isElementVisible(n)}isEmailVerificationForm(){if(!this.clickedElement)return!1;let e=this.clickedElement,n=0;for(;e.parentElement&&n<15&&(e=e.parentElement,n++,!(e.tagName==="FORM"||e.getAttribute("role")==="dialog"||e.tagName==="MAIN"||e.id||e.className.includes("container"))););const r=e.textContent||"",c=Array.from(e.querySelectorAll("a, button")).map(A=>{var p;return((p=A.textContent)==null?void 0:p.toLowerCase())||""}).join(" "),m=/[a-z0-9*.\-_]+@[a-z0-9*.-]+\.[a-z*]{2,}/i.test(r);if(!m)return!1;const h=lv.resendCode.some(A=>A.test(c)),g=lv.changeEmail.some(A=>A.test(c));return m&&(h||g)}findTotpField(e){var l,c;if(this.isEmailVerificationForm())return null;const n=this.findAllInputFields(e,ma.totp,["text","number"]),r=this.filterOutNestedDuplicates(n);if(r.length>0)return r[0];const s=e?Array.from(e.querySelectorAll("input")):Array.from(this.document.querySelectorAll("input"));for(const m of s){if(!this.isElementVisible(m))continue;if((((l=m.getAttribute("autocomplete"))==null?void 0:l.toLowerCase())??"")==="one-time-code")return m;const g=m.maxLength,A=m.getAttribute("inputmode");if(g===6&&A==="numeric"||((c=m.type)==null?void 0:c.toLowerCase())==="tel"&&g===6)return m;const v=m.getAttribute("pattern");if(v&&(/^\[0-9\]/.test(v)||/^\\d/.test(v))&&(g===6||g===1)||g===1&&A==="numeric")return m}return null}containsLikelyUsernameOrEmailField(e){const n=this.clickedElement!==null;return!!(this.findEmailField(e,!n).primary||this.findInputField(e,ma.username,["text"],[],!n)||this.findInputField(e,ma.firstName,["text"],[],!n)||this.findInputField(e,ma.lastName,["text"],[],!n))}isAutofillTriggerableField(){return this.getDetectedFieldType()!==null}getDetectedFieldType(){if(!this.clickedElement)return null;const e=this.clickedElement.getAttribute("data-av-field-type");if(e&&Object.values(xs).includes(e))return e;const n=this.getActualInputElement(this.clickedElement);if(n!==this.clickedElement){const A=n.getAttribute("data-av-field-type");if(A&&Object.values(xs).includes(A))return A}const r=this.getFormWrapper(),s=[this.clickedElement,n].filter((A,p,v)=>A&&v.indexOf(A)===p),l=!1;if(this.findAllInputFields(r,ma.username,["text"],[],l).some(A=>s.includes(A)))return xs.Username;const m=this.findPasswordField(r);if(m.primary&&s.includes(m.primary)||m.confirm&&s.includes(m.confirm))return xs.Password;if(this.findAllInputFields(r,ma.email,["text","email"],[],l).some(A=>s.includes(A)))return xs.Email;const g=this.findTotpField(r);return g&&s.includes(g)?xs.Totp:null}detectFormFields(e){const n=[],r=this.clickedElement===null,s=this.findEmailField(e,r);s.primary&&n.push(s.primary),s.confirm&&n.push(s.confirm);const l=this.findPasswordField(e,r);l.primary&&n.push(l.primary),l.confirm&&n.push(l.confirm);const c=this.findInputField(e,ma.username,["text"],n,r);c&&n.push(c);const m=this.findInputField(e,ma.fullName,["text"],n,r);m&&n.push(m);const h=this.findInputField(e,ma.lastName,["text"],n,r);h&&n.push(h);const A=c&&l.primary&&!s.primary&&!s.confirm&&!l.confirm?null:this.findInputField(e,ma.firstName,["text"],n,r);A&&n.push(A);const p=this.findBirthdateFields(e,n);p.single&&n.push(p.single),p.day&&n.push(p.day),p.month&&n.push(p.month),p.year&&n.push(p.year);const v=this.findGenderField(e,n);v.field&&n.push(v.field);const w=this.findTotpField(e);return w&&n.push(w),{form:e,emailField:s.primary,emailConfirmField:s.confirm,usernameField:c,passwordField:l.primary,passwordConfirmField:l.confirm,fullNameField:m,firstNameField:A,lastNameField:h,birthdateField:p,genderField:v,totpField:w}}}class cv{static getServiceInfo(e,n){const r=dv.getSuggestedServiceName(e,n),s=n.href;let l="";try{const c=new URL(s);(c.protocol==="http:"||c.protocol==="https:")&&(l=c.origin+c.pathname,l.endsWith("/")&&(l=l.slice(0,-1)))}catch(c){console.error("Error parsing current URL:",c)}return{suggestedNames:r,currentUrl:s,serviceUrl:l,domain:n.hostname.replace(/^www\./,"")}}static getServiceInfoFromTab(e,n){try{const r=new URL(e),s={href:e,hostname:r.hostname,protocol:r.protocol,pathname:r.pathname,origin:r.origin},l={title:n||r.hostname},c=dv.getSuggestedServiceName(l,s);let m="";return(r.protocol==="http:"||r.protocol==="https:")&&(m=r.origin+r.pathname,m.endsWith("/")&&(m=m.slice(0,-1))),{suggestedNames:c,currentUrl:e,serviceUrl:m,domain:r.hostname.replace(/^www\./,"")}}catch(r){console.error("Error parsing tab URL:",r);const s=e.replace(/^https?:\/\/(www\.)?/,"").split("/")[0];return{suggestedNames:[s],currentUrl:e,serviceUrl:e,domain:s}}}static getEncodedServiceInfo(e,n){const r=this.getServiceInfo(e,n);return{serviceName:r.suggestedNames.length>0?encodeURIComponent(r.suggestedNames[0]):"",serviceUrl:r.serviceUrl?encodeURIComponent(r.serviceUrl):"",currentUrl:encodeURIComponent(r.currentUrl),domain:encodeURIComponent(r.domain)}}static getEncodedServiceInfoFromTab(e,n){const r=this.getServiceInfoFromTab(e,n);return{serviceName:r.suggestedNames.length>0?encodeURIComponent(r.suggestedNames[0]):"",serviceUrl:r.serviceUrl?encodeURIComponent(r.serviceUrl):"",currentUrl:encodeURIComponent(r.currentUrl),domain:encodeURIComponent(r.domain)}}}const G4=()=>{const[t]=Ku();return{detectService:b.useCallback(async n=>{let r=n||"",s="";try{const l=t.get("serviceName"),c=t.get("serviceUrl"),m=t.get("currentUrl");if(l||c||m){if(l&&(r=decodeURIComponent(l)),c&&(s=decodeURIComponent(c)),m&&(!l||!c)){const h=decodeURIComponent(m),g=cv.getServiceInfoFromTab(h);!l&&g.suggestedNames.length>0&&(r=g.suggestedNames[0]),!c&&g.serviceUrl&&(s=g.serviceUrl)}}else{const[h]=await yr.tabs.query({active:!0,currentWindow:!0});if(h!=null&&h.url){const g=cv.getServiceInfoFromTab(h.url,h.title);g.suggestedNames.length>0&&!r&&(r=g.suggestedNames[0]),g.serviceUrl&&(s=g.serviceUrl)}}}catch(l){console.error("Error detecting service information:",l)}return{serviceName:r,serviceUrl:s}},[t])}},W4=5e3;class as{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 n=e.trim();if(n&&!(!n.startsWith("http://")&&!n.startsWith("https://")&&!n.startsWith("www.")))return n.startsWith("www.")?`https://${n}`:n}static extractFirstValidUrl(e){if(!e)return;const r=(Array.isArray(e)?e:[e]).find(s=>{const l=s==null?void 0:s.trim();return l&&(l.startsWith("http://")||l.startsWith("https://")||l.startsWith("www."))});return as.normalizeUrl(r)}static hasLogoForUrl(e,n){if(!e)return!1;const r=as.extractSourceFromUrl(e);return r==="unknown"?!1:n.logos.hasLogoForSource(r)}static async fetchFavicon(e,n,r,s=W4){const l=as.normalizeUrl(e);if(!l)return{success:!1,error:"Invalid URL"};const c=as.extractSourceFromUrl(l);if(c==="unknown")return{success:!1,error:"Could not extract domain from URL"};if(n.logos.hasLogoForSource(c))return{success:!1,skipped:!0};try{const m=new Promise((A,p)=>setTimeout(()=>p(new Error("Favicon extraction timed out")),s)),h=r.get(`Favicon/Extract?url=${encodeURIComponent(l)}`),g=await Promise.race([h,m]);return g!=null&&g.image?{success:!0,imageData:Uint8Array.from(To.Buffer.from(g.image,"base64"))}:{success:!1,error:"No favicon returned from server"}}catch(m){const h=m instanceof Error?m.message:"Unknown error";return console.error("[Favicon] Error extracting favicon:",h),{success:!1,error:h}}}static async fetchAndAttachFavicon(e,n,r,s){const l=as.extractFirstValidUrl(n);if(!l)return{...e,Logo:void 0};const c=await as.fetchFavicon(l,r,s);return c.success&&c.imageData?{...e,Logo:c.imageData}:e}}const q4=[Ea.Login,Ea.Alias,Ea.CreditCard,Ea.Note],Y4=Ea.Login,uv=()=>{const{t}=tt(),{id:e}=Vu(),[n]=Ku(),r=Ja(),s=Va(),l=ta(),c=e!==void 0&&e.length>0,m=n.get("type"),h=n.get("name"),g=n.get("folderId"),{executeVaultMutationAsync:A}=Os(),{setHeaderButtons:p}=Ii(),{setIsInitialLoading:v}=va(),{generateAlias:w,generateRandomEmailPrefix:T,lastGeneratedValues:S}=w4(),{detectService:k}=G4(),L=Vi(),[U,x]=b.useState(!0),[F,B]=b.useState(!1),[V,O]=b.useState(!1),[_,z]=b.useState(null),[Q,K]=b.useState({}),[te,ee]=b.useState([]),[Y,le]=b.useState([]),[J,ie]=b.useState(!1),[be,se]=b.useState(!1),[j,W]=b.useState(!1),X=b.useRef(!1),ne=b.useRef(null),[we,ce]=b.useState(!1),[Ee,Te]=b.useState(new Set),[Ce,Pe]=b.useState(new Set),[Ve,bt]=b.useState([]),[gt,it]=b.useState([]),[Ke,Pt]=b.useState({isAddFormVisible:!1,formData:{name:"",secretKey:""}}),[Se,Fe]=b.useState([]),[fe,Re]=b.useState([]),[ze,je]=b.useState([]),[at,wt]=b.useState(!0),[Rt,Tt]=b.useState(void 0),[qt]=b.useState(!1),M=b.useCallback(de=>{de.item&&z(de.item),de.fieldValues&&K(de.fieldValues),de.customFields&&ee(de.customFields),de.totpEditorState&&Pt(de.totpEditorState),de.show2FA!==void 0&&se(de.show2FA),de.showAttachments!==void 0&&W(de.showAttachments),de.manuallyAddedFields&&Te(new Set(de.manuallyAddedFields)),de.isLoginEmailInEmailMode!==void 0&&wt(de.isLoginEmailInEmailMode),de.passwordSettings!==void 0&&Tt(de.passwordSettings)},[]),{loadPersistedValues:C,clearPersistedValues:N}=I4({formId:e||null,isLoading:U,formData:{item:_,fieldValues:Q,customFields:te,totpEditorState:Ke,show2FA:be,showAttachments:j,manuallyAddedFields:Array.from(Ee),isLoginEmailInEmailMode:at,passwordSettings:Rt},onRestore:M,skipRestore:qt}),G=b.useMemo(()=>_?HU(_.ItemType):[],[_]),ae=b.useMemo(()=>G.find(de=>de.FieldKey==="notes.content"),[G]),pe=b.useMemo(()=>_?VU(_.ItemType):[],[_]),Ne=b.useMemo(()=>{const de=new Set;return G.forEach(Oe=>{_&&Zl(Oe,_.ItemType)&&de.add(Oe.FieldKey)}),Ee.forEach(Oe=>de.add(Oe)),Ce.forEach(Oe=>de.add(Oe)),Object.keys(Q).forEach(Oe=>{const Qe=Q[Oe];Qe&&(Array.isArray(Qe)?Qe.length>0:Qe.toString().trim()!=="")&&de.add(Oe)}),de},[_,G,Ee,Ce,Q]),_e=b.useCallback(de=>{if(!_)return!1;if(Ee.has(de.FieldKey)||Ce.has(de.FieldKey))return!0;const Oe=G.find(Qe=>Qe.FieldKey===de.FieldKey);return Oe?Zl(Oe,_.ItemType):!0},[_,G,Ee,Ce]),ht=b.useMemo(()=>G.filter(de=>de.Category===mt.Primary),[G]),pt=b.useMemo(()=>{const de={};return G.forEach(Oe=>{if(Oe.Category===mt.Notes||Oe.Category===mt.Metadata||Oe.Category===mt.Primary)return;const Qe=Oe.Category;de[Qe]||(de[Qe]=[]),de[Qe].push(Oe)}),de},[G]);b.useEffect(()=>{if(!(l!=null&&l.sqliteClient)||!e||!c){const de=m&&q4.includes(m)?m:Y4;(async()=>{const{serviceName:Qe,serviceUrl:We}=await k(h),ot={Id:crypto.randomUUID().toUpperCase(),Name:Qe,ItemType:de,FolderId:g||null,Fields:[],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()};if(z(ot),wt(de===Ea.Login),We&&K(q=>({...q,"login.url":We})),l!=null&&l.sqliteClient){const q=l.sqliteClient.folders.getAll();le(q)}await dt.getSkipFormRestore()?await dt.setSkipFormRestore(!1):await C(),x(!1),v(!1)})();return}try{const de=l.sqliteClient.items.getById(e);if(de){z(de);const Oe=l.sqliteClient.folders.getAll();le(Oe);const Qe={},We=[],ot=new Set;de.Fields.forEach(Ie=>{Qe[Ie.FieldKey]=Ie.Value,ot.add(Ie.FieldKey),Ie.IsCustomField&&We.push({tempId:Ie.FieldKey,label:Ie.Label,fieldType:Ie.FieldType,isHidden:Ie.IsHidden,displayOrder:Ie.DisplayOrder})}),K(Qe),We.sort((Ie,He)=>Ie.displayOrder-He.displayOrder),ee(We),Pe(ot);const Me=l.sqliteClient.settings.getTotpCodesForItem(e);bt(Me),it(Me.map(Ie=>Ie.Id)),Me.length>0&&se(!0);const q=l.sqliteClient.settings.getAttachmentsForItem(e);Fe(q),Re(q.map(Ie=>Ie.Id)),q.length>0&&W(!0),x(!1),v(!1)}else console.error("Item not found"),s("/items")}catch(de){console.error("Error loading item:",de),x(!1),v(!1)}},[l==null?void 0:l.sqliteClient,e,c,m,h,g,s,v,k,C]);const It=b.useCallback(async()=>{const de=await w();de&&(K(Oe=>{const Qe=Oe["login.username"]||"",We=Oe["login.password"]||"",ot=Oe["login.email"]||"",Me={...Oe,"alias.first_name":de.firstName,"alias.last_name":de.lastName,"alias.gender":de.gender,"alias.birthdate":de.birthdate};return(!ot||ot===S.email)&&(Me["login.email"]=de.email),(!Qe||Qe===S.username)&&(Me["login.username"]=de.username),(!We||We===S.password)&&(Me["login.password"]=de.password),Me}),ce(!0))},[w,S]),At=b.useCallback(()=>{if(!(l!=null&&l.sqliteClient))return;const de=Q["alias.first_name"]||"",Oe=Q["alias.last_name"]||"";let Qe;if(!de.trim()&&!Oe.trim())Qe=T();else{const Me=Q["alias.gender"]||Vk.Other,q=Q["alias.birthdate"]||"";Qe=new Qp().generateEmailPrefix({firstName:de,lastName:Oe,gender:Me,birthDate:q?new Date(q):new Date,emailPrefix:"",nickName:""})}const We=l.sqliteClient.settings.getDefaultEmailDomain(),ot=We?`${Qe}@${We}`:Qe;K(Me=>({...Me,"login.email":ot}))},[l==null?void 0:l.sqliteClient,Q,T]),hi=b.useCallback(()=>{if(!(l!=null&&l.sqliteClient))return;const de=T(),Oe=l.sqliteClient.settings.getDefaultEmailDomain(),Qe=Oe?`${de}@${Oe}`:de;K(We=>({...We,"login.email":Qe}))},[l==null?void 0:l.sqliteClient,T]),xa=b.useCallback(async()=>{const de=await w();de&&K(Oe=>({...Oe,"login.username":de.username}))},[w]),Sa=b.useMemo(()=>{if(!_)return!1;const de=G.find(Oe=>Oe.FieldKey==="alias.first_name");return de?Zl(de,_.ItemType):!1},[_,G]),Yt=b.useMemo(()=>G.some(de=>de.FieldKey==="login.username"||de.FieldKey==="login.password"),[G]);b.useEffect(()=>{!c&&Sa&&!U&&(l!=null&&l.sqliteClient)&&!X.current&&(X.current=!0,It())},[c,Sa,U,l==null?void 0:l.sqliteClient,It]),b.useEffect(()=>{!c&&!U&&ne.current&&ne.current.focus()},[c,U]);const Vt=b.useCallback((de,Oe)=>{K(Qe=>({...Qe,[de]:Oe}))},[]),Be=b.useCallback(async()=>{var de;if(!(!_||F)){Co.flushSync(()=>{B(!0)}),await new Promise(Oe=>setTimeout(Oe,10));try{const Oe=[];G.forEach(ot=>{const Me=Q[ot.FieldKey];Me&&(Array.isArray(Me)?Me.length>0:Me.trim()!=="")&&Oe.push({FieldKey:ot.FieldKey,Label:ot.FieldKey,FieldType:ot.FieldType,Value:Me,IsHidden:ot.IsHidden,DisplayOrder:ot.DefaultDisplayOrder,IsCustomField:!1,EnableHistory:ot.EnableHistory})}),te.forEach(ot=>{const Me=Q[ot.tempId]||"";Oe.push({FieldKey:ot.tempId,Label:ot.label,FieldType:ot.fieldType,Value:Me,IsHidden:ot.isHidden,DisplayOrder:ot.displayOrder,IsCustomField:!0,EnableHistory:!1})});let Qe={..._,Id:c?_.Id:crypto.randomUUID().toUpperCase(),Fields:Oe,UpdatedAt:new Date().toISOString()};const We=Q["login.url"];if(l!=null&&l.sqliteClient&&We?Qe=await as.fetchAndAttachFavicon(Qe,We,l.sqliteClient,L):We||(Qe.Logo=void 0),!(l!=null&&l.sqliteClient))throw new Error("Database not initialized");await A(async()=>{if(c){if(await l.sqliteClient.items.update(Qe,fe,Se,gt,Ve),ze.length>0)for(const ot of ze)await l.sqliteClient.passkeys.deleteById(ot)}else await l.sqliteClient.items.create(Qe,Se,Ve)}),N(),c&&((de=r.state)!=null&&de.fromDetails)?s(-1):s(`/items/${Qe.Id}`,{replace:!0})}catch(Oe){console.error("Error saving item:",Oe),B(!1)}}},[_,F,Q,G,te,l,c,A,s,r.state,fe,Se,gt,Ve,ze,L,N]),sn=b.useCallback(async()=>{if(!(!_||!c||!(l!=null&&l.sqliteClient)))try{await A(async()=>{await l.sqliteClient.items.trash(_.Id)}),s("/items")}catch(de){console.error("Error deleting item:",de)}finally{O(!1)}},[_,c,l,A,s]),kt=b.useCallback((de,Oe)=>{const We={tempId:crypto.randomUUID(),label:de,fieldType:Oe,isHidden:!1,displayOrder:G.length+te.length+1};ee(ot=>[...ot,We])},[G.length,te.length]),Lt=b.useCallback(de=>{ee(Oe=>Oe.filter(Qe=>Qe.tempId!==de)),K(Oe=>{const Qe={...Oe};return delete Qe[de],Qe})},[]),La=b.useCallback((de,Oe)=>{ee(Qe=>Qe.map(We=>We.tempId===de?{...We,label:Oe}:We))},[]),on=b.useCallback(de=>{ee(de)},[]),jt=b.useCallback(de=>{if(!_)return;const Oe=_.ItemType;!c&&Oe!==de&&(K(Qe=>{const We={};return Object.entries(Qe).forEach(([ot,Me])=>{const q=No(ot);q?nd(q,de)&&(We[ot]=Me):We[ot]=Me}),We}),Te(Qe=>{const We=new Set;return Qe.forEach(ot=>{const Me=No(ot);(!Me||nd(Me,de))&&We.add(ot)}),We}),Pe(Qe=>{const We=new Set;return Qe.forEach(ot=>{const Me=No(ot);(!Me||nd(Me,de))&&We.add(ot)}),We})),X.current=!1,wt(de===Ea.Login),z({..._,ItemType:de,Fields:c?_.Fields:[]}),ie(!1)},[_,c]),Ut=b.useCallback(()=>{K(de=>({...de,"notes.content":""})),Te(de=>{const Oe=new Set(de);return Oe.delete("notes.content"),Oe})},[]),Qt=b.useCallback(()=>{se(!0),Pt({isAddFormVisible:!0,formData:{name:"",secretKey:""}})},[]),Ht=b.useCallback(()=>{W(!0)},[]),ga=b.useCallback(de=>{Te(Oe=>new Set(Oe).add(de))},[]),fa=b.useMemo(()=>{const de=[];return Yt&&de.push({key:"2fa",isVisible:be,onAdd:Qt}),de.push({key:"attachments",isVisible:j,onAdd:Ht}),de},[Yt,be,j,Qt,Ht]),Xa=b.useCallback(de=>{Te(Oe=>{const Qe=new Set(Oe);return Qe.delete(de),Qe}),K(Oe=>{const Qe={...Oe};return delete Qe[de],Qe})},[]);b.useEffect(()=>{const de=d.jsxs("div",{className:"flex items-center gap-2",children:[c&&d.jsx(_n,{onClick:()=>O(!0),title:t("items.deleteItemTitle"),iconType:qa.DELETE,variant:"danger",disabled:F}),d.jsx(_n,{id:"save-credential",onClick:Be,title:t(F?"common.saving":"items.saveItem"),iconType:qa.SAVE,isLoading:F,disabled:F})]});return p(de),()=>p(null)},[p,c,t,Be,F]);const $a=b.useCallback((de,Oe,Qe,We,ot,Me)=>{const q=Q[de]||"";if(ot){const rt=Array.isArray(q)&&q.length>0?q:q?[q]:[""];return d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:Oe}),rt.map((ia,$t)=>d.jsxs("div",{className:"relative",children:[d.jsx("input",{id:`${de}-${$t}`,type:"text",value:ia,onChange:da=>{const Fa=[...rt];Fa[$t]=da.target.value,Vt(de,Fa.filter(wa=>wa.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"}),$t===rt.length-1&&d.jsx("button",{type:"button",onClick:()=>Vt(de,[...rt,""]),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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})})})]},`${de}-${$t}`))]})}const Ie=Array.isArray(q)?q[0]||"":q,He=(rt,ia=!0)=>Me?d.jsxs("div",{className:"relative",children:[rt,d.jsx("button",{type:"button",onClick:Me,className:`absolute right-2 ${ia?"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:t("common.delete"),children:d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}):rt;switch(Qe){case ea.Password:return He(d.jsx(kO,{id:de,label:Oe,value:Ie,onChange:rt=>Vt(de,rt),showPassword:we,onShowPasswordChange:ce,initialSettings:Rt,onSettingsChange:Tt}));case ea.Hidden:return He(d.jsx(Sk,{id:de,label:Oe,value:Ie,onChange:rt=>Vt(de,rt)}));case ea.TextArea:return He(d.jsxs("div",{children:[Oe&&d.jsx("label",{htmlFor:de,className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:Oe}),d.jsx("textarea",{id:de,value:Ie,onChange:rt=>Vt(de,rt.target.value),rows:4,className:`w-full px-3 py-2 ${Me?"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 ea.Email:return d.jsx(wO,{id:de,value:Ie,onChange:rt=>Vt(de,rt),onRemove:Me,onGenerateAlias:Sa?At:hi,isEmailMode:at,onEmailModeChange:wt});case ea.URL:case ea.Phone:case ea.Number:case ea.Date:case ea.Text:default:return de==="login.username"&&Sa?d.jsx(xO,{id:de,label:Oe,value:Ie,onChange:rt=>Vt(de,rt),onRegenerate:xa}):He(d.jsx(Dd,{id:de,label:Oe,value:Ie,onChange:rt=>Vt(de,rt),type:"text"}))}},[Q,Vt,we,t,At,hi,Sa,xa,at,Rt]),_a=b.useCallback(de=>{de.preventDefault(),Be()},[Be]),pa=b.useCallback(de=>{switch(de){case mt.Login:return t("items.loginCredentials");case mt.Alias:return t("common.alias");case mt.Card:return t("items.cardInformation");default:return de}},[t]),Da=b.useCallback(de=>de===mt.Alias&&Sa?d.jsx(d.Fragment,{children:d.jsx("button",{type:"button",onClick:It,className:"p-1.5 text-gray-400 hover:text-primary-500 focus:outline-none",title:t("common.generate"),children:d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("path",{d:"M23 4v6h-6"}),d.jsx("path",{d:"M20.49 15a9 9 0 1 1-2.12-9.36L23 10"})]})})}):null,[Sa,It,t]);return U||!_?d.jsx("div",{className:"flex justify-center items-center p-8",children:d.jsx(mi,{})}):d.jsxs("form",{onSubmit:_a,className:"space-y-4",children:[d.jsx(zP,{selectedType:_.ItemType,isEditMode:c,showDropdown:J,onDropdownToggle:ie,onTypeChange:jt,onRegenerateAlias:Sa&&!c?It:void 0}),d.jsxs(nu,{children:[d.jsx(VP,{inputRef:ne,value:_.Name||"",onChange:de=>z({..._,Name:de}),folders:Y,selectedFolderId:_.FolderId,onFolderChange:de=>z({..._,FolderId:de})}),ht.map(de=>d.jsx("div",{children:$a(de.FieldKey,t(`fieldLabels.${de.FieldKey}`,{defaultValue:de.FieldKey}),de.FieldType,de.IsHidden,de.IsMultiValue)},de.FieldKey))]}),c&&_.HasPasskey&&d.jsx(RO,{itemId:_.Id,passkeyIdsMarkedForDeletion:ze,onPasskeyMarkedForDeletion:je}),Object.keys(pt).map(de=>{const Oe=pt[de],Qe=Oe.filter(q=>_e(q)),We=de===mt.Login?Oe.find(q=>q.FieldKey==="login.email"):null,ot=We&&!_e(We),Me=de===mt.Login?[...Qe].sort((q,Ie)=>{const He={"login.email":0,"login.username":1,"login.password":2},rt=He[q.FieldKey]??99,ia=He[Ie.FieldKey]??99;return rt-ia}):Qe;return Me.length===0&&!ot?null:d.jsx(nu,{title:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{children:pa(de)}),ot&&d.jsxs("button",{type:"button",onClick:()=>ga("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:[d.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:[d.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),d.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),d.jsx("span",{children:t("common.email")})]})]}),actions:Da(de),children:Me.map(q=>{const Ie=_&&Ee.has(q.FieldKey)&&!Zl(q,_.ItemType);return d.jsx(rn.Fragment,{children:$a(q.FieldKey,t(`fieldLabels.${q.FieldKey}`,{defaultValue:q.FieldKey}),q.FieldType,q.IsHidden,q.IsMultiValue,Ie?()=>Xa(q.FieldKey):void 0)},q.FieldKey)})},de)}),ae&&Ne.has("notes.content")&&d.jsx(nu,{title:t("common.notes"),actions:_e(ae)?void 0:d.jsx("button",{type:"button",onClick:Ut,className:"p-1.5 text-gray-400 hover:text-red-500 focus:outline-none",title:t("common.delete"),children:d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),children:$a(ae.FieldKey,"",ae.FieldType,ae.IsHidden,ae.IsMultiValue)}),te.length>0&&d.jsx(nu,{title:t("common.customFields"),children:d.jsx(vO,{customFields:te,fieldValues:Q,onFieldsReorder:on,onFieldValueChange:(de,Oe)=>Vt(de,Oe),onFieldLabelChange:La,onFieldDelete:Lt})}),be&&Yt&&d.jsx(HP,{totpCodes:Ve,onTotpCodesChange:bt,originalTotpCodeIds:gt,isAddFormVisible:Ke.isAddFormVisible,formData:Ke.formData,onStateChange:Pt,itemDisplayName:(_==null?void 0:_.Name)||void 0,itemUsername:Q["login.username"]||Q["login.email"]}),j&&d.jsx(LO,{attachments:Se,onAttachmentsChange:Fe,itemId:c?e:void 0}),d.jsx(L_,{optionalSystemFields:pe,visibleFieldKeys:Ne,optionalSections:fa,callbacks:{onAddSystemField:ga,onAddCustomField:kt}}),c&&d.jsx(xu,{isOpen:V,onClose:()=>O(!1),title:t("items.deleteItemTitle"),message:t("items.deleteItemConfirm"),confirmText:t("common.delete"),cancelText:t("common.cancel"),onConfirm:sn,variant:"danger"})]})},J4=({itemId:t})=>{const{t:e}=tt(),[n,r]=b.useState([]),[s,l]=b.useState(!0),c=ta(),m=h=>{try{const g=h.Blob instanceof Uint8Array?h.Blob:new Uint8Array(h.Blob),A=new Blob([g]),p=URL.createObjectURL(A),v=document.createElement("a");v.href=p,v.download=h.Filename,document.body.appendChild(v),v.click(),document.body.removeChild(v),URL.revokeObjectURL(p)}catch(g){console.error("Error downloading attachment:",g)}};return b.useEffect(()=>{(async()=>{if(!(!(c!=null&&c.sqliteClient)||!t))try{const g=c.sqliteClient.settings.getAttachmentsForItem(t);r(g)}catch(g){console.error("Error loading attachments:",g)}finally{l(!1)}})()},[t,c==null?void 0:c.sqliteClient]),s?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.attachments")}),e("common.loadingAttachments")]}):n.length===0?null:d.jsx("div",{className:"mb-4",children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.attachments")}),d.jsx("div",{className:"grid grid-cols-1 gap-2",children:n.map(h=>d.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(h),"aria-label":`Download ${h.Filename}`,children:d.jsxs("div",{className:"flex justify-between items-center gap-2",children:[d.jsx("div",{className:"flex items-center flex-1",children:d.jsxs("div",{className:"flex flex-col",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:h.Filename}),d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(h.CreatedAt).toLocaleDateString()})]})}),d.jsx("div",{className:"flex items-center",children:d.jsx("svg",{className:"w-4 h-4 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})})]})},h.Id))})]})})};class X4{constructor(){Ge(this,"currentCopiedId","");Ge(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(n=>n!==e)}}notifySubscribers(){this.onCopyCallbacks.forEach(e=>e(this.currentCopiedId))}}const ru=new X4,Ef=({name:t})=>{switch(t){case"visibility":return d.jsxs(d.Fragment,{children:[d.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),d.jsx("circle",{cx:"12",cy:"12",r:"3"})]});case"visibility-off":return d.jsxs(d.Fragment,{children:[d.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"}),d.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]});case"copy":return d.jsxs(d.Fragment,{children:[d.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),d.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 d.jsx(d.Fragment,{children:d.jsx("polyline",{points:"20 6 9 17 4 12"})});default:return null}},Eu=({id:t,label:e,value:n,type:r="text",labelSuffix:s})=>{const{t:l}=tt(),[c,m]=b.useState(!1),[h,g]=b.useState(!1);b.useEffect(()=>{const p=ru.subscribe(v=>{g(v===t)});return()=>{p()}},[t]);const A=async()=>{try{await navigator.clipboard.writeText(n),ru.setCopied(t),await St("CLIPBOARD_COPIED",{value:n},"background"),setTimeout(()=>{ru.getCopiedId()===t&&ru.setCopied("")},2e3)}catch(p){console.error("Failed to copy text:",p)}};return d.jsxs("div",{children:[d.jsxs("label",{htmlFor:t,className:"block mb-2 text-sm font-medium text-gray-700 dark:text-gray-300",children:[e,s]}),d.jsxs("div",{className:"relative",children:[d.jsx("input",{type:r==="password"&&!c?"password":"text",id:t,readOnly:!0,value:n,onClick:A,className:`w-full pl-3 py-2.5 bg-white border ${h?"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 truncate ${r==="password"?"pr-16":"pr-10"}`}),d.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-2",children:[h?d.jsx("button",{type:"button",className:"p-1 text-green-500 dark:text-green-400 transition-colors duration-200",title:l("common.copied"),children:d.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx(Ef,{name:"check"})})}):d.jsx("button",{type:"button",onClick:A,className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:l("common.copyToClipboard"),children:d.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx(Ef,{name:"copy"})})}),r==="password"&&d.jsx("button",{type:"button",onClick:()=>m(!c),className:"p-1 text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white transition-colors duration-200",title:l(c?"common.hidePassword":"common.showPassword"),children:d.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx(Ef,{name:c?"visibility-off":"visibility"})})})]})]})]})},$4=({isOpen:t,onClose:e,itemId:n,fieldKey:r,fieldLabel:s,fieldType:l,isHidden:c})=>{const{t:m}=tt(),h=ta(),{executeVaultMutationAsync:g}=Os(),[A,p]=b.useState([]),[v,w]=b.useState(!0),[T,S]=b.useState(null),k=c||l===ea.Password||l===ea.Hidden,L=b.useCallback(async()=>{if(h!=null&&h.sqliteClient)try{w(!0);const B=h.sqliteClient.items.getFieldHistory(n,r);p(B)}catch(B){console.error("Error loading field history:",B)}finally{w(!1)}},[h==null?void 0:h.sqliteClient,n,r]);b.useEffect(()=>{t&&L()},[t,h==null?void 0:h.sqliteClient,n,r,L]);const U=B=>{try{return new Date(B).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return B}},x=B=>{try{return JSON.parse(B)}catch{return[B]}},F=async B=>{if(h!=null&&h.sqliteClient)try{await g(async()=>{await h.sqliteClient.items.deleteFieldHistory(B)}),L(),S(null)}catch(V){console.error("Error deleting field history:",V)}};return d.jsx(Zn,{isOpen:t,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:v?d.jsx("div",{className:"flex items-center justify-center py-8",children:d.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):A.length===0?d.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:m("items.noHistoryAvailable")}):d.jsx("div",{className:"space-y-3",children:A.map(B=>{const V=x(B.ValueSnapshot),O=T===B.Id;return d.jsxs("div",{className:"rounded-lg p-4 border border-gray-200 dark:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:U(B.ChangedAt)}),O?d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>F(B.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")}),d.jsx("button",{type:"button",onClick:()=>S(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")})]}):d.jsx("button",{type:"button",onClick:()=>S(B.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:d.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:d.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"})})})]}),V.map((_,z)=>d.jsx("div",{className:"mt-2",children:d.jsx(Eu,{id:`history-${B.Id}-${z}`,label:"",value:_,type:k?"password":"text"})},z))]},B.Id)})})})},mv=/(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,Z4=t=>{const e=[];let n=0,r;for(mv.lastIndex=0;(r=mv.exec(t))!==null;){r.index>n&&e.push({type:"text",content:t.slice(n,r.index)});const s=r[0],l=s.startsWith("http")?s:`http://${s}`;e.push({type:"url",content:s,href:l}),n=r.index+s.length}return n<t.length&&e.push({type:"text",content:t.slice(n)}),e},e9=({text:t})=>{const e=Z4(t);return d.jsx(d.Fragment,{children:e.map((n,r)=>n.type==="url"?d.jsx("a",{href:n.href,target:"_blank",rel:"noopener noreferrer",className:"text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300",children:n.content},r):d.jsx(rn.Fragment,{children:n.content},r))})},vo=({field:t,itemId:e,hideLabel:n=!1})=>{const{t:r}=tt(),s=ta(),[l,c]=b.useState(!1),[m,h]=b.useState(0),g=t.IsCustomField?t.Label||t.FieldKey:r(`fieldLabels.${t.FieldKey}`,{defaultValue:t.FieldKey}),A=t.EnableHistory===!0;if(b.useEffect(()=>{if(A&&e&&(s!=null&&s.sqliteClient))try{const S=s.sqliteClient.items.getFieldHistory(e,t.FieldKey);if(S.length>1)h(S.length);else if(S.length===1){const k=Array.isArray(t.Value)?t.Value:[t.Value],L=JSON.stringify(k.filter(x=>x&&x.trim()!=="")),U=S[0].ValueSnapshot;h(L!==U?1:0)}else h(0)}catch(S){console.error("[FieldBlock] Error checking history:",S)}},[A,e,t.FieldKey,t.Value,s==null?void 0:s.sqliteClient]),!t.Value||typeof t.Value=="string"&&t.Value.trim()==="")return null;const p=Array.isArray(t.Value)?t.Value:[t.Value];if(p.length>1)return d.jsx("div",{className:"space-y-2",children:p.map((S,k)=>d.jsx(Eu,{id:`${t.FieldKey}-${k}`,label:k===0?g:`${g} ${k+1}`,value:S,type:t.FieldType===ea.Password?"password":"text"},`${t.FieldKey}-${k}`))});const v=p[0],w=m>0&&e?d.jsx("button",{type:"button",onClick:()=>c(!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:r("items.viewHistory"),children:d.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:d.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,T=l&&e?d.jsx($4,{isOpen:l,onClose:()=>c(!1),itemId:e,fieldKey:t.FieldKey,fieldLabel:g,fieldType:t.FieldType,isHidden:t.IsHidden}):null;switch(t.FieldType){case ea.Password:case ea.Hidden:return d.jsxs(d.Fragment,{children:[d.jsx(Eu,{id:t.FieldKey,label:g,value:v,type:"password",labelSuffix:w}),T]});case ea.TextArea:return d.jsxs("div",{children:[!n&&d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:g}),d.jsx("div",{className:"p-4 bg-gray-50 rounded-lg dark:bg-gray-700",children:d.jsx("p",{className:"text-gray-900 dark:text-gray-100 whitespace-pre-wrap",children:d.jsx(e9,{text:v})})})]});case ea.Email:case ea.URL:case ea.Phone:case ea.Date:case ea.Number:case ea.Text:default:return d.jsxs(d.Fragment,{children:[d.jsx(Eu,{id:t.FieldKey,label:g,value:v,type:"text",labelSuffix:w}),T]})}},t9=t=>t?t.length===6?`${t.slice(0,3)} ${t.slice(3)}`:t:"",a9=({itemId:t})=>{const{t:e}=tt(),[n,r]=b.useState([]),[s,l]=b.useState(!0),[c,m]=b.useState({}),[h,g]=b.useState(null),A=ta(),p=(S=30)=>{const k=new ka({secret:"dummy",algorithm:"SHA1",digits:6,period:S});return k.period-Math.floor(Date.now()/1e3)%k.period},v=()=>{const S=p();return Math.floor((30-S)/30*100)},w=S=>{try{return new ka({secret:S,algorithm:"SHA1",digits:6,period:30}).generate()}catch(k){return console.error("Error generating TOTP code:",k),"Error"}},T=async(S,k)=>{try{await navigator.clipboard.writeText(S),g(k),await St("CLIPBOARD_COPIED",{value:S},"background"),setTimeout(()=>{g(null)},2e3)}catch(L){console.error("Failed to copy:",L)}};return b.useEffect(()=>{(async()=>{if(!(!(A!=null&&A.sqliteClient)||!t))try{const k=A.sqliteClient.settings.getTotpCodesForItem(t);r(k)}catch(k){console.error("Error loading TOTP codes:",k)}finally{l(!1)}})()},[t,A==null?void 0:A.sqliteClient]),b.useEffect(()=>{const S=U=>{const x={};return n.forEach(F=>{const B=w(F.SecretKey);B!=="Error"?x[F.Id]=B:x[F.Id]=U[F.Id]??"Error"}),x},k={};n.forEach(U=>{k[U.Id]=w(U.SecretKey)}),m(k);const L=setInterval(()=>{m(S)},1e3);return()=>{clearInterval(L)}},[n]),s?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:e("common.twoFactorAuthentication")}),e("common.loadingTotpCodes")]}):n.length===0?null:d.jsx("div",{className:"mb-4",children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:e("common.twoFactorAuthentication")}),d.jsx("div",{className:"grid grid-cols-1 gap-2",children:n.map(S=>d.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:()=>T(c[S.Id],S.Id),"aria-label":`Copy ${S.Name} code`,children:d.jsxs("div",{className:"flex justify-between items-center gap-2",children:[d.jsx("div",{className:"flex items-center flex-1",children:d.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white",children:S.Name})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs("div",{className:"flex flex-col items-end",children:[d.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:t9(c[S.Id])}),d.jsx("div",{className:"text-xs",children:h===S.Id?d.jsx("span",{className:"text-green-600 dark:text-green-400",children:e("common.copied")}):d.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:[p(),"s"]})})]}),d.jsx("div",{className:"w-1 h-6 bg-gray-200 rounded-full dark:bg-gray-600",children:d.jsx("div",{className:"bg-blue-600 rounded-full transition-all",style:{height:`${v()}%`,width:"100%"}})})]})]})},S.Id))})]})})};var bu={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 bf=({svg:t,className:e="w-8 h-8"})=>d.jsx("div",{className:`${e} flex-shrink-0`,dangerouslySetInnerHTML:{__html:t}}),n9=t=>{if(!t)return"CreditCard";const e=t.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"},i9=t=>bu[n9(t)],W1=({item:t,className:e="w-8 h-8"})=>{var r;if(t.ItemType===Ea.Note)return d.jsx(bf,{svg:bu.Note,className:e});if(t.ItemType===Ea.CreditCard){const s=(r=t.Fields)==null?void 0:r.find(c=>c.FieldKey===gn.CardNumber),l=s!=null&&s.Value?Array.isArray(s.Value)?s.Value[0]:s.Value:void 0;return d.jsx(bf,{svg:i9(l),className:e})}const n=t.Logo&&t.Logo.length>0?Mf.imgSrcFromBytes(t.Logo):null;return n?d.jsx("img",{src:n,alt:t.Name||"Item",className:`${e} flex-shrink-0`,onError:s=>{const l=s.target;l.style.display="none";const c=l.parentElement;if(c){const m=document.createElement("div");m.className=e,m.innerHTML=bu.Placeholder,c.insertBefore(m,l)}}}):d.jsx(bf,{svg:bu.Placeholder,className:e})},r9=({email:t})=>{const{t:e}=tt(),[n,r]=b.useState([]),[s,l]=b.useState([]),[c,m]=b.useState(!0),[h,g]=b.useState(0),[A,p]=b.useState(!1),[v,w]=b.useState(null),[T,S]=b.useState(!1),[k,L]=b.useState(2),U=Vi(),x=ta(),F=3,B=k<n.length,V=(Q,K)=>{const te=Q.slice(0,K);l(te)},O=()=>{const Q=Math.min(k+F,n.length);L(Q),V(n,Q)},_=async Q=>(await id("local:publicEmailDomains")??[]).some(te=>Q.toLowerCase().endsWith(`@${te.toLowerCase()}`)),z=async Q=>(await id("local:privateEmailDomains")??[]).some(te=>Q.toLowerCase().endsWith(`@${te.toLowerCase()}`));return b.useEffect(()=>{const Q=async()=>{var te;try{if(x.isOffline){m(!1);return}w(null);const ee=await _(t),Y=await z(t),le=ee||Y;if(p(ee),S(le),!le)return;if(ee){const J=t.split("@")[0],ie=await fetch(`https://api.spamok.com/v2/EmailBox/${J}`,{headers:{"X-Asdasd-Platform-Id":"av-chrome","X-Asdasd-Platform-Version":hn.VERSION}});if(!ie.ok){w(e("common.errors.unknownError"));return}const be=await ie.json(),se=((te=be==null?void 0:be.mails)==null?void 0:te.toSorted((j,W)=>new Date(W.dateSystem).getTime()-new Date(j.dateSystem).getTime()))??[];c&&se.length>0&&g(se[0].id),r(j=>JSON.stringify(j.map(X=>X.id))!==JSON.stringify(se.map(X=>X.id))?(V(se,k),se):j)}else if(Y)try{const J=await U.authFetch(`EmailBox/${t}`,{method:"GET"},!0,!1);try{const be=J.mails.toSorted((se,j)=>new Date(j.dateSystem).getTime()-new Date(se.dateSystem).getTime());if(be){const se=await Zt.decryptEmailList(be,x.sqliteClient.settings.getAllEncryptionKeys());c&&se.length>0&&g(se[0].id),r(j=>JSON.stringify(j.map(X=>X.id))!==JSON.stringify(se.map(X=>X.id))?(V(se,k),se):j),w(null)}}catch{const ie=J;if(x.shouldSuppressEmailErrors())return;w(e("emails.apiErrors."+(ie==null?void 0:ie.code)));return}}catch{if(x.shouldSuppressEmailErrors())return;w(e("common.errors.unknownError"));return}}catch(ee){console.error("Error loading emails:",ee),w(e("common.errors.unknownError"))}m(!1)};Q();const K=setInterval(Q,2e3);return()=>clearInterval(K)},[t,c,U,x,e,k]),T?x.isOffline?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[d.jsx("div",{className:"flex items-center gap-2 mb-2",children:d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),d.jsx("p",{className:"text-sm",children:e("emails.offlineMessage")})]}):v?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[d.jsx("div",{className:"flex items-center gap-2 mb-2",children:d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")})}),d.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded",children:d.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:v})})]}):c?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("common.loadingEmails")]}):n.length===0?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 mb-4 text-sm",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),e("emails.noEmails")]}):d.jsxs("div",{className:"space-y-2 mb-4",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:e("common.recentEmails")}),d.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"})]}),s.map(Q=>A?d.jsxs("a",{href:`https://spamok.com/${t.split("@")[0]}/${Q.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 ${Q.id>h?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[d.jsx("div",{className:"truncate flex-1",children:d.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[Q.subject.substring(0,30),Q.subject.length>30?"...":""]})}),d.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(Q.dateSystem).toLocaleDateString()})]},Q.id):d.jsxs(Qu,{to:`/emails/${Q.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 ${Q.id>h?"bg-yellow-50 dark:bg-yellow-900/30":""}`,children:[d.jsx("span",{className:"truncate flex-1",children:d.jsxs("span",{className:"text-sm text-gray-900 dark:text-white",children:[Q.subject.substring(0,30),Q.subject.length>30?"...":""]})}),d.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:new Date(Q.dateSystem).toLocaleDateString()})]},Q.id)),B&&d.jsxs("button",{onClick:O,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:[d.jsx("span",{children:e("common.loadMore")}),d.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}):null},s9=()=>{const{t}=tt(),{id:e}=Vu(),n=Va(),r=ta(),[s,l]=b.useState(null),{setIsInitialLoading:c}=va(),{setHeaderButtons:m}=Ii(),h=b.useCallback(()=>{Ba.openInNewPopup(`/items/${e}`)},[e]),g=b.useCallback(()=>{n(`/items/${e}/edit`,{state:{fromDetails:!0}})},[e,n]);if(b.useEffect(()=>{if(Ba.isPopup()&&(window.history.replaceState({},"","popup.html#/items"),window.history.pushState({},"",`popup.html#/items/${e}`)),!(!(r!=null&&r.sqliteClient)||!e))try{const w=r.sqliteClient.items.getById(e);w?(l(w),c(!1)):(console.error("Item not found"),n("/items"))}catch(w){console.error("Error loading item:",w)}},[r.sqliteClient,e,n,c]),b.useEffect(()=>{const w=d.jsxs("div",{className:"flex items-center gap-2",children:[!Ba.isPopup()&&d.jsx(_n,{onClick:h,title:t("common.openInNewWindow"),iconType:qa.EXPAND}),d.jsx(_n,{onClick:g,title:t("items.editItem"),iconType:qa.EDIT})]});return m(w),()=>{}},[m,g,h,t]),b.useEffect(()=>()=>m(null),[m]),!s)return d.jsx("div",{children:t("common.loading")});const A=s.Fields.filter(w=>w.FieldType===ea.URL&&w.Value),p={...s,Fields:s.Fields.filter(w=>w.FieldType!==ea.URL)},v=QU(p);return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"flex justify-between items-start",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(W1,{item:s,className:"w-12 h-12 rounded-lg"}),d.jsxs("div",{children:[d.jsx("h1",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.Name||t("items.untitled")}),A.length>0&&d.jsx("div",{className:"mt-1 space-y-1",children:A.flatMap(w=>(Array.isArray(w.Value)?w.Value:[w.Value]).map((S,k)=>/^https?:\/\//i.test(S)?d.jsx("a",{href:S,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:S},`${w.FieldKey}-${k}`):d.jsx("span",{className:"block text-gray-500 dark:text-gray-300 break-all text-sm",children:S},`${w.FieldKey}-${k}`)))})]})]})}),(s.ItemType===Ea.Login||s.ItemType===Ea.Alias)&&(()=>{const w=s.Fields.find(k=>k.FieldKey==="login.email"),T=w==null?void 0:w.Value,S=Array.isArray(T)?T[0]:T;return S?d.jsx(r9,{email:S}):null})(),(s.ItemType===Ea.Login||s.ItemType===Ea.Alias)&&d.jsx(a9,{itemId:s.Id}),(s.ItemType===Ea.Login||s.ItemType===Ea.Alias)&&s.HasPasskey&&d.jsx(DO,{itemId:s.Id}),s.ItemType===Ea.Note&&v[mt.Notes]&&v[mt.Notes].length>0&&v[mt.Notes].map(w=>d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t(`fieldLabels.${w.FieldKey}`,{defaultValue:w.Label||w.FieldKey})}),d.jsx(vo,{field:w,itemId:s.Id,hideLabel:!0})]},w.FieldKey)),Object.keys(v).length>0&&d.jsxs(d.Fragment,{children:[v[mt.Login]&&v[mt.Login].length>0&&d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.credentials")}),v[mt.Login].map(w=>d.jsx(vo,{field:w,itemId:s.Id},w.FieldKey))]}),v[mt.Alias]&&v[mt.Alias].length>0&&d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.alias")}),v[mt.Alias].map(w=>d.jsx(vo,{field:w,itemId:s.Id},w.FieldKey))]}),v[mt.Card]&&v[mt.Card].length>0&&d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("items.cardInformation")}),v[mt.Card].map(w=>d.jsx(vo,{field:w,itemId:s.Id},w.FieldKey))]}),s.ItemType!==Ea.Note&&v[mt.Notes]&&v[mt.Notes].length>0&&v[mt.Notes].map(w=>d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t(`fieldLabels.${w.FieldKey}`,{defaultValue:w.Label||w.FieldKey})}),d.jsx(vo,{field:w,itemId:s.Id,hideLabel:!0})]},w.FieldKey)),v[mt.Custom]&&v[mt.Custom].length>0&&d.jsxs("div",{className:"space-y-2",children:[d.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:t("common.customFields")}),v[mt.Custom].map(w=>d.jsx(vo,{field:w,itemId:s.Id},w.FieldKey))]})]}),d.jsx(J4,{itemId:s.Id}),s.Tags&&s.Tags.length>0&&d.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-4",children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t("items.tags")}),d.jsx("div",{className:"flex flex-wrap gap-2",children:s.Tags.map(w=>d.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:w.Name},w.Id))})]})]})},o9=({isOpen:t,onClose:e,onDeleteFolderOnly:n,onDeleteFolderAndContents:r,itemCount:s})=>{const{t:l}=tt(),[c,m]=b.useState(!1),h=async()=>{m(!0);try{await n(),e()}catch(p){console.error("Error deleting folder:",p)}finally{m(!1)}},g=async()=>{m(!0);try{await r(),e()}catch(p){console.error("Error deleting folder with contents:",p)}finally{m(!1)}},A=()=>{c||e()};return d.jsx(Zn,{isOpen:t,onClose:A,title:l("items.deleteFolder"),footer:d.jsx("div",{className:"flex justify-end",children:d.jsx("button",{type:"button",onClick:A,disabled:c,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:l("common.cancel")})}),children:d.jsx("div",{className:"space-y-4",children:d.jsxs("div",{className:"space-y-3 pt-2",children:[d.jsx("button",{type:"button",onClick:h,disabled:c,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:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"mt-0.5 text-orange-500",children:d.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[d.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"}),d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 14l2 2 4-4"})]})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:l("items.deleteFolderKeepItems")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:l("items.deleteFolderKeepItemsDescription")})]})]})}),s>0&&d.jsx("button",{type:"button",onClick:g,disabled:c,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:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:"mt-0.5 text-red-500",children:d.jsxs("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[d.jsx("polyline",{points:"3 6 5 6 21 6"}),d.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"})]})}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-red-600 dark:text-red-400",children:l("items.deleteFolderAndItems")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:l("items.deleteFolderAndItemsDescription",{count:s})})]})]})})]})})})},gv=({isOpen:t,onClose:e,onSave:n,initialName:r="",mode:s})=>{const{t:l}=tt(),[c,m]=b.useState(r),[h,g]=b.useState(!1),[A,p]=b.useState(null);b.useEffect(()=>{t&&(m(r),p(null))},[t,r]);const v=async w=>{w.preventDefault();const T=c.trim();if(!T){p(l("items.folderNameRequired"));return}g(!0),p(null);try{await n(T),e()}catch(S){ko(S)?p(ns(S,l("common.errors.unknownErrorTryAgain"))):p(l("common.errors.unknownErrorTryAgain")),console.error("Error saving folder:",S)}finally{g(!1)}};return d.jsx(Zn,{isOpen:t,onClose:e,title:l(s==="create"?"items.createFolder":"items.editFolder"),footer:d.jsxs("div",{className:"flex justify-end gap-3",children:[d.jsx("button",{type:"button",onClick:e,disabled:h,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:l("common.cancel")}),d.jsx("button",{type:"submit",form:"folder-form",disabled:h,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:l(h?"common.saving":s==="create"?"common.create":"common.save")})]}),children:d.jsxs("form",{id:"folder-form",onSubmit:v,children:[d.jsx("label",{htmlFor:"folderName",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:l("items.folderName")}),d.jsx("input",{id:"folderName",type:"text",value:c,onChange:w=>m(w.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"}),A&&d.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:A})]})})},hv=({folder:t,onClick:e})=>d.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:[d.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:d.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"})}),d.jsx("span",{className:"text-gray-700 dark:text-gray-200 font-medium truncate max-w-[120px]",children:t.name}),t.itemCount>0&&d.jsx("span",{className:"text-gray-400 dark:text-gray-500 text-xs",children:t.itemCount})]}),l9=({item:t,showFolderPath:e=!1,searchTerm:n=""})=>{const{t:r}=tt(),s=Va(),l=m=>{var A,p;let h="";const g=(A=m.Fields)==null?void 0:A.find(v=>v.FieldKey===gn.LoginUsername);if(g&&g.Value&&(h=Array.isArray(g.Value)?g.Value[0]:g.Value),!h){const v=(p=m.Fields)==null?void 0:p.find(w=>w.FieldKey===gn.LoginEmail);v&&v.Value&&(h=Array.isArray(v.Value)?v.Value[0]:v.Value)}return h.length>33?h.slice(0,30)+"...":h},c=m=>{let h=r("items.untitled");return m.Name&&(h=m.Name),h.length>33?h.slice(0,30)+"...":h};return d.jsx("li",{children:d.jsxs("button",{onClick:()=>{const m=n?`/items/${t.Id}?returnSearch=${encodeURIComponent(n)}`:`/items/${t.Id}`;s(m)},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:[d.jsx("div",{className:"w-8 h-8 mr-2 flex-shrink-0",children:d.jsx(W1,{item:t,className:"w-8 h-8"})}),d.jsxs("div",{className:"text-left flex-1",children:[d.jsxs("div",{className:"flex items-center gap-1.5",children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:e&&t.FolderPath?d.jsxs(d.Fragment,{children:[d.jsxs("span",{className:"text-gray-500 dark:text-gray-400 text-sm",children:[t.FolderPath," > "]}),c(t)]}):c(t)}),t.HasPasskey&&d.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:d.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"})}),t.HasAttachment&&d.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:d.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"})}),t.HasTotp&&d.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:d.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"})})]}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:l(t)})]})]})})},Lo="items-filter",d9=5*60*1e3,c9=[{value:"OldestFirst",labelKey:"items.sort.oldestFirst"},{value:"NewestFirst",labelKey:"items.sort.newestFirst"},{value:"Alphabetical",labelKey:"items.sort.alphabetical"}],u9=()=>{try{const t=localStorage.getItem(Lo);if(!t)return"all";const{filter:e,timestamp:n}=JSON.parse(t);return Date.now()-n>d9?(localStorage.removeItem(Lo),"all"):e}catch{return"all"}},Jl=t=>{try{localStorage.setItem(Lo,JSON.stringify({filter:t,timestamp:Date.now()}))}catch{}},vf=t=>Object.values(Ea).includes(t),fv=()=>{const{t}=tt(),{folderId:e}=Vu(),n=Ja(),[r]=Ku(),s=ta(),l=wi(),c=Va(),{syncVault:m}=Tp(),{executeVaultMutationAsync:h}=Os(),{setHeaderButtons:g}=Ii(),[A,p]=b.useState([]),[v,w]=b.useState(()=>r.get("search")||""),[T,S]=b.useState(u9()),[k,L]=b.useState(!1),[U,x]=b.useState(!1),[F,B]=b.useState(!1),[V,O]=b.useState(!1),[_,z]=b.useState(0),[Q,K]=b.useState(0),[te,ee]=b.useState("OldestFirst"),[Y,le]=b.useState(!1),[J,ie]=b.useState(!0),{setIsInitialLoading:be}=va();b.useEffect(()=>{dt.getShowFolders().then(ie)},[]);const se=e??null,j=b.useMemo(()=>{if(!se||!(s!=null&&s.sqliteClient))return null;const Re=s.sqliteClient.folders.getAll().find(ze=>ze.Id===se);return(Re==null?void 0:Re.Name)??null},[se,s==null?void 0:s.sqliteClient,Q]),[W,X]=Td(!0,100);b.useEffect(()=>{const fe=v?`${n.pathname}?search=${encodeURIComponent(v)}`:n.pathname,Re=n.pathname+n.search;fe!==Re&&c(fe,{replace:!0})},[v,n.pathname,n.search,c]),b.useEffect(()=>{const fe=n.state;fe!=null&&fe.resetFilters&&(w(""),S("all"),localStorage.removeItem(Lo),c(n.pathname,{replace:!0,state:{}}))},[n.state,n.pathname,c]);const ne=b.useCallback(()=>{const fe=new URLSearchParams;vf(T)&&fe.set("type",T),se&&fe.set("folderId",se);const Re=fe.toString();c(Re?`/items/add?${Re}`:"/items/add")},[c,T,se]),we=b.useCallback(()=>{x(!0)},[]),ce=b.useCallback(async fe=>{if(!(s!=null&&s.sqliteClient)){console.error("[FOLDER DEBUG] No sqliteClient available");return}await h(async()=>{await s.sqliteClient.folders.create(fe,se)});const Re=s.sqliteClient.items.getAll();p(Re)},[s,se,h]),Ee=b.useCallback(async()=>{if(!(s!=null&&s.sqliteClient)||!se)return;await h(async()=>{await s.sqliteClient.folders.delete(se)});const fe=s.sqliteClient.items.getAll();p(fe);const Re=s.sqliteClient.items.getRecentlyDeletedCount();z(Re),c("/items")},[s,se,h,c]),Te=b.useCallback(async()=>{if(!(s!=null&&s.sqliteClient)||!se)return;await h(async()=>{await s.sqliteClient.folders.deleteWithContents(se)});const fe=s.sqliteClient.items.getAll();p(fe);const Re=s.sqliteClient.items.getRecentlyDeletedCount();z(Re),c("/items")},[s,se,h,c]),Ce=b.useCallback(async fe=>{!(s!=null&&s.sqliteClient)||!se||(await h(async()=>{await s.sqliteClient.folders.update(se,fe)}),K(Re=>Re+1),O(!1))},[s,se,h]),Pe=b.useCallback(async()=>{if(s!=null&&s.sqliteClient)try{await m({onSuccess:async fe=>{},onOffline:()=>{},onError:async fe=>{console.error("Error syncing vault:",fe)}})}catch(fe){console.error("Error refreshing items:",fe),await l.logout("Error while syncing vault, please re-authenticate.")}},[s,l,m]),Ve=b.useCallback(async()=>{X(!0),await Pe(),X(!1)},[Pe,X]);b.useEffect(()=>{const fe=d.jsxs("div",{className:"flex items-center gap-2",children:[!Ba.isPopup()&&d.jsx(_n,{onClick:()=>Ba.openInNewPopup(),title:t("common.openInNewWindow"),iconType:qa.EXPAND}),d.jsx(_n,{onClick:ne,title:t("items.addNewItem"),iconType:qa.PLUS})]});return g(fe),()=>g(null)},[g,ne,t]),b.useEffect(()=>{(async()=>{var Re,ze,je;if(s!=null&&s.sqliteClient){X(!0);const at=((Re=s.sqliteClient)==null?void 0:Re.items.getAll())??[];p(at);const wt=((ze=s.sqliteClient)==null?void 0:ze.items.getRecentlyDeletedCount())??0;z(wt);const Rt=((je=s.sqliteClient)==null?void 0:je.settings.getCredentialsSortOrder())??"OldestFirst";ee(Rt),X(!1),be(!1)}})()},[s==null?void 0:s.sqliteClient,X,be]);const bt=()=>{if(se&&j)return j;switch(T){case"passkeys":return t("items.filters.passkeys");case"attachments":return t("common.attachments");case"totp":return t("items.filters.totp");case"all":return t("items.title");default:if(vf(T)){const fe=_u.find(Re=>Re.type===T);if(fe)return t(fe.titleKey)}return t("items.title")}},gt=b.useCallback((fe,Re)=>{w(""),c(`/items/folder/${fe}`)},[c]),it=()=>{if(se||v)return[];if(!(s!=null&&s.sqliteClient))return[];const fe=s.sqliteClient.folders.getAll(),Re=new Map;return A.forEach(je=>{je.FolderId&&Re.set(je.FolderId,(Re.get(je.FolderId)||0)+1)}),fe.map(je=>({id:je.Id,name:je.Name,itemCount:Re.get(je.Id)||0})).sort((je,at)=>je.name.localeCompare(at.name))},Ke=A.filter(fe=>{var wt,Rt;if(se!==null){if(fe.FolderId!==se)return!1}else if(!v&&J&&fe.FolderId)return!1;let Re=!0;if(T==="passkeys"?Re=fe.HasPasskey===!0:T==="attachments"?Re=fe.HasAttachment===!0:T==="totp"?Re=fe.HasTotp===!0:vf(T)&&(Re=fe.ItemType===T),!Re)return!1;const ze=v.toLowerCase().trim();if(!ze)return!0;const je=ze.split(/\s+/).filter(Tt=>Tt.length>0),at=[((wt=fe.Name)==null?void 0:wt.toLowerCase())||""];return(Rt=fe.Fields)==null||Rt.forEach(Tt=>{const qt=Array.isArray(Tt.Value)?Tt.Value.join(" ").toLowerCase():(Tt.Value||"").toLowerCase();at.push(qt),at.push(Tt.Label.toLowerCase())}),je.every(Tt=>at.some(qt=>qt.includes(Tt)))}),Pt=b.useMemo(()=>{const fe=[...Ke];switch(te){case"NewestFirst":return fe.sort((Re,ze)=>new Date(ze.CreatedAt||0).getTime()-new Date(Re.CreatedAt||0).getTime());case"Alphabetical":return fe.sort((Re,ze)=>(Re.Name||"").localeCompare(ze.Name||""));case"OldestFirst":default:return fe.sort((Re,ze)=>new Date(Re.CreatedAt||0).getTime()-new Date(ze.CreatedAt||0).getTime())}},[Ke,te]),Se=it(),Fe=A.length>0&&A.every(fe=>fe.FolderId!==null);return W?d.jsx("div",{className:"flex justify-center items-center p-8",children:d.jsx(mi,{})}):d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center gap-2 mb-4",children:[d.jsxs("div",{className:"relative min-w-0 flex-1 flex items-center gap-2",children:[d.jsxs("button",{onClick:()=>L(!k),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:[d.jsxs("h2",{className:"flex items-baseline gap-1.5 min-w-0 overflow-hidden",children:[d.jsx("span",{className:"truncate",children:bt()}),d.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400 shrink-0",children:["(",Ke.length,")"]})]}),d.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:d.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),se&&d.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[d.jsx("button",{onClick:()=>O(!0),title:t("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:d.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}),d.jsx("button",{onClick:()=>B(!0),title:t("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:d.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[d.jsx("polyline",{points:"3 6 5 6 21 6"}),d.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"})]})})]}),k&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>{L(!1)}}),d.jsx("div",{className:"absolute left-0 top-full mt-1 w-72 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:d.jsxs("div",{className:"py-1",children:[d.jsxs("div",{className:"relative",children:[d.jsx("button",{onClick:()=>{const fe="all";S(fe),Jl(fe),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${T==="all"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("items.title")}),!se&&d.jsxs("button",{onClick:fe=>{fe.stopPropagation();const Re=!J;ie(Re),dt.setShowFolders(Re),L(!1)},className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1.5 px-2 py-1 text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 rounded hover:bg-gray-200 dark:hover:bg-gray-600",children:[d.jsx("span",{children:t("items.filters.folders")}),d.jsxs("svg",{className:`w-5 h-5 ${J?"text-orange-500 dark:text-orange-400":"text-gray-400 dark:text-gray-500"}`,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[d.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),J&&d.jsx("polyline",{points:"7 12 10 15 17 8"})]})]})]}),d.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),_u.map(fe=>d.jsxs("button",{onClick:()=>{const Re=fe.type;S(Re),Jl(Re),L(!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 ${T===fe.type?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[d.jsx("span",{className:T===fe.type?"text-orange-500 dark:text-orange-400":"text-gray-400 dark:text-gray-500",children:fe.iconSvg}),t(fe.titleKey)]},fe.type)),d.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),d.jsx("button",{onClick:()=>{const fe="passkeys";S(fe),Jl(fe),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${T==="passkeys"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("items.filters.passkeys")}),d.jsx("button",{onClick:()=>{const fe="attachments";S(fe),Jl(fe),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${T==="attachments"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("common.attachments")}),d.jsx("button",{onClick:()=>{const fe="totp";S(fe),Jl(fe),L(!1)},className:`w-full text-left px-4 py-2 text-sm hover:bg-gray-100 dark:hover:bg-gray-700 ${T==="totp"?"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:t("items.filters.totp")}),d.jsx("div",{className:"border-t border-gray-200 dark:border-gray-700 my-1"}),d.jsxs("button",{onClick:()=>{L(!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:[d.jsx("span",{children:t("recentlyDeleted.title")}),_>0&&d.jsx("span",{className:"text-gray-400 dark:text-gray-500",children:_})]})]})})]})]}),d.jsxs("div",{className:"flex items-center gap-1",children:[d.jsxs("div",{className:"relative",children:[d.jsx("button",{onClick:()=>le(!Y),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:t("items.sort.title"),children:d.jsxs("svg",{className:"w-5 h-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[d.jsx("line",{x1:"4",y1:"6",x2:"16",y2:"6"}),d.jsx("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),d.jsx("line",{x1:"4",y1:"18",x2:"8",y2:"18"}),d.jsx("polyline",{points:"15 15 18 18 21 15"}),d.jsx("line",{x1:"18",y1:"12",x2:"18",y2:"18"})]})}),Y&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>le(!1)}),d.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:d.jsx("div",{className:"py-1",children:c9.map(fe=>d.jsxs("button",{onClick:async()=>{ee(fe.value),le(!1),await h(async()=>{var Re;(Re=s.sqliteClient)==null||Re.settings.setCredentialsSortOrder(fe.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 ${te===fe.value?"text-orange-600 dark:text-orange-400":"text-gray-700 dark:text-gray-300"}`,children:[te===fe.value?d.jsx("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.jsx("polyline",{points:"20 6 9 17 4 12"})}):d.jsx("span",{className:"w-4"}),d.jsx("span",{children:t(fe.labelKey)})]},fe.value))})})]})]}),d.jsx(Qf,{onClick:Ve})]})]}),A.length>0?d.jsx("div",{className:"mb-4",children:d.jsx("input",{type:"text",value:v,onChange:fe=>w(fe.target.value),placeholder:`${t("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"})}):d.jsx(d.Fragment,{}),A.length===0?d.jsx(d.Fragment,{children:d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[d.jsx("p",{children:t("items.welcomeTitle")}),d.jsx("p",{children:t("items.welcomeDescription")})]})}):Ke.length===0&&Se.length===0&&!Fe?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-3 mb-10",children:[(T!=="all"||v)&&d.jsxs(d.Fragment,{children:[d.jsx("p",{children:v&&T!=="all"?t("items.noMatchingItemsWithFilter",{filter:bt(),search:v}):v?t("items.noMatchingItemsSearch",{search:v}):t("items.noMatchingItems")}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[v&&d.jsxs("button",{onClick:()=>w(""),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:[d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearSearch")]}),T!=="all"&&d.jsxs("button",{onClick:()=>{S("all"),localStorage.removeItem(Lo)},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:[d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearFilter")]})]})]}),se&&d.jsx("p",{className:"text-sm",children:t("items.emptyFolderHint")})]}):Fe&&Ke.length===0&&!se&&!v?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Se.map(fe=>d.jsx(hv,{folder:fe,onClick:()=>gt(fe.id,fe.name)},fe.id)),d.jsxs("button",{onClick:we,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:[d.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.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"})}),d.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[d.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),d.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})]})]}),d.jsx("div",{className:"text-gray-500 dark:text-gray-400 text-sm",children:d.jsx("p",{children:t("items.allItemsInFolders")})})]}):d.jsxs(d.Fragment,{children:[!se&&!v&&J&&d.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[Se.map(fe=>d.jsx(hv,{folder:fe,onClick:()=>gt(fe.id,fe.name)},fe.id)),d.jsxs("button",{onClick:we,className:`inline-flex items-center gap-1 px-2.5 py-1.5 text-xs rounded-full transition-colors focus:outline-none ${Se.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:[d.jsx("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:d.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"})}),d.jsxs("svg",{className:"w-3 h-3 -ml-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[d.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),d.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),Se.length===0&&d.jsx("span",{children:t("items.newFolder")})]})]}),Pt.length>0&&d.jsx("ul",{id:"items-list",className:"space-y-2",children:Pt.map(fe=>d.jsx(l9,{item:fe,showFolderPath:!!v&&!!fe.FolderPath,searchTerm:v},fe.Id))}),(T!=="all"||v)&&d.jsxs("div",{className:"flex flex-wrap justify-center gap-2 mt-4 pt-4",children:[v&&d.jsxs("button",{onClick:()=>w(""),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:[d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearSearch")]}),T!=="all"&&d.jsxs("button",{onClick:()=>{S("all"),localStorage.removeItem(Lo)},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:[d.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[d.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),t("items.clearFilter")]})]})]}),d.jsx(gv,{isOpen:U,onClose:()=>x(!1),onSave:ce,mode:"create"}),d.jsx(gv,{isOpen:V,onClose:()=>O(!1),onSave:Ce,initialName:j||"",mode:"edit"}),d.jsx(o9,{isOpen:F,onClose:()=>B(!1),onDeleteFolderOnly:Ee,onDeleteFolderAndContents:Te,itemCount:Ke.length})]})},pv=[{type:"Login",titleKey:"itemTypes.login.title",iconSvg:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.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"})})}],m9=()=>{const{t}=tt(),e=Va(),{setIsInitialLoading:n}=va(),[r,s]=b.useState(""),[l,c]=b.useState("Login"),[m,h]=b.useState(!1);b.useEffect(()=>{n(!1)},[n]);const g=b.useCallback(()=>{const v=new URLSearchParams;v.set("type",l),r.trim()&&v.set("name",r.trim()),e(`/items/add?${v.toString()}`)},[l,r,e]),A=b.useCallback(v=>{c(v),h(!1)},[]),p=pv.find(v=>v.type===l);return d.jsxs("div",{className:"p-4 space-y-6",children:[d.jsx("div",{children:d.jsx(Dd,{id:"itemName",label:t("common.serviceName"),value:r,onChange:s,type:"text",placeholder:t("common.serviceName")})}),d.jsxs("div",{children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t("itemTypes.typeLabel")}),d.jsxs("div",{className:"relative",children:[d.jsxs("button",{type:"button",onClick:()=>h(!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:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"text-primary-600 dark:text-primary-400",children:p==null?void 0:p.iconSvg}),d.jsx("span",{className:"font-medium",children:p?t(p.titleKey):""})]}),d.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:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>h(!1)}),d.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:pv.map(v=>d.jsxs("button",{type:"button",onClick:()=>A(v.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 ${l===v.type?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-300":"text-gray-900 dark:text-white"}`,children:[d.jsx("span",{className:l===v.type?"text-primary-600 dark:text-primary-400":"text-gray-500 dark:text-gray-400",children:v.iconSvg}),d.jsx("span",{className:"font-medium",children:t(v.titleKey)}),l===v.type&&d.jsx("svg",{className:"w-5 h-5 ml-auto text-primary-600 dark:text-primary-400",fill:"currentColor",viewBox:"0 0 20 20",children:d.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"})})]},v.type))})]})]})]}),d.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:t("common.next")})]})},g9=(t,e=30)=>{const n=new Date(t),r=new Date(n.getTime()+e*24*60*60*1e3),s=new Date,l=Math.ceil((r.getTime()-s.getTime())/(24*60*60*1e3));return Math.max(0,l)},h9=()=>{const{t}=tt(),e=ta(),{executeVaultMutationAsync:n}=Os(),{setHeaderButtons:r}=Ii(),[s,l]=b.useState([]),[c,m]=b.useState(null),[h,g]=b.useState(!1),[A,p]=b.useState(!1),[v,w]=Td(!0,100),T=b.useCallback(()=>{if(e!=null&&e.sqliteClient){const x=e.sqliteClient.items.getRecentlyDeleted();l(x)}},[e==null?void 0:e.sqliteClient]),S=b.useCallback(async x=>{e!=null&&e.sqliteClient&&(await n(async()=>{await e.sqliteClient.items.restore(x)}),T())},[e==null?void 0:e.sqliteClient,n,T]),k=b.useCallback(async()=>{!(e!=null&&e.sqliteClient)||!c||(await n(async()=>{await e.sqliteClient.items.permanentlyDelete(c)}),T(),g(!1),m(null))},[e==null?void 0:e.sqliteClient,n,T,c]),L=b.useCallback(async()=>{e!=null&&e.sqliteClient&&(await n(async()=>{for(const x of s)await e.sqliteClient.items.permanentlyDelete(x.Id)}),T(),p(!1))},[e==null?void 0:e.sqliteClient,n,s,T]);b.useEffect(()=>(r(null),()=>r(null)),[r]),b.useEffect(()=>{(async()=>{e!=null&&e.sqliteClient&&(w(!0),T(),w(!1))})()},[e==null?void 0:e.sqliteClient,w,T]);const U=b.useCallback(()=>{g(!1),m(null)},[]);return v?d.jsx("div",{className:"flex justify-center items-center p-8",children:d.jsx(mi,{})}):d.jsxs("div",{children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsxs("h2",{className:"flex items-baseline gap-1.5 text-gray-900 dark:text-white text-xl",children:[t("recentlyDeleted.title"),d.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["(",s.length,")"]})]}),s.length>0&&d.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:t("recentlyDeleted.emptyAll")})]}),s.length===0?d.jsxs("div",{className:"text-gray-500 dark:text-gray-400 space-y-2 mb-10",children:[d.jsx("p",{children:t("recentlyDeleted.noItems")}),d.jsx("p",{className:"text-sm",children:t("recentlyDeleted.noItemsDescription")})]}):d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4",children:t("recentlyDeleted.description")}),d.jsx("ul",{className:"space-y-2",children:s.map(x=>{const F=x.DeletedAt,B=F?g9(F):30;return d.jsx("li",{className:"relative",children:d.jsx("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[x.Logo&&d.jsx("img",{src:`data:image/png;base64,${btoa(String.fromCharCode(...x.Logo))}`,alt:"",className:"w-6 h-6 rounded"}),d.jsx("span",{className:"font-medium text-gray-900 dark:text-white truncate",children:x.Name||t("items.untitled")})]}),d.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:B>0?t("recentlyDeleted.daysRemaining",{count:B}):d.jsx("span",{className:"text-red-500",children:t("recentlyDeleted.expiringSoon")})})]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{onClick:()=>S(x.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:t("recentlyDeleted.restore")}),d.jsx("button",{onClick:()=>{m(x.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:t("common.delete")})]})]})})},x.Id)})})]}),d.jsx(tp,{isOpen:h&&!!c,onClose:U,onConfirm:k,title:t("recentlyDeleted.confirmDeleteTitle"),message:t("recentlyDeleted.confirmDeleteMessage"),confirmText:t("recentlyDeleted.deletePermanently")}),d.jsx(tp,{isOpen:A,onClose:()=>p(!1),onConfirm:L,title:t("recentlyDeleted.confirmEmptyAllTitle"),message:t("recentlyDeleted.confirmEmptyAllMessage",{count:s.length}),confirmText:t("recentlyDeleted.emptyAll")})]})},q1=({isOpen:t,origin:e,onChoice:n,onCancel:r})=>{const{t:s}=tt();return d.jsxs(Zn,{isOpen:t,onClose:r,title:s("passkeys.useBrowserPasskey"),showCloseButton:!0,children:[d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-6",children:s("passkeys.bypass.description",{origin:e})}),d.jsxs("div",{className:"space-y-3",children:[d.jsx(Ca,{variant:"primary",onClick:()=>n("once"),children:s("passkeys.bypass.thisTimeOnly")}),d.jsx(Ca,{variant:"secondary",onClick:()=>n("always"),children:s("passkeys.bypass.alwaysForSite")}),d.jsx(Ca,{variant:"secondary",onClick:r,children:s("common.cancel")})]})]})};function Y1(t={}){const{enabled:e=!0}=t,n=Ja(),r=Va(),{dbInitialized:s,dbAvailable:l}=ta();return b.useEffect(()=>{if(!(!e||!s)&&!l){const c=`${n.pathname}${n.search}`;dt.setPendingRedirectUrl(c),r("/unlock")}},[e,s,l,n,r]),{isLocked:s&&!l}}async function f9(){const t=await dt.getPendingRedirectUrl();return t&&await dt.setPendingRedirectUrl(null),t}async function p9(){await dt.setPendingRedirectUrl(null)}var J1=(t=>(t.DEFAULT="default",t.URL_EXACT="url_exact",t.URL_SUBDOMAIN="url_subdomain",t))(J1||{});let wf=null;async function X1(){return wf||(wf=(async()=>{const t=yr.runtime.getURL("src/aliasvault_core_bg.wasm"),e=await(await fetch(t)).arrayBuffer();await Sp(e)})()),wf}function A9(t,e){var r;const n=(r=t.Fields)==null?void 0:r.find(s=>s.FieldKey===e);return n?Array.isArray(n.Value)?n.Value.filter(s=>s&&s.length>0):n.Value?[n.Value]:[]:[]}async function y9(t,e,n,r="default"){await X1();const s=t.map(c=>({Id:c.Id,ItemName:c.Name??"",ItemUrls:A9(c,gn.LoginUrl)}));return BB({credentials:s,current_url:e,page_title:n,matching_mode:r}).matched_ids.map(c=>t.find(m=>m.Id===c)).filter(c=>c!==void 0)}async function Gp(t){return await X1(),MB(t)}const Xe=class Xe{constructor(){}static async createPasskey(e,n,r){var Y,le,J,ie,be;Xe.pickSupportedAlgorithm(n.publicKey.pubKeyCredParams);const s=((Y=n.publicKey.rp)==null?void 0:Y.id)||new URL(n.origin).hostname,l=new Uint8Array(await crypto.subtle.digest("SHA-256",Xe.te(s))),c=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]),m=await crypto.subtle.exportKey("jwk",c.publicKey),h=await crypto.subtle.exportKey("jwk",c.privateKey),g=Xe.toB64u(e),A=Xe.buildCoseEc2Es256(m);let p=65;const v=(le=n.publicKey.authenticatorSelection)==null?void 0:le.userVerification,w=!!(r!=null&&r.uvPerformed);(v==="required"||v==="preferred"&&w)&&(p|=4),p|=8,p|=16;const T=new Uint8Array([0,0,0,0]),S=new Uint8Array([e.length>>8&255,e.length&255]),k=Xe.concat(Xe.AAGUID,S,e,A),L=Xe.concat(l,new Uint8Array([p]),T,k),x={type:"webauthn.create",challenge:Xe.challengeToB64u(n.publicKey.challenge),origin:n.origin,crossOrigin:!1},F=JSON.stringify(x),B=Xe.te(F),V=n.publicKey.attestation||"none",O=V==="none"||V==="indirect"?Xe.buildAttObjNone(L):await Xe.buildAttObjPackedSelf(L,B,c.privateKey);let _=null;(J=n.publicKey.user)!=null&&J.id&&(_=typeof n.publicKey.user.id=="string"?n.publicKey.user.id:Xe.toB64(n.publicKey.user.id instanceof Uint8Array?n.publicKey.user.id:new Uint8Array(n.publicKey.user.id)));let z,Q=!1,K;if(r!=null&&r.enablePrf){const se=new Uint8Array(32);if(crypto.getRandomValues(se),z=Xe.toB64u(se),Q=!0,r!=null&&r.prfInputs){const j=Xe.fromB64u(r.prfInputs.first);if(K={first:await Xe.evaluatePrf(se,j)},r.prfInputs.second){const W=Xe.fromB64u(r.prfInputs.second);K.second=await Xe.evaluatePrf(se,W)}}}const te={rpId:s,credentialId:g,publicKey:m,privateKey:h,userId:_,userName:(ie=n.publicKey.user)==null?void 0:ie.name,userDisplayName:(be=n.publicKey.user)==null?void 0:be.displayName,prfSecret:z};return{credential:{id:g,rawId:g,response:{clientDataJSON:Xe.toB64u(B),attestationObject:Xe.toB64u(O)},type:"public-key"},stored:te,prfEnabled:Q,prfResults:K}}static async getAssertion(e,n,r){const s=n,l=e.publicKey.rpId||new URL(e.origin).hostname,c=new Uint8Array(await crypto.subtle.digest("SHA-256",Xe.te(l)));let m=1;const h=e.publicKey.userVerification,g=!!(r!=null&&r.uvPerformed);(h==="required"||h==="preferred"&&g)&&(m|=4),((r==null?void 0:r.includeBEBS)??!0)&&(m|=8,m|=16);const A=new Uint8Array([0,0,0,0]),p=Xe.concat(c,new Uint8Array([m]),A),w={type:"webauthn.get",challenge:Xe.challengeToB64u(e.publicKey.challenge),origin:e.origin,crossOrigin:!1},T=JSON.stringify(w),S=Xe.te(T),k=new Uint8Array(await crypto.subtle.digest("SHA-256",S)),L=Xe.concat(p,k),U=await crypto.subtle.importKey("jwk",s.privateKey,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]),x=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},U,L)),F=Xe.ecdsaRawToDer(x);let B=null;s.userId&&(B=s.userId.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""));let V;if(r!=null&&r.prfInputs&&s.prfSecret){const O=Xe.fromB64u(s.prfSecret);if(V={first:await Xe.evaluatePrf(O,r.prfInputs.first)},r.prfInputs.second){const z=await Xe.evaluatePrf(O,r.prfInputs.second);V.second=z}}return{id:s.credentialId,rawId:s.credentialId,clientDataJSON:Xe.toB64u(S),authenticatorData:Xe.toB64u(p),signature:Xe.toB64u(F),userHandle:B,prfResults:V}}static async evaluatePrf(e,n){const r=n instanceof Uint8Array?n:new Uint8Array(n),s=Xe.te("WebAuthn PRF\0"),l=Xe.concat(s,r),c=await crypto.subtle.digest("SHA-256",l),m=await crypto.subtle.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!1,["sign"]);return await crypto.subtle.sign("HMAC",m,c)}static pickSupportedAlgorithm(e){if(!e||e.length===0)return-7;if(!e.some(r=>r.type==="public-key"&&r.alg===-7))throw new Error("No supported algorithm (ES256) in pubKeyCredParams");return-7}static buildCoseEc2Es256(e){const n=Xe.pad32(Xe.fromB64u(e.x)),r=Xe.pad32(Xe.fromB64u(e.y));return new Uint8Array([165,1,2,3,38,32,1,33,88,32,...n,34,88,32,...r])}static buildAttObjNone(e){const n=Xe.cborText("fmt"),r=Xe.cborText("none"),s=Xe.cborText("attStmt"),l=new Uint8Array([160]),c=Xe.cborText("authData"),m=Xe.cborBstr(e);return Xe.concat(new Uint8Array([163]),n,r,s,l,c,m)}static async buildAttObjPackedSelf(e,n,r){const s=new Uint8Array(await crypto.subtle.digest("SHA-256",n)),l=Xe.concat(e,s),c=new Uint8Array(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},r,l)),m=Xe.ecdsaRawToDer(c),h=Xe.concat(Xe.cborText("alg"),new Uint8Array([38]),Xe.cborText("sig"),Xe.cborBstr(m)),g=Xe.concat(new Uint8Array([162]),h),A=Xe.cborText("fmt"),p=Xe.cborText("packed"),v=Xe.cborText("attStmt"),w=Xe.cborText("authData"),T=Xe.cborBstr(e);return Xe.concat(new Uint8Array([163]),A,p,v,g,w,T)}static cborText(e){const n=Xe.te(e);return n.length<=23?new Uint8Array([96|n.length,...n]):n.length<=255?new Uint8Array([120,n.length,...n]):new Uint8Array([121,n.length>>8&255,n.length&255,...n])}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 n=e.slice(0,32),r=e.slice(32,64),s=Xe.derInt(n),l=Xe.derInt(r);return new Uint8Array([48,s.length+l.length,...s,...l])}static derInt(e){let n=0;for(;n<e.length-1&&e[n]===0;)n++;let r=e.slice(n);if((r[0]&128)!==0){const s=new Uint8Array(r.length+1);s[0]=0,s.set(r,1),r=s}return new Uint8Array([2,r.length,...r])}static te(e){return new TextEncoder().encode(e)}static toB64(e){let n="";for(let r=0;r<e.length;r++)n+=String.fromCharCode(e[r]);return btoa(n)}static toB64u(e){return Xe.toB64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}static fromB64u(e){const n=e.replace(/-/g,"+").replace(/_/g,"/"),r=n.length%4===2?"==":n.length%4===3?"=":"",s=atob(n+r),l=new Uint8Array(s.length);for(let c=0;c<s.length;c++)l[c]=s.charCodeAt(c);return l}static challengeToB64u(e){if(typeof e=="string")return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");const n=e instanceof Uint8Array?e:new Uint8Array(e);return Xe.toB64u(n)}static pad32(e){if(e.length===32)return e;const n=new Uint8Array(32);return n.set(e,32-e.length),n}static concat(...e){const n=e.reduce((l,c)=>l+c.length,0),r=new Uint8Array(n);let s=0;for(const l of e)r.set(l,s),s+=l.length;return r}};Ge(Xe,"AAGUID",new Uint8Array([161,26,95,170,159,50,75,140,140,93,47,125,19,232,201,66]));let Fu=Xe;class mn{constructor(){}static guidToBytes(e){const n=e.replace(/-/g,"");if(n.length!==32)throw new Error("Invalid GUID format");const r=new Uint8Array(16);for(let s=0;s<16;s++)r[s]=parseInt(n.substr(s*2,2),16);return r}static bytesToGuid(e){if(e.length!==16)throw new Error("Invalid byte length for GUID");const n=Array.from(e).map(r=>r.toString(16).padStart(2,"0")).join("");return[n.substr(0,8),n.substr(8,4),n.substr(12,4),n.substr(16,4),n.substr(20)].join("-").toUpperCase()}static bytesToBase64Url(e){let n="";return e.forEach(s=>n+=String.fromCharCode(s)),btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}static base64UrlToBytes(e){let r=e.replace(/=+$/,"").replace(/-/g,"+").replace(/_/g,"/");for(;r.length%4;)r+="=";const s=atob(r),l=new Uint8Array(s.length);for(let c=0;c<s.length;c++)l[c]=s.charCodeAt(c);return l}static guidToBase64url(e){return this.bytesToBase64Url(this.guidToBytes(e))}static base64urlToGuid(e){return this.bytesToGuid(this.base64UrlToBytes(e))}static arrayBufferToBase64(e){const n=new Uint8Array(e);let r="";for(let s=0;s<n.length;s++)r+=String.fromCharCode(n[s]);return btoa(r)}static bytesToBase64url(e){const n=e instanceof Uint8Array?e:new Uint8Array(e);return this.bytesToBase64Url(n)}static base64urlToBytes(e){return this.base64UrlToBytes(e)}}const E9=()=>{const{t}=tt(),e=Ja(),{setIsInitialLoading:n}=va(),r=ta(),[s,l]=b.useState(null),[c,m]=b.useState(!1),[h,g]=b.useState(null),[A,p]=b.useState([]),[v,w]=b.useState(!1),{isLocked:T}=Y1(),S=b.useRef(null);b.useEffect(()=>{(async()=>{if(!r.dbInitialized||T)return;const V=new URLSearchParams(e.search).get("requestId");if(V)try{const O=await St("GET_REQUEST_DATA",{requestId:V},"background");if(O&&O.type==="get"){l(O);const _=O.publicKey.rpId||new URL(O.origin).hostname,z=r.sqliteClient.passkeys.getByRpId(_);let Q=z;if(O.publicKey.allowCredentials&&O.publicKey.allowCredentials.length>0){const K=new Set(O.publicKey.allowCredentials.map(te=>{try{return mn.base64urlToGuid(te.id)}catch(ee){return console.warn("Failed to convert credential ID to GUID:",te.id,ee),null}}).filter(te=>te!==null));Q=z.filter(te=>K.has(te.Id))}p(Q.map(K=>({id:K.Id,displayName:K.DisplayName,serviceName:K.ServiceName,rpId:K.RpId,username:K.Username})))}}catch(O){console.error("Failed to fetch request data:",O),g(t("common.errors.unknownError"))}n(!1)})()},[e,n,r.dbInitialized,T,r.sqliteClient,t]),b.useEffect(()=>{A.length>0&&S.current&&S.current.focus()},[A.length]),b.useEffect(()=>{const F=B=>{B.key==="Enter"&&!c&&A.length>0&&k(A[0].id)};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[c,A]);const k=async F=>{var B,V;if(!(!s||!r.sqliteClient)){m(!0),g(null);try{const O=r.sqliteClient.passkeys.getById(F);if(!O)throw new Error(t("common.errors.unknownError"));const _=JSON.parse(O.PublicKey),z=JSON.parse(O.PrivateKey);let Q;if(O.PrfKey)try{Q=mn.bytesToBase64url(O.PrfKey)}catch(be){console.warn("Failed to convert PrfKey to base64url",be)}let K=null;if(O.UserHandle)try{const be=O.UserHandle instanceof Uint8Array?O.UserHandle:new Uint8Array(O.UserHandle);K=mn.bytesToBase64url(be)}catch(be){console.warn("Failed to convert UserHandle to base64",be)}const te={rpId:O.RpId,credentialId:mn.guidToBase64url(O.Id),publicKey:_,privateKey:z,userId:K,userName:O.Username??void 0,userDisplayName:O.ServiceName??void 0,prfSecret:Q},ee={origin:s.origin,requestId:s.requestId,publicKey:{rpId:s.publicKey.rpId,challenge:s.publicKey.challenge,userVerification:s.publicKey.userVerification}};let Y;if((V=(B=s.publicKey.extensions)==null?void 0:B.prf)!=null&&V.eval){const be=s.publicKey.extensions.prf.eval.first;let se;if(typeof be=="object"&&be!==null&&!Array.isArray(be)){const j=Object.keys(be).map(Number).sort((W,X)=>W-X);se=new Uint8Array(j.length);for(let W=0;W<j.length;W++)se[W]=be[W]}else if(typeof be=="string"){const j=atob(be);se=new Uint8Array(j.length);for(let W=0;W<j.length;W++)se[W]=j.charCodeAt(W)}else throw new Error("Unknown PRF input format");if(Y={first:se},s.publicKey.extensions.prf.eval.second){const j=s.publicKey.extensions.prf.eval.second;let W;if(typeof j=="object"&&j!==null&&!Array.isArray(j)){const X=Object.keys(j).map(Number).sort((ne,we)=>ne-we);W=new Uint8Array(X.length);for(let ne=0;ne<X.length;ne++)W[ne]=j[ne]}else if(typeof j=="string"){const X=atob(j);W=new Uint8Array(X.length);for(let ne=0;ne<X.length;ne++)W[ne]=X.charCodeAt(ne)}else throw console.error("[PasskeyAuth] Unknown PRF second input type:",typeof j),new Error("Unknown PRF second input format");Y.second=W}}const le=await Fu.getAssertion(ee,te,{uvPerformed:!0,includeBEBS:!0,prfInputs:Y});let J;le.prfResults&&(J={first:mn.arrayBufferToBase64(le.prfResults.first)},le.prfResults.second&&(J.second=mn.arrayBufferToBase64(le.prfResults.second)));const ie={id:le.id,rawId:le.rawId,clientDataJSON:le.clientDataJSON,authenticatorData:le.authenticatorData,signature:le.signature,userHandle:le.userHandle,prfResults:J};await St("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,credential:ie},"background")}catch(O){console.error("PasskeyAuthenticate: Error during authentication",O),m(!1),g(t("common.errors.unknownError"))}}},L=async()=>{w(!0)},U=async F=>{if(s){if(F==="always"){const B=await Gp(s.origin),V=await dt.getPasskeyDisabledSites();V.includes(B)||(V.push(B),await dt.setPasskeyDisabledSites(V))}await St("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,fallback:!0},"background")}},x=async()=>{s&&await St("PASSKEY_POPUP_RESPONSE",{requestId:s.requestId,cancelled:!0},"background")};return s?d.jsxs(d.Fragment,{children:[d.jsx(q1,{isOpen:v&&!!s,origin:s?new URL(s.origin).hostname:"",onChoice:U,onCancel:()=>w(!1)}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("passkeys.authenticate.title")}),d.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[t("passkeys.authenticate.signInFor")," ",d.jsx("strong",{children:s.origin})]})]}),h&&d.jsx("div",{className:"p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:d.jsx("p",{className:"text-sm text-red-800 dark:text-red-200",children:h})}),d.jsx("div",{className:"space-y-4",children:A&&A.length>0?d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:t("passkeys.authenticate.selectPasskey")}),d.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:A.map((F,B)=>d.jsxs("div",{ref:B===0?S: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:()=>!c&&k(F.id),onKeyDown:V=>{V.key==="Enter"&&!c&&k(F.id)},children:[d.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:F.serviceName}),d.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:d.jsx("span",{className:"truncate",children:F.displayName})})]},F.id))})]}):d.jsx("div",{className:"text-center py-8 bg-gray-50 dark:bg-gray-800 rounded-lg",children:d.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:t("passkeys.authenticate.noPasskeysFound")})})}),d.jsxs("div",{className:"space-y-3",children:[d.jsx(Ca,{variant:"secondary",onClick:L,children:t("passkeys.useBrowserPasskey")}),d.jsx(Ca,{variant:"secondary",onClick:x,children:t("common.cancel")})]})]})]}):d.jsx("div",{className:"flex justify-center py-8",children:d.jsx(mi,{})})},If=({variant:t,children:e,className:n=""})=>{const r={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 d.jsx("div",{className:`p-3 border rounded-lg ${r[t]} ${n}`,children:d.jsx("p",{className:"text-sm",children:e})})},b9=()=>{var j,W;const{t}=tt(),e=Ja(),{setIsInitialLoading:n}=va(),r=ta(),s=Vi(),{executeVaultMutationAsync:l}=Os(),[c,m]=b.useState(null),[h,g]=b.useState(""),[A,p]=b.useState(null),{isLocked:v}=Y1(),[w,T]=b.useState([]),[S,k]=b.useState([]),[L,U]=b.useState(null),[x,F]=b.useState(null),[B,V]=b.useState(!1),[O,_]=b.useState(!1),[z,Q]=b.useState(!1),K=b.useRef(null),te=b.useRef(null);b.useEffect(()=>{(async()=>{var ce,Ee,Te,Ce,Pe,Ve,bt,gt;if(!r.dbInitialized||v)return;const we=new URLSearchParams(e.search).get("requestId");if(we)try{const it=await St("GET_REQUEST_DATA",{requestId:we},"background");if(it&&it.type==="create"){m(it);const Ke=((Ee=(ce=it.publicKey)==null?void 0:ce.rp)==null?void 0:Ee.name)||((Ce=(Te=it.publicKey)==null?void 0:Te.rp)==null?void 0:Ce.id)||"Passkey";g(Ke);const Pt=((Ve=(Pe=it.publicKey)==null?void 0:Pe.rp)==null?void 0:Ve.id)||new URL(it.origin).hostname;if(r.sqliteClient){const Se=r.sqliteClient.passkeys.getByRpId(Pt);let Fe=Se;if(((bt=it.publicKey.user)!=null&&bt.id||(gt=it.publicKey.user)!=null&&gt.name)&&(Fe=Se.filter(fe=>{var Re;if((Re=it.publicKey.user)!=null&&Re.id&&fe.UserHandle)try{const ze=mn.base64urlToBytes(it.publicKey.user.id),je=fe.UserHandle instanceof Uint8Array?fe.UserHandle:new Uint8Array(fe.UserHandle);if(ze.length===je.length&&ze.every((at,wt)=>at===je[wt]))return!0}catch{}return!1})),T(Fe),Fe.length===0){const Re=r.sqliteClient.items.getAll().filter(je=>{const at=Kc(je,gn.LoginUsername),wt=Kc(je,gn.LoginPassword);return!at&&!wt?!1:!je.HasPasskey});let ze=[];Re.length>0&&(ze=await y9(Re,it.origin,it.publicKey.rp.name||"",J1.URL_SUBDOMAIN),k(ze)),ze.length===0&&V(!0)}}else V(!0)}}catch(it){console.error("Failed to fetch request data:",it),p(t("common.errors.unknownError"))}n(!1)})()},[e,n,r.dbInitialized,r.sqliteClient,v,t]),b.useEffect(()=>{B&&te.current?te.current.focus():!B&&w.length>0&&K.current&&K.current.focus()},[B,w.length]),b.useEffect(()=>{const X=ne=>{ne.key==="Enter"&&!O&&B&&J()};return window.addEventListener("keydown",X),()=>window.removeEventListener("keydown",X)},[B,O]);const ee=()=>{U(null),F(null),V(!0)},Y=X=>{U(X),F(null),V(!0)},le=X=>{F(X),U(null),V(!0)},J=async()=>{var X,ne;if(!(!c||!r.sqliteClient)){p(null);try{let we;if(c.origin){_(!0);try{const Re=new Promise((at,wt)=>setTimeout(()=>wt(new Error("Favicon extraction timed out")),5e3)),ze=s.get("Favicon/Extract?url="+c.origin),je=await Promise.race([ze,Re]);if(je!=null&&je.image){const at=atob(je.image),wt=new Uint8Array(at.length);for(let Rt=0;Rt<at.length;Rt++)wt[Rt]=at.charCodeAt(Rt);we=wt}}catch{}}const ce={origin:c.origin,requestId:c.requestId,publicKey:{rp:c.publicKey.rp,user:c.publicKey.user,challenge:c.publicKey.challenge,pubKeyCredParams:c.publicKey.pubKeyCredParams,attestation:c.publicKey.attestation,authenticatorSelection:c.publicKey.authenticatorSelection}},Ee=crypto.randomUUID().toUpperCase(),Te=mn.guidToBytes(Ee),Ce=mn.guidToBase64url(Ee),Pe=(ne=(X=c.publicKey)==null?void 0:X.extensions)==null?void 0:ne.prf,Ve=!!Pe,bt=Pe==null?void 0:Pe.eval,gt=await Fu.createPasskey(Te,ce,{uvPerformed:!0,credentialIdBytes:16,enablePrf:Ve,prfInputs:bt}),{credential:it,stored:Ke,prfEnabled:Pt,prfResults:Se}=gt;await l(async()=>{if(L){const Re=r.sqliteClient.passkeys.getById(L);if(Re){const ze=r.sqliteClient.items.getById(Re.ItemId);ze&&await r.sqliteClient.items.update({...ze,Name:h,Logo:we??ze.Logo,Fields:[...(ze.Fields||[]).filter(at=>at.FieldKey!==gn.LoginUrl&&at.FieldKey!==gn.LoginUsername),Gc(gn.LoginUrl,{value:c.origin}),Gc(gn.LoginUsername,{value:c.publicKey.user.name})]},[],[]),await r.sqliteClient.passkeys.deleteById(L);let je=null;if(Ke.userId)try{je=mn.base64urlToBytes(Ke.userId)}catch{je=null}await r.sqliteClient.passkeys.create({Id:Ee,ItemId:Re.ItemId,RpId:Ke.rpId,UserHandle:je,PublicKey:JSON.stringify(Ke.publicKey),PrivateKey:JSON.stringify(Ke.privateKey),DisplayName:c.publicKey.user.displayName||c.publicKey.user.name||"",PrfKey:Ke.prfSecret?mn.base64urlToBytes(Ke.prfSecret):void 0,AdditionalData:null})}}else if(x){let Re=null;if(Ke.userId)try{Re=mn.base64urlToBytes(Ke.userId)}catch{Re=null}await r.sqliteClient.passkeys.create({Id:Ee,ItemId:x,RpId:Ke.rpId,UserHandle:Re,PublicKey:JSON.stringify(Ke.publicKey),PrivateKey:JSON.stringify(Ke.privateKey),DisplayName:c.publicKey.user.displayName||c.publicKey.user.name||"",PrfKey:Ke.prfSecret?mn.base64urlToBytes(Ke.prfSecret):void 0,AdditionalData:null})}else{const Re={Id:"",Name:h,ItemType:Ea.Login,Logo:we,Fields:[Gc(gn.LoginUrl,{value:c.origin}),Gc(gn.LoginUsername,{value:c.publicKey.user.name})],CreatedAt:new Date().toISOString(),UpdatedAt:new Date().toISOString()},ze=await r.sqliteClient.items.create(Re,[]);let je=null;if(Ke.userId)try{je=mn.base64urlToBytes(Ke.userId)}catch{je=null}await r.sqliteClient.passkeys.create({Id:Ee,ItemId:ze,RpId:Ke.rpId,UserHandle:je,PublicKey:JSON.stringify(Ke.publicKey),PrivateKey:JSON.stringify(Ke.privateKey),DisplayName:c.publicKey.user.displayName||c.publicKey.user.name||"",PrfKey:Ke.prfSecret?mn.base64urlToBytes(Ke.prfSecret):void 0,AdditionalData:null})}});let Fe;Pt&&(Fe={prf:{enabled:!0,results:Se?{first:mn.bytesToBase64url(new Uint8Array(Se.first)),second:Se.second?mn.bytesToBase64url(new Uint8Array(Se.second)):void 0}:void 0}});const fe={id:Ce,rawId:Ce,clientDataJSON:it.response.clientDataJSON,attestationObject:it.response.attestationObject,extensions:Fe};await St("PASSKEY_POPUP_RESPONSE",{requestId:c.requestId,credential:fe},"background"),_(!1)}catch(we){console.error("PasskeyCreate: Error creating passkey",we),p(t("common.errors.unknownError"))}}},ie=async()=>{Q(!0)},be=async X=>{if(c){if(X==="always"){const ne=await Gp(c.origin),we=await dt.getPasskeyDisabledSites();we.includes(ne)||(we.push(ne),await dt.setPasskeyDisabledSites(we))}await St("PASSKEY_POPUP_RESPONSE",{requestId:c.requestId,fallback:!0},"background")}},se=async()=>{c&&await St("PASSKEY_POPUP_RESPONSE",{requestId:c.requestId,cancelled:!0},"background")};return c?d.jsxs(d.Fragment,{children:[d.jsx(q1,{isOpen:z&&!!c,origin:c?new URL(c.origin).hostname:"",onChoice:be,onCancel:()=>Q(!1)}),O&&d.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:d.jsx(mi,{})}),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t("passkeys.create.title")}),d.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[t("passkeys.create.createFor")," ",d.jsx("strong",{children:c.origin})]})]}),A&&d.jsx(If,{variant:"error",children:A}),!B&&w.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsx(Ca,{variant:"primary",onClick:ee,ref:K,children:t("passkeys.create.createNewPasskey")}),d.jsx(Ca,{variant:"secondary",onClick:ie,children:t("passkeys.useBrowserPasskey")}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-0 flex items-center",children:d.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),d.jsx("div",{className:"relative flex justify-center text-sm",children:d.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:t("common.or")})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:t("passkeys.create.selectPasskeyToReplace")}),d.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:w.map(X=>d.jsx("button",{onClick:()=>Y(X.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:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:X.ServiceName}),d.jsx("div",{className:"flex items-center justify-between text-xs text-gray-600 dark:text-gray-400",children:d.jsx("span",{className:"truncate",children:X.DisplayName})})]}),d.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},X.Id))})]}),d.jsx(Ca,{variant:"secondary",onClick:se,children:t("common.cancel")})]}),!B&&w.length===0&&S.length>0&&d.jsxs("div",{className:"space-y-4",children:[d.jsx(Ca,{variant:"primary",onClick:ee,ref:K,children:t("passkeys.create.createNewPasskey")}),d.jsx(Ca,{variant:"secondary",onClick:ie,children:t("passkeys.useBrowserPasskey")}),d.jsxs("div",{className:"relative",children:[d.jsx("div",{className:"absolute inset-0 flex items-center",children:d.jsx("div",{className:"w-full border-t border-gray-300 dark:border-gray-600"})}),d.jsx("div",{className:"relative flex justify-center text-sm",children:d.jsx("span",{className:"px-2 bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400",children:t("common.or")})})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300",children:t("passkeys.create.selectExistingLogin")}),d.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:t("passkeys.create.selectExistingLoginDescription")}),d.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:S.map(X=>d.jsx("button",{onClick:()=>le(X.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:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{className:"flex items-center flex-1 min-w-0",children:d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("div",{className:"font-medium text-gray-900 dark:text-white text-sm truncate",children:X.Name}),Kc(X,gn.LoginUsername)&&d.jsx("div",{className:"text-xs text-gray-600 dark:text-gray-400 truncate",children:Kc(X,gn.LoginUsername)})]})}),d.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:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},X.Id))})]}),d.jsx(Ca,{variant:"secondary",onClick:se,children:t("common.cancel")})]}),B&&d.jsxs("div",{className:"space-y-4",children:[L&&d.jsx(If,{variant:"warning",children:t("passkeys.create.replacingPasskey",{displayName:((j=w.find(X=>X.Id===L))==null?void 0:j.DisplayName)||""})}),x&&d.jsx(If,{variant:"info",children:t("passkeys.create.attachingToCredential",{serviceName:((W=S.find(X=>X.Id===x))==null?void 0:W.Name)||""})}),!x&&d.jsx(Dd,{id:"displayName",label:t("passkeys.create.titleLabel"),value:h,onChange:g,placeholder:t("passkeys.create.titlePlaceholder"),ref:te}),d.jsxs("div",{className:"space-y-3",children:[d.jsx(Ca,{variant:"primary",onClick:J,children:t(L?"passkeys.create.confirmReplace":x?"passkeys.create.attachPasskey":"passkeys.create.createButton")}),w.length>0||S.length>0?d.jsx(Ca,{variant:"secondary",onClick:()=>{V(!1),U(null),F(null)},children:t("common.back")}):d.jsxs(d.Fragment,{children:[d.jsx(Ca,{variant:"secondary",onClick:ie,children:t("passkeys.useBrowserPasskey")}),d.jsx(Ca,{variant:"secondary",onClick:se,children:t("common.cancel")})]})]})]})]})]}):d.jsx("div",{className:"flex justify-center py-8",children:d.jsx(mi,{})})},v9=()=>({matchCurrentTab:b.useCallback(async()=>{try{const[e]=await yr.tabs.query({active:!0,currentWindow:!0});if(!(e!=null&&e.url)||!e.url.startsWith("http://")&&!e.url.startsWith("https://"))return null;let n="";try{n=new URL(e.url).hostname.replace(/^www\./,"")}catch{return null}const r=await dt.getAutofillMatchingMode(),s=await St("GET_FILTERED_ITEMS",{currentUrl:e.url,pageTitle:e.title||"",matchingMode:r},"background");return!s.success||!s.items?null:{items:s.items,currentUrl:e.url,domain:n}}catch(e){return console.error("Error matching current tab:",e),null}},[])}),Av="session:lastVisitedPage",yv="session:lastVisitedTime",Ev="session:navigationHistory",bv="session:lastTabUrl",w9=120*1e3,I9=()=>{const t=Va(),{setIsInitialLoading:e}=va(),{syncVault:n}=Tp(),{matchCurrentTab:r}=v9(),s=b.useRef(!1),{isInitialized:l,isLoggedIn:c}=wi(),{dbInitialized:m,dbAvailable:h,refreshSyncState:g,hasPendingMigrations:A}=ta(),p=l&&m,v=p&&(!c||!h),w=b.useCallback(k=>k&&k.items.length===1?`/items/${k.items[0].Id}`:(k&&k.items.length>1,"/items"),[]),T=b.useCallback(async k=>{k&&k.items.length===1?(t("/items",{replace:!0}),t(`/items/${k.items[0].Id}`,{replace:!1})):k&&k.items.length>1?t(`/items?search=${encodeURIComponent(k.domain)}`,{replace:!0}):t("/items",{replace:!0})},[t]),S=b.useCallback(async()=>{const k=await r(),L=w(k),[U,x,F,B]=await Promise.all([xe.getItem(Av),xe.getItem(yv),xe.getItem(Ev),xe.getItem(bv)]),V=k==null?void 0:k.currentUrl,O=V&&B&&V!==B;if(U&&x&&Date.now()-x<=w9){const z=F==null?void 0:F[F.length-1],Q=(z==null?void 0:z.search)&&z.search.length>0;if(!(O||U===L&&!Q||U==="/items"&&!Q)){if((F==null?void 0:F.length)>1){const Y=F[0],le=Y.pathname+(Y.search||"");t(le,{replace:!0});const J=U+((z==null?void 0:z.search)||"");t(J,{replace:!1})}else{const Y=U+((z==null?void 0:z.search)||"");t(Y,{replace:!0})}return}}await Promise.all([xe.removeItem(Av),xe.removeItem(yv),xe.removeItem(Ev),St("CLEAR_PERSISTED_FORM_VALUES",null,"background")]),V&&await xe.setItem(bv,V),await T(k)},[t,r,w,T]);return b.useEffect(()=>{(async()=>{const U=new URLSearchParams(window.location.search).get("mode")==="inline_unlock",x=await f9();if(!p)return;const F=!s.current;if(v)e(!1),c?h||t("/unlock",{replace:!0}):t("/login",{replace:!0});else if(F){if(s.current=!0,await A()){e(!1),t("/upgrade",{replace:!0});return}e(!1),U?t("/unlock-success",{replace:!0}):x?t(x,{replace:!0}):await S(),n({onSuccess:async B=>{await g()},onUpgradeRequired:()=>{t("/upgrade",{replace:!0})},onError:B=>{console.error("Background vault sync error:",B)}})}else e(!1),S()})()},[p,v,c,h,t,e,n,S,g,A]),null},C9=()=>{const{t}=tt(),{setIsInitialLoading:e}=va(),[n,r]=b.useState(!1),[s,l]=b.useState({disabledUrls:[],temporaryDisabledUrls:{},isGloballyEnabled:!0}),[c,m]=b.useState(ed.DEFAULT),[h,g]=b.useState({isEnabled:!1,blockedDomains:[]}),[A,p]=b.useState(!1),[v,w]=b.useState(!1),T=b.useCallback(async()=>{const O=await dt.getDisabledSites(),_=await dt.getTemporaryDisabledSites(),z=await dt.getGlobalAutofillPopupEnabled(),Q=Date.now(),K=Object.fromEntries(Object.entries(_).filter(([le,J])=>J>Q));Object.keys(K).length!==Object.keys(_).length&&await dt.setTemporaryDisabledSites(K);const te=await dt.getAutofillMatchingMode();m(te);const ee=await dt.getLoginSaveEnabled(),Y=await dt.getLoginSaveBlockedDomains();g({isEnabled:ee,blockedDomains:Y}),l({disabledUrls:O,temporaryDisabledUrls:K,isGloballyEnabled:z}),r(!0),e(!1)},[e]);b.useEffect(()=>{T()},[T]);const S=async()=>{await dt.setDisabledSites([]),await dt.setTemporaryDisabledSites({}),l(O=>({...O,disabledUrls:[],temporaryDisabledUrls:{}}))},k=async()=>{const O=!s.isGloballyEnabled;await dt.setGlobalAutofillPopupEnabled(O),l(_=>({..._,isGloballyEnabled:O}))},L=async O=>{await dt.setAutofillMatchingMode(O),m(O)},U=async()=>{const O=!h.isEnabled;await dt.setLoginSaveEnabled(O),g(_=>({..._,isEnabled:O}))},x=async O=>{const _=h.blockedDomains.filter(z=>z!==O);await dt.setLoginSaveBlockedDomains(_),g(z=>({...z,blockedDomains:_}))},F=async()=>{await dt.setLoginSaveBlockedDomains([]),g(O=>({...O,blockedDomains:[]}))},B=async O=>{const _=s.disabledUrls.filter(Q=>Q!==O);await dt.setDisabledSites(_);const z={...s.temporaryDisabledUrls};delete z[O],await dt.setTemporaryDisabledSites(z),l(Q=>({...Q,disabledUrls:_,temporaryDisabledUrls:z}))},V=()=>{const O=s.disabledUrls.length,_=Object.keys(s.temporaryDisabledUrls).length;return O+_};return n?d.jsxs("div",{className:"space-y-6",children:[d.jsx("section",{children:d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.autofillPopup")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 me-2",children:t("settings.autofillPopupDescription")})]}),d.jsx("button",{onClick:k,className:`px-4 py-2 rounded-md transition-colors ${s.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:s.isGloballyEnabled?t("common.enabled"):t("common.disabled")})]}),V()>0&&d.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[d.jsxs("button",{onClick:()=>p(!A),className:"flex items-center justify-between w-full text-left",children:[d.jsxs("span",{className:"font-medium text-gray-900 dark:text-white",children:[t("settings.disabledSites")," (",V(),")"]}),d.jsx("svg",{className:`w-5 h-5 text-gray-500 transition-transform ${A?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t("settings.disabledSitesDescription")}),A&&d.jsxs("div",{className:"mt-3",children:[d.jsxs("ul",{className:"space-y-2",children:[s.disabledUrls.map(O=>d.jsxs("li",{className:"flex items-center justify-between bg-gray-50 dark:bg-gray-700 rounded-md px-3 py-2",children:[d.jsx("span",{className:"text-sm text-gray-900 dark:text-white truncate",children:O}),d.jsx("button",{onClick:()=>B(O),className:"text-sm text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 ml-2",children:t("common.remove")})]},O)),Object.entries(s.temporaryDisabledUrls).map(([O,_])=>d.jsxs("li",{className:"flex items-center justify-between bg-gray-50 dark:bg-gray-700 rounded-md px-3 py-2",children:[d.jsxs("div",{className:"truncate",children:[d.jsx("span",{className:"text-sm text-gray-900 dark:text-white",children:O}),d.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400 ml-2",children:["(",t("settings.temporaryUntil")," ",new Date(_).toLocaleTimeString(),")"]})]}),d.jsx("button",{onClick:()=>B(O),className:"text-sm text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 ml-2",children:t("common.remove")})]},O))]}),d.jsx("button",{onClick:S,className:"w-full mt-3 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:t("settings.clearAllDisabledSites")})]})]})]})})}),d.jsx("section",{children:d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.loginSave.title")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1 me-2",children:t("settings.loginSave.description")})]}),d.jsx("button",{onClick:U,className:`px-4 py-2 rounded-md transition-colors ${h.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:h.isEnabled?t("common.enabled"):t("common.disabled")})]}),h.blockedDomains.length>0&&d.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-200 dark:border-gray-700",children:[d.jsxs("button",{onClick:()=>w(!v),className:"flex items-center justify-between w-full text-left",children:[d.jsxs("span",{className:"font-medium text-gray-900 dark:text-white",children:[t("settings.loginSave.blockedSites")," (",h.blockedDomains.length,")"]}),d.jsx("svg",{className:`w-5 h-5 text-gray-500 transition-transform ${v?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:t("settings.loginSave.blockedSitesDescription")}),v&&d.jsxs("div",{className:"mt-3",children:[d.jsx("ul",{className:"space-y-2",children:h.blockedDomains.map(O=>d.jsxs("li",{className:"flex items-center justify-between bg-gray-50 dark:bg-gray-700 rounded-md px-3 py-2",children:[d.jsx("span",{className:"text-sm text-gray-900 dark:text-white truncate",children:O}),d.jsx("button",{onClick:()=>x(O),className:"text-sm text-red-600 hover:text-red-700 dark:text-red-400 dark:hover:text-red-300 ml-2",children:t("common.remove")})]},O))}),d.jsx("button",{onClick:F,className:"w-full mt-3 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:t("settings.loginSave.clearAllBlockedSites")})]})]})]})})}),d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.autofillMatching")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.autofillMatchingMode")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.autofillMatchingModeDescription")}),d.jsxs("select",{value:c,onChange:O=>L(O.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:[d.jsx("option",{value:ed.DEFAULT,children:t("settings.autofillMatchingDefault")}),d.jsx("option",{value:ed.URL_SUBDOMAIN,children:t("settings.autofillMatchingUrlSubdomain")}),d.jsx("option",{value:ed.URL_EXACT,children:t("settings.autofillMatchingUrlExact")})]})]})})})]})]}):null},$1=({title:t,content:e,className:n=""})=>{const[r,s]=b.useState(!1);return d.jsxs(d.Fragment,{children:[d.jsx("button",{onClick:()=>s(!0),className:`${n}`,type:"button","aria-label":"Help",children:d.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:d.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"})})}),d.jsx(Zn,{isOpen:r,onClose:()=>s(!1),title:t,children:d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-300",children:e})})]})},S9=()=>{const{t}=tt(),{setIsInitialLoading:e}=va(),[n,r]=b.useState(0);b.useEffect(()=>{(async()=>{const c=await dt.getAutoLockTimeout();r(c),e(!1)})()},[e]);const s=async l=>{await dt.setAutoLockTimeout(l),await St("SET_AUTO_LOCK_TIMEOUT",l,"background"),r(l)};return d.jsx("div",{className:"space-y-6",children:d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.autoLockTimeout")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center mb-2",children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.autoLockTimeout")}),d.jsx($1,{title:t("settings.autoLockTimeout"),content:t("settings.autoLockTimeoutHelp"),className:"ml-2"})]}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.autoLockTimeoutDescription")}),d.jsxs("select",{value:n,onChange:l=>s(Number(l.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:[d.jsx("option",{value:"0",children:t("settings.autoLockNever")}),d.jsx("option",{value:"15",children:t("settings.autoLock15Seconds")}),d.jsx("option",{value:"60",children:t("settings.autoLock1Minute")}),d.jsx("option",{value:"300",children:t("settings.autoLock5Minutes")}),d.jsx("option",{value:"900",children:t("settings.autoLock15Minutes")}),d.jsx("option",{value:"1800",children:t("settings.autoLock30Minutes")}),d.jsx("option",{value:"3600",children:t("settings.autoLock1Hour")}),d.jsx("option",{value:"14400",children:t("settings.autoLock4Hours")}),d.jsx("option",{value:"28800",children:t("settings.autoLock8Hours")}),d.jsx("option",{value:"86400",children:t("settings.autoLock24Hours")})]})]})})})]})})},N9=()=>{const{t}=tt(),{setIsInitialLoading:e}=va(),[n,r]=b.useState(10);b.useEffect(()=>{(async()=>{const c=await dt.getClipboardClearTimeout();r(c),e(!1)})()},[e]);const s=async l=>{await dt.setClipboardClearTimeout(l),await St("SET_CLIPBOARD_CLEAR_TIMEOUT",l,"background"),r(l)};return d.jsx("div",{className:"space-y-6",children:d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.clipboardSettings")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.clipboardClearTimeout")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.clipboardClearTimeoutDescription")}),d.jsxs("select",{value:n,onChange:l=>s(Number(l.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:[d.jsx("option",{value:"0",children:t("settings.clipboardClearDisabled")}),d.jsx("option",{value:"5",children:t("settings.clipboardClear5Seconds")}),d.jsx("option",{value:"10",children:t("settings.clipboardClear10Seconds")}),d.jsx("option",{value:"15",children:t("settings.clipboardClear15Seconds")})]})]})})})]})})},T9=()=>{const{t}=tt(),{setIsInitialLoading:e}=va(),[n,r]=b.useState(!0),s=b.useCallback(async()=>{const c=await dt.getGlobalContextMenuEnabled();r(c),e(!1)},[e]);b.useEffect(()=>{s()},[s]);const l=async()=>{const c=!n;await dt.setGlobalContextMenuEnabled(c),await St("TOGGLE_CONTEXT_MENU",{enabled:c},"background"),r(c)};return d.jsx("div",{className:"space-y-6",children:d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.contextMenu")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.rightClickContextMenu")}),d.jsx("p",{className:`text-sm mt-1 ${n?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:t(n?"settings.contextMenuEnabled":"settings.contextMenuDisabled")}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-2",children:t("settings.contextMenuDescription")})]}),d.jsx("button",{onClick:l,className:`px-4 py-2 rounded-md transition-colors ${n?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:t(n?"common.enabled":"common.disabled")})]})})})]})})},k9=()=>{const{t}=tt(),{setIsInitialLoading:e}=va(),n=ta(),{executeVaultMutationAsync:r}=Os(),[s,l]=b.useState("en"),[c,m]=b.useState("random"),[h,g]=b.useState("random"),[A,p]=b.useState([]),[v,w]=b.useState([]),T=[{label:t("settings.identityGeneratorSettings.genderOptions.random"),value:"random"},{label:t("settings.identityGeneratorSettings.genderOptions.male"),value:"male"},{label:t("settings.identityGeneratorSettings.genderOptions.female"),value:"female"}];b.useEffect(()=>{const U=b4(),x=y4();if(p(U),w(x),n!=null&&n.sqliteClient){const F=n.sqliteClient.settings.getEffectiveIdentityLanguage(),B=n.sqliteClient.settings.getDefaultIdentityGender(),V=n.sqliteClient.settings.getDefaultIdentityAgeRange();l(F),m(B),g(V)}e(!1)},[n==null?void 0:n.sqliteClient,e]);const S=b.useCallback(async U=>{l(U),n!=null&&n.sqliteClient&&await r(async()=>{n.sqliteClient.settings.updateSetting("DefaultIdentityLanguage",U)})},[n==null?void 0:n.sqliteClient,r]),k=b.useCallback(async U=>{m(U),n!=null&&n.sqliteClient&&await r(async()=>{n.sqliteClient.settings.updateSetting("DefaultIdentityGender",U)})},[n==null?void 0:n.sqliteClient,r]),L=b.useCallback(async U=>{g(U),n!=null&&n.sqliteClient&&await r(async()=>{n.sqliteClient.settings.updateSetting("DefaultIdentityAgeRange",U)})},[n==null?void 0:n.sqliteClient,r]);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.identityGeneratorSettings.languageSection")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"p-4",children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.identityGeneratorSettings.languageSection")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.identityGeneratorSettings.languageDescription")}),d.jsx("select",{value:s,onChange:U=>S(U.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:A.map(U=>d.jsxs("option",{value:U.value,children:[U.flag," ",U.label]},U.value))})]})})]}),d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.identityGeneratorSettings.genderSection")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"p-4",children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.identityGeneratorSettings.genderSection")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.identityGeneratorSettings.genderDescription")}),d.jsx("select",{value:c,onChange:U=>k(U.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:T.map(U=>d.jsx("option",{value:U.value,children:U.label},U.value))})]})})]}),d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.identityGeneratorSettings.ageRangeSection")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"p-4",children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.identityGeneratorSettings.ageRangeSection")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-3",children:t("settings.identityGeneratorSettings.ageRangeDescription")}),d.jsx("select",{value:h,onChange:U=>L(U.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:v.map(U=>d.jsx("option",{value:U.value,children:U.value==="random"?t("settings.identityGeneratorSettings.genderOptions.random"):U.label},U.value))})]})})]})]})},x9=()=>{const{t}=tt(),{setIsInitialLoading:e}=va();return b.useEffect(()=>{e(!1)},[e]),d.jsx("div",{className:"space-y-6",children:d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.language")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-3",children:t("settings.selectLanguage")}),d.jsx(zT,{variant:"dropdown",size:"sm"})]})})})]})})},L9=()=>{const{t}=tt(),{setIsInitialLoading:e}=va(),[n,r]=b.useState({disabledUrls:[],currentUrl:"",isEnabled:!0,isGloballyEnabled:!0}),s=async()=>{const g={active:!0,currentWindow:!0},[A]=await yr.tabs.query(g);return A},l=b.useCallback(async()=>{const A=(await s()).url??"",p=await Gp(A),v=await dt.getPasskeyDisabledSites(),w=await dt.getPasskeyProviderEnabled(),T=!v.includes(p);r({disabledUrls:v,currentUrl:p,isEnabled:T,isGloballyEnabled:w}),e(!1)},[e]);b.useEffect(()=>{l()},[l]);const c=async()=>{const{currentUrl:g,disabledUrls:A,isEnabled:p}=n;let v=[...A];p?v.includes(g)||v.push(g):v=v.filter(w=>w!==g),await dt.setPasskeyDisabledSites(v),r(w=>({...w,disabledUrls:v,isEnabled:!p}))},m=async()=>{await dt.setPasskeyDisabledSites([]),r(g=>({...g,disabledUrls:[],isEnabled:!0}))},h=async()=>{const g=!n.isGloballyEnabled;await dt.setPasskeyProviderEnabled(g),r(A=>({...A,isGloballyEnabled:g}))};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.globalSettings")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("passkeys.settings.passkeyProvider")}),d.jsx("p",{className:`text-sm mt-1 ${n.isGloballyEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:n.isGloballyEnabled?t("settings.activeOnAllSites"):t("settings.disabledOnAllSites")})]}),d.jsx("button",{onClick:h,className:`px-4 py-2 rounded-md transition-colors ${n.isGloballyEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n.isGloballyEnabled?t("common.enabled"):t("common.disabled")})]})})})]}),n.isGloballyEnabled&&d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.siteSpecificSettings")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"p-4",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"font-medium text-gray-900 dark:text-white",children:[t("passkeys.settings.passkeyProviderOn"),n.currentUrl]}),d.jsx("p",{className:`text-sm mt-1 ${n.isEnabled?"text-gray-600 dark:text-gray-400":"text-red-600 dark:text-red-400"}`,children:n.isEnabled?t("settings.enabledForThisSite"):t("settings.disabledForThisSite")})]}),n.isGloballyEnabled&&d.jsx("button",{onClick:c,className:`px-4 py-2 ml-1 rounded-md transition-colors ${n.isEnabled?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:n.isEnabled?t("common.enabled"):t("common.disabled")})]}),d.jsx("div",{className:"mt-4",children:d.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:t("settings.resetAllSiteSettings")})})]})})]})]})},vv="local:theme",Z1=b.createContext(void 0),D9=({children:t})=>{const[e,n]=b.useState("system"),[r,s]=b.useState(!1);b.useEffect(()=>{(async()=>{const A=await c();n(A)})()},[]);const l=b.useCallback(g=>{n(g),m(g)},[]),c=async()=>await xe.getItem(vv)||"system",m=async g=>{await xe.setItem(vv,g)};b.useEffect(()=>{const g=()=>{if(e==="system"){const A=window.matchMedia("(prefers-color-scheme: dark)").matches;s(A),document.documentElement.classList.toggle("dark",A)}else{const A=e==="dark";s(A),document.documentElement.classList.toggle("dark",A)}};if(g(),e==="system"){const A=window.matchMedia("(prefers-color-scheme: dark)"),p=()=>g();return A.addEventListener("change",p),()=>A.removeEventListener("change",p)}},[e]);const h=b.useMemo(()=>({theme:e,setTheme:l,isDarkMode:r}),[e,r,l]);return d.jsx(Z1.Provider,{value:h,children:t})},R9=()=>{const t=b.useContext(Z1);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t},U9=()=>{var te,ee;const{t}=tt(),{theme:e,setTheme:n}=R9(),r=wi(),s=Nd(),l=Vi(),{setHeaderButtons:c}=Ii(),{setIsInitialLoading:m}=va(),{loadApiUrl:h,getDisplayUrl:g}=JT(),A=Va(),[p,v]=b.useState(!1),w=async()=>{const Y=await xe.getItem("local:clientUrl");let le=hn.DEFAULT_CLIENT_URL;Y&&Y.length>0&&(le=Y),window.open(le,"_blank")};b.useEffect(()=>{const Y=d.jsxs("div",{className:"flex items-center gap-2",children:[!Ba.isPopup()&&d.jsx(d.Fragment,{children:d.jsx(_n,{onClick:()=>Ba.openInNewPopup(),title:t("common.openInNewWindow"),iconType:qa.EXPAND})}),d.jsx(_n,{onClick:w,title:t("settings.openWebApp"),iconType:qa.EXTERNAL_LINK})]});return c(Y),()=>c(null)},[c,t]);const T=b.useCallback(async()=>{await h(),m(!1)},[m,h]);b.useEffect(()=>{T()},[T]);const S=async Y=>{n(Y)},k=async()=>{const Y=navigator.userAgent.toLowerCase(),le=Y.includes("firefox"),J=Y.includes("safari")&&!Y.includes("chrome");le?await yr.tabs.create({url:"about:addons"}):J?await yr.tabs.create({url:"safari-extension://shortcuts"}):await yr.tabs.create({url:"chrome://extensions/shortcuts"})},L=()=>{v(!0)},U=async()=>{v(!1);try{await l.revokeTokens(),await s.clearAuthUserInitiated()}catch(Y){console.error("Error during logout:",Y)}},x=async()=>{await St("LOCK_VAULT",{},"background"),A("/unlock")},F=()=>{A("/settings/autofill")},B=()=>{A("/settings/clipboard")},V=()=>{A("/settings/language")},O=()=>{A("/settings/auto-lock")},_=()=>{A("/settings/unlock-method")},z=()=>{A("/settings/context-menu")},Q=()=>{A("/settings/passkeys")},K=()=>{A("/settings/identity-generator")};return d.jsxs(d.Fragment,{children:[d.jsx(Np,{isOpen:p,onClose:()=>v(!1),onConfirm:U}),d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"flex justify-between items-center mb-4",children:d.jsx("h2",{className:"text-gray-900 dark:text-white text-xl",children:t("common.settings")})}),d.jsx("section",{children:d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center space-x-3",children:[d.jsx("div",{className:"flex-shrink-0",children:d.jsx("div",{className:"w-10 h-10 rounded-full bg-primary-100 dark:bg-primary-900 flex items-center justify-center",children:d.jsx("span",{className:"text-primary-600 dark:text-primary-400 text-lg font-medium",children:((ee=(te=r.username)==null?void 0:te[0])==null?void 0:ee.toUpperCase())||"?"})})}),d.jsxs("div",{children:[d.jsx("p",{className:"text font-medium text-gray-900 dark:text-white",children:r.username}),d.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:t("common.loggedIn")})]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{onClick:x,title:t("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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":t("settings.lock"),children:d.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"})})}),d.jsx("button",{onClick:L,title:t("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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24","aria-label":t("common.logout"),children:d.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"})})})]})]})})})}),d.jsx("section",{children:d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[d.jsxs("button",{onClick:F,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.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"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.autofillSettings")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),d.jsxs("button",{onClick:Q,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.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"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.passkeySettings")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),d.jsxs("button",{onClick:_,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.unlockMethod.title")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),d.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:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.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"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.autoLockTimeout")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),d.jsxs("button",{onClick:B,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.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"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.clipboardSettings")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),d.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:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.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"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.language")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),d.jsx("section",{children:d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsxs("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:[d.jsxs("button",{onClick:K,className:"w-full px-4 py-3 flex items-center justify-between hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",children:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.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"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.identityGenerator")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]}),d.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:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16m-7 6h7"})}),d.jsx("span",{className:"text-gray-900 dark:text-white text-left",children:t("settings.contextMenuSettings")})]}),d.jsx("svg",{className:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})]})]})})}),d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.appearance")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white mb-2",children:t("settings.theme")}),d.jsxs("div",{className:"flex flex-col space-y-2",children:[d.jsxs("label",{className:"flex items-center",children:[d.jsx("input",{type:"radio",name:"theme",value:"system",checked:e==="system",onChange:()=>S("system"),className:"mr-2"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:t("settings.useDefault")})]}),d.jsxs("label",{className:"flex items-center",children:[d.jsx("input",{type:"radio",name:"theme",value:"light",checked:e==="light",onChange:()=>S("light"),className:"mr-2"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:t("settings.light")})]}),d.jsxs("label",{className:"flex items-center",children:[d.jsx("input",{type:"radio",name:"theme",value:"dark",checked:e==="dark",onChange:()=>S("dark"),className:"mr-2"}),d.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:t("settings.dark")})]})]})]})})})]}),d.jsxs("section",{children:[d.jsx("h3",{className:"text-md font-semibold text-gray-900 dark:text-white mb-3",children:t("settings.keyboardShortcuts")}),d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("div",{children:d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.configureKeyboardShortcuts")})}),d.jsx("button",{onClick:k,className:"px-4 py-2 bg-primary-500 hover:bg-primary-600 text-white rounded-md transition-colors",children:t("settings.configure")})]})})})]}),d.jsxs("div",{className:"text-center text-gray-400 dark:text-gray-600",children:[t("settings.versionPrefix"),hn.VERSION," (",g(),")"]})]})]})},M9=()=>{const{t}=tt(),e=ta(),{setIsInitialLoading:n,showLoading:r,hideLoading:s}=va(),[l,c]=b.useState(void 0),[m,h]=b.useState(null),[g,A]=b.useState(null),[p,v]=b.useState(!1),[w,T]=b.useState(1),[S,k]=b.useState(""),[L,U]=b.useState(""),[x,F]=b.useState(!1),B=b.useCallback(async()=>{try{const[Q,K]=await Promise.all([wT(),CT()]);c(Q),F(K),n(!1)}catch(Q){console.error("Failed to load PIN settings:",Q),h(t("common.errors.unknownErrorTryAgain")),n(!1)}},[n,t]);b.useEffect(()=>{B()},[B]);const V=()=>{if(h(null),A(null),!e.dbAvailable){h(t("common.errors.unknownErrorTryAgain"));return}T(1),k(""),U(""),v(!0)},O=Q=>{if(Q.preventDefault(),h(null),!Ep(S)){h(t("settings.unlockMethod.invalidPinFormat"));return}T(2)},_=async Q=>{if(Q.preventDefault(),h(null),A(null),S!==L){h(t("settings.unlockMethod.pinMismatch"));return}try{r();const te=await xe.getItem("session:encryptionKey");if(!te){h(t("common.errors.unknownErrorTryAgain")),s();return}await aM(S,te),c(!0),v(!1),T(1),k(""),U(""),A(t("settings.unlockMethod.enableSuccess")),s()}catch(K){console.error("Failed to enable PIN:",K),K instanceof pd?h(t("settings.unlockMethod.invalidPinFormat")):h(t("common.errors.unknownErrorTryAgain")),s()}},z=async()=>{h(null),A(null);try{r(),await bp(),c(!1),F(!1),s()}catch(Q){console.error("Failed to disable PIN:",Q),h(t("common.errors.unknownErrorTryAgain")),s()}};return d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex items-start gap-2",children:d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t("settings.unlockMethod.introText")})}),d.jsxs("div",{className:"mt-6",children:[m&&d.jsx(Ls,{type:"error",message:m,className:"mb-4"}),g&&d.jsx(Ls,{type:"success",message:g,className:"mb-4"}),x&&d.jsx(Ls,{type:"warning",message:t("settings.unlockMethod.pinLocked"),className:"mb-4"}),d.jsx("section",{children:d.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 20l4-16m2 16l4-16M6 9h14M4 15h14"})}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center",children:[d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.unlockMethod.pin")}),d.jsx($1,{title:t("common.notice"),content:t("settings.unlockMethod.pinSecurityWarning"),className:"ml-2"})]}),d.jsx("p",{className:"text-sm mt-1 text-gray-600 dark:text-gray-400",children:t("settings.unlockMethod.pinDescription")})]})]}),l!==void 0&&d.jsx("button",{onClick:l&&!x?z:V,className:`px-4 py-2 rounded-md transition-colors ${l&&!x?"bg-green-500 hover:bg-green-600 text-white":"bg-red-500 hover:bg-red-600 text-white"}`,children:t(l&&!x?"common.enabled":"common.disabled")})]})})})}),d.jsx("section",{className:"mt-4",children:d.jsx("div",{className:"bg-gray-50 dark:bg-gray-700/30 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700",children:d.jsx("div",{className:"p-4",children:d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center",children:[d.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:d.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"})}),d.jsx("div",{children:d.jsx("p",{className:"font-medium text-gray-900 dark:text-white",children:t("settings.unlockMethod.password")})})]}),d.jsx("div",{className:"px-4 py-2 rounded-md bg-green-500 text-white hover:bg-green-600 cursor-not-allowed",children:t("common.enabled")})]})})})}),p&&d.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:d.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg p-6 max-w-md w-full mx-4 relative",children:[d.jsx("button",{type:"button",onClick:()=>{v(!1),T(1),k(""),U(""),h(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:d.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:d.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),w===1&&d.jsxs(d.Fragment,{children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:t("settings.unlockMethod.setupPin")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:t("settings.unlockMethod.enterNewPinDescription")}),d.jsxs("form",{onSubmit:O,children:[d.jsx("div",{className:"mb-4",children:d.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:S,onChange:Q=>k(Q.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&&d.jsx(Ls,{type:"error",message:m,className:"mb-4"}),d.jsx(Ca,{type:"submit",children:t("common.next")})]})]}),w===2&&d.jsxs(d.Fragment,{children:[d.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-4 pr-8",children:t("settings.unlockMethod.confirmPin")}),d.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:t("settings.unlockMethod.confirmPinDescription")}),d.jsxs("form",{onSubmit:_,children:[d.jsx("div",{className:"mb-4",children:d.jsx("input",{type:"password",inputMode:"numeric",pattern:"[0-9]*",maxLength:8,value:L,onChange:Q=>U(Q.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&&d.jsx(Ls,{type:"error",message:m,className:"mb-4"}),d.jsx(Ca,{type:"submit",children:t("common.confirm")})]})]})]})})]})]})},B9=({routes:t,isLoading:e,message:n,headerButtons:r})=>{const s=Ja(),l=t.find(g=>{const A=g.path.replace(/:\w+/g,"[^/]+");return new RegExp(`^${A}$`).test(s.pathname)}),c=(l==null?void 0:l.layout)??"default",m=e&&d.jsx("div",{className:"fixed inset-0 bg-white dark:bg-gray-900 z-50 flex items-center justify-center",children:d.jsx(mi,{})}),h=d.jsx(rw,{children:t.map(g=>d.jsx(dp,{path:g.path,element:g.element},g.path))});switch(c){case"passkey":return d.jsxs(gM,{children:[m,n&&d.jsx("p",{className:"mb-4 text-red-500 dark:text-red-400 text-sm",children:n}),h]});case"auth":return d.jsxs("div",{className:"min-h-screen min-w-[350px] bg-white dark:bg-gray-900 flex flex-col max-h-[600px]",children:[m,d.jsx(DT,{routes:t,rightButtons:r}),d.jsxs("main",{className:"flex-1 overflow-y-auto bg-gray-100 dark:bg-gray-900",style:{paddingTop:"64px",height:"100%"},children:[n&&d.jsx("div",{className:"px-4 pt-0",children:d.jsx("p",{className:"text-red-500 dark:text-red-400 text-sm",children:n})}),h]})]});case"default":default:return d.jsxs(d.Fragment,{children:[m,d.jsx(mM,{routes:t,headerButtons:r,message:n,children:h})]})}},_9=()=>{const{t}=tt(),e=wi(),{isInitialLoading:n}=va(),[r,s]=Td(!0,150),[l,c]=b.useState(null),{headerButtons:m}=Ii(),h=rn.useMemo(()=>[{path:"/",element:d.jsx(C_,{}),showBackButton:!1},{path:"/reinitialize",element:d.jsx(I9,{}),showBackButton:!1},{path:"/login",element:d.jsx(WB,{}),showBackButton:!1,layout:"auth"},{path:"/unlock",element:d.jsx(qB,{}),showBackButton:!1,layout:"auth"},{path:"/unlock-success",element:d.jsx(YB,{}),showBackButton:!1},{path:"/upgrade",element:d.jsx(JB,{}),showBackButton:!1},{path:"/auth-settings",element:d.jsx(nB,{}),showBackButton:!0,title:t("common.settings")},{path:"/items",element:d.jsx(fv,{}),showBackButton:!1},{path:"/items/folder/:folderId",element:d.jsx(fv,{}),showBackButton:!0,title:t("items.title")},{path:"/items/select-type",element:d.jsx(m9,{}),showBackButton:!0,title:t("itemTypes.selectType")},{path:"/items/add",element:d.jsx(uv,{}),showBackButton:!0,title:t("items.addItem")},{path:"/items/deleted",element:d.jsx(h9,{}),showBackButton:!0,title:t("recentlyDeleted.title")},{path:"/items/:id",element:d.jsx(s9,{}),showBackButton:!0,title:t("items.itemDetails")},{path:"/items/:id/edit",element:d.jsx(uv,{}),showBackButton:!0,title:t("items.editItem")},{path:"/passkeys/create",element:d.jsx(b9,{}),layout:"passkey"},{path:"/passkeys/authenticate",element:d.jsx(E9,{}),layout:"passkey"},{path:"/emails",element:d.jsx(I_,{}),showBackButton:!1},{path:"/emails/:id",element:d.jsx(w_,{}),showBackButton:!0,title:t("emails.title")},{path:"/settings",element:d.jsx(U9,{}),showBackButton:!1},{path:"/settings/unlock-method",element:d.jsx(M9,{}),showBackButton:!0,title:t("settings.unlockMethod.title")},{path:"/settings/autofill",element:d.jsx(C9,{}),showBackButton:!0,title:t("settings.autofillSettings")},{path:"/settings/context-menu",element:d.jsx(T9,{}),showBackButton:!0,title:t("settings.contextMenuSettings")},{path:"/settings/clipboard",element:d.jsx(N9,{}),showBackButton:!0,title:t("settings.clipboardSettings")},{path:"/settings/language",element:d.jsx(x9,{}),showBackButton:!0,title:t("settings.language")},{path:"/settings/auto-lock",element:d.jsx(S9,{}),showBackButton:!0,title:t("settings.autoLockTimeout")},{path:"/settings/passkeys",element:d.jsx(L9,{}),showBackButton:!0,title:t("settings.passkeySettings")},{path:"/settings/identity-generator",element:d.jsx(k9,{}),showBackButton:!0,title:t("settings.identityGenerator")}],[t]);return b.useEffect(()=>{n||s(!1)},[n,s]),b.useEffect(()=>{St("POPUP_HEARTBEAT",{},"background").catch(()=>{});const g=setInterval(()=>{St("POPUP_HEARTBEAT",{},"background").catch(()=>{})},5e3);return()=>{clearInterval(g)}},[]),b.useEffect(()=>{window.location.hash&&window.location.hash!=="#/"&&window.location.hash!=="#"||p9()},[]),b.useEffect(()=>{e.globalMessage?c(e.globalMessage):c(null)},[e,e.globalMessage]),d.jsx(C2,{children:d.jsx(bM,{children:d.jsx(B9,{routes:h,isLoading:r,message:l,headerButtons:m})})})},Et=t=>typeof t=="string",Xl=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},wv=t=>t==null?"":""+t,F9=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},O9=/###/g,Iv=t=>t&&t.indexOf("###")>-1?t.replace(O9,"."):t,Cv=t=>!t||Et(t),gd=(t,e,n)=>{const r=Et(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Cv(t))return{};const l=Iv(r[s]);!t[l]&&n&&(t[l]=new n),Object.prototype.hasOwnProperty.call(t,l)?t=t[l]:t={},++s}return Cv(t)?{}:{obj:t,k:Iv(r[s])}},Sv=(t,e,n)=>{const{obj:r,k:s}=gd(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let l=e[e.length-1],c=e.slice(0,e.length-1),m=gd(t,c,Object);for(;m.obj===void 0&&c.length;)l=`${c[c.length-1]}.${l}`,c=c.slice(0,c.length-1),m=gd(t,c,Object),m!=null&&m.obj&&typeof m.obj[`${m.k}.${l}`]<"u"&&(m.obj=void 0);m.obj[`${m.k}.${l}`]=n},P9=(t,e,n,r)=>{const{obj:s,k:l}=gd(t,e,Object);s[l]=s[l]||[],s[l].push(n)},Ou=(t,e)=>{const{obj:n,k:r}=gd(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},j9=(t,e,n)=>{const r=Ou(t,n);return r!==void 0?r:Ou(e,n)},eL=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?Et(t[r])||t[r]instanceof String||Et(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):eL(t[r],e[r],n):t[r]=e[r]);return t},wo=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var H9={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const V9=t=>Et(t)?t.replace(/[&<>"'\/]/g,e=>H9[e]):t;class z9{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const Q9=[" ",",","?","!",";"],K9=new z9(20),G9=(t,e,n)=>{e=e||"",n=n||"";const r=Q9.filter(c=>e.indexOf(c)<0&&n.indexOf(c)<0);if(r.length===0)return!0;const s=K9.getRegExp(`(${r.map(c=>c==="?"?"\\?":c).join("|")})`);let l=!s.test(t);if(!l){const c=t.indexOf(n);c>0&&!s.test(t.substring(0,c))&&(l=!0)}return l},ap=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let s=t;for(let l=0;l<r.length;){if(!s||typeof s!="object")return;let c,m="";for(let h=l;h<r.length;++h)if(h!==l&&(m+=n),m+=r[h],c=s[m],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&h<r.length-1)continue;l+=h-l+1;break}s=c}return s},vd=t=>t==null?void 0:t.replace("_","-"),W9={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var n,r;(r=(n=console==null?void 0:console[t])==null?void 0:n.apply)==null||r.call(n,console,e)}};class Pu{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||W9,this.options=n,this.debug=n.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,n,r,s){return s&&!this.debug?null:(Et(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Pu(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Pu(this.logger,e)}}var Pi=new Pu;class Zu{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,l])=>{for(let c=0;c<l;c++)s(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,l])=>{for(let c=0;c<l;c++)s.apply(s,[e,...n])})}}class Nv extends Zu{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,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 n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,s={}){var g,A;const l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;e.indexOf(".")>-1?m=e.split("."):(m=[e,n],r&&(Array.isArray(r)?m.push(...r):Et(r)&&l?m.push(...r.split(l)):m.push(r)));const h=Ou(this.data,m);return!h&&!n&&!r&&e.indexOf(".")>-1&&(e=m[0],n=m[1],r=m.slice(2).join(".")),h||!c||!Et(r)?h:ap((A=(g=this.data)==null?void 0:g[e])==null?void 0:A[n],r,l)}addResource(e,n,r,s,l={silent:!1}){const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let m=[e,n];r&&(m=m.concat(c?r.split(c):r)),e.indexOf(".")>-1&&(m=e.split("."),s=n,n=m[1]),this.addNamespaces(n),Sv(this.data,m,s),l.silent||this.emit("added",e,n,r,s)}addResources(e,n,r,s={silent:!1}){for(const l in r)(Et(r[l])||Array.isArray(r[l]))&&this.addResource(e,n,l,r[l],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,l,c={silent:!1,skipCopy:!1}){let m=[e,n];e.indexOf(".")>-1&&(m=e.split("."),s=r,r=n,n=m[1]),this.addNamespaces(n);let h=Ou(this.data,m)||{};c.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?eL(h,r,l):h={...h,...r},Sv(this.data,m,h),c.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var tL={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(l=>{var c;e=((c=this.processors[l])==null?void 0:c.process(e,n,r,s))??e}),e}};const Tv={},kv=t=>!Et(t)&&typeof t!="boolean"&&typeof t!="number";class ju extends Zu{constructor(e,n={}){super(),F9(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pi.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const s=this.resolve(e,r);return(s==null?void 0:s.res)!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let l=n.ns||this.options.defaultNS||[];const c=r&&e.indexOf(r)>-1,m=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!G9(e,r,s);if(c&&!m){const h=e.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:e,namespaces:Et(l)?[l]:l};const g=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(g[0])>-1)&&(l=g.shift()),e=g.join(s)}return{key:e,namespaces:Et(l)?[l]:l}}translate(e,n,r){let s=typeof n=="object"?{...n}:n;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 l=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:m,namespaces:h}=this.extractFromKey(e[e.length-1],s),g=h[h.length-1];let A=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;A===void 0&&(A=":");const p=s.lng||this.language,v=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((p==null?void 0:p.toLowerCase())==="cimode")return v?l?{res:`${g}${A}${m}`,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:`${g}${A}${m}`:l?{res:m,usedKey:m,exactUsedKey:m,usedLng:p,usedNS:g,usedParams:this.getUsedParamsDetails(s)}:m;const w=this.resolve(e,s);let T=w==null?void 0:w.res;const S=(w==null?void 0:w.usedKey)||m,k=(w==null?void 0:w.exactUsedKey)||m,L=["[object Number]","[object Function]","[object RegExp]"],U=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,F=s.count!==void 0&&!Et(s.count),B=ju.hasDefaultValue(s),V=F?this.pluralResolver.getSuffix(p,s.count,s):"",O=s.ordinal&&F?this.pluralResolver.getSuffix(p,s.count,{ordinal:!1}):"",_=F&&!s.ordinal&&s.count===0,z=_&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${V}`]||s[`defaultValue${O}`]||s.defaultValue;let Q=T;x&&!T&&B&&(Q=z);const K=kv(Q),te=Object.prototype.toString.apply(Q);if(x&&Q&&K&&L.indexOf(te)<0&&!(Et(U)&&Array.isArray(Q))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ee=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,Q,{...s,ns:h}):`key '${m} (${this.language})' returned an object instead of string.`;return l?(w.res=ee,w.usedParams=this.getUsedParamsDetails(s),w):ee}if(c){const ee=Array.isArray(Q),Y=ee?[]:{},le=ee?k:S;for(const J in Q)if(Object.prototype.hasOwnProperty.call(Q,J)){const ie=`${le}${c}${J}`;B&&!T?Y[J]=this.translate(ie,{...s,defaultValue:kv(z)?z[J]:void 0,joinArrays:!1,ns:h}):Y[J]=this.translate(ie,{...s,joinArrays:!1,ns:h}),Y[J]===ie&&(Y[J]=Q[J])}T=Y}}else if(x&&Et(U)&&Array.isArray(T))T=T.join(U),T&&(T=this.extendTranslation(T,e,s,r));else{let ee=!1,Y=!1;!this.isValidLookup(T)&&B&&(ee=!0,T=z),this.isValidLookup(T)||(Y=!0,T=m);const J=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Y?void 0:T,ie=B&&z!==T&&this.options.updateMissing;if(Y||ee||ie){if(this.logger.log(ie?"updateKey":"missingKey",p,g,m,ie?z:T),c){const W=this.resolve(m,{...s,keySeparator:!1});W&&W.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 be=[];const se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&se&&se[0])for(let W=0;W<se.length;W++)be.push(se[W]);else this.options.saveMissingTo==="all"?be=this.languageUtils.toResolveHierarchy(s.lng||this.language):be.push(s.lng||this.language);const j=(W,X,ne)=>{var ce;const we=B&&ne!==T?ne:J;this.options.missingKeyHandler?this.options.missingKeyHandler(W,g,X,we,ie,s):(ce=this.backendConnector)!=null&&ce.saveMissing&&this.backendConnector.saveMissing(W,g,X,we,ie,s),this.emit("missingKey",W,g,X,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?be.forEach(W=>{const X=this.pluralResolver.getSuffixes(W,s);_&&s[`defaultValue${this.options.pluralSeparator}zero`]&&X.indexOf(`${this.options.pluralSeparator}zero`)<0&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(ne=>{j([W],m+ne,s[`defaultValue${ne}`]||z)})}):j(be,m,z))}T=this.extendTranslation(T,e,s,w,r),Y&&T===m&&this.options.appendNamespaceToMissingKey&&(T=`${g}${A}${m}`),(Y||ee)&&this.options.parseMissingKeyHandler&&(T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${A}${m}`:m,ee?T:void 0,s))}return l?(w.res=T,w.usedParams=this.getUsedParamsDetails(s),w):T}extendTranslation(e,n,r,s,l){var h,g;if((h=this.i18nFormat)!=null&&h.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const A=Et(e)&&(((g=r==null?void 0:r.interpolation)==null?void 0:g.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let p;if(A){const w=e.match(this.interpolator.nestingRegexp);p=w&&w.length}let v=r.replace&&!Et(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),e=this.interpolator.interpolate(e,v,r.lng||this.language||s.usedLng,r),A){const w=e.match(this.interpolator.nestingRegexp),T=w&&w.length;p<T&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...w)=>(l==null?void 0:l[0])===w[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${w[0]} in key: ${n[0]}`),null):this.translate(...w,n),r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,m=Et(c)?[c]:c;return e!=null&&(m!=null&&m.length)&&r.applyPostProcessor!==!1&&(e=tL.handle(m,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,s,l,c,m;return Et(e)&&(e=[e]),e.forEach(h=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(h,n),A=g.key;s=A;let p=g.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const v=n.count!==void 0&&!Et(n.count),w=v&&!n.ordinal&&n.count===0,T=n.context!==void 0&&(Et(n.context)||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(k=>{var L,U;this.isValidLookup(r)||(m=k,!Tv[`${S[0]}-${k}`]&&((L=this.utils)!=null&&L.hasLoadedNamespace)&&!((U=this.utils)!=null&&U.hasLoadedNamespace(m))&&(Tv[`${S[0]}-${k}`]=!0,this.logger.warn(`key "${s}" for languages "${S.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!!!")),S.forEach(x=>{var V;if(this.isValidLookup(r))return;c=x;const F=[A];if((V=this.i18nFormat)!=null&&V.addLookupKeys)this.i18nFormat.addLookupKeys(F,A,x,k,n);else{let O;v&&(O=this.pluralResolver.getSuffix(x,n.count,n));const _=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(F.push(A+O),n.ordinal&&O.indexOf(z)===0&&F.push(A+O.replace(z,this.options.pluralSeparator)),w&&F.push(A+_)),T){const Q=`${A}${this.options.contextSeparator}${n.context}`;F.push(Q),v&&(F.push(Q+O),n.ordinal&&O.indexOf(z)===0&&F.push(Q+O.replace(z,this.options.pluralSeparator)),w&&F.push(Q+_))}}let B;for(;B=F.pop();)this.isValidLookup(r)||(l=B,r=this.getResource(x,k,B,n))}))})}),{res:r,usedKey:s,exactUsedKey:l,usedLng:c,usedNS:m}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,s={}){var l;return(l=this.i18nFormat)!=null&&l.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!Et(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const l of n)delete s[l]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}class xv{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pi.create("languageUtils")}getScriptPartFromCode(e){if(e=vd(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=vd(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(Et(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(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 n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return n=s;const l=this.getLanguagePartFromCode(r);if(this.isSupportedCode(l))return n=l;n=this.options.supportedLngs.find(c=>{if(c===l)return c;if(!(c.indexOf("-")<0&&l.indexOf("-")<0)&&(c.indexOf("-")>0&&l.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===l||c.indexOf(l)===0&&l.length>1))return c})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),Et(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),s=[],l=c=>{c&&(this.isSupportedCode(c)?s.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return Et(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):Et(e)&&l(this.formatLanguageCode(e)),r.forEach(c=>{s.indexOf(c)<0&&l(this.formatLanguageCode(c))}),s}}const Lv={zero:0,one:1,two:2,few:3,many:4,other:5},Dv={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class q9{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Pi.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=vd(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:r,type:s});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let c;try{c=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Dv;if(!e.match(/-|_/))return Dv;const h=this.languageUtils.getLanguagePartFromCode(e);c=this.getRule(h,n)}return this.pluralRulesCache[l]=c,c}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((s,l)=>Lv[s]-Lv[l]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,n,r={}){const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const Rv=(t,e,n,r=".",s=!0)=>{let l=j9(t,e,n);return!l&&s&&Et(n)&&(l=ap(t,n,r),l===void 0&&(l=ap(e,n,r))),l},Cf=t=>t.replace(/\$/g,"$$$$");class Y9{constructor(e={}){var n;this.logger=Pi.create("interpolator"),this.options=e,this.format=((n=e==null?void 0:e.interpolation)==null?void 0:n.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:l,prefixEscaped:c,suffix:m,suffixEscaped:h,formatSeparator:g,unescapeSuffix:A,unescapePrefix:p,nestingPrefix:v,nestingPrefixEscaped:w,nestingSuffix:T,nestingSuffixEscaped:S,nestingOptionsSeparator:k,maxReplaces:L,alwaysFormat:U}=e.interpolation;this.escape=n!==void 0?n:V9,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=l?wo(l):c||"{{",this.suffix=m?wo(m):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=A?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":A||"",this.nestingPrefix=v?wo(v):w||wo("$t("),this.nestingSuffix=T?wo(T):S||wo(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=L||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"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,n,r,s){var w;let l,c,m;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=T=>{if(T.indexOf(this.formatSeparator)<0){const U=Rv(n,h,T,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(U,void 0,r,{...s,...n,interpolationkey:T}):U}const S=T.split(this.formatSeparator),k=S.shift().trim(),L=S.join(this.formatSeparator).trim();return this.format(Rv(n,h,k,this.options.keySeparator,this.options.ignoreJSONStructure),L,r,{...s,...n,interpolationkey:k})};this.resetRegExp();const A=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,p=((w=s==null?void 0:s.interpolation)==null?void 0:w.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:T=>Cf(T)},{regex:this.regexp,safeValue:T=>this.escapeValue?Cf(this.escape(T)):Cf(T)}].forEach(T=>{for(m=0;l=T.regex.exec(e);){const S=l[1].trim();if(c=g(S),c===void 0)if(typeof A=="function"){const L=A(e,l,s);c=Et(L)?L:""}else if(s&&Object.prototype.hasOwnProperty.call(s,S))c="";else if(p){c=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),c="";else!Et(c)&&!this.useRawValueToEscape&&(c=wv(c));const k=T.safeValue(c);if(e=e.replace(l[0],k),p?(T.regex.lastIndex+=c.length,T.regex.lastIndex-=l[0].length):T.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),e}nest(e,n,r={}){let s,l,c;const m=(h,g)=>{const A=this.nestingOptionsSeparator;if(h.indexOf(A)<0)return h;const p=h.split(new RegExp(`${A}[ ]*{`));let v=`{${p[1]}`;h=p[0],v=this.interpolate(v,c);const w=v.match(/'/g),T=v.match(/"/g);(((w==null?void 0:w.length)??0)%2===0&&!T||T.length%2!==0)&&(v=v.replace(/'/g,'"'));try{c=JSON.parse(v),g&&(c={...g,...c})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,S),`${h}${A}${v}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,h};for(;s=this.nestingRegexp.exec(e);){let h=[];c={...r},c=c.replace&&!Et(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const g=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(g!==-1&&(h=s[1].slice(g).split(this.formatSeparator).map(A=>A.trim()).filter(Boolean),s[1]=s[1].slice(0,g)),l=n(m.call(this,s[1].trim(),c),c),l&&s[0]===e&&!Et(l))return l;Et(l)||(l=wv(l)),l||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),l=""),h.length&&(l=h.reduce((A,p)=>this.format(A,p,r.lng,{...r,interpolationkey:s[1].trim()}),l.trim())),e=e.replace(s[0],l),this.regexp.lastIndex=0}return e}}const J9=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(c=>{if(c){const[m,...h]=c.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),A=m.trim();n[A]||(n[A]=g),g==="false"&&(n[A]=!1),g==="true"&&(n[A]=!0),isNaN(g)||(n[A]=parseInt(g,10))}})}return{formatName:e,formatOptions:n}},Uv=t=>{const e={};return(n,r,s)=>{let l=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(l={...l,[s.interpolationkey]:void 0});const c=r+JSON.stringify(l);let m=e[c];return m||(m=t(vd(r),s),e[c]=m),m(n)}},X9=t=>(e,n,r)=>t(vd(n),r)(e);class $9{constructor(e={}){this.logger=Pi.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?Uv:X9;this.formats={number:r((s,l)=>{const c=new Intl.NumberFormat(s,{...l});return m=>c.format(m)}),currency:r((s,l)=>{const c=new Intl.NumberFormat(s,{...l,style:"currency"});return m=>c.format(m)}),datetime:r((s,l)=>{const c=new Intl.DateTimeFormat(s,{...l});return m=>c.format(m)}),relativetime:r((s,l)=>{const c=new Intl.RelativeTimeFormat(s,{...l});return m=>c.format(m,l.range||"day")}),list:r((s,l)=>{const c=new Intl.ListFormat(s,{...l});return m=>c.format(m)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Uv(n)}format(e,n,r,s={}){const l=n.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(m=>m.indexOf(")")>-1)){const m=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,m)].join(this.formatSeparator)}return l.reduce((m,h)=>{var p;const{formatName:g,formatOptions:A}=J9(h);if(this.formats[g]){let v=m;try{const w=((p=s==null?void 0:s.formatParams)==null?void 0:p[s.interpolationkey])||{},T=w.locale||w.lng||s.locale||s.lng||r;v=this.formats[g](m,T,{...A,...s,...w})}catch(w){this.logger.warn(w)}return v}else this.logger.warn(`there was no format function for ${g}`);return m},e)}}const Z9=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class e3 extends Zu{constructor(e,n,r,s={}){var l,c;super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Pi.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=[],(c=(l=this.backend)==null?void 0:l.init)==null||c.call(l,r,s.backend,s)}queueLoad(e,n,r,s){const l={},c={},m={},h={};return e.forEach(g=>{let A=!0;n.forEach(p=>{const v=`${g}|${p}`;!r.reload&&this.store.hasResourceBundle(g,p)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?c[v]===void 0&&(c[v]=!0):(this.state[v]=1,A=!1,c[v]===void 0&&(c[v]=!0),l[v]===void 0&&(l[v]=!0),h[p]===void 0&&(h[p]=!0)))}),A||(m[g]=!0)}),(Object.keys(l).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(l),pending:Object.keys(c),toLoadLanguages:Object.keys(m),toLoadNamespaces:Object.keys(h)}}loaded(e,n,r){const s=e.split("|"),l=s[0],c=s[1];n&&this.emit("failedLoading",l,c,n),!n&&r&&this.store.addResourceBundle(l,c,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const m={};this.queue.forEach(h=>{P9(h.loaded,[l],c),Z9(h,e),n&&h.errors.push(n),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{m[g]||(m[g]={});const A=h.loaded[g];A.length&&A.forEach(p=>{m[g][p]===void 0&&(m[g][p]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(h=>!h.done)}read(e,n,r,s=0,l=this.retryTimeout,c){if(!e.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:l,callback:c});return}this.readingCalls++;const m=(g,A)=>{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&&A&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,s+1,l*2,c)},l);return}c(g,A)},h=this.backend[r].bind(this.backend);if(h.length===2){try{const g=h(e,n);g&&typeof g.then=="function"?g.then(A=>m(null,A)).catch(m):m(null,g)}catch(g){m(g)}return}return h(e,n,m)}prepareLoading(e,n,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();Et(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Et(n)&&(n=[n]);const l=this.queueLoad(e,n,r,s);if(!l.toLoad.length)return l.pending.length||s(),null;l.toLoad.forEach(c=>{this.loadOne(c)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),s=r[0],l=r[1];this.read(s,l,"read",void 0,void 0,(c,m)=>{c&&this.logger.warn(`${n}loading namespace ${l} for language ${s} failed`,c),!c&&m&&this.logger.log(`${n}loaded namespace ${l} for language ${s}`,m),this.loaded(e,c,m)})}saveMissing(e,n,r,s,l,c={},m=()=>{}){var h,g,A,p,v;if((g=(h=this.services)==null?void 0:h.utils)!=null&&g.hasLoadedNamespace&&!((p=(A=this.services)==null?void 0:A.utils)!=null&&p.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(!(r==null||r==="")){if((v=this.backend)!=null&&v.create){const w={...c,isUpdate:l},T=this.backend.create.bind(this.backend);if(T.length<6)try{let S;T.length===5?S=T(e,n,r,s,w):S=T(e,n,r,s),S&&typeof S.then=="function"?S.then(k=>m(null,k)).catch(m):m(null,S)}catch(S){m(S)}else T(e,n,r,s,m,w)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const Mv=()=>({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:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Et(t[1])&&(e.defaultValue=t[1]),Et(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Bv=t=>{var e,n;return Et(t.ns)&&(t.ns=[t.ns]),Et(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Et(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((n=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:n.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},su=()=>{},t3=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class wd extends Zu{constructor(e={},n){if(super(),this.options=Bv(e),this.services={},this.logger=Pi,this.modules={external:[]},t3(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(Et(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=Mv();this.options={...r,...this.options,...Bv(e)},this.options.interpolation={...r.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?Pi.init(s(this.modules.logger),this.options):Pi.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=$9;const A=new xv(this.options);this.store=new Nv(this.options.resources,this.options);const p=this.services;p.logger=Pi,p.resourceStore=this.store,p.languageUtils=A,p.pluralResolver=new q9(A,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.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===r.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 Y9(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new e3(s(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(w,...T)=>{this.emit(w,...T)}),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 ju(this.services,this.options),this.translator.on("*",(w,...T)=>{this.emit(w,...T)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,n||(n=su),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]=(...A)=>this.store[g](...A)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...A)=>(this.store[g](...A),this)});const m=Xl(),h=()=>{const g=(A,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),n(A,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?h():setTimeout(h,0),m}loadResources(e,n=su){var l,c;let r=n;const s=Et(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const m=[],h=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(p=>{p!=="cimode"&&m.indexOf(p)<0&&m.push(p)})};s?h(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(A=>h(A)),(c=(l=this.options.preload)==null?void 0:l.forEach)==null||c.call(l,g=>h(g)),this.services.backendConnector.load(m,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(g)})}else r(null)}reloadResources(e,n,r){const s=Xl();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=su),this.services.backendConnector.reload(e,n,l=>{s.resolve(),r(l)}),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"&&tL.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 n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Xl();this.emit("languageChanging",e);const s=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},l=(m,h)=>{h?this.isLanguageChangingTo===e&&(s(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,r.resolve((...g)=>this.t(...g)),n&&n(m,(...g)=>this.t(...g))},c=m=>{var A,p;!e&&!m&&this.services.languageDetector&&(m=[]);const h=Et(m)?m:m&&m[0],g=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(Et(m)?[m]:m);g&&(this.language||s(g),this.translator.language||this.translator.changeLanguage(g),(p=(A=this.services.languageDetector)==null?void 0:A.cacheUserLanguage)==null||p.call(A,g)),this.loadResources(g,v=>{l(v,g)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(e),r}getFixedT(e,n,r){const s=(l,c,...m)=>{let h;typeof c!="object"?h=this.options.overloadTranslationOptionHandler([l,c].concat(m)):h={...c},h.lng=h.lng||s.lng,h.lngs=h.lngs||s.lngs,h.ns=h.ns||s.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||r||s.keyPrefix);const g=this.options.keySeparator||".";let A;return h.keyPrefix&&Array.isArray(l)?A=l.map(p=>`${h.keyPrefix}${g}${p}`):A=h.keyPrefix?`${h.keyPrefix}${g}${l}`:l,this.t(A,h)};return Et(e)?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=r,s}t(...e){var n;return(n=this.translator)==null?void 0:n.translate(...e)}exists(...e){var n;return(n=this.translator)==null?void 0:n.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){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 r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const c=(m,h)=>{const g=this.services.backendConnector.state[`${m}|${h}`];return g===-1||g===0||g===2};if(n.precheck){const m=n.precheck(this,c);if(m!==void 0)return m}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(r,e)&&(!s||c(l,e)))}loadNamespaces(e,n){const r=Xl();return this.options.ns?(Et(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Xl();Et(e)&&(e=[e]);const s=this.options.preload||[],l=e.filter(c=>s.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return l.length?(this.options.preload=s.concat(l),this.loadResources(c=>{r.resolve(),n&&n(c)}),r):(n&&n(),Promise.resolve())}dir(e){var s,l;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 c=new Intl.Locale(e);if(c&&c.getTextInfo){const m=c.getTextInfo();if(m&&m.direction)return m.direction}}const n=["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"],r=((l=this.services)==null?void 0:l.languageUtils)||new xv(Mv());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){return new wd(e,n)}cloneInstance(e={},n=su){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},l=new wd(s);if((e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(m=>{l[m]=this[m]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},r){const m=Object.keys(this.store.data).reduce((h,g)=>(h[g]={...this.store.data[g]},h[g]=Object.keys(h[g]).reduce((A,p)=>(A[p]={...h[g][p]},A),h[g]),h),{});l.store=new Nv(m,s),l.services.resourceStore=l.store}return l.translator=new ju(l.services,s),l.translator.on("*",(m,...h)=>{l.emit(m,...h)}),l.init(s,n),l.translator.options=s,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ya=wd.createInstance();Ya.createInstance=wd.createInstance;Ya.createInstance;Ya.dir;Ya.init;Ya.loadResources;Ya.reloadResources;Ya.use;Ya.changeLanguage;Ya.getFixedT;Ya.t;Ya.exists;Ya.setDefaultNamespace;Ya.hasLoadedNamespace;Ya.loadNamespaces;Ya.loadLanguages;const a3=async()=>{const t=await xe.getItem("local:language");if(t&&Cu.includes(t))return t;const e=navigator.language.split("-")[0];return Cu.includes(e)?e:Oi},n3=async()=>{const t=await a3();await Ya.use($D).init({resources:$l,lng:t,fallbackLng:Oi,debug:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1,bindI18n:"languageChanged loaded",bindI18nStore:""}})};n3().catch(t=>{console.error("Failed to initialize i18n:",t),Ya.emit("initialized")});const _v=()=>{jD.createRoot(document.getElementById("root")).render(d.jsx(JU,{children:d.jsx(lM,{children:d.jsx(rM,{children:d.jsx(dM,{children:d.jsx(pM,{children:d.jsx(hM,{children:d.jsx(D9,{children:d.jsx(_9,{})})})})})})})}))};Ya.isInitialized?_v():Ya.on("initialized",_v)});export default i3();
