@dao42/d42paas-front 0.9.63 → 0.9.64

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/DaoPaaS.cjs CHANGED
@@ -46,7 +46,7 @@ Error generating stack: `+o.message+`
46
46
  * This source code is licensed under the MIT license found in the
47
47
  * LICENSE file in the root directory of this source tree.
48
48
  */var t4=W.exports,r1e=JZ.exports;function i1e(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var o1e=typeof Object.is=="function"?Object.is:i1e,s1e=r1e.useSyncExternalStore,a1e=t4.useRef,l1e=t4.useEffect,c1e=t4.useMemo,u1e=t4.useDebugValue;KZ.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=a1e(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=c1e(function(){function l(d){if(!c){if(c=!0,u=d,d=r(d),i!==void 0&&s.hasValue){var m=s.value;if(i(m,d))return f=m}return f=d}if(m=f,o1e(u,d))return m;var x=r(d);return i!==void 0&&i(m,x)?m:(u=d,f=x)}var c=!1,u,f,h=n===void 0?null:n;return[function(){return l(e())},h===null?void 0:function(){return l(h())}]},[e,n,r,i]);var a=s1e(t,o[0],o[1]);return l1e(function(){s.hasValue=!0,s.value=a},[a]),u1e(a),a};HZ.exports=KZ;var f1e=HZ.exports;const{useSyncExternalStoreWithSelector:d1e}=f1e;function h1e(t,e=t.getState,n){const r=d1e(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return W.exports.useDebugValue(r),r}const yz=t=>{const e=typeof t=="function"?GZ(t):t,n=(r,i)=>h1e(e,r,i);return Object.assign(n,e),n},O1e=t=>t?yz(t):yz;var p1e=O1e;const m1e=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,...a}=e;let l;try{l=(o!=null?o:({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const c=l.connect(a);let u=!0;i.setState=(d,m,x)=>{const y=n(d,m);return u&&c.send(x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x,r()),y};const f=(...d)=>{const m=u;u=!1,n(...d),u=m},h=t(i.setState,r,i);if(c.init(h),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let d=!1;const m=i.dispatch;i.dispatch=(...x)=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&x[0].type==="__setState"&&!d&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),d=!0),m(...x)}}return c.subscribe(d=>{var m;switch(d.type){case"ACTION":if(typeof d.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return TT(d.payload,x=>{if(x.type==="__setState"){f(x.state);return}!i.dispatchFromDevtools||typeof i.dispatch=="function"&&i.dispatch(x)});case"DISPATCH":switch(d.payload.type){case"RESET":return f(h),c.init(i.getState());case"COMMIT":return c.init(i.getState());case"ROLLBACK":return TT(d.state,x=>{f(x),c.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return TT(d.state,x=>{f(x)});case"IMPORT_STATE":{const{nextLiftedState:x}=d.payload,y=(m=x.computedStates.slice(-1)[0])==null?void 0:m.state;if(!y)return;f(y),c.send(null,x);return}case"PAUSE_RECORDING":return u=!u}return}}),h},g1e=m1e,TT=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)},nx=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return nx(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return nx(r)(n)}}}},v1e=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,p)=>({...p,...y}),...e},s=!1;const a=new Set,l=new Set;let c;try{c=o.getStorage()}catch{}if(!c)return t((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...y)},r,i);const u=nx(o.serialize),f=()=>{const y=o.partialize({...r()});let p;const g=u({state:y,version:o.version}).then(v=>c.setItem(o.name,v)).catch(v=>{p=v});if(p)throw p;return g},h=i.setState;i.setState=(y,p)=>{h(y,p),f()};const d=t((...y)=>{n(...y),f()},r,i);let m;const x=()=>{var y;if(!c)return;s=!1,a.forEach(g=>g(r()));const p=((y=o.onRehydrateStorage)==null?void 0:y.call(o,r()))||void 0;return nx(c.getItem.bind(c))(o.name).then(g=>{if(g)return o.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==o.version){if(o.migrate)return o.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var v;return m=o.merge(g,(v=r())!=null?v:d),n(m,!0),f()}).then(()=>{p==null||p(m,void 0),s=!0,l.forEach(g=>g(m))}).catch(g=>{p==null||p(void 0,g)})};return i.persist={setOptions:y=>{o={...o,...y},y.getStorage&&(c=y.getStorage())},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>x(),hasHydrated:()=>s,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},x(),m||d},y1e=v1e,b1e=(t,e)=>{const n={};return Object.keys(t.getState()).forEach(r=>{n[r]=i=>{if(t.getState()[r]===i)return;const s=r.replace(/^\S/,a=>a.toUpperCase());t.setState(a=>{a[r]=i},`@@${e}/set${s}`)}}),n},x1e=(t,e)=>{const n=t(e.set,e.get,e);return{...e,set:{...e.set,...n}}},S1e=(t,e)=>{const n={...e.use},r={...e.useTracked},i={...e.get};return Object.keys(t(e.store.getState(),e.get,e)).forEach(o=>{n[o]=(...s)=>e.useStore(a=>{const c=t(a,e.get,e)[o];return c(...s)}),r[o]=(...s)=>{const a=e.useTrackedStore(),c=t(a,e.get,e)[o];return c(...s)},i[o]=(...s)=>{const l=t(e.store.getState(),e.get,e)[o];return l(...s)}}),{...e,get:i,use:n,useTracked:r}},J6=t=>({...t,extendSelectors:e=>J6(S1e(e,t)),extendActions:e=>J6(x1e(e,t))}),w1e=t=>{const e={};return Object.keys(t.getState()).forEach(n=>{e[n]=()=>t.getState()[n]}),e},T1e=t=>{const e={};return Object.keys(t.getState()).forEach(n=>{e[n]=r=>t(i=>i[n],r)}),e},_1e=(t,e)=>{const n={};return Object.keys(t.getState()).forEach(r=>{n[r]=()=>e()[r]}),n},k1e=t=>(e,n,r)=>{const i=(o,s)=>e(Upe(o),!0,s);return r.setState=i,t(i,n,r)};function P1e(t,...e){return e.reduce((n,r)=>r(n),t)}const n4=t=>(e,n={})=>{var r;const{middlewares:i=[],devtools:o,persist:s,immer:a}=n;Dpe((r=a==null?void 0:a.enabledAutoFreeze)!==null&&r!==void 0?r:!1),a!=null&&a.enableMapSet&&zpe();const l=[k1e,...i];s!=null&&s.enabled&&l.push(S=>y1e(S,{...s,name:t})),o!=null&&o.enabled&&l.push(S=>g1e(S,{...o,name:t})),l.push(GZ);const u=(S=>P1e(S,...l))(()=>e),f=p1e(u),h=b1e(f,t),d=(S,w)=>{u.setState(_=>{Object.assign(_,S)},w||`@@${t}/mergeState`)},m=(S,w)=>{u.setState(S,w||`@@${t}/setState`)},x=T1e(f),y=w1e(f),p=Zpe(f),g=_1e(f,p),v={get:{state:u.getState,...y},name:t,set:{state:m,mergeState:d,...h},store:u,use:x,useTracked:g,useStore:f,useTrackedStore:p,extendSelectors:()=>v,extendActions:()=>v};return J6(v)};var nb=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function tF(t,e){return e={exports:{}},t(e,e.exports),e.exports}var Q1e=typeof nb=="object"&&nb&&nb.Object===Object&&nb,nF=Q1e,$1e=typeof self=="object"&&self&&self.Object===Object&&self,E1e=nF||$1e||Function("return this")(),kf=E1e,C1e=kf.Symbol,Id=C1e,rF=Object.prototype,R1e=rF.hasOwnProperty,A1e=rF.toString,Q0=Id?Id.toStringTag:void 0;function I1e(t){var e=R1e.call(t,Q0),n=t[Q0];try{t[Q0]=void 0;var r=!0}catch{}var i=A1e.call(t);return r&&(e?t[Q0]=n:delete t[Q0]),i}var z1e=I1e,X1e=Object.prototype,L1e=X1e.toString;function M1e(t){return L1e.call(t)}var N1e=M1e,W1e="[object Null]",U1e="[object Undefined]",bz=Id?Id.toStringTag:void 0;function D1e(t){return t==null?t===void 0?U1e:W1e:bz&&bz in Object(t)?z1e(t):N1e(t)}var z1=D1e;function q1e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var q8=q1e,Y1e="[object AsyncFunction]",B1e="[object Function]",j1e="[object GeneratorFunction]",Z1e="[object Proxy]";function F1e(t){if(!q8(t))return!1;var e=z1(t);return e==B1e||e==j1e||e==Y1e||e==Z1e}var iF=F1e,V1e=kf["__core-js_shared__"],_T=V1e,xz=function(){var t=/[^.]+$/.exec(_T&&_T.keys&&_T.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function G1e(t){return!!xz&&xz in t}var H1e=G1e,K1e=Function.prototype,J1e=K1e.toString;function e0e(t){if(t!=null){try{return J1e.call(t)}catch{}try{return t+""}catch{}}return""}var OO=e0e,t0e=/[\\^$.*+?()[\]{}|]/g,n0e=/^\[object .+?Constructor\]$/,r0e=Function.prototype,i0e=Object.prototype,o0e=r0e.toString,s0e=i0e.hasOwnProperty,a0e=RegExp("^"+o0e.call(s0e).replace(t0e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l0e(t){if(!q8(t)||H1e(t))return!1;var e=iF(t)?a0e:n0e;return e.test(OO(t))}var c0e=l0e;function u0e(t,e){return t==null?void 0:t[e]}var f0e=u0e;function d0e(t,e){var n=f0e(t,e);return c0e(n)?n:void 0}var pO=d0e,h0e=function(){try{var t=pO(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Sz=h0e;function O0e(t,e,n){e=="__proto__"&&Sz?Sz(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var p0e=O0e;function m0e(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var g0e=m0e,v0e=g0e(),y0e=v0e;function b0e(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var x0e=b0e;function S0e(t){return t!=null&&typeof t=="object"}var s1=S0e,w0e="[object Arguments]";function T0e(t){return s1(t)&&z1(t)==w0e}var wz=T0e,oF=Object.prototype,_0e=oF.hasOwnProperty,k0e=oF.propertyIsEnumerable,P0e=wz(function(){return arguments}())?wz:function(t){return s1(t)&&_0e.call(t,"callee")&&!k0e.call(t,"callee")},sF=P0e,Q0e=Array.isArray,bf=Q0e;function $0e(){return!1}var E0e=$0e,eP=tF(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i?kf.Buffer:void 0,s=o?o.isBuffer:void 0,a=s||E0e;t.exports=a}),C0e=9007199254740991,R0e=/^(?:0|[1-9]\d*)$/;function A0e(t,e){var n=typeof t;return e=e==null?C0e:e,!!e&&(n=="number"||n!="symbol"&&R0e.test(t))&&t>-1&&t%1==0&&t<e}var aF=A0e,I0e=9007199254740991;function z0e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=I0e}var Y8=z0e,X0e="[object Arguments]",L0e="[object Array]",M0e="[object Boolean]",N0e="[object Date]",W0e="[object Error]",U0e="[object Function]",D0e="[object Map]",q0e="[object Number]",Y0e="[object Object]",B0e="[object RegExp]",j0e="[object Set]",Z0e="[object String]",F0e="[object WeakMap]",V0e="[object ArrayBuffer]",G0e="[object DataView]",H0e="[object Float32Array]",K0e="[object Float64Array]",J0e="[object Int8Array]",eme="[object Int16Array]",tme="[object Int32Array]",nme="[object Uint8Array]",rme="[object Uint8ClampedArray]",ime="[object Uint16Array]",ome="[object Uint32Array]",Ti={};Ti[H0e]=Ti[K0e]=Ti[J0e]=Ti[eme]=Ti[tme]=Ti[nme]=Ti[rme]=Ti[ime]=Ti[ome]=!0;Ti[X0e]=Ti[L0e]=Ti[V0e]=Ti[M0e]=Ti[G0e]=Ti[N0e]=Ti[W0e]=Ti[U0e]=Ti[D0e]=Ti[q0e]=Ti[Y0e]=Ti[B0e]=Ti[j0e]=Ti[Z0e]=Ti[F0e]=!1;function sme(t){return s1(t)&&Y8(t.length)&&!!Ti[z1(t)]}var ame=sme;function lme(t){return function(e){return t(e)}}var cme=lme,Tz=tF(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i&&nF.process,s=function(){try{var a=r&&r.require&&r.require("util").types;return a||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s}),_z=Tz&&Tz.isTypedArray,ume=_z?cme(_z):ame,lF=ume,fme=Object.prototype,dme=fme.hasOwnProperty;function hme(t,e){var n=bf(t),r=!n&&sF(t),i=!n&&!r&&eP(t),o=!n&&!r&&!i&&lF(t),s=n||r||i||o,a=s?x0e(t.length,String):[],l=a.length;for(var c in t)(e||dme.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||aF(c,l)))&&a.push(c);return a}var Ome=hme,pme=Object.prototype;function mme(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||pme;return t===n}var gme=mme;function vme(t,e){return function(n){return t(e(n))}}var yme=vme,bme=yme(Object.keys,Object),xme=bme,Sme=Object.prototype,wme=Sme.hasOwnProperty;function Tme(t){if(!gme(t))return xme(t);var e=[];for(var n in Object(t))wme.call(t,n)&&n!="constructor"&&e.push(n);return e}var _me=Tme;function kme(t){return t!=null&&Y8(t.length)&&!iF(t)}var Pme=kme;function Qme(t){return Pme(t)?Ome(t):_me(t)}var B8=Qme;function $me(t,e){return t&&y0e(t,e,B8)}var Eme=$me;function Cme(){this.__data__=[],this.size=0}var Rme=Cme;function Ame(t,e){return t===e||t!==t&&e!==e}var cF=Ame;function Ime(t,e){for(var n=t.length;n--;)if(cF(t[n][0],e))return n;return-1}var r4=Ime,zme=Array.prototype,Xme=zme.splice;function Lme(t){var e=this.__data__,n=r4(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Xme.call(e,n,1),--this.size,!0}var Mme=Lme;function Nme(t){var e=this.__data__,n=r4(e,t);return n<0?void 0:e[n][1]}var Wme=Nme;function Ume(t){return r4(this.__data__,t)>-1}var Dme=Ume;function qme(t,e){var n=this.__data__,r=r4(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Yme=qme;function X1(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}X1.prototype.clear=Rme;X1.prototype.delete=Mme;X1.prototype.get=Wme;X1.prototype.has=Dme;X1.prototype.set=Yme;var i4=X1;function Bme(){this.__data__=new i4,this.size=0}var jme=Bme;function Zme(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Fme=Zme;function Vme(t){return this.__data__.get(t)}var Gme=Vme;function Hme(t){return this.__data__.has(t)}var Kme=Hme,Jme=pO(kf,"Map"),$g=Jme,ege=pO(Object,"create"),Eg=ege;function tge(){this.__data__=Eg?Eg(null):{},this.size=0}var nge=tge;function rge(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ige=rge,oge="__lodash_hash_undefined__",sge=Object.prototype,age=sge.hasOwnProperty;function lge(t){var e=this.__data__;if(Eg){var n=e[t];return n===oge?void 0:n}return age.call(e,t)?e[t]:void 0}var cge=lge,uge=Object.prototype,fge=uge.hasOwnProperty;function dge(t){var e=this.__data__;return Eg?e[t]!==void 0:fge.call(e,t)}var hge=dge,Oge="__lodash_hash_undefined__";function pge(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Eg&&e===void 0?Oge:e,this}var mge=pge;function L1(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}L1.prototype.clear=nge;L1.prototype.delete=ige;L1.prototype.get=cge;L1.prototype.has=hge;L1.prototype.set=mge;var kz=L1;function gge(){this.size=0,this.__data__={hash:new kz,map:new($g||i4),string:new kz}}var vge=gge;function yge(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var bge=yge;function xge(t,e){var n=t.__data__;return bge(e)?n[typeof e=="string"?"string":"hash"]:n.map}var o4=xge;function Sge(t){var e=o4(this,t).delete(t);return this.size-=e?1:0,e}var wge=Sge;function Tge(t){return o4(this,t).get(t)}var _ge=Tge;function kge(t){return o4(this,t).has(t)}var Pge=kge;function Qge(t,e){var n=o4(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var $ge=Qge;function M1(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}M1.prototype.clear=vge;M1.prototype.delete=wge;M1.prototype.get=_ge;M1.prototype.has=Pge;M1.prototype.set=$ge;var s4=M1,Ege=200;function Cge(t,e){var n=this.__data__;if(n instanceof i4){var r=n.__data__;if(!$g||r.length<Ege-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new s4(r)}return n.set(t,e),this.size=n.size,this}var Rge=Cge;function N1(t){var e=this.__data__=new i4(t);this.size=e.size}N1.prototype.clear=jme;N1.prototype.delete=Fme;N1.prototype.get=Gme;N1.prototype.has=Kme;N1.prototype.set=Rge;var j5=N1,Age="__lodash_hash_undefined__";function Ige(t){return this.__data__.set(t,Age),this}var zge=Ige;function Xge(t){return this.__data__.has(t)}var Lge=Xge;function rx(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new s4;++e<n;)this.add(t[e])}rx.prototype.add=rx.prototype.push=zge;rx.prototype.has=Lge;var Mge=rx;function Nge(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Wge=Nge;function Uge(t,e){return t.has(e)}var Dge=Uge,qge=1,Yge=2;function Bge(t,e,n,r,i,o){var s=n&qge,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var f=-1,h=!0,d=n&Yge?new Mge:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var m=t[f],x=e[f];if(r)var y=s?r(x,m,f,e,t,o):r(m,x,f,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(d){if(!Wge(e,function(p,g){if(!Dge(d,g)&&(m===p||i(m,p,n,r,o)))return d.push(g)})){h=!1;break}}else if(!(m===x||i(m,x,n,r,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var uF=Bge,jge=kf.Uint8Array,Pz=jge;function Zge(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var Fge=Zge;function Vge(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Gge=Vge,Hge=1,Kge=2,Jge="[object Boolean]",eve="[object Date]",tve="[object Error]",nve="[object Map]",rve="[object Number]",ive="[object RegExp]",ove="[object Set]",sve="[object String]",ave="[object Symbol]",lve="[object ArrayBuffer]",cve="[object DataView]",Qz=Id?Id.prototype:void 0,kT=Qz?Qz.valueOf:void 0;function uve(t,e,n,r,i,o,s){switch(n){case cve:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case lve:return!(t.byteLength!=e.byteLength||!o(new Pz(t),new Pz(e)));case Jge:case eve:case rve:return cF(+t,+e);case tve:return t.name==e.name&&t.message==e.message;case ive:case sve:return t==e+"";case nve:var a=Fge;case ove:var l=r&Hge;if(a||(a=Gge),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=Kge,s.set(t,e);var u=uF(a(t),a(e),r,i,o,s);return s.delete(t),u;case ave:if(kT)return kT.call(t)==kT.call(e)}return!1}var fve=uve;function dve(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var hve=dve;function Ove(t,e,n){var r=e(t);return bf(t)?r:hve(r,n(t))}var pve=Ove;function mve(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}var gve=mve;function vve(){return[]}var yve=vve,bve=Object.prototype,xve=bve.propertyIsEnumerable,$z=Object.getOwnPropertySymbols,Sve=$z?function(t){return t==null?[]:(t=Object(t),gve($z(t),function(e){return xve.call(t,e)}))}:yve,wve=Sve;function Tve(t){return pve(t,B8,wve)}var Ez=Tve,_ve=1,kve=Object.prototype,Pve=kve.hasOwnProperty;function Qve(t,e,n,r,i,o){var s=n&_ve,a=Ez(t),l=a.length,c=Ez(e),u=c.length;if(l!=u&&!s)return!1;for(var f=l;f--;){var h=a[f];if(!(s?h in e:Pve.call(e,h)))return!1}var d=o.get(t),m=o.get(e);if(d&&m)return d==e&&m==t;var x=!0;o.set(t,e),o.set(e,t);for(var y=s;++f<l;){h=a[f];var p=t[h],g=e[h];if(r)var v=s?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(!(v===void 0?p===g||i(p,g,n,r,o):v)){x=!1;break}y||(y=h=="constructor")}if(x&&!y){var S=t.constructor,w=e.constructor;S!=w&&"constructor"in t&&"constructor"in e&&!(typeof S=="function"&&S instanceof S&&typeof w=="function"&&w instanceof w)&&(x=!1)}return o.delete(t),o.delete(e),x}var $ve=Qve,Eve=pO(kf,"DataView"),tP=Eve,Cve=pO(kf,"Promise"),nP=Cve,Rve=pO(kf,"Set"),rP=Rve,Ave=pO(kf,"WeakMap"),iP=Ave,Cz="[object Map]",Ive="[object Object]",Rz="[object Promise]",Az="[object Set]",Iz="[object WeakMap]",zz="[object DataView]",zve=OO(tP),Xve=OO($g),Lve=OO(nP),Mve=OO(rP),Nve=OO(iP),Ph=z1;(tP&&Ph(new tP(new ArrayBuffer(1)))!=zz||$g&&Ph(new $g)!=Cz||nP&&Ph(nP.resolve())!=Rz||rP&&Ph(new rP)!=Az||iP&&Ph(new iP)!=Iz)&&(Ph=function(t){var e=z1(t),n=e==Ive?t.constructor:void 0,r=n?OO(n):"";if(r)switch(r){case zve:return zz;case Xve:return Cz;case Lve:return Rz;case Mve:return Az;case Nve:return Iz}return e});var Xz=Ph,Wve=1,Lz="[object Arguments]",Mz="[object Array]",rb="[object Object]",Uve=Object.prototype,Nz=Uve.hasOwnProperty;function Dve(t,e,n,r,i,o){var s=bf(t),a=bf(e),l=s?Mz:Xz(t),c=a?Mz:Xz(e);l=l==Lz?rb:l,c=c==Lz?rb:c;var u=l==rb,f=c==rb,h=l==c;if(h&&eP(t)){if(!eP(e))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new j5),s||lF(t)?uF(t,e,n,r,i,o):fve(t,e,l,n,r,i,o);if(!(n&Wve)){var d=u&&Nz.call(t,"__wrapped__"),m=f&&Nz.call(e,"__wrapped__");if(d||m){var x=d?t.value():t,y=m?e.value():e;return o||(o=new j5),i(x,y,n,r,o)}}return h?(o||(o=new j5),$ve(t,e,n,r,i,o)):!1}var qve=Dve;function fF(t,e,n,r,i){return t===e?!0:t==null||e==null||!s1(t)&&!s1(e)?t!==t&&e!==e:qve(t,e,n,r,fF,i)}var dF=fF,Yve=1,Bve=2;function jve(t,e,n,r){var i=n.length,o=i,s=!r;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];var l=a[0],c=t[l],u=a[1];if(s&&a[2]){if(c===void 0&&!(l in t))return!1}else{var f=new j5;if(r)var h=r(c,u,l,t,e,f);if(!(h===void 0?dF(u,c,Yve|Bve,r,f):h))return!1}}return!0}var Zve=jve;function Fve(t){return t===t&&!q8(t)}var hF=Fve;function Vve(t){for(var e=B8(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,hF(i)]}return e}var Gve=Vve;function Hve(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var OF=Hve;function Kve(t){var e=Gve(t);return e.length==1&&e[0][2]?OF(e[0][0],e[0][1]):function(n){return n===t||Zve(n,t,e)}}var Jve=Kve,eye="[object Symbol]";function tye(t){return typeof t=="symbol"||s1(t)&&z1(t)==eye}var j8=tye,nye=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rye=/^\w*$/;function iye(t,e){if(bf(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||j8(t)?!0:rye.test(t)||!nye.test(t)||e!=null&&t in Object(e)}var Z8=iye,oye="Expected a function";function F8(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(oye);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(F8.Cache||s4),n}F8.Cache=s4;var sye=F8,aye=500;function lye(t){var e=sye(t,function(r){return n.size===aye&&n.clear(),r}),n=e.cache;return e}var cye=lye,uye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fye=/\\(\\)?/g,dye=cye(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(uye,function(n,r,i,o){e.push(i?o.replace(fye,"$1"):r||n)}),e}),hye=dye;function Oye(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var pye=Oye,mye=1/0,Wz=Id?Id.prototype:void 0,Uz=Wz?Wz.toString:void 0;function pF(t){if(typeof t=="string")return t;if(bf(t))return pye(t,pF)+"";if(j8(t))return Uz?Uz.call(t):"";var e=t+"";return e=="0"&&1/t==-mye?"-0":e}var gye=pF;function vye(t){return t==null?"":gye(t)}var yye=vye;function bye(t,e){return bf(t)?t:Z8(t,e)?[t]:hye(yye(t))}var mF=bye,xye=1/0;function Sye(t){if(typeof t=="string"||j8(t))return t;var e=t+"";return e=="0"&&1/t==-xye?"-0":e}var a4=Sye;function wye(t,e){e=mF(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[a4(e[n++])];return n&&n==r?t:void 0}var gF=wye;function Tye(t,e,n){var r=t==null?void 0:gF(t,e);return r===void 0?n:r}var _ye=Tye;function kye(t,e){return t!=null&&e in Object(t)}var Pye=kye;function Qye(t,e,n){e=mF(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=a4(e[r]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++r!=i?o:(i=t==null?0:t.length,!!i&&Y8(i)&&aF(s,i)&&(bf(t)||sF(t)))}var $ye=Qye;function Eye(t,e){return t!=null&&$ye(t,e,Pye)}var Cye=Eye,Rye=1,Aye=2;function Iye(t,e){return Z8(t)&&hF(e)?OF(a4(t),e):function(n){var r=_ye(n,t);return r===void 0&&r===e?Cye(n,t):dF(e,r,Rye|Aye)}}var zye=Iye;function Xye(t){return t}var Lye=Xye;function Mye(t){return function(e){return e==null?void 0:e[t]}}var Nye=Mye;function Wye(t){return function(e){return gF(e,t)}}var Uye=Wye;function Dye(t){return Z8(t)?Nye(a4(t)):Uye(t)}var qye=Dye;function Yye(t){return typeof t=="function"?t:t==null?Lye:typeof t=="object"?bf(t)?zye(t[0],t[1]):Jve(t):qye(t)}var Bye=Yye;function jye(t,e){var n={};return e=Bye(e),Eme(t,function(r,i,o){p0e(n,i,e(r,i,o))}),n}var Zye=jye;const l4=(t,e)=>Zye(e,n=>n[t]),du=Object.create(null);du.open="0";du.close="1";du.ping="2";du.pong="3";du.message="4";du.upgrade="5";du.noop="6";const Z5=Object.create(null);Object.keys(du).forEach(t=>{Z5[du[t]]=t});const Fye={type:"error",data:"parser error"},Vye=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gye=typeof ArrayBuffer=="function",Hye=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,vF=({type:t,data:e},n,r)=>Vye&&e instanceof Blob?n?r(e):Dz(e,r):Gye&&(e instanceof ArrayBuffer||Hye(e))?n?r(e):Dz(new Blob([e]),r):r(du[t]+(e||"")),Dz=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+r)},n.readAsDataURL(t)},qz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dm=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let t=0;t<qz.length;t++)dm[qz.charCodeAt(t)]=t;const Kye=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),u=new Uint8Array(c);for(r=0;r<n;r+=4)o=dm[t.charCodeAt(r)],s=dm[t.charCodeAt(r+1)],a=dm[t.charCodeAt(r+2)],l=dm[t.charCodeAt(r+3)],u[i++]=o<<2|s>>4,u[i++]=(s&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},Jye=typeof ArrayBuffer=="function",yF=(t,e)=>{if(typeof t!="string")return{type:"message",data:bF(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:ebe(t.substring(1),e)}:Z5[n]?t.length>1?{type:Z5[n],data:t.substring(1)}:{type:Z5[n]}:Fye},ebe=(t,e)=>{if(Jye){const n=Kye(t);return bF(n,e)}else return{base64:!0,data:t}},bF=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},xF=String.fromCharCode(30),tbe=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{vF(o,!1,a=>{r[s]=a,++i===n&&e(r.join(xF))})})},nbe=(t,e)=>{const n=t.split(xF),r=[];for(let i=0;i<n.length;i++){const o=yF(n[i],e);if(r.push(o),o.type==="error")break}return r},SF=4;function wo(t){if(t)return rbe(t)}function rbe(t){for(var e in wo.prototype)t[e]=wo.prototype[e];return t}wo.prototype.on=wo.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};wo.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};wo.prototype.off=wo.prototype.removeListener=wo.prototype.removeAllListeners=wo.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this};wo.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this};wo.prototype.emitReserved=wo.prototype.emit;wo.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};wo.prototype.hasListeners=function(t){return!!this.listeners(t).length};const ud=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function wF(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const ibe=setTimeout,obe=clearTimeout;function c4(t,e){e.useNativeTimers?(t.setTimeoutFn=ibe.bind(ud),t.clearTimeoutFn=obe.bind(ud)):(t.setTimeoutFn=setTimeout.bind(ud),t.clearTimeoutFn=clearTimeout.bind(ud))}const sbe=1.33;function abe(t){return typeof t=="string"?lbe(t):Math.ceil((t.byteLength||t.size)*sbe)}function lbe(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}class cbe extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class TF extends wo{constructor(e){super(),this.writable=!1,c4(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new cbe(e,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=yF(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const _F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),oP=64,ube={};let Yz=0,ib=0,Bz;function jz(t){let e="";do e=_F[t%oP]+e,t=Math.floor(t/oP);while(t>0);return e}function kF(){const t=jz(+new Date);return t!==Bz?(Yz=0,Bz=t):t+"."+jz(Yz++)}for(;ib<oP;ib++)ube[_F[ib]]=ib;function PF(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function fbe(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}let QF=!1;try{QF=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch{}const dbe=QF;function $F(t){const e=t.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!e||dbe))return new XMLHttpRequest}catch{}if(!e)try{return new ud[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function hbe(){}const Obe=function(){return new $F({xdomain:!1}).responseType!=null}();class pbe extends TF{constructor(e){if(super(e),this.polling=!1,typeof location!="undefined"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location!="undefined"&&e.hostname!==location.hostname||i!==e.port,this.xs=e.secure!==r}const n=e&&e.forceBase64;this.supportsBinary=Obe&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};nbe(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,tbe(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=kF()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=PF(e),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new au(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class au extends wo{constructor(e,n){super(),c4(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const e=wF(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const n=this.xhr=new $F(e);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=au.requestsCount++,au.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=hbe,e)try{this.xhr.abort()}catch{}typeof document!="undefined"&&delete au.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}au.requestsCount=0;au.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Zz);else if(typeof addEventListener=="function"){const t="onpagehide"in ud?"pagehide":"unload";addEventListener(t,Zz,!1)}}function Zz(){for(let t in au.requests)au.requests.hasOwnProperty(t)&&au.requests[t].abort()}const mbe=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0))(),ob=ud.WebSocket||ud.MozWebSocket,Fz=!0,gbe="arraybuffer",Vz=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class vbe extends TF{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=Vz?{}:wF(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Fz&&!Vz?n?new ob(e,n):new ob(e):new ob(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||gbe,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;vF(r,this.supportsBinary,o=>{const s={};try{Fz&&this.ws.send(o)}catch{}i&&mbe(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let e=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=kF()),this.supportsBinary||(e.b64=1);const i=PF(e),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!ob}}const ybe={websocket:vbe,polling:pbe},bbe=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,xbe=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function sP(t){const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=bbe.exec(t||""),o={},s=14;for(;s--;)o[xbe[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Sbe(o,o.path),o.queryKey=wbe(o,o.query),o}function Sbe(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.substr(0,1)=="/"||e.length===0)&&r.splice(0,1),e.substr(e.length-1,1)=="/"&&r.splice(r.length-1,1),r}function wbe(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class sd extends wo{constructor(e,n={}){super(),e&&typeof e=="object"&&(n=e,e=null),e?(e=sP(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=sP(n.host).host),c4(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=fbe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&addEventListener("beforeunload",()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},!1),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=SF,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[e],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new ybe[e](r)}open(){let e;if(this.opts.rememberUpgrade&&sd.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;sd.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;sd.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function o(){r||(r=!0,u(),n.close(),n=null)}const s=f=>{const h=new Error("probe error: "+f);h.transport=n.name,o(),this.emitReserved("upgradeError",h)};function a(){s("transport closed")}function l(){s("socket closed")}function c(f){n&&f.name!==n.name&&o()}const u=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",sd.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=abe(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){sd.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&removeEventListener("offline",this.offlineEventListener,!1),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}}sd.protocol=SF;function Tbe(t,e="",n){let r=t;n=n||typeof location!="undefined"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n!="undefined"?t=n.protocol+"//"+t:t="https://"+t),r=sP(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const _be=typeof ArrayBuffer=="function",kbe=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,EF=Object.prototype.toString,Pbe=typeof Blob=="function"||typeof Blob!="undefined"&&EF.call(Blob)==="[object BlobConstructor]",Qbe=typeof File=="function"||typeof File!="undefined"&&EF.call(File)==="[object FileConstructor]";function V8(t){return _be&&(t instanceof ArrayBuffer||kbe(t))||Pbe&&t instanceof Blob||Qbe&&t instanceof File}function F5(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(F5(t[n]))return!0;return!1}if(V8(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return F5(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&F5(t[n]))return!0;return!1}function $be(t){const e=[],n=t.data,r=t;return r.data=aP(n,e),r.attachments=e.length,{packet:r,buffers:e}}function aP(t,e){if(!t)return t;if(V8(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=aP(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=aP(t[r],e));return n}return t}function Ebe(t,e){return t.data=lP(t.data,e),t.attachments=void 0,t}function lP(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=lP(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=lP(t[n],e));return t}const Cbe=5;var mr;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(mr||(mr={}));class Rbe{constructor(e){this.replacer=e}encode(e){return(e.type===mr.EVENT||e.type===mr.ACK)&&F5(e)?(e.type=e.type===mr.EVENT?mr.BINARY_EVENT:mr.BINARY_ACK,this.encodeAsBinary(e)):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===mr.BINARY_EVENT||e.type===mr.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=$be(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class G8 extends wo{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string")n=this.decodeString(e),n.type===mr.BINARY_EVENT||n.type===mr.BINARY_ACK?(this.reconstructor=new Abe(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n);else if(V8(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(mr[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===mr.BINARY_EVENT||r.type===mr.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const s=e.substring(o,n);if(s!=Number(s)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=e.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(G8.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case mr.CONNECT:return typeof n=="object";case mr.DISCONNECT:return n===void 0;case mr.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case mr.EVENT:case mr.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case mr.ACK:case mr.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Abe{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=Ebe(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var Ibe=Object.freeze(Object.defineProperty({__proto__:null,protocol:Cbe,get PacketType(){return mr},Encoder:Rbe,Decoder:G8},Symbol.toStringTag,{value:"Module"}));function mc(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const zbe=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class CF extends wo{constructor(e,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[mc(e,"open",this.onopen.bind(this)),mc(e,"packet",this.onpacket.bind(this)),mc(e,"error",this.onerror.bind(this)),mc(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(zbe.hasOwnProperty(e))throw new Error('"'+e+'" is a reserved event name');n.unshift(e);const r={type:mr.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){const r=this.flags.timeout;if(r===void 0){this.acks[e]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this.packet({type:mr.CONNECT,data:e})}):this.packet({type:mr.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case mr.CONNECT:if(e.data&&e.data.sid){const i=e.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case mr.EVENT:case mr.BINARY_EVENT:this.onevent(e);break;case mr.ACK:case mr.BINARY_ACK:this.onack(e);break;case mr.DISCONNECT:this.ondisconnect();break;case mr.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e)}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:mr.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e){this.id=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:mr.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function W1(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}W1.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};W1.prototype.reset=function(){this.attempts=0};W1.prototype.setMin=function(t){this.ms=t};W1.prototype.setMax=function(t){this.max=t};W1.prototype.setJitter=function(t){this.jitter=t};class cP extends wo{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,c4(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new W1({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||Ibe;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new sd(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=mc(n,"open",function(){r.onopen(),e&&e()}),o=mc(n,"error",s=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",s),e?e(s):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const s=this._timeout;s===0&&i();const a=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},s);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(mc(e,"ping",this.onping.bind(this)),mc(e,"data",this.ondata.bind(this)),mc(e,"error",this.onerror.bind(this)),mc(e,"close",this.onclose.bind(this)),mc(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){this.decoder.add(e)}ondecoded(e){this.emitReserved("packet",e)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r||(r=new CF(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const $0={};function V5(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Tbe(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=$0[i]&&o in $0[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new cP(r,e):($0[i]||($0[i]=new cP(r,e)),l=$0[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(V5,{Manager:cP,Socket:CF,io:V5,connect:V5});var Nn=(t=>(t.Loading="loading",t.Ready="ready",t.Offline="offline",t.Online="online",t.StatusChanged="statusChanged",t.LspStatusChanged="lspStatusChanged",t.PlaygroundChanged="playgroundChanged",t.Following="following",t.UnFollowing="unFollowing",t.RunStatusChanged="runStatusChanged",t.FileStructureChanged="fileStructureChanged",t.FileContentChanged="fileContentChanged",t.AppendToConsole="appendToConsole",t.AppendToTerminal="appendToTerminal",t.ApplicationAvailable="ApplicationAvailable",t.PlaybackInfo="playbackInfo",t.ReplayStart="ReplayStart",t.ReplayEnd="ReplayEnd",t.Customize="customize",t.UserEnter="userEnter",t.UserLeave="userLeave",t.UsersUpdated="usersUpdated",t.ConnectionBroken="connectionBroken",t.ConnectionFailed="connectionFailed",t.AuthorizationFailed="authorizationFailed",t.FileStructureDamaged="fileStructureDamaged",t.ErrorFromServer="errorFromServer",t.AppendCustomizeFrameData="appendCustomizeFrameData",t.LineAction="lineAction",t.FileInfo="fileInfo",t.InsertTextById="insertTextById",t.SwitchFreezeCode="switchFreezeCode",t))(Nn||{}),is=(t=>(t.RetainingAllFiles="retainingAllFiles",t.Authorize="auth",t.Active="active",t.Run="run",t.Stop="stop",t.Heartbeat="heartbeat",t.SetFileLockStatus="",t.SetFileVisiable="",t.AddFileToUnitTest="",t.RemoveFileFromUnitTest="",t.KeyEvent="keyEvent",t.File="file",t.EditFile="editFile",t.FileTree="fileTree",t.Terminal="terminal",t.Cursor="cursor",t.GetPlaybackInfo="getPlaybackInfo",t.LoadPlaybackData="loadPlaybackData",t.FollowingAgentUser="followingAgentUser",t.UnFollowingAgentUser="unFollowingAgentUser",t.FollowingFocusComponent="followingFocusComponent",t.FollowingEditorScroll="followingEditorScroll",t.CustomizeFrameData="appendCustomizeFrameData",t.AddCDNSource="addCDNSource",t.SwitchLanguage="switchLanguage",t.StatisticsPlaybackData="statisticsPlaybackData",t.I18nLanguage="i18nLanguage",t))(is||{}),_n=(t=>(t.Connect="connect",t.Disconnect="disconnect",t.AuthAck="authAck",t.Active="active",t.SyncPlaygroundInfo="syncPlaygroundInfo",t.ChangePlaygroundInfo="changePlaygroundInfo",t.RunStatus="runStatus",t.LspStatus="lspStatus",t.Following="following",t.UnFollowing="unFollowing",t.UserEnter="userEnter",t.UserLeave="userLeave",t.UsersUpdated="usersUpdated",t.Simulator="simulator",t.PlaybackInfo="playbackInfo",t.PlaybackData="playbackData",t.File="file",t.FileTree="fileTree",t.Run="run",t.Console="console",t.Terminal="terminal",t.Editor="editor",t.KeyEvent="keyEvent",t.CloseFile="closeFile",t.FocusComponent="FocusComponent",t.InvisibleComponentActive="InvisibleComponentActive",t.AppendCustomizeFrameData="appendCustomizeFrameData",t.TerminalStatus="terminalStatus",t))(_n||{}),H8=(t=>(t.NotSupport="notSupport",t.Loading="loading",t.Running="running",t.Shutdown="shutdown",t.LspReady="lspReady",t))(H8||{});class Xbe{constructor(e,n=2e3){Lt(this,"name");Lt(this,"channel");Lt(this,"_timeout");Lt(this,"_messageId");Lt(this,"_messages");Lt(this,"_filter");this.name=e,this._messageId=0,this.channel=new BroadcastChannel(e),this.channel.onmessage=r=>this.receive(r),this._messages=[],this._timeout=n}setFilter(e){this._filter=e}send(e,n){const r=new Lbe(n||this._timeout),i=new Promise((o,s)=>{r._reject=s,r._resolve=o});return this._messages.push(r),this.channel.postMessage({id:this._messageId++,type:"request",payload:e}),i}answer(e,n){this.channel.postMessage({id:e,type:"response",payload:n})}receive(e){const n=e.data;n.type==="request"?(!this._filter||this._filter(n.payload))&&this.answer(n.id,{active:!0}):n.type==="response"&&this._messages[n.id].reject(n.payload)}}class Lbe{constructor(e){Lt(this,"_resolve");Lt(this,"_reject");Lt(this,"_interval");this._interval=setTimeout(()=>this.resolve({active:!1,reason:"timeout, no one uses it"}),e)}resolve(e){clearTimeout(this._interval),this._resolve(e)}reject(e){this._reject(e)}}let RF,sb;async function Mbe(t){sb||(sb=new Xbe("dao-paas",500));let e="";sb.setFilter(i=>i.id===e);const n=JSON.parse(localStorage.getItem(`agentUsers_${t}`)||"[]")||[],r=[];for(const i of n){const o=sb.send(i).then(()=>{if(e==="")return i.time=new Date().getTime(),e=i.id,localStorage.setItem(`agentUsers_${t}`,JSON.stringify(n)),Promise.resolve(e)});r.push(o)}return Promise.any(r)}function Nbe(t,e){const n=JSON.parse(localStorage.getItem(`agentUsers_${e}`)||"[]")||[],r=n.find(i=>i.id==t);r?r.time=new Date().getTime():n.push({id:t,time:new Date().getTime()}),localStorage.setItem(`agentUsers_${e}`,JSON.stringify(n)),RF=t}function Wbe(t){return t===RF}const AF="daoLogger",Ube=typeof module=="object"&&typeof module.exports=="object",PT=Ube?global:window,IF=PT&&PT.localStorage?PT.localStorage:{store:{},getItem(t){return this.store[t]},setItem(t,e){this.store[t]=e}},dn=new Proxy(console,{get(t,e){return IF.getItem(AF)?t[e]:()=>{}}}),Dbe=()=>{IF.setItem(AF,"*")};function ma(t){return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ma(t)}function js(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Gz(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zs(t,e,n){return e&&Gz(t.prototype,e),n&&Gz(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function kc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ix(t,e){return ix=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ix(t,e)}function Vd(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ix(t,e)}function U1(t,e){if(e&&(ma(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kc(t)}function Yl(t){return Yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yl(t)}function Rn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zF(t){if(Array.isArray(t))return t}function XF(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function uP(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function K8(t,e){if(!!t){if(typeof t=="string")return uP(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(t,e)}}function LF(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
49
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qbe(t){return zF(t)||XF(t)||K8(t)||LF()}function Hz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kz(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hz(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ybe={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,n){console&&console[e]&&console[e].apply(console,n)}},Bbe=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};js(this,t),this.init(e,n)}return Zs(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||Ybe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,o){return o&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new t(this.logger,Kz(Kz({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}}]),t}(),Kc=new Bbe,zd=function(){function t(){js(this,t),this.observers={}}return Zs(t,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].push(r)}),this}},{key:"off",value:function(n,r){if(!!this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.observers[n]){var s=[].concat(this.observers[n]);s.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),t}();function E0(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function Jz(t){return t==null?"":""+t}function jbe(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function J8(t,e,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}for(var o=typeof e!="string"?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={}}return i()?{}:{obj:t,k:r(o.shift())}}function eX(t,e,n){var r=J8(t,e,Object),i=r.obj,o=r.k;i[o]=n}function Zbe(t,e,n,r){var i=J8(t,e,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function ox(t,e){var n=J8(t,e),r=n.obj,i=n.k;if(!!r)return r[i]}function tX(t,e,n){var r=ox(t,n);return r!==void 0?r:ox(e,n)}function MF(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):MF(t[r],e[r],n):t[r]=e[r]);return t}function WO(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Fbe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Vbe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return Fbe[e]}):t}var u4=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Gbe=[" ",",","?","!",";"];function Hbe(t,e,n){e=e||"",n=n||"";var r=Gbe.filter(function(a){return e.indexOf(a)<0&&n.indexOf(a)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),o=!i.test(t);if(!o){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(o=!0)}return o}function nX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ab(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kbe(t){var e=Jbe();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function Jbe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function NF(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!t){if(t[e])return t[e];for(var r=e.split(n),i=t,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];l===void 0&&r.length>o+s;)s++,a=r.slice(o,o+s).join(n),l=i[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var c=r.slice(o+s).join(n);return c?NF(l,c,n):void 0}i=i[r[o]]}return i}}var e5e=function(t){Vd(n,t);var e=Kbe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return js(this,n),i=e.call(this),u4&&zd.call(kc(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Zs(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[i,o];s&&typeof s!="string"&&(u=u.concat(s)),s&&typeof s=="string"&&(u=u.concat(l?s.split(l):s)),i.indexOf(".")>-1&&(u=i.split("."));var f=ox(this.data,u);return f||!c||typeof s!="string"?f:NF(this.data&&this.data[i]&&this.data[i][o],s,l)}},{key:"addResource",value:function(i,o,s,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[i,o];s&&(u=u.concat(c?s.split(c):s)),i.indexOf(".")>-1&&(u=i.split("."),a=o,o=u[1]),this.addNamespaces(o),eX(this.data,u,a),l.silent||this.emit("added",i,o,s,a)}},{key:"addResources",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in s)(typeof s[l]=="string"||Object.prototype.toString.apply(s[l])==="[object Array]")&&this.addResource(i,o,l,s[l],{silent:!0});a.silent||this.emit("added",i,o,s)}},{key:"addResourceBundle",value:function(i,o,s,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[i,o];i.indexOf(".")>-1&&(u=i.split("."),a=s,s=o,o=u[1]),this.addNamespaces(o);var f=ox(this.data,u)||{};a?MF(f,s,l):f=ab(ab({},f),s),eX(this.data,u,f),c.silent||this.emit("added",i,o,s)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?ab(ab({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),s=o&&Object.keys(o)||[];return!!s.find(function(a){return o[a]&&Object.keys(o[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(zd),WF={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,o){var s=this;return e.forEach(function(a){s.processors[a]&&(n=s.processors[a].process(n,r,i,o))}),n}};function rX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function t5e(t){var e=n5e();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function n5e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var iX={},oX=function(t){Vd(n,t);var e=t5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return js(this,n),i=e.call(this),u4&&zd.call(kc(i)),jbe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,kc(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Kc.create("translator"),i}return Zs(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var s=this.resolve(i,o);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(i,o){var s=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],c=s&&i.indexOf(s)>-1,u=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Hbe(i,s,a);if(c&&!u){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:l};var h=i.split(s);(s!==a||s===a&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),i=h.join(a)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,s){var a=this;if(ma(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=this.extractFromKey(i[i.length-1],o),f=u.key,h=u.namespaces,d=h[h.length-1],m=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(m&&m.toLowerCase()==="cimode"){if(x){var y=o.nsSeparator||this.options.nsSeparator;return l?(p.res="".concat(d).concat(y).concat(f),p):"".concat(d).concat(y).concat(f)}return l?(p.res=f,p):f}var p=this.resolve(i,o),g=p&&p.res,v=p&&p.usedKey||f,S=p&&p.exactUsedKey||f,w=Object.prototype.toString.apply(g),_=["[object Number]","[object Function]","[object RegExp]"],k=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,X=typeof g!="string"&&typeof g!="boolean"&&typeof g!="number";if(A&&g&&X&&_.indexOf(w)<0&&!(typeof k=="string"&&w==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,zs(zs({},o),{},{ns:h})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(p.res=E,p):E}if(c){var $=w==="[object Array]",R=$?[]:{},z=$?S:v;for(var H in g)if(Object.prototype.hasOwnProperty.call(g,H)){var Z="".concat(z).concat(c).concat(H);R[H]=this.translate(Z,zs(zs({},o),{joinArrays:!1,ns:h})),R[H]===Z&&(R[H]=g[H])}g=R}}else if(A&&typeof k=="string"&&w==="[object Array]")g=g.join(k),g&&(g=this.extendTranslation(g,i,o,s));else{var M=!1,q=!1,F=o.count!==void 0&&typeof o.count!="string",K=n.hasDefaultValue(o),oe=F?this.pluralResolver.getSuffix(m,o.count,o):"",G=o["defaultValue".concat(oe)]||o.defaultValue;!this.isValidLookup(g)&&K&&(M=!0,g=G),this.isValidLookup(g)||(q=!0,g=f);var re=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Te=re&&q?void 0:g,Ee=K&&G!==g&&this.options.updateMissing;if(q||M||Ee){if(this.logger.log(Ee?"updateKey":"missingKey",m,d,f,Ee?G:g),c){var V=this.resolve(f,zs(zs({},o),{},{keySeparator:!1}));V&&V.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.")}var ye=[],ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(var le=0;le<ee.length;le++)ye.push(ee[le]);else this.options.saveMissingTo==="all"?ye=this.languageUtils.toResolveHierarchy(o.lng||this.language):ye.push(o.lng||this.language);var ie=function(Fe,nt,Ot){var ft=K&&Ot!==g?Ot:Te;a.options.missingKeyHandler?a.options.missingKeyHandler(Fe,d,nt,ft,Ee,o):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(Fe,d,nt,ft,Ee,o),a.emit("missingKey",Fe,d,nt,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?ye.forEach(function(Me){a.pluralResolver.getSuffixes(Me,o).forEach(function(Fe){ie([Me],f+Fe,o["defaultValue".concat(Fe)]||G)})}):ie(ye,f,G))}g=this.extendTranslation(g,i,o,p,s),q&&g===f&&this.options.appendNamespaceToMissingKey&&(g="".concat(d,":").concat(f)),(q||M)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(d,":").concat(f):f,M?g:void 0):g=this.options.parseMissingKeyHandler(g))}return l?(p.res=g,p):g}},{key:"extendTranslation",value:function(i,o,s,a,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,zs(zs({},this.options.interpolation.defaultVariables),s),a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init(zs(zs({},s),{interpolation:zs(zs({},this.options.interpolation),s.interpolation)}));var u=typeof i=="string"&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(u){var h=i.match(this.interpolator.nestingRegexp);f=h&&h.length}var d=s.replace&&typeof s.replace!="string"?s.replace:s;if(this.options.interpolation.defaultVariables&&(d=zs(zs({},this.options.interpolation.defaultVariables),d)),i=this.interpolator.interpolate(i,d,s.lng||this.language,s),u){var m=i.match(this.interpolator.nestingRegexp),x=m&&m.length;f<x&&(s.nest=!1)}s.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var g=arguments.length,v=new Array(g),S=0;S<g;S++)v[S]=arguments[S];return l&&l[0]===v[0]&&!s.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(v[0]," in key: ").concat(o[0])),null):c.translate.apply(c,v.concat([o]))},s)),s.interpolation&&this.interpolator.reset()}var y=s.postProcess||this.options.postProcess,p=typeof y=="string"?[y]:y;return i!=null&&p&&p.length&&s.applyPostProcessor!==!1&&(i=WF.handle(p,i,o,this.options&&this.options.postProcessPassResolved?zs({i18nResolved:a},s):s,this)),i}},{key:"resolve",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,l,c,u,f;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!o.isValidLookup(a)){var d=o.extractFromKey(h,s),m=d.key;l=m;var x=d.namespaces;o.options.fallbackNS&&(x=x.concat(o.options.fallbackNS));var y=s.count!==void 0&&typeof s.count!="string",p=y&&!s.ordinal&&s.count===0&&o.pluralResolver.shouldUseIntlApi(),g=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",v=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);x.forEach(function(S){o.isValidLookup(a)||(f=S,!iX["".concat(v[0],"-").concat(S)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(iX["".concat(v[0],"-").concat(S)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(v.join(", "),`" won't get resolved as namespace "`).concat(f,'" 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!!!")),v.forEach(function(w){if(!o.isValidLookup(a)){u=w;var _=[m];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(_,m,w,S,s);else{var k;y&&(k=o.pluralResolver.getSuffix(w,s.count,s));var A="".concat(o.options.pluralSeparator,"zero");if(y&&(_.push(m+k),p&&_.push(m+A)),g){var X="".concat(m).concat(o.options.contextSeparator).concat(s.context);_.push(X),y&&(_.push(X+k),p&&_.push(X+A))}}for(var E;E=_.pop();)o.isValidLookup(a)||(c=E,a=o.getResource(w,S,E,s))}}))})}}),{res:a,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,s,a):this.resourceStore.getResource(i,o,s,a)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&o===s.substring(0,o.length)&&i[s]!==void 0)return!0;return!1}}]),n}(zd);function QT(t){return t.charAt(0).toUpperCase()+t.slice(1)}var r5e=function(){function t(e){js(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kc.create("languageUtils")}return Zs(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=QT(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=QT(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=QT(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var s=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(s))&&(i=s)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var s=r.getLanguagePartFromCode(o);if(r.isSupportedCode(s))return i=s;i=r.options.supportedLngs.find(function(a){if(a.indexOf(s)===0)return a})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),s=[],a=function(c){!c||(i.isSupportedCode(c)?s.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),o.forEach(function(l){s.indexOf(l)<0&&a(i.formatLanguageCode(l))}),s}}]),t}(),i5e=[{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}],o5e={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}},s5e=["v1","v2","v3"],sX={zero:0,one:1,two:2,few:3,many:4,other:5};function a5e(){var t={};return i5e.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:o5e[e.fc]}})}),t}var l5e=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};js(this,t),this.languageUtils=e,this.options=n,this.logger=Kc.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!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=a5e()}return Zs(t,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(s,a){return sX[s]-sX[a]}).map(function(s){return"".concat(r.options.prepend).concat(s)}):o.numbers.map(function(s){return r.getSuffix(n,s,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),s=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));var a=function(){return i.options.prepend&&s.toString()?i.options.prepend+s.toString():s.toString()};return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?"_plural_".concat(s.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!s5e.includes(this.options.compatibilityJSON)}}]),t}();function aX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ic(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var c5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};js(this,t),this.logger=Kc.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return Zs(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:Vbe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?WO(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?WO(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?WO(r.nestingPrefix):r.nestingPrefixEscaped||WO("$t("),this.nestingSuffix=r.nestingSuffix?WO(r.nestingSuffix):r.nestingSuffixEscaped||WO(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var s=this,a,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(y){return y.replace(/\$/g,"$$$$")}var h=function(p){if(p.indexOf(s.formatSeparator)<0){var g=tX(r,u,p);return s.alwaysFormat?s.format(g,void 0,i,ic(ic(ic({},o),r),{},{interpolationkey:p})):g}var v=p.split(s.formatSeparator),S=v.shift().trim(),w=v.join(s.formatSeparator).trim();return s.format(tX(r,u,S),w,i,ic(ic(ic({},o),r),{},{interpolationkey:S}))};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,m=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:function(p){return f(p)}},{regex:this.regexp,safeValue:function(p){return s.escapeValue?f(s.escape(p)):f(p)}}];return x.forEach(function(y){for(c=0;a=y.regex.exec(n);){var p=a[1].trim();if(l=h(p),l===void 0)if(typeof d=="function"){var g=d(n,a,o);l=typeof g=="string"?g:""}else if(o&&o.hasOwnProperty(p))l="";else if(m){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(p," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=Jz(l));var v=y.safeValue(l);if(n=n.replace(a[0],v),m?(y.regex.lastIndex+=l.length,y.regex.lastIndex-=a[0].length):y.regex.lastIndex=0,c++,c>=s.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,l=ic({},o);l.applyPostProcessor=!1,delete l.defaultValue;function c(d,m){var x=this.nestingOptionsSeparator;if(d.indexOf(x)<0)return d;var y=d.split(new RegExp("".concat(x,"[ ]*{"))),p="{".concat(y[1]);d=y[0],p=this.interpolate(p,l),p=p.replace(/'/g,'"');try{l=JSON.parse(p),m&&(l=ic(ic({},m),l))}catch(g){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),g),"".concat(d).concat(x).concat(p)}return delete l.defaultValue,d}for(;s=this.nestingRegexp.exec(n);){var u=[],f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map(function(d){return d.trim()});s[1]=h.shift(),u=h,f=!0}if(a=r(c.call(this,s[1].trim(),l),l),a&&s[0]===n&&typeof a!="string")return a;typeof a!="string"&&(a=Jz(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),f&&(a=u.reduce(function(d,m){return i.format(d,m,o.lng,ic(ic({},o),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),t}();function lX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Df(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u5e(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(s){if(!!s){var a=s.split(":"),l=qbe(a),c=l[0],u=l.slice(1),f=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=f),f==="false"&&(n[c.trim()]=!1),f==="true"&&(n[c.trim()]=!0),isNaN(f)||(n[c.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:n}}var f5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};js(this,t),this.logger=Kc.create("formatter"),this.options=e,this.formats={number:function(r,i,o){return new Intl.NumberFormat(i,o).format(r)},currency:function(r,i,o){return new Intl.NumberFormat(i,Df(Df({},o),{},{style:"currency"})).format(r)},datetime:function(r,i,o){return new Intl.DateTimeFormat(i,Df({},o)).format(r)},relativetime:function(r,i,o){return new Intl.RelativeTimeFormat(i,Df({},o)).format(r,o.range||"day")},list:function(r,i,o){return new Intl.ListFormat(i,Df({},o)).format(r)}},this.init(e)}return Zs(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"format",value:function(n,r,i,o){var s=this,a=r.split(this.formatSeparator),l=a.reduce(function(c,u){var f=u5e(u),h=f.formatName,d=f.formatOptions;if(s.formats[h]){var m=c;try{var x=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=x.locale||x.lng||o.locale||o.lng||i;m=s.formats[h](c,y,Df(Df(Df({},d),o),x))}catch(p){s.logger.warn(p)}return m}else s.logger.warn("there was no format function for ".concat(h));return c},n);return l}}]),t}();function cX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function uX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function d5e(t){var e=h5e();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function h5e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function O5e(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var p5e=function(t){Vd(n,t);var e=d5e(n);function n(r,i,o){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return js(this,n),s=e.call(this),u4&&zd.call(kc(s)),s.backend=r,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=Kc.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,a.backend,a),s}return Zs(n,[{key:"queueLoad",value:function(i,o,s,a){var l=this,c={},u={},f={},h={};return i.forEach(function(d){var m=!0;o.forEach(function(x){var y="".concat(d,"|").concat(x);!s.reload&&l.store.hasResourceBundle(d,x)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?u[y]===void 0&&(u[y]=!0):(l.state[y]=1,m=!1,u[y]===void 0&&(u[y]=!0),c[y]===void 0&&(c[y]=!0),h[x]===void 0&&(h[x]=!0)))}),m||(f[d]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,o,s){var a=i.split("|"),l=a[0],c=a[1];o&&this.emit("failedLoading",l,c,o),s&&this.store.addResourceBundle(l,c,s),this.state[i]=o?-1:2;var u={};this.queue.forEach(function(f){Zbe(f.loaded,[l],c),O5e(f,i),o&&f.errors.push(o),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(h){u[h]||(u[h]={});var d=f.loaded[h];d.length&&d.forEach(function(m){u[h][m]===void 0&&(u[h][m]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,o,s){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!i.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:s,tried:l,wait:c,callback:u});return}return this.readingCalls++,this.backend[s](i,o,function(f,h){if(a.readingCalls--,a.waitingReads.length>0){var d=a.waitingReads.shift();a.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(f&&h&&l<a.maxRetries){setTimeout(function(){a.read.call(a,i,o,s,l+1,c*2,u)},c);return}u(f,h)})}},{key:"prepareLoading",value:function(i,o){var s=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=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."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var c=this.queueLoad(i,o,a,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){s.loadOne(u)})}},{key:"load",value:function(i,o,s){this.prepareLoading(i,o,{},s)}},{key:"reload",value:function(i,o,s){this.prepareLoading(i,o,{reload:!0},s)}},{key:"loadOne",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=i.split("|"),l=a[0],c=a[1];this.read(l,c,"read",void 0,void 0,function(u,f){u&&o.logger.warn("".concat(s,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&f&&o.logger.log("".concat(s,"loaded namespace ").concat(c," for language ").concat(l),f),o.loaded(i,u,f)})}},{key:"saveMissing",value:function(i,o,s,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(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!!!");return}s==null||s===""||(this.backend&&this.backend.create&&this.backend.create(i,o,s,a,null,uX(uX({},c),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,s,a))}}]),n}(zd);function m5e(){return{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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var n={};if(ma(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),ma(e[2])==="object"||ma(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function fX(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function dX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function g5e(t){var e=v5e();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function v5e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lb(){}function y5e(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var sx=function(t){Vd(n,t);var e=g5e(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(js(this,n),r=e.call(this),u4&&zd.call(kc(r)),r.options=fX(i),r.services={},r.logger=Kc,r.modules={external:[]},y5e(kc(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),U1(r,kc(r));setTimeout(function(){r.init(i,o)},0)}return r}return Zs(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(s=o,o={}),!o.defaultNS&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var a=m5e();this.options=Xc(Xc(Xc({},a),this.options),fX(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Xc(Xc({},a.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Kc.init(l(this.modules.logger),this.options):Kc.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=f5e);var u=new r5e(this.options);this.store=new e5e(this.options.resources,this.options);var f=this.services;f.logger=Kc,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new l5e(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(f.formatter=l(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new c5e(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new p5e(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),S=1;S<g;S++)v[S-1]=arguments[S];i.emit.apply(i,[p].concat(v))}),this.modules.languageDetector&&(f.languageDetector=l(this.modules.languageDetector),f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=l(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new oX(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),S=1;S<g;S++)v[S-1]=arguments[S];i.emit.apply(i,[p].concat(v))}),this.modules.external.forEach(function(p){p.init&&p.init(i)})}if(this.format=this.options.interpolation.format,s||(s=lb),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(p){i[p]=function(){var g;return(g=i.store)[p].apply(g,arguments)}});var m=["addResource","addResources","addResourceBundle","removeResourceBundle"];m.forEach(function(p){i[p]=function(){var g;return(g=i.store)[p].apply(g,arguments),i}});var x=E0(),y=function(){var g=function(S,w){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),x.resolve(w),s(S,w)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return g(null,i.t.bind(i));i.changeLanguage(i.options.lng,g)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),x}},{key:"loadResources",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lb,a=s,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(a=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var c=[],u=function(d){if(!!d){var m=o.services.languageUtils.toResolveHierarchy(d);m.forEach(function(x){c.indexOf(x)<0&&c.push(x)})}};if(l)u(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(h){return u(h)})}this.options.preload&&this.options.preload.forEach(function(h){return u(h)}),this.services.backendConnector.load(c,this.options.ns,function(h){!h&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),a(h)})}else a(null)}},{key:"reloadResources",value:function(i,o,s){var a=E0();return i||(i=this.languages),o||(o=this.options.ns),s||(s=lb),this.services.backendConnector.reload(i,o,function(l){a.resolve(),s(l)}),a}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&WF.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var s=this.languages[o];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,o){var s=this;this.isLanguageChangingTo=i;var a=E0();this.emit("languageChanging",i);var l=function(h){s.language=h,s.languages=s.services.languageUtils.toResolveHierarchy(h),s.resolvedLanguage=void 0,s.setResolvedLanguage(h)},c=function(h,d){d?(l(d),s.translator.changeLanguage(d),s.isLanguageChangingTo=void 0,s.emit("languageChanged",d),s.logger.log("languageChanged",d)):s.isLanguageChangingTo=void 0,a.resolve(function(){return s.t.apply(s,arguments)}),o&&o(h,function(){return s.t.apply(s,arguments)})},u=function(h){!i&&!h&&s.services.languageDetector&&(h=[]);var d=typeof h=="string"?h:s.services.languageUtils.getBestMatchFromCodes(h);d&&(s.language||l(d),s.translator.language||s.translator.changeLanguage(d),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage(d)),s.loadResources(d,function(m){c(m,d)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(i),a}},{key:"getFixedT",value:function(i,o,s){var a=this,l=function c(u,f){var h;if(ma(f)!=="object"){for(var d=arguments.length,m=new Array(d>2?d-2:0),x=2;x<d;x++)m[x-2]=arguments[x];h=a.options.overloadTranslationOptionHandler([u,f].concat(m))}else h=Xc({},f);h.lng=h.lng||c.lng,h.lngs=h.lngs||c.lngs,h.ns=h.ns||c.ns,h.keyPrefix=h.keyPrefix||s||c.keyPrefix;var y=a.options.keySeparator||".",p=h.keyPrefix?"".concat(h.keyPrefix).concat(y).concat(u):u;return a.t(p,h)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=s,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=this,s=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;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var u=function(d,m){var x=o.services.backendConnector.state["".concat(d,"|").concat(m)];return x===-1||x===2};if(s.precheck){var f=s.precheck(this,u);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(a,i)&&(!l||u(c,i)))}},{key:"loadNamespaces",value:function(i,o){var s=this,a=E0();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),o&&o(l)}),a):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var s=E0();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(c){return a.indexOf(c)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(c){s.resolve(),o&&o(c)}),s):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["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"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lb,a=Xc(Xc(Xc({},this.options),o),{isClone:!0}),l=new n(a),c=["store","services","language"];return c.forEach(function(u){l[u]=i[u]}),l.services=Xc({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new oX(l.services,l.options),l.translator.on("*",function(u){for(var f=arguments.length,h=new Array(f>1?f-1:0),d=1;d<f;d++)h[d-1]=arguments[d];l.emit.apply(l,[u].concat(h))}),l.init(a,s),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(zd);Rn(sx,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new sx(t,e)});var Ho=sx.createInstance();Ho.createInstance=sx.createInstance;Ho.createInstance;Ho.init;Ho.loadResources;Ho.reloadResources;Ho.use;Ho.changeLanguage;Ho.getFixedT;Ho.t;Ho.exists;Ho.setDefaultNamespace;Ho.hasLoadedNamespace;Ho.loadNamespaces;Ho.loadLanguages;function Cg(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Lo(t,e){if(t==null)return{};var n=Cg(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}var b5e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,x5e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026"},S5e=function(e){return x5e[e]},w5e=function(e){return e.replace(b5e,S5e)};function hX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function OX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var fP={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:w5e},UF,T5e=W.exports.createContext();function _5e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fP=OX(OX({},fP),t)}function k5e(){return fP}var P5e=function(){function t(){js(this,t),this.usedNamespaces={}}return Zs(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function Q5e(t){UF=t}function $5e(){return UF}var E5e={type:"3rdParty",init:function(e){_5e(e.options.react),Q5e(e)}};function C5e(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(t=console).warn.apply(t,n)}}var pX={};function dP(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&pX[e[0]]||(typeof e[0]=="string"&&(pX[e[0]]=new Date),C5e.apply(void 0,e))}function mX(t,e,n){t.loadNamespaces(e,function(){if(t.isInitialized)n();else{var r=function i(){setTimeout(function(){t.off("initialized",i)},0),n()};t.on("initialized",r)}})}function R5e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,o=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var s=function(l,c){var u=e.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}function A5e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return dP("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(o,s){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,t))return!1}}):R5e(t,e,n)}function I5e(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function kn(t,e){return zF(t)||I5e(t,e)||K8(t,e)||LF()}function gX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $T(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var z5e=function(e,n){var r=W.exports.useRef();return W.exports.useEffect(function(){r.current=n?r.current:e},[e,n]),r.current};function Pf(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=W.exports.useContext(T5e)||{},i=r.i18n,o=r.defaultNS,s=n||i||$5e();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new P5e),!s){dP("You will need to pass in an i18next instance by using initReactI18next");var a=function(X){return Array.isArray(X)?X[X.length-1]:X},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&dP("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=$T($T($T({},k5e()),s.options.react),e),u=c.useSuspense,f=c.keyPrefix,h=t||o||s.options&&s.options.defaultNS;h=typeof h=="string"?[h]:h||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(h);var d=(s.isInitialized||s.initializedStoreOnce)&&h.every(function(A){return A5e(A,s,c)});function m(){return s.getFixedT(null,c.nsMode==="fallback"?h:h[0],f)}var x=W.exports.useState(m),y=kn(x,2),p=y[0],g=y[1],v=h.join(),S=z5e(v),w=W.exports.useRef(!0);W.exports.useEffect(function(){var A=c.bindI18n,X=c.bindI18nStore;w.current=!0,!d&&!u&&mX(s,h,function(){w.current&&g(m)}),d&&S&&S!==v&&w.current&&g(m);function E(){w.current&&g(m)}return A&&s&&s.on(A,E),X&&s&&s.store.on(X,E),function(){w.current=!1,A&&s&&A.split(" ").forEach(function($){return s.off($,E)}),X&&s&&X.split(" ").forEach(function($){return s.store.off($,E)})}},[s,v]);var _=W.exports.useRef(!0);W.exports.useEffect(function(){w.current&&!_.current&&g(m),_.current=!1},[s]);var k=[p,s,d];if(k.t=p,k.i18n=s,k.ready=d,d||!d&&!u)return k;throw new Promise(function(A){mX(s,h,function(){A()})})}var X5e={common_success:"Success",common_confirm:"Confirm",common_cancel:"Cancel",common_delete:"Delete",common_hidden:"Hidden",common_locked:"Locked",common_offline:"Offline",common_directory:"Directory",common_file:"File",editor_no_open_file:"None file opened",editor_large_file_tip:"The file size is over 16 MB, preview is not supported",editor_unsupported_format_file_cannot_display:"The file cannot be displayed for unsupported format",editor_picture_not_support_preview:"Picture's preview is not yet supported",editor_search_files_by_name:"Search files by name (append: to go to line or @ to go to symbol)",editor_pending_update:"{{pendingUpdate}} updates to be written",editor_ot_success:"Success",file_tree_click_to_show:"Click to show",file_tree_click_to_hidden:"Click to hide",file_tree_click_to_cancel:"Click to cancel",file_tree_click_to_locked:"Click to lock",file_tree_joined_the_test:"Joined the test",file_tree_click_to_remove:"Click to remove",file_tree_add_test:"Add test",file_tree_num_of_files_cannot_exceed_500:"The number of files cannot exceed 500",file_tree_x_existed:"{{x}} existed",file_tree_x_filtered:"{{x}} filtered",file_tree_x_upload_not_allowed:"Upload of {{x}} not allowed",file_tree_renamed:"Renamed",file_tree_upload_files:"Upload files",file_tree_upload_folder:"Upload folder",show_hidden_files:"Show Hidden files",do_no_show_hidden_files:"Do not show hidden files",file_tree_rename:"Rename",file_tree_create_new_file:"New file",file_tree_create_new_folder:"New folder",file_tree_make_sure_delete_x_unrecoverable:"Are you sure to delete this {{x}}? The file cannot be recovered after deletion",file_tree_kind_tips:"Notice",file_tree_understood:"Know",output_browser_click_run_start_application:"Click \u3010Run\u3011 to start the application",helpers_invalid_parameter_rate_x:"Invalid parameter: rate={{x}}",store_user_not_found:"User not found",store_appStatus_transition_error_x:"AppStatus transition error: {{x}}",dao_channel_agentUserId_x_inconsistent:"The agentUserId {{x}} is inconsistent",dao_channel_event_x_is_not_supported:"Event {{x}} is not supported",dao_channel_connection_not_established:"The connection has not been established yet",dao_channel_playground_not_exist:"Playground does not exist",dao_channel_playground_unbound_container:"Playground unbound container",dao_channel_container_startup_failed:"Container startup failed",dao_channel_insufficient_server_resources:"Insufficient server resources",dao_channel_server_is_busy:"Server is busy",dao_channel_activation_timeout:"Docker activation timeout",dao_channel_docker_failed_to_activate:"Docker failed to start",dao_channel_socket_is_not_ready:"Socket is not ready",dao_channel_socket_is_not_ready_for_x:"Socket is not ready for {{x}}",dao_channel_socket_connect_broken:"Socket connection broken",dao_paas_not_find_mount_dom_object_for_x:"Could not find mounted DOM object for {{x}}",dao_paas_x_component_is_not_supported:"{{x}} component is not supported",dao_paas_no_ready:"No ready",dao_paas_file_does_not_exist:"File does not exist",dao_pass_set_answer_wrong:"Get wrong when insert answer for question","Unable to create file or directory with system reserved name":"Unable to create file or directory with system reserved name","The file or folder {{path}} already exists in this location, please choose another name":"The file or folder {{path}} already exists in this location, please choose another name"},L5e={common_success:"\u6210\u529F",common_confirm:"\u786E\u5B9A",common_cancel:"\u53D6\u6D88",common_delete:"\u5220\u9664",common_hidden:"\u5DF2\u9690\u85CF",common_locked:"\u5DF2\u52A0\u9501",common_offline:"\u79BB\u7EBF",common_directory:"\u76EE\u5F55",common_file:"\u6587\u4EF6",editor_no_open_file:"\u672A\u6253\u5F00\u6587\u4EF6",editor_large_file_tip:"\u6587\u4EF6\u8D85\u8FC716\u5146\u5927\u5C0F\uFF0C\u6682\u4E0D\u652F\u6301\u9884\u89C8",editor_unsupported_format_file_cannot_display:"\u6B64\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u6216\u4F7F\u7528\u4E86\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u7F16\u7801\uFF0C\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A",editor_picture_not_support_preview:"\u56FE\u7247\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8",editor_search_files_by_name:"\u6309\u540D\u79F0\u641C\u7D22\u6587\u4EF6(\u8FFD\u52A0: \u8F6C\u5230\u884C, \u8FFD\u52A0 @ \u8F6C\u5230\u7B26\u53F7)",editor_pending_update:"{{pendingUpdate}}\u4E2A\u66F4\u65B0\u5F85\u5199\u5165",editor_ot_success:"\u6210\u529F",file_tree_click_to_show:"\u70B9\u51FB\u663E\u793A",file_tree_click_to_hidden:"\u70B9\u51FB\u9690\u85CF",file_tree_click_to_cancel:"\u70B9\u51FB\u53D6\u6D88",file_tree_click_to_locked:"\u70B9\u51FB\u9501\u5B9A",file_tree_joined_the_test:"\u5DF2\u52A0\u5165\u6D4B\u8BD5",file_tree_click_to_remove:"\u70B9\u51FB\u79FB\u9664",file_tree_add_test:"\u6DFB\u52A0\u6D4B\u8BD5",file_tree_num_of_files_cannot_exceed_500:"\u6587\u4EF6\u6570\u91CF\u4E0D\u80FD\u8D85\u8FC7500",file_tree_x_existed:"{{x}}\u5DF2\u5B58\u5728",file_tree_x_filtered:"{{x}}\u88AB\u8FC7\u6EE4",file_tree_x_upload_not_allowed:"{{x}}\u4E0D\u5141\u8BB8\u4E0A\u4F20",file_tree_renamed:"\u91CD\u540D\u4E86",file_tree_upload_files:"\u4E0A\u4F20\u6587\u4EF6",file_tree_upload_folder:"\u4E0A\u4F20\u6587\u4EF6\u5939",show_hidden_files:"\u663E\u793A\u9690\u85CF\u6587\u4EF6",do_no_show_hidden_files:"\u4E0D\u663E\u793A\u9690\u85CF\u6587\u4EF6",file_tree_rename:"\u91CD\u547D\u540D",file_tree_create_new_file:"\u65B0\u5EFA\u6587\u4EF6",file_tree_create_new_folder:"\u65B0\u5EFA\u6587\u4EF6\u5939",file_tree_make_sure_delete_x_unrecoverable:"\u786E\u5B9A\u5220\u9664\u8FD9\u4E2A{{x}}\u5417\uFF1F\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D",file_tree_kind_tips:"\u6E29\u99A8\u63D0\u793A",file_tree_understood:"\u77E5\u9053\u4E86",output_browser_click_run_start_application:"\u70B9\u51FB\u3010\u8FD0\u884C\u3011\u542F\u52A8\u5E94\u7528",helpers_invalid_parameter_rate_x:"\u65E0\u6548\u7684\u53C2\u6570: rate={{x}}",store_user_not_found:"\u627E\u4E0D\u5230\u7528\u6237",store_appStatus_transition_error_x:"appStatus \u8F6C\u6362\u9519\u8BEF: {{x}}",dao_channel_agentUserId_x_inconsistent:"agentUserId {{x}} \u4E0D\u4E00\u81F4",dao_channel_event_x_is_not_supported:"\u4E8B\u4EF6 {{x}} \u4E0D\u652F\u6301",dao_channel_connection_not_established:"\u8FDE\u63A5\u5C1A\u672A\u5EFA\u7ACB",dao_channel_playground_not_exist:"playground\u4E0D\u5B58\u5728",dao_channel_playground_unbound_container:"playground\u672A\u7ED1\u5B9A\u5BB9\u5668",dao_channel_container_startup_failed:"\u5BB9\u5668\u542F\u52A8\u5931\u8D25",dao_channel_insufficient_server_resources:"\u670D\u52A1\u5668\u8D44\u6E90\u4E0D\u8DB3",dao_channel_server_is_busy:"\u670D\u52A1\u5668\u7E41\u5FD9",dao_channel_activation_timeout:"docker\u6FC0\u6D3B\u8D85\u65F6",dao_channel_docker_failed_to_activate:"docker\u542F\u52A8\u5931\u8D25",dao_channel_socket_is_not_ready:"socket\u672A\u51C6\u5907\u597D",dao_channel_socket_is_not_ready_for_x:"socket \u8FD8\u6CA1\u6709\u4E3A{{x}}\u51C6\u5907\u597D",dao_channel_socket_connect_broken:"socket\u8FDE\u63A5\u4E2D\u65AD",dao_paas_not_find_mount_dom_object_for_x:"\u627E\u4E0D\u5230\u4E3A{{x}}\u7684\u6302\u8F7DDOM\u5BF9\u8C61",dao_paas_x_component_is_not_supported:"\u7EC4\u4EF6{{x}}\u4E0D\u652F\u6301",dao_paas_no_ready:"\u672A\u51C6\u5907",dao_paas_file_does_not_exist:"\u6587\u4EF6\u4E0D\u5B58\u5728",dao_pass_set_answer_wrong:"\u8BBE\u7F6E\u9898\u76EE\u7B54\u6848\u9519\u8BEF","Unable to create file or directory with system reserved name":"\u65E0\u6CD5\u4F7F\u7528\u7CFB\u7EDF\u4FDD\u7559\u540D\u79F0\u521B\u5EFA\u6587\u4EF6\u6216\u76EE\u5F55","The file or folder {{path}} already exists in this location, please choose another name":"\u6B64\u4F4D\u7F6E\u5DF2\u5B58\u5728\u6587\u4EF6\u6216\u8005\u6587\u4EF6\u5939 {{path}}\uFF0C\u8BF7\u9009\u62E9\u5176\u5B83\u540D\u79F0"},ax=(t=>(t.ZH="ZH",t.EN="EN",t))(ax||{});const M5e={EN:{translation:X5e},ZH:{translation:L5e}},N5e="ZH";Ho.use(E5e).init({resources:M5e,lng:N5e,keySeparator:!1,interpolation:{escapeValue:!1}});const Zr=Ho.t,W5e=[1,2,3,5,8,16];class U5e{constructor(e,n,r,i,o,s,a,l){Lt(this,"start");Lt(this,"end");Lt(this,"totalTime");Lt(this,"rate");Lt(this,"preFrameTime",0);Lt(this,"resumeTime",0);Lt(this,"dataBuffer",[]);Lt(this,"playing",!1);Lt(this,"isReplay",!1);Lt(this,"index",0);Lt(this,"firstFrameTime",0);Lt(this,"isMovePosition",!1);Lt(this,"preTerminalIndex",{});Lt(this,"preFireTreeIndex",{});Lt(this,"preTerminalDockerId","");Lt(this,"preConsoleDockerId","");Lt(this,"isStopMovePosition",!1);Lt(this,"triggerEventForMaxTimespanRecord","");Lt(this,"triggerEventForMaxTimespan",-1);Lt(this,"eventCustomize");Lt(this,"eventDispatcher");Lt(this,"getPlaybackSnapshot");Lt(this,"progressDispatcher");this.start=e,this.end=n,this.rate=1,this.totalTime=n-e,this.triggerEventForMaxTimespan=i,this.eventDispatcher=o,this.progressDispatcher=s,this.getPlaybackSnapshot=a,this.eventCustomize=l,this.step=this.step.bind(this)}convertToAbsoluteTime(e){return this.start+e}setRate(e){e&&!W5e.includes(e)&&this.progressDispatcher&&this.progressDispatcher("error",`${Zr("helpers_invalid_parameter_rate_x",{x:e})}`),this.rate=e||this.rate}buffer(e){this.dataBuffer=this.dataBuffer.concat(e),this.firstFrameTime=this.dataBuffer[0].timestamp}pause(){if(!this.playing){dn.warn("Do not pause more than one time");return}this.playing=!1}resume(){this.resumeTime=this.resumeTime||0,this.resumeTime>0?this.isReplay=!0:this.preFrameTime=Date.now(),this.playing=!0,this.isStopMovePosition=!1,window.requestAnimationFrame(this.step)}restart(){this.preFrameTime=Date.now(),this.playing=!0,this.preFireTreeIndex={},this.preTerminalDockerId="",this.preConsoleDockerId="",ot.file.reset(),this.index=0,window.requestAnimationFrame(this.step)}movePosition(e){var n;if(!((n=this.dataBuffer)!=null&&n.length)){this.resumeTime=e;return}this.isStopMovePosition=!this.playing,this.resumeTime=e,this.isReplay=!0,this.index=this.findFrameByTimeStamp(),this.isMovePosition=!0,this.preTerminalIndex={},ot.dao.resetTerminal(),ot.dao.resetConsole(),window.requestAnimationFrame(this.step)}findFrameByTimeStamp(){const e=this.resumeTime+this.firstFrameTime,n=this.dataBuffer,r=n.length,i=(a,l)=>{var c,u,f,h;if(a<=l){const d=Math.floor((l-a)/2+a),m=n[d].timestamp;return m===e?d:e===((c=n[d-1])==null?void 0:c.timestamp)?d-1:e===((u=n[d+1])==null?void 0:u.timestamp)||e>((f=n[d-1])==null?void 0:f.timestamp)&&e<((h=n[d+1])==null?void 0:h.timestamp)?d+1:(e<m?l=d-1:e>m&&(a=d+1),i(a,l))}else return dn.warn("Do not find the next frame"),this.index=0,this.resumeTime=0,this.resume(),this.index},o=0,s=r-1;return i(o,s)}gotoNextFrame(){var e;!this.isStopMovePosition&&((e=this.progressDispatcher)==null||e.call(this,"progress",this.resumeTime)),this.preFrameTime=Date.now(),window.requestAnimationFrame(this.step)}triggerCustomizeEvent(e){var n;(n=this.eventCustomize)==null||n.call(this,e)}step(){var n,r,i;if(!this.playing&&!this.isStopMovePosition)return;if(this.isReplay&&(this.isReplay=!1,this.preFrameTime=Date.now()),this.resumeTime=this.resumeTime+(Date.now()-this.preFrameTime)*this.rate,this.resumeTime>=this.totalTime||this.index>this.dataBuffer.length-1){this.playing=!1,this.resumeTime=0,!this.isStopMovePosition&&((n=this.progressDispatcher)==null||n.call(this,"progress",this.totalTime)),(r=this.progressDispatcher)==null||r.call(this,"complete",this.resumeTime);return}let e=this.dataBuffer[this.index];if(!e){this.gotoNextFrame();return}if(this.isStopMovePosition&&this.firstFrameTime+this.resumeTime>=(e==null?void 0:e.timestamp)){this.playing=!1,this.isStopMovePosition=!1;return}if(e.eventName==="customize"){this.index++,this.triggerCustomizeEvent(e),this.gotoNextFrame();return}if(this.triggerEventForMaxTimespan>-1&&this.triggerEventForMaxTimespanRecord!=e._id&&(e==null?void 0:e.timestamp)-(this.firstFrameTime+this.resumeTime)>this.triggerEventForMaxTimespan){this.triggerEventForMaxTimespanRecord=e._id;const o={eventName:"customize",agentUserId:"playback",data:{action:"timespanEvent",frame:e,nextTime:e.timestamp-this.dataBuffer[0].timestamp},timestamp:Date.now(),dockerId:""};this.triggerCustomizeEvent(o)}if(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)){if(this.isTerminalOrConsole(e.eventName)){this.trigger(e.eventName,e),this.gotoNextFrame();return}let s=0;const a=this.firstFrameTime+this.resumeTime;for(let l=this.index+1;l<this.dataBuffer.length&&this.dataBuffer[l].timestamp<=a;l++)s++,this.index=l;s>0&&(e=this.dataBuffer[this.index],this.isMovePosition=!0),this.isMovePosition?(this.triggerPreFrames(),this.isMovePosition=!1):(e=((i=this.getPlaybackSnapshot)==null?void 0:i.call(this,e.eventName,e,this.getPreFrameByFrame(e,this.index)||e))||e,this.setPreFrameData(e,this.index)),this.trigger(e.eventName,e)}else this.isMovePosition&&(this.triggerPreFrames(),this.isMovePosition=!1);this.gotoNextFrame()}getPreFrameByFrame(e,n){const{eventName:r,dockerId:i}=e,o=this.isEditor(r),s=this.isFileTree(r);let a;if(o){const{data:{openedPath:l}}=e;for(let c=n-1;c>=0;c--){const u=this.dataBuffer[c];if(u.dockerId===i&&u.eventName===r&&u.data.openedPath===l){a=this.dataBuffer[c],!a.snapshot&&c>=0&&this.setSnapshotByIndex(c);break}}}return s&&(a=this.dataBuffer[this.preFireTreeIndex[i]]),a}setPreFrameData(e,n){const{eventName:r,dockerId:i}=e;this.isFileTree(r)&&(this.preFireTreeIndex[i]=n)}isEditor(e){return e===_n.Editor}isFileTree(e){return e===_n.FileTree}isTerminal(e){return e===_n.Terminal}isConsole(e){return e===_n.Console}isTerminalOrConsole(e){return[_n.Terminal.toString(),_n.Console.toString()].includes(e)}setSnapshotByIndex(e){var o;const n=this.dataBuffer[e],{eventName:r}=n,i=this.isEditor(r);for(let s=0;s<=e;s++){let a=this.dataBuffer[s];if(a.eventName===n.eventName&&a.dockerId===n.dockerId&&(i?a.data.openedPath===n.data.openedPath:!0)){if(a.snapshot){this.setPreFrameData(a,s);continue}a=((o=this.getPlaybackSnapshot)==null?void 0:o.call(this,a.eventName,a,this.getPreFrameByFrame(a,s)))||a,this.setPreFrameData(a,s)}}}triggerPreFrames(){const e=[_n.FileTree.toString(),_n.Editor.toString(),_n.Terminal.toString(),_n.Console.toString()];for(let n=this.index;n>=0;n--){if(!e.length)return;if(e.includes(this.dataBuffer[n].eventName)){const r=this.dataBuffer[n],i=e.findIndex(o=>o===r.eventName);e.splice(i,1),r.snapshot||this.setSnapshotByIndex(n),this.trigger(r.eventName,r)}}e.forEach(n=>{this.trigger(n,null)})}trigger(e,n){if(e==="customize"){this.triggerCustomizeEvent(n),this.index++;return}if(!this.isTerminalOrConsole(e)){this.eventDispatcher(e,n),this.index++;return}const i=n==null?void 0:n.dockerId,o=this.preTerminalIndex[i]||0;for(let s=o+1;s<=this.index;s++){const a=this.dataBuffer[s];a&&this.isTerminalOrConsole(a.eventName)&&a.dockerId===i&&(this.isTerminal(e)&&(this.preTerminalDockerId&&this.preTerminalDockerId!==i&&ot.dao.resetTerminal(),this.preTerminalDockerId=i),this.isConsole(e)&&(this.preConsoleDockerId&&this.preConsoleDockerId!==i&&ot.dao.resetConsole(),this.preConsoleDockerId=i),this.eventDispatcher(a.eventName,a))}this.preTerminalIndex[i]=this.index,this.index++}}const D5e="@dao42/d42paas-front",q5e="0.9.63",Y5e="d42paas front",B5e="dao42 paas team",j5e="https://github.com/dao42/d42paas_frontend#readme",Z5e="UNLICENSED",F5e="./dist/DaoPaaS.cjs",V5e="./dist/DaoPaaS.cjs",G5e="./dist/DaoPaaS.d.ts",H5e={prebuild:"rimraf dist",build:"cross-env VITE_BUILD_EVENT=true pnpm tsc && pnpm vite && pnpm typedoc",copydist:"cp -r dist/sdk ../demo/public/",vite:"vite build --config ./config/vite.config.ts && shx cp ./src/types/DaoPaaS.d.ts ./dist",typedoc:"npx typedoc --tsconfig ./doc.tsconfig.json",workNameSpaceToFix:"node ./config/workNameSpaceToFix.js",tsc:"tsc -p ./tsconfig.json --isolatedModules false",test:"jest --coverage",prepublish:"pnpm build",publish:"npm publish --access public"},K5e={"@codemirror/autocomplete":"^6.0.2","@codemirror/collab":"^6.0.0","@codemirror/commands":"^6.0.0","@codemirror/lang-cpp":"^6.0.0","@codemirror/lang-css":"^6.0.0","@codemirror/lang-html":"^6.0.0","@codemirror/lang-java":"^6.0.0","@codemirror/lang-javascript":"^6.0.0","@codemirror/lang-json":"^6.0.0","@codemirror/lang-lezer":"^6.0.0","@codemirror/lang-markdown":"^6.0.0","@codemirror/lang-php":"^6.0.0","@codemirror/lang-python":"^6.0.0","@codemirror/lang-rust":"^6.0.0","@codemirror/lang-sql":"^6.0.0","@codemirror/lang-xml":"^6.0.0","@codemirror/language":"6.2.1","@codemirror/legacy-modes":"^6.0.0","@codemirror/lint":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.0.0","@emotion/babel-plugin":"^11.3.0","@emotion/babel-preset-css-prop":"^11.2.0","@emotion/core":"^11.0.0","@emotion/css":"^11.1.3","@emotion/eslint-plugin":"^11.2.0","@emotion/react":"^11.4.1","@emotion/styled":"^11.3.0","@headlessui/react":"^1.4.3","@loadable/component":"^5.15.2","@open-rpc/client-js":"^1.7.1","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.3.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/loadable__component":"^5.13.4","@types/lodash":"^4.14.175","@types/lodash.clonedeep":"^4.5.7","@types/lodash.isequal":"^4.5.6","@types/node":"^16.11.1","@types/ot":"^0.0.5","@types/prop-types":"^15.7.5","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@types/react-transition-group":"^4.4.5","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","@udecode/zustood":"^1.1.1","@vitejs/plugin-react":"^1.0.7",ahooks:"^3.3.10","babel-loader":"^8.2.2",bufferutil:"^4.0.6",classnames:"^2.3.1",codemirror:"^6.0.0",concurrently:"^6.3.0","cross-env":"^7.0.3",devicon:"^2.14.0",dexie:"^3.2.0","file-icons-js":"^1.1.0","file-loader":"^6.2.0","fs-extra":"^10.0.0","glob-all":"^3.2.1","highlight.js":"^11.6.0","hotkeys-js":"^3.9.4",immer:"^9.0.14",jest:"27.0.6",lodash:"^4.17.21",msw:"^0.39.2","ninja-keys":"^1.1.12",ot:"^0.0.15",prettier:"^2.3.2","prop-types":"^15.8.1",react:"^18.2.0","react-complex-tree":"^1.1.6","react-content-loader":"^6.2.0","react-dom":"18.2.0","react-icons":"^4.3.1","react-transition-group":"^4.4.2","rehype-document":"^6.1.0","rehype-highlight":"^5.0.2","rehype-katex":"^6.0.2","rehype-stringify":"^9.0.3","remark-math":"^5.1.1","remark-parse":"^10.0.1","remark-rehype":"^10.1.0",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.6.0",sass:"^1.43.2","sass-loader":"^12.2.0",shx:"^0.3.3","socket.io-client":"^4.5.1","source-map-loader":"^3.0.0","style-loader":"^3.3.1",stylis:"^4.0.10","ts-jest":"^27.1.3","ts-loader":"^9.2.5","ts-node":"^10.0.0",typedoc:"^0.22.12",unified:"^10.1.2","use-immer":"^0.7.0","utf-8-validate":"^5.0.9",uuid:"^8.3.2",vite:"^2.7.2","vite-plugin-html":"^3.0.6","whatwg-fetch":"^3.6.2",xterm:"^4.13.0","xterm-addon-attach":"^0.6.0","xterm-addon-fit":"^0.5.0",zustand:"^4.0.0-rc.1"},J5e=["dist"],e2e={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},t2e={url:"https://github.com/dao42/d42paas_frontend/issues"},n2e={workerDirectory:"src"},r2e={"@types/lodash.throttle":"^4.1.7","codemirror-lang-elixir":"^3.0.0",i18next:"^21.8.16","lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1","range-analyzer":"0.1.1-alpha.2","rc-dropdown":"^4.0.1","rc-menu":"^9.6.3","react-i18next":"11.18.3","xterm-addon-web-links":"^0.6.0"};var i2e={name:D5e,version:q5e,description:Y5e,author:B5e,homepage:j5e,license:Z5e,main:F5e,module:V5e,types:G5e,scripts:H5e,devDependencies:K5e,files:J5e,repository:e2e,bugs:t2e,msw:n2e,dependencies:r2e};const o2e=()=>i2e.version,s2e=async(t,e,n)=>{const i=await(await fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:n})})).json();if(i.status==="failure")throw dn.error(i),new Error(i.errors[0].erromsg);return i.data},Yi=(t,e=1)=>{t=t||"#ffffff";let n=t.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),o=parseInt(n.substring(4,6),16);return e>1&&e<=100&&(e=e/100),`rgba(${r},${i},${o},${e})`},a2e=()=>{const t=`
49
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qbe(t){return zF(t)||XF(t)||K8(t)||LF()}function Hz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Kz(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hz(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hz(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Ybe={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,n){console&&console[e]&&console[e].apply(console,n)}},Bbe=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};js(this,t),this.init(e,n)}return Zs(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||Ybe,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,o){return o&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new t(this.logger,Kz(Kz({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}}]),t}(),Kc=new Bbe,zd=function(){function t(){js(this,t),this.observers={}}return Zs(t,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].push(r)}),this}},{key:"off",value:function(n,r){if(!!this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.observers[n]){var s=[].concat(this.observers[n]);s.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),t}();function E0(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function Jz(t){return t==null?"":""+t}function jbe(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function J8(t,e,n){function r(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}for(var o=typeof e!="string"?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={}}return i()?{}:{obj:t,k:r(o.shift())}}function eX(t,e,n){var r=J8(t,e,Object),i=r.obj,o=r.k;i[o]=n}function Zbe(t,e,n,r){var i=J8(t,e,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function ox(t,e){var n=J8(t,e),r=n.obj,i=n.k;if(!!r)return r[i]}function tX(t,e,n){var r=ox(t,n);return r!==void 0?r:ox(e,n)}function MF(t,e,n){for(var r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):MF(t[r],e[r],n):t[r]=e[r]);return t}function WO(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Fbe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Vbe(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return Fbe[e]}):t}var u4=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Gbe=[" ",",","?","!",";"];function Hbe(t,e,n){e=e||"",n=n||"";var r=Gbe.filter(function(a){return e.indexOf(a)<0&&n.indexOf(a)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),o=!i.test(t);if(!o){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(o=!0)}return o}function nX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ab(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kbe(t){var e=Jbe();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function Jbe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function NF(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!t){if(t[e])return t[e];for(var r=e.split(n),i=t,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];l===void 0&&r.length>o+s;)s++,a=r.slice(o,o+s).join(n),l=i[a];if(l===void 0)return;if(l===null)return null;if(e.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var c=r.slice(o+s).join(n);return c?NF(l,c,n):void 0}i=i[r[o]]}return i}}var e5e=function(t){Vd(n,t);var e=Kbe(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return js(this,n),i=e.call(this),u4&&zd.call(kc(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Zs(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,c=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[i,o];s&&typeof s!="string"&&(u=u.concat(s)),s&&typeof s=="string"&&(u=u.concat(l?s.split(l):s)),i.indexOf(".")>-1&&(u=i.split("."));var f=ox(this.data,u);return f||!c||typeof s!="string"?f:NF(this.data&&this.data[i]&&this.data[i][o],s,l)}},{key:"addResource",value:function(i,o,s,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[i,o];s&&(u=u.concat(c?s.split(c):s)),i.indexOf(".")>-1&&(u=i.split("."),a=o,o=u[1]),this.addNamespaces(o),eX(this.data,u,a),l.silent||this.emit("added",i,o,s,a)}},{key:"addResources",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in s)(typeof s[l]=="string"||Object.prototype.toString.apply(s[l])==="[object Array]")&&this.addResource(i,o,l,s[l],{silent:!0});a.silent||this.emit("added",i,o,s)}},{key:"addResourceBundle",value:function(i,o,s,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[i,o];i.indexOf(".")>-1&&(u=i.split("."),a=s,s=o,o=u[1]),this.addNamespaces(o);var f=ox(this.data,u)||{};a?MF(f,s,l):f=ab(ab({},f),s),eX(this.data,u,f),c.silent||this.emit("added",i,o,s)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?ab(ab({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),s=o&&Object.keys(o)||[];return!!s.find(function(a){return o[a]&&Object.keys(o[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(zd),WF={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,n,r,i,o){var s=this;return e.forEach(function(a){s.processors[a]&&(n=s.processors[a].process(n,r,i,o))}),n}};function rX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function zs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function t5e(t){var e=n5e();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function n5e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var iX={},oX=function(t){Vd(n,t);var e=t5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return js(this,n),i=e.call(this),u4&&zd.call(kc(i)),jbe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,kc(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Kc.create("translator"),i}return Zs(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var s=this.resolve(i,o);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(i,o){var s=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],c=s&&i.indexOf(s)>-1,u=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Hbe(i,s,a);if(c&&!u){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:l};var h=i.split(s);(s!==a||s===a&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),i=h.join(a)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,s){var a=this;if(ma(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=this.extractFromKey(i[i.length-1],o),f=u.key,h=u.namespaces,d=h[h.length-1],m=o.lng||this.language,x=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(m&&m.toLowerCase()==="cimode"){if(x){var y=o.nsSeparator||this.options.nsSeparator;return l?(p.res="".concat(d).concat(y).concat(f),p):"".concat(d).concat(y).concat(f)}return l?(p.res=f,p):f}var p=this.resolve(i,o),g=p&&p.res,v=p&&p.usedKey||f,S=p&&p.exactUsedKey||f,w=Object.prototype.toString.apply(g),_=["[object Number]","[object Function]","[object RegExp]"],k=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,X=typeof g!="string"&&typeof g!="boolean"&&typeof g!="number";if(A&&g&&X&&_.indexOf(w)<0&&!(typeof k=="string"&&w==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,zs(zs({},o),{},{ns:h})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(p.res=E,p):E}if(c){var $=w==="[object Array]",R=$?[]:{},z=$?S:v;for(var H in g)if(Object.prototype.hasOwnProperty.call(g,H)){var Z="".concat(z).concat(c).concat(H);R[H]=this.translate(Z,zs(zs({},o),{joinArrays:!1,ns:h})),R[H]===Z&&(R[H]=g[H])}g=R}}else if(A&&typeof k=="string"&&w==="[object Array]")g=g.join(k),g&&(g=this.extendTranslation(g,i,o,s));else{var M=!1,q=!1,F=o.count!==void 0&&typeof o.count!="string",K=n.hasDefaultValue(o),oe=F?this.pluralResolver.getSuffix(m,o.count,o):"",G=o["defaultValue".concat(oe)]||o.defaultValue;!this.isValidLookup(g)&&K&&(M=!0,g=G),this.isValidLookup(g)||(q=!0,g=f);var re=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Te=re&&q?void 0:g,Ee=K&&G!==g&&this.options.updateMissing;if(q||M||Ee){if(this.logger.log(Ee?"updateKey":"missingKey",m,d,f,Ee?G:g),c){var V=this.resolve(f,zs(zs({},o),{},{keySeparator:!1}));V&&V.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.")}var ye=[],ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(var le=0;le<ee.length;le++)ye.push(ee[le]);else this.options.saveMissingTo==="all"?ye=this.languageUtils.toResolveHierarchy(o.lng||this.language):ye.push(o.lng||this.language);var ie=function(Fe,nt,Ot){var ft=K&&Ot!==g?Ot:Te;a.options.missingKeyHandler?a.options.missingKeyHandler(Fe,d,nt,ft,Ee,o):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(Fe,d,nt,ft,Ee,o),a.emit("missingKey",Fe,d,nt,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&F?ye.forEach(function(Me){a.pluralResolver.getSuffixes(Me,o).forEach(function(Fe){ie([Me],f+Fe,o["defaultValue".concat(Fe)]||G)})}):ie(ye,f,G))}g=this.extendTranslation(g,i,o,p,s),q&&g===f&&this.options.appendNamespaceToMissingKey&&(g="".concat(d,":").concat(f)),(q||M)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(d,":").concat(f):f,M?g:void 0):g=this.options.parseMissingKeyHandler(g))}return l?(p.res=g,p):g}},{key:"extendTranslation",value:function(i,o,s,a,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,zs(zs({},this.options.interpolation.defaultVariables),s),a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init(zs(zs({},s),{interpolation:zs(zs({},this.options.interpolation),s.interpolation)}));var u=typeof i=="string"&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),f;if(u){var h=i.match(this.interpolator.nestingRegexp);f=h&&h.length}var d=s.replace&&typeof s.replace!="string"?s.replace:s;if(this.options.interpolation.defaultVariables&&(d=zs(zs({},this.options.interpolation.defaultVariables),d)),i=this.interpolator.interpolate(i,d,s.lng||this.language,s),u){var m=i.match(this.interpolator.nestingRegexp),x=m&&m.length;f<x&&(s.nest=!1)}s.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var g=arguments.length,v=new Array(g),S=0;S<g;S++)v[S]=arguments[S];return l&&l[0]===v[0]&&!s.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(v[0]," in key: ").concat(o[0])),null):c.translate.apply(c,v.concat([o]))},s)),s.interpolation&&this.interpolator.reset()}var y=s.postProcess||this.options.postProcess,p=typeof y=="string"?[y]:y;return i!=null&&p&&p.length&&s.applyPostProcessor!==!1&&(i=WF.handle(p,i,o,this.options&&this.options.postProcessPassResolved?zs({i18nResolved:a},s):s,this)),i}},{key:"resolve",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,l,c,u,f;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!o.isValidLookup(a)){var d=o.extractFromKey(h,s),m=d.key;l=m;var x=d.namespaces;o.options.fallbackNS&&(x=x.concat(o.options.fallbackNS));var y=s.count!==void 0&&typeof s.count!="string",p=y&&!s.ordinal&&s.count===0&&o.pluralResolver.shouldUseIntlApi(),g=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",v=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);x.forEach(function(S){o.isValidLookup(a)||(f=S,!iX["".concat(v[0],"-").concat(S)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(iX["".concat(v[0],"-").concat(S)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(v.join(", "),`" won't get resolved as namespace "`).concat(f,'" 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!!!")),v.forEach(function(w){if(!o.isValidLookup(a)){u=w;var _=[m];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(_,m,w,S,s);else{var k;y&&(k=o.pluralResolver.getSuffix(w,s.count,s));var A="".concat(o.options.pluralSeparator,"zero");if(y&&(_.push(m+k),p&&_.push(m+A)),g){var X="".concat(m).concat(o.options.contextSeparator).concat(s.context);_.push(X),y&&(_.push(X+k),p&&_.push(X+A))}}for(var E;E=_.pop();)o.isValidLookup(a)||(c=E,a=o.getResource(w,S,E,s))}}))})}}),{res:a,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,s,a):this.resourceStore.getResource(i,o,s,a)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&o===s.substring(0,o.length)&&i[s]!==void 0)return!0;return!1}}]),n}(zd);function QT(t){return t.charAt(0).toUpperCase()+t.slice(1)}var r5e=function(){function t(e){js(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kc.create("languageUtils")}return Zs(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=QT(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=QT(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=QT(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var s=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(s))&&(i=s)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var s=r.getLanguagePartFromCode(o);if(r.isSupportedCode(s))return i=s;i=r.options.supportedLngs.find(function(a){if(a.indexOf(s)===0)return a})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),s=[],a=function(c){!c||(i.isSupportedCode(c)?s.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),o.forEach(function(l){s.indexOf(l)<0&&a(i.formatLanguageCode(l))}),s}}]),t}(),i5e=[{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}],o5e={1:function(e){return Number(e>1)},2:function(e){return Number(e!=1)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(e==1?0:e>=2&&e<=4?1:2)},7:function(e){return Number(e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(e==1?0:e==2?1:e!=8&&e!=11?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(e==1?0:e==2?1:e<7?2:e<11?3:4)},11:function(e){return Number(e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(e!==0)},14:function(e){return Number(e==1?0:e==2?1:e==3?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:e!==0?1:2)},17:function(e){return Number(e==1||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(e==0?0:e==1?1:2)},19:function(e){return Number(e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(e==1?0:e==0||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3)}},s5e=["v1","v2","v3"],sX={zero:0,one:1,two:2,few:3,many:4,other:5};function a5e(){var t={};return i5e.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:o5e[e.fc]}})}),t}var l5e=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};js(this,t),this.languageUtils=e,this.options=n,this.logger=Kc.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!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=a5e()}return Zs(t,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(s,a){return sX[s]-sX[a]}).map(function(s){return"".concat(r.options.prepend).concat(s)}):o.numbers.map(function(s){return r.getSuffix(n,s,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),s=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));var a=function(){return i.options.prepend&&s.toString()?i.options.prepend+s.toString():s.toString()};return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?"_plural_".concat(s.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!s5e.includes(this.options.compatibilityJSON)}}]),t}();function aX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ic(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var c5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};js(this,t),this.logger=Kc.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return Zs(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:Vbe,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?WO(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?WO(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?WO(r.nestingPrefix):r.nestingPrefixEscaped||WO("$t("),this.nestingSuffix=r.nestingSuffix?WO(r.nestingSuffix):r.nestingSuffixEscaped||WO(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var s=this,a,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(y){return y.replace(/\$/g,"$$$$")}var h=function(p){if(p.indexOf(s.formatSeparator)<0){var g=tX(r,u,p);return s.alwaysFormat?s.format(g,void 0,i,ic(ic(ic({},o),r),{},{interpolationkey:p})):g}var v=p.split(s.formatSeparator),S=v.shift().trim(),w=v.join(s.formatSeparator).trim();return s.format(tX(r,u,S),w,i,ic(ic(ic({},o),r),{},{interpolationkey:S}))};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,m=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,x=[{regex:this.regexpUnescape,safeValue:function(p){return f(p)}},{regex:this.regexp,safeValue:function(p){return s.escapeValue?f(s.escape(p)):f(p)}}];return x.forEach(function(y){for(c=0;a=y.regex.exec(n);){var p=a[1].trim();if(l=h(p),l===void 0)if(typeof d=="function"){var g=d(n,a,o);l=typeof g=="string"?g:""}else if(o&&o.hasOwnProperty(p))l="";else if(m){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(p," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=Jz(l));var v=y.safeValue(l);if(n=n.replace(a[0],v),m?(y.regex.lastIndex+=l.length,y.regex.lastIndex-=a[0].length):y.regex.lastIndex=0,c++,c>=s.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,l=ic({},o);l.applyPostProcessor=!1,delete l.defaultValue;function c(d,m){var x=this.nestingOptionsSeparator;if(d.indexOf(x)<0)return d;var y=d.split(new RegExp("".concat(x,"[ ]*{"))),p="{".concat(y[1]);d=y[0],p=this.interpolate(p,l),p=p.replace(/'/g,'"');try{l=JSON.parse(p),m&&(l=ic(ic({},m),l))}catch(g){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),g),"".concat(d).concat(x).concat(p)}return delete l.defaultValue,d}for(;s=this.nestingRegexp.exec(n);){var u=[],f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){var h=s[1].split(this.formatSeparator).map(function(d){return d.trim()});s[1]=h.shift(),u=h,f=!0}if(a=r(c.call(this,s[1].trim(),l),l),a&&s[0]===n&&typeof a!="string")return a;typeof a!="string"&&(a=Jz(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),f&&(a=u.reduce(function(d,m){return i.format(d,m,o.lng,ic(ic({},o),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),t}();function lX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Df(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function u5e(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(e==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(e==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(s){if(!!s){var a=s.split(":"),l=qbe(a),c=l[0],u=l.slice(1),f=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=f),f==="false"&&(n[c.trim()]=!1),f==="true"&&(n[c.trim()]=!0),isNaN(f)||(n[c.trim()]=parseInt(f,10))}})}}return{formatName:e,formatOptions:n}}var f5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};js(this,t),this.logger=Kc.create("formatter"),this.options=e,this.formats={number:function(r,i,o){return new Intl.NumberFormat(i,o).format(r)},currency:function(r,i,o){return new Intl.NumberFormat(i,Df(Df({},o),{},{style:"currency"})).format(r)},datetime:function(r,i,o){return new Intl.DateTimeFormat(i,Df({},o)).format(r)},relativetime:function(r,i,o){return new Intl.RelativeTimeFormat(i,Df({},o)).format(r,o.range||"day")},list:function(r,i,o){return new Intl.ListFormat(i,Df({},o)).format(r)}},this.init(e)}return Zs(t,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"format",value:function(n,r,i,o){var s=this,a=r.split(this.formatSeparator),l=a.reduce(function(c,u){var f=u5e(u),h=f.formatName,d=f.formatOptions;if(s.formats[h]){var m=c;try{var x=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=x.locale||x.lng||o.locale||o.lng||i;m=s.formats[h](c,y,Df(Df(Df({},d),o),x))}catch(p){s.logger.warn(p)}return m}else s.logger.warn("there was no format function for ".concat(h));return c},n);return l}}]),t}();function cX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function uX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?cX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):cX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function d5e(t){var e=h5e();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function h5e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function O5e(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var p5e=function(t){Vd(n,t);var e=d5e(n);function n(r,i,o){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return js(this,n),s=e.call(this),u4&&zd.call(kc(s)),s.backend=r,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=Kc.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,a.backend,a),s}return Zs(n,[{key:"queueLoad",value:function(i,o,s,a){var l=this,c={},u={},f={},h={};return i.forEach(function(d){var m=!0;o.forEach(function(x){var y="".concat(d,"|").concat(x);!s.reload&&l.store.hasResourceBundle(d,x)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?u[y]===void 0&&(u[y]=!0):(l.state[y]=1,m=!1,u[y]===void 0&&(u[y]=!0),c[y]===void 0&&(c[y]=!0),h[x]===void 0&&(h[x]=!0)))}),m||(f[d]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,o,s){var a=i.split("|"),l=a[0],c=a[1];o&&this.emit("failedLoading",l,c,o),s&&this.store.addResourceBundle(l,c,s),this.state[i]=o?-1:2;var u={};this.queue.forEach(function(f){Zbe(f.loaded,[l],c),O5e(f,i),o&&f.errors.push(o),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(h){u[h]||(u[h]={});var d=f.loaded[h];d.length&&d.forEach(function(m){u[h][m]===void 0&&(u[h][m]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,o,s){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!i.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:s,tried:l,wait:c,callback:u});return}return this.readingCalls++,this.backend[s](i,o,function(f,h){if(a.readingCalls--,a.waitingReads.length>0){var d=a.waitingReads.shift();a.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(f&&h&&l<a.maxRetries){setTimeout(function(){a.read.call(a,i,o,s,l+1,c*2,u)},c);return}u(f,h)})}},{key:"prepareLoading",value:function(i,o){var s=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=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."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var c=this.queueLoad(i,o,a,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){s.loadOne(u)})}},{key:"load",value:function(i,o,s){this.prepareLoading(i,o,{},s)}},{key:"reload",value:function(i,o,s){this.prepareLoading(i,o,{reload:!0},s)}},{key:"loadOne",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=i.split("|"),l=a[0],c=a[1];this.read(l,c,"read",void 0,void 0,function(u,f){u&&o.logger.warn("".concat(s,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&f&&o.logger.log("".concat(s,"loaded namespace ").concat(c," for language ").concat(l),f),o.loaded(i,u,f)})}},{key:"saveMissing",value:function(i,o,s,a,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(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!!!");return}s==null||s===""||(this.backend&&this.backend.create&&this.backend.create(i,o,s,a,null,uX(uX({},c),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,s,a))}}]),n}(zd);function m5e(){return{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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var n={};if(ma(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),ma(e[2])==="object"||ma(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(e,n,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function fX(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function dX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?dX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):dX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function g5e(t){var e=v5e();return function(){var r=Yl(t),i;if(e){var o=Yl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return U1(this,i)}}function v5e(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function lb(){}function y5e(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var sx=function(t){Vd(n,t);var e=g5e(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(js(this,n),r=e.call(this),u4&&zd.call(kc(r)),r.options=fX(i),r.services={},r.logger=Kc,r.modules={external:[]},y5e(kc(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),U1(r,kc(r));setTimeout(function(){r.init(i,o)},0)}return r}return Zs(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(s=o,o={}),!o.defaultNS&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var a=m5e();this.options=Xc(Xc(Xc({},a),this.options),fX(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Xc(Xc({},a.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(p){return p?typeof p=="function"?new p:p:null}if(!this.options.isClone){this.modules.logger?Kc.init(l(this.modules.logger),this.options):Kc.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=f5e);var u=new r5e(this.options);this.store=new e5e(this.options.resources,this.options);var f=this.services;f.logger=Kc,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new l5e(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(f.formatter=l(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new c5e(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new p5e(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),S=1;S<g;S++)v[S-1]=arguments[S];i.emit.apply(i,[p].concat(v))}),this.modules.languageDetector&&(f.languageDetector=l(this.modules.languageDetector),f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=l(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new oX(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),S=1;S<g;S++)v[S-1]=arguments[S];i.emit.apply(i,[p].concat(v))}),this.modules.external.forEach(function(p){p.init&&p.init(i)})}if(this.format=this.options.interpolation.format,s||(s=lb),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var d=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];d.forEach(function(p){i[p]=function(){var g;return(g=i.store)[p].apply(g,arguments)}});var m=["addResource","addResources","addResourceBundle","removeResourceBundle"];m.forEach(function(p){i[p]=function(){var g;return(g=i.store)[p].apply(g,arguments),i}});var x=E0(),y=function(){var g=function(S,w){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),x.resolve(w),s(S,w)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return g(null,i.t.bind(i));i.changeLanguage(i.options.lng,g)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),x}},{key:"loadResources",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lb,a=s,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(a=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var c=[],u=function(d){if(!!d){var m=o.services.languageUtils.toResolveHierarchy(d);m.forEach(function(x){c.indexOf(x)<0&&c.push(x)})}};if(l)u(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(h){return u(h)})}this.options.preload&&this.options.preload.forEach(function(h){return u(h)}),this.services.backendConnector.load(c,this.options.ns,function(h){!h&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),a(h)})}else a(null)}},{key:"reloadResources",value:function(i,o,s){var a=E0();return i||(i=this.languages),o||(o=this.options.ns),s||(s=lb),this.services.backendConnector.reload(i,o,function(l){a.resolve(),s(l)}),a}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&WF.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var s=this.languages[o];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,o){var s=this;this.isLanguageChangingTo=i;var a=E0();this.emit("languageChanging",i);var l=function(h){s.language=h,s.languages=s.services.languageUtils.toResolveHierarchy(h),s.resolvedLanguage=void 0,s.setResolvedLanguage(h)},c=function(h,d){d?(l(d),s.translator.changeLanguage(d),s.isLanguageChangingTo=void 0,s.emit("languageChanged",d),s.logger.log("languageChanged",d)):s.isLanguageChangingTo=void 0,a.resolve(function(){return s.t.apply(s,arguments)}),o&&o(h,function(){return s.t.apply(s,arguments)})},u=function(h){!i&&!h&&s.services.languageDetector&&(h=[]);var d=typeof h=="string"?h:s.services.languageUtils.getBestMatchFromCodes(h);d&&(s.language||l(d),s.translator.language||s.translator.changeLanguage(d),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage(d)),s.loadResources(d,function(m){c(m,d)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(i),a}},{key:"getFixedT",value:function(i,o,s){var a=this,l=function c(u,f){var h;if(ma(f)!=="object"){for(var d=arguments.length,m=new Array(d>2?d-2:0),x=2;x<d;x++)m[x-2]=arguments[x];h=a.options.overloadTranslationOptionHandler([u,f].concat(m))}else h=Xc({},f);h.lng=h.lng||c.lng,h.lngs=h.lngs||c.lngs,h.ns=h.ns||c.ns,h.keyPrefix=h.keyPrefix||s||c.keyPrefix;var y=a.options.keySeparator||".",p=h.keyPrefix?"".concat(h.keyPrefix).concat(y).concat(u):u;return a.t(p,h)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=s,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=this,s=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;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var u=function(d,m){var x=o.services.backendConnector.state["".concat(d,"|").concat(m)];return x===-1||x===2};if(s.precheck){var f=s.precheck(this,u);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(a,i)&&(!l||u(c,i)))}},{key:"loadNamespaces",value:function(i,o){var s=this,a=E0();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),o&&o(l)}),a):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var s=E0();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(c){return a.indexOf(c)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(c){s.resolve(),o&&o(c)}),s):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["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"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lb,a=Xc(Xc(Xc({},this.options),o),{isClone:!0}),l=new n(a),c=["store","services","language"];return c.forEach(function(u){l[u]=i[u]}),l.services=Xc({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new oX(l.services,l.options),l.translator.on("*",function(u){for(var f=arguments.length,h=new Array(f>1?f-1:0),d=1;d<f;d++)h[d-1]=arguments[d];l.emit.apply(l,[u].concat(h))}),l.init(a,s),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(zd);Rn(sx,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new sx(t,e)});var Ho=sx.createInstance();Ho.createInstance=sx.createInstance;Ho.createInstance;Ho.init;Ho.loadResources;Ho.reloadResources;Ho.use;Ho.changeLanguage;Ho.getFixedT;Ho.t;Ho.exists;Ho.setDefaultNamespace;Ho.hasLoadedNamespace;Ho.loadNamespaces;Ho.loadLanguages;function Cg(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Lo(t,e){if(t==null)return{};var n=Cg(t,e),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)r=o[i],!(e.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(n[r]=t[r]))}return n}var b5e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,x5e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026"},S5e=function(e){return x5e[e]},w5e=function(e){return e.replace(b5e,S5e)};function hX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function OX(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var fP={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:w5e},UF,T5e=W.exports.createContext();function _5e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};fP=OX(OX({},fP),t)}function k5e(){return fP}var P5e=function(){function t(){js(this,t),this.usedNamespaces={}}return Zs(t,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),t}();function Q5e(t){UF=t}function $5e(){return UF}var E5e={type:"3rdParty",init:function(e){_5e(e.options.react),Q5e(e)}};function C5e(){if(console&&console.warn){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(t=console).warn.apply(t,n)}}var pX={};function dP(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&pX[e[0]]||(typeof e[0]=="string"&&(pX[e[0]]=new Date),C5e.apply(void 0,e))}function mX(t,e,n){t.loadNamespaces(e,function(){if(t.isInitialized)n();else{var r=function i(){setTimeout(function(){t.off("initialized",i)},0),n()};t.on("initialized",r)}})}function R5e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=e.languages[0],i=e.options?e.options.fallbackLng:!1,o=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var s=function(l,c){var u=e.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!s(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}function A5e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return dP("i18n.languages were undefined or empty",e.languages),!0;var r=e.options.ignoreJSONStructure!==void 0;return r?e.hasLoadedNamespace(t,{precheck:function(o,s){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,t))return!1}}):R5e(t,e,n)}function I5e(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(t);!(i=(s=n.next()).done)&&(r.push(s.value),!(e&&r.length===e));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function kn(t,e){return zF(t)||I5e(t,e)||K8(t,e)||LF()}function gX(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function $T(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gX(Object(n),!0).forEach(function(r){Rn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gX(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var z5e=function(e,n){var r=W.exports.useRef();return W.exports.useEffect(function(){r.current=n?r.current:e},[e,n]),r.current};function Pf(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=W.exports.useContext(T5e)||{},i=r.i18n,o=r.defaultNS,s=n||i||$5e();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new P5e),!s){dP("You will need to pass in an i18next instance by using initReactI18next");var a=function(X){return Array.isArray(X)?X[X.length-1]:X},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&dP("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=$T($T($T({},k5e()),s.options.react),e),u=c.useSuspense,f=c.keyPrefix,h=t||o||s.options&&s.options.defaultNS;h=typeof h=="string"?[h]:h||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(h);var d=(s.isInitialized||s.initializedStoreOnce)&&h.every(function(A){return A5e(A,s,c)});function m(){return s.getFixedT(null,c.nsMode==="fallback"?h:h[0],f)}var x=W.exports.useState(m),y=kn(x,2),p=y[0],g=y[1],v=h.join(),S=z5e(v),w=W.exports.useRef(!0);W.exports.useEffect(function(){var A=c.bindI18n,X=c.bindI18nStore;w.current=!0,!d&&!u&&mX(s,h,function(){w.current&&g(m)}),d&&S&&S!==v&&w.current&&g(m);function E(){w.current&&g(m)}return A&&s&&s.on(A,E),X&&s&&s.store.on(X,E),function(){w.current=!1,A&&s&&A.split(" ").forEach(function($){return s.off($,E)}),X&&s&&X.split(" ").forEach(function($){return s.store.off($,E)})}},[s,v]);var _=W.exports.useRef(!0);W.exports.useEffect(function(){w.current&&!_.current&&g(m),_.current=!1},[s]);var k=[p,s,d];if(k.t=p,k.i18n=s,k.ready=d,d||!d&&!u)return k;throw new Promise(function(A){mX(s,h,function(){A()})})}var X5e={common_success:"Success",common_confirm:"Confirm",common_cancel:"Cancel",common_delete:"Delete",common_hidden:"Hidden",common_locked:"Locked",common_offline:"Offline",common_directory:"Directory",common_file:"File",editor_no_open_file:"None file opened",editor_large_file_tip:"The file size is over 16 MB, preview is not supported",editor_unsupported_format_file_cannot_display:"The file cannot be displayed for unsupported format",editor_picture_not_support_preview:"Picture's preview is not yet supported",editor_search_files_by_name:"Search files by name (append: to go to line or @ to go to symbol)",editor_pending_update:"{{pendingUpdate}} updates to be written",editor_ot_success:"Success",file_tree_click_to_show:"Click to show",file_tree_click_to_hidden:"Click to hide",file_tree_click_to_cancel:"Click to cancel",file_tree_click_to_locked:"Click to lock",file_tree_joined_the_test:"Joined the test",file_tree_click_to_remove:"Click to remove",file_tree_add_test:"Add test",file_tree_num_of_files_cannot_exceed_500:"The number of files cannot exceed 500",file_tree_x_existed:"{{x}} existed",file_tree_x_filtered:"{{x}} filtered",file_tree_x_upload_not_allowed:"Upload of {{x}} not allowed",file_tree_renamed:"Renamed",file_tree_upload_files:"Upload files",file_tree_upload_folder:"Upload folder",show_hidden_files:"Show Hidden files",do_no_show_hidden_files:"Do not show hidden files",file_tree_rename:"Rename",file_tree_create_new_file:"New file",file_tree_create_new_folder:"New folder",file_tree_make_sure_delete_x_unrecoverable:"Are you sure to delete this {{x}}? The file cannot be recovered after deletion",file_tree_kind_tips:"Notice",file_tree_understood:"Know",output_browser_click_run_start_application:"Click \u3010Run\u3011 to start the application",helpers_invalid_parameter_rate_x:"Invalid parameter: rate={{x}}",store_user_not_found:"User not found",store_appStatus_transition_error_x:"AppStatus transition error: {{x}}",dao_channel_agentUserId_x_inconsistent:"The agentUserId {{x}} is inconsistent",dao_channel_event_x_is_not_supported:"Event {{x}} is not supported",dao_channel_connection_not_established:"The connection has not been established yet",dao_channel_playground_not_exist:"Playground does not exist",dao_channel_playground_unbound_container:"Playground unbound container",dao_channel_container_startup_failed:"Container startup failed",dao_channel_insufficient_server_resources:"Insufficient server resources",dao_channel_server_is_busy:"Server is busy",dao_channel_activation_timeout:"Docker activation timeout",dao_channel_docker_failed_to_activate:"Docker failed to start",dao_channel_socket_is_not_ready:"Socket is not ready",dao_channel_socket_is_not_ready_for_x:"Socket is not ready for {{x}}",dao_channel_socket_connect_broken:"Socket connection broken",dao_paas_not_find_mount_dom_object_for_x:"Could not find mounted DOM object for {{x}}",dao_paas_x_component_is_not_supported:"{{x}} component is not supported",dao_paas_no_ready:"No ready",dao_paas_file_does_not_exist:"File does not exist",dao_pass_set_answer_wrong:"Get wrong when insert answer for question","Unable to create file or directory with system reserved name":"Unable to create file or directory with system reserved name","The file or folder {{path}} already exists in this location, please choose another name":"The file or folder {{path}} already exists in this location, please choose another name"},L5e={common_success:"\u6210\u529F",common_confirm:"\u786E\u5B9A",common_cancel:"\u53D6\u6D88",common_delete:"\u5220\u9664",common_hidden:"\u5DF2\u9690\u85CF",common_locked:"\u5DF2\u52A0\u9501",common_offline:"\u79BB\u7EBF",common_directory:"\u76EE\u5F55",common_file:"\u6587\u4EF6",editor_no_open_file:"\u672A\u6253\u5F00\u6587\u4EF6",editor_large_file_tip:"\u6587\u4EF6\u8D85\u8FC716\u5146\u5927\u5C0F\uFF0C\u6682\u4E0D\u652F\u6301\u9884\u89C8",editor_unsupported_format_file_cannot_display:"\u6B64\u6587\u4EF6\u662F\u4E8C\u8FDB\u5236\u6587\u4EF6\u6216\u4F7F\u7528\u4E86\u4E0D\u652F\u6301\u7684\u6587\u4EF6\u7F16\u7801\uFF0C\u65E0\u6CD5\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A",editor_picture_not_support_preview:"\u56FE\u7247\u6682\u65F6\u4E0D\u652F\u6301\u9884\u89C8",editor_search_files_by_name:"\u6309\u540D\u79F0\u641C\u7D22\u6587\u4EF6(\u8FFD\u52A0: \u8F6C\u5230\u884C, \u8FFD\u52A0 @ \u8F6C\u5230\u7B26\u53F7)",editor_pending_update:"{{pendingUpdate}}\u4E2A\u66F4\u65B0\u5F85\u5199\u5165",editor_ot_success:"\u6210\u529F",file_tree_click_to_show:"\u70B9\u51FB\u663E\u793A",file_tree_click_to_hidden:"\u70B9\u51FB\u9690\u85CF",file_tree_click_to_cancel:"\u70B9\u51FB\u53D6\u6D88",file_tree_click_to_locked:"\u70B9\u51FB\u9501\u5B9A",file_tree_joined_the_test:"\u5DF2\u52A0\u5165\u6D4B\u8BD5",file_tree_click_to_remove:"\u70B9\u51FB\u79FB\u9664",file_tree_add_test:"\u6DFB\u52A0\u6D4B\u8BD5",file_tree_num_of_files_cannot_exceed_500:"\u6587\u4EF6\u6570\u91CF\u4E0D\u80FD\u8D85\u8FC7500",file_tree_x_existed:"{{x}}\u5DF2\u5B58\u5728",file_tree_x_filtered:"{{x}}\u88AB\u8FC7\u6EE4",file_tree_x_upload_not_allowed:"{{x}}\u4E0D\u5141\u8BB8\u4E0A\u4F20",file_tree_renamed:"\u91CD\u540D\u4E86",file_tree_upload_files:"\u4E0A\u4F20\u6587\u4EF6",file_tree_upload_folder:"\u4E0A\u4F20\u6587\u4EF6\u5939",show_hidden_files:"\u663E\u793A\u9690\u85CF\u6587\u4EF6",do_no_show_hidden_files:"\u4E0D\u663E\u793A\u9690\u85CF\u6587\u4EF6",file_tree_rename:"\u91CD\u547D\u540D",file_tree_create_new_file:"\u65B0\u5EFA\u6587\u4EF6",file_tree_create_new_folder:"\u65B0\u5EFA\u6587\u4EF6\u5939",file_tree_make_sure_delete_x_unrecoverable:"\u786E\u5B9A\u5220\u9664\u8FD9\u4E2A{{x}}\u5417\uFF1F\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D",file_tree_kind_tips:"\u6E29\u99A8\u63D0\u793A",file_tree_understood:"\u77E5\u9053\u4E86",output_browser_click_run_start_application:"\u70B9\u51FB\u3010\u8FD0\u884C\u3011\u542F\u52A8\u5E94\u7528",helpers_invalid_parameter_rate_x:"\u65E0\u6548\u7684\u53C2\u6570: rate={{x}}",store_user_not_found:"\u627E\u4E0D\u5230\u7528\u6237",store_appStatus_transition_error_x:"appStatus \u8F6C\u6362\u9519\u8BEF: {{x}}",dao_channel_agentUserId_x_inconsistent:"agentUserId {{x}} \u4E0D\u4E00\u81F4",dao_channel_event_x_is_not_supported:"\u4E8B\u4EF6 {{x}} \u4E0D\u652F\u6301",dao_channel_connection_not_established:"\u8FDE\u63A5\u5C1A\u672A\u5EFA\u7ACB",dao_channel_playground_not_exist:"playground\u4E0D\u5B58\u5728",dao_channel_playground_unbound_container:"playground\u672A\u7ED1\u5B9A\u5BB9\u5668",dao_channel_container_startup_failed:"\u5BB9\u5668\u542F\u52A8\u5931\u8D25",dao_channel_insufficient_server_resources:"\u670D\u52A1\u5668\u8D44\u6E90\u4E0D\u8DB3",dao_channel_server_is_busy:"\u670D\u52A1\u5668\u7E41\u5FD9",dao_channel_activation_timeout:"docker\u6FC0\u6D3B\u8D85\u65F6",dao_channel_docker_failed_to_activate:"docker\u542F\u52A8\u5931\u8D25",dao_channel_socket_is_not_ready:"socket\u672A\u51C6\u5907\u597D",dao_channel_socket_is_not_ready_for_x:"socket \u8FD8\u6CA1\u6709\u4E3A{{x}}\u51C6\u5907\u597D",dao_channel_socket_connect_broken:"socket\u8FDE\u63A5\u4E2D\u65AD",dao_paas_not_find_mount_dom_object_for_x:"\u627E\u4E0D\u5230\u4E3A{{x}}\u7684\u6302\u8F7DDOM\u5BF9\u8C61",dao_paas_x_component_is_not_supported:"\u7EC4\u4EF6{{x}}\u4E0D\u652F\u6301",dao_paas_no_ready:"\u672A\u51C6\u5907",dao_paas_file_does_not_exist:"\u6587\u4EF6\u4E0D\u5B58\u5728",dao_pass_set_answer_wrong:"\u8BBE\u7F6E\u9898\u76EE\u7B54\u6848\u9519\u8BEF","Unable to create file or directory with system reserved name":"\u65E0\u6CD5\u4F7F\u7528\u7CFB\u7EDF\u4FDD\u7559\u540D\u79F0\u521B\u5EFA\u6587\u4EF6\u6216\u76EE\u5F55","The file or folder {{path}} already exists in this location, please choose another name":"\u6B64\u4F4D\u7F6E\u5DF2\u5B58\u5728\u6587\u4EF6\u6216\u8005\u6587\u4EF6\u5939 {{path}}\uFF0C\u8BF7\u9009\u62E9\u5176\u5B83\u540D\u79F0"},ax=(t=>(t.ZH="ZH",t.EN="EN",t))(ax||{});const M5e={EN:{translation:X5e},ZH:{translation:L5e}},N5e="ZH";Ho.use(E5e).init({resources:M5e,lng:N5e,keySeparator:!1,interpolation:{escapeValue:!1}});const Zr=Ho.t,W5e=[1,2,3,5,8,16];class U5e{constructor(e,n,r,i,o,s,a,l){Lt(this,"start");Lt(this,"end");Lt(this,"totalTime");Lt(this,"rate");Lt(this,"preFrameTime",0);Lt(this,"resumeTime",0);Lt(this,"dataBuffer",[]);Lt(this,"playing",!1);Lt(this,"isReplay",!1);Lt(this,"index",0);Lt(this,"firstFrameTime",0);Lt(this,"isMovePosition",!1);Lt(this,"preTerminalIndex",{});Lt(this,"preFireTreeIndex",{});Lt(this,"preTerminalDockerId","");Lt(this,"preConsoleDockerId","");Lt(this,"isStopMovePosition",!1);Lt(this,"triggerEventForMaxTimespanRecord","");Lt(this,"triggerEventForMaxTimespan",-1);Lt(this,"eventCustomize");Lt(this,"eventDispatcher");Lt(this,"getPlaybackSnapshot");Lt(this,"progressDispatcher");this.start=e,this.end=n,this.rate=1,this.totalTime=n-e,this.triggerEventForMaxTimespan=i,this.eventDispatcher=o,this.progressDispatcher=s,this.getPlaybackSnapshot=a,this.eventCustomize=l,this.step=this.step.bind(this)}convertToAbsoluteTime(e){return this.start+e}setRate(e){e&&!W5e.includes(e)&&this.progressDispatcher&&this.progressDispatcher("error",`${Zr("helpers_invalid_parameter_rate_x",{x:e})}`),this.rate=e||this.rate}buffer(e){this.dataBuffer=this.dataBuffer.concat(e),this.firstFrameTime=this.dataBuffer[0].timestamp}pause(){if(!this.playing){dn.warn("Do not pause more than one time");return}this.playing=!1}resume(){this.resumeTime=this.resumeTime||0,this.resumeTime>0?this.isReplay=!0:this.preFrameTime=Date.now(),this.playing=!0,this.isStopMovePosition=!1,window.requestAnimationFrame(this.step)}restart(){this.preFrameTime=Date.now(),this.playing=!0,this.preFireTreeIndex={},this.preTerminalDockerId="",this.preConsoleDockerId="",ot.file.reset(),this.index=0,window.requestAnimationFrame(this.step)}movePosition(e){var n;if(!((n=this.dataBuffer)!=null&&n.length)){this.resumeTime=e;return}this.isStopMovePosition=!this.playing,this.resumeTime=e,this.isReplay=!0,this.index=this.findFrameByTimeStamp(),this.isMovePosition=!0,this.preTerminalIndex={},ot.dao.resetTerminal(),ot.dao.resetConsole(),window.requestAnimationFrame(this.step)}findFrameByTimeStamp(){const e=this.resumeTime+this.firstFrameTime,n=this.dataBuffer,r=n.length,i=(a,l)=>{var c,u,f,h;if(a<=l){const d=Math.floor((l-a)/2+a),m=n[d].timestamp;return m===e?d:e===((c=n[d-1])==null?void 0:c.timestamp)?d-1:e===((u=n[d+1])==null?void 0:u.timestamp)||e>((f=n[d-1])==null?void 0:f.timestamp)&&e<((h=n[d+1])==null?void 0:h.timestamp)?d+1:(e<m?l=d-1:e>m&&(a=d+1),i(a,l))}else return dn.warn("Do not find the next frame"),this.index=0,this.resumeTime=0,this.resume(),this.index},o=0,s=r-1;return i(o,s)}gotoNextFrame(){var e;!this.isStopMovePosition&&((e=this.progressDispatcher)==null||e.call(this,"progress",this.resumeTime)),this.preFrameTime=Date.now(),window.requestAnimationFrame(this.step)}triggerCustomizeEvent(e){var n;(n=this.eventCustomize)==null||n.call(this,e)}step(){var n,r,i;if(!this.playing&&!this.isStopMovePosition)return;if(this.isReplay&&(this.isReplay=!1,this.preFrameTime=Date.now()),this.resumeTime=this.resumeTime+(Date.now()-this.preFrameTime)*this.rate,this.resumeTime>=this.totalTime||this.index>this.dataBuffer.length-1){this.playing=!1,this.resumeTime=0,!this.isStopMovePosition&&((n=this.progressDispatcher)==null||n.call(this,"progress",this.totalTime)),(r=this.progressDispatcher)==null||r.call(this,"complete",this.resumeTime);return}let e=this.dataBuffer[this.index];if(!e){this.gotoNextFrame();return}if(this.isStopMovePosition&&this.firstFrameTime+this.resumeTime>=(e==null?void 0:e.timestamp)){this.playing=!1,this.isStopMovePosition=!1;return}if(e.eventName==="customize"){this.index++,this.triggerCustomizeEvent(e),this.gotoNextFrame();return}if(this.triggerEventForMaxTimespan>-1&&this.triggerEventForMaxTimespanRecord!=e._id&&(e==null?void 0:e.timestamp)-(this.firstFrameTime+this.resumeTime)>this.triggerEventForMaxTimespan){this.triggerEventForMaxTimespanRecord=e._id;const o={eventName:"customize",agentUserId:"playback",data:{action:"timespanEvent",frame:e,nextTime:e.timestamp-this.dataBuffer[0].timestamp},timestamp:Date.now(),dockerId:""};this.triggerCustomizeEvent(o)}if(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)){if(this.isTerminalOrConsole(e.eventName)){this.trigger(e.eventName,e),this.gotoNextFrame();return}let s=0;const a=this.firstFrameTime+this.resumeTime;for(let l=this.index+1;l<this.dataBuffer.length&&this.dataBuffer[l].timestamp<=a;l++)s++,this.index=l;s>0&&(e=this.dataBuffer[this.index],this.isMovePosition=!0),this.isMovePosition?(this.triggerPreFrames(),this.isMovePosition=!1):(e=((i=this.getPlaybackSnapshot)==null?void 0:i.call(this,e.eventName,e,this.getPreFrameByFrame(e,this.index)||e))||e,this.setPreFrameData(e,this.index)),this.trigger(e.eventName,e)}else this.isMovePosition&&(this.triggerPreFrames(),this.isMovePosition=!1);this.gotoNextFrame()}getPreFrameByFrame(e,n){const{eventName:r,dockerId:i}=e,o=this.isEditor(r),s=this.isFileTree(r);let a;if(o){const{data:{openedPath:l}}=e;for(let c=n-1;c>=0;c--){const u=this.dataBuffer[c];if(u.dockerId===i&&u.eventName===r&&u.data.openedPath===l){a=this.dataBuffer[c],!a.snapshot&&c>=0&&this.setSnapshotByIndex(c);break}}}return s&&(a=this.dataBuffer[this.preFireTreeIndex[i]]),a}setPreFrameData(e,n){const{eventName:r,dockerId:i}=e;this.isFileTree(r)&&(this.preFireTreeIndex[i]=n)}isEditor(e){return e===_n.Editor}isFileTree(e){return e===_n.FileTree}isTerminal(e){return e===_n.Terminal}isConsole(e){return e===_n.Console}isTerminalOrConsole(e){return[_n.Terminal.toString(),_n.Console.toString()].includes(e)}setSnapshotByIndex(e){var o;const n=this.dataBuffer[e],{eventName:r}=n,i=this.isEditor(r);for(let s=0;s<=e;s++){let a=this.dataBuffer[s];if(a.eventName===n.eventName&&a.dockerId===n.dockerId&&(i?a.data.openedPath===n.data.openedPath:!0)){if(a.snapshot){this.setPreFrameData(a,s);continue}a=((o=this.getPlaybackSnapshot)==null?void 0:o.call(this,a.eventName,a,this.getPreFrameByFrame(a,s)))||a,this.setPreFrameData(a,s)}}}triggerPreFrames(){const e=[_n.FileTree.toString(),_n.Editor.toString(),_n.Terminal.toString(),_n.Console.toString()];for(let n=this.index;n>=0;n--){if(!e.length)return;if(e.includes(this.dataBuffer[n].eventName)){const r=this.dataBuffer[n],i=e.findIndex(o=>o===r.eventName);e.splice(i,1),r.snapshot||this.setSnapshotByIndex(n),this.trigger(r.eventName,r)}}e.forEach(n=>{this.trigger(n,null)})}trigger(e,n){if(e==="customize"){this.triggerCustomizeEvent(n),this.index++;return}if(!this.isTerminalOrConsole(e)){this.eventDispatcher(e,n),this.index++;return}const i=n==null?void 0:n.dockerId,o=this.preTerminalIndex[i]||0;for(let s=o+1;s<=this.index;s++){const a=this.dataBuffer[s];a&&this.isTerminalOrConsole(a.eventName)&&a.dockerId===i&&(this.isTerminal(e)&&(this.preTerminalDockerId&&this.preTerminalDockerId!==i&&ot.dao.resetTerminal(),this.preTerminalDockerId=i),this.isConsole(e)&&(this.preConsoleDockerId&&this.preConsoleDockerId!==i&&ot.dao.resetConsole(),this.preConsoleDockerId=i),this.eventDispatcher(a.eventName,a))}this.preTerminalIndex[i]=this.index,this.index++}}const D5e="@dao42/d42paas-front",q5e="0.9.64",Y5e="d42paas front",B5e="dao42 paas team",j5e="https://github.com/dao42/d42paas_frontend#readme",Z5e="UNLICENSED",F5e="./dist/DaoPaaS.cjs",V5e="./dist/DaoPaaS.cjs",G5e="./dist/DaoPaaS.d.ts",H5e={prebuild:"rimraf dist",build:"cross-env VITE_BUILD_EVENT=true pnpm tsc && pnpm vite && pnpm typedoc",copydist:"cp -r dist/sdk ../demo/public/",vite:"vite build --config ./config/vite.config.ts && shx cp ./src/types/DaoPaaS.d.ts ./dist",typedoc:"npx typedoc --tsconfig ./doc.tsconfig.json",workNameSpaceToFix:"node ./config/workNameSpaceToFix.js",tsc:"tsc -p ./tsconfig.json --isolatedModules false",test:"jest --coverage",prepublish:"pnpm build",publish:"npm publish --access public"},K5e={"@codemirror/autocomplete":"^6.0.2","@codemirror/collab":"^6.0.0","@codemirror/commands":"^6.0.0","@codemirror/lang-cpp":"^6.0.0","@codemirror/lang-css":"^6.0.0","@codemirror/lang-html":"^6.0.0","@codemirror/lang-java":"^6.0.0","@codemirror/lang-javascript":"^6.0.0","@codemirror/lang-json":"^6.0.0","@codemirror/lang-lezer":"^6.0.0","@codemirror/lang-markdown":"^6.0.0","@codemirror/lang-php":"^6.0.0","@codemirror/lang-python":"^6.0.0","@codemirror/lang-rust":"^6.0.0","@codemirror/lang-sql":"^6.0.0","@codemirror/lang-xml":"^6.0.0","@codemirror/language":"6.2.1","@codemirror/legacy-modes":"^6.0.0","@codemirror/lint":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.0.0","@emotion/babel-plugin":"^11.3.0","@emotion/babel-preset-css-prop":"^11.2.0","@emotion/core":"^11.0.0","@emotion/css":"^11.1.3","@emotion/eslint-plugin":"^11.2.0","@emotion/react":"^11.4.1","@emotion/styled":"^11.3.0","@headlessui/react":"^1.4.3","@loadable/component":"^5.15.2","@open-rpc/client-js":"^1.7.1","@testing-library/jest-dom":"^5.16.4","@testing-library/react":"^13.3.0","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/loadable__component":"^5.13.4","@types/lodash":"^4.14.175","@types/lodash.clonedeep":"^4.5.7","@types/lodash.isequal":"^4.5.6","@types/node":"^16.11.1","@types/ot":"^0.0.5","@types/prop-types":"^15.7.5","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@types/react-transition-group":"^4.4.5","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","@udecode/zustood":"^1.1.1","@vitejs/plugin-react":"^1.0.7",ahooks:"^3.3.10","babel-loader":"^8.2.2",bufferutil:"^4.0.6",classnames:"^2.3.1",codemirror:"^6.0.0",concurrently:"^6.3.0","cross-env":"^7.0.3",devicon:"^2.14.0",dexie:"^3.2.0","file-icons-js":"^1.1.0","file-loader":"^6.2.0","fs-extra":"^10.0.0","glob-all":"^3.2.1","highlight.js":"^11.6.0","hotkeys-js":"^3.9.4",immer:"^9.0.14",jest:"27.0.6",lodash:"^4.17.21",msw:"^0.39.2","ninja-keys":"^1.1.12",ot:"^0.0.15",prettier:"^2.3.2","prop-types":"^15.8.1",react:"^18.2.0","react-complex-tree":"^1.1.6","react-content-loader":"^6.2.0","react-dom":"18.2.0","react-icons":"^4.3.1","react-transition-group":"^4.4.2","rehype-document":"^6.1.0","rehype-highlight":"^5.0.2","rehype-katex":"^6.0.2","rehype-stringify":"^9.0.3","remark-math":"^5.1.1","remark-parse":"^10.0.1","remark-rehype":"^10.1.0",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.6.0",sass:"^1.43.2","sass-loader":"^12.2.0",shx:"^0.3.3","socket.io-client":"^4.5.1","source-map-loader":"^3.0.0","style-loader":"^3.3.1",stylis:"^4.0.10","ts-jest":"^27.1.3","ts-loader":"^9.2.5","ts-node":"^10.0.0",typedoc:"^0.22.12",unified:"^10.1.2","use-immer":"^0.7.0","utf-8-validate":"^5.0.9",uuid:"^8.3.2",vite:"^2.7.2","vite-plugin-html":"^3.0.6","whatwg-fetch":"^3.6.2",xterm:"^4.13.0","xterm-addon-attach":"^0.6.0","xterm-addon-fit":"^0.5.0",zustand:"^4.0.0-rc.1"},J5e=["dist"],e2e={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},t2e={url:"https://github.com/dao42/d42paas_frontend/issues"},n2e={workerDirectory:"src"},r2e={"@types/lodash.throttle":"^4.1.7","codemirror-lang-elixir":"^3.0.0",i18next:"^21.8.16","lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1","range-analyzer":"0.1.1-alpha.2","rc-dropdown":"^4.0.1","rc-menu":"^9.6.3","react-i18next":"11.18.3","xterm-addon-web-links":"^0.6.0"};var i2e={name:D5e,version:q5e,description:Y5e,author:B5e,homepage:j5e,license:Z5e,main:F5e,module:V5e,types:G5e,scripts:H5e,devDependencies:K5e,files:J5e,repository:e2e,bugs:t2e,msw:n2e,dependencies:r2e};const o2e=()=>i2e.version,s2e=async(t,e,n)=>{const i=await(await fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:n})})).json();if(i.status==="failure")throw dn.error(i),new Error(i.errors[0].erromsg);return i.data},Yi=(t,e=1)=>{t=t||"#ffffff";let n=t.replace("#","");n.length===3&&(n=`${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`);const r=parseInt(n.substring(0,2),16),i=parseInt(n.substring(2,4),16),o=parseInt(n.substring(4,6),16);return e>1&&e<=100&&(e=e/100),`rgba(${r},${i},${o},${e})`},a2e=()=>{const t=`
50
50
  @keyframes fadeOut {
51
51
  0% {opacity: 1;}
52
52
  100% {opacity: 0;}
@@ -1535,7 +1535,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1535
1535
  cursor: pointer;
1536
1536
  width: 16px;
1537
1537
  }
1538
- `,tHe=()=>{const{t}=Pf();W.exports.useRef(!1);const e=rn().dao.playgroundInfo().runStatus,n=rn().dao.playgroundInfo().url,r=rn().dao.playgroundInfo().gui,i=W.exports.useRef(null),[o,s]=W.exports.useState(""),a=W.exports.useRef(null),l=d=>{d.keyCode===13&&f(d.target.value)},c=()=>{f(o)},u=()=>e!=="STOP",f=W.exports.useCallback(d=>{var m,x;!d||d==="about:blank"||d==="undefined"?d="about:blank":!d.startsWith("https")&&!d.startsWith("http")&&(d=`https://${d}`),r&&!d.includes("/vnc_lite.html")&&(d=`${d}/vnc_lite.html`),o!=d&&s(d),a.current&&(a.current.value=d||"",(x=(m=i==null?void 0:i.current)==null?void 0:m.contentWindow)==null||x.location.replace("about:blank")),setTimeout(()=>{var y,p;(p=(y=i==null?void 0:i.current)==null?void 0:y.contentWindow)==null||p.location.replace(d)},10)},[o,r]),h=()=>{window.open(o)};return W.exports.useEffect(()=>{f(n)},[n,f]),W.exports.useEffect(()=>{!n||_e.dao.channel().subscribeForComponent(_n.Simulator,{onData:d=>{f(n)}})},[n,f]),ge(B1,{name:"browser",componentType:"Browser",children:Wn(JGe,{className:"browser-container",children:[!r&&ge(eHe,{className:"d42-browser-nav",onClick:d=>{d.nativeEvent.stopPropagation(),_e.dao.channel().followingFocusComponent("Browser")},children:Wn("div",{className:"d42-input-wrap",children:[ge("input",{type:"text",defaultValue:o,disabled:!u(),ref:a,onKeyDown:l}),ge("i",{className:"d42 dao42__icon--refresh d42-cursor-pointer",onClick:c}),ge(QD,{className:"open-browser",onClick:h})]})}),Wn("div",{className:"d42-browser-body",children:[r&&ge(QD,{className:"open-browser d42-cursor-pointer open-new-window",onClick:h}),!u()&&ge("div",{className:"d42-stop-mask",children:ge("span",{children:t("output_browser_click_run_start_application")})}),ge("iframe",{className:"d42-iframe-container",frameBorder:0,ref:i,src:o,style:{backgroundColor:"#fff"}})]})]})})};var nHe=Object.freeze(Object.defineProperty({__proto__:null,default:tHe},Symbol.toStringTag,{value:"Module"}));const rHe=({options:t,...e},n)=>{const r=rn().theme.getTheme(of.terminal),i=W.exports.useMemo(()=>({...t,...e,theme:r.xterm}),[t,e,r]);document.createElement("div").classList.add("xterm-helper-user-label");const s=rn().dao.playgroundMode(),a=rn().dao.playgroundInfo().terminalHistory,l=rn().dao.resetTerminal(),[c,u]=W.exports.useState(null),[f,h]=W.exports.useState(!1),{progress:d,showProgress:m}=Bre();W.exports.useImperativeHandle(n,()=>({clear:()=>{c&&c.reset()}}));const x=(p,g)=>{p.write(g)},y=p=>{s!==hu.playback&&_e.dao.channel().terminal({value:p})};return W.exports.useEffect(()=>{if(!c&&!m){const p=new cC.exports.Terminal({...i,...r.style});qre(p),u(p)}},[i,m,c,r.style]),W.exports.useEffect(()=>{!c||(_e.dao.channel().subscribeForComponent(_n.Terminal,{onStart:()=>{c.reset()},onData:p=>{x(c,p.data.value)}}),_e.dao.channel().addMessageListener(p=>{const{name:g}=p;switch(g){case Nn.PlaygroundChanged:c.reset();break}}))},[c]),W.exports.useEffect(()=>{!c||(c.reset(),x(c,a))},[a,c]),W.exports.useEffect(()=>{c&&!f&&(c.reset(),h(!0))},[f,c]),W.exports.useEffect(()=>{l&&c&&(c.reset(),ot.dao.resetTerminal(!1))},[c,l]),ge(B1,{name:"terminal",componentType:"Terminal",children:ge(Yre,{className:"d42-shell-container d42-terminal-container",style:{height:"100%",width:"100%"},onClick:()=>{_e.dao.channel().followingFocusComponent("Terminal")},children:m?ge("div",{className:"xterm-progress-box",children:ge("div",{className:"xterm-progress-content",children:ge(Zre,{progress:d})})}):ge(jre,{terminal:c,onData:p=>{f||y(p)},xtermType:"terminal",...e})})})};var iHe=W.exports.forwardRef(rHe),oHe=Object.freeze(Object.defineProperty({__proto__:null,default:iHe},Symbol.toStringTag,{value:"Module"}));function $D(t){if(t)throw t}/*!
1538
+ `,tHe=()=>{const{t}=Pf();W.exports.useRef(!1);const e=rn().dao.playgroundInfo().runStatus,n=rn().dao.playgroundInfo().url,r=rn().dao.playgroundInfo().gui,i=W.exports.useRef(null),[o,s]=W.exports.useState(""),a=W.exports.useRef(null),l=d=>{d.keyCode===13&&f(d.target.value)},c=()=>{f(o)},u=()=>e!=="STOP",f=W.exports.useCallback(d=>{var m,x;!d||d==="about:blank"||d==="undefined"?d="about:blank":!d.startsWith("https")&&!d.startsWith("http")&&(d=`https://${d}`),r&&!d.includes("/vnc_lite.html")&&(d=`${d}/vnc_lite.html`),o!=d&&s(d),a.current&&(a.current.value=d||"",(x=(m=i==null?void 0:i.current)==null?void 0:m.contentWindow)==null||x.location.replace("about:blank")),setTimeout(()=>{var y,p;(p=(y=i==null?void 0:i.current)==null?void 0:y.contentWindow)==null||p.location.replace(d)},10)},[o,r]),h=()=>{window.open(o)};return W.exports.useEffect(()=>{f(n)},[n,f]),W.exports.useEffect(()=>{!n||_e.dao.channel().subscribeForComponent(_n.Simulator,{onData:d=>{f(n)}})},[n,f]),ge(B1,{name:"browser",componentType:"Browser",children:Wn(JGe,{className:"browser-container",children:[!r&&ge(eHe,{className:"d42-browser-nav",onClick:d=>{d.nativeEvent.stopPropagation(),_e.dao.channel().followingFocusComponent("Browser")},children:Wn("div",{className:"d42-input-wrap",children:[ge("input",{type:"text",defaultValue:o,disabled:!u(),ref:a,onKeyDown:l}),ge("i",{className:"d42 dao42__icon--refresh d42-cursor-pointer",onClick:c}),ge(QD,{className:"open-browser",onClick:h})]})}),Wn("div",{className:"d42-browser-body",children:[r&&ge(QD,{className:"open-browser d42-cursor-pointer open-new-window",onClick:h}),!u()&&ge("div",{className:"d42-stop-mask",children:ge("span",{children:t("output_browser_click_run_start_application")})}),ge("iframe",{className:"d42-iframe-container",frameBorder:0,ref:i,src:o,style:{backgroundColor:"#fff",margin:"1px"}})]})]})})};var nHe=Object.freeze(Object.defineProperty({__proto__:null,default:tHe},Symbol.toStringTag,{value:"Module"}));const rHe=({options:t,...e},n)=>{const r=rn().theme.getTheme(of.terminal),i=W.exports.useMemo(()=>({...t,...e,theme:r.xterm}),[t,e,r]);document.createElement("div").classList.add("xterm-helper-user-label");const s=rn().dao.playgroundMode(),a=rn().dao.playgroundInfo().terminalHistory,l=rn().dao.resetTerminal(),[c,u]=W.exports.useState(null),[f,h]=W.exports.useState(!1),{progress:d,showProgress:m}=Bre();W.exports.useImperativeHandle(n,()=>({clear:()=>{c&&c.reset()}}));const x=(p,g)=>{p.write(g)},y=p=>{s!==hu.playback&&_e.dao.channel().terminal({value:p})};return W.exports.useEffect(()=>{if(!c&&!m){const p=new cC.exports.Terminal({...i,...r.style});qre(p),u(p)}},[i,m,c,r.style]),W.exports.useEffect(()=>{!c||(_e.dao.channel().subscribeForComponent(_n.Terminal,{onStart:()=>{c.reset()},onData:p=>{x(c,p.data.value)}}),_e.dao.channel().addMessageListener(p=>{const{name:g}=p;switch(g){case Nn.PlaygroundChanged:c.reset();break}}))},[c]),W.exports.useEffect(()=>{!c||(c.reset(),x(c,a))},[a,c]),W.exports.useEffect(()=>{c&&!f&&(c.reset(),h(!0))},[f,c]),W.exports.useEffect(()=>{l&&c&&(c.reset(),ot.dao.resetTerminal(!1))},[c,l]),ge(B1,{name:"terminal",componentType:"Terminal",children:ge(Yre,{className:"d42-shell-container d42-terminal-container",style:{height:"100%",width:"100%"},onClick:()=>{_e.dao.channel().followingFocusComponent("Terminal")},children:m?ge("div",{className:"xterm-progress-box",children:ge("div",{className:"xterm-progress-content",children:ge(Zre,{progress:d})})}):ge(jre,{terminal:c,onData:p=>{f||y(p)},xtermType:"terminal",...e})})})};var iHe=W.exports.forwardRef(rHe),oHe=Object.freeze(Object.defineProperty({__proto__:null,default:iHe},Symbol.toStringTag,{value:"Module"}));function $D(t){if(t)throw t}/*!
1539
1539
  * Determine if an object is a Buffer
1540
1540
  *
1541
1541
  * @author Feross Aboukhadijeh <https://feross.org>