@edenapp/sdk 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/Eden.js +2 -2
  2. package/dist/Eden.js.map +1 -1
  3. package/dist/app-frame/frame-injector.js +6 -6
  4. package/dist/app-frame/frame-injector.js.map +3 -3
  5. package/dist/apps/prebuilt/com.eden.context-menu/dist/assets/{index-DUrqfNSi.js → index-B-ks_-b3.js} +1 -1
  6. package/dist/apps/prebuilt/com.eden.context-menu/dist/index.html +1 -1
  7. package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/{index-CEfffVHu.js → index-CokBDS24.js} +1 -1
  8. package/dist/apps/prebuilt/com.eden.eveshell/dist/index.html +1 -1
  9. package/dist/apps/prebuilt/com.eden.eveshell/manifest.json +9 -1
  10. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsc +2 -2
  11. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsserver +2 -2
  12. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
  13. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/CHANGELOG.md +8 -0
  14. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/EdenConfig.d.ts +2 -0
  15. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/commands.generated.d.ts +61 -15
  16. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/global.d.ts +8 -3
  17. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/package.json +1 -1
  18. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsc +2 -2
  19. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsserver +2 -2
  20. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/vite +2 -2
  21. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
  22. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/CHANGELOG.md +8 -0
  23. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/EdenConfig.d.ts +2 -0
  24. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/commands.generated.d.ts +61 -15
  25. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/global.d.ts +8 -3
  26. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/package.json +1 -1
  27. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/esbuild +2 -2
  28. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/rollup +2 -2
  29. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/yaml +2 -2
  30. package/dist/apps/prebuilt/com.eden.login/dist/assets/{index-DyI95N2f.js → index-KswMPsHx.js} +1 -1
  31. package/dist/apps/prebuilt/com.eden.login/dist/index.html +1 -1
  32. package/dist/apps/prebuilt/com.eden.toaster/dist/assets/{index-C4cVyh7j.js → index-b5EUNXyn.js} +2 -2
  33. package/dist/apps/prebuilt/com.eden.toaster/dist/index.html +1 -1
  34. package/dist/generated/runtime.d.ts.map +1 -1
  35. package/dist/generated/runtime.js +6 -1
  36. package/dist/generated/runtime.js.map +1 -1
  37. package/dist/process-manager/ProcessHandler.d.ts +12 -0
  38. package/dist/process-manager/ProcessHandler.d.ts.map +1 -1
  39. package/dist/process-manager/ProcessHandler.js +24 -3
  40. package/dist/process-manager/ProcessHandler.js.map +1 -1
  41. package/dist/view-manager/ViewCreator.d.ts.map +1 -1
  42. package/dist/view-manager/ViewCreator.js +2 -1
  43. package/dist/view-manager/ViewCreator.js.map +1 -1
  44. package/dist/view-manager/ViewHandler.d.ts +67 -20
  45. package/dist/view-manager/ViewHandler.d.ts.map +1 -1
  46. package/dist/view-manager/ViewHandler.js +204 -122
  47. package/dist/view-manager/ViewHandler.js.map +1 -1
  48. package/package.json +4 -4
@@ -1 +1 @@
1
- (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();const nt=!1,it=(s,e)=>s===e,rt=Symbol("solid-track"),ce={equals:it};let Ge=Xe;const H=1,de=2,Ye={owned:null,cleanups:null,context:null,owner:null},Le={};var P=null;let Oe=null,at=null,$=null,E=null,M=null,we=0;function re(s,e){const t=$,n=P,i=s.length===0,r=e===void 0?n:e,o=i?Ye:{owned:null,cleanups:null,context:r?r.context:null,owner:r},a=i?s:()=>s(()=>B(()=>oe(o)));P=o,$=null;try{return z(a,!0)}finally{$=t,P=n}}function j(s,e){e=e?Object.assign({},ce,e):ce;const t={value:s,observers:null,observerSlots:null,comparator:e.equals||void 0},n=i=>(typeof i=="function"&&(i=i(t.value)),Ze(t,i));return[_e.bind(t),n]}function ot(s,e,t){const n=Se(s,e,!0,H);ee(n)}function Z(s,e,t){const n=Se(s,e,!1,H);ee(n)}function qe(s,e,t){Ge=pt;const n=Se(s,e,!1,H);n.user=!0,M?M.push(n):ee(n)}function X(s,e,t){t=t?Object.assign({},ce,t):ce;const n=Se(s,e,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=t.equals||void 0,ee(n),_e.bind(n)}function lt(s){return s&&typeof s=="object"&&"then"in s}function ut(s,e,t){let n,i,r;n=!0,i=s,r={};let o=null,a=Le,l=!1,u="initialValue"in r,c=typeof n=="function"&&X(n);const d=new Set,[f,h]=(r.storage||j)(r.initialValue),[p,g]=j(void 0),[x,O]=j(void 0,{equals:!1}),[w,N]=j(u?"ready":"unresolved");function b(k,v,R,y){return o===k&&(o=null,y!==void 0&&(u=!0),(k===a||v===a)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(y,{value:v})),a=Le,S(v,R)),v}function S(k,v){z(()=>{v===void 0&&h(()=>k),N(v!==void 0?"errored":u?"ready":"unresolved"),g(v);for(const R of d.keys())R.decrement();d.clear()},!1)}function C(){const k=dt,v=f(),R=p();if(R!==void 0&&!o)throw R;return $&&$.user,v}function L(k=!0){if(k!==!1&&l)return;l=!1;const v=c?c():n;if(v==null||v===!1){b(o,B(f));return}let R;const y=a!==Le?a:B(()=>{try{return i(v,{value:f(),refetching:k})}catch(A){R=A}});if(R!==void 0){b(o,void 0,fe(R),v);return}else if(!lt(y))return b(o,y,void 0,v),y;return o=y,"v"in y?(y.s===1?b(o,y.v,void 0,v):b(o,void 0,fe(y.v),v),y):(l=!0,queueMicrotask(()=>l=!1),z(()=>{N(u?"refreshing":"pending"),O()},!1),y.then(A=>b(y,A,void 0,v),A=>b(y,void 0,fe(A),v)))}Object.defineProperties(C,{state:{get:()=>w()},error:{get:()=>p()},loading:{get(){const k=w();return k==="pending"||k==="refreshing"}},latest:{get(){if(!u)return C();const k=p();if(k&&!o)throw k;return f()}}});let D=P;return c?ot(()=>(D=P,L(!1))):L(!1),[C,{refetch:k=>ct(D,()=>L(k)),mutate:h}]}function B(s){if($===null)return s();const e=$;$=null;try{return s()}finally{$=e}}function ft(s){qe(()=>B(s))}function Re(s){return P===null||(P.cleanups===null?P.cleanups=[s]:P.cleanups.push(s)),s}function ct(s,e){const t=P,n=$;P=s,$=null;try{return z(e,!0)}catch(i){Ae(i)}finally{P=t,$=n}}const[cs,ds]=j(!1);let dt;function _e(){if(this.sources&&this.state)if(this.state===H)ee(this);else{const s=E;E=null,z(()=>ge(this),!1),E=s}if($){const s=this.observers?this.observers.length:0;$.sources?($.sources.push(this),$.sourceSlots.push(s)):($.sources=[this],$.sourceSlots=[s]),this.observers?(this.observers.push($),this.observerSlots.push($.sources.length-1)):(this.observers=[$],this.observerSlots=[$.sources.length-1])}return this.value}function Ze(s,e,t){let n=s.value;return(!s.comparator||!s.comparator(n,e))&&(s.value=e,s.observers&&s.observers.length&&z(()=>{for(let i=0;i<s.observers.length;i+=1){const r=s.observers[i],o=Oe&&Oe.running;o&&Oe.disposed.has(r),(o?!r.tState:!r.state)&&(r.pure?E.push(r):M.push(r),r.observers&&et(r)),o||(r.state=H)}if(E.length>1e6)throw E=[],new Error},!1)),e}function ee(s){if(!s.fn)return;oe(s);const e=we;ht(s,s.value,e)}function ht(s,e,t){let n;const i=P,r=$;$=P=s;try{n=s.fn(e)}catch(o){return s.pure&&(s.state=H,s.owned&&s.owned.forEach(oe),s.owned=null),s.updatedAt=t+1,Ae(o)}finally{$=r,P=i}(!s.updatedAt||s.updatedAt<=t)&&(s.updatedAt!=null&&"observers"in s?Ze(s,n):s.value=n,s.updatedAt=t)}function Se(s,e,t,n=H,i){const r={fn:s,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:P,context:P?P.context:null,pure:t};return P===null||P!==Ye&&(P.owned?P.owned.push(r):P.owned=[r]),r}function he(s){if(s.state===0)return;if(s.state===de)return ge(s);if(s.suspense&&B(s.suspense.inFallback))return s.suspense.effects.push(s);const e=[s];for(;(s=s.owner)&&(!s.updatedAt||s.updatedAt<we);)s.state&&e.push(s);for(let t=e.length-1;t>=0;t--)if(s=e[t],s.state===H)ee(s);else if(s.state===de){const n=E;E=null,z(()=>ge(s,e[0]),!1),E=n}}function z(s,e){if(E)return s();let t=!1;e||(E=[]),M?t=!0:M=[],we++;try{const n=s();return gt(t),n}catch(n){t||(M=null),E=null,Ae(n)}}function gt(s){if(E&&(Xe(E),E=null),s)return;const e=M;M=null,e.length&&z(()=>Ge(e),!1)}function Xe(s){for(let e=0;e<s.length;e++)he(s[e])}function pt(s){let e,t=0;for(e=0;e<s.length;e++){const n=s[e];n.user?s[t++]=n:he(n)}for(e=0;e<t;e++)he(s[e])}function ge(s,e){s.state=0;for(let t=0;t<s.sources.length;t+=1){const n=s.sources[t];if(n.sources){const i=n.state;i===H?n!==e&&(!n.updatedAt||n.updatedAt<we)&&he(n):i===de&&ge(n,e)}}}function et(s){for(let e=0;e<s.observers.length;e+=1){const t=s.observers[e];t.state||(t.state=de,t.pure?E.push(t):M.push(t),t.observers&&et(t))}}function oe(s){let e;if(s.sources)for(;s.sources.length;){const t=s.sources.pop(),n=s.sourceSlots.pop(),i=t.observers;if(i&&i.length){const r=i.pop(),o=t.observerSlots.pop();n<i.length&&(r.sourceSlots[o]=n,i[n]=r,t.observerSlots[n]=o)}}if(s.tOwned){for(e=s.tOwned.length-1;e>=0;e--)oe(s.tOwned[e]);delete s.tOwned}if(s.owned){for(e=s.owned.length-1;e>=0;e--)oe(s.owned[e]);s.owned=null}if(s.cleanups){for(e=s.cleanups.length-1;e>=0;e--)s.cleanups[e]();s.cleanups=null}s.state=0}function fe(s){return s instanceof Error?s:new Error(typeof s=="string"?s:"Unknown error",{cause:s})}function Ae(s,e=P){throw fe(s)}const mt=Symbol("fallback");function Ie(s){for(let e=0;e<s.length;e++)s[e]()}function bt(s,e,t={}){let n=[],i=[],r=[],o=0,a=e.length>1?[]:null;return Re(()=>Ie(r)),()=>{let l=s()||[],u=l.length,c,d;return l[rt],B(()=>{let h,p,g,x,O,w,N,b,S;if(u===0)o!==0&&(Ie(r),r=[],n=[],i=[],o=0,a&&(a=[])),t.fallback&&(n=[mt],i[0]=re(C=>(r[0]=C,t.fallback())),o=1);else if(o===0){for(i=new Array(u),d=0;d<u;d++)n[d]=l[d],i[d]=re(f);o=u}else{for(g=new Array(u),x=new Array(u),a&&(O=new Array(u)),w=0,N=Math.min(o,u);w<N&&n[w]===l[w];w++);for(N=o-1,b=u-1;N>=w&&b>=w&&n[N]===l[b];N--,b--)g[b]=i[N],x[b]=r[N],a&&(O[b]=a[N]);for(h=new Map,p=new Array(b+1),d=b;d>=w;d--)S=l[d],c=h.get(S),p[d]=c===void 0?-1:c,h.set(S,d);for(c=w;c<=N;c++)S=n[c],d=h.get(S),d!==void 0&&d!==-1?(g[d]=i[c],x[d]=r[c],a&&(O[d]=a[c]),d=p[d],h.set(S,d)):r[c]();for(d=w;d<u;d++)d in g?(i[d]=g[d],r[d]=x[d],a&&(a[d]=O[d],a[d](d))):i[d]=re(f);i=i.slice(0,o=u),n=l.slice(0)}return i});function f(h){if(r[d]=h,a){const[p,g]=j(d);return a[d]=g,e(l[d],p)}return e(l[d])}}}function ie(s,e){return B(()=>s(e||{}))}const yt=s=>`Stale read from <${s}>.`;function xt(s){const e="fallback"in s&&{fallback:()=>s.fallback};return X(bt(()=>s.each,s.children,e||void 0))}function Ce(s){const e=s.keyed,t=X(()=>s.when,void 0,void 0),n=e?t:X(t,void 0,{equals:(i,r)=>!i==!r});return X(()=>{const i=n();if(i){const r=s.children;return typeof r=="function"&&r.length>0?B(()=>r(e?i:()=>{if(!B(n))throw yt("Show");return t()})):r}return s.fallback},void 0,void 0)}const wt=s=>X(()=>s());function St(s,e,t){let n=t.length,i=e.length,r=n,o=0,a=0,l=e[i-1].nextSibling,u=null;for(;o<i||a<r;){if(e[o]===t[a]){o++,a++;continue}for(;e[i-1]===t[r-1];)i--,r--;if(i===o){const c=r<n?a?t[a-1].nextSibling:t[r-a]:l;for(;a<r;)s.insertBefore(t[a++],c)}else if(r===a)for(;o<i;)(!u||!u.has(e[o]))&&e[o].remove(),o++;else if(e[o]===t[r-1]&&t[a]===e[i-1]){const c=e[--i].nextSibling;s.insertBefore(t[a++],e[o++].nextSibling),s.insertBefore(t[--r],c),e[i]=t[r]}else{if(!u){u=new Map;let d=a;for(;d<r;)u.set(t[d],d++)}const c=u.get(e[o]);if(c!=null)if(a<c&&c<r){let d=o,f=1,h;for(;++d<i&&d<r&&!((h=u.get(e[d]))==null||h!==c+f);)f++;if(f>c-a){const p=e[o];for(;a<c;)s.insertBefore(t[a++],p)}else s.replaceChild(t[a++],e[o++])}else o++;else e[o++].remove()}}}const Fe="_$DX_DELEGATE";function vt(s,e,t,n={}){let i;return re(r=>{i=r,e===document?s():F(e,s(),e.firstChild?null:void 0,t)},n.owner),()=>{i(),e.textContent=""}}function te(s,e,t,n){let i;const r=()=>{const a=document.createElement("template");return a.innerHTML=s,a.content.firstChild},o=()=>(i||(i=r())).cloneNode(!0);return o.cloneNode=o,o}function Lt(s,e=window.document){const t=e[Fe]||(e[Fe]=new Set);for(let n=0,i=s.length;n<i;n++){const r=s[n];t.has(r)||(t.add(r),e.addEventListener(r,Ct))}}function Ot(s,e,t){t==null?s.removeAttribute(e):s.setAttribute(e,t)}function F(s,e,t,n){if(t!==void 0&&!n&&(n=[]),typeof e!="function")return pe(s,e,n,t);Z(i=>pe(s,e(),i,t),n)}function Ct(s){let e=s.target;const t=`$$${s.type}`,n=s.target,i=s.currentTarget,r=l=>Object.defineProperty(s,"target",{configurable:!0,value:l}),o=()=>{const l=e[t];if(l&&!e.disabled){const u=e[`${t}Data`];if(u!==void 0?l.call(e,u,s):l.call(e,s),s.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(s.target)&&r(e.host),!0},a=()=>{for(;o()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(s,"currentTarget",{configurable:!0,get(){return e||document}}),s.composedPath){const l=s.composedPath();r(l[0]);for(let u=0;u<l.length-2&&(e=l[u],!!o());u++){if(e._$host){e=e._$host,a();break}if(e.parentNode===i)break}}else a();r(n)}function pe(s,e,t,n,i){for(;typeof t=="function";)t=t();if(e===t)return t;const r=typeof e,o=n!==void 0;if(s=o&&t[0]&&t[0].parentNode||s,r==="string"||r==="number"){if(r==="number"&&(e=e.toString(),e===t))return t;if(o){let a=t[0];a&&a.nodeType===3?a.data!==e&&(a.data=e):a=document.createTextNode(e),t=Y(s,t,n,a)}else t!==""&&typeof t=="string"?t=s.firstChild.data=e:t=s.textContent=e}else if(e==null||r==="boolean")t=Y(s,t,n);else{if(r==="function")return Z(()=>{let a=e();for(;typeof a=="function";)a=a();t=pe(s,a,t,n)}),()=>t;if(Array.isArray(e)){const a=[],l=t&&Array.isArray(t);if(Ne(a,e,t,i))return Z(()=>t=pe(s,a,t,n,!0)),()=>t;if(a.length===0){if(t=Y(s,t,n),o)return t}else l?t.length===0?Te(s,a,n):St(s,t,a):(t&&Y(s),Te(s,a));t=a}else if(e.nodeType){if(Array.isArray(t)){if(o)return t=Y(s,t,n,e);Y(s,t,null,e)}else t==null||t===""||!s.firstChild?s.appendChild(e):s.replaceChild(e,s.firstChild);t=e}}return t}function Ne(s,e,t,n){let i=!1;for(let r=0,o=e.length;r<o;r++){let a=e[r],l=t&&t[s.length],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)s.push(a);else if(Array.isArray(a))i=Ne(s,a,l)||i;else if(u==="function")if(n){for(;typeof a=="function";)a=a();i=Ne(s,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else s.push(a),i=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?s.push(l):s.push(document.createTextNode(c))}}return i}function Te(s,e,t=null){for(let n=0,i=e.length;n<i;n++)s.insertBefore(e[n],t)}function Y(s,e,t,n){if(t===void 0)return s.textContent="";const i=n||document.createTextNode("");if(e.length){let r=!1;for(let o=e.length-1;o>=0;o--){const a=e[o];if(i!==a){const l=a.parentNode===s;!r&&!o?l?s.replaceChild(i,a):s.insertBefore(i,t):l&&a.remove()}else r=!0}}else s.insertBefore(i,t);return[i]}const m=s=>typeof s=="string",ne=()=>{let s,e;const t=new Promise((n,i)=>{s=n,e=i});return t.resolve=s,t.reject=e,t},je=s=>s==null?"":""+s,$t=(s,e,t)=>{s.forEach(n=>{e[n]&&(t[n]=e[n])})},Pt=/###/g,Ue=s=>s&&s.indexOf("###")>-1?s.replace(Pt,"."):s,Ve=s=>!s||m(s),ae=(s,e,t)=>{const n=m(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Ve(s))return{};const r=Ue(n[i]);!s[r]&&t&&(s[r]=new t),Object.prototype.hasOwnProperty.call(s,r)?s=s[r]:s={},++i}return Ve(s)?{}:{obj:s,k:Ue(n[i])}},De=(s,e,t)=>{const{obj:n,k:i}=ae(s,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let r=e[e.length-1],o=e.slice(0,e.length-1),a=ae(s,o,Object);for(;a.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),a=ae(s,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${r}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${r}`]=t},Nt=(s,e,t,n)=>{const{obj:i,k:r}=ae(s,e,Object);i[r]=i[r]||[],i[r].push(t)},me=(s,e)=>{const{obj:t,k:n}=ae(s,e);if(t)return t[n]},kt=(s,e,t)=>{const n=me(s,t);return n!==void 0?n:me(e,t)},tt=(s,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in s?m(s[n])||s[n]instanceof String||m(e[n])||e[n]instanceof String?t&&(s[n]=e[n]):tt(s[n],e[n],t):s[n]=e[n]);return s},q=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const At=s=>m(s)?s.replace(/[&<>"'\/]/g,e=>Rt[e]):s;class Et{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const It=[" ",",","?","!",";"],Ft=new Et(20),Tt=(s,e,t)=>{e=e||"",t=t||"";const n=It.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const i=Ft.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(s);if(!r){const o=s.indexOf(t);o>0&&!i.test(s.substring(0,o))&&(r=!0)}return r},ke=function(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!s)return;if(s[e])return s[e];const n=e.split(t);let i=s;for(let r=0;r<n.length;){if(!i||typeof i!="object")return;let o,a="";for(let l=r;l<n.length;++l)if(l!==r&&(a+=t),a+=n[l],o=i[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;r+=l-r+1;break}i=o}return i},be=s=>s&&s.replace("_","-"),jt={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,e){console&&console[s]&&console[s].apply(console,e)}};class ye{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||jt,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(m(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ye(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ye(this.logger,e)}}var K=new ye;class ve{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a.apply(a,[e,...n])})}}class Ke extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,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 t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):m(n)&&r?a.push(...n.split(r)):a.push(n)));const l=me(this.data,a);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),l||!o||!m(n)?l:ke(this.data&&this.data[e]&&this.data[e][t],n,r)}addResource(e,t,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),De(this.data,a,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(m(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=t,t=a[1]),this.addNamespaces(t);let l=me(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?tt(l,n,r):l={...l,...n},De(this.data,a,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var st={processors:{},addPostProcessor(s){this.processors[s.name]=s},handle(s,e,t,n,i){return s.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,n,i))}),e}};const Me={};class xe extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),$t(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=K.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Tt(e,n,i);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:m(r)?[r]:r};const u=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:m(r)?[r]:r}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const b=t.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${b}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${b}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:o}const d=this.resolve(e,t);let f=d&&d.res;const h=d&&d.usedKey||o,p=d&&d.exactUsedKey||o,g=Object.prototype.toString.apply(f),x=["[object Number]","[object Function]","[object RegExp]"],O=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,N=!m(f)&&typeof f!="boolean"&&typeof f!="number";if(w&&f&&N&&x.indexOf(g)<0&&!(m(O)&&Array.isArray(f))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,f,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(d.res=b,d.usedParams=this.getUsedParamsDetails(t),d):b}if(r){const b=Array.isArray(f),S=b?[]:{},C=b?p:h;for(const L in f)if(Object.prototype.hasOwnProperty.call(f,L)){const D=`${C}${r}${L}`;S[L]=this.translate(D,{...t,joinArrays:!1,ns:a}),S[L]===D&&(S[L]=f[L])}f=S}}else if(w&&m(O)&&Array.isArray(f))f=f.join(O),f&&(f=this.extendTranslation(f,e,t,n));else{let b=!1,S=!1;const C=t.count!==void 0&&!m(t.count),L=xe.hasDefaultValue(t),D=C?this.pluralResolver.getSuffix(u,t.count,t):"",k=t.ordinal&&C?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",v=C&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),R=v&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${D}`]||t[`defaultValue${k}`]||t.defaultValue;!this.isValidLookup(f)&&L&&(b=!0,f=R),this.isValidLookup(f)||(S=!0,f=o);const A=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:f,V=L&&R!==f&&this.options.updateMissing;if(S||b||V){if(this.logger.log(V?"updateKey":"missingKey",u,l,o,V?R:f),r){const T=this.resolve(o,{...t,keySeparator:!1});T&&T.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 J=[];const Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let T=0;T<Q.length;T++)J.push(Q[T]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(t.lng||this.language):J.push(t.lng||this.language);const G=(T,W,se)=>{const Ee=L&&se!==f?se:A;this.options.missingKeyHandler?this.options.missingKeyHandler(T,l,W,Ee,V,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(T,l,W,Ee,V,t),this.emit("missingKey",T,l,W,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?J.forEach(T=>{const W=this.pluralResolver.getSuffixes(T,t);v&&t[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(se=>{G([T],o+se,t[`defaultValue${se}`]||R)})}):G(J,o,R))}f=this.extendTranslation(f,e,t,d,n),S&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${o}`),(S||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,b?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(t),d):f}extendTranslation(e,t,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=m(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=n.replace&&!m(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||i.usedLng,n),u){const f=e.match(this.interpolator.nestingRegexp),h=f&&f.length;c<h&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return r&&r[0]===h[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):o.translate(...h,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,l=m(a)?[a]:a;return e!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(e=st.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,o,a;return m(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,t),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=t.count!==void 0&&!m(t.count),h=f&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),p=t.context!==void 0&&(m(t.context)||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(x=>{this.isValidLookup(n)||(a=x,!Me[`${g[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Me[`${g[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(O=>{if(this.isValidLookup(n))return;o=O;const w=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,c,O,x,t);else{let b;f&&(b=this.pluralResolver.getSuffix(O,t.count,t));const S=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(c+b),t.ordinal&&b.indexOf(C)===0&&w.push(c+b.replace(C,this.options.pluralSeparator)),h&&w.push(c+S)),p){const L=`${c}${this.options.contextSeparator}${t.context}`;w.push(L),f&&(w.push(L+b),t.ordinal&&b.indexOf(C)===0&&w.push(L+b.replace(C,this.options.pluralSeparator)),h&&w.push(L+S))}}let N;for(;N=w.pop();)this.isValidLookup(n)||(r=N,n=this.getResource(O,x,N,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!m(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}const $e=s=>s.charAt(0).toUpperCase()+s.slice(1);class Be{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=K.create("languageUtils")}getScriptPartFromCode(e){if(e=be(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=be(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(m(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=$e(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=$e(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=$e(n[2].toLowerCase()))),n.join("-")}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 t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),m(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return m(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):m(e)&&r(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}let Ut=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Vt={1:s=>+(s>1),2:s=>+(s!=1),3:s=>0,4:s=>s%10==1&&s%100!=11?0:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?1:2,5:s=>s==0?0:s==1?1:s==2?2:s%100>=3&&s%100<=10?3:s%100>=11?4:5,6:s=>s==1?0:s>=2&&s<=4?1:2,7:s=>s==1?0:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?1:2,8:s=>s==1?0:s==2?1:s!=8&&s!=11?2:3,9:s=>+(s>=2),10:s=>s==1?0:s==2?1:s<7?2:s<11?3:4,11:s=>s==1||s==11?0:s==2||s==12?1:s>2&&s<20?2:3,12:s=>+(s%10!=1||s%100==11),13:s=>+(s!==0),14:s=>s==1?0:s==2?1:s==3?2:3,15:s=>s%10==1&&s%100!=11?0:s%10>=2&&(s%100<10||s%100>=20)?1:2,16:s=>s%10==1&&s%100!=11?0:s!==0?1:2,17:s=>s==1||s%10==1&&s%100!=11?0:1,18:s=>s==0?0:s==1?1:2,19:s=>s==1?0:s==0||s%100>1&&s%100<11?1:s%100>10&&s%100<20?2:3,20:s=>s==1?0:s==0||s%100>0&&s%100<20?1:2,21:s=>s%100==1?1:s%100==2?2:s%100==3||s%100==4?3:0,22:s=>s==1?0:s==2?1:(s<0||s>10)&&s%10==0?2:3};const Dt=["v1","v2","v3"],Kt=["v4"],He={zero:0,one:1,two:2,few:3,many:4,other:5},Mt=()=>{const s={};return Ut.forEach(e=>{e.lngs.forEach(t=>{s[t]={numbers:e.nr,plurals:Vt[e.fc]}})}),s};class Bt{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=K.create("pluralResolver"),(!this.options.compatibilityJSON||Kt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Mt(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const n=be(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[r]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>He[i]-He[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Dt.includes(this.options.compatibilityJSON)}}const ze=function(s,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=kt(s,e,t);return!r&&i&&m(t)&&(r=ke(s,t,n),r===void 0&&(r=ke(e,t,n))),r},Pe=s=>s.replace(/\$/g,"$$$$");class Ht{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=K.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:O,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:At,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?q(r):o||"{{",this.suffix=a?q(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?q(f):h||q("$t("),this.nestingSuffix=p?q(p):g||q(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=O||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>t&&t.source===n?(t.lastIndex=0,t):new RegExp(n,"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,t,n,i){let r,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const O=ze(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,n,{...i,...t,interpolationkey:h}):O}const p=h.split(this.formatSeparator),g=p.shift().trim(),x=p.join(this.formatSeparator).trim();return this.format(ze(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),x,n,{...i,...t,interpolationkey:g})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Pe(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Pe(this.escape(h)):Pe(h)}].forEach(h=>{for(a=0;r=h.regex.exec(e);){const p=r[1].trim();if(o=u(p),o===void 0)if(typeof c=="function"){const x=c(e,r,i);o=m(x)?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(d){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),o="";else!m(o)&&!this.useRawValueToEscape&&(o=je(o));const g=h.safeValue(o);if(e=e.replace(r[0],g),d?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=r[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,o);const h=f.match(/'/g),p=f.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!m(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(r=t(a.call(this,i[1].trim(),o),o),r&&i[0]===e&&!m(r))return r;m(r)||(r=je(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((c,d)=>this.format(c,d,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const zt=s=>{let e=s.toLowerCase().trim();const t={};if(s.indexOf("(")>-1){const n=s.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},_=s=>{const e={};return(t,n,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=n+JSON.stringify(r);let a=e[o];return a||(a=s(be(n),i),e[o]=a),a(t)}};class Jt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=K.create("formatter"),this.options=e,this.formats={number:_((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return r=>i.format(r)}),currency:_((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return r=>i.format(r)}),datetime:_((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return r=>i.format(r)}),relativetime:_((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return r=>i.format(r,n.range||"day")}),list:_((t,n)=>{const i=new Intl.ListFormat(t,{...n});return r=>i.format(r)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(a=>a.indexOf(")")>-1)){const a=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,a)].join(this.formatSeparator)}return r.reduce((a,l)=>{const{formatName:u,formatOptions:c}=zt(l);if(this.formats[u]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=f.locale||f.lng||i.locale||i.lng||n;d=this.formats[u](a,h,{...c,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}const Wt=(s,e)=>{s.pending[e]!==void 0&&(delete s.pending[e],s.pendingCount--)};class Qt extends ve{constructor(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=K.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,t,n,i){const r={},o={},a={},l={};return e.forEach(u=>{let c=!0;t.forEach(d=>{const f=`${u}|${d}`;!n.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),r[f]===void 0&&(r[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(l=>{Nt(l.loaded,[r],o),Wt(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,r*2,o)},r);return}o(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,t,a)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();m(e)&&(e=this.languageUtils.toResolveHierarchy(e)),m(t)&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,n,i,l):c=u(e,t,n,i),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else u(e,t,n,i,a,l)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const Je=()=>({debug:!1,initImmediate:!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:s=>{let e={};if(typeof s[1]=="object"&&(e=s[1]),m(s[1])&&(e.defaultValue=s[1]),m(s[2])&&(e.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const t=s[3]||s[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:s=>s,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),We=s=>(m(s.ns)&&(s.ns=[s.ns]),m(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),m(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),s.supportedLngs&&s.supportedLngs.indexOf("cimode")<0&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),s),ue=()=>{},Gt=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(t=>{typeof s[t]=="function"&&(s[t]=s[t].bind(s))})};class le extends ve{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=We(e),this.services={},this.logger=K,this.modules={external:[]},Gt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(m(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Je();this.options={...i,...this.options,...We(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const r=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?K.init(r(this.modules.logger),this.options):K.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Jt);const d=new Be(this.options);this.store=new Ke(this.options.resources,this.options);const f=this.services;f.logger=K,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Bt(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=r(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Ht(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Qt(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),x=1;x<p;x++)g[x-1]=arguments[x];e.emit(h,...g)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new xe(this.services,this.options),this.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),x=1;x<p;x++)g[x-1]=arguments[x];e.emit(h,...g)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ue),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=ne(),u=()=>{const c=(d,f)=>{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),l.resolve(f),n(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;const i=m(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const r=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(r,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){const i=ne();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ue),this.services.backendConnector.reload(e,t,r=>{i.resolve(),n(r)}),i}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"&&st.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 t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=ne();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(l,function(){return n.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=m(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,n){var i=this;const r=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=i.options.overloadTranslationOptionHandler([o,a].concat(c))}else l={...a};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||r.keyPrefix);const f=i.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(o)?h=o.map(p=>`${l.keyPrefix}${f}${p}`):h=l.keyPrefix?`${l.keyPrefix}${f}${o}`:o,i.t(h,l)};return m(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};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 n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(r,e)))}loadNamespaces(e,t){const n=ne();return this.options.ns?(m(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ne();m(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["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"],n=this.services&&this.services.languageUtils||new Be(Je());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new le(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new le(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new Ke(this.store.data,i),r.services.resourceStore=r.store),r.translator=new xe(r.services,i),r.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];r.emit(a,...u)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const I=le.createInstance();I.createInstance=le.createInstance;I.createInstance;I.dir;I.init;I.loadResources;I.reloadResources;I.use;I.changeLanguage;I.getFixedT;I.t;I.exists;I.setDefaultNamespace;I.hasLoadedNamespace;I.loadNamespaces;I.loadLanguages;async function Yt(s={}){const e=I.createInstance(),t=s.resources||{};return await e.init({lng:"en",fallbackLng:s.fallbackLng||"en",debug:s.debug||!1,resources:t,interpolation:{escapeValue:!1},partialBundledLanguages:!0}),e}async function qt(s,e){try{const t=window.edenAPI;if(!t)return;const n=await t.shellCommand("i18n/get-common",{locale:e});n?.translations&&s.addResourceBundle(e,"translation",n.translations,!0,!0)}catch(t){console.error("Failed to load common translations",t)}}function _t(s={}){return re(()=>{const[e,t]=j("en"),[n]=ut(async()=>await Yt(s)),i=((a,l)=>{const u=n();return u?u.t(a,{lng:e(),...l}):a}),r=async a=>{const l=n();l&&(await qt(l,a),await l.changeLanguage(a)),t(a)};return{t:i,locale:e,setLocale:t,initLocale:async()=>{try{const a=window.edenAPI;if(!a){console.warn("Eden API not found, using default locale");return}const l=c=>{r(c.locale)};Re(()=>{a.unsubscribe("i18n/locale-changed",l)});const u=await a.shellCommand("i18n/get-locale",{});u?.locale&&await r(u.locale),await a.subscribe("i18n/locale-changed",l)}catch(a){console.error("Failed to load system locale",a)}}}})}const Zt={login:{signIn:"Sign in",subtitle:"Choose a user and enter the password to continue.",loadingUsers:"Loading users...",noUsersAvailable:"No users available.",enterPassword:"Enter password",signingIn:"Signing in...",loginFailed:"Login failed.",failedToLoadUsers:"Failed to load users."}},Xt={login:{signIn:"Zaloguj się",subtitle:"Wybierz użytkownika i wprowadź hasło, aby kontynuować.",loadingUsers:"Ładowanie użytkowników...",noUsersAvailable:"Brak dostępnych użytkowników.",enterPassword:"Wpisz hasło",signingIn:"Logowanie...",loginFailed:"Logowanie nie powiodło się.",failedToLoadUsers:"Nie udało się załadować użytkowników."}},es={en:{translation:Zt},pl:{translation:Xt}},{t:U,locale:hs,setLocale:gs,initLocale:ts}=_t({resources:es});var ss=te('<div class="user-error eden-text-sm">'),ns=te('<div class="eden-grid eden-grid-2 eden-gap-lg user-login-grid"><div class="eden-flex eden-flex-col eden-gap-sm"><ul class="eden-list user-list"></ul></div><div class="eden-flex eden-flex-col eden-gap-sm login-form-container"><label class="eden-text-sm eden-text-secondary"for=password></label><input id=password class=eden-input type=password><button type=button class="eden-btn eden-btn-primary">'),is=te('<div class="login-root eden-flex eden-flex-center"><div class="login-card eden-glass-strong eden-rounded-xl eden-p-lg"><div class="eden-flex eden-flex-col eden-gap-md"><header class="eden-flex eden-flex-col eden-gap-xs"><h2 class="eden-text-2xl eden-font-semibold"></h2><p class="eden-text-sm eden-text-secondary">'),rs=te('<div class="eden-flex eden-flex-center eden-gap-sm"><div class=eden-loading-spinner></div><span class="eden-text-sm eden-text-secondary">'),as=te('<div class="eden-flex eden-flex-col eden-gap-sm"><span class="eden-text-sm eden-text-secondary"></span><button type=button class="eden-btn eden-btn-secondary">'),os=te('<li class="eden-list-item eden-list-item-interactive"role=button tabindex=0><div class="eden-avatar eden-avatar-md"></div><div class=eden-list-item-content><div class=eden-list-item-title>');const ls="com.eden.login",us=s=>s.trim().split(/\s+/).map(n=>n[0]).join("").slice(0,2).toUpperCase(),fs=()=>{const[s,e]=j([]),[t,n]=j(null),[i,r]=j(""),[o,a]=j(null),[l,u]=j(!0),[c,d]=j(!1),f=async g=>{const{windowSize:x}=g,O={x:0,y:0,width:x.width,height:x.height};try{await window.edenAPI.shellCommand("view/update-view-bounds",{appId:ls,bounds:O})}catch(w){console.error("Failed to update view bounds:",w)}},h=async()=>{u(!0),a(null);try{const g=await window.edenAPI.shellCommand("user/list",{});e(g.users??[])}catch(g){console.error("Failed to load users:",g),a(U("login.failedToLoadUsers"))}finally{u(!1)}};ft(()=>{Re(()=>{window.edenAPI.unsubscribe("view/global-bounds-changed",f)}),(async()=>{await ts(),h();try{const g=await window.edenAPI.shellCommand("view/window-size",{});await f({windowSize:g})}catch(g){console.error("Failed to get initial window size:",g)}try{await window.edenAPI.subscribe("view/global-bounds-changed",f)}catch(g){console.error("Failed to subscribe to bounds change:",g)}})()}),qe(()=>{if(t())return;const g=s()[0]?.username??null;n(g)});const p=async()=>{if(!(!t()||!i()||c())){d(!0),a(null);try{const g=await window.edenAPI.shellCommand("user/login",{username:t(),password:i()});g.success?r(""):a(g.error??U("login.loginFailed"))}catch(g){console.error("Login failed:",g),a(U("login.loginFailed"))}finally{d(!1)}}};return(()=>{var g=is(),x=g.firstChild,O=x.firstChild,w=O.firstChild,N=w.firstChild,b=N.nextSibling;return F(N,()=>U("login.signIn")),F(b,()=>U("login.subtitle")),F(O,ie(Ce,{get when(){return!l()},get fallback(){return(()=>{var S=rs(),C=S.firstChild,L=C.nextSibling;return F(L,()=>U("login.loadingUsers")),S})()},get children(){return ie(Ce,{get when(){return s().length>0},get fallback(){return(()=>{var S=as(),C=S.firstChild,L=C.nextSibling;return F(C,()=>U("login.noUsersAvailable")),L.$$click=h,F(L,()=>U("common.retry")),S})()},get children(){var S=ns(),C=S.firstChild,L=C.firstChild,D=C.nextSibling,k=D.firstChild,v=k.nextSibling,R=v.nextSibling;return F(L,ie(xt,{get each(){return s()},children:y=>(()=>{var A=os(),V=A.firstChild,J=V.nextSibling,Q=J.firstChild;return A.$$keydown=G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),n(y.username),a(null))},A.$$click=()=>{n(y.username),a(null)},F(V,()=>us(y.name)),F(Q,()=>y.name),Z(()=>A.classList.toggle("eden-list-item-active",t()===y.username)),A})()})),F(k,()=>U("common.password")),v.$$keydown=y=>{y.key==="Enter"&&p()},v.$$input=y=>r(y.currentTarget.value),F(D,ie(Ce,{get when(){return o()},get children(){var y=ss();return F(y,o),y}}),R),R.$$click=p,F(R,(()=>{var y=wt(()=>!!c());return()=>y()?U("login.signingIn"):U("login.signIn")})()),Z(y=>{var A=U("login.enterPassword"),V=c()||!i()||!t();return A!==y.e&&Ot(v,"placeholder",y.e=A),V!==y.t&&(R.disabled=y.t=V),y},{e:void 0,t:void 0}),Z(()=>v.value=i()),S}})}}),null),g})()};Lt(["input","keydown","click"]);const Qe=document.getElementById("root");Qe&&vt(()=>ie(fs,{}),Qe);
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const r={};return i.integrity&&(r.integrity=i.integrity),i.referrerPolicy&&(r.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?r.credentials="include":i.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();const nt=!1,it=(s,e)=>s===e,rt=Symbol("solid-track"),ce={equals:it};let Ge=Xe;const H=1,de=2,Ye={owned:null,cleanups:null,context:null,owner:null},Le={};var P=null;let Oe=null,at=null,$=null,E=null,M=null,we=0;function re(s,e){const t=$,n=P,i=s.length===0,r=e===void 0?n:e,o=i?Ye:{owned:null,cleanups:null,context:r?r.context:null,owner:r},a=i?s:()=>s(()=>B(()=>oe(o)));P=o,$=null;try{return z(a,!0)}finally{$=t,P=n}}function j(s,e){e=e?Object.assign({},ce,e):ce;const t={value:s,observers:null,observerSlots:null,comparator:e.equals||void 0},n=i=>(typeof i=="function"&&(i=i(t.value)),Ze(t,i));return[_e.bind(t),n]}function ot(s,e,t){const n=Se(s,e,!0,H);ee(n)}function Z(s,e,t){const n=Se(s,e,!1,H);ee(n)}function qe(s,e,t){Ge=pt;const n=Se(s,e,!1,H);n.user=!0,M?M.push(n):ee(n)}function X(s,e,t){t=t?Object.assign({},ce,t):ce;const n=Se(s,e,!0,0);return n.observers=null,n.observerSlots=null,n.comparator=t.equals||void 0,ee(n),_e.bind(n)}function lt(s){return s&&typeof s=="object"&&"then"in s}function ut(s,e,t){let n,i,r;n=!0,i=s,r={};let o=null,a=Le,l=!1,u="initialValue"in r,c=typeof n=="function"&&X(n);const d=new Set,[f,h]=(r.storage||j)(r.initialValue),[p,g]=j(void 0),[x,O]=j(void 0,{equals:!1}),[w,N]=j(u?"ready":"unresolved");function b(k,v,R,y){return o===k&&(o=null,y!==void 0&&(u=!0),(k===a||v===a)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(y,{value:v})),a=Le,S(v,R)),v}function S(k,v){z(()=>{v===void 0&&h(()=>k),N(v!==void 0?"errored":u?"ready":"unresolved"),g(v);for(const R of d.keys())R.decrement();d.clear()},!1)}function C(){const k=dt,v=f(),R=p();if(R!==void 0&&!o)throw R;return $&&$.user,v}function L(k=!0){if(k!==!1&&l)return;l=!1;const v=c?c():n;if(v==null||v===!1){b(o,B(f));return}let R;const y=a!==Le?a:B(()=>{try{return i(v,{value:f(),refetching:k})}catch(A){R=A}});if(R!==void 0){b(o,void 0,fe(R),v);return}else if(!lt(y))return b(o,y,void 0,v),y;return o=y,"v"in y?(y.s===1?b(o,y.v,void 0,v):b(o,void 0,fe(y.v),v),y):(l=!0,queueMicrotask(()=>l=!1),z(()=>{N(u?"refreshing":"pending"),O()},!1),y.then(A=>b(y,A,void 0,v),A=>b(y,void 0,fe(A),v)))}Object.defineProperties(C,{state:{get:()=>w()},error:{get:()=>p()},loading:{get(){const k=w();return k==="pending"||k==="refreshing"}},latest:{get(){if(!u)return C();const k=p();if(k&&!o)throw k;return f()}}});let D=P;return c?ot(()=>(D=P,L(!1))):L(!1),[C,{refetch:k=>ct(D,()=>L(k)),mutate:h}]}function B(s){if($===null)return s();const e=$;$=null;try{return s()}finally{$=e}}function ft(s){qe(()=>B(s))}function Re(s){return P===null||(P.cleanups===null?P.cleanups=[s]:P.cleanups.push(s)),s}function ct(s,e){const t=P,n=$;P=s,$=null;try{return z(e,!0)}catch(i){Ae(i)}finally{P=t,$=n}}const[fs,cs]=j(!1);let dt;function _e(){if(this.sources&&this.state)if(this.state===H)ee(this);else{const s=E;E=null,z(()=>ge(this),!1),E=s}if($){const s=this.observers?this.observers.length:0;$.sources?($.sources.push(this),$.sourceSlots.push(s)):($.sources=[this],$.sourceSlots=[s]),this.observers?(this.observers.push($),this.observerSlots.push($.sources.length-1)):(this.observers=[$],this.observerSlots=[$.sources.length-1])}return this.value}function Ze(s,e,t){let n=s.value;return(!s.comparator||!s.comparator(n,e))&&(s.value=e,s.observers&&s.observers.length&&z(()=>{for(let i=0;i<s.observers.length;i+=1){const r=s.observers[i],o=Oe&&Oe.running;o&&Oe.disposed.has(r),(o?!r.tState:!r.state)&&(r.pure?E.push(r):M.push(r),r.observers&&et(r)),o||(r.state=H)}if(E.length>1e6)throw E=[],new Error},!1)),e}function ee(s){if(!s.fn)return;oe(s);const e=we;ht(s,s.value,e)}function ht(s,e,t){let n;const i=P,r=$;$=P=s;try{n=s.fn(e)}catch(o){return s.pure&&(s.state=H,s.owned&&s.owned.forEach(oe),s.owned=null),s.updatedAt=t+1,Ae(o)}finally{$=r,P=i}(!s.updatedAt||s.updatedAt<=t)&&(s.updatedAt!=null&&"observers"in s?Ze(s,n):s.value=n,s.updatedAt=t)}function Se(s,e,t,n=H,i){const r={fn:s,state:n,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:P,context:P?P.context:null,pure:t};return P===null||P!==Ye&&(P.owned?P.owned.push(r):P.owned=[r]),r}function he(s){if(s.state===0)return;if(s.state===de)return ge(s);if(s.suspense&&B(s.suspense.inFallback))return s.suspense.effects.push(s);const e=[s];for(;(s=s.owner)&&(!s.updatedAt||s.updatedAt<we);)s.state&&e.push(s);for(let t=e.length-1;t>=0;t--)if(s=e[t],s.state===H)ee(s);else if(s.state===de){const n=E;E=null,z(()=>ge(s,e[0]),!1),E=n}}function z(s,e){if(E)return s();let t=!1;e||(E=[]),M?t=!0:M=[],we++;try{const n=s();return gt(t),n}catch(n){t||(M=null),E=null,Ae(n)}}function gt(s){if(E&&(Xe(E),E=null),s)return;const e=M;M=null,e.length&&z(()=>Ge(e),!1)}function Xe(s){for(let e=0;e<s.length;e++)he(s[e])}function pt(s){let e,t=0;for(e=0;e<s.length;e++){const n=s[e];n.user?s[t++]=n:he(n)}for(e=0;e<t;e++)he(s[e])}function ge(s,e){s.state=0;for(let t=0;t<s.sources.length;t+=1){const n=s.sources[t];if(n.sources){const i=n.state;i===H?n!==e&&(!n.updatedAt||n.updatedAt<we)&&he(n):i===de&&ge(n,e)}}}function et(s){for(let e=0;e<s.observers.length;e+=1){const t=s.observers[e];t.state||(t.state=de,t.pure?E.push(t):M.push(t),t.observers&&et(t))}}function oe(s){let e;if(s.sources)for(;s.sources.length;){const t=s.sources.pop(),n=s.sourceSlots.pop(),i=t.observers;if(i&&i.length){const r=i.pop(),o=t.observerSlots.pop();n<i.length&&(r.sourceSlots[o]=n,i[n]=r,t.observerSlots[n]=o)}}if(s.tOwned){for(e=s.tOwned.length-1;e>=0;e--)oe(s.tOwned[e]);delete s.tOwned}if(s.owned){for(e=s.owned.length-1;e>=0;e--)oe(s.owned[e]);s.owned=null}if(s.cleanups){for(e=s.cleanups.length-1;e>=0;e--)s.cleanups[e]();s.cleanups=null}s.state=0}function fe(s){return s instanceof Error?s:new Error(typeof s=="string"?s:"Unknown error",{cause:s})}function Ae(s,e=P){throw fe(s)}const mt=Symbol("fallback");function Ie(s){for(let e=0;e<s.length;e++)s[e]()}function bt(s,e,t={}){let n=[],i=[],r=[],o=0,a=e.length>1?[]:null;return Re(()=>Ie(r)),()=>{let l=s()||[],u=l.length,c,d;return l[rt],B(()=>{let h,p,g,x,O,w,N,b,S;if(u===0)o!==0&&(Ie(r),r=[],n=[],i=[],o=0,a&&(a=[])),t.fallback&&(n=[mt],i[0]=re(C=>(r[0]=C,t.fallback())),o=1);else if(o===0){for(i=new Array(u),d=0;d<u;d++)n[d]=l[d],i[d]=re(f);o=u}else{for(g=new Array(u),x=new Array(u),a&&(O=new Array(u)),w=0,N=Math.min(o,u);w<N&&n[w]===l[w];w++);for(N=o-1,b=u-1;N>=w&&b>=w&&n[N]===l[b];N--,b--)g[b]=i[N],x[b]=r[N],a&&(O[b]=a[N]);for(h=new Map,p=new Array(b+1),d=b;d>=w;d--)S=l[d],c=h.get(S),p[d]=c===void 0?-1:c,h.set(S,d);for(c=w;c<=N;c++)S=n[c],d=h.get(S),d!==void 0&&d!==-1?(g[d]=i[c],x[d]=r[c],a&&(O[d]=a[c]),d=p[d],h.set(S,d)):r[c]();for(d=w;d<u;d++)d in g?(i[d]=g[d],r[d]=x[d],a&&(a[d]=O[d],a[d](d))):i[d]=re(f);i=i.slice(0,o=u),n=l.slice(0)}return i});function f(h){if(r[d]=h,a){const[p,g]=j(d);return a[d]=g,e(l[d],p)}return e(l[d])}}}function ie(s,e){return B(()=>s(e||{}))}const yt=s=>`Stale read from <${s}>.`;function xt(s){const e="fallback"in s&&{fallback:()=>s.fallback};return X(bt(()=>s.each,s.children,e||void 0))}function Ce(s){const e=s.keyed,t=X(()=>s.when,void 0,void 0),n=e?t:X(t,void 0,{equals:(i,r)=>!i==!r});return X(()=>{const i=n();if(i){const r=s.children;return typeof r=="function"&&r.length>0?B(()=>r(e?i:()=>{if(!B(n))throw yt("Show");return t()})):r}return s.fallback},void 0,void 0)}const wt=s=>X(()=>s());function St(s,e,t){let n=t.length,i=e.length,r=n,o=0,a=0,l=e[i-1].nextSibling,u=null;for(;o<i||a<r;){if(e[o]===t[a]){o++,a++;continue}for(;e[i-1]===t[r-1];)i--,r--;if(i===o){const c=r<n?a?t[a-1].nextSibling:t[r-a]:l;for(;a<r;)s.insertBefore(t[a++],c)}else if(r===a)for(;o<i;)(!u||!u.has(e[o]))&&e[o].remove(),o++;else if(e[o]===t[r-1]&&t[a]===e[i-1]){const c=e[--i].nextSibling;s.insertBefore(t[a++],e[o++].nextSibling),s.insertBefore(t[--r],c),e[i]=t[r]}else{if(!u){u=new Map;let d=a;for(;d<r;)u.set(t[d],d++)}const c=u.get(e[o]);if(c!=null)if(a<c&&c<r){let d=o,f=1,h;for(;++d<i&&d<r&&!((h=u.get(e[d]))==null||h!==c+f);)f++;if(f>c-a){const p=e[o];for(;a<c;)s.insertBefore(t[a++],p)}else s.replaceChild(t[a++],e[o++])}else o++;else e[o++].remove()}}}const Fe="_$DX_DELEGATE";function vt(s,e,t,n={}){let i;return re(r=>{i=r,e===document?s():F(e,s(),e.firstChild?null:void 0,t)},n.owner),()=>{i(),e.textContent=""}}function te(s,e,t,n){let i;const r=()=>{const a=document.createElement("template");return a.innerHTML=s,a.content.firstChild},o=()=>(i||(i=r())).cloneNode(!0);return o.cloneNode=o,o}function Lt(s,e=window.document){const t=e[Fe]||(e[Fe]=new Set);for(let n=0,i=s.length;n<i;n++){const r=s[n];t.has(r)||(t.add(r),e.addEventListener(r,Ct))}}function Ot(s,e,t){t==null?s.removeAttribute(e):s.setAttribute(e,t)}function F(s,e,t,n){if(t!==void 0&&!n&&(n=[]),typeof e!="function")return pe(s,e,n,t);Z(i=>pe(s,e(),i,t),n)}function Ct(s){let e=s.target;const t=`$$${s.type}`,n=s.target,i=s.currentTarget,r=l=>Object.defineProperty(s,"target",{configurable:!0,value:l}),o=()=>{const l=e[t];if(l&&!e.disabled){const u=e[`${t}Data`];if(u!==void 0?l.call(e,u,s):l.call(e,s),s.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(s.target)&&r(e.host),!0},a=()=>{for(;o()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(s,"currentTarget",{configurable:!0,get(){return e||document}}),s.composedPath){const l=s.composedPath();r(l[0]);for(let u=0;u<l.length-2&&(e=l[u],!!o());u++){if(e._$host){e=e._$host,a();break}if(e.parentNode===i)break}}else a();r(n)}function pe(s,e,t,n,i){for(;typeof t=="function";)t=t();if(e===t)return t;const r=typeof e,o=n!==void 0;if(s=o&&t[0]&&t[0].parentNode||s,r==="string"||r==="number"){if(r==="number"&&(e=e.toString(),e===t))return t;if(o){let a=t[0];a&&a.nodeType===3?a.data!==e&&(a.data=e):a=document.createTextNode(e),t=Y(s,t,n,a)}else t!==""&&typeof t=="string"?t=s.firstChild.data=e:t=s.textContent=e}else if(e==null||r==="boolean")t=Y(s,t,n);else{if(r==="function")return Z(()=>{let a=e();for(;typeof a=="function";)a=a();t=pe(s,a,t,n)}),()=>t;if(Array.isArray(e)){const a=[],l=t&&Array.isArray(t);if(Ne(a,e,t,i))return Z(()=>t=pe(s,a,t,n,!0)),()=>t;if(a.length===0){if(t=Y(s,t,n),o)return t}else l?t.length===0?Te(s,a,n):St(s,t,a):(t&&Y(s),Te(s,a));t=a}else if(e.nodeType){if(Array.isArray(t)){if(o)return t=Y(s,t,n,e);Y(s,t,null,e)}else t==null||t===""||!s.firstChild?s.appendChild(e):s.replaceChild(e,s.firstChild);t=e}}return t}function Ne(s,e,t,n){let i=!1;for(let r=0,o=e.length;r<o;r++){let a=e[r],l=t&&t[s.length],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)s.push(a);else if(Array.isArray(a))i=Ne(s,a,l)||i;else if(u==="function")if(n){for(;typeof a=="function";)a=a();i=Ne(s,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||i}else s.push(a),i=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?s.push(l):s.push(document.createTextNode(c))}}return i}function Te(s,e,t=null){for(let n=0,i=e.length;n<i;n++)s.insertBefore(e[n],t)}function Y(s,e,t,n){if(t===void 0)return s.textContent="";const i=n||document.createTextNode("");if(e.length){let r=!1;for(let o=e.length-1;o>=0;o--){const a=e[o];if(i!==a){const l=a.parentNode===s;!r&&!o?l?s.replaceChild(i,a):s.insertBefore(i,t):l&&a.remove()}else r=!0}}else s.insertBefore(i,t);return[i]}const m=s=>typeof s=="string",ne=()=>{let s,e;const t=new Promise((n,i)=>{s=n,e=i});return t.resolve=s,t.reject=e,t},je=s=>s==null?"":""+s,$t=(s,e,t)=>{s.forEach(n=>{e[n]&&(t[n]=e[n])})},Pt=/###/g,Ue=s=>s&&s.indexOf("###")>-1?s.replace(Pt,"."):s,Ve=s=>!s||m(s),ae=(s,e,t)=>{const n=m(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Ve(s))return{};const r=Ue(n[i]);!s[r]&&t&&(s[r]=new t),Object.prototype.hasOwnProperty.call(s,r)?s=s[r]:s={},++i}return Ve(s)?{}:{obj:s,k:Ue(n[i])}},De=(s,e,t)=>{const{obj:n,k:i}=ae(s,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let r=e[e.length-1],o=e.slice(0,e.length-1),a=ae(s,o,Object);for(;a.obj===void 0&&o.length;)r=`${o[o.length-1]}.${r}`,o=o.slice(0,o.length-1),a=ae(s,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${r}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${r}`]=t},Nt=(s,e,t,n)=>{const{obj:i,k:r}=ae(s,e,Object);i[r]=i[r]||[],i[r].push(t)},me=(s,e)=>{const{obj:t,k:n}=ae(s,e);if(t)return t[n]},kt=(s,e,t)=>{const n=me(s,t);return n!==void 0?n:me(e,t)},tt=(s,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in s?m(s[n])||s[n]instanceof String||m(e[n])||e[n]instanceof String?t&&(s[n]=e[n]):tt(s[n],e[n],t):s[n]=e[n]);return s},q=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Rt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const At=s=>m(s)?s.replace(/[&<>"'\/]/g,e=>Rt[e]):s;class Et{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const It=[" ",",","?","!",";"],Ft=new Et(20),Tt=(s,e,t)=>{e=e||"",t=t||"";const n=It.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const i=Ft.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let r=!i.test(s);if(!r){const o=s.indexOf(t);o>0&&!i.test(s.substring(0,o))&&(r=!0)}return r},ke=function(s,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!s)return;if(s[e])return s[e];const n=e.split(t);let i=s;for(let r=0;r<n.length;){if(!i||typeof i!="object")return;let o,a="";for(let l=r;l<n.length;++l)if(l!==r&&(a+=t),a+=n[l],o=i[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<n.length-1)continue;r+=l-r+1;break}i=o}return i},be=s=>s&&s.replace("_","-"),jt={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,e){console&&console[s]&&console[s].apply(console,e)}};class ye{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||jt,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(m(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ye(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ye(this.logger,e)}}var K=new ye;class ve{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a.apply(a,[e,...n])})}}class Ke extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,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 t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):m(n)&&r?a.push(...n.split(r)):a.push(n)));const l=me(this.data,a);return!l&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),l||!o||!m(n)?l:ke(this.data&&this.data[e]&&this.data[e][t],n,r)}addResource(e,t,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),De(this.data,a,i),r.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(m(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=t,t=a[1]),this.addNamespaces(t);let l=me(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?tt(l,n,r):l={...l,...n},De(this.data,a,l),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var st={processors:{},addPostProcessor(s){this.processors[s.name]=s},handle(s,e,t,n,i){return s.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,n,i))}),e}};const Me={};class xe extends ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),$t(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=K.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Tt(e,n,i);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:m(r)?[r]:r};const u=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:m(r)?[r]:r}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const b=t.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${b}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${b}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:o}const d=this.resolve(e,t);let f=d&&d.res;const h=d&&d.usedKey||o,p=d&&d.exactUsedKey||o,g=Object.prototype.toString.apply(f),x=["[object Number]","[object Function]","[object RegExp]"],O=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,N=!m(f)&&typeof f!="boolean"&&typeof f!="number";if(w&&f&&N&&x.indexOf(g)<0&&!(m(O)&&Array.isArray(f))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,f,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(d.res=b,d.usedParams=this.getUsedParamsDetails(t),d):b}if(r){const b=Array.isArray(f),S=b?[]:{},C=b?p:h;for(const L in f)if(Object.prototype.hasOwnProperty.call(f,L)){const D=`${C}${r}${L}`;S[L]=this.translate(D,{...t,joinArrays:!1,ns:a}),S[L]===D&&(S[L]=f[L])}f=S}}else if(w&&m(O)&&Array.isArray(f))f=f.join(O),f&&(f=this.extendTranslation(f,e,t,n));else{let b=!1,S=!1;const C=t.count!==void 0&&!m(t.count),L=xe.hasDefaultValue(t),D=C?this.pluralResolver.getSuffix(u,t.count,t):"",k=t.ordinal&&C?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",v=C&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),R=v&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${D}`]||t[`defaultValue${k}`]||t.defaultValue;!this.isValidLookup(f)&&L&&(b=!0,f=R),this.isValidLookup(f)||(S=!0,f=o);const A=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:f,V=L&&R!==f&&this.options.updateMissing;if(S||b||V){if(this.logger.log(V?"updateKey":"missingKey",u,l,o,V?R:f),r){const T=this.resolve(o,{...t,keySeparator:!1});T&&T.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 J=[];const Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let T=0;T<Q.length;T++)J.push(Q[T]);else this.options.saveMissingTo==="all"?J=this.languageUtils.toResolveHierarchy(t.lng||this.language):J.push(t.lng||this.language);const G=(T,W,se)=>{const Ee=L&&se!==f?se:A;this.options.missingKeyHandler?this.options.missingKeyHandler(T,l,W,Ee,V,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(T,l,W,Ee,V,t),this.emit("missingKey",T,l,W,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?J.forEach(T=>{const W=this.pluralResolver.getSuffixes(T,t);v&&t[`defaultValue${this.options.pluralSeparator}zero`]&&W.indexOf(`${this.options.pluralSeparator}zero`)<0&&W.push(`${this.options.pluralSeparator}zero`),W.forEach(se=>{G([T],o+se,t[`defaultValue${se}`]||R)})}):G(J,o,R))}f=this.extendTranslation(f,e,t,d,n),S&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${o}`),(S||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,b?f:void 0):f=this.options.parseMissingKeyHandler(f))}return i?(d.res=f,d.usedParams=this.getUsedParamsDetails(t),d):f}extendTranslation(e,t,n,i,r){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=m(e)&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=n.replace&&!m(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||i.usedLng,n),u){const f=e.match(this.interpolator.nestingRegexp),h=f&&f.length;c<h&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,h=new Array(f),p=0;p<f;p++)h[p]=arguments[p];return r&&r[0]===h[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`),null):o.translate(...h,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,l=m(a)?[a]:a;return e!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(e=st.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,o,a;return m(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,t),c=u.key;i=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=t.count!==void 0&&!m(t.count),h=f&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),p=t.context!==void 0&&(m(t.context)||typeof t.context=="number")&&t.context!=="",g=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(x=>{this.isValidLookup(n)||(a=x,!Me[`${g[0]}-${x}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(Me[`${g[0]}-${x}`]=!0,this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(O=>{if(this.isValidLookup(n))return;o=O;const w=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,c,O,x,t);else{let b;f&&(b=this.pluralResolver.getSuffix(O,t.count,t));const S=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(w.push(c+b),t.ordinal&&b.indexOf(C)===0&&w.push(c+b.replace(C,this.options.pluralSeparator)),h&&w.push(c+S)),p){const L=`${c}${this.options.contextSeparator}${t.context}`;w.push(L),f&&(w.push(L+b),t.ordinal&&b.indexOf(C)===0&&w.push(L+b.replace(C,this.options.pluralSeparator)),h&&w.push(L+S))}}let N;for(;N=w.pop();)this.isValidLookup(n)||(r=N,n=this.getResource(O,x,N,t))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!m(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}const $e=s=>s.charAt(0).toUpperCase()+s.slice(1);class Be{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=K.create("languageUtils")}getScriptPartFromCode(e){if(e=be(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=be(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(m(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=$e(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=$e(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=$e(n[2].toLowerCase()))),n.join("-")}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 t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),m(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return m(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):m(e)&&r(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&r(this.formatLanguageCode(o))}),i}}let Ut=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Vt={1:s=>+(s>1),2:s=>+(s!=1),3:s=>0,4:s=>s%10==1&&s%100!=11?0:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?1:2,5:s=>s==0?0:s==1?1:s==2?2:s%100>=3&&s%100<=10?3:s%100>=11?4:5,6:s=>s==1?0:s>=2&&s<=4?1:2,7:s=>s==1?0:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?1:2,8:s=>s==1?0:s==2?1:s!=8&&s!=11?2:3,9:s=>+(s>=2),10:s=>s==1?0:s==2?1:s<7?2:s<11?3:4,11:s=>s==1||s==11?0:s==2||s==12?1:s>2&&s<20?2:3,12:s=>+(s%10!=1||s%100==11),13:s=>+(s!==0),14:s=>s==1?0:s==2?1:s==3?2:3,15:s=>s%10==1&&s%100!=11?0:s%10>=2&&(s%100<10||s%100>=20)?1:2,16:s=>s%10==1&&s%100!=11?0:s!==0?1:2,17:s=>s==1||s%10==1&&s%100!=11?0:1,18:s=>s==0?0:s==1?1:2,19:s=>s==1?0:s==0||s%100>1&&s%100<11?1:s%100>10&&s%100<20?2:3,20:s=>s==1?0:s==0||s%100>0&&s%100<20?1:2,21:s=>s%100==1?1:s%100==2?2:s%100==3||s%100==4?3:0,22:s=>s==1?0:s==2?1:(s<0||s>10)&&s%10==0?2:3};const Dt=["v1","v2","v3"],Kt=["v4"],He={zero:0,one:1,two:2,few:3,many:4,other:5},Mt=()=>{const s={};return Ut.forEach(e=>{e.lngs.forEach(t=>{s[t]={numbers:e.nr,plurals:Vt[e.fc]}})}),s};class Bt{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=K.create("pluralResolver"),(!this.options.compatibilityJSON||Kt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Mt(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const n=be(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:n,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[r]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>He[i]-He[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Dt.includes(this.options.compatibilityJSON)}}const ze=function(s,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=kt(s,e,t);return!r&&i&&m(t)&&(r=ke(s,t,n),r===void 0&&(r=ke(e,t,n))),r},Pe=s=>s.replace(/\$/g,"$$$$");class Ht{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=K.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:r,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:p,nestingSuffixEscaped:g,nestingOptionsSeparator:x,maxReplaces:O,alwaysFormat:w}=e.interpolation;this.escape=t!==void 0?t:At,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?q(r):o||"{{",this.suffix=a?q(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=f?q(f):h||q("$t("),this.nestingSuffix=p?q(p):g||q(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=O||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>t&&t.source===n?(t.lastIndex=0,t):new RegExp(n,"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,t,n,i){let r,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=h=>{if(h.indexOf(this.formatSeparator)<0){const O=ze(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,n,{...i,...t,interpolationkey:h}):O}const p=h.split(this.formatSeparator),g=p.shift().trim(),x=p.join(this.formatSeparator).trim();return this.format(ze(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),x,n,{...i,...t,interpolationkey:g})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,d=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>Pe(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?Pe(this.escape(h)):Pe(h)}].forEach(h=>{for(a=0;r=h.regex.exec(e);){const p=r[1].trim();if(o=u(p),o===void 0)if(typeof c=="function"){const x=c(e,r,i);o=m(x)?x:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))o="";else if(d){o=r[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),o="";else!m(o)&&!this.useRawValueToEscape&&(o=je(o));const g=h.safeValue(o);if(e=e.replace(r[0],g),d?(h.regex.lastIndex+=o.length,h.regex.lastIndex-=r[0].length):h.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,o);const h=f.match(/'/g),p=f.match(/"/g);(h&&h.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${c}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!m(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=c.shift(),l=c,u=!0}if(r=t(a.call(this,i[1].trim(),o),o),r&&i[0]===e&&!m(r))return r;m(r)||(r=je(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((c,d)=>this.format(c,d,n.lng,{...n,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const zt=s=>{let e=s.toLowerCase().trim();const t={};if(s.indexOf("(")>-1){const n=s.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},_=s=>{const e={};return(t,n,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const o=n+JSON.stringify(r);let a=e[o];return a||(a=s(be(n),i),e[o]=a),a(t)}};class Jt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=K.create("formatter"),this.options=e,this.formats={number:_((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return r=>i.format(r)}),currency:_((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return r=>i.format(r)}),datetime:_((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return r=>i.format(r)}),relativetime:_((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return r=>i.format(r,n.range||"day")}),list:_((t,n)=>{const i=new Intl.ListFormat(t,{...n});return r=>i.format(r)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=_(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(a=>a.indexOf(")")>-1)){const a=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,a)].join(this.formatSeparator)}return r.reduce((a,l)=>{const{formatName:u,formatOptions:c}=zt(l);if(this.formats[u]){let d=a;try{const f=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},h=f.locale||f.lng||i.locale||i.lng||n;d=this.formats[u](a,h,{...c,...i,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}const Wt=(s,e)=>{s.pending[e]!==void 0&&(delete s.pending[e],s.pendingCount--)};class Qt extends ve{constructor(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=K.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,t,n,i){const r={},o={},a={},l={};return e.forEach(u=>{let c=!0;t.forEach(d=>{const f=`${u}|${d}`;!n.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,c=!1,o[f]===void 0&&(o[f]=!0),r[f]===void 0&&(r[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(a[u]=!0)}),(Object.keys(r).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,n){const i=e.split("|"),r=i[0],o=i[1];t&&this.emit("failedLoading",r,o,t),!t&&n&&this.store.addResourceBundle(r,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(l=>{Nt(l.loaded,[r],o),Wt(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{a[u][d]===void 0&&(a[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:r,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,r*2,o)},r);return}o(u,c)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,t,a)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();m(e)&&(e=this.languageUtils.toResolveHierarchy(e)),m(t)&&(t=[t]);const r=this.queueLoad(e,t,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,i,r){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" 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(!(n==null||n==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,n,i,l):c=u(e,t,n,i),c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}else u(e,t,n,i,a,l)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const Je=()=>({debug:!1,initImmediate:!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:s=>{let e={};if(typeof s[1]=="object"&&(e=s[1]),m(s[1])&&(e.defaultValue=s[1]),m(s[2])&&(e.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const t=s[3]||s[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:s=>s,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),We=s=>(m(s.ns)&&(s.ns=[s.ns]),m(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),m(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),s.supportedLngs&&s.supportedLngs.indexOf("cimode")<0&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),s),ue=()=>{},Gt=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(t=>{typeof s[t]=="function"&&(s[t]=s[t].bind(s))})};class le extends ve{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=We(e),this.services={},this.logger=K,this.modules={external:[]},Gt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(m(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Je();this.options={...i,...this.options,...We(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const r=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?K.init(r(this.modules.logger),this.options):K.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Jt);const d=new Be(this.options);this.store=new Ke(this.options.resources,this.options);const f=this.services;f.logger=K,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Bt(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=r(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Ht(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Qt(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),x=1;x<p;x++)g[x-1]=arguments[x];e.emit(h,...g)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new xe(this.services,this.options),this.translator.on("*",function(h){for(var p=arguments.length,g=new Array(p>1?p-1:0),x=1;x<p;x++)g[x-1]=arguments[x];e.emit(h,...g)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ue),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=ne(),u=()=>{const c=(d,f)=>{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),l.resolve(f),n(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;const i=m(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const r=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(r,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){const i=ne();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ue),this.services.backendConnector.reload(e,t,r=>{i.resolve(),n(r)}),i}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"&&st.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 t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=ne();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(l,function(){return n.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=m(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,n){var i=this;const r=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=i.options.overloadTranslationOptionHandler([o,a].concat(c))}else l={...a};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||r.keyPrefix);const f=i.options.keySeparator||".";let h;return l.keyPrefix&&Array.isArray(o)?h=o.map(p=>`${l.keyPrefix}${f}${p}`):h=l.keyPrefix?`${l.keyPrefix}${f}${o}`:o,i.t(h,l)};return m(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};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 n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(r,e)))}loadNamespaces(e,t){const n=ne();return this.options.ns?(m(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ne();m(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return r.length?(this.options.preload=i.concat(r),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["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"],n=this.services&&this.services.languageUtils||new Be(Je());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new le(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ue;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new le(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new Ke(this.store.data,i),r.services.resourceStore=r.store),r.translator=new xe(r.services,i),r.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];r.emit(a,...u)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const I=le.createInstance();I.createInstance=le.createInstance;I.createInstance;I.dir;I.init;I.loadResources;I.reloadResources;I.use;I.changeLanguage;I.getFixedT;I.t;I.exists;I.setDefaultNamespace;I.hasLoadedNamespace;I.loadNamespaces;I.loadLanguages;async function Yt(s={}){const e=I.createInstance(),t=s.resources||{};return await e.init({lng:"en",fallbackLng:s.fallbackLng||"en",debug:s.debug||!1,resources:t,interpolation:{escapeValue:!1},partialBundledLanguages:!0}),e}async function qt(s,e){try{const t=window.edenAPI;if(!t)return;const n=await t.shellCommand("i18n/get-common",{locale:e});n?.translations&&s.addResourceBundle(e,"translation",n.translations,!0,!0)}catch(t){console.error("Failed to load common translations",t)}}function _t(s={}){return re(()=>{const[e,t]=j("en"),[n]=ut(async()=>await Yt(s)),i=((a,l)=>{const u=n();return u?u.t(a,{lng:e(),...l}):a}),r=async a=>{const l=n();l&&(await qt(l,a),await l.changeLanguage(a)),t(a)};return{t:i,locale:e,setLocale:t,initLocale:async()=>{try{const a=window.edenAPI;if(!a){console.warn("Eden API not found, using default locale");return}const l=c=>{r(c.locale)};Re(()=>{a.unsubscribe("i18n/locale-changed",l)});const u=await a.shellCommand("i18n/get-locale",{});u?.locale&&await r(u.locale),await a.subscribe("i18n/locale-changed",l)}catch(a){console.error("Failed to load system locale",a)}}}})}const Zt={login:{signIn:"Sign in",subtitle:"Choose a user and enter the password to continue.",loadingUsers:"Loading users...",noUsersAvailable:"No users available.",enterPassword:"Enter password",signingIn:"Signing in...",loginFailed:"Login failed.",failedToLoadUsers:"Failed to load users."}},Xt={login:{signIn:"Zaloguj się",subtitle:"Wybierz użytkownika i wprowadź hasło, aby kontynuować.",loadingUsers:"Ładowanie użytkowników...",noUsersAvailable:"Brak dostępnych użytkowników.",enterPassword:"Wpisz hasło",signingIn:"Logowanie...",loginFailed:"Logowanie nie powiodło się.",failedToLoadUsers:"Nie udało się załadować użytkowników."}},es={en:{translation:Zt},pl:{translation:Xt}},{t:U,locale:ds,setLocale:hs,initLocale:ts}=_t({resources:es});var ss=te('<div class="user-error eden-text-sm">'),ns=te('<div class="eden-grid eden-grid-2 eden-gap-lg user-login-grid"><div class="eden-flex eden-flex-col eden-gap-sm"><ul class="eden-list user-list"></ul></div><div class="eden-flex eden-flex-col eden-gap-sm login-form-container"><label class="eden-text-sm eden-text-secondary"for=password></label><input id=password class=eden-input type=password><button type=button class="eden-btn eden-btn-primary">'),is=te('<div class="login-root eden-flex eden-flex-center"><div class="login-card eden-glass-strong eden-rounded-xl eden-p-lg"><div class="eden-flex eden-flex-col eden-gap-md"><header class="eden-flex eden-flex-col eden-gap-xs"><h2 class="eden-text-2xl eden-font-semibold"></h2><p class="eden-text-sm eden-text-secondary">'),rs=te('<div class="eden-flex eden-flex-center eden-gap-sm"><div class=eden-loading-spinner></div><span class="eden-text-sm eden-text-secondary">'),as=te('<div class="eden-flex eden-flex-col eden-gap-sm"><span class="eden-text-sm eden-text-secondary"></span><button type=button class="eden-btn eden-btn-secondary">'),os=te('<li class="eden-list-item eden-list-item-interactive"role=button tabindex=0><div class="eden-avatar eden-avatar-md"></div><div class=eden-list-item-content><div class=eden-list-item-title>');const ls=s=>s.trim().split(/\s+/).map(n=>n[0]).join("").slice(0,2).toUpperCase(),us=()=>{const[s,e]=j([]),[t,n]=j(null),[i,r]=j(""),[o,a]=j(null),[l,u]=j(!0),[c,d]=j(!1),f=async g=>{const{windowSize:x}=g,O={x:0,y:0,width:x.width,height:x.height};try{await window.edenAPI.shellCommand("view/update-bounds",{bounds:O})}catch(w){console.error("Failed to update view bounds:",w)}},h=async()=>{u(!0),a(null);try{const g=await window.edenAPI.shellCommand("user/list",{});e(g.users??[])}catch(g){console.error("Failed to load users:",g),a(U("login.failedToLoadUsers"))}finally{u(!1)}};ft(()=>{Re(()=>{window.edenAPI.unsubscribe("view/global-bounds-changed",f)}),(async()=>{await ts(),h();try{const g=await window.edenAPI.shellCommand("view/window-size",{});await f({windowSize:g})}catch(g){console.error("Failed to get initial window size:",g)}try{await window.edenAPI.subscribe("view/global-bounds-changed",f)}catch(g){console.error("Failed to subscribe to bounds change:",g)}})()}),qe(()=>{if(t())return;const g=s()[0]?.username??null;n(g)});const p=async()=>{if(!(!t()||!i()||c())){d(!0),a(null);try{const g=await window.edenAPI.shellCommand("user/login",{username:t(),password:i()});g.success?r(""):a(g.error??U("login.loginFailed"))}catch(g){console.error("Login failed:",g),a(U("login.loginFailed"))}finally{d(!1)}}};return(()=>{var g=is(),x=g.firstChild,O=x.firstChild,w=O.firstChild,N=w.firstChild,b=N.nextSibling;return F(N,()=>U("login.signIn")),F(b,()=>U("login.subtitle")),F(O,ie(Ce,{get when(){return!l()},get fallback(){return(()=>{var S=rs(),C=S.firstChild,L=C.nextSibling;return F(L,()=>U("login.loadingUsers")),S})()},get children(){return ie(Ce,{get when(){return s().length>0},get fallback(){return(()=>{var S=as(),C=S.firstChild,L=C.nextSibling;return F(C,()=>U("login.noUsersAvailable")),L.$$click=h,F(L,()=>U("common.retry")),S})()},get children(){var S=ns(),C=S.firstChild,L=C.firstChild,D=C.nextSibling,k=D.firstChild,v=k.nextSibling,R=v.nextSibling;return F(L,ie(xt,{get each(){return s()},children:y=>(()=>{var A=os(),V=A.firstChild,J=V.nextSibling,Q=J.firstChild;return A.$$keydown=G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),n(y.username),a(null))},A.$$click=()=>{n(y.username),a(null)},F(V,()=>ls(y.name)),F(Q,()=>y.name),Z(()=>A.classList.toggle("eden-list-item-active",t()===y.username)),A})()})),F(k,()=>U("common.password")),v.$$keydown=y=>{y.key==="Enter"&&p()},v.$$input=y=>r(y.currentTarget.value),F(D,ie(Ce,{get when(){return o()},get children(){var y=ss();return F(y,o),y}}),R),R.$$click=p,F(R,(()=>{var y=wt(()=>!!c());return()=>y()?U("login.signingIn"):U("login.signIn")})()),Z(y=>{var A=U("login.enterPassword"),V=c()||!i()||!t();return A!==y.e&&Ot(v,"placeholder",y.e=A),V!==y.t&&(R.disabled=y.t=V),y},{e:void 0,t:void 0}),Z(()=>v.value=i()),S}})}}),null),g})()};Lt(["input","keydown","click"]);const Qe=document.getElementById("root");Qe&&vt(()=>ie(us,{}),Qe);
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Login</title>
7
- <script type="module" crossorigin src="./assets/index-DyI95N2f.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-KswMPsHx.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-AGh8-3Ui.css">
9
9
  </head>
10
10
  <body>
@@ -1,4 +1,4 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function i(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(s){if(s.ep)return;s.ep=!0;const n=i(s);fetch(s.href,n)}})();const r={corner:"bottom-right",toastWidth:320,spacing:16,marginX:16,marginY:96},d=new Map,l=[];let m=null;async function w(){try{const e=await window.edenAPI.shellCommand("view/window-size",{});return m=e,e}catch(e){return console.error("Failed to get window size:",e),{width:1280,height:800}}}function v(){return(m||{height:800}).height-r.marginY*2}function y(){let e=0,t=0;for(const i of d.values())e+=i.element.offsetHeight||100,t++;return t>1&&(e+=(t-1)*r.spacing),e}function h(e=120){const t=y(),i=v();return t+(d.size>0?r.spacing:0)+e<=i}function b(){const e=document.getElementById("toast-container");if(d.size===0||!e)return{x:0,y:0,width:0,height:0};const t=m||{width:1280,height:800},i=e.scrollHeight,o=r.toastWidth,s=i;let n,a;switch(r.corner){case"top-left":n=r.marginX,a=r.marginY;break;case"top-right":n=t.width-o-r.marginX,a=r.marginY;break;case"bottom-left":n=r.marginX,a=t.height-s-r.marginY;break;case"bottom-right":default:n=t.width-o-r.marginX,a=t.height-s-r.marginY;break}return{x:n,y:a,width:o,height:s}}async function u(){const e=b();try{await window.edenAPI.shellCommand("view/update-view-bounds",{appId:"com.eden.toaster",bounds:e})}catch(t){console.error("Failed to update overlay bounds:",t)}}function f(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function T(){if(l.length===0||!h())return;const e=l.shift();p(e)}function c(e){const t=d.get(e);t&&(t.timeoutId!==null&&clearTimeout(t.timeoutId),t.element.remove(),d.delete(e),g(),u(),T())}function P(){l.length=0;for(const e of d.values())e.timeoutId!==null&&clearTimeout(e.timeoutId),e.element.remove();d.clear(),g(),u()}function g(){const e=document.getElementById("toast-container");if(!e)return;let t=document.getElementById("dismiss-all-btn");const i=d.size+l.length;i>1?(t||(t=document.createElement("button"),t.id="dismiss-all-btn",t.className="dismiss-all-btn eden-btn eden-btn-ghost",t.textContent="Dismiss All",t.addEventListener("click",P),e.prepend(t)),t.textContent=`Dismiss All (${i})`):t&&t.remove()}function I(e){const t=d.get(e);!t||t.isHoverPaused||(t.isHoverPaused=!0,t.isPaused||E(t))}function H(e){const t=d.get(e);!t||!t.isHoverPaused||(t.isHoverPaused=!1,t.isPaused&&L(t))}function E(e){if(e.isPaused)return;e.timeoutId!==null&&(clearTimeout(e.timeoutId),e.timeoutId=null);const t=Date.now()-e.startTime;e.remainingTime=Math.max(0,e.remainingTime-t),e.isPaused=!0;const i=e.element.querySelector(".eden-progress-bar");i&&(i.style.animationPlayState="paused")}function L(e){if(!e.isPaused)return;e.isPaused=!1,e.startTime=Date.now();const t=e.element.querySelector(".eden-progress-bar");t&&(t.style.animationPlayState="running"),e.remainingTime>0?e.timeoutId=window.setTimeout(()=>{c(e.id)},e.remainingTime):c(e.id)}function z(e){const t=document.createElement("div"),i=e.type||"info",o=!e.timeout||e.timeout<=0;t.className=`toast eden-card-glass toast-${i}${o?" toast-persistent":""}`,t.dataset.id=e.id;const s=o?"":`
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const n of s)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function i(s){const n={};return s.integrity&&(n.integrity=s.integrity),s.referrerPolicy&&(n.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?n.credentials="include":s.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(s){if(s.ep)return;s.ep=!0;const n=i(s);fetch(s.href,n)}})();const r={corner:"bottom-right",toastWidth:320,spacing:16,marginX:16,marginY:96},d=new Map,l=[];let m=null;async function w(){try{const e=await window.edenAPI.shellCommand("view/window-size",{});return m=e,e}catch(e){return console.error("Failed to get window size:",e),{width:1280,height:800}}}function v(){return(m||{height:800}).height-r.marginY*2}function y(){let e=0,t=0;for(const i of d.values())e+=i.element.offsetHeight||100,t++;return t>1&&(e+=(t-1)*r.spacing),e}function h(e=120){const t=y(),i=v();return t+(d.size>0?r.spacing:0)+e<=i}function b(){const e=document.getElementById("toast-container");if(d.size===0||!e)return{x:0,y:0,width:0,height:0};const t=m||{width:1280,height:800},i=e.scrollHeight,o=r.toastWidth,s=i;let n,a;switch(r.corner){case"top-left":n=r.marginX,a=r.marginY;break;case"top-right":n=t.width-o-r.marginX,a=r.marginY;break;case"bottom-left":n=r.marginX,a=t.height-s-r.marginY;break;case"bottom-right":default:n=t.width-o-r.marginX,a=t.height-s-r.marginY;break}return{x:n,y:a,width:o,height:s}}async function u(){const e=b();try{await window.edenAPI.shellCommand("view/update-bounds",{bounds:e})}catch(t){console.error("Failed to update overlay bounds:",t)}}function f(e){const t=document.createElement("div");return t.textContent=e,t.innerHTML}function T(){if(l.length===0||!h())return;const e=l.shift();p(e)}function c(e){const t=d.get(e);t&&(t.timeoutId!==null&&clearTimeout(t.timeoutId),t.element.remove(),d.delete(e),g(),u(),T())}function P(){l.length=0;for(const e of d.values())e.timeoutId!==null&&clearTimeout(e.timeoutId),e.element.remove();d.clear(),g(),u()}function g(){const e=document.getElementById("toast-container");if(!e)return;let t=document.getElementById("dismiss-all-btn");const i=d.size+l.length;i>1?(t||(t=document.createElement("button"),t.id="dismiss-all-btn",t.className="dismiss-all-btn eden-btn eden-btn-ghost",t.textContent="Dismiss All",t.addEventListener("click",P),e.prepend(t)),t.textContent=`Dismiss All (${i})`):t&&t.remove()}function H(e){const t=d.get(e);!t||t.isHoverPaused||(t.isHoverPaused=!0,t.isPaused||E(t))}function I(e){const t=d.get(e);!t||!t.isHoverPaused||(t.isHoverPaused=!1,t.isPaused&&L(t))}function E(e){if(e.isPaused)return;e.timeoutId!==null&&(clearTimeout(e.timeoutId),e.timeoutId=null);const t=Date.now()-e.startTime;e.remainingTime=Math.max(0,e.remainingTime-t),e.isPaused=!0;const i=e.element.querySelector(".eden-progress-bar");i&&(i.style.animationPlayState="paused")}function L(e){if(!e.isPaused)return;e.isPaused=!1,e.startTime=Date.now();const t=e.element.querySelector(".eden-progress-bar");t&&(t.style.animationPlayState="running"),e.remainingTime>0?e.timeoutId=window.setTimeout(()=>{c(e.id)},e.remainingTime):c(e.id)}function z(e){const t=document.createElement("div"),i=e.type||"info",o=!e.timeout||e.timeout<=0;t.className=`toast eden-card-glass toast-${i}${o?" toast-persistent":""}`,t.dataset.id=e.id;const s=o?"":`
2
2
  <div class="toast-progress-container">
3
3
  <div class="eden-progress">
4
4
  <div class="eden-progress-bar" style="animation-duration: ${e.timeout}ms;"></div>
@@ -13,4 +13,4 @@
13
13
  <button class="toast-dismiss" aria-label="Dismiss">×</button>
14
14
  </div>
15
15
  ${s}
16
- `;const n=t.querySelector(".toast-dismiss");return n==null||n.addEventListener("click",a=>{a.stopPropagation(),c(e.id)}),o||(t.addEventListener("mouseenter",()=>{I(e.id)}),t.addEventListener("mouseleave",()=>{H(e.id)})),t}function p(e){const t=document.getElementById("toast-container");if(!t)return;const i=z(e);t.appendChild(i);const o=!e.timeout||e.timeout<=0;let s=null;o||(s=window.setTimeout(()=>{c(e.id)},e.timeout));const n={...e,element:i,timeoutId:s,remainingTime:e.timeout??0,isPaused:!1,isHoverPaused:!1,startTime:Date.now()};d.set(e.id,n),g(),u()}function A(e){const{notification:t}=e;h()?p(t):(l.push(t),g(),console.log(`Toast queued: ${t.id} (${l.length} pending)`))}async function x(){console.log("Eden Toaster initializing..."),await w(),window.edenAPI.subscribe("notification/added",A),window.edenAPI.subscribe("view/global-bounds-changed",e=>{m=e.windowSize,u()}),await u(),console.log("Eden Toaster ready!")}x();
16
+ `;const n=t.querySelector(".toast-dismiss");return n==null||n.addEventListener("click",a=>{a.stopPropagation(),c(e.id)}),o||(t.addEventListener("mouseenter",()=>{H(e.id)}),t.addEventListener("mouseleave",()=>{I(e.id)})),t}function p(e){const t=document.getElementById("toast-container");if(!t)return;const i=z(e);t.appendChild(i);const o=!e.timeout||e.timeout<=0;let s=null;o||(s=window.setTimeout(()=>{c(e.id)},e.timeout));const n={...e,element:i,timeoutId:s,remainingTime:e.timeout??0,isPaused:!1,isHoverPaused:!1,startTime:Date.now()};d.set(e.id,n),g(),u()}function A(e){const{notification:t}=e;h()?p(t):(l.push(t),g(),console.log(`Toast queued: ${t.id} (${l.length} pending)`))}async function x(){console.log("Eden Toaster initializing..."),await w(),window.edenAPI.subscribe("notification/added",A),window.edenAPI.subscribe("view/global-bounds-changed",e=>{m=e.windowSize,u()}),await u(),console.log("Eden Toaster ready!")}x();
@@ -5,7 +5,7 @@
5
5
  <meta charset="UTF-8" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Eden Toaster</title>
8
- <script type="module" crossorigin src="./assets/index-C4cVyh7j.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-b5EUNXyn.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-8JMcmBCJ.css">
10
10
  </head>
11
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/generated/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EA8FjC,CAAC;AAGX,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAqBnC,CAAC"}
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/generated/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAmGjC,CAAC;AAGX,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAqBnC,CAAC"}
@@ -66,6 +66,7 @@ exports.COMMAND_NAMES = [
66
66
  "package/get-size",
67
67
  "process/launch",
68
68
  "process/stop",
69
+ "process/exit",
69
70
  "process/list",
70
71
  "settings/get",
71
72
  "settings/set",
@@ -90,10 +91,14 @@ exports.COMMAND_NAMES = [
90
91
  "user/has-grant",
91
92
  "user/get-default",
92
93
  "user/set-default",
94
+ "view/update-bounds",
93
95
  "view/update-view-bounds",
96
+ "view/set-visibility",
94
97
  "view/set-view-visibility",
95
- "view/focus-app",
98
+ "view/focus",
99
+ "view/focus-view",
96
100
  "view/update-global-bounds",
101
+ "view/toggle-mode",
97
102
  "view/toggle-view-mode",
98
103
  "view/start-drag",
99
104
  "view/end-drag",
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/generated/runtime.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sBAAsB;AACT,QAAA,aAAa,GAAsB;IAC9C,aAAa;IACb,iBAAiB;IACjB,mBAAmB;IACnB,aAAa;IACb,oBAAoB;IACpB,gBAAgB;IAChB,0BAA0B;IAC1B,0BAA0B;IAC1B,wBAAwB;IACxB,+BAA+B;IAC/B,mBAAmB;IACnB,sBAAsB;IACtB,oBAAoB;IACpB,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;IACX,WAAW;IACX,cAAc;IACd,WAAW;IACX,aAAa;IACb,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,0BAA0B;IAC1B,6BAA6B;IAC7B,6BAA6B;IAC7B,uBAAuB;IACvB,SAAS;IACT,UAAU;IACV,WAAW;IACX,UAAU;IACV,YAAY;IACZ,SAAS;IACT,WAAW;IACX,WAAW;IACX,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,2BAA2B;IAC3B,+BAA+B;IAC/B,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,YAAY;IACZ,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,mBAAmB;IACnB,sBAAsB;IACtB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,yBAAyB;IACzB,0BAA0B;IAC1B,gBAAgB;IAChB,2BAA2B;IAC3B,uBAAuB;IACvB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;IACrB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,0BAA0B;IAC1B,0BAA0B;CAClB,CAAC;AAEX,oBAAoB;AACP,QAAA,eAAe,GAAsB;IAChD,8BAA8B;IAC9B,qBAAqB;IACrB,qBAAqB;IACrB,aAAa;IACb,qBAAqB;IACrB,oBAAoB;IACpB,sBAAsB;IACtB,mBAAmB;IACnB,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;IAClB,uBAAuB;IACvB,mBAAmB;CACX,CAAC"}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/generated/runtime.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sBAAsB;AACT,QAAA,aAAa,GAAsB;IAC9C,aAAa;IACb,iBAAiB;IACjB,mBAAmB;IACnB,aAAa;IACb,oBAAoB;IACpB,gBAAgB;IAChB,0BAA0B;IAC1B,0BAA0B;IAC1B,wBAAwB;IACxB,+BAA+B;IAC/B,mBAAmB;IACnB,sBAAsB;IACtB,oBAAoB;IACpB,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,UAAU;IACV,SAAS;IACT,WAAW;IACX,WAAW;IACX,cAAc;IACd,WAAW;IACX,aAAa;IACb,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,kBAAkB;IAClB,0BAA0B;IAC1B,6BAA6B;IAC7B,6BAA6B;IAC7B,uBAAuB;IACvB,SAAS;IACT,UAAU;IACV,WAAW;IACX,UAAU;IACV,YAAY;IACZ,SAAS;IACT,WAAW;IACX,WAAW;IACX,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,2BAA2B;IAC3B,+BAA+B;IAC/B,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,eAAe;IACf,kBAAkB;IAClB,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;IACX,kBAAkB;IAClB,YAAY;IACZ,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,mBAAmB;IACnB,sBAAsB;IACtB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;IAClB,oBAAoB;IACpB,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,YAAY;IACZ,iBAAiB;IACjB,2BAA2B;IAC3B,kBAAkB;IAClB,uBAAuB;IACvB,iBAAiB;IACjB,eAAe;IACf,qBAAqB;IACrB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,0BAA0B;IAC1B,0BAA0B;CAClB,CAAC;AAEX,oBAAoB;AACP,QAAA,eAAe,GAAsB;IAChD,8BAA8B;IAC9B,qBAAqB;IACrB,qBAAqB;IACrB,aAAa;IACb,qBAAqB;IACrB,oBAAoB;IACpB,sBAAsB;IACtB,mBAAmB;IACnB,qBAAqB;IACrB,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;IAClB,uBAAuB;IACvB,mBAAmB;CACX,CAAC"}
@@ -5,6 +5,7 @@ export declare class ProcessHandler {
5
5
  constructor(processManager: ProcessManager);
6
6
  /**
7
7
  * Launch an application instance.
8
+ * Requires "process/manage" permission.
8
9
  */
9
10
  handleLaunchApp(args: {
10
11
  appId: string;
@@ -12,14 +13,25 @@ export declare class ProcessHandler {
12
13
  }): Promise<LaunchResult>;
13
14
  /**
14
15
  * Stop a running application instance.
16
+ * Requires "process/manage" permission.
15
17
  */
16
18
  handleStopApp(args: {
17
19
  appId: string;
18
20
  }): Promise<{
19
21
  success: boolean;
20
22
  }>;
23
+ /**
24
+ * Stop the caller app instance.
25
+ * No explicit permission required - this endpoint only allows self-exit.
26
+ */
27
+ handleExitApp(args: {
28
+ _callerAppId?: string;
29
+ }): Promise<{
30
+ success: boolean;
31
+ }>;
21
32
  /**
22
33
  * List all running application processes.
34
+ * Requires "process/read" permission.
23
35
  * @param showHidden - If true, includes overlay apps (hidden by default)
24
36
  */
25
37
  handleListApps(args: {
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessHandler.d.ts","sourceRoot":"","sources":["../../src/process-manager/ProcessHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,qBACa,cAAc;IACzB,OAAO,CAAC,cAAc,CAAiB;gBAE3B,cAAc,EAAE,cAAc;IAI1C;;OAEG;IAEG,eAAe,CAAC,IAAI,EAAE;QAC1B,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,UAAU,CAAC;KACrB,GAAG,OAAO,CAAC,YAAY,CAAC;IAKzB;;OAEG;IAEG,aAAa,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAM3E;;;OAGG;IAEG,cAAc,CAAC,IAAI,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAG7E"}
1
+ {"version":3,"file":"ProcessHandler.d.ts","sourceRoot":"","sources":["../../src/process-manager/ProcessHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,qBACa,cAAc;IACzB,OAAO,CAAC,cAAc,CAAiB;gBAE3B,cAAc,EAAE,cAAc;IAI1C;;;OAGG;IAEG,eAAe,CAAC,IAAI,EAAE;QAC1B,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,UAAU,CAAC;KACrB,GAAG,OAAO,CAAC,YAAY,CAAC;IAKzB;;;OAGG;IAEG,aAAa,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAM3E;;;OAGG;IAEG,aAAa,CAAC,IAAI,EAAE;QACxB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAUjC;;;;OAIG;IAEG,cAAc,CAAC,IAAI,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;CAG7E"}
@@ -18,6 +18,7 @@ let ProcessHandler = class ProcessHandler {
18
18
  }
19
19
  /**
20
20
  * Launch an application instance.
21
+ * Requires "process/manage" permission.
21
22
  */
22
23
  async handleLaunchApp(args) {
23
24
  const { appId, bounds } = args;
@@ -25,14 +26,28 @@ let ProcessHandler = class ProcessHandler {
25
26
  }
26
27
  /**
27
28
  * Stop a running application instance.
29
+ * Requires "process/manage" permission.
28
30
  */
29
31
  async handleStopApp(args) {
30
32
  const { appId } = args;
31
33
  await this.processManager.stopApp(appId);
32
34
  return { success: true };
33
35
  }
36
+ /**
37
+ * Stop the caller app instance.
38
+ * No explicit permission required - this endpoint only allows self-exit.
39
+ */
40
+ async handleExitApp(args) {
41
+ const { _callerAppId } = args;
42
+ if (!_callerAppId) {
43
+ throw new Error("process/exit requires caller app context");
44
+ }
45
+ await this.processManager.stopApp(_callerAppId);
46
+ return { success: true };
47
+ }
34
48
  /**
35
49
  * List all running application processes.
50
+ * Requires "process/read" permission.
36
51
  * @param showHidden - If true, includes overlay apps (hidden by default)
37
52
  */
38
53
  async handleListApps(args) {
@@ -41,19 +56,25 @@ let ProcessHandler = class ProcessHandler {
41
56
  };
42
57
  exports.ProcessHandler = ProcessHandler;
43
58
  __decorate([
44
- (0, ipc_1.EdenHandler)("launch"),
59
+ (0, ipc_1.EdenHandler)("launch", { permission: "manage" }),
45
60
  __metadata("design:type", Function),
46
61
  __metadata("design:paramtypes", [Object]),
47
62
  __metadata("design:returntype", Promise)
48
63
  ], ProcessHandler.prototype, "handleLaunchApp", null);
49
64
  __decorate([
50
- (0, ipc_1.EdenHandler)("stop"),
65
+ (0, ipc_1.EdenHandler)("stop", { permission: "manage" }),
51
66
  __metadata("design:type", Function),
52
67
  __metadata("design:paramtypes", [Object]),
53
68
  __metadata("design:returntype", Promise)
54
69
  ], ProcessHandler.prototype, "handleStopApp", null);
55
70
  __decorate([
56
- (0, ipc_1.EdenHandler)("list"),
71
+ (0, ipc_1.EdenHandler)("exit"),
72
+ __metadata("design:type", Function),
73
+ __metadata("design:paramtypes", [Object]),
74
+ __metadata("design:returntype", Promise)
75
+ ], ProcessHandler.prototype, "handleExitApp", null);
76
+ __decorate([
77
+ (0, ipc_1.EdenHandler)("list", { permission: "read" }),
57
78
  __metadata("design:type", Function),
58
79
  __metadata("design:paramtypes", [Object]),
59
80
  __metadata("design:returntype", Promise)
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessHandler.js","sourceRoot":"","sources":["../../src/process-manager/ProcessHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAoD;AAI7C,IAAM,cAAc,GAApB,MAAM,cAAc;IACjB,cAAc,CAAiB;IAEvC,YAAY,cAA8B;QACxC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED;;OAEG;IAEG,AAAN,KAAK,CAAC,eAAe,CAAC,IAGrB;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC/B,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IAEG,AAAN,KAAK,CAAC,aAAa,CAAC,IAAuB;QACzC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED;;;OAGG;IAEG,AAAN,KAAK,CAAC,cAAc,CAAC,IAA8B;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF,CAAA;AArCY,wCAAc;AAWnB;IADL,IAAA,iBAAW,EAAC,QAAQ,CAAC;;;;qDAOrB;AAMK;IADL,IAAA,iBAAW,EAAC,MAAM,CAAC;;;;mDAKnB;AAOK;IADL,IAAA,iBAAW,EAAC,MAAM,CAAC;;;;oDAGnB;yBApCU,cAAc;IAD1B,IAAA,mBAAa,EAAC,SAAS,CAAC;;GACZ,cAAc,CAqC1B"}
1
+ {"version":3,"file":"ProcessHandler.js","sourceRoot":"","sources":["../../src/process-manager/ProcessHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAoD;AAI7C,IAAM,cAAc,GAApB,MAAM,cAAc;IACjB,cAAc,CAAiB;IAEvC,YAAY,cAA8B;QACxC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED;;;OAGG;IAEG,AAAN,KAAK,CAAC,eAAe,CAAC,IAGrB;QACC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC/B,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;IAEG,AAAN,KAAK,CAAC,aAAa,CAAC,IAAuB;QACzC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED;;;OAGG;IAEG,AAAN,KAAK,CAAC,aAAa,CAAC,IAEnB;QACC,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;QAED,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IAEG,AAAN,KAAK,CAAC,cAAc,CAAC,IAA8B;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF,CAAA;AAzDY,wCAAc;AAYnB;IADL,IAAA,iBAAW,EAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;;;;qDAO/C;AAOK;IADL,IAAA,iBAAW,EAAC,MAAM,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;;;;mDAK7C;AAOK;IADL,IAAA,iBAAW,EAAC,MAAM,CAAC;;;;mDAWnB;AAQK;IADL,IAAA,iBAAW,EAAC,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;;;;oDAG3C;yBAxDU,cAAc;IAD1B,IAAA,mBAAa,EAAC,SAAS,CAAC;;GACZ,cAAc,CAyD1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"ViewCreator.d.ts","sourceRoot":"","sources":["../../src/view-manager/ViewCreator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,IAAI,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAA2B,MAAM,SAAS,CAAC;AAEhF;;;;;GAKG;AACH,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe;IANlC,OAAO,CAAC,iBAAiB,CAAwB;IACjD,OAAO,CAAC,UAAU,CAAK;gBAGJ,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,wBAAwB;IAG5D;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIrC;;OAEG;IACH,oBAAoB,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO;IAI1D;;;OAGG;IACH,mBAAmB,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM;IAQ5E;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAiBrC;;;;;OAKG;IACG,aAAa,CACjB,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,MAAM,GAAG,QAAQ,GACtB,OAAO,CAAC,OAAO,CAAC;IAsBnB;;;OAGG;IACG,cAAc,CAClB,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7C,QAAQ,EAAE,QAAQ,EAClB,YAAY,CAAC,EAAE,YAAY,EAC3B,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC;IAiDnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiB3B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAYlC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAuB/B;;;OAGG;IACI,UAAU,CACf,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,EACjC,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,QAAQ;CAsGZ"}
1
+ {"version":3,"file":"ViewCreator.d.ts","sourceRoot":"","sources":["../../src/view-manager/ViewCreator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,IAAI,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAA2B,MAAM,SAAS,CAAC;AAEhF;;;;;GAKG;AACH,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,eAAe;IANlC,OAAO,CAAC,iBAAiB,CAAwB;IACjD,OAAO,CAAC,UAAU,CAAK;gBAGJ,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,wBAAwB;IAG5D;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIrC;;OAEG;IACH,oBAAoB,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,OAAO;IAK1D;;;OAGG;IACH,mBAAmB,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM;IAQ5E;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAiBrC;;;;;OAKG;IACG,aAAa,CACjB,IAAI,EAAE,eAAe,EACrB,IAAI,EAAE,MAAM,GAAG,QAAQ,GACtB,OAAO,CAAC,OAAO,CAAC;IAsBnB;;;OAGG;IACG,cAAc,CAClB,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7C,QAAQ,EAAE,QAAQ,EAClB,YAAY,CAAC,EAAE,YAAY,EAC3B,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC;IAiDnB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiB3B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAYlC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAuB/B;;;OAGG;IACI,UAAU,CACf,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,WAAW,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,EACjC,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,QAAQ;CAsGZ"}
@@ -56,7 +56,8 @@ class ViewCreator {
56
56
  * Determine whether the app frame should be injected
57
57
  */
58
58
  shouldInjectAppFrame(windowConfig) {
59
- return windowConfig?.injections?.appFrame !== false;
59
+ const appFrameMode = windowConfig?.injections?.appFrame;
60
+ return appFrameMode !== false && appFrameMode !== "none";
60
61
  }
61
62
  /**
62
63
  * Get the CSS injection mode from window config