@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.
- package/dist/Eden.js +2 -2
- package/dist/Eden.js.map +1 -1
- package/dist/app-frame/frame-injector.js +6 -6
- package/dist/app-frame/frame-injector.js.map +3 -3
- package/dist/apps/prebuilt/com.eden.context-menu/dist/assets/{index-DUrqfNSi.js → index-B-ks_-b3.js} +1 -1
- package/dist/apps/prebuilt/com.eden.context-menu/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/{index-CEfffVHu.js → index-CokBDS24.js} +1 -1
- package/dist/apps/prebuilt/com.eden.eveshell/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.eveshell/manifest.json +9 -1
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsc +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsserver +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/CHANGELOG.md +8 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/EdenConfig.d.ts +2 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/commands.generated.d.ts +61 -15
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/global.d.ts +8 -3
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/package.json +1 -1
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsc +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsserver +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/vite +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/CHANGELOG.md +8 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/EdenConfig.d.ts +2 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/commands.generated.d.ts +61 -15
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/global.d.ts +8 -3
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/package.json +1 -1
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/esbuild +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/rollup +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/yaml +2 -2
- package/dist/apps/prebuilt/com.eden.login/dist/assets/{index-DyI95N2f.js → index-KswMPsHx.js} +1 -1
- package/dist/apps/prebuilt/com.eden.login/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.toaster/dist/assets/{index-C4cVyh7j.js → index-b5EUNXyn.js} +2 -2
- package/dist/apps/prebuilt/com.eden.toaster/dist/index.html +1 -1
- package/dist/generated/runtime.d.ts.map +1 -1
- package/dist/generated/runtime.js +6 -1
- package/dist/generated/runtime.js.map +1 -1
- package/dist/process-manager/ProcessHandler.d.ts +12 -0
- package/dist/process-manager/ProcessHandler.d.ts.map +1 -1
- package/dist/process-manager/ProcessHandler.js +24 -3
- package/dist/process-manager/ProcessHandler.js.map +1 -1
- package/dist/view-manager/ViewCreator.d.ts.map +1 -1
- package/dist/view-manager/ViewCreator.js +2 -1
- package/dist/view-manager/ViewCreator.js.map +1 -1
- package/dist/view-manager/ViewHandler.d.ts +67 -20
- package/dist/view-manager/ViewHandler.d.ts.map +1 -1
- package/dist/view-manager/ViewHandler.js +204 -122
- package/dist/view-manager/ViewHandler.js.map +1 -1
- package/package.json +4 -4
package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/{index-CEfffVHu.js → index-CokBDS24.js}
RENAMED
|
@@ -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"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).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 s(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();const Et=!0,Ft=(n,e)=>n===e,Tt=Symbol("solid-track"),Dt=Symbol("solid-dev-component"),ve={equals:Ft};let wt=St;const Z=1,Se=2,jt={},Te={};var $=null;let De=null,Mt=null,E=null,V=null,Q=null,Re=0;function le(n,e){const t=E,s=$,i=n.length===0,r=e===void 0?s:e,a=i?{owned:null,cleanups:null,context:null,owner:null}:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=i?()=>n(()=>{throw new Error("Dispose method must be an explicit argument to createRoot function")}):()=>n(()=>W(()=>fe(a)));$=a,E=null;try{return ee(o,!0)}finally{E=t,$=s}}function M(n,e){e=e?Object.assign({},ve,e):ve;const t={value:n,observers:null,observerSlots:null,comparator:e.equals||void 0};e.name&&(t.name=e.name),e.internal?t.internal=!0:Ht(t);const s=i=>(typeof i=="function"&&(i=i(t.value)),vt(t,i));return[xt.bind(t),s]}function Ut(n,e,t){const s=ge(n,e,!0,Z,t);ne(s)}function B(n,e,t){const s=ge(n,e,!1,Z,t);ne(s)}function yt(n,e,t){wt=qt;const s=ge(n,e,!1,Z,t);s.user=!0,Q?Q.push(s):ne(s)}function oe(n,e,t){t=t?Object.assign({},ve,t):ve;const s=ge(n,e,!0,0,t);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,ne(s),xt.bind(s)}function Vt(n){return n&&typeof n=="object"&&"then"in n}function bt(n,e,t){let s,i,r;typeof e=="function"?(s=n,i=e,r={}):(s=!0,i=n,r=e||{});let a=null,o=Te,l=!1,u="initialValue"in r,c=typeof s=="function"&&oe(s);const f=new Set,[d,g]=(r.storage||M)(r.initialValue),[p,m]=M(void 0),[w,S]=M(void 0,{equals:!1}),[v,L]=M(u?"ready":"unresolved");function b(A,k,j,F){return a===A&&(a=null,F!==void 0&&(u=!0),(A===o||k===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(F,{value:k})),o=Te,O(k,j)),k}function O(A,k){ee(()=>{k===void 0&&g(()=>A),L(k!==void 0?"errored":u?"ready":"unresolved"),m(k);for(const j of f.keys())j.decrement();f.clear()},!1)}function R(){const A=_t,k=d(),j=p();if(j!==void 0&&!a)throw j;return E&&E.user,k}function I(A=!0){if(A!==!1&&l)return;l=!1;const k=c?c():s;if(k==null||k===!1){b(a,W(d));return}let j;const F=o!==Te?o:W(()=>{try{return i(k,{value:d(),refetching:A})}catch(z){j=z}});if(j!==void 0){b(a,void 0,ye(j),k);return}else if(!Vt(F))return b(a,F,void 0,k),F;return a=F,"v"in F?(F.s===1?b(a,F.v,void 0,k):b(a,void 0,ye(F.v),k),F):(l=!0,queueMicrotask(()=>l=!1),ee(()=>{L(u?"refreshing":"pending"),S()},!1),F.then(z=>b(F,z,void 0,k),z=>b(F,void 0,ye(z),k)))}Object.defineProperties(R,{state:{get:()=>v()},error:{get:()=>p()},loading:{get(){const A=v();return A==="pending"||A==="refreshing"}},latest:{get(){if(!u)return R();const A=p();if(A&&!a)throw A;return d()}}});let U=$;return c?Ut(()=>(U=$,I(!1))):I(!1),[R,{refetch:A=>Kt(U,()=>I(A)),mutate:g}]}function W(n){if(E===null)return n();const e=E;E=null;try{return n()}finally{E=e}}function Je(n){yt(()=>W(n))}function Ie(n){return $===null?console.warn("cleanups created outside a `createRoot` or `render` will never be run"):$.cleanups===null?$.cleanups=[n]:$.cleanups.push(n),n}function Kt(n,e){const t=$,s=E;$=n,E=null;try{return ee(e,!0)}catch(i){qe(i)}finally{$=t,E=s}}const[ls,us]=M(!1);function Bt(n,e){const t=ge(()=>W(()=>(Object.assign(n,{[Dt]:!0}),n(e))),void 0,!0,0);return t.props=e,t.observers=null,t.observerSlots=null,t.name=n.name,t.component=n,ne(t),t.tValue!==void 0?t.tValue:t.value}function Ht(n){$&&($.sourceMap?$.sourceMap.push(n):$.sourceMap=[n],n.graph=$)}let _t;function xt(){if(this.sources&&this.state)if(this.state===Z)ne(this);else{const n=V;V=null,ee(()=>$e(this),!1),V=n}if(E){const n=this.observers?this.observers.length:0;E.sources?(E.sources.push(this),E.sourceSlots.push(n)):(E.sources=[this],E.sourceSlots=[n]),this.observers?(this.observers.push(E),this.observerSlots.push(E.sources.length-1)):(this.observers=[E],this.observerSlots=[E.sources.length-1])}return this.value}function vt(n,e,t){let s=n.value;return(!n.comparator||!n.comparator(s,e))&&(n.value=e,n.observers&&n.observers.length&&ee(()=>{for(let i=0;i<n.observers.length;i+=1){const r=n.observers[i],a=De&&De.running;a&&De.disposed.has(r),(a?!r.tState:!r.state)&&(r.pure?V.push(r):Q.push(r),r.observers&&Ct(r)),a||(r.state=Z)}if(V.length>1e6)throw V=[],Et?new Error("Potential Infinite Loop Detected."):new Error},!1)),e}function ne(n){if(!n.fn)return;fe(n);const e=Re;zt(n,n.value,e)}function zt(n,e,t){let s;const i=$,r=E;E=$=n;try{s=n.fn(e)}catch(a){return n.pure&&(n.state=Z,n.owned&&n.owned.forEach(fe),n.owned=null),n.updatedAt=t+1,qe(a)}finally{E=r,$=i}(!n.updatedAt||n.updatedAt<=t)&&(n.updatedAt!=null&&"observers"in n?vt(n,s):n.value=s,n.updatedAt=t)}function ge(n,e,t,s=Z,i){const r={fn:n,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:$,context:$?$.context:null,pure:t};return $===null?console.warn("computations created outside a `createRoot` or `render` will never be disposed"):$!==jt&&($.owned?$.owned.push(r):$.owned=[r]),i&&i.name&&(r.name=i.name),r}function Ce(n){if(n.state===0)return;if(n.state===Se)return $e(n);if(n.suspense&&W(n.suspense.inFallback))return n.suspense.effects.push(n);const e=[n];for(;(n=n.owner)&&(!n.updatedAt||n.updatedAt<Re);)n.state&&e.push(n);for(let t=e.length-1;t>=0;t--)if(n=e[t],n.state===Z)ne(n);else if(n.state===Se){const s=V;V=null,ee(()=>$e(n,e[0]),!1),V=s}}function ee(n,e){if(V)return n();let t=!1;e||(V=[]),Q?t=!0:Q=[],Re++;try{const s=n();return Jt(t),s}catch(s){t||(Q=null),V=null,qe(s)}}function Jt(n){if(V&&(St(V),V=null),n)return;const e=Q;Q=null,e.length&&ee(()=>wt(e),!1)}function St(n){for(let e=0;e<n.length;e++)Ce(n[e])}function qt(n){let e,t=0;for(e=0;e<n.length;e++){const s=n[e];s.user?n[t++]=s:Ce(s)}for(e=0;e<t;e++)Ce(n[e])}function $e(n,e){n.state=0;for(let t=0;t<n.sources.length;t+=1){const s=n.sources[t];if(s.sources){const i=s.state;i===Z?s!==e&&(!s.updatedAt||s.updatedAt<Re)&&Ce(s):i===Se&&$e(s,e)}}}function Ct(n){for(let e=0;e<n.observers.length;e+=1){const t=n.observers[e];t.state||(t.state=Se,t.pure?V.push(t):Q.push(t),t.observers&&Ct(t))}}function fe(n){let e;if(n.sources)for(;n.sources.length;){const t=n.sources.pop(),s=n.sourceSlots.pop(),i=t.observers;if(i&&i.length){const r=i.pop(),a=t.observerSlots.pop();s<i.length&&(r.sourceSlots[a]=s,i[s]=r,t.observerSlots[s]=a)}}if(n.tOwned){for(e=n.tOwned.length-1;e>=0;e--)fe(n.tOwned[e]);delete n.tOwned}if(n.owned){for(e=n.owned.length-1;e>=0;e--)fe(n.owned[e]);n.owned=null}if(n.cleanups){for(e=n.cleanups.length-1;e>=0;e--)n.cleanups[e]();n.cleanups=null}n.state=0,delete n.sourceMap}function ye(n){return n instanceof Error?n:new Error(typeof n=="string"?n:"Unknown error",{cause:n})}function qe(n,e=$){throw ye(n)}const Wt=Symbol("fallback");function Ge(n){for(let e=0;e<n.length;e++)n[e]()}function Yt(n,e,t={}){let s=[],i=[],r=[],a=0,o=e.length>1?[]:null;return Ie(()=>Ge(r)),()=>{let l=n()||[],u=l.length,c,f;return l[Tt],W(()=>{let g,p,m,w,S,v,L,b,O;if(u===0)a!==0&&(Ge(r),r=[],s=[],i=[],a=0,o&&(o=[])),t.fallback&&(s=[Wt],i[0]=le(R=>(r[0]=R,t.fallback())),a=1);else if(a===0){for(i=new Array(u),f=0;f<u;f++)s[f]=l[f],i[f]=le(d);a=u}else{for(m=new Array(u),w=new Array(u),o&&(S=new Array(u)),v=0,L=Math.min(a,u);v<L&&s[v]===l[v];v++);for(L=a-1,b=u-1;L>=v&&b>=v&&s[L]===l[b];L--,b--)m[b]=i[L],w[b]=r[L],o&&(S[b]=o[L]);for(g=new Map,p=new Array(b+1),f=b;f>=v;f--)O=l[f],c=g.get(O),p[f]=c===void 0?-1:c,g.set(O,f);for(c=v;c<=L;c++)O=s[c],f=g.get(O),f!==void 0&&f!==-1?(m[f]=i[c],w[f]=r[c],o&&(S[f]=o[c]),f=p[f],g.set(O,f)):r[c]();for(f=v;f<u;f++)f in m?(i[f]=m[f],r[f]=w[f],o&&(o[f]=S[f],o[f](f))):i[f]=le(d);i=i.slice(0,a=u),s=l.slice(0)}return i});function d(g){if(r[f]=g,o){const[p,m]=M(f,{name:"index"});return o[f]=m,e(l[f],p)}return e(l[f])}}}function D(n,e){return Bt(n,e||{})}const Gt=n=>`Attempting to access a stale value from <${n}> that could possibly be undefined. This may occur because you are reading the accessor returned from the component at a time where it has already been unmounted. We recommend cleaning up any stale timers or async, or reading from the initial condition.`;function Ve(n){const e="fallback"in n&&{fallback:()=>n.fallback};return oe(Yt(()=>n.each,n.children,e||void 0),void 0,{name:"value"})}function X(n){const e=n.keyed,t=oe(()=>n.when,void 0,{name:"condition value"}),s=e?t:oe(t,void 0,{equals:(i,r)=>!i==!r,name:"condition"});return oe(()=>{const i=s();if(i){const r=n.children;return typeof r=="function"&&r.length>0?W(()=>r(e?i:()=>{if(!W(s))throw Gt("Show");return t()})):r}return n.fallback},void 0,{name:"value"})}globalThis&&(globalThis.Solid$$?console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior."):globalThis.Solid$$=!0);const $t=n=>oe(()=>n());function Qt(n,e,t){let s=t.length,i=e.length,r=s,a=0,o=0,l=e[i-1].nextSibling,u=null;for(;a<i||o<r;){if(e[a]===t[o]){a++,o++;continue}for(;e[i-1]===t[r-1];)i--,r--;if(i===a){const c=r<s?o?t[o-1].nextSibling:t[r-o]:l;for(;o<r;)n.insertBefore(t[o++],c)}else if(r===o)for(;a<i;)(!u||!u.has(e[a]))&&e[a].remove(),a++;else if(e[a]===t[r-1]&&t[o]===e[i-1]){const c=e[--i].nextSibling;n.insertBefore(t[o++],e[a++].nextSibling),n.insertBefore(t[--r],c),e[i]=t[r]}else{if(!u){u=new Map;let f=o;for(;f<r;)u.set(t[f],f++)}const c=u.get(e[a]);if(c!=null)if(o<c&&c<r){let f=a,d=1,g;for(;++f<i&&f<r&&!((g=u.get(e[f]))==null||g!==c+d);)d++;if(d>c-o){const p=e[a];for(;o<c;)n.insertBefore(t[o++],p)}else n.replaceChild(t[o++],e[a++])}else a++;else e[a++].remove()}}}const Qe="_$DX_DELEGATE";function Xt(n,e,t,s={}){if(!e)throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");let i;return le(r=>{i=r,e===document?n():P(e,n(),e.firstChild?null:void 0,t)},s.owner),()=>{i(),e.textContent=""}}function H(n,e,t,s){let i;const r=()=>{const o=document.createElement("template");return o.innerHTML=n,o.content.firstChild},a=()=>(i||(i=r())).cloneNode(!0);return a.cloneNode=a,a}function pe(n,e=window.document){const t=e[Qe]||(e[Qe]=new Set);for(let s=0,i=n.length;s<i;s++){const r=n[s];t.has(r)||(t.add(r),e.addEventListener(r,Zt))}}function G(n,e,t){t==null?n.removeAttribute(e):n.setAttribute(e,t)}function Pe(n,e,t,s){Array.isArray(t)?(n[`$$${e}`]=t[0],n[`$$${e}Data`]=t[1]):n[`$$${e}`]=t}function Ke(n,e,t){return W(()=>n(e,t))}function P(n,e,t,s){if(t!==void 0&&!s&&(s=[]),typeof e!="function")return Ae(n,e,s,t);B(i=>Ae(n,e(),i,t),s)}function Zt(n){let e=n.target;const t=`$$${n.type}`,s=n.target,i=n.currentTarget,r=l=>Object.defineProperty(n,"target",{configurable:!0,value:l}),a=()=>{const l=e[t];if(l&&!e.disabled){const u=e[`${t}Data`];if(u!==void 0?l.call(e,u,n):l.call(e,n),n.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(n.target)&&r(e.host),!0},o=()=>{for(;a()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(n,"currentTarget",{configurable:!0,get(){return e||document}}),n.composedPath){const l=n.composedPath();r(l[0]);for(let u=0;u<l.length-2&&(e=l[u],!!a());u++){if(e._$host){e=e._$host,o();break}if(e.parentNode===i)break}}else o();r(s)}function Ae(n,e,t,s,i){for(;typeof t=="function";)t=t();if(e===t)return t;const r=typeof e,a=s!==void 0;if(n=a&&t[0]&&t[0].parentNode||n,r==="string"||r==="number"){if(r==="number"&&(e=e.toString(),e===t))return t;if(a){let o=t[0];o&&o.nodeType===3?o.data!==e&&(o.data=e):o=document.createTextNode(e),t=se(n,t,s,o)}else t!==""&&typeof t=="string"?t=n.firstChild.data=e:t=n.textContent=e}else if(e==null||r==="boolean")t=se(n,t,s);else{if(r==="function")return B(()=>{let o=e();for(;typeof o=="function";)o=o();t=Ae(n,o,t,s)}),()=>t;if(Array.isArray(e)){const o=[],l=t&&Array.isArray(t);if(Be(o,e,t,i))return B(()=>t=Ae(n,o,t,s,!0)),()=>t;if(o.length===0){if(t=se(n,t,s),a)return t}else l?t.length===0?Xe(n,o,s):Qt(n,t,o):(t&&se(n),Xe(n,o));t=o}else if(e.nodeType){if(Array.isArray(t)){if(a)return t=se(n,t,s,e);se(n,t,null,e)}else t==null||t===""||!n.firstChild?n.appendChild(e):n.replaceChild(e,n.firstChild);t=e}else console.warn("Unrecognized value. Skipped inserting",e)}return t}function Be(n,e,t,s){let i=!1;for(let r=0,a=e.length;r<a;r++){let o=e[r],l=t&&t[n.length],u;if(!(o==null||o===!0||o===!1))if((u=typeof o)=="object"&&o.nodeType)n.push(o);else if(Array.isArray(o))i=Be(n,o,l)||i;else if(u==="function")if(s){for(;typeof o=="function";)o=o();i=Be(n,Array.isArray(o)?o:[o],Array.isArray(l)?l:[l])||i}else n.push(o),i=!0;else{const c=String(o);l&&l.nodeType===3&&l.data===c?n.push(l):n.push(document.createTextNode(c))}}return i}function Xe(n,e,t=null){for(let s=0,i=e.length;s<i;s++)n.insertBefore(e[s],t)}function se(n,e,t,s){if(t===void 0)return n.textContent="";const i=s||document.createTextNode("");if(e.length){let r=!1;for(let a=e.length-1;a>=0;a--){const o=e[a];if(i!==o){const l=o.parentNode===n;!r&&!a?l?n.replaceChild(i,o):n.insertBefore(i,t):l&&o.remove()}else r=!0}}else n.insertBefore(i,t);return[i]}const We=()=>{if(typeof window>"u")throw new Error("contextMenu can only be used in a browser environment.");const n=window.edenAPI;if(!n)throw new Error("edenAPI is not available on window.");return n},He=new Map;let Ze=!1,be=null,et=!1;const Pt=(n,e)=>{be={x:n,y:e}},tt=n=>{Pt(n.clientX,n.clientY)},nt=n=>{const e=n.touches[0]||n.changedTouches[0];e&&Pt(e.clientX,e.clientY)},At=()=>{et||typeof window>"u"||(et=!0,window.addEventListener("pointermove",tt,{passive:!0}),window.addEventListener("mousemove",tt,{passive:!0}),window.addEventListener("touchstart",nt,{passive:!0}),window.addEventListener("touchmove",nt,{passive:!0}))},en=n=>{if(n){if("clientX"in n&&"clientY"in n)return{left:n.clientX,top:n.clientY};if("touches"in n){const e=n.touches[0]||n.changedTouches[0];if(e)return{left:e.clientX,top:e.clientY}}}},tn=n=>{if(n.type!=="item")return n;const{onSelect:e,...t}=n;return t},nn=async()=>{if(Ze)return;Ze=!0,await We().subscribe("context-menu/closed",e=>{const t=He.get(e.requestId);t&&(He.delete(e.requestId),t(e))})},Ye=async n=>{At(),await nn();const e=n.position||en(n.event)||(be?{left:be.x,top:be.y}:void 0)||{left:Math.round(window.innerWidth/2),top:Math.round(window.innerHeight/2)},t=We(),{requestId:s}=await t.shellCommand("context-menu/open",{title:n.title,position:e,items:n.items.map(tn)});return new Promise(i=>{He.set(s,r=>{(async()=>{try{if(r.itemId){const o=n.items.find(l=>l.type==="item"&&l.id===r.itemId);o?.onSelect&&await o.onSelect()}else r.reason==="dismiss"&&n.onDismiss&&await n.onDismiss();n.onClose&&await n.onClose()}catch(o){console.error("Context menu handler failed:",o)}finally{i(r)}})()})})},sn=async n=>Ye({...n}),rn=n=>(At(),e=>{"preventDefault"in e&&typeof e.preventDefault=="function"&&e.preventDefault(),"stopPropagation"in e&&typeof e.stopPropagation=="function"&&e.stopPropagation();const t=n(e);Ye({...t,event:e}).catch(s=>{console.error("Failed to open context menu:",s),t.onClose&&t.onClose()})}),on=async n=>{await We().shellCommand("context-menu/close",{requestId:n})},_e={open:Ye,openAtCursor:sn,createHandler:rn,close:on},kt=n=>({__brand:"title",text:n}),ue=(n,e,t,s)=>({type:"item",id:n,label:e,onSelect:t,...s}),an=(n,e,t)=>n?e:t??null,ln=n=>e=>{const t=n(e),s=t.find(r=>r!=null&&typeof r=="object"&&"__brand"in r&&r.__brand==="title"),i=t.filter(r=>r!=null&&typeof r=="object"&&!("__brand"in r));return{title:s?.text,items:i}},Lt=n=>{const e=ln(n);return{build:e,show:async(t,s)=>{await _e.open({...e(t),position:s})},handler:t=>{const s=typeof t=="function"?t:()=>t;return _e.createHandler(()=>e(s()))}}},x=n=>typeof n=="string",ae=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},st=n=>n==null?"":""+n,un=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},cn=/###/g,it=n=>n&&n.indexOf("###")>-1?n.replace(cn,"."):n,rt=n=>!n||x(n),ce=(n,e,t)=>{const s=x(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(rt(n))return{};const r=it(s[i]);!n[r]&&t&&(n[r]=new t),Object.prototype.hasOwnProperty.call(n,r)?n=n[r]:n={},++i}return rt(n)?{}:{obj:n,k:it(s[i])}},ot=(n,e,t)=>{const{obj:s,k:i}=ce(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let r=e[e.length-1],a=e.slice(0,e.length-1),o=ce(n,a,Object);for(;o.obj===void 0&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),o=ce(n,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},dn=(n,e,t,s)=>{const{obj:i,k:r}=ce(n,e,Object);i[r]=i[r]||[],i[r].push(t)},ke=(n,e)=>{const{obj:t,k:s}=ce(n,e);if(t)return t[s]},fn=(n,e,t)=>{const s=ke(n,t);return s!==void 0?s:ke(e,t)},Ot=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?x(n[s])||n[s]instanceof String||x(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):Ot(n[s],e[s],t):n[s]=e[s]);return n},ie=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const gn=n=>x(n)?n.replace(/[&<>"'\/]/g,e=>hn[e]):n;class pn{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 s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const mn=[" ",",","?","!",";"],wn=new pn(20),yn=(n,e,t)=>{e=e||"",t=t||"";const s=mn.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const i=wn.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(n);if(!r){const a=n.indexOf(t);a>0&&!i.test(n.substring(0,a))&&(r=!0)}return r},ze=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const s=e.split(t);let i=n;for(let r=0;r<s.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=r;l<s.length;++l)if(l!==r&&(o+=t),o+=s[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<s.length-1)continue;r+=l-r+1;break}i=a}return i},Le=n=>n&&n.replace("_","-"),bn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class Oe{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||bn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(x(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Oe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Oe(this.logger,e)}}var q=new Oe;class Ee{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].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,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...s])})}}class at extends Ee{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,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):x(s)&&r?o.push(...s.split(r)):o.push(s)));const l=ke(this.data,o);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),l||!a||!x(s)?l:ze(this.data&&this.data[e]&&this.data[e][t],s,r)}addResource(e,t,s,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),ot(this.data,o,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in s)(x(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let l=ke(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?Ot(l,s,r):l={...l,...s},ot(this.data,o,l),a.silent||this.emit("added",e,t,s)}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 Nt={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,s,i))}),e}};const lt={};class Ne extends Ee{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),un(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=q.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 s=this.resolve(e,t);return s&&s.res!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!yn(e,s,i);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:x(r)?[r]:r};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:x(r)?[r]:r}}translate(e,t,s){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:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.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}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${b}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}const f=this.resolve(e,t);let d=f&&f.res;const g=f&&f.usedKey||a,p=f&&f.exactUsedKey||a,m=Object.prototype.toString.apply(d),w=["[object Number]","[object Function]","[object RegExp]"],S=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,L=!x(d)&&typeof d!="boolean"&&typeof d!="number";if(v&&d&&L&&w.indexOf(m)<0&&!(x(S)&&Array.isArray(d))){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(g,d,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=b,f.usedParams=this.getUsedParamsDetails(t),f):b}if(r){const b=Array.isArray(d),O=b?[]:{},R=b?p:g;for(const I in d)if(Object.prototype.hasOwnProperty.call(d,I)){const U=`${R}${r}${I}`;O[I]=this.translate(U,{...t,joinArrays:!1,ns:o}),O[I]===U&&(O[I]=d[I])}d=O}}else if(v&&x(S)&&Array.isArray(d))d=d.join(S),d&&(d=this.extendTranslation(d,e,t,s));else{let b=!1,O=!1;const R=t.count!==void 0&&!x(t.count),I=Ne.hasDefaultValue(t),U=R?this.pluralResolver.getSuffix(u,t.count,t):"",A=t.ordinal&&R?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",k=R&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),j=k&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${U}`]||t[`defaultValue${A}`]||t.defaultValue;!this.isValidLookup(d)&&I&&(b=!0,d=j),this.isValidLookup(d)||(O=!0,d=a);const z=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:d,J=I&&j!==d&&this.options.updateMissing;if(O||b||J){if(this.logger.log(J?"updateKey":"missingKey",u,l,a,J?j:d),r){const h=this.resolve(a,{...t,keySeparator:!1});h&&h.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 _=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let h=0;h<N.length;h++)_.push(N[h]);else this.options.saveMissingTo==="all"?_=this.languageUtils.toResolveHierarchy(t.lng||this.language):_.push(t.lng||this.language);const te=(h,y,C)=>{const Y=I&&C!==d?C:z;this.options.missingKeyHandler?this.options.missingKeyHandler(h,l,y,Y,J,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(h,l,y,Y,J,t),this.emit("missingKey",h,l,y,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?_.forEach(h=>{const y=this.pluralResolver.getSuffixes(h,t);k&&t[`defaultValue${this.options.pluralSeparator}zero`]&&y.indexOf(`${this.options.pluralSeparator}zero`)<0&&y.push(`${this.options.pluralSeparator}zero`),y.forEach(C=>{te([h],a+C,t[`defaultValue${C}`]||j)})}):te(_,a,j))}d=this.extendTranslation(d,e,t,f,s),O&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${a}`),(O||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,b?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(t),f):d}extendTranslation(e,t,s,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const u=x(e)&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let f=s.replace&&!x(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,s.lng||this.language||i.usedLng,s),u){const d=e.match(this.interpolator.nestingRegexp),g=d&&d.length;c<g&&(s.nest=!1)}!s.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var d=arguments.length,g=new Array(d),p=0;p<d;p++)g[p]=arguments[p];return r&&r[0]===g[0]&&!s.context?(a.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`),null):a.translate(...g,t)},s)),s.interpolation&&this.interpolator.reset()}const o=s.postProcess||this.options.postProcess,l=x(o)?[o]:o;return e!=null&&l&&l.length&&s.applyPostProcessor!==!1&&(e=Nt.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,i,r,a,o;return x(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=t.count!==void 0&&!x(t.count),g=d&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),p=t.context!==void 0&&(x(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(w=>{this.isValidLookup(s)||(o=w,!lt[`${m[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(lt[`${m[0]}-${w}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),m.forEach(S=>{if(this.isValidLookup(s))return;a=S;const v=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,c,S,w,t);else{let b;d&&(b=this.pluralResolver.getSuffix(S,t.count,t));const O=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(c+b),t.ordinal&&b.indexOf(R)===0&&v.push(c+b.replace(R,this.options.pluralSeparator)),g&&v.push(c+O)),p){const I=`${c}${this.options.contextSeparator}${t.context}`;v.push(I),d&&(v.push(I+b),t.ordinal&&b.indexOf(R)===0&&v.push(I+b.replace(R,this.options.pluralSeparator)),g&&v.push(I+O))}}let L;for(;L=v.pop();)this.isValidLookup(s)||(r=L,s=this.getResource(S,w,L,t))}))})}),{res:s,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,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"],s=e.replace&&!x(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}const je=n=>n.charAt(0).toUpperCase()+n.slice(1);class ut{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=q.create("languageUtils")}getScriptPartFromCode(e){if(e=Le(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=Le(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(x(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 s=e.split("-");return this.options.lowerCaseLng?s=s.map(i=>i.toLowerCase()):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=je(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=je(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=je(s[2].toLowerCase()))),s.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(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getLanguagePartFromCode(s);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)),x(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return x(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))):x(e)&&r(this.formatLanguageCode(e)),s.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}}let xn=[{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}],vn={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const Sn=["v1","v2","v3"],Cn=["v4"],ct={zero:0,one:1,two:2,few:3,many:4,other:5},$n=()=>{const n={};return xn.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:vn[e.fc]}})}),n};class Pn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=q.create("pluralResolver"),(!this.options.compatibilityJSON||Cn.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=$n(),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 s=Le(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(s,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[r]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((i,r)=>ct[i]-ct[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):s.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.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 s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[s];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&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!Sn.includes(this.options.compatibilityJSON)}}const dt=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=fn(n,e,t);return!r&&i&&x(t)&&(r=ze(n,t,s),r===void 0&&(r=ze(e,t,s))),r},Me=n=>n.replace(/\$/g,"$$$$");class An{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=q.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:s,useRawValueToEscape:i,prefix:r,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:g,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:w,maxReplaces:S,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?ie(r):a||"{{",this.suffix=o?ie(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?ie(d):g||ie("$t("),this.nestingSuffix=p?ie(p):m||ie(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=S||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t&&t.source===s?(t.lastIndex=0,t):new RegExp(s,"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,s,i){let r,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const S=dt(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,s,{...i,...t,interpolationkey:g}):S}const p=g.split(this.formatSeparator),m=p.shift().trim(),w=p.join(this.formatSeparator).trim();return this.format(dt(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),w,s,{...i,...t,interpolationkey:m})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Me(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Me(this.escape(g)):Me(g)}].forEach(g=>{for(o=0;r=g.regex.exec(e);){const p=r[1].trim();if(a=u(p),a===void 0)if(typeof c=="function"){const w=c(e,r,i);a=x(w)?w:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))a="";else if(f){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),a="";else!x(a)&&!this.useRawValueToEscape&&(a=st(a));const m=g.safeValue(a);if(e=e.replace(r[0],m),f?(g.regex.lastIndex+=a.length,g.regex.lastIndex-=r[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;const o=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,a);const g=d.match(/'/g),p=d.match(/"/g);(g&&g.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),u&&(a={...u,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...s},a=a.replace&&!x(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),l=c,u=!0}if(r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&!x(r))return r;x(r)||(r=st(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((c,f)=>this.format(c,f,s.lng,{...s,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const kn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[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(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.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}},re=n=>{const e={};return(t,s,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const a=s+JSON.stringify(r);let o=e[a];return o||(o=n(Le(s),i),e[a]=o),o(t)}};class Ln{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=q.create("formatter"),this.options=e,this.formats={number:re((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return r=>i.format(r)}),currency:re((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return r=>i.format(r)}),datetime:re((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return r=>i.format(r)}),relativetime:re((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return r=>i.format(r,s.range||"day")}),list:re((t,s)=>{const i=new Intl.ListFormat(t,{...s});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()]=re(t)}format(e,t,s){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(o=>o.indexOf(")")>-1)){const o=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,l)=>{const{formatName:u,formatOptions:c}=kn(l);if(this.formats[u]){let f=o;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=d.locale||d.lng||i.locale||i.lng||s;f=this.formats[u](o,g,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const On=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class Nn extends Ee{constructor(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=q.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(s,i.backend,i)}queueLoad(e,t,s,i){const r={},a={},o={},l={};return e.forEach(u=>{let c=!0;t.forEach(f=>{const d=`${u}|${f}`;!s.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,c=!1,a[d]===void 0&&(a[d]=!0),r[d]===void 0&&(r[d]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(o[u]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&s&&this.store.addResourceBundle(r,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(l=>{dn(l.loaded,[r],a),On(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,r*2,a)},r);return}a(u,c)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t){let s=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();x(e)&&(e=this.languageUtils.toResolveHierarchy(e)),x(t)&&(t=[t]);const r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=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 "${s}" 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(!(s==null||s==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,s,i,l):c=u(e,t,s,i),c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}else u(e,t,s,i,o,l)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const ft=()=>({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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),x(n[1])&&(e.defaultValue=n[1]),x(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),ht=n=>(x(n.ns)&&(n.ns=[n.ns]),x(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),x(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),me=()=>{},Rn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class he extends Ee{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ht(e),this.services={},this.logger=q,this.modules={external:[]},Rn(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]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(x(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=ft();this.options={...i,...this.options,...ht(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?q.init(r(this.modules.logger),this.options):q.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Ln);const f=new ut(this.options);this.store=new at(this.options.resources,this.options);const d=this.services;d.logger=q,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Pn(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=r(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new An(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Nn(r(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(g){for(var p=arguments.length,m=new Array(p>1?p-1:0),w=1;w<p;w++)m[w-1]=arguments[w];e.emit(g,...m)}),this.modules.languageDetector&&(d.languageDetector=r(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=r(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Ne(this.services,this.options),this.translator.on("*",function(g){for(var p=arguments.length,m=new Array(p>1?p-1:0),w=1;w<p;w++)m[w-1]=arguments[w];e.emit(g,...m)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,s||(s=me),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=ae(),u=()=>{const c=(f,d)=>{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(d),s(f,d)};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 s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:me;const i=x(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const r=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(o)})}else s(null)}reloadResources(e,t,s){const i=ae();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=me),this.services.backendConnector.reload(e,t,r=>{i.resolve(),s(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"&&Nt.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 s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const i=ae();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(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 s.t(...arguments)}),t&&t(l,function(){return s.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=x(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=>{a(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,s){var i=this;const r=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f<u;f++)c[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([a,o].concat(c))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||r.keyPrefix);const d=i.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(p=>`${l.keyPrefix}${d}${p}`):g=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a,i.t(g,l)};return x(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,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 s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const s=ae();return this.options.ns?(x(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=ae();x(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(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"],s=this.services&&this.services.languageUtils||new ut(ft());return t.indexOf(s.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 he(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:me;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new he(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s&&(r.store=new at(this.store.data,i),r.services.resourceStore=r.store),r.translator=new Ne(r.services,i),r.translator.on("*",function(o){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(o,...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 K=he.createInstance();K.createInstance=he.createInstance;K.createInstance;K.dir;K.init;K.loadResources;K.reloadResources;K.use;K.changeLanguage;K.getFixedT;K.t;K.exists;K.setDefaultNamespace;K.hasLoadedNamespace;K.loadNamespaces;K.loadLanguages;async function In(n={}){const e=K.createInstance(),t=n.resources||{};return await e.init({lng:"en",fallbackLng:n.fallbackLng||"en",debug:n.debug||!1,resources:t,interpolation:{escapeValue:!1},partialBundledLanguages:!0}),e}async function En(n,e){try{const t=window.edenAPI;if(!t)return;const s=await t.shellCommand("i18n/get-common",{locale:e});s?.translations&&n.addResourceBundle(e,"translation",s.translations,!0,!0)}catch(t){console.error("Failed to load common translations",t)}}function Ue(n,e="en"){return n?typeof n=="string"?n:n[e]||n.en||Object.values(n)[0]||"":""}function Fn(n={}){return le(()=>{const[e,t]=M("en"),[s]=bt(async()=>await In(n)),i=((o,l)=>{const u=s();return u?u.t(o,{lng:e(),...l}):o}),r=async o=>{const l=s();l&&(await En(l,o),await l.changeLanguage(o)),t(o)};return{t:i,locale:e,setLocale:t,initLocale:async()=>{try{const o=window.edenAPI;if(!o){console.warn("Eden API not found, using default locale");return}const l=c=>{r(c.locale)};Ie(()=>{o.unsubscribe("i18n/locale-changed",l)});const u=await o.shellCommand("i18n/get-locale",{});u?.locale&&await r(u.locale),await o.subscribe("i18n/locale-changed",l)}catch(o){console.error("Failed to load system locale",o)}}}})}const Tn={shell:{allApps:"All Apps",searchApps:"Search apps...",noAppsFound:"No apps found",openApp:"Open",stopApp:"Stop App",addToDock:"Add to Dock",removeFromDock:"Remove from Dock",signIn:"Sign in",switchUser:"Switch User",logout:"Log out",currentUser:"Current",changePassword:"Change password",currentPassword:"Current password",newPassword:"New password",confirmPassword:"Confirm new password",savePassword:"Save password",passwordMismatch:"Passwords do not match",passwordUpdateFailed:"Failed to update password"}},Dn={shell:{allApps:"Aplikacje",searchApps:"Szukaj aplikacji...",noAppsFound:"Nie znaleziono aplikacji",openApp:"Otwórz",stopApp:"Zatrzymaj Aplikację",addToDock:"Dodaj do Docka",removeFromDock:"Usuń z Docka",signIn:"Zaloguj",switchUser:"Przełącz użytkownika",logout:"Wyloguj",currentUser:"Aktualny",changePassword:"Zmień hasło",currentPassword:"Aktualne hasło",newPassword:"Nowe hasło",confirmPassword:"Potwierdź nowe hasło",savePassword:"Zapisz hasło",passwordMismatch:"Hasła nie są takie same",passwordUpdateFailed:"Nie udało się zmienić hasła"}},jn={en:{translation:Tn},pl:{translation:Dn}},{t:T,locale:de,setLocale:cs,initLocale:Mn}=Fn({resources:jn}),Un=n=>Lt(e=>{const t=n.isPinned(e.id);return[kt(e.name),an(e.isRunning,ue("stop",T("shell.stopApp"),()=>n.stop(e.id),{icon:"stop-circle"}),ue("open",T("shell.openApp"),()=>n.open(e.id),{icon:"play"})),ue("dock",T(t?"shell.removeFromDock":"shell.addToDock"),()=>(t?n.removeFromDock:n.addToDock)(e.id),{icon:t?"bookmark":"plus"})]}),Vn=n=>Lt(e=>[kt(e?.name??T("shell.signIn")),e&&ue("changePassword",T("shell.changePassword"),n.changePassword,{icon:"key"}),e&&ue("logout",T("shell.logout"),n.logout,{icon:"log-out",danger:!0})]),Kn="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='32'%20y1='4'%20x2='32'%20y2='60'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234a4a4a'/%3e%3cstop%20offset='1'%20stop-color='%233a3a3a'/%3e%3c/linearGradient%3e%3c/defs%3e%3c!--%20Squircle%20background%20with%20gradient%20--%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='14'%20fill='url(%23bg)'/%3e%3c!--%20Document%20lines%20icon%20centered%20--%3e%3cg%20transform='translate(16,%2016)'%20fill='%23e0e0e0'%3e%3crect%20x='5'%20y='6'%20width='22'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='13'%20width='22'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='20'%20width='15'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='27'%20width='22'%20height='3'%20rx='1.5'/%3e%3c/g%3e%3c/svg%3e",we=new Map;async function Bn(n){if(we.has(n))return we.get(n);try{const e=await window.edenAPI.shellCommand("package/get-icon",{appId:n});return we.set(n,e.icon),e.icon}catch(e){console.warn(`Failed to fetch icon for ${n}:`,e),we.set(n,void 0);return}}var Hn=H("<div class=running-indicator>"),_n=H("<div class=app-icon><div class=icon-container><img></div><div class=app-name>");function xe(n){const[e]=bt(()=>n.icon?null:n.appId,s=>s?Bn(s):Promise.resolve(void 0)),t=()=>n.icon||e()||Kn;return(()=>{var s=_n(),i=s.firstChild,r=i.firstChild,a=i.nextSibling;return Pe(s,"contextmenu",n.onContextMenu),Pe(s,"click",n.onClick),G(r,"draggable",!1),P(i,D(X,{get when(){return n.isRunning},get children(){return Hn()}}),null),P(a,()=>n.appName),B(o=>{var l=n.appName,u=t(),c=n.appName;return l!==o.e&&G(s,"title",o.e=l),u!==o.t&&G(r,"src",o.t=u),c!==o.a&&G(r,"alt",o.a=c),o},{e:void 0,t:void 0,a:void 0}),s})()}pe(["click","contextmenu"]);var zn=H('<div class="eden-text-tertiary eden-text-md"style="grid-column:1 / -1;text-align:center;padding:var(--eden-space-2xl)">'),Jn=H('<div class=eden-modal-overlay style=background:rgba(0,0,0,0.4);backdrop-filter:none><div class="eden-modal eden-modal-lg"style=max-height:70vh;background:var(--eden-color-surface-primary)><div class=eden-modal-header><div class="eden-flex eden-gap-sm"style=flex:1><input type=text class=eden-input></div></div><div class="eden-modal-body eden-scrollbar"><div class=eden-card-grid style=gap:var(--eden-space-lg)>'),qn=H('<div class="all-apps-tile eden-interactive">');function Wn(n){const[e,t]=M("");let s;const i=()=>{const l=e().toLowerCase().trim();return l?n.apps.filter(u=>u.name.toLowerCase().includes(l)||u.id.toLowerCase().includes(l)):n.apps};Je(()=>{s?.focus()});function r(){_e.close(),n.onClose()}async function a(l){r();const u=n.apps.filter(c=>c.isRunning).map(c=>c.id);for(const c of u)try{await window.edenAPI.shellCommand("view/set-view-visibility",{appId:c,visible:!0})}catch(f){console.error(`Failed to set visibility for ${c}:`,f)}await n.onAppClick(l)}function o(l){l.key==="Escape"&&r()}return(()=>{var l=Jn(),u=l.firstChild,c=u.firstChild,f=c.firstChild,d=f.firstChild,g=c.nextSibling,p=g.firstChild;l.$$keydown=o,l.$$click=r,u.$$click=w=>w.stopPropagation(),d.$$input=w=>t(w.currentTarget.value);var m=s;return typeof m=="function"?Ke(m,d):s=d,P(p,D(Ve,{get each(){return i()},children:w=>(()=>{var S=qn();return Pe(S,"contextmenu",n.appMenu.handler(w)),S.$$click=()=>a(w.id),P(S,D(xe,{get appId(){return w.id},get appName(){return w.name},get isRunning(){return w.isRunning}})),B(()=>S.classList.toggle("running",!!w.isRunning)),S})()}),null),P(p,D(X,{get when(){return i().length===0},get children(){var w=zn();return P(w,()=>T("shell.noAppsFound")),w}}),null),B(()=>G(d,"placeholder",T("shell.searchApps"))),B(()=>d.value=e()),l})()}pe(["click","keydown","input","contextmenu"]);var Yn=H("<div class=eden-text-xs style=color:var(--eden-color-danger)>"),Gn=H('<div class=eden-modal-overlay><div class="eden-modal eden-modal-sm"><div class=eden-modal-header><h3 class=eden-modal-title></h3><button class=eden-modal-close>×</button></div><div class=eden-modal-body><div class=eden-form-group><label class=eden-form-label></label><input type=password class=eden-input></div><div class=eden-form-group><label class=eden-form-label></label><input type=password class=eden-input></div><div class=eden-form-group><label class=eden-form-label></label><input type=password class=eden-input></div></div><div class=eden-modal-footer><button class=eden-btn></button><button class="eden-btn eden-btn-primary">');const Qn=n=>{const[e,t]=M(""),[s,i]=M(""),[r,a]=M(""),[o,l]=M(null),u=()=>{t(""),i(""),a(""),l(null)},c=()=>{n.onClose(),u()},f=async()=>{if(!e()||!s()||!r())return;if(s()!==r()){l(T("shell.passwordMismatch"));return}const p=await n.onSubmit({currentPassword:e(),newPassword:s()});if(p.success){c();return}l(p.error||T("shell.passwordUpdateFailed"))},d=p=>{p.key==="Enter"&&f(),p.key==="Escape"&&c()},g=()=>!!e()&&!!s()&&!!r()&&s()===r();return D(X,{get when(){return n.show},get children(){var p=Gn(),m=p.firstChild,w=m.firstChild,S=w.firstChild,v=S.nextSibling,L=w.nextSibling,b=L.firstChild,O=b.firstChild,R=O.nextSibling,I=b.nextSibling,U=I.firstChild,A=U.nextSibling,k=I.nextSibling,j=k.firstChild,F=j.nextSibling,z=L.nextSibling,J=z.firstChild,_=J.nextSibling;return p.$$click=c,m.$$click=N=>N.stopPropagation(),P(S,()=>T("shell.changePassword")),v.$$click=c,P(O,()=>T("shell.currentPassword")),R.$$keydown=d,R.$$input=N=>{t(N.currentTarget.value),l(null)},P(U,()=>T("shell.newPassword")),A.$$keydown=d,A.$$input=N=>{i(N.currentTarget.value),l(null)},P(j,()=>T("shell.confirmPassword")),F.$$keydown=d,F.$$input=N=>{a(N.currentTarget.value),l(null)},P(L,D(X,{get when(){return o()},get children(){var N=Yn();return P(N,o),N}}),null),J.$$click=c,P(J,()=>T("common.cancel")),_.$$click=f,P(_,()=>T("shell.savePassword")),B(N=>{var te=T("shell.currentPassword"),h=T("shell.newPassword"),y=T("shell.confirmPassword"),C=!g();return te!==N.e&&G(R,"placeholder",N.e=te),h!==N.t&&G(A,"placeholder",N.t=h),y!==N.a&&G(F,"placeholder",N.a=y),C!==N.o&&(_.disabled=N.o=C),N},{e:void 0,t:void 0,a:void 0,o:void 0}),B(()=>R.value=e()),B(()=>A.value=s()),B(()=>F.value=r()),p}})};pe(["click","input","keydown"]);const Xn="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='32'%20y1='4'%20x2='32'%20y2='60'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234a4a4a'/%3e%3cstop%20offset='1'%20stop-color='%233a3a3a'/%3e%3c/linearGradient%3e%3c/defs%3e%3c!--%20Squircle%20background%20with%20gradient%20--%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='14'%20fill='url(%23bg)'/%3e%3c!--%20Grid%20of%204%20squares%20icon%20centered%20--%3e%3cg%20transform='translate(16,%2016)'%20fill='%23e0e0e0'%3e%3crect%20x='2'%20y='2'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='18'%20y='2'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='2'%20y='18'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='18'%20y='18'%20width='12'%20height='12'%20rx='2'/%3e%3c/g%3e%3c/svg%3e";var Zn=H("<div class=clock><div class=time></div><div class=date>");function es(){const[n,e]=M(new Date),t=setInterval(()=>{e(new Date)},1e3);Ie(()=>clearInterval(t));const s=()=>n().toLocaleTimeString(de(),{hour:"2-digit",minute:"2-digit"}),i=()=>n().toLocaleDateString(de(),{weekday:"short",month:"short",day:"numeric"});return(()=>{var r=Zn(),a=r.firstChild,o=a.nextSibling;return P(a,s),P(o,i),r})()}var ts=H('<button type=button class=user-badge><div class="eden-avatar eden-avatar-md"></div><span class=user-badge-name>');const ns=n=>n.trim().split(/\s+/).map(s=>s[0]).join("").slice(0,2).toUpperCase();function ss(n){return(()=>{var e=ts(),t=e.firstChild,s=t.nextSibling;return Pe(e,"click",n.onClick),P(t,(()=>{var i=$t(()=>!!n.user);return()=>i()?ns(n.user.name):"?"})()),P(s,D(X,{get when(){return n.user},get fallback(){return T("shell.signIn")},get children(){return n.user?.name}})),e})()}pe(["click"]);var gt=H("<div class=separator>"),is=H('<div class=dock><div class=dock-left><div class=dock-user></div></div><div class=dock-center><div class="app-icons magnify"></div></div><div class=dock-right>');function rs(n){let e,t;const[s,i]=M(!0);Je(()=>{setTimeout(()=>{i(!1)},300)});function r(o){if(!e)return;const l=o.clientX,u=70,c=1.25;e.classList.add("magnify-active"),e.querySelectorAll(".app-icon").forEach(d=>{const g=d.querySelector(".icon-container");if(!g)return;const p=d.getBoundingClientRect(),m=p.left+p.width/2,w=Math.abs(l-m),S=Math.exp(-(w*w)/(2*u*u)),v=1+(c-1)*S;d.style.setProperty("--influence",S.toFixed(3));const L=-8*S;d.style.transform=`translateY(${L.toFixed(1)}px)`,d.style.zIndex=`${Math.round(v*100)}`,g.style.transform=`scale(${v.toFixed(3)})`})}function a(){if(!e)return;e.classList.remove("magnify-active"),e.querySelectorAll(".app-icon").forEach(l=>{const u=l.querySelector(".icon-container");u&&(u.style.transform=""),l.style.transform="",l.style.zIndex=""})}return(()=>{var o=is(),l=o.firstChild,u=l.firstChild,c=l.nextSibling,f=c.firstChild,d=c.nextSibling,g=t;typeof g=="function"?Ke(g,o):t=o,P(u,D(ss,{get user(){return n.currentUser},get onClick(){return n.userMenu.handler(()=>n.currentUser)}})),f.addEventListener("mouseleave",a),f.$$mousemove=r;var p=e;return typeof p=="function"?Ke(p,f):e=f,P(f,D(Ve,{get each(){return n.runningApps},children:m=>D(xe,{get appId(){return m.id},get appName(){return m.name},get isRunning(){return m.isRunning},onClick:()=>n.onAppClick(m.id),get onContextMenu(){return n.appMenu.handler(m)}})}),null),P(f,D(X,{get when(){return $t(()=>n.runningApps.length>0)()&&n.pinnedApps.length>0},get children(){return gt()}}),null),P(f,D(Ve,{get each(){return n.pinnedApps},children:m=>D(xe,{get appId(){return m.id},get appName(){return m.name},get isRunning(){return m.isRunning},onClick:()=>n.onAppClick(m.id),get onContextMenu(){return n.appMenu.handler(m)}})}),null),P(f,D(X,{get when(){return n.runningApps.length>0||n.pinnedApps.length>0},get children(){return gt()}}),null),P(f,D(xe,{appId:"apps-view",get appName(){return T("shell.allApps")},icon:Xn,get onClick(){return n.onShowAllApps}}),null),P(d,D(es,{})),B(()=>o.classList.toggle("dock-initial",!!s())),o})()}pe(["mousemove"]);var os=H("<div class=shell-overlay>");const pt=72,mt="pinned-dock-apps";function as(){const[n,e]=M([]),[t,s]=M([]),[i,r]=M([]),[a,o]=M(!1),[l,u]=M(!1),[c,f]=M(null),d=async()=>{try{const h=await window.edenAPI.shellCommand("db/get",{key:mt});if(h.value){const y=JSON.parse(h.value);Array.isArray(y)&&r(y)}}catch(h){console.error("Failed to load pinned dock apps:",h)}},g=async h=>{try{await window.edenAPI.shellCommand("db/set",{key:mt,value:JSON.stringify(h)})}catch(y){console.error("Failed to save pinned dock apps:",y)}},p=async h=>{const y=i();if(!y.includes(h)){const C=[...y,h];r(C),await g(C)}},m=async h=>{const C=i().filter(Y=>Y!==h);r(C),await g(C)},w=h=>i().includes(h),S=()=>n().filter(h=>!i().includes(h.manifest.id)).map(h=>({id:h.manifest.id,name:Ue(h.manifest.name,de()),isRunning:!0})),v=()=>{const h=new Set(n().map(C=>C.manifest.id)),y=t();return i().map(C=>{const Y=y.find(Fe=>Fe.id===C);return Y?{id:C,name:Ue(Y.name,de()),isRunning:h.has(C)}:null}).filter(C=>C!==null)},L=()=>{const h=new Set(n().map(y=>y.manifest.id));return t().map(y=>({id:y.id,name:Ue(y.name,de()),isRunning:h.has(y.id)}))},b=async()=>{try{const h=await window.edenAPI.shellCommand("package/list",{});Array.isArray(h)&&s(h);const y=await window.edenAPI.shellCommand("process/list",{});Array.isArray(y)&&e(y)}catch(h){console.error("Failed to load system info:",h)}},O=async()=>{try{const h=await window.edenAPI.shellCommand("user/get-current",{});f(h.user??null)}catch(h){console.error("Failed to load current user:",h)}},R=(h,y)=>h==="fullscreen"?{x:0,y:0,width:y.width,height:y.height}:{x:0,y:y.height-pt,width:y.width,height:pt},I=async h=>{try{await window.edenAPI.shellCommand("view/update-view-bounds",{appId:"com.eden.eveshell",bounds:h})}catch(y){console.error("Failed to update overlay bounds:",y)}},U=async h=>{try{const y=await window.edenAPI.shellCommand("view/window-size",{}),C=R(h,y);await I(C)}catch(y){console.error("Failed to resize overlay:",y)}},A=async h=>{if(n().some(C=>C.manifest.id===h))try{await window.edenAPI.shellCommand("view/focus-app",{appId:h})}catch(C){console.error("Failed to focus app:",C)}else try{await window.edenAPI.shellCommand("process/launch",{appId:h}),setTimeout(()=>{b()},500)}catch(C){console.error("Failed to launch app:",C)}},k=async()=>{const h=!a();o(h),await U(h?"fullscreen":"dock"),h&&b()};yt(()=>{!a()&&!l()&&U("dock")});const F=Un({open:A,stop:async h=>{try{await window.edenAPI.shellCommand("process/stop",{appId:h}),setTimeout(()=>{b()},300)}catch(y){console.error("Failed to stop app:",y)}},addToDock:p,removeFromDock:m,isPinned:w}),_=Vn({changePassword:async()=>{u(!0),await U("fullscreen")},logout:async()=>{try{await window.edenAPI.shellCommand("user/logout",{})}catch(h){console.error("Failed to log out:",h)}}}),N=()=>{u(!1),a()||U("dock")},te=async h=>{try{return await window.edenAPI.shellCommand("user/change-password",h)}catch(y){return console.error("Failed to change password:",y),{success:!1,error:T("shell.passwordUpdateFailed")}}};return Je(()=>{const h=()=>b(),y=C=>{const{windowSize:Y}=C,Fe=a()?"fullscreen":"dock",It=R(Fe,Y);I(It)};Ie(()=>{window.edenAPI.unsubscribe("process/launched",h),window.edenAPI.unsubscribe("process/stopped",h),window.edenAPI.unsubscribe("view/global-bounds-changed",y)}),(async()=>{await Mn(),b(),d(),O(),await U("dock");try{await window.edenAPI.subscribe("process/launched",h),await window.edenAPI.subscribe("process/stopped",h),await window.edenAPI.subscribe("view/global-bounds-changed",y)}catch(C){console.error("Failed to subscribe to events:",C)}})()}),(()=>{var h=os();return P(h,D(X,{get when(){return a()},get children(){return D(Wn,{get apps(){return L()},onClose:k,onAppClick:A,appMenu:F})}}),null),P(h,D(X,{get when(){return!a()},get children(){return D(rs,{get runningApps(){return S()},get pinnedApps(){return v()},get currentUser(){return c()},onAppClick:A,onShowAllApps:k,userMenu:_,appMenu:F})}}),null),P(h,D(Qn,{get show(){return l()},onClose:N,onSubmit:te}),null),B(()=>G(h,"data-mode",a()||l()?"fullscreen":"dock")),h})()}const Rt=document.getElementById("root");if(!Rt)throw new Error("Root element not found");Xt(()=>D(as,{}),Rt);
|
|
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"]'))s(i);new MutationObserver(i=>{for(const r of i)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).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 s(i){if(i.ep)return;i.ep=!0;const r=t(i);fetch(i.href,r)}})();const Et=!0,Ft=(n,e)=>n===e,Tt=Symbol("solid-track"),Dt=Symbol("solid-dev-component"),ve={equals:Ft};let wt=St;const Z=1,Se=2,jt={},Te={};var $=null;let De=null,Mt=null,E=null,V=null,Q=null,Re=0;function le(n,e){const t=E,s=$,i=n.length===0,r=e===void 0?s:e,a=i?{owned:null,cleanups:null,context:null,owner:null}:{owned:null,cleanups:null,context:r?r.context:null,owner:r},o=i?()=>n(()=>{throw new Error("Dispose method must be an explicit argument to createRoot function")}):()=>n(()=>W(()=>fe(a)));$=a,E=null;try{return ee(o,!0)}finally{E=t,$=s}}function M(n,e){e=e?Object.assign({},ve,e):ve;const t={value:n,observers:null,observerSlots:null,comparator:e.equals||void 0};e.name&&(t.name=e.name),e.internal?t.internal=!0:Ht(t);const s=i=>(typeof i=="function"&&(i=i(t.value)),vt(t,i));return[xt.bind(t),s]}function Ut(n,e,t){const s=ge(n,e,!0,Z,t);ne(s)}function B(n,e,t){const s=ge(n,e,!1,Z,t);ne(s)}function yt(n,e,t){wt=qt;const s=ge(n,e,!1,Z,t);s.user=!0,Q?Q.push(s):ne(s)}function oe(n,e,t){t=t?Object.assign({},ve,t):ve;const s=ge(n,e,!0,0,t);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,ne(s),xt.bind(s)}function Vt(n){return n&&typeof n=="object"&&"then"in n}function bt(n,e,t){let s,i,r;typeof e=="function"?(s=n,i=e,r={}):(s=!0,i=n,r=e||{});let a=null,o=Te,l=!1,u="initialValue"in r,c=typeof s=="function"&&oe(s);const f=new Set,[d,g]=(r.storage||M)(r.initialValue),[p,m]=M(void 0),[w,S]=M(void 0,{equals:!1}),[v,L]=M(u?"ready":"unresolved");function b(A,k,j,F){return a===A&&(a=null,F!==void 0&&(u=!0),(A===o||k===o)&&r.onHydrated&&queueMicrotask(()=>r.onHydrated(F,{value:k})),o=Te,O(k,j)),k}function O(A,k){ee(()=>{k===void 0&&g(()=>A),L(k!==void 0?"errored":u?"ready":"unresolved"),m(k);for(const j of f.keys())j.decrement();f.clear()},!1)}function R(){const A=_t,k=d(),j=p();if(j!==void 0&&!a)throw j;return E&&E.user,k}function I(A=!0){if(A!==!1&&l)return;l=!1;const k=c?c():s;if(k==null||k===!1){b(a,W(d));return}let j;const F=o!==Te?o:W(()=>{try{return i(k,{value:d(),refetching:A})}catch(z){j=z}});if(j!==void 0){b(a,void 0,ye(j),k);return}else if(!Vt(F))return b(a,F,void 0,k),F;return a=F,"v"in F?(F.s===1?b(a,F.v,void 0,k):b(a,void 0,ye(F.v),k),F):(l=!0,queueMicrotask(()=>l=!1),ee(()=>{L(u?"refreshing":"pending"),S()},!1),F.then(z=>b(F,z,void 0,k),z=>b(F,void 0,ye(z),k)))}Object.defineProperties(R,{state:{get:()=>v()},error:{get:()=>p()},loading:{get(){const A=v();return A==="pending"||A==="refreshing"}},latest:{get(){if(!u)return R();const A=p();if(A&&!a)throw A;return d()}}});let U=$;return c?Ut(()=>(U=$,I(!1))):I(!1),[R,{refetch:A=>Kt(U,()=>I(A)),mutate:g}]}function W(n){if(E===null)return n();const e=E;E=null;try{return n()}finally{E=e}}function Je(n){yt(()=>W(n))}function Ie(n){return $===null?console.warn("cleanups created outside a `createRoot` or `render` will never be run"):$.cleanups===null?$.cleanups=[n]:$.cleanups.push(n),n}function Kt(n,e){const t=$,s=E;$=n,E=null;try{return ee(e,!0)}catch(i){qe(i)}finally{$=t,E=s}}const[ls,us]=M(!1);function Bt(n,e){const t=ge(()=>W(()=>(Object.assign(n,{[Dt]:!0}),n(e))),void 0,!0,0);return t.props=e,t.observers=null,t.observerSlots=null,t.name=n.name,t.component=n,ne(t),t.tValue!==void 0?t.tValue:t.value}function Ht(n){$&&($.sourceMap?$.sourceMap.push(n):$.sourceMap=[n],n.graph=$)}let _t;function xt(){if(this.sources&&this.state)if(this.state===Z)ne(this);else{const n=V;V=null,ee(()=>$e(this),!1),V=n}if(E){const n=this.observers?this.observers.length:0;E.sources?(E.sources.push(this),E.sourceSlots.push(n)):(E.sources=[this],E.sourceSlots=[n]),this.observers?(this.observers.push(E),this.observerSlots.push(E.sources.length-1)):(this.observers=[E],this.observerSlots=[E.sources.length-1])}return this.value}function vt(n,e,t){let s=n.value;return(!n.comparator||!n.comparator(s,e))&&(n.value=e,n.observers&&n.observers.length&&ee(()=>{for(let i=0;i<n.observers.length;i+=1){const r=n.observers[i],a=De&&De.running;a&&De.disposed.has(r),(a?!r.tState:!r.state)&&(r.pure?V.push(r):Q.push(r),r.observers&&Ct(r)),a||(r.state=Z)}if(V.length>1e6)throw V=[],Et?new Error("Potential Infinite Loop Detected."):new Error},!1)),e}function ne(n){if(!n.fn)return;fe(n);const e=Re;zt(n,n.value,e)}function zt(n,e,t){let s;const i=$,r=E;E=$=n;try{s=n.fn(e)}catch(a){return n.pure&&(n.state=Z,n.owned&&n.owned.forEach(fe),n.owned=null),n.updatedAt=t+1,qe(a)}finally{E=r,$=i}(!n.updatedAt||n.updatedAt<=t)&&(n.updatedAt!=null&&"observers"in n?vt(n,s):n.value=s,n.updatedAt=t)}function ge(n,e,t,s=Z,i){const r={fn:n,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:$,context:$?$.context:null,pure:t};return $===null?console.warn("computations created outside a `createRoot` or `render` will never be disposed"):$!==jt&&($.owned?$.owned.push(r):$.owned=[r]),i&&i.name&&(r.name=i.name),r}function Ce(n){if(n.state===0)return;if(n.state===Se)return $e(n);if(n.suspense&&W(n.suspense.inFallback))return n.suspense.effects.push(n);const e=[n];for(;(n=n.owner)&&(!n.updatedAt||n.updatedAt<Re);)n.state&&e.push(n);for(let t=e.length-1;t>=0;t--)if(n=e[t],n.state===Z)ne(n);else if(n.state===Se){const s=V;V=null,ee(()=>$e(n,e[0]),!1),V=s}}function ee(n,e){if(V)return n();let t=!1;e||(V=[]),Q?t=!0:Q=[],Re++;try{const s=n();return Jt(t),s}catch(s){t||(Q=null),V=null,qe(s)}}function Jt(n){if(V&&(St(V),V=null),n)return;const e=Q;Q=null,e.length&&ee(()=>wt(e),!1)}function St(n){for(let e=0;e<n.length;e++)Ce(n[e])}function qt(n){let e,t=0;for(e=0;e<n.length;e++){const s=n[e];s.user?n[t++]=s:Ce(s)}for(e=0;e<t;e++)Ce(n[e])}function $e(n,e){n.state=0;for(let t=0;t<n.sources.length;t+=1){const s=n.sources[t];if(s.sources){const i=s.state;i===Z?s!==e&&(!s.updatedAt||s.updatedAt<Re)&&Ce(s):i===Se&&$e(s,e)}}}function Ct(n){for(let e=0;e<n.observers.length;e+=1){const t=n.observers[e];t.state||(t.state=Se,t.pure?V.push(t):Q.push(t),t.observers&&Ct(t))}}function fe(n){let e;if(n.sources)for(;n.sources.length;){const t=n.sources.pop(),s=n.sourceSlots.pop(),i=t.observers;if(i&&i.length){const r=i.pop(),a=t.observerSlots.pop();s<i.length&&(r.sourceSlots[a]=s,i[s]=r,t.observerSlots[s]=a)}}if(n.tOwned){for(e=n.tOwned.length-1;e>=0;e--)fe(n.tOwned[e]);delete n.tOwned}if(n.owned){for(e=n.owned.length-1;e>=0;e--)fe(n.owned[e]);n.owned=null}if(n.cleanups){for(e=n.cleanups.length-1;e>=0;e--)n.cleanups[e]();n.cleanups=null}n.state=0,delete n.sourceMap}function ye(n){return n instanceof Error?n:new Error(typeof n=="string"?n:"Unknown error",{cause:n})}function qe(n,e=$){throw ye(n)}const Wt=Symbol("fallback");function Ge(n){for(let e=0;e<n.length;e++)n[e]()}function Yt(n,e,t={}){let s=[],i=[],r=[],a=0,o=e.length>1?[]:null;return Ie(()=>Ge(r)),()=>{let l=n()||[],u=l.length,c,f;return l[Tt],W(()=>{let g,p,m,w,S,v,L,b,O;if(u===0)a!==0&&(Ge(r),r=[],s=[],i=[],a=0,o&&(o=[])),t.fallback&&(s=[Wt],i[0]=le(R=>(r[0]=R,t.fallback())),a=1);else if(a===0){for(i=new Array(u),f=0;f<u;f++)s[f]=l[f],i[f]=le(d);a=u}else{for(m=new Array(u),w=new Array(u),o&&(S=new Array(u)),v=0,L=Math.min(a,u);v<L&&s[v]===l[v];v++);for(L=a-1,b=u-1;L>=v&&b>=v&&s[L]===l[b];L--,b--)m[b]=i[L],w[b]=r[L],o&&(S[b]=o[L]);for(g=new Map,p=new Array(b+1),f=b;f>=v;f--)O=l[f],c=g.get(O),p[f]=c===void 0?-1:c,g.set(O,f);for(c=v;c<=L;c++)O=s[c],f=g.get(O),f!==void 0&&f!==-1?(m[f]=i[c],w[f]=r[c],o&&(S[f]=o[c]),f=p[f],g.set(O,f)):r[c]();for(f=v;f<u;f++)f in m?(i[f]=m[f],r[f]=w[f],o&&(o[f]=S[f],o[f](f))):i[f]=le(d);i=i.slice(0,a=u),s=l.slice(0)}return i});function d(g){if(r[f]=g,o){const[p,m]=M(f,{name:"index"});return o[f]=m,e(l[f],p)}return e(l[f])}}}function D(n,e){return Bt(n,e||{})}const Gt=n=>`Attempting to access a stale value from <${n}> that could possibly be undefined. This may occur because you are reading the accessor returned from the component at a time where it has already been unmounted. We recommend cleaning up any stale timers or async, or reading from the initial condition.`;function Ve(n){const e="fallback"in n&&{fallback:()=>n.fallback};return oe(Yt(()=>n.each,n.children,e||void 0),void 0,{name:"value"})}function X(n){const e=n.keyed,t=oe(()=>n.when,void 0,{name:"condition value"}),s=e?t:oe(t,void 0,{equals:(i,r)=>!i==!r,name:"condition"});return oe(()=>{const i=s();if(i){const r=n.children;return typeof r=="function"&&r.length>0?W(()=>r(e?i:()=>{if(!W(s))throw Gt("Show");return t()})):r}return n.fallback},void 0,{name:"value"})}globalThis&&(globalThis.Solid$$?console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior."):globalThis.Solid$$=!0);const $t=n=>oe(()=>n());function Qt(n,e,t){let s=t.length,i=e.length,r=s,a=0,o=0,l=e[i-1].nextSibling,u=null;for(;a<i||o<r;){if(e[a]===t[o]){a++,o++;continue}for(;e[i-1]===t[r-1];)i--,r--;if(i===a){const c=r<s?o?t[o-1].nextSibling:t[r-o]:l;for(;o<r;)n.insertBefore(t[o++],c)}else if(r===o)for(;a<i;)(!u||!u.has(e[a]))&&e[a].remove(),a++;else if(e[a]===t[r-1]&&t[o]===e[i-1]){const c=e[--i].nextSibling;n.insertBefore(t[o++],e[a++].nextSibling),n.insertBefore(t[--r],c),e[i]=t[r]}else{if(!u){u=new Map;let f=o;for(;f<r;)u.set(t[f],f++)}const c=u.get(e[a]);if(c!=null)if(o<c&&c<r){let f=a,d=1,g;for(;++f<i&&f<r&&!((g=u.get(e[f]))==null||g!==c+d);)d++;if(d>c-o){const p=e[a];for(;o<c;)n.insertBefore(t[o++],p)}else n.replaceChild(t[o++],e[a++])}else a++;else e[a++].remove()}}}const Qe="_$DX_DELEGATE";function Xt(n,e,t,s={}){if(!e)throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");let i;return le(r=>{i=r,e===document?n():P(e,n(),e.firstChild?null:void 0,t)},s.owner),()=>{i(),e.textContent=""}}function H(n,e,t,s){let i;const r=()=>{const o=document.createElement("template");return o.innerHTML=n,o.content.firstChild},a=()=>(i||(i=r())).cloneNode(!0);return a.cloneNode=a,a}function pe(n,e=window.document){const t=e[Qe]||(e[Qe]=new Set);for(let s=0,i=n.length;s<i;s++){const r=n[s];t.has(r)||(t.add(r),e.addEventListener(r,Zt))}}function G(n,e,t){t==null?n.removeAttribute(e):n.setAttribute(e,t)}function Pe(n,e,t,s){Array.isArray(t)?(n[`$$${e}`]=t[0],n[`$$${e}Data`]=t[1]):n[`$$${e}`]=t}function Ke(n,e,t){return W(()=>n(e,t))}function P(n,e,t,s){if(t!==void 0&&!s&&(s=[]),typeof e!="function")return Ae(n,e,s,t);B(i=>Ae(n,e(),i,t),s)}function Zt(n){let e=n.target;const t=`$$${n.type}`,s=n.target,i=n.currentTarget,r=l=>Object.defineProperty(n,"target",{configurable:!0,value:l}),a=()=>{const l=e[t];if(l&&!e.disabled){const u=e[`${t}Data`];if(u!==void 0?l.call(e,u,n):l.call(e,n),n.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(n.target)&&r(e.host),!0},o=()=>{for(;a()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(n,"currentTarget",{configurable:!0,get(){return e||document}}),n.composedPath){const l=n.composedPath();r(l[0]);for(let u=0;u<l.length-2&&(e=l[u],!!a());u++){if(e._$host){e=e._$host,o();break}if(e.parentNode===i)break}}else o();r(s)}function Ae(n,e,t,s,i){for(;typeof t=="function";)t=t();if(e===t)return t;const r=typeof e,a=s!==void 0;if(n=a&&t[0]&&t[0].parentNode||n,r==="string"||r==="number"){if(r==="number"&&(e=e.toString(),e===t))return t;if(a){let o=t[0];o&&o.nodeType===3?o.data!==e&&(o.data=e):o=document.createTextNode(e),t=se(n,t,s,o)}else t!==""&&typeof t=="string"?t=n.firstChild.data=e:t=n.textContent=e}else if(e==null||r==="boolean")t=se(n,t,s);else{if(r==="function")return B(()=>{let o=e();for(;typeof o=="function";)o=o();t=Ae(n,o,t,s)}),()=>t;if(Array.isArray(e)){const o=[],l=t&&Array.isArray(t);if(Be(o,e,t,i))return B(()=>t=Ae(n,o,t,s,!0)),()=>t;if(o.length===0){if(t=se(n,t,s),a)return t}else l?t.length===0?Xe(n,o,s):Qt(n,t,o):(t&&se(n),Xe(n,o));t=o}else if(e.nodeType){if(Array.isArray(t)){if(a)return t=se(n,t,s,e);se(n,t,null,e)}else t==null||t===""||!n.firstChild?n.appendChild(e):n.replaceChild(e,n.firstChild);t=e}else console.warn("Unrecognized value. Skipped inserting",e)}return t}function Be(n,e,t,s){let i=!1;for(let r=0,a=e.length;r<a;r++){let o=e[r],l=t&&t[n.length],u;if(!(o==null||o===!0||o===!1))if((u=typeof o)=="object"&&o.nodeType)n.push(o);else if(Array.isArray(o))i=Be(n,o,l)||i;else if(u==="function")if(s){for(;typeof o=="function";)o=o();i=Be(n,Array.isArray(o)?o:[o],Array.isArray(l)?l:[l])||i}else n.push(o),i=!0;else{const c=String(o);l&&l.nodeType===3&&l.data===c?n.push(l):n.push(document.createTextNode(c))}}return i}function Xe(n,e,t=null){for(let s=0,i=e.length;s<i;s++)n.insertBefore(e[s],t)}function se(n,e,t,s){if(t===void 0)return n.textContent="";const i=s||document.createTextNode("");if(e.length){let r=!1;for(let a=e.length-1;a>=0;a--){const o=e[a];if(i!==o){const l=o.parentNode===n;!r&&!a?l?n.replaceChild(i,o):n.insertBefore(i,t):l&&o.remove()}else r=!0}}else n.insertBefore(i,t);return[i]}const We=()=>{if(typeof window>"u")throw new Error("contextMenu can only be used in a browser environment.");const n=window.edenAPI;if(!n)throw new Error("edenAPI is not available on window.");return n},He=new Map;let Ze=!1,be=null,et=!1;const Pt=(n,e)=>{be={x:n,y:e}},tt=n=>{Pt(n.clientX,n.clientY)},nt=n=>{const e=n.touches[0]||n.changedTouches[0];e&&Pt(e.clientX,e.clientY)},At=()=>{et||typeof window>"u"||(et=!0,window.addEventListener("pointermove",tt,{passive:!0}),window.addEventListener("mousemove",tt,{passive:!0}),window.addEventListener("touchstart",nt,{passive:!0}),window.addEventListener("touchmove",nt,{passive:!0}))},en=n=>{if(n){if("clientX"in n&&"clientY"in n)return{left:n.clientX,top:n.clientY};if("touches"in n){const e=n.touches[0]||n.changedTouches[0];if(e)return{left:e.clientX,top:e.clientY}}}},tn=n=>{if(n.type!=="item")return n;const{onSelect:e,...t}=n;return t},nn=async()=>{if(Ze)return;Ze=!0,await We().subscribe("context-menu/closed",e=>{const t=He.get(e.requestId);t&&(He.delete(e.requestId),t(e))})},Ye=async n=>{At(),await nn();const e=n.position||en(n.event)||(be?{left:be.x,top:be.y}:void 0)||{left:Math.round(window.innerWidth/2),top:Math.round(window.innerHeight/2)},t=We(),{requestId:s}=await t.shellCommand("context-menu/open",{title:n.title,position:e,items:n.items.map(tn)});return new Promise(i=>{He.set(s,r=>{(async()=>{try{if(r.itemId){const o=n.items.find(l=>l.type==="item"&&l.id===r.itemId);o?.onSelect&&await o.onSelect()}else r.reason==="dismiss"&&n.onDismiss&&await n.onDismiss();n.onClose&&await n.onClose()}catch(o){console.error("Context menu handler failed:",o)}finally{i(r)}})()})})},sn=async n=>Ye({...n}),rn=n=>(At(),e=>{"preventDefault"in e&&typeof e.preventDefault=="function"&&e.preventDefault(),"stopPropagation"in e&&typeof e.stopPropagation=="function"&&e.stopPropagation();const t=n(e);Ye({...t,event:e}).catch(s=>{console.error("Failed to open context menu:",s),t.onClose&&t.onClose()})}),on=async n=>{await We().shellCommand("context-menu/close",{requestId:n})},_e={open:Ye,openAtCursor:sn,createHandler:rn,close:on},kt=n=>({__brand:"title",text:n}),ue=(n,e,t,s)=>({type:"item",id:n,label:e,onSelect:t,...s}),an=(n,e,t)=>n?e:t??null,ln=n=>e=>{const t=n(e),s=t.find(r=>r!=null&&typeof r=="object"&&"__brand"in r&&r.__brand==="title"),i=t.filter(r=>r!=null&&typeof r=="object"&&!("__brand"in r));return{title:s?.text,items:i}},Lt=n=>{const e=ln(n);return{build:e,show:async(t,s)=>{await _e.open({...e(t),position:s})},handler:t=>{const s=typeof t=="function"?t:()=>t;return _e.createHandler(()=>e(s()))}}},x=n=>typeof n=="string",ae=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},st=n=>n==null?"":""+n,un=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},cn=/###/g,it=n=>n&&n.indexOf("###")>-1?n.replace(cn,"."):n,rt=n=>!n||x(n),ce=(n,e,t)=>{const s=x(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(rt(n))return{};const r=it(s[i]);!n[r]&&t&&(n[r]=new t),Object.prototype.hasOwnProperty.call(n,r)?n=n[r]:n={},++i}return rt(n)?{}:{obj:n,k:it(s[i])}},ot=(n,e,t)=>{const{obj:s,k:i}=ce(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let r=e[e.length-1],a=e.slice(0,e.length-1),o=ce(n,a,Object);for(;o.obj===void 0&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),o=ce(n,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},dn=(n,e,t,s)=>{const{obj:i,k:r}=ce(n,e,Object);i[r]=i[r]||[],i[r].push(t)},ke=(n,e)=>{const{obj:t,k:s}=ce(n,e);if(t)return t[s]},fn=(n,e,t)=>{const s=ke(n,t);return s!==void 0?s:ke(e,t)},Ot=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?x(n[s])||n[s]instanceof String||x(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):Ot(n[s],e[s],t):n[s]=e[s]);return n},ie=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var hn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const gn=n=>x(n)?n.replace(/[&<>"'\/]/g,e=>hn[e]):n;class pn{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 s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const mn=[" ",",","?","!",";"],wn=new pn(20),yn=(n,e,t)=>{e=e||"",t=t||"";const s=mn.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const i=wn.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(n);if(!r){const a=n.indexOf(t);a>0&&!i.test(n.substring(0,a))&&(r=!0)}return r},ze=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const s=e.split(t);let i=n;for(let r=0;r<s.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=r;l<s.length;++l)if(l!==r&&(o+=t),o+=s[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<s.length-1)continue;r+=l-r+1;break}i=a}return i},Le=n=>n&&n.replace("_","-"),bn={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class Oe{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||bn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(x(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Oe(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Oe(this.logger,e)}}var q=new Oe;class Ee{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].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,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...s])})}}class at extends Ee{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,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):x(s)&&r?o.push(...s.split(r)):o.push(s)));const l=ke(this.data,o);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),l||!a||!x(s)?l:ze(this.data&&this.data[e]&&this.data[e][t],s,r)}addResource(e,t,s,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),ot(this.data,o,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in s)(x(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let l=ke(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?Ot(l,s,r):l={...l,...s},ot(this.data,o,l),a.silent||this.emit("added",e,t,s)}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 Nt={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,s,i))}),e}};const lt={};class Ne extends Ee{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),un(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=q.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 s=this.resolve(e,t);return s&&s.res!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!yn(e,s,i);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:x(r)?[r]:r};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:x(r)?[r]:r}}translate(e,t,s){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:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.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}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${b}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}const f=this.resolve(e,t);let d=f&&f.res;const g=f&&f.usedKey||a,p=f&&f.exactUsedKey||a,m=Object.prototype.toString.apply(d),w=["[object Number]","[object Function]","[object RegExp]"],S=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,L=!x(d)&&typeof d!="boolean"&&typeof d!="number";if(v&&d&&L&&w.indexOf(m)<0&&!(x(S)&&Array.isArray(d))){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(g,d,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=b,f.usedParams=this.getUsedParamsDetails(t),f):b}if(r){const b=Array.isArray(d),O=b?[]:{},R=b?p:g;for(const I in d)if(Object.prototype.hasOwnProperty.call(d,I)){const U=`${R}${r}${I}`;O[I]=this.translate(U,{...t,joinArrays:!1,ns:o}),O[I]===U&&(O[I]=d[I])}d=O}}else if(v&&x(S)&&Array.isArray(d))d=d.join(S),d&&(d=this.extendTranslation(d,e,t,s));else{let b=!1,O=!1;const R=t.count!==void 0&&!x(t.count),I=Ne.hasDefaultValue(t),U=R?this.pluralResolver.getSuffix(u,t.count,t):"",A=t.ordinal&&R?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",k=R&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),j=k&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${U}`]||t[`defaultValue${A}`]||t.defaultValue;!this.isValidLookup(d)&&I&&(b=!0,d=j),this.isValidLookup(d)||(O=!0,d=a);const z=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:d,J=I&&j!==d&&this.options.updateMissing;if(O||b||J){if(this.logger.log(J?"updateKey":"missingKey",u,l,a,J?j:d),r){const h=this.resolve(a,{...t,keySeparator:!1});h&&h.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 _=[];const N=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&N&&N[0])for(let h=0;h<N.length;h++)_.push(N[h]);else this.options.saveMissingTo==="all"?_=this.languageUtils.toResolveHierarchy(t.lng||this.language):_.push(t.lng||this.language);const te=(h,y,C)=>{const Y=I&&C!==d?C:z;this.options.missingKeyHandler?this.options.missingKeyHandler(h,l,y,Y,J,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(h,l,y,Y,J,t),this.emit("missingKey",h,l,y,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?_.forEach(h=>{const y=this.pluralResolver.getSuffixes(h,t);k&&t[`defaultValue${this.options.pluralSeparator}zero`]&&y.indexOf(`${this.options.pluralSeparator}zero`)<0&&y.push(`${this.options.pluralSeparator}zero`),y.forEach(C=>{te([h],a+C,t[`defaultValue${C}`]||j)})}):te(_,a,j))}d=this.extendTranslation(d,e,t,f,s),O&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${a}`),(O||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,b?d:void 0):d=this.options.parseMissingKeyHandler(d))}return i?(f.res=d,f.usedParams=this.getUsedParamsDetails(t),f):d}extendTranslation(e,t,s,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const u=x(e)&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let f=s.replace&&!x(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,s.lng||this.language||i.usedLng,s),u){const d=e.match(this.interpolator.nestingRegexp),g=d&&d.length;c<g&&(s.nest=!1)}!s.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var d=arguments.length,g=new Array(d),p=0;p<d;p++)g[p]=arguments[p];return r&&r[0]===g[0]&&!s.context?(a.logger.warn(`It seems you are nesting recursively key: ${g[0]} in key: ${t[0]}`),null):a.translate(...g,t)},s)),s.interpolation&&this.interpolator.reset()}const o=s.postProcess||this.options.postProcess,l=x(o)?[o]:o;return e!=null&&l&&l.length&&s.applyPostProcessor!==!1&&(e=Nt.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,i,r,a,o;return x(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),c=u.key;i=c;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const d=t.count!==void 0&&!x(t.count),g=d&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),p=t.context!==void 0&&(x(t.context)||typeof t.context=="number")&&t.context!=="",m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);f.forEach(w=>{this.isValidLookup(s)||(o=w,!lt[`${m[0]}-${w}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(lt[`${m[0]}-${w}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),m.forEach(S=>{if(this.isValidLookup(s))return;a=S;const v=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,c,S,w,t);else{let b;d&&(b=this.pluralResolver.getSuffix(S,t.count,t));const O=`${this.options.pluralSeparator}zero`,R=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(c+b),t.ordinal&&b.indexOf(R)===0&&v.push(c+b.replace(R,this.options.pluralSeparator)),g&&v.push(c+O)),p){const I=`${c}${this.options.contextSeparator}${t.context}`;v.push(I),d&&(v.push(I+b),t.ordinal&&b.indexOf(R)===0&&v.push(I+b.replace(R,this.options.pluralSeparator)),g&&v.push(I+O))}}let L;for(;L=v.pop();)this.isValidLookup(s)||(r=L,s=this.getResource(S,w,L,t))}))})}),{res:s,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,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"],s=e.replace&&!x(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}const je=n=>n.charAt(0).toUpperCase()+n.slice(1);class ut{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=q.create("languageUtils")}getScriptPartFromCode(e){if(e=Le(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=Le(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(x(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 s=e.split("-");return this.options.lowerCaseLng?s=s.map(i=>i.toLowerCase()):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=je(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=je(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=je(s[2].toLowerCase()))),s.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(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getLanguagePartFromCode(s);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)),x(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return x(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))):x(e)&&r(this.formatLanguageCode(e)),s.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}}let xn=[{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}],vn={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const Sn=["v1","v2","v3"],Cn=["v4"],ct={zero:0,one:1,two:2,few:3,many:4,other:5},$n=()=>{const n={};return xn.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:vn[e.fc]}})}),n};class Pn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=q.create("pluralResolver"),(!this.options.compatibilityJSON||Cn.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=$n(),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 s=Le(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(s,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[r]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((i,r)=>ct[i]-ct[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):s.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.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 s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[s];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&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!Sn.includes(this.options.compatibilityJSON)}}const dt=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=fn(n,e,t);return!r&&i&&x(t)&&(r=ze(n,t,s),r===void 0&&(r=ze(e,t,s))),r},Me=n=>n.replace(/\$/g,"$$$$");class An{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=q.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:s,useRawValueToEscape:i,prefix:r,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:d,nestingPrefixEscaped:g,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:w,maxReplaces:S,alwaysFormat:v}=e.interpolation;this.escape=t!==void 0?t:gn,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?ie(r):a||"{{",this.suffix=o?ie(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?ie(d):g||ie("$t("),this.nestingSuffix=p?ie(p):m||ie(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=S||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t&&t.source===s?(t.lastIndex=0,t):new RegExp(s,"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,s,i){let r,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(g.indexOf(this.formatSeparator)<0){const S=dt(t,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,s,{...i,...t,interpolationkey:g}):S}const p=g.split(this.formatSeparator),m=p.shift().trim(),w=p.join(this.formatSeparator).trim();return this.format(dt(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure),w,s,{...i,...t,interpolationkey:m})};this.resetRegExp();const c=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>Me(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?Me(this.escape(g)):Me(g)}].forEach(g=>{for(o=0;r=g.regex.exec(e);){const p=r[1].trim();if(a=u(p),a===void 0)if(typeof c=="function"){const w=c(e,r,i);a=x(w)?w:""}else if(i&&Object.prototype.hasOwnProperty.call(i,p))a="";else if(f){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),a="";else!x(a)&&!this.useRawValueToEscape&&(a=st(a));const m=g.safeValue(a);if(e=e.replace(r[0],m),f?(g.regex.lastIndex+=a.length,g.regex.lastIndex-=r[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;const o=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const f=l.split(new RegExp(`${c}[ ]*{`));let d=`{${f[1]}`;l=f[0],d=this.interpolate(d,a);const g=d.match(/'/g),p=d.match(/"/g);(g&&g.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),u&&(a={...u,...a})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...s},a=a.replace&&!x(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),l=c,u=!0}if(r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&!x(r))return r;x(r)||(r=st(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((c,f)=>this.format(c,f,s.lng,{...s,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const kn=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[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(a=>{if(a){const[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=o.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}},re=n=>{const e={};return(t,s,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const a=s+JSON.stringify(r);let o=e[a];return o||(o=n(Le(s),i),e[a]=o),o(t)}};class Ln{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=q.create("formatter"),this.options=e,this.formats={number:re((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return r=>i.format(r)}),currency:re((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return r=>i.format(r)}),datetime:re((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return r=>i.format(r)}),relativetime:re((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return r=>i.format(r,s.range||"day")}),list:re((t,s)=>{const i=new Intl.ListFormat(t,{...s});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()]=re(t)}format(e,t,s){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(o=>o.indexOf(")")>-1)){const o=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,l)=>{const{formatName:u,formatOptions:c}=kn(l);if(this.formats[u]){let f=o;try{const d=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},g=d.locale||d.lng||i.locale||i.lng||s;f=this.formats[u](o,g,{...c,...i,...d})}catch(d){this.logger.warn(d)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const On=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class Nn extends Ee{constructor(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=q.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(s,i.backend,i)}queueLoad(e,t,s,i){const r={},a={},o={},l={};return e.forEach(u=>{let c=!0;t.forEach(f=>{const d=`${u}|${f}`;!s.reload&&this.store.hasResourceBundle(u,f)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,c=!1,a[d]===void 0&&(a[d]=!0),r[d]===void 0&&(r[d]=!0),l[f]===void 0&&(l[f]=!0)))}),c||(o[u]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&s&&this.store.addResourceBundle(r,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(l=>{dn(l.loaded,[r],a),On(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(f=>{o[u][f]===void 0&&(o[u][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&c&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,r*2,a)},r);return}a(u,c)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t){let s=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();x(e)&&(e=this.languageUtils.toResolveHierarchy(e)),x(t)&&(t=[t]);const r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=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 "${s}" 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(!(s==null||s==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,s,i,l):c=u(e,t,s,i),c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}else u(e,t,s,i,o,l)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const ft=()=>({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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),x(n[1])&&(e.defaultValue=n[1]),x(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),ht=n=>(x(n.ns)&&(n.ns=[n.ns]),x(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),x(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),me=()=>{},Rn=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class he extends Ee{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ht(e),this.services={},this.logger=q,this.modules={external:[]},Rn(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]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(x(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=ft();this.options={...i,...this.options,...ht(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?q.init(r(this.modules.logger),this.options):q.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=Ln);const f=new ut(this.options);this.store=new at(this.options.resources,this.options);const d=this.services;d.logger=q,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Pn(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(d.formatter=r(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new An(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Nn(r(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(g){for(var p=arguments.length,m=new Array(p>1?p-1:0),w=1;w<p;w++)m[w-1]=arguments[w];e.emit(g,...m)}),this.modules.languageDetector&&(d.languageDetector=r(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=r(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Ne(this.services,this.options),this.translator.on("*",function(g){for(var p=arguments.length,m=new Array(p>1?p-1:0),w=1;w<p;w++)m[w-1]=arguments[w];e.emit(g,...m)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,s||(s=me),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=ae(),u=()=>{const c=(f,d)=>{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(d),s(f,d)};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 s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:me;const i=x(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const r=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(o)})}else s(null)}reloadResources(e,t,s){const i=ae();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=me),this.services.backendConnector.reload(e,t,r=>{i.resolve(),s(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"&&Nt.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 s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const i=ae();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(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 s.t(...arguments)}),t&&t(l,function(){return s.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=x(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=>{a(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,s){var i=this;const r=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),f=2;f<u;f++)c[f-2]=arguments[f];l=i.options.overloadTranslationOptionHandler([a,o].concat(c))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||r.keyPrefix);const d=i.options.keySeparator||".";let g;return l.keyPrefix&&Array.isArray(a)?g=a.map(p=>`${l.keyPrefix}${d}${p}`):g=l.keyPrefix?`${l.keyPrefix}${d}${a}`:a,i.t(g,l)};return x(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,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 s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const s=ae();return this.options.ns?(x(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=ae();x(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(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"],s=this.services&&this.services.languageUtils||new ut(ft());return t.indexOf(s.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 he(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:me;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new he(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s&&(r.store=new at(this.store.data,i),r.services.resourceStore=r.store),r.translator=new Ne(r.services,i),r.translator.on("*",function(o){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(o,...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 K=he.createInstance();K.createInstance=he.createInstance;K.createInstance;K.dir;K.init;K.loadResources;K.reloadResources;K.use;K.changeLanguage;K.getFixedT;K.t;K.exists;K.setDefaultNamespace;K.hasLoadedNamespace;K.loadNamespaces;K.loadLanguages;async function In(n={}){const e=K.createInstance(),t=n.resources||{};return await e.init({lng:"en",fallbackLng:n.fallbackLng||"en",debug:n.debug||!1,resources:t,interpolation:{escapeValue:!1},partialBundledLanguages:!0}),e}async function En(n,e){try{const t=window.edenAPI;if(!t)return;const s=await t.shellCommand("i18n/get-common",{locale:e});s?.translations&&n.addResourceBundle(e,"translation",s.translations,!0,!0)}catch(t){console.error("Failed to load common translations",t)}}function Ue(n,e="en"){return n?typeof n=="string"?n:n[e]||n.en||Object.values(n)[0]||"":""}function Fn(n={}){return le(()=>{const[e,t]=M("en"),[s]=bt(async()=>await In(n)),i=((o,l)=>{const u=s();return u?u.t(o,{lng:e(),...l}):o}),r=async o=>{const l=s();l&&(await En(l,o),await l.changeLanguage(o)),t(o)};return{t:i,locale:e,setLocale:t,initLocale:async()=>{try{const o=window.edenAPI;if(!o){console.warn("Eden API not found, using default locale");return}const l=c=>{r(c.locale)};Ie(()=>{o.unsubscribe("i18n/locale-changed",l)});const u=await o.shellCommand("i18n/get-locale",{});u?.locale&&await r(u.locale),await o.subscribe("i18n/locale-changed",l)}catch(o){console.error("Failed to load system locale",o)}}}})}const Tn={shell:{allApps:"All Apps",searchApps:"Search apps...",noAppsFound:"No apps found",openApp:"Open",stopApp:"Stop App",addToDock:"Add to Dock",removeFromDock:"Remove from Dock",signIn:"Sign in",switchUser:"Switch User",logout:"Log out",currentUser:"Current",changePassword:"Change password",currentPassword:"Current password",newPassword:"New password",confirmPassword:"Confirm new password",savePassword:"Save password",passwordMismatch:"Passwords do not match",passwordUpdateFailed:"Failed to update password"}},Dn={shell:{allApps:"Aplikacje",searchApps:"Szukaj aplikacji...",noAppsFound:"Nie znaleziono aplikacji",openApp:"Otwórz",stopApp:"Zatrzymaj Aplikację",addToDock:"Dodaj do Docka",removeFromDock:"Usuń z Docka",signIn:"Zaloguj",switchUser:"Przełącz użytkownika",logout:"Wyloguj",currentUser:"Aktualny",changePassword:"Zmień hasło",currentPassword:"Aktualne hasło",newPassword:"Nowe hasło",confirmPassword:"Potwierdź nowe hasło",savePassword:"Zapisz hasło",passwordMismatch:"Hasła nie są takie same",passwordUpdateFailed:"Nie udało się zmienić hasła"}},jn={en:{translation:Tn},pl:{translation:Dn}},{t:T,locale:de,setLocale:cs,initLocale:Mn}=Fn({resources:jn}),Un=n=>Lt(e=>{const t=n.isPinned(e.id);return[kt(e.name),an(e.isRunning,ue("stop",T("shell.stopApp"),()=>n.stop(e.id),{icon:"stop-circle"}),ue("open",T("shell.openApp"),()=>n.open(e.id),{icon:"play"})),ue("dock",T(t?"shell.removeFromDock":"shell.addToDock"),()=>(t?n.removeFromDock:n.addToDock)(e.id),{icon:t?"bookmark":"plus"})]}),Vn=n=>Lt(e=>[kt(e?.name??T("shell.signIn")),e&&ue("changePassword",T("shell.changePassword"),n.changePassword,{icon:"key"}),e&&ue("logout",T("shell.logout"),n.logout,{icon:"log-out",danger:!0})]),Kn="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='32'%20y1='4'%20x2='32'%20y2='60'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234a4a4a'/%3e%3cstop%20offset='1'%20stop-color='%233a3a3a'/%3e%3c/linearGradient%3e%3c/defs%3e%3c!--%20Squircle%20background%20with%20gradient%20--%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='14'%20fill='url(%23bg)'/%3e%3c!--%20Document%20lines%20icon%20centered%20--%3e%3cg%20transform='translate(16,%2016)'%20fill='%23e0e0e0'%3e%3crect%20x='5'%20y='6'%20width='22'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='13'%20width='22'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='20'%20width='15'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='27'%20width='22'%20height='3'%20rx='1.5'/%3e%3c/g%3e%3c/svg%3e",we=new Map;async function Bn(n){if(we.has(n))return we.get(n);try{const e=await window.edenAPI.shellCommand("package/get-icon",{appId:n});return we.set(n,e.icon),e.icon}catch(e){console.warn(`Failed to fetch icon for ${n}:`,e),we.set(n,void 0);return}}var Hn=H("<div class=running-indicator>"),_n=H("<div class=app-icon><div class=icon-container><img></div><div class=app-name>");function xe(n){const[e]=bt(()=>n.icon?null:n.appId,s=>s?Bn(s):Promise.resolve(void 0)),t=()=>n.icon||e()||Kn;return(()=>{var s=_n(),i=s.firstChild,r=i.firstChild,a=i.nextSibling;return Pe(s,"contextmenu",n.onContextMenu),Pe(s,"click",n.onClick),G(r,"draggable",!1),P(i,D(X,{get when(){return n.isRunning},get children(){return Hn()}}),null),P(a,()=>n.appName),B(o=>{var l=n.appName,u=t(),c=n.appName;return l!==o.e&&G(s,"title",o.e=l),u!==o.t&&G(r,"src",o.t=u),c!==o.a&&G(r,"alt",o.a=c),o},{e:void 0,t:void 0,a:void 0}),s})()}pe(["click","contextmenu"]);var zn=H('<div class="eden-text-tertiary eden-text-md"style="grid-column:1 / -1;text-align:center;padding:var(--eden-space-2xl)">'),Jn=H('<div class=eden-modal-overlay style=background:rgba(0,0,0,0.4);backdrop-filter:none><div class="eden-modal eden-modal-lg"style=max-height:70vh;background:var(--eden-color-surface-primary)><div class=eden-modal-header><div class="eden-flex eden-gap-sm"style=flex:1><input type=text class=eden-input></div></div><div class="eden-modal-body eden-scrollbar"><div class=eden-card-grid style=gap:var(--eden-space-lg)>'),qn=H('<div class="all-apps-tile eden-interactive">');function Wn(n){const[e,t]=M("");let s;const i=()=>{const l=e().toLowerCase().trim();return l?n.apps.filter(u=>u.name.toLowerCase().includes(l)||u.id.toLowerCase().includes(l)):n.apps};Je(()=>{s?.focus()});function r(){_e.close(),n.onClose()}async function a(l){r();const u=n.apps.filter(c=>c.isRunning).map(c=>c.id);for(const c of u)try{await window.edenAPI.shellCommand("view/set-view-visibility",{appId:c,visible:!0})}catch(f){console.error(`Failed to set visibility for ${c}:`,f)}await n.onAppClick(l)}function o(l){l.key==="Escape"&&r()}return(()=>{var l=Jn(),u=l.firstChild,c=u.firstChild,f=c.firstChild,d=f.firstChild,g=c.nextSibling,p=g.firstChild;l.$$keydown=o,l.$$click=r,u.$$click=w=>w.stopPropagation(),d.$$input=w=>t(w.currentTarget.value);var m=s;return typeof m=="function"?Ke(m,d):s=d,P(p,D(Ve,{get each(){return i()},children:w=>(()=>{var S=qn();return Pe(S,"contextmenu",n.appMenu.handler(w)),S.$$click=()=>a(w.id),P(S,D(xe,{get appId(){return w.id},get appName(){return w.name},get isRunning(){return w.isRunning}})),B(()=>S.classList.toggle("running",!!w.isRunning)),S})()}),null),P(p,D(X,{get when(){return i().length===0},get children(){var w=zn();return P(w,()=>T("shell.noAppsFound")),w}}),null),B(()=>G(d,"placeholder",T("shell.searchApps"))),B(()=>d.value=e()),l})()}pe(["click","keydown","input","contextmenu"]);var Yn=H("<div class=eden-text-xs style=color:var(--eden-color-danger)>"),Gn=H('<div class=eden-modal-overlay><div class="eden-modal eden-modal-sm"><div class=eden-modal-header><h3 class=eden-modal-title></h3><button class=eden-modal-close>×</button></div><div class=eden-modal-body><div class=eden-form-group><label class=eden-form-label></label><input type=password class=eden-input></div><div class=eden-form-group><label class=eden-form-label></label><input type=password class=eden-input></div><div class=eden-form-group><label class=eden-form-label></label><input type=password class=eden-input></div></div><div class=eden-modal-footer><button class=eden-btn></button><button class="eden-btn eden-btn-primary">');const Qn=n=>{const[e,t]=M(""),[s,i]=M(""),[r,a]=M(""),[o,l]=M(null),u=()=>{t(""),i(""),a(""),l(null)},c=()=>{n.onClose(),u()},f=async()=>{if(!e()||!s()||!r())return;if(s()!==r()){l(T("shell.passwordMismatch"));return}const p=await n.onSubmit({currentPassword:e(),newPassword:s()});if(p.success){c();return}l(p.error||T("shell.passwordUpdateFailed"))},d=p=>{p.key==="Enter"&&f(),p.key==="Escape"&&c()},g=()=>!!e()&&!!s()&&!!r()&&s()===r();return D(X,{get when(){return n.show},get children(){var p=Gn(),m=p.firstChild,w=m.firstChild,S=w.firstChild,v=S.nextSibling,L=w.nextSibling,b=L.firstChild,O=b.firstChild,R=O.nextSibling,I=b.nextSibling,U=I.firstChild,A=U.nextSibling,k=I.nextSibling,j=k.firstChild,F=j.nextSibling,z=L.nextSibling,J=z.firstChild,_=J.nextSibling;return p.$$click=c,m.$$click=N=>N.stopPropagation(),P(S,()=>T("shell.changePassword")),v.$$click=c,P(O,()=>T("shell.currentPassword")),R.$$keydown=d,R.$$input=N=>{t(N.currentTarget.value),l(null)},P(U,()=>T("shell.newPassword")),A.$$keydown=d,A.$$input=N=>{i(N.currentTarget.value),l(null)},P(j,()=>T("shell.confirmPassword")),F.$$keydown=d,F.$$input=N=>{a(N.currentTarget.value),l(null)},P(L,D(X,{get when(){return o()},get children(){var N=Yn();return P(N,o),N}}),null),J.$$click=c,P(J,()=>T("common.cancel")),_.$$click=f,P(_,()=>T("shell.savePassword")),B(N=>{var te=T("shell.currentPassword"),h=T("shell.newPassword"),y=T("shell.confirmPassword"),C=!g();return te!==N.e&&G(R,"placeholder",N.e=te),h!==N.t&&G(A,"placeholder",N.t=h),y!==N.a&&G(F,"placeholder",N.a=y),C!==N.o&&(_.disabled=N.o=C),N},{e:void 0,t:void 0,a:void 0,o:void 0}),B(()=>R.value=e()),B(()=>A.value=s()),B(()=>F.value=r()),p}})};pe(["click","input","keydown"]);const Xn="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='32'%20y1='4'%20x2='32'%20y2='60'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234a4a4a'/%3e%3cstop%20offset='1'%20stop-color='%233a3a3a'/%3e%3c/linearGradient%3e%3c/defs%3e%3c!--%20Squircle%20background%20with%20gradient%20--%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='14'%20fill='url(%23bg)'/%3e%3c!--%20Grid%20of%204%20squares%20icon%20centered%20--%3e%3cg%20transform='translate(16,%2016)'%20fill='%23e0e0e0'%3e%3crect%20x='2'%20y='2'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='18'%20y='2'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='2'%20y='18'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='18'%20y='18'%20width='12'%20height='12'%20rx='2'/%3e%3c/g%3e%3c/svg%3e";var Zn=H("<div class=clock><div class=time></div><div class=date>");function es(){const[n,e]=M(new Date),t=setInterval(()=>{e(new Date)},1e3);Ie(()=>clearInterval(t));const s=()=>n().toLocaleTimeString(de(),{hour:"2-digit",minute:"2-digit"}),i=()=>n().toLocaleDateString(de(),{weekday:"short",month:"short",day:"numeric"});return(()=>{var r=Zn(),a=r.firstChild,o=a.nextSibling;return P(a,s),P(o,i),r})()}var ts=H('<button type=button class=user-badge><div class="eden-avatar eden-avatar-md"></div><span class=user-badge-name>');const ns=n=>n.trim().split(/\s+/).map(s=>s[0]).join("").slice(0,2).toUpperCase();function ss(n){return(()=>{var e=ts(),t=e.firstChild,s=t.nextSibling;return Pe(e,"click",n.onClick),P(t,(()=>{var i=$t(()=>!!n.user);return()=>i()?ns(n.user.name):"?"})()),P(s,D(X,{get when(){return n.user},get fallback(){return T("shell.signIn")},get children(){return n.user?.name}})),e})()}pe(["click"]);var gt=H("<div class=separator>"),is=H('<div class=dock><div class=dock-left><div class=dock-user></div></div><div class=dock-center><div class="app-icons magnify"></div></div><div class=dock-right>');function rs(n){let e,t;const[s,i]=M(!0);Je(()=>{setTimeout(()=>{i(!1)},300)});function r(o){if(!e)return;const l=o.clientX,u=70,c=1.25;e.classList.add("magnify-active"),e.querySelectorAll(".app-icon").forEach(d=>{const g=d.querySelector(".icon-container");if(!g)return;const p=d.getBoundingClientRect(),m=p.left+p.width/2,w=Math.abs(l-m),S=Math.exp(-(w*w)/(2*u*u)),v=1+(c-1)*S;d.style.setProperty("--influence",S.toFixed(3));const L=-8*S;d.style.transform=`translateY(${L.toFixed(1)}px)`,d.style.zIndex=`${Math.round(v*100)}`,g.style.transform=`scale(${v.toFixed(3)})`})}function a(){if(!e)return;e.classList.remove("magnify-active"),e.querySelectorAll(".app-icon").forEach(l=>{const u=l.querySelector(".icon-container");u&&(u.style.transform=""),l.style.transform="",l.style.zIndex=""})}return(()=>{var o=is(),l=o.firstChild,u=l.firstChild,c=l.nextSibling,f=c.firstChild,d=c.nextSibling,g=t;typeof g=="function"?Ke(g,o):t=o,P(u,D(ss,{get user(){return n.currentUser},get onClick(){return n.userMenu.handler(()=>n.currentUser)}})),f.addEventListener("mouseleave",a),f.$$mousemove=r;var p=e;return typeof p=="function"?Ke(p,f):e=f,P(f,D(Ve,{get each(){return n.runningApps},children:m=>D(xe,{get appId(){return m.id},get appName(){return m.name},get isRunning(){return m.isRunning},onClick:()=>n.onAppClick(m.id),get onContextMenu(){return n.appMenu.handler(m)}})}),null),P(f,D(X,{get when(){return $t(()=>n.runningApps.length>0)()&&n.pinnedApps.length>0},get children(){return gt()}}),null),P(f,D(Ve,{get each(){return n.pinnedApps},children:m=>D(xe,{get appId(){return m.id},get appName(){return m.name},get isRunning(){return m.isRunning},onClick:()=>n.onAppClick(m.id),get onContextMenu(){return n.appMenu.handler(m)}})}),null),P(f,D(X,{get when(){return n.runningApps.length>0||n.pinnedApps.length>0},get children(){return gt()}}),null),P(f,D(xe,{appId:"apps-view",get appName(){return T("shell.allApps")},icon:Xn,get onClick(){return n.onShowAllApps}}),null),P(d,D(es,{})),B(()=>o.classList.toggle("dock-initial",!!s())),o})()}pe(["mousemove"]);var os=H("<div class=shell-overlay>");const pt=72,mt="pinned-dock-apps";function as(){const[n,e]=M([]),[t,s]=M([]),[i,r]=M([]),[a,o]=M(!1),[l,u]=M(!1),[c,f]=M(null),d=async()=>{try{const h=await window.edenAPI.shellCommand("db/get",{key:mt});if(h.value){const y=JSON.parse(h.value);Array.isArray(y)&&r(y)}}catch(h){console.error("Failed to load pinned dock apps:",h)}},g=async h=>{try{await window.edenAPI.shellCommand("db/set",{key:mt,value:JSON.stringify(h)})}catch(y){console.error("Failed to save pinned dock apps:",y)}},p=async h=>{const y=i();if(!y.includes(h)){const C=[...y,h];r(C),await g(C)}},m=async h=>{const C=i().filter(Y=>Y!==h);r(C),await g(C)},w=h=>i().includes(h),S=()=>n().filter(h=>!i().includes(h.manifest.id)).map(h=>({id:h.manifest.id,name:Ue(h.manifest.name,de()),isRunning:!0})),v=()=>{const h=new Set(n().map(C=>C.manifest.id)),y=t();return i().map(C=>{const Y=y.find(Fe=>Fe.id===C);return Y?{id:C,name:Ue(Y.name,de()),isRunning:h.has(C)}:null}).filter(C=>C!==null)},L=()=>{const h=new Set(n().map(y=>y.manifest.id));return t().map(y=>({id:y.id,name:Ue(y.name,de()),isRunning:h.has(y.id)}))},b=async()=>{try{const h=await window.edenAPI.shellCommand("package/list",{});Array.isArray(h)&&s(h);const y=await window.edenAPI.shellCommand("process/list",{});Array.isArray(y)&&e(y)}catch(h){console.error("Failed to load system info:",h)}},O=async()=>{try{const h=await window.edenAPI.shellCommand("user/get-current",{});f(h.user??null)}catch(h){console.error("Failed to load current user:",h)}},R=(h,y)=>h==="fullscreen"?{x:0,y:0,width:y.width,height:y.height}:{x:0,y:y.height-pt,width:y.width,height:pt},I=async h=>{try{await window.edenAPI.shellCommand("view/update-bounds",{bounds:h})}catch(y){console.error("Failed to update overlay bounds:",y)}},U=async h=>{try{const y=await window.edenAPI.shellCommand("view/window-size",{}),C=R(h,y);await I(C)}catch(y){console.error("Failed to resize overlay:",y)}},A=async h=>{if(n().some(C=>C.manifest.id===h))try{await window.edenAPI.shellCommand("view/focus-view",{appId:h})}catch(C){console.error("Failed to focus app:",C)}else try{await window.edenAPI.shellCommand("process/launch",{appId:h}),setTimeout(()=>{b()},500)}catch(C){console.error("Failed to launch app:",C)}},k=async()=>{const h=!a();o(h),await U(h?"fullscreen":"dock"),h&&b()};yt(()=>{!a()&&!l()&&U("dock")});const F=Un({open:A,stop:async h=>{try{await window.edenAPI.shellCommand("process/stop",{appId:h}),setTimeout(()=>{b()},300)}catch(y){console.error("Failed to stop app:",y)}},addToDock:p,removeFromDock:m,isPinned:w}),_=Vn({changePassword:async()=>{u(!0),await U("fullscreen")},logout:async()=>{try{await window.edenAPI.shellCommand("user/logout",{})}catch(h){console.error("Failed to log out:",h)}}}),N=()=>{u(!1),a()||U("dock")},te=async h=>{try{return await window.edenAPI.shellCommand("user/change-password",h)}catch(y){return console.error("Failed to change password:",y),{success:!1,error:T("shell.passwordUpdateFailed")}}};return Je(()=>{const h=()=>b(),y=C=>{const{windowSize:Y}=C,Fe=a()?"fullscreen":"dock",It=R(Fe,Y);I(It)};Ie(()=>{window.edenAPI.unsubscribe("process/launched",h),window.edenAPI.unsubscribe("process/stopped",h),window.edenAPI.unsubscribe("view/global-bounds-changed",y)}),(async()=>{await Mn(),b(),d(),O(),await U("dock");try{await window.edenAPI.subscribe("process/launched",h),await window.edenAPI.subscribe("process/stopped",h),await window.edenAPI.subscribe("view/global-bounds-changed",y)}catch(C){console.error("Failed to subscribe to events:",C)}})()}),(()=>{var h=os();return P(h,D(X,{get when(){return a()},get children(){return D(Wn,{get apps(){return L()},onClose:k,onAppClick:A,appMenu:F})}}),null),P(h,D(X,{get when(){return!a()},get children(){return D(rs,{get runningApps(){return S()},get pinnedApps(){return v()},get currentUser(){return c()},onAppClick:A,onShowAllApps:k,userMenu:_,appMenu:F})}}),null),P(h,D(Qn,{get show(){return l()},onClose:N,onSubmit:te}),null),B(()=>G(h,"data-mode",a()||l()?"fullscreen":"dock")),h})()}const Rt=document.getElementById("root");if(!Rt)throw new Error("Root element not found");Xt(()=>D(as,{}),Rt);
|
|
@@ -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>Eden</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-CokBDS24.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-BpW2uLSC.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -3,7 +3,15 @@
|
|
|
3
3
|
"name": "Shell for Eden",
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"overlay": true,
|
|
6
|
-
"permissions": [
|
|
6
|
+
"permissions": [
|
|
7
|
+
"db/rw",
|
|
8
|
+
"user/identity",
|
|
9
|
+
"user/session",
|
|
10
|
+
"package/read",
|
|
11
|
+
"process/read",
|
|
12
|
+
"process/manage",
|
|
13
|
+
"view/manage"
|
|
14
|
+
],
|
|
7
15
|
"build": {
|
|
8
16
|
"command": "npm run build"
|
|
9
17
|
},
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/dariusz/Desktop/
|
|
13
|
+
export NODE_PATH="/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/dariusz/Desktop/
|
|
15
|
+
export NODE_PATH="/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/dariusz/Desktop/
|
|
13
|
+
export NODE_PATH="/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/dariusz/Desktop/
|
|
15
|
+
export NODE_PATH="/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/dariusz/Desktop/eden-linuxcnc/eden/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
|
@@ -13,7 +13,8 @@ export type WindowMode = "floating" | "tiled" | "both";
|
|
|
13
13
|
* - "tokens": Inject only CSS custom property definitions
|
|
14
14
|
* - "none": Don't inject any CSS
|
|
15
15
|
*/
|
|
16
|
-
export type CSSInjectionMode = "
|
|
16
|
+
export type CSSInjectionMode = "none" | "tokens" | "full";
|
|
17
|
+
export type AppFrameInjectionMode = "none" | "window-only" | "full" | boolean;
|
|
17
18
|
|
|
18
19
|
export interface WindowInjectionOptions {
|
|
19
20
|
/**
|
|
@@ -24,8 +25,13 @@ export interface WindowInjectionOptions {
|
|
|
24
25
|
*/
|
|
25
26
|
css?: CSSInjectionMode;
|
|
26
27
|
|
|
27
|
-
/**
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Inject Eden app frame runtime and visuals (default: true).
|
|
30
|
+
* - true | "full": full Eden frame (rounded container + system top bar controls)
|
|
31
|
+
* - "window-only": keep frame runtime/container, but app renders its own top bar
|
|
32
|
+
* - false | "none": disable app frame injection entirely
|
|
33
|
+
*/
|
|
34
|
+
appFrame?: AppFrameInjectionMode;
|
|
29
35
|
}
|
|
30
36
|
|
|
31
37
|
export interface WindowConfig {
|