@dao42/d42paas-front 0.9.149 → 0.9.150

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 JS=z.exports,Bme=JV.exports;function Fme(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Yme=typeof Object.is=="function"?Object.is:Fme,jme=Bme.useSyncExternalStore,Zme=JS.useRef,Vme=JS.useEffect,Gme=JS.useMemo,Hme=JS.useDebugValue;KV.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=Zme(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=Gme(function(){function l(d){if(!c){if(c=!0,u=d,d=r(d),i!==void 0&&s.hasValue){var p=s.value;if(i(p,d))return f=p}return f=d}if(p=f,Yme(u,d))return p;var b=r(d);return i!==void 0&&i(p,b)?p:(u=d,f=b)}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=jme(t,o[0],o[1]);return Vme(function(){s.hasValue=!0,s.value=a},[a]),Hme(a),a};HV.exports=KV;var Kme=HV.exports;const{useSyncExternalStoreWithSelector:Jme}=Kme;function ege(t,e=t.getState,n){const r=Jme(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return z.exports.useDebugValue(r),r}const hM=t=>{const e=typeof t=="function"?GV(t):t,n=(r,i)=>ege(e,r,i);return Object.assign(n,e),n},tge=t=>t?hM(t):hM;var nge=tge;const rge=(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,p,b)=>{const y=n(d,p);return u&&c.send(b===void 0?{type:s||"anonymous"}:typeof b=="string"?{type:b}:b,r()),y};const f=(...d)=>{const p=u;u=!1,n(...d),u=p},h=t(i.setState,r,i);if(c.init(h),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let d=!1;const p=i.dispatch;i.dispatch=(...b)=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&b[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),p(...b)}}return c.subscribe(d=>{var p;switch(d.type){case"ACTION":if(typeof d.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Mk(d.payload,b=>{if(b.type==="__setState"){f(b.state);return}!i.dispatchFromDevtools||typeof i.dispatch=="function"&&i.dispatch(b)});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 Mk(d.state,b=>{f(b),c.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Mk(d.state,b=>{f(b)});case"IMPORT_STATE":{const{nextLiftedState:b}=d.payload,y=(p=b.computedStates.slice(-1)[0])==null?void 0:p.state;if(!y)return;f(y),c.send(null,b);return}case"PAUSE_RECORDING":return u=!u}return}}),h},ige=rge,Mk=(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)},Y5=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Y5(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Y5(r)(n)}}}},oge=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,O)=>({...O,...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=Y5(o.serialize),f=()=>{const y=o.partialize({...r()});let O;const m=u({state:y,version:o.version}).then(v=>c.setItem(o.name,v)).catch(v=>{O=v});if(O)throw O;return m},h=i.setState;i.setState=(y,O)=>{h(y,O),f()};const d=t((...y)=>{n(...y),f()},r,i);let p;const b=()=>{var y;if(!c)return;s=!1,a.forEach(m=>m(r()));const O=((y=o.onRehydrateStorage)==null?void 0:y.call(o,r()))||void 0;return Y5(c.getItem.bind(c))(o.name).then(m=>{if(m)return o.deserialize(m)}).then(m=>{if(m)if(typeof m.version=="number"&&m.version!==o.version){if(o.migrate)return o.migrate(m.state,m.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return m.state}).then(m=>{var v;return p=o.merge(m,(v=r())!=null?v:d),n(p,!0),f()}).then(()=>{O==null||O(p,void 0),s=!0,l.forEach(m=>m(p))}).catch(m=>{O==null||O(void 0,m)})};return i.persist={setOptions:y=>{o={...o,...y},y.getStorage&&(c=y.getStorage())},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:y=>(a.add(y),()=>{a.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},b(),p||d},sge=oge,age=(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},lge=(t,e)=>{const n=t(e.set,e.get,e);return{...e,set:{...e.set,...n}}},cge=(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}},gQ=t=>({...t,extendSelectors:e=>gQ(cge(e,t)),extendActions:e=>gQ(lge(e,t))}),uge=t=>{const e={};return Object.keys(t.getState()).forEach(n=>{e[n]=()=>t.getState()[n]}),e},fge=t=>{const e={};return Object.keys(t.getState()).forEach(n=>{e[n]=r=>t(i=>i[n],r)}),e},dge=(t,e)=>{const n={};return Object.keys(t.getState()).forEach(r=>{n[r]=()=>e()[r]}),n},hge=t=>(e,n,r)=>{const i=(o,s)=>e(Pme(o),!0,s);return r.setState=i,t(i,n,r)};function Oge(t,...e){return e.reduce((n,r)=>r(n),t)}const e4=t=>(e,n={})=>{var r;const{middlewares:i=[],devtools:o,persist:s,immer:a}=n;Qme((r=a==null?void 0:a.enabledAutoFreeze)!==null&&r!==void 0?r:!1),a!=null&&a.enableMapSet&&$me();const l=[hge,...i];s!=null&&s.enabled&&l.push($=>sge($,{...s,name:t})),o!=null&&o.enabled&&l.push($=>ige($,{...o,name:t})),l.push(GV);const u=($=>Oge($,...l))(()=>e),f=nge(u),h=age(f,t),d=($,S)=>{u.setState(w=>{Object.assign(w,$)},S||`@@${t}/mergeState`)},p=($,S)=>{u.setState($,S||`@@${t}/setState`)},b=fge(f),y=uge(f),O=Ime(f),m=dge(f,O),v={get:{state:u.getState,...y},name:t,set:{state:p,mergeState:d,...h},store:u,use:b,useTracked:m,useStore:f,useTrackedStore:O,extendSelectors:()=>v,extendActions:()=>v};return gQ(v)};var Wb=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function tG(t,e){return e={exports:{}},t(e,e.exports),e.exports}var pge=typeof Wb=="object"&&Wb&&Wb.Object===Object&&Wb,nG=pge,mge=typeof self=="object"&&self&&self.Object===Object&&self,gge=nG||mge||Function("return this")(),zf=gge,vge=zf.Symbol,Fd=vge,rG=Object.prototype,yge=rG.hasOwnProperty,bge=rG.toString,H0=Fd?Fd.toStringTag:void 0;function _ge(t){var e=yge.call(t,H0),n=t[H0];try{t[H0]=void 0;var r=!0}catch{}var i=bge.call(t);return r&&(e?t[H0]=n:delete t[H0]),i}var $ge=_ge,Sge=Object.prototype,xge=Sge.toString;function wge(t){return xge.call(t)}var kge=wge,Tge="[object Null]",Pge="[object Undefined]",OM=Fd?Fd.toStringTag:void 0;function Qge(t){return t==null?t===void 0?Pge:Tge:OM&&OM in Object(t)?$ge(t):kge(t)}var n0=Qge;function Ege(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var pE=Ege,Cge="[object AsyncFunction]",Rge="[object Function]",Age="[object GeneratorFunction]",Ige="[object Proxy]";function zge(t){if(!pE(t))return!1;var e=n0(t);return e==Rge||e==Age||e==Cge||e==Ige}var iG=zge,Lge=zf["__core-js_shared__"],Nk=Lge,pM=function(){var t=/[^.]+$/.exec(Nk&&Nk.keys&&Nk.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Mge(t){return!!pM&&pM in t}var Nge=Mge,Dge=Function.prototype,Xge=Dge.toString;function Wge(t){if(t!=null){try{return Xge.call(t)}catch{}try{return t+""}catch{}}return""}var PO=Wge,Uge=/[\\^$.*+?()[\]{}|]/g,qge=/^\[object .+?Constructor\]$/,Bge=Function.prototype,Fge=Object.prototype,Yge=Bge.toString,jge=Fge.hasOwnProperty,Zge=RegExp("^"+Yge.call(jge).replace(Uge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vge(t){if(!pE(t)||Nge(t))return!1;var e=iG(t)?Zge:qge;return e.test(PO(t))}var Gge=Vge;function Hge(t,e){return t==null?void 0:t[e]}var Kge=Hge;function Jge(t,e){var n=Kge(t,e);return Gge(n)?n:void 0}var QO=Jge,eve=function(){try{var t=QO(Object,"defineProperty");return t({},"",{}),t}catch{}}(),mM=eve;function tve(t,e,n){e=="__proto__"&&mM?mM(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var nve=tve;function rve(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 ive=rve,ove=ive(),sve=ove;function ave(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var lve=ave;function cve(t){return t!=null&&typeof t=="object"}var k1=cve,uve="[object Arguments]";function fve(t){return k1(t)&&n0(t)==uve}var gM=fve,oG=Object.prototype,dve=oG.hasOwnProperty,hve=oG.propertyIsEnumerable,Ove=gM(function(){return arguments}())?gM:function(t){return k1(t)&&dve.call(t,"callee")&&!hve.call(t,"callee")},sG=Ove,pve=Array.isArray,Pf=pve;function mve(){return!1}var gve=mve,vQ=tG(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i?zf.Buffer:void 0,s=o?o.isBuffer:void 0,a=s||gve;t.exports=a}),vve=9007199254740991,yve=/^(?:0|[1-9]\d*)$/;function bve(t,e){var n=typeof t;return e=e==null?vve:e,!!e&&(n=="number"||n!="symbol"&&yve.test(t))&&t>-1&&t%1==0&&t<e}var aG=bve,_ve=9007199254740991;function $ve(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=_ve}var mE=$ve,Sve="[object Arguments]",xve="[object Array]",wve="[object Boolean]",kve="[object Date]",Tve="[object Error]",Pve="[object Function]",Qve="[object Map]",Eve="[object Number]",Cve="[object Object]",Rve="[object RegExp]",Ave="[object Set]",Ive="[object String]",zve="[object WeakMap]",Lve="[object ArrayBuffer]",Mve="[object DataView]",Nve="[object Float32Array]",Dve="[object Float64Array]",Xve="[object Int8Array]",Wve="[object Int16Array]",Uve="[object Int32Array]",qve="[object Uint8Array]",Bve="[object Uint8ClampedArray]",Fve="[object Uint16Array]",Yve="[object Uint32Array]",Pi={};Pi[Nve]=Pi[Dve]=Pi[Xve]=Pi[Wve]=Pi[Uve]=Pi[qve]=Pi[Bve]=Pi[Fve]=Pi[Yve]=!0;Pi[Sve]=Pi[xve]=Pi[Lve]=Pi[wve]=Pi[Mve]=Pi[kve]=Pi[Tve]=Pi[Pve]=Pi[Qve]=Pi[Eve]=Pi[Cve]=Pi[Rve]=Pi[Ave]=Pi[Ive]=Pi[zve]=!1;function jve(t){return k1(t)&&mE(t.length)&&!!Pi[n0(t)]}var Zve=jve;function Vve(t){return function(e){return t(e)}}var Gve=Vve,vM=tG(function(t,e){var n=e&&!e.nodeType&&e,r=n&&!0&&t&&!t.nodeType&&t,i=r&&r.exports===n,o=i&&nG.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}),yM=vM&&vM.isTypedArray,Hve=yM?Gve(yM):Zve,lG=Hve,Kve=Object.prototype,Jve=Kve.hasOwnProperty;function eye(t,e){var n=Pf(t),r=!n&&sG(t),i=!n&&!r&&vQ(t),o=!n&&!r&&!i&&lG(t),s=n||r||i||o,a=s?lve(t.length,String):[],l=a.length;for(var c in t)(e||Jve.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||aG(c,l)))&&a.push(c);return a}var tye=eye,nye=Object.prototype;function rye(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||nye;return t===n}var iye=rye;function oye(t,e){return function(n){return t(e(n))}}var sye=oye,aye=sye(Object.keys,Object),lye=aye,cye=Object.prototype,uye=cye.hasOwnProperty;function fye(t){if(!iye(t))return lye(t);var e=[];for(var n in Object(t))uye.call(t,n)&&n!="constructor"&&e.push(n);return e}var dye=fye;function hye(t){return t!=null&&mE(t.length)&&!iG(t)}var Oye=hye;function pye(t){return Oye(t)?tye(t):dye(t)}var gE=pye;function mye(t,e){return t&&sve(t,e,gE)}var gye=mye;function vye(){this.__data__=[],this.size=0}var yye=vye;function bye(t,e){return t===e||t!==t&&e!==e}var cG=bye;function _ye(t,e){for(var n=t.length;n--;)if(cG(t[n][0],e))return n;return-1}var t4=_ye,$ye=Array.prototype,Sye=$ye.splice;function xye(t){var e=this.__data__,n=t4(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Sye.call(e,n,1),--this.size,!0}var wye=xye;function kye(t){var e=this.__data__,n=t4(e,t);return n<0?void 0:e[n][1]}var Tye=kye;function Pye(t){return t4(this.__data__,t)>-1}var Qye=Pye;function Eye(t,e){var n=this.__data__,r=t4(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Cye=Eye;function r0(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])}}r0.prototype.clear=yye;r0.prototype.delete=wye;r0.prototype.get=Tye;r0.prototype.has=Qye;r0.prototype.set=Cye;var n4=r0;function Rye(){this.__data__=new n4,this.size=0}var Aye=Rye;function Iye(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var zye=Iye;function Lye(t){return this.__data__.get(t)}var Mye=Lye;function Nye(t){return this.__data__.has(t)}var Dye=Nye,Xye=QO(zf,"Map"),Kg=Xye,Wye=QO(Object,"create"),Jg=Wye;function Uye(){this.__data__=Jg?Jg(null):{},this.size=0}var qye=Uye;function Bye(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Fye=Bye,Yye="__lodash_hash_undefined__",jye=Object.prototype,Zye=jye.hasOwnProperty;function Vye(t){var e=this.__data__;if(Jg){var n=e[t];return n===Yye?void 0:n}return Zye.call(e,t)?e[t]:void 0}var Gye=Vye,Hye=Object.prototype,Kye=Hye.hasOwnProperty;function Jye(t){var e=this.__data__;return Jg?e[t]!==void 0:Kye.call(e,t)}var ebe=Jye,tbe="__lodash_hash_undefined__";function nbe(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Jg&&e===void 0?tbe:e,this}var rbe=nbe;function i0(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])}}i0.prototype.clear=qye;i0.prototype.delete=Fye;i0.prototype.get=Gye;i0.prototype.has=ebe;i0.prototype.set=rbe;var bM=i0;function ibe(){this.size=0,this.__data__={hash:new bM,map:new(Kg||n4),string:new bM}}var obe=ibe;function sbe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var abe=sbe;function lbe(t,e){var n=t.__data__;return abe(e)?n[typeof e=="string"?"string":"hash"]:n.map}var r4=lbe;function cbe(t){var e=r4(this,t).delete(t);return this.size-=e?1:0,e}var ube=cbe;function fbe(t){return r4(this,t).get(t)}var dbe=fbe;function hbe(t){return r4(this,t).has(t)}var Obe=hbe;function pbe(t,e){var n=r4(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var mbe=pbe;function o0(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])}}o0.prototype.clear=obe;o0.prototype.delete=ube;o0.prototype.get=dbe;o0.prototype.has=Obe;o0.prototype.set=mbe;var i4=o0,gbe=200;function vbe(t,e){var n=this.__data__;if(n instanceof n4){var r=n.__data__;if(!Kg||r.length<gbe-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new i4(r)}return n.set(t,e),this.size=n.size,this}var ybe=vbe;function s0(t){var e=this.__data__=new n4(t);this.size=e.size}s0.prototype.clear=Aye;s0.prototype.delete=zye;s0.prototype.get=Mye;s0.prototype.has=Dye;s0.prototype.set=ybe;var A$=s0,bbe="__lodash_hash_undefined__";function _be(t){return this.__data__.set(t,bbe),this}var $be=_be;function Sbe(t){return this.__data__.has(t)}var xbe=Sbe;function j5(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new i4;++e<n;)this.add(t[e])}j5.prototype.add=j5.prototype.push=$be;j5.prototype.has=xbe;var wbe=j5;function kbe(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 Tbe=kbe;function Pbe(t,e){return t.has(e)}var Qbe=Pbe,Ebe=1,Cbe=2;function Rbe(t,e,n,r,i,o){var s=n&Ebe,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&Cbe?new wbe:void 0;for(o.set(t,e),o.set(e,t);++f<a;){var p=t[f],b=e[f];if(r)var y=s?r(b,p,f,e,t,o):r(p,b,f,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(d){if(!Tbe(e,function(O,m){if(!Qbe(d,m)&&(p===O||i(p,O,n,r,o)))return d.push(m)})){h=!1;break}}else if(!(p===b||i(p,b,n,r,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var uG=Rbe,Abe=zf.Uint8Array,_M=Abe;function Ibe(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var zbe=Ibe;function Lbe(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Mbe=Lbe,Nbe=1,Dbe=2,Xbe="[object Boolean]",Wbe="[object Date]",Ube="[object Error]",qbe="[object Map]",Bbe="[object Number]",Fbe="[object RegExp]",Ybe="[object Set]",jbe="[object String]",Zbe="[object Symbol]",Vbe="[object ArrayBuffer]",Gbe="[object DataView]",$M=Fd?Fd.prototype:void 0,Dk=$M?$M.valueOf:void 0;function Hbe(t,e,n,r,i,o,s){switch(n){case Gbe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Vbe:return!(t.byteLength!=e.byteLength||!o(new _M(t),new _M(e)));case Xbe:case Wbe:case Bbe:return cG(+t,+e);case Ube:return t.name==e.name&&t.message==e.message;case Fbe:case jbe:return t==e+"";case qbe:var a=zbe;case Ybe:var l=r&Nbe;if(a||(a=Mbe),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=Dbe,s.set(t,e);var u=uG(a(t),a(e),r,i,o,s);return s.delete(t),u;case Zbe:if(Dk)return Dk.call(t)==Dk.call(e)}return!1}var Kbe=Hbe;function Jbe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var e_e=Jbe;function t_e(t,e,n){var r=e(t);return Pf(t)?r:e_e(r,n(t))}var n_e=t_e;function r_e(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 i_e=r_e;function o_e(){return[]}var s_e=o_e,a_e=Object.prototype,l_e=a_e.propertyIsEnumerable,SM=Object.getOwnPropertySymbols,c_e=SM?function(t){return t==null?[]:(t=Object(t),i_e(SM(t),function(e){return l_e.call(t,e)}))}:s_e,u_e=c_e;function f_e(t){return n_e(t,gE,u_e)}var xM=f_e,d_e=1,h_e=Object.prototype,O_e=h_e.hasOwnProperty;function p_e(t,e,n,r,i,o){var s=n&d_e,a=xM(t),l=a.length,c=xM(e),u=c.length;if(l!=u&&!s)return!1;for(var f=l;f--;){var h=a[f];if(!(s?h in e:O_e.call(e,h)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var b=!0;o.set(t,e),o.set(e,t);for(var y=s;++f<l;){h=a[f];var O=t[h],m=e[h];if(r)var v=s?r(m,O,h,e,t,o):r(O,m,h,t,e,o);if(!(v===void 0?O===m||i(O,m,n,r,o):v)){b=!1;break}y||(y=h=="constructor")}if(b&&!y){var $=t.constructor,S=e.constructor;$!=S&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof S=="function"&&S instanceof S)&&(b=!1)}return o.delete(t),o.delete(e),b}var m_e=p_e,g_e=QO(zf,"DataView"),yQ=g_e,v_e=QO(zf,"Promise"),bQ=v_e,y_e=QO(zf,"Set"),_Q=y_e,b_e=QO(zf,"WeakMap"),$Q=b_e,wM="[object Map]",__e="[object Object]",kM="[object Promise]",TM="[object Set]",PM="[object WeakMap]",QM="[object DataView]",$_e=PO(yQ),S_e=PO(Kg),x_e=PO(bQ),w_e=PO(_Q),k_e=PO($Q),Wh=n0;(yQ&&Wh(new yQ(new ArrayBuffer(1)))!=QM||Kg&&Wh(new Kg)!=wM||bQ&&Wh(bQ.resolve())!=kM||_Q&&Wh(new _Q)!=TM||$Q&&Wh(new $Q)!=PM)&&(Wh=function(t){var e=n0(t),n=e==__e?t.constructor:void 0,r=n?PO(n):"";if(r)switch(r){case $_e:return QM;case S_e:return wM;case x_e:return kM;case w_e:return TM;case k_e:return PM}return e});var EM=Wh,T_e=1,CM="[object Arguments]",RM="[object Array]",Ub="[object Object]",P_e=Object.prototype,AM=P_e.hasOwnProperty;function Q_e(t,e,n,r,i,o){var s=Pf(t),a=Pf(e),l=s?RM:EM(t),c=a?RM:EM(e);l=l==CM?Ub:l,c=c==CM?Ub:c;var u=l==Ub,f=c==Ub,h=l==c;if(h&&vQ(t)){if(!vQ(e))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new A$),s||lG(t)?uG(t,e,n,r,i,o):Kbe(t,e,l,n,r,i,o);if(!(n&T_e)){var d=u&&AM.call(t,"__wrapped__"),p=f&&AM.call(e,"__wrapped__");if(d||p){var b=d?t.value():t,y=p?e.value():e;return o||(o=new A$),i(b,y,n,r,o)}}return h?(o||(o=new A$),m_e(t,e,n,r,i,o)):!1}var E_e=Q_e;function fG(t,e,n,r,i){return t===e?!0:t==null||e==null||!k1(t)&&!k1(e)?t!==t&&e!==e:E_e(t,e,n,r,fG,i)}var dG=fG,C_e=1,R_e=2;function A_e(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 A$;if(r)var h=r(c,u,l,t,e,f);if(!(h===void 0?dG(u,c,C_e|R_e,r,f):h))return!1}}return!0}var I_e=A_e;function z_e(t){return t===t&&!pE(t)}var hG=z_e;function L_e(t){for(var e=gE(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,hG(i)]}return e}var M_e=L_e;function N_e(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var OG=N_e;function D_e(t){var e=M_e(t);return e.length==1&&e[0][2]?OG(e[0][0],e[0][1]):function(n){return n===t||I_e(n,t,e)}}var X_e=D_e,W_e="[object Symbol]";function U_e(t){return typeof t=="symbol"||k1(t)&&n0(t)==W_e}var vE=U_e,q_e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,B_e=/^\w*$/;function F_e(t,e){if(Pf(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||vE(t)?!0:B_e.test(t)||!q_e.test(t)||e!=null&&t in Object(e)}var yE=F_e,Y_e="Expected a function";function bE(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Y_e);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(bE.Cache||i4),n}bE.Cache=i4;var j_e=bE,Z_e=500;function V_e(t){var e=j_e(t,function(r){return n.size===Z_e&&n.clear(),r}),n=e.cache;return e}var G_e=V_e,H_e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K_e=/\\(\\)?/g,J_e=G_e(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(H_e,function(n,r,i,o){e.push(i?o.replace(K_e,"$1"):r||n)}),e}),e$e=J_e;function t$e(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 n$e=t$e,r$e=1/0,IM=Fd?Fd.prototype:void 0,zM=IM?IM.toString:void 0;function pG(t){if(typeof t=="string")return t;if(Pf(t))return n$e(t,pG)+"";if(vE(t))return zM?zM.call(t):"";var e=t+"";return e=="0"&&1/t==-r$e?"-0":e}var i$e=pG;function o$e(t){return t==null?"":i$e(t)}var s$e=o$e;function a$e(t,e){return Pf(t)?t:yE(t,e)?[t]:e$e(s$e(t))}var mG=a$e,l$e=1/0;function c$e(t){if(typeof t=="string"||vE(t))return t;var e=t+"";return e=="0"&&1/t==-l$e?"-0":e}var o4=c$e;function u$e(t,e){e=mG(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[o4(e[n++])];return n&&n==r?t:void 0}var gG=u$e;function f$e(t,e,n){var r=t==null?void 0:gG(t,e);return r===void 0?n:r}var d$e=f$e;function h$e(t,e){return t!=null&&e in Object(t)}var O$e=h$e;function p$e(t,e,n){e=mG(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var s=o4(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&&mE(i)&&aG(s,i)&&(Pf(t)||sG(t)))}var m$e=p$e;function g$e(t,e){return t!=null&&m$e(t,e,O$e)}var v$e=g$e,y$e=1,b$e=2;function _$e(t,e){return yE(t)&&hG(e)?OG(o4(t),e):function(n){var r=d$e(n,t);return r===void 0&&r===e?v$e(n,t):dG(e,r,y$e|b$e)}}var $$e=_$e;function S$e(t){return t}var x$e=S$e;function w$e(t){return function(e){return e==null?void 0:e[t]}}var k$e=w$e;function T$e(t){return function(e){return gG(e,t)}}var P$e=T$e;function Q$e(t){return yE(t)?k$e(o4(t)):P$e(t)}var E$e=Q$e;function C$e(t){return typeof t=="function"?t:t==null?x$e:typeof t=="object"?Pf(t)?$$e(t[0],t[1]):X_e(t):E$e(t)}var R$e=C$e;function A$e(t,e){var n={};return e=R$e(e),gye(t,function(r,i,o){nve(n,i,e(r,i,o))}),n}var I$e=A$e;const s4=(t,e)=>I$e(e,n=>n[t]),_u=Object.create(null);_u.open="0";_u.close="1";_u.ping="2";_u.pong="3";_u.message="4";_u.upgrade="5";_u.noop="6";const I$=Object.create(null);Object.keys(_u).forEach(t=>{I$[_u[t]]=t});const z$e={type:"error",data:"parser error"},L$e=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",M$e=typeof ArrayBuffer=="function",N$e=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,vG=({type:t,data:e},n,r)=>L$e&&e instanceof Blob?n?r(e):LM(e,r):M$e&&(e instanceof ArrayBuffer||N$e(e))?n?r(e):LM(new Blob([e]),r):r(_u[t]+(e||"")),LM=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+r)},n.readAsDataURL(t)},MM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Im=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let t=0;t<MM.length;t++)Im[MM.charCodeAt(t)]=t;const D$e=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=Im[t.charCodeAt(r)],s=Im[t.charCodeAt(r+1)],a=Im[t.charCodeAt(r+2)],l=Im[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},X$e=typeof ArrayBuffer=="function",yG=(t,e)=>{if(typeof t!="string")return{type:"message",data:bG(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:W$e(t.substring(1),e)}:I$[n]?t.length>1?{type:I$[n],data:t.substring(1)}:{type:I$[n]}:z$e},W$e=(t,e)=>{if(X$e){const n=D$e(t);return bG(n,e)}else return{base64:!0,data:t}},bG=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},_G=String.fromCharCode(30),U$e=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{vG(o,!1,a=>{r[s]=a,++i===n&&e(r.join(_G))})})},q$e=(t,e)=>{const n=t.split(_G),r=[];for(let i=0;i<n.length;i++){const o=yG(n[i],e);if(r.push(o),o.type==="error")break}return r},$G=4;function To(t){if(t)return B$e(t)}function B$e(t){for(var e in To.prototype)t[e]=To.prototype[e];return t}To.prototype.on=To.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};To.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};To.prototype.off=To.prototype.removeListener=To.prototype.removeAllListeners=To.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};To.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};To.prototype.emitReserved=To.prototype.emit;To.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};To.prototype.hasListeners=function(t){return!!this.listeners(t).length};const _d=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function SG(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const F$e=setTimeout,Y$e=clearTimeout;function a4(t,e){e.useNativeTimers?(t.setTimeoutFn=F$e.bind(_d),t.clearTimeoutFn=Y$e.bind(_d)):(t.setTimeoutFn=setTimeout.bind(_d),t.clearTimeoutFn=clearTimeout.bind(_d))}const j$e=1.33;function Z$e(t){return typeof t=="string"?V$e(t):Math.ceil((t.byteLength||t.size)*j$e)}function V$e(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 G$e extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class xG extends To{constructor(e){super(),this.writable=!1,a4(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new G$e(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=yG(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const wG="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),SQ=64,H$e={};let NM=0,qb=0,DM;function XM(t){let e="";do e=wG[t%SQ]+e,t=Math.floor(t/SQ);while(t>0);return e}function kG(){const t=XM(+new Date);return t!==DM?(NM=0,DM=t):t+"."+XM(NM++)}for(;qb<SQ;qb++)H$e[wG[qb]]=qb;function TG(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function K$e(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 PG=!1;try{PG=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch{}const J$e=PG;function QG(t){const e=t.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!e||J$e))return new XMLHttpRequest}catch{}if(!e)try{return new _d[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function e5e(){}const t5e=function(){return new QG({xdomain:!1}).responseType!=null}();class n5e extends xG{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=t5e&&!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)};q$e(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,U$e(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]=kG()),!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=TG(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 pu(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 pu extends To{constructor(e,n){super(),a4(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=SG(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 QG(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=pu.requestsCount++,pu.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=e5e,e)try{this.xhr.abort()}catch{}typeof document!="undefined"&&delete pu.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()}}pu.requestsCount=0;pu.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",WM);else if(typeof addEventListener=="function"){const t="onpagehide"in _d?"pagehide":"unload";addEventListener(t,WM,!1)}}function WM(){for(let t in pu.requests)pu.requests.hasOwnProperty(t)&&pu.requests[t].abort()}const r5e=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0))(),Bb=_d.WebSocket||_d.MozWebSocket,UM=!0,i5e="arraybuffer",qM=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class o5e extends xG{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=qM?{}:SG(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=UM&&!qM?n?new Bb(e,n):new Bb(e):new Bb(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||i5e,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;vG(r,this.supportsBinary,o=>{const s={};try{UM&&this.ws.send(o)}catch{}i&&r5e(()=>{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]=kG()),this.supportsBinary||(e.b64=1);const i=TG(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!!Bb}}const s5e={websocket:o5e,polling:n5e},a5e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,l5e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xQ(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=a5e.exec(t||""),o={},s=14;for(;s--;)o[l5e[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=c5e(o,o.path),o.queryKey=u5e(o,o.query),o}function c5e(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 u5e(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class pd extends To{constructor(e,n={}){super(),e&&typeof e=="object"&&(n=e,e=null),e?(e=xQ(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=xQ(n.host).host),a4(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=K$e(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=$G,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 s5e[e](r)}open(){let e;if(this.opts.rememberUpgrade&&pd.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;pd.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;pd.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",pd.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+=Z$e(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){pd.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}}pd.protocol=$G;function f5e(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=xQ(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 d5e=typeof ArrayBuffer=="function",h5e=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,EG=Object.prototype.toString,O5e=typeof Blob=="function"||typeof Blob!="undefined"&&EG.call(Blob)==="[object BlobConstructor]",p5e=typeof File=="function"||typeof File!="undefined"&&EG.call(File)==="[object FileConstructor]";function _E(t){return d5e&&(t instanceof ArrayBuffer||h5e(t))||O5e&&t instanceof Blob||p5e&&t instanceof File}function z$(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(z$(t[n]))return!0;return!1}if(_E(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return z$(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&z$(t[n]))return!0;return!1}function m5e(t){const e=[],n=t.data,r=t;return r.data=wQ(n,e),r.attachments=e.length,{packet:r,buffers:e}}function wQ(t,e){if(!t)return t;if(_E(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]=wQ(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]=wQ(t[r],e));return n}return t}function g5e(t,e){return t.data=kQ(t.data,e),t.attachments=void 0,t}function kQ(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]=kQ(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=kQ(t[n],e));return t}const v5e=5;var kr;(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"})(kr||(kr={}));class y5e{constructor(e){this.replacer=e}encode(e){return(e.type===kr.EVENT||e.type===kr.ACK)&&z$(e)?(e.type=e.type===kr.EVENT?kr.BINARY_EVENT:kr.BINARY_ACK,this.encodeAsBinary(e)):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===kr.BINARY_EVENT||e.type===kr.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=m5e(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class $E extends To{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string")n=this.decodeString(e),n.type===kr.BINARY_EVENT||n.type===kr.BINARY_ACK?(this.reconstructor=new b5e(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n);else if(_E(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(kr[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===kr.BINARY_EVENT||r.type===kr.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($E.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 kr.CONNECT:return typeof n=="object";case kr.DISCONNECT:return n===void 0;case kr.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case kr.EVENT:case kr.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case kr.ACK:case kr.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class b5e{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=g5e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var _5e=Object.freeze(Object.defineProperty({__proto__:null,protocol:v5e,get PacketType(){return kr},Encoder:y5e,Decoder:$E},Symbol.toStringTag,{value:"Module"}));function _c(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const $5e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class CG extends To{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=[_c(e,"open",this.onopen.bind(this)),_c(e,"packet",this.onpacket.bind(this)),_c(e,"error",this.onerror.bind(this)),_c(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($5e.hasOwnProperty(e))throw new Error('"'+e+'" is a reserved event name');n.unshift(e);const r={type:kr.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:kr.CONNECT,data:e})}):this.packet({type:kr.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 kr.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 kr.EVENT:case kr.BINARY_EVENT:this.onevent(e);break;case kr.ACK:case kr.BINARY_ACK:this.onack(e);break;case kr.DISCONNECT:this.ondisconnect();break;case kr.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:kr.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:kr.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 a0(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}a0.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};a0.prototype.reset=function(){this.attempts=0};a0.prototype.setMin=function(t){this.ms=t};a0.prototype.setMax=function(t){this.max=t};a0.prototype.setJitter=function(t){this.jitter=t};class TQ extends To{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,a4(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 a0({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||_5e;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 pd(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=_c(n,"open",function(){r.onopen(),e&&e()}),o=_c(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(_c(e,"ping",this.onping.bind(this)),_c(e,"data",this.ondata.bind(this)),_c(e,"error",this.onerror.bind(this)),_c(e,"close",this.onclose.bind(this)),_c(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 CG(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 K0={};function L$(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=f5e(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=K0[i]&&o in K0[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new TQ(r,e):(K0[i]||(K0[i]=new TQ(r,e)),l=K0[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(L$,{Manager:TQ,Socket:CG,io:L$,connect:L$});var Gt=(t=>(t.InitError="initError",t.Loading="loading",t.Ready="ready",t.Offline="offline",t.Online="online",t.Reconnecting="reconnecting",t.StatusChanged="statusChanged",t.PausePlayback="pausePlayback",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.EditorScroll="editorScroll",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.ReplaceCodeById="replaceCodeById",t.UpdateAreaFlags="updateAreaFlags",t.Debug="debug",t.JumpToAreaById="jumpToAreaById",t.Xterm="xterm",t.ResourceMonitoring="resourceMonitoring",t.AnswerAreaOperate="answerAreaOperate",t.AnswerAreaInfo="answerAreaInfo",t.XtermInfo="xtermInfo",t))(Gt||{}),ji=(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.CloseFile="closeFile",t.EditFile="editFile",t.FileTree="fileTree",t.Terminal="terminal",t.XtermStatus="XtermStatus",t.Cursor="cursor",t.GetPlaybackInfo="getPlaybackInfo",t.LoadPlaybackData="loadPlaybackData",t.FollowingAgentUser="followingAgentUser",t.UnFollowingAgentUser="unFollowingAgentUser",t.FollowingFocusComponent="followingFocusComponent",t.EditorScroll="editorScroll",t.CustomizeFrameData="appendCustomizeFrameData",t.AddCDNSource="addCDNSource",t.RestartServer="restartServer",t.RestartLSPServer="restartLSPServer",t.SwitchLanguage="switchLanguage",t.StatisticsPlaybackData="statisticsPlaybackData",t.ReconnectOnline="reconnectOnline",t))(ji||{}),ht=(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.FileWatchRefreshConfig="fileWatchRefreshConfig",t.ManualRefresh="manualRefresh",t.EditorBlur="editorBlur",t.ForceRefreshFile="forceRefreshFile",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.XtermStatus="XtermStatus",t.Editor="editor",t.Debug="debug",t.KeyEvent="keyEvent",t.CloseFile="closeFile",t.FocusComponent="FocusComponent",t.InvisibleComponentActive="InvisibleComponentActive",t.AppendCustomizeFrameData="appendCustomizeFrameData",t.TerminalStatus="terminalStatus",t.LspServerClientStateChange="lspServerClientStateChange",t.I18nLanguage="i18nLanguage",t.PushFormatCode="pushFormatCode",t.ResourceMonitoring="resourceMonitoring",t.CustomExecute="customExecute",t.SelectedUpdated="selectedUpdated",t.SetBreakPoint="setBreakPoint",t.DebugRun="debugRun",t.StoppedData="stoppedData",t.DebugNext="next",t.DebugContinue="continue",t.DebugStatus="debugStatus",t.DebugStepIn="stepIn",t.DebugStepOut="stepOut",t.Variables="variables",t.UpdateArea="updateArea",t.UpdateDebugSupport="updateDebugSupport",t.SyncDebugData="syncDebugData",t))(ht||{}),ev=(t=>(t.NotSupport="notSupport",t.Loading="loading",t.Running="running",t.Shutdown="shutdown",t.LspReady="lspReady",t.Uninitialized="uninitialized",t))(ev||{});const RG="daoLogger",S5e=typeof module=="object"&&typeof module.exports=="object",Xk=S5e?global:window,AG=Xk&&Xk.localStorage?Xk.localStorage:{store:{},getItem(t){return this.store[t]},setItem(t,e){this.store[t]=e}},bt=Object.keys(console).reduce((t,e)=>(AG.getItem(RG)?t[e]=(...n)=>{var i;(i=console[e])==null||i.call(console,...n);const r=window.customLog;r==null||r(e,n)}:t[e]=function(...n){const r=window.customLog;r==null||r(e,n)},t),{}),x5e=()=>{AG.setItem(RG,"*")};function Pa(t){return Pa=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},Pa(t)}function ra(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BM(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 ia(t,e,n){return e&&BM(t.prototype,e),n&&BM(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Fl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Z5(t,e){return Z5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Z5(t,e)}function lh(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&&Z5(t,e)}function l0(t,e){if(e&&(Pa(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fl(t)}function Gl(t){return Gl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gl(t)}function Xn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function IG(t){if(Array.isArray(t))return t}function zG(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function PQ(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 SE(t,e){if(!!t){if(typeof t=="string")return PQ(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 PQ(t,e)}}function LG(){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 w5e(t){return IG(t)||zG(t)||SE(t)||LG()}function FM(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 YM(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?FM(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):FM(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var k5e={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)}},T5e=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ra(this,t),this.init(e,n)}return ia(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||k5e,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,YM(YM({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}}]),t}(),su=new T5e,Yd=function(){function t(){ra(this,t),this.observers={}}return ia(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 J0(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function jM(t){return t==null?"":""+t}function P5e(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function xE(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 ZM(t,e,n){var r=xE(t,e,Object),i=r.obj,o=r.k;i[o]=n}function Q5e(t,e,n,r){var i=xE(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 V5(t,e){var n=xE(t,e),r=n.obj,i=n.k;if(!!r)return r[i]}function VM(t,e,n){var r=V5(t,n);return r!==void 0?r:V5(e,n)}function MG(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]):MG(t[r],e[r],n):t[r]=e[r]);return t}function np(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E5e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function C5e(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return E5e[e]}):t}var l4=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,R5e=[" ",",","?","!",";"];function A5e(t,e,n){e=e||"",n=n||"";var r=R5e.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 GM(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 Fb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?GM(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GM(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function I5e(t){var e=z5e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(this,i)}}function z5e(){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 NG(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?NG(l,c,n):void 0}i=i[r[o]]}return i}}var L5e=function(t){lh(n,t);var e=I5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return ra(this,n),i=e.call(this),l4&&Yd.call(Fl(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 ia(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=V5(this.data,u);return f||!c||typeof s!="string"?f:NG(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),ZM(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=V5(this.data,u)||{};a?MG(f,s,l):f=Fb(Fb({},f),s),ZM(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"?Fb(Fb({},{}),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}(Yd),DG={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 HM(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 Fs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?HM(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):HM(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function M5e(t){var e=N5e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(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 KM={},JM=function(t){lh(n,t);var e=M5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ra(this,n),i=e.call(this),l4&&Yd.call(Fl(i)),P5e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Fl(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=su.create("translator"),i}return ia(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&&!A5e(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(Pa(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],p=o.lng||this.language,b=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(b){var y=o.nsSeparator||this.options.nsSeparator;return l?(O.res="".concat(d).concat(y).concat(f),O):"".concat(d).concat(y).concat(f)}return l?(O.res=f,O):f}var O=this.resolve(i,o),m=O&&O.res,v=O&&O.usedKey||f,$=O&&O.exactUsedKey||f,S=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,L=typeof m!="string"&&typeof m!="boolean"&&typeof m!="number";if(I&&m&&L&&w.indexOf(S)<0&&!(typeof k=="string"&&S==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,Fs(Fs({},o),{},{ns:h})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(O.res=C,O):C}if(c){var T=S==="[object Array]",E=T?[]:{},N=T?$:v;for(var G in m)if(Object.prototype.hasOwnProperty.call(m,G)){var Z="".concat(N).concat(c).concat(G);E[G]=this.translate(Z,Fs(Fs({},o),{joinArrays:!1,ns:h})),E[G]===Z&&(E[G]=m[G])}m=E}}else if(I&&typeof k=="string"&&S==="[object Array]")m=m.join(k),m&&(m=this.extendTranslation(m,i,o,s));else{var R=!1,W=!1,q=o.count!==void 0&&typeof o.count!="string",K=n.hasDefaultValue(o),re=q?this.pluralResolver.getSuffix(p,o.count,o):"",V=o["defaultValue".concat(re)]||o.defaultValue;!this.isValidLookup(m)&&K&&(R=!0,m=V),this.isValidLookup(m)||(W=!0,m=f);var te=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Qe=te&&W?void 0:m,Ee=K&&V!==m&&this.options.updateMissing;if(W||R||Ee){if(this.logger.log(Ee?"updateKey":"missingKey",p,d,f,Ee?V:m),c){var H=this.resolve(f,Fs(Fs({},o),{},{keySeparator:!1}));H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var $e=[],ne=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ne&&ne[0])for(var ae=0;ae<ne.length;ae++)$e.push(ne[ae]);else this.options.saveMissingTo==="all"?$e=this.languageUtils.toResolveHierarchy(o.lng||this.language):$e.push(o.lng||this.language);var se=function(Be,ze,Ge){var Ot=K&&Ge!==m?Ge:Qe;a.options.missingKeyHandler?a.options.missingKeyHandler(Be,d,ze,Ot,Ee,o):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(Be,d,ze,Ot,Ee,o),a.emit("missingKey",Be,d,ze,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&q?$e.forEach(function(Re){a.pluralResolver.getSuffixes(Re,o).forEach(function(Be){se([Re],f+Be,o["defaultValue".concat(Be)]||V)})}):se($e,f,V))}m=this.extendTranslation(m,i,o,O,s),W&&m===f&&this.options.appendNamespaceToMissingKey&&(m="".concat(d,":").concat(f)),(W||R)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(d,":").concat(f):f,R?m:void 0):m=this.options.parseMissingKeyHandler(m))}return l?(O.res=m,O):m}},{key:"extendTranslation",value:function(i,o,s,a,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,Fs(Fs({},this.options.interpolation.defaultVariables),s),a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init(Fs(Fs({},s),{interpolation:Fs(Fs({},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=Fs(Fs({},this.options.interpolation.defaultVariables),d)),i=this.interpolator.interpolate(i,d,s.lng||this.language,s),u){var p=i.match(this.interpolator.nestingRegexp),b=p&&p.length;f<b&&(s.nest=!1)}s.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var m=arguments.length,v=new Array(m),$=0;$<m;$++)v[$]=arguments[$];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,O=typeof y=="string"?[y]:y;return i!=null&&O&&O.length&&s.applyPostProcessor!==!1&&(i=DG.handle(O,i,o,this.options&&this.options.postProcessPassResolved?Fs({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),p=d.key;l=p;var b=d.namespaces;o.options.fallbackNS&&(b=b.concat(o.options.fallbackNS));var y=s.count!==void 0&&typeof s.count!="string",O=y&&!s.ordinal&&s.count===0&&o.pluralResolver.shouldUseIntlApi(),m=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);b.forEach(function($){o.isValidLookup(a)||(f=$,!KM["".concat(v[0],"-").concat($)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(KM["".concat(v[0],"-").concat($)]=!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(S){if(!o.isValidLookup(a)){u=S;var w=[p];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(w,p,S,$,s);else{var k;y&&(k=o.pluralResolver.getSuffix(S,s.count,s));var I="".concat(o.options.pluralSeparator,"zero");if(y&&(w.push(p+k),O&&w.push(p+I)),m){var L="".concat(p).concat(o.options.contextSeparator).concat(s.context);w.push(L),y&&(w.push(L+k),O&&w.push(L+I))}}for(var C;C=w.pop();)o.isValidLookup(a)||(c=C,a=o.getResource(S,$,C,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}(Yd);function Wk(t){return t.charAt(0).toUpperCase()+t.slice(1)}var D5e=function(){function t(e){ra(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=su.create("languageUtils")}return ia(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]=Wk(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]=Wk(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=Wk(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}(),X5e=[{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}],W5e={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)}},U5e=["v1","v2","v3"],eN={zero:0,one:1,two:2,few:3,many:4,other:5};function q5e(){var t={};return X5e.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:W5e[e.fc]}})}),t}var B5e=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ra(this,t),this.languageUtils=e,this.options=n,this.logger=su.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=q5e()}return ia(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 eN[s]-eN[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!U5e.includes(this.options.compatibilityJSON)}}]),t}();function tN(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 cc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var F5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ra(this,t),this.logger=su.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return ia(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:C5e,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?np(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?np(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?np(r.nestingPrefix):r.nestingPrefixEscaped||np("$t("),this.nestingSuffix=r.nestingSuffix?np(r.nestingSuffix):r.nestingSuffixEscaped||np(")"),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(O){if(O.indexOf(s.formatSeparator)<0){var m=VM(r,u,O);return s.alwaysFormat?s.format(m,void 0,i,cc(cc(cc({},o),r),{},{interpolationkey:O})):m}var v=O.split(s.formatSeparator),$=v.shift().trim(),S=v.join(s.formatSeparator).trim();return s.format(VM(r,u,$),S,i,cc(cc(cc({},o),r),{},{interpolationkey:$}))};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:function(O){return f(O)}},{regex:this.regexp,safeValue:function(O){return s.escapeValue?f(s.escape(O)):f(O)}}];return b.forEach(function(y){for(c=0;a=y.regex.exec(n);){var O=a[1].trim();if(l=h(O),l===void 0)if(typeof d=="function"){var m=d(n,a,o);l=typeof m=="string"?m:""}else if(o&&o.hasOwnProperty(O))l="";else if(p){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(O," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=jM(l));var v=y.safeValue(l);if(n=n.replace(a[0],v),p?(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=cc({},o);l.applyPostProcessor=!1,delete l.defaultValue;function c(d,p){var b=this.nestingOptionsSeparator;if(d.indexOf(b)<0)return d;var y=d.split(new RegExp("".concat(b,"[ ]*{"))),O="{".concat(y[1]);d=y[0],O=this.interpolate(O,l),O=O.replace(/'/g,'"');try{l=JSON.parse(O),p&&(l=cc(cc({},p),l))}catch(m){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),m),"".concat(d).concat(b).concat(O)}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=jM(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),f&&(a=u.reduce(function(d,p){return i.format(d,p,o.lng,cc(cc({},o),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),t}();function nN(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 Gf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Y5e(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=w5e(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 j5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ra(this,t),this.logger=su.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,Gf(Gf({},o),{},{style:"currency"})).format(r)},datetime:function(r,i,o){return new Intl.DateTimeFormat(i,Gf({},o)).format(r)},relativetime:function(r,i,o){return new Intl.RelativeTimeFormat(i,Gf({},o)).format(r,o.range||"day")},list:function(r,i,o){return new Intl.ListFormat(i,Gf({},o)).format(r)}},this.init(e)}return ia(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=Y5e(u),h=f.formatName,d=f.formatOptions;if(s.formats[h]){var p=c;try{var b=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=b.locale||b.lng||o.locale||o.lng||i;p=s.formats[h](c,y,Gf(Gf(Gf({},d),o),b))}catch(O){s.logger.warn(O)}return p}else s.logger.warn("there was no format function for ".concat(h));return c},n);return l}}]),t}();function rN(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 iN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Z5e(t){var e=V5e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(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 G5e(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var H5e=function(t){lh(n,t);var e=Z5e(n);function n(r,i,o){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return ra(this,n),s=e.call(this),l4&&Yd.call(Fl(s)),s.backend=r,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=su.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 ia(n,[{key:"queueLoad",value:function(i,o,s,a){var l=this,c={},u={},f={},h={};return i.forEach(function(d){var p=!0;o.forEach(function(b){var y="".concat(d,"|").concat(b);!s.reload&&l.store.hasResourceBundle(d,b)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?u[y]===void 0&&(u[y]=!0):(l.state[y]=1,p=!1,u[y]===void 0&&(u[y]=!0),c[y]===void 0&&(c[y]=!0),h[b]===void 0&&(h[b]=!0)))}),p||(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){Q5e(f.loaded,[l],c),G5e(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(p){u[h][p]===void 0&&(u[h][p]=!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,iN(iN({},c),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,s,a))}}]),n}(Yd);function K5e(){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(Pa(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),Pa(e[2])==="object"||Pa(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 oN(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 sN(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 qc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function J5e(t){var e=e2e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(this,i)}}function e2e(){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 Yb(){}function t2e(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var G5=function(t){lh(n,t);var e=J5e(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(ra(this,n),r=e.call(this),l4&&Yd.call(Fl(r)),r.options=oN(i),r.services={},r.logger=su,r.modules={external:[]},t2e(Fl(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),l0(r,Fl(r));setTimeout(function(){r.init(i,o)},0)}return r}return ia(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=K5e();this.options=qc(qc(qc({},a),this.options),oN(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=qc(qc({},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(O){return O?typeof O=="function"?new O:O:null}if(!this.options.isClone){this.modules.logger?su.init(l(this.modules.logger),this.options):su.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=j5e);var u=new D5e(this.options);this.store=new L5e(this.options.resources,this.options);var f=this.services;f.logger=su,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new B5e(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 F5e(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new H5e(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(O){for(var m=arguments.length,v=new Array(m>1?m-1:0),$=1;$<m;$++)v[$-1]=arguments[$];i.emit.apply(i,[O].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 JM(this.services,this.options),this.translator.on("*",function(O){for(var m=arguments.length,v=new Array(m>1?m-1:0),$=1;$<m;$++)v[$-1]=arguments[$];i.emit.apply(i,[O].concat(v))}),this.modules.external.forEach(function(O){O.init&&O.init(i)})}if(this.format=this.options.interpolation.format,s||(s=Yb),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(O){i[O]=function(){var m;return(m=i.store)[O].apply(m,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(O){i[O]=function(){var m;return(m=i.store)[O].apply(m,arguments),i}});var b=J0(),y=function(){var m=function($,S){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),b.resolve(S),s($,S)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return m(null,i.t.bind(i));i.changeLanguage(i.options.lng,m)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),b}},{key:"loadResources",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yb,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 p=o.services.languageUtils.toResolveHierarchy(d);p.forEach(function(b){c.indexOf(b)<0&&c.push(b)})}};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=J0();return i||(i=this.languages),o||(o=this.options.ns),s||(s=Yb),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"&&DG.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=J0();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(p){c(p,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(Pa(f)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),b=2;b<d;b++)p[b-2]=arguments[b];h=a.options.overloadTranslationOptionHandler([u,f].concat(p))}else h=qc({},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||".",O=h.keyPrefix?"".concat(h.keyPrefix).concat(y).concat(u):u;return a.t(O,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,p){var b=o.services.backendConnector.state["".concat(d,"|").concat(p)];return b===-1||b===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=J0();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=J0();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]:Yb,a=qc(qc(qc({},this.options),o),{isClone:!0}),l=new n(a),c=["store","services","language"];return c.forEach(function(u){l[u]=i[u]}),l.services=qc({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new JM(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}(Yd);Xn(G5,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new G5(t,e)});var Po=G5.createInstance();Po.createInstance=G5.createInstance;Po.createInstance;Po.init;Po.loadResources;Po.reloadResources;Po.use;Po.changeLanguage;Po.getFixedT;var n2e=Po.t;Po.exists;Po.setDefaultNamespace;Po.hasLoadedNamespace;Po.loadNamespaces;Po.loadLanguages;function T1(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 qo(t,e){if(t==null)return{};var n=T1(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 r2e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,i2e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026"},o2e=function(e){return i2e[e]},s2e=function(e){return e.replace(r2e,o2e)};function aN(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 lN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var QQ={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:s2e},XG,a2e=z.exports.createContext();function l2e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};QQ=lN(lN({},QQ),t)}function c2e(){return QQ}var u2e=function(){function t(){ra(this,t),this.usedNamespaces={}}return ia(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 f2e(t){XG=t}function d2e(){return XG}var h2e={type:"3rdParty",init:function(e){l2e(e.options.react),f2e(e)}};function O2e(){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 cN={};function EQ(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&cN[e[0]]||(typeof e[0]=="string"&&(cN[e[0]]=new Date),O2e.apply(void 0,e))}function uN(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 p2e(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 m2e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return EQ("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}}):p2e(t,e,n)}function g2e(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 zn(t,e){return IG(t)||g2e(t,e)||SE(t,e)||LG()}function fN(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 Uk(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var v2e=function(e,n){var r=z.exports.useRef();return z.exports.useEffect(function(){r.current=n?r.current:e},[e,n]),r.current};function oa(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=z.exports.useContext(a2e)||{},i=r.i18n,o=r.defaultNS,s=n||i||d2e();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new u2e),!s){EQ("You will need to pass in an i18next instance by using initReactI18next");var a=function(L){return Array.isArray(L)?L[L.length-1]:L},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&EQ("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=Uk(Uk(Uk({},c2e()),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(I){return m2e(I,s,c)});function p(){return s.getFixedT(null,c.nsMode==="fallback"?h:h[0],f)}var b=z.exports.useState(p),y=zn(b,2),O=y[0],m=y[1],v=h.join(),$=v2e(v),S=z.exports.useRef(!0);z.exports.useEffect(function(){var I=c.bindI18n,L=c.bindI18nStore;S.current=!0,!d&&!u&&uN(s,h,function(){S.current&&m(p)}),d&&$&&$!==v&&S.current&&m(p);function C(){S.current&&m(p)}return I&&s&&s.on(I,C),L&&s&&s.store.on(L,C),function(){S.current=!1,I&&s&&I.split(" ").forEach(function(T){return s.off(T,C)}),L&&s&&L.split(" ").forEach(function(T){return s.store.off(T,C)})}},[s,v]);var w=z.exports.useRef(!0);z.exports.useEffect(function(){S.current&&!w.current&&m(p),w.current=!1},[s]);var k=[O,s,d];if(k.t=O,k.i18n=s,k.ready=d,d||!d&&!u)return k;throw new Promise(function(I){uN(s,h,function(){I()})})}var y2e={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",editor_pending_update:"{{pendingUpdate}} updates to be written",editor_ot_success:"Success",editor_file_is_not_editable:"The file is not editable",editor_image_preview_failed_to_load_image:"Failed to load image",editor_image_preview_loading:"loading",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",\u56DE\u653E\u5DF2\u6682\u505C:"Playback already pause.",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"Cannot open the file with playback mode.",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_down_file:"Download",file_tree_failed_to_download_file:"Failed to download file",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",file_tree_space_char_exist_in_file_or_folder:"There is a space character",file_tree_file_exceeds_size_limit:"The file {{filePath}} exceeds the size limit of 16M",file_tree_rename_cannot_be_empty:"Rename cannot be empty",output_browser_click_run_start_application:"Click \u3010Run\u3011 to start the application",helpers_invalid_parameter_rate_x:"Invalid parameter: rate={{x}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"The area has already set the answering area and cannot be set repeatedly",lib_x_file_cannot_set_the_answer_area:"The {{x}} file cannot set the answer area",lib_locked:"locked",lib_hidden:"hidden",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",debug_variables:"Variables",debug_call_stack:"Call stack",debug_staring:"staring",debug_tooltip_run:"Run",debug_tooltip_stop:"Stop",debug_tooltip_continue:"Continue",debug_tooltip_step_over:"Step Over",debug_tooltip_step_into:"Step Into",debug_tooltip_step_out:"Step Out",debug_call_stack_cannot_open_file:"Cannot open non-workspace file",dao_paas_cannot_follow_each_other:"Cannot follow each other",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"Cannt copy the content",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"Cannt edit the content",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",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"Pleas go to file tree to select one file and open it",dao_paas_file_does_not_exist:"File does not exist",dao_pass_set_answer_wrong:"Get wrong when insert answer for question",dao_paas_docker_has_been_destoryed:"docker has been destroyed","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","No results":"No results","Collapse the file tree":"Collapse the file tree","Create or rename to hidden files, will not be visible":"Create or rename to hidden files, will not be visible","Live refresh":"Live refresh","Code diagnosis":"Code diagnosis"},b2e={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",editor_pending_update:"{{pendingUpdate}}\u4E2A\u66F4\u65B0\u5F85\u5199\u5165",editor_ot_success:"\u6210\u529F",editor_file_is_not_editable:"\u8BE5\u6587\u4EF6\u4E0D\u53EF\u7F16\u8F91",editor_image_preview_failed_to_load_image:"\u52A0\u8F7D\u56FE\u7247\u5931\u8D25",editor_image_preview_loading:"\u52A0\u8F7D\u4E2D...",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",\u56DE\u653E\u5DF2\u6682\u505C:"\u56DE\u653E\u5DF2\u6682\u505C",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6",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_down_file:"\u4E0B\u8F7D",file_tree_failed_to_download_file:"\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25",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",file_tree_space_char_exist_in_file_or_folder:"\u5B58\u5728\u7A7A\u683C\u5B57\u7B26",file_tree_file_exceeds_size_limit:"\u6587\u4EF6{{filePath}}\u8D85\u51FA\u4E8616M\u7684\u5927\u5C0F\u9650\u5236",file_tree_rename_cannot_be_empty:"\u91CD\u547D\u540D\u4E0D\u80FD\u4E3A\u7A7A",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}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"\u8BE5\u533A\u57DF\u5DF2\u8BBE\u7F6E\u7B54\u9898\u533A\uFF0C\u4E0D\u53EF\u91CD\u590D\u8BBE\u7F6E",lib_x_file_cannot_set_the_answer_area:"{{x}}\u6587\u4EF6\u4E0D\u53EF\u4EE5\u8BBE\u7F6E\u7B54\u9898\u533A",lib_locked:"\u52A0\u9501",lib_hidden:"\u9690\u85CF",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",debug_variables:"\u53D8\u91CF",debug_call_stack:"\u8C03\u7528\u5806\u6808",debug_staring:"\u542F\u52A8\u4E2D",debug_tooltip_run:"\u8FD0\u884C",debug_tooltip_stop:"\u505C\u6B62",debug_tooltip_continue:"\u7EE7\u7EED",debug_tooltip_step_over:"\u5355\u6B65\u8DF3\u8FC7",debug_tooltip_step_into:"\u5355\u6B65\u8C03\u8BD5",debug_tooltip_step_out:"\u5355\u6B65\u8DF3\u51FA",debug_call_stack_cannot_open_file:"\u65E0\u6CD5\u6253\u5F00\u975E\u5DE5\u4F5C\u533A\u6587\u4EF6",dao_paas_cannot_follow_each_other:"\u4E0D\u80FD\u4E92\u76F8\u8DDF\u968F",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91",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",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91",dao_paas_file_does_not_exist:"\u6587\u4EF6\u4E0D\u5B58\u5728",dao_pass_set_answer_wrong:"\u8BBE\u7F6E\u9898\u76EE\u7B54\u6848\u9519\u8BEF",dao_paas_docker_has_been_destoryed:"docker\u5DF2\u7ECF\u88AB\u9500\u6BC1","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","No results":"\u6CA1\u6709\u7ED3\u679C","Collapse the file tree":"\u6536\u8D77\u6587\u4EF6\u6811","Create or rename to hidden files, will not be visible":"\u521B\u5EFA\u6216\u8005\u91CD\u547D\u540D\u4E3A\u9690\u85CF\u6587\u4EF6\uFF0C\u5C06\u4E0D\u53EF\u89C1","Live refresh":"\u5B9E\u65F6\u5237\u65B0","Code diagnosis":"\u4EE3\u7801\u8BCA\u65AD"},H5=(t=>(t.ZH="ZH",t.EN="EN",t))(H5||{});const _2e={EN:{translation:y2e},ZH:{translation:b2e}},$2e="ZH";Po.use(h2e).init({resources:_2e,lng:$2e,keySeparator:!1,interpolation:{escapeValue:!1}});const Bn=Po.t,S2e=[1,2,3,5,8,16];class x2e{constructor(e,n,r,i,o,s,a,l){at(this,"start");at(this,"end");at(this,"totalTime");at(this,"rate");at(this,"preFrameTime",0);at(this,"resumeTime",0);at(this,"dataBuffer",[]);at(this,"playing",!1);at(this,"isReplay",!1);at(this,"index",0);at(this,"firstFrameTime",0);at(this,"isMovePosition",!1);at(this,"preTerminalIndex",{});at(this,"preDebugIndex",{});at(this,"preFireTreeIndex",{});at(this,"preTerminalDockerId","");at(this,"preConsoleDockerId","");at(this,"isStopMovePosition",!1);at(this,"triggerEventForMaxTimespanRecord","");at(this,"triggerEventForMaxTimespan",-1);at(this,"eventCustomize");at(this,"eventDispatcher");at(this,"getPlaybackSnapshot");at(this,"progressDispatcher");at(this,"currentDockerId");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),this.currentDockerId=""}logger(...e){bt.info(`${new Date(Date.now()).toLocaleString()} [Playback]${e.join(",")}`)}convertToAbsoluteTime(e){return this.start+e}getFileRootPathByDockerId(e){const n=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index;for(let r=n;r>=0;r--){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}for(let r=0;r<this.dataBuffer.length;r++){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}}getCurrentDocByPathAndDocker(e,n){const r=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index,i=(o,s)=>{var l;if(this.isEditor(o.eventName)&&o.dockerId===e&&o.data.openedPath===n)return o.snapshot||(o=((l=this.getPlaybackSnapshot)==null?void 0:l.call(this,o.eventName,o,this.getPreFrameByFrame(o,s)))||o),o};for(let o=r;o>=0;o--){const s=this.dataBuffer[o],a=i(s,o);if(a)return a}for(let o=0;o<this.dataBuffer.length;o++){const s=this.dataBuffer[o],a=i(s,o);if(a)return a}}getCurrentFrame(){return this.index>=this.dataBuffer.length?this.dataBuffer[this.dataBuffer.length-1]:this.dataBuffer[this.index]}setRate(e){e&&!S2e.includes(e)&&this.progressDispatcher&&this.progressDispatcher("error",`${Bn("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.logger("Click Pause!"),!this.playing){bt.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.preTerminalIndex={},this.preDebugIndex={},this.preTerminalDockerId="",this.preConsoleDockerId="",xe.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={},this.preDebugIndex={},xe.dao.resetTerminal(),xe.dao.resetConsole(),J.dao.channel().xtermStatus({resetConsole:!0}),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),p=n[d].timestamp;return p===e?d:e===((c=n[d-1])==null?void 0:c.timestamp)?d-1:e===((u=n[d+1])==null?void 0:u.timestamp)?d+1:e>((f=n[d-1])==null?void 0:f.timestamp)&&e<((h=n[d+1])==null?void 0:h.timestamp)?d:(e<p?l=d-1:e>p&&(a=d+1),i(a,l))}else return bt.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.isStopMovePosition?(this.playing=!1,this.isStopMovePosition=!1):(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.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(e.eventName==="customize"&&(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)&&(this.logger(this.index,e.index,e.eventName,e._id),this.index++,this.triggerCustomizeEvent(e)),!this.isStopMovePosition)){this.gotoNextFrame();return}if(this.isMovePosition){this.triggerPreFrames(),this.isMovePosition=!1;return}if(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)){let o=0;const s=this.firstFrameTime+this.resumeTime;for(let a=this.index+1;a<this.dataBuffer.length&&this.dataBuffer[a].timestamp<=s;a++)o++,this.index=a;o>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===ht.Editor}isFileTree(e){return e===ht.FileTree}isTerminal(e){return e===ht.Terminal}isConsole(e){return e===ht.Console}isDebug(e){return e===ht.Debug}isTerminalOrConsole(e){return[ht.Terminal.toString(),ht.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(){var s;const e=[ht.FileTree.toString(),ht.Editor.toString(),ht.Terminal.toString(),ht.Console.toString(),ht.Debug.toString()],n=J.file.doc().openedPath;let r=!1;const i=this.index,o=this.dataBuffer[i].dockerId;this.currentDockerId=o;for(let a=i;a>=0;a--){if(!e.length)return;if(e.includes(this.dataBuffer[a].eventName)&&this.dataBuffer[a].dockerId===this.currentDockerId){const l=this.dataBuffer[a],c=e.findIndex(u=>u===l.eventName);e.splice(c,1),l.eventName===ht.Editor.toString()&&!r&&n!==l.data.openedPath&&(J.file.editorView()&&((s=J.file.editorView())==null||s.destroy(),xe.file.editorView(void 0),bt.log("%c[Editor]: unmount","color: red")),xe.file.resetFile(),r=!0),l.snapshot||this.setSnapshotByIndex(a),this.trigger(l.eventName,l,!1)}}e.forEach(a=>{this.logger("trigger reset eventName:",a),this.trigger(a,null,!1)})}trigger(e,n,r=!0){if(e==="customize"){this.logger(this.index,e,n==null?void 0:n._id),this.triggerCustomizeEvent(n),r&&this.index++;return}const i=this.isTerminalOrConsole(e),o=this.isDebug(e);if(!i&&!o){this.logger(this.index,e,n==null?void 0:n._id),this.eventDispatcher(e,n),r&&this.index++;return}const s=n==null?void 0:n.dockerId;this.logger("[TR]",s);const a=this.preTerminalIndex[s]||0,l=this.preDebugIndex[s]||0,c=o?l:a;for(let u=c+1;u<=this.index;u++){const f=this.dataBuffer[u];f&&(this.isTerminalOrConsole(f.eventName)||o)&&f.dockerId===s&&(this.logger("[TR]",u,this.index,f.eventName,this.dataBuffer[u].dockerId,this.dataBuffer[u]._id),this.isTerminal(e)&&(this.preTerminalDockerId&&this.preTerminalDockerId!==s&&xe.dao.resetTerminal(),this.preTerminalDockerId=s),this.isConsole(e)&&(this.preConsoleDockerId&&this.preConsoleDockerId!==s&&(xe.dao.resetConsole(),J.dao.channel().xtermStatus({resetConsole:!0})),this.preConsoleDockerId=s),this.eventDispatcher(f.eventName,f))}o?this.preDebugIndex[s]=this.index:this.preTerminalIndex[s]=this.index,r&&this.index++}}const w2e="@dao42/d42paas-front",k2e="0.9.149",T2e="d42paas front",P2e="dao42 paas team",Q2e="https://github.com/dao42/d42paas_frontend#readme",E2e="UNLICENSED",C2e="./dist/DaoPaaS.cjs",R2e="./dist/DaoPaaS.cjs",A2e="./dist/DaoPaaS.d.ts",I2e={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",test1:"jest --coverage",test:"jest",prepublish:"pnpm build",publish:"npm publish --access public"},z2e={"@babel/core":"7.4.5","@babel/preset-env":"7.4.5","@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.5.0","@codemirror/legacy-modes":"^6.0.0","@codemirror/lint":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.2.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.8.1","@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.9.3","@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","@testing-library/user-event":"^14.4.3","@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.debounce":"^4.0.7","@types/lodash.isequal":"^4.5.6","@types/lodash.throttle":"^4.1.7","@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/testing-library__jest-dom":"^5.14.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","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-gfm":"^3.0.1","remark-math":"^5.1.1","remark-parse":"^10.0.1","remark-rehype":"^10.1.0",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.9.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.9.15","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"},L2e=["dist"],M2e={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},N2e={url:"https://github.com/dao42/d42paas_frontend/issues"},D2e={workerDirectory:"src"},X2e={"@babel/plugin-transform-modules-commonjs":"^7.18.2","babel-jest":"^29.3.1","babel-preset-react-app":"^10.0.1","codemirror-lang-elixir":"^3.0.0","detect-indent":"^7.0.1",i18next:"^21.8.16","jest-websocket-mock":"^2.4.0",lib0:"^0.2.58","lodash.clonedeep":"^4.5.0","lodash.debounce":"^4.0.8","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1",minimatch:"^5.1.0","range-analyzer":"0.1.1-alpha.2","rc-dropdown":"^4.0.1","rc-menu":"^9.6.3","react-app-polyfill":"^3.0.0","react-i18next":"11.18.3","socket.io":"^4.5.1","socket.io-mock":"^1.3.2","socket.io-msgpack-parser":"^3.0.1","xterm-addon-web-links":"^0.6.0"};var W2e={name:w2e,version:k2e,description:T2e,author:P2e,homepage:Q2e,license:E2e,main:C2e,module:R2e,types:A2e,scripts:I2e,devDependencies:z2e,files:L2e,repository:M2e,bugs:N2e,msw:D2e,dependencies:X2e};const U2e=()=>W2e.version,q2e=async(t,e,n)=>{const r=window.localStorage.getItem("__paas__testServerCode__"),i=r?{serverCode:r}:{};return new Promise((o,s)=>{fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:n,...i})}).then(a=>a.json()).then(a=>{o(a)}).catch(a=>{s(a)})})},WG=(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})`},B2e=()=>{const t=`
49
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w5e(t){return IG(t)||zG(t)||SE(t)||LG()}function FM(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 YM(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?FM(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):FM(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var k5e={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)}},T5e=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ra(this,t),this.init(e,n)}return ia(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||k5e,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,YM(YM({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}}]),t}(),su=new T5e,Yd=function(){function t(){ra(this,t),this.observers={}}return ia(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 J0(){var t,e,n=new Promise(function(r,i){t=r,e=i});return n.resolve=t,n.reject=e,n}function jM(t){return t==null?"":""+t}function P5e(t,e,n){t.forEach(function(r){e[r]&&(n[r]=e[r])})}function xE(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 ZM(t,e,n){var r=xE(t,e,Object),i=r.obj,o=r.k;i[o]=n}function Q5e(t,e,n,r){var i=xE(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 V5(t,e){var n=xE(t,e),r=n.obj,i=n.k;if(!!r)return r[i]}function VM(t,e,n){var r=V5(t,n);return r!==void 0?r:V5(e,n)}function MG(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]):MG(t[r],e[r],n):t[r]=e[r]);return t}function np(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var E5e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function C5e(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return E5e[e]}):t}var l4=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,R5e=[" ",",","?","!",";"];function A5e(t,e,n){e=e||"",n=n||"";var r=R5e.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 GM(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 Fb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?GM(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):GM(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function I5e(t){var e=z5e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(this,i)}}function z5e(){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 NG(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?NG(l,c,n):void 0}i=i[r[o]]}return i}}var L5e=function(t){lh(n,t);var e=I5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return ra(this,n),i=e.call(this),l4&&Yd.call(Fl(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 ia(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=V5(this.data,u);return f||!c||typeof s!="string"?f:NG(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),ZM(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=V5(this.data,u)||{};a?MG(f,s,l):f=Fb(Fb({},f),s),ZM(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"?Fb(Fb({},{}),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}(Yd),DG={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 HM(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 Fs(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?HM(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):HM(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function M5e(t){var e=N5e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(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 KM={},JM=function(t){lh(n,t);var e=M5e(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ra(this,n),i=e.call(this),l4&&Yd.call(Fl(i)),P5e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Fl(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=su.create("translator"),i}return ia(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&&!A5e(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(Pa(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],p=o.lng||this.language,b=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&p.toLowerCase()==="cimode"){if(b){var y=o.nsSeparator||this.options.nsSeparator;return l?(O.res="".concat(d).concat(y).concat(f),O):"".concat(d).concat(y).concat(f)}return l?(O.res=f,O):f}var O=this.resolve(i,o),m=O&&O.res,v=O&&O.usedKey||f,$=O&&O.exactUsedKey||f,S=Object.prototype.toString.apply(m),w=["[object Number]","[object Function]","[object RegExp]"],k=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,I=!this.i18nFormat||this.i18nFormat.handleAsObject,L=typeof m!="string"&&typeof m!="boolean"&&typeof m!="number";if(I&&m&&L&&w.indexOf(S)<0&&!(typeof k=="string"&&S==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,m,Fs(Fs({},o),{},{ns:h})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(O.res=C,O):C}if(c){var T=S==="[object Array]",E=T?[]:{},N=T?$:v;for(var G in m)if(Object.prototype.hasOwnProperty.call(m,G)){var Z="".concat(N).concat(c).concat(G);E[G]=this.translate(Z,Fs(Fs({},o),{joinArrays:!1,ns:h})),E[G]===Z&&(E[G]=m[G])}m=E}}else if(I&&typeof k=="string"&&S==="[object Array]")m=m.join(k),m&&(m=this.extendTranslation(m,i,o,s));else{var R=!1,W=!1,q=o.count!==void 0&&typeof o.count!="string",K=n.hasDefaultValue(o),re=q?this.pluralResolver.getSuffix(p,o.count,o):"",V=o["defaultValue".concat(re)]||o.defaultValue;!this.isValidLookup(m)&&K&&(R=!0,m=V),this.isValidLookup(m)||(W=!0,m=f);var te=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Qe=te&&W?void 0:m,Ee=K&&V!==m&&this.options.updateMissing;if(W||R||Ee){if(this.logger.log(Ee?"updateKey":"missingKey",p,d,f,Ee?V:m),c){var H=this.resolve(f,Fs(Fs({},o),{},{keySeparator:!1}));H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var $e=[],ne=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ne&&ne[0])for(var ae=0;ae<ne.length;ae++)$e.push(ne[ae]);else this.options.saveMissingTo==="all"?$e=this.languageUtils.toResolveHierarchy(o.lng||this.language):$e.push(o.lng||this.language);var se=function(Be,ze,Ge){var Ot=K&&Ge!==m?Ge:Qe;a.options.missingKeyHandler?a.options.missingKeyHandler(Be,d,ze,Ot,Ee,o):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(Be,d,ze,Ot,Ee,o),a.emit("missingKey",Be,d,ze,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&q?$e.forEach(function(Re){a.pluralResolver.getSuffixes(Re,o).forEach(function(Be){se([Re],f+Be,o["defaultValue".concat(Be)]||V)})}):se($e,f,V))}m=this.extendTranslation(m,i,o,O,s),W&&m===f&&this.options.appendNamespaceToMissingKey&&(m="".concat(d,":").concat(f)),(W||R)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(d,":").concat(f):f,R?m:void 0):m=this.options.parseMissingKeyHandler(m))}return l?(O.res=m,O):m}},{key:"extendTranslation",value:function(i,o,s,a,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,Fs(Fs({},this.options.interpolation.defaultVariables),s),a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init(Fs(Fs({},s),{interpolation:Fs(Fs({},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=Fs(Fs({},this.options.interpolation.defaultVariables),d)),i=this.interpolator.interpolate(i,d,s.lng||this.language,s),u){var p=i.match(this.interpolator.nestingRegexp),b=p&&p.length;f<b&&(s.nest=!1)}s.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var m=arguments.length,v=new Array(m),$=0;$<m;$++)v[$]=arguments[$];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,O=typeof y=="string"?[y]:y;return i!=null&&O&&O.length&&s.applyPostProcessor!==!1&&(i=DG.handle(O,i,o,this.options&&this.options.postProcessPassResolved?Fs({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),p=d.key;l=p;var b=d.namespaces;o.options.fallbackNS&&(b=b.concat(o.options.fallbackNS));var y=s.count!==void 0&&typeof s.count!="string",O=y&&!s.ordinal&&s.count===0&&o.pluralResolver.shouldUseIntlApi(),m=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);b.forEach(function($){o.isValidLookup(a)||(f=$,!KM["".concat(v[0],"-").concat($)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(KM["".concat(v[0],"-").concat($)]=!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(S){if(!o.isValidLookup(a)){u=S;var w=[p];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(w,p,S,$,s);else{var k;y&&(k=o.pluralResolver.getSuffix(S,s.count,s));var I="".concat(o.options.pluralSeparator,"zero");if(y&&(w.push(p+k),O&&w.push(p+I)),m){var L="".concat(p).concat(o.options.contextSeparator).concat(s.context);w.push(L),y&&(w.push(L+k),O&&w.push(L+I))}}for(var C;C=w.pop();)o.isValidLookup(a)||(c=C,a=o.getResource(S,$,C,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}(Yd);function Wk(t){return t.charAt(0).toUpperCase()+t.slice(1)}var D5e=function(){function t(e){ra(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=su.create("languageUtils")}return ia(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]=Wk(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]=Wk(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=Wk(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}(),X5e=[{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}],W5e={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)}},U5e=["v1","v2","v3"],eN={zero:0,one:1,two:2,few:3,many:4,other:5};function q5e(){var t={};return X5e.forEach(function(e){e.lngs.forEach(function(n){t[n]={numbers:e.nr,plurals:W5e[e.fc]}})}),t}var B5e=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ra(this,t),this.languageUtils=e,this.options=n,this.logger=su.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=q5e()}return ia(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 eN[s]-eN[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!U5e.includes(this.options.compatibilityJSON)}}]),t}();function tN(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 cc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var F5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ra(this,t),this.logger=su.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(n){return n},this.init(e)}return ia(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:C5e,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?np(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?np(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?np(r.nestingPrefix):r.nestingPrefixEscaped||np("$t("),this.nestingSuffix=r.nestingSuffix?np(r.nestingSuffix):r.nestingSuffixEscaped||np(")"),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(O){if(O.indexOf(s.formatSeparator)<0){var m=VM(r,u,O);return s.alwaysFormat?s.format(m,void 0,i,cc(cc(cc({},o),r),{},{interpolationkey:O})):m}var v=O.split(s.formatSeparator),$=v.shift().trim(),S=v.join(s.formatSeparator).trim();return s.format(VM(r,u,$),S,i,cc(cc(cc({},o),r),{},{interpolationkey:$}))};this.resetRegExp();var d=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,p=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,b=[{regex:this.regexpUnescape,safeValue:function(O){return f(O)}},{regex:this.regexp,safeValue:function(O){return s.escapeValue?f(s.escape(O)):f(O)}}];return b.forEach(function(y){for(c=0;a=y.regex.exec(n);){var O=a[1].trim();if(l=h(O),l===void 0)if(typeof d=="function"){var m=d(n,a,o);l=typeof m=="string"?m:""}else if(o&&o.hasOwnProperty(O))l="";else if(p){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(O," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=jM(l));var v=y.safeValue(l);if(n=n.replace(a[0],v),p?(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=cc({},o);l.applyPostProcessor=!1,delete l.defaultValue;function c(d,p){var b=this.nestingOptionsSeparator;if(d.indexOf(b)<0)return d;var y=d.split(new RegExp("".concat(b,"[ ]*{"))),O="{".concat(y[1]);d=y[0],O=this.interpolate(O,l),O=O.replace(/'/g,'"');try{l=JSON.parse(O),p&&(l=cc(cc({},p),l))}catch(m){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),m),"".concat(d).concat(b).concat(O)}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=jM(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),f&&(a=u.reduce(function(d,p){return i.format(d,p,o.lng,cc(cc({},o),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),t}();function nN(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 Gf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Y5e(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=w5e(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 j5e=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ra(this,t),this.logger=su.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,Gf(Gf({},o),{},{style:"currency"})).format(r)},datetime:function(r,i,o){return new Intl.DateTimeFormat(i,Gf({},o)).format(r)},relativetime:function(r,i,o){return new Intl.RelativeTimeFormat(i,Gf({},o)).format(r,o.range||"day")},list:function(r,i,o){return new Intl.ListFormat(i,Gf({},o)).format(r)}},this.init(e)}return ia(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=Y5e(u),h=f.formatName,d=f.formatOptions;if(s.formats[h]){var p=c;try{var b=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=b.locale||b.lng||o.locale||o.lng||i;p=s.formats[h](c,y,Gf(Gf(Gf({},d),o),b))}catch(O){s.logger.warn(O)}return p}else s.logger.warn("there was no format function for ".concat(h));return c},n);return l}}]),t}();function rN(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 iN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Z5e(t){var e=V5e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(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 G5e(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}var H5e=function(t){lh(n,t);var e=Z5e(n);function n(r,i,o){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return ra(this,n),s=e.call(this),l4&&Yd.call(Fl(s)),s.backend=r,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=su.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 ia(n,[{key:"queueLoad",value:function(i,o,s,a){var l=this,c={},u={},f={},h={};return i.forEach(function(d){var p=!0;o.forEach(function(b){var y="".concat(d,"|").concat(b);!s.reload&&l.store.hasResourceBundle(d,b)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?u[y]===void 0&&(u[y]=!0):(l.state[y]=1,p=!1,u[y]===void 0&&(u[y]=!0),c[y]===void 0&&(c[y]=!0),h[b]===void 0&&(h[b]=!0)))}),p||(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){Q5e(f.loaded,[l],c),G5e(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(p){u[h][p]===void 0&&(u[h][p]=!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,iN(iN({},c),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,s,a))}}]),n}(Yd);function K5e(){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(Pa(e[1])==="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),Pa(e[2])==="object"||Pa(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 oN(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 sN(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 qc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function J5e(t){var e=e2e();return function(){var r=Gl(t),i;if(e){var o=Gl(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return l0(this,i)}}function e2e(){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 Yb(){}function t2e(t){var e=Object.getOwnPropertyNames(Object.getPrototypeOf(t));e.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var G5=function(t){lh(n,t);var e=J5e(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(ra(this,n),r=e.call(this),l4&&Yd.call(Fl(r)),r.options=oN(i),r.services={},r.logger=su,r.modules={external:[]},t2e(Fl(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),l0(r,Fl(r));setTimeout(function(){r.init(i,o)},0)}return r}return ia(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=K5e();this.options=qc(qc(qc({},a),this.options),oN(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=qc(qc({},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(O){return O?typeof O=="function"?new O:O:null}if(!this.options.isClone){this.modules.logger?su.init(l(this.modules.logger),this.options):su.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=j5e);var u=new D5e(this.options);this.store=new L5e(this.options.resources,this.options);var f=this.services;f.logger=su,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new B5e(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 F5e(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new H5e(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(O){for(var m=arguments.length,v=new Array(m>1?m-1:0),$=1;$<m;$++)v[$-1]=arguments[$];i.emit.apply(i,[O].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 JM(this.services,this.options),this.translator.on("*",function(O){for(var m=arguments.length,v=new Array(m>1?m-1:0),$=1;$<m;$++)v[$-1]=arguments[$];i.emit.apply(i,[O].concat(v))}),this.modules.external.forEach(function(O){O.init&&O.init(i)})}if(this.format=this.options.interpolation.format,s||(s=Yb),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(O){i[O]=function(){var m;return(m=i.store)[O].apply(m,arguments)}});var p=["addResource","addResources","addResourceBundle","removeResourceBundle"];p.forEach(function(O){i[O]=function(){var m;return(m=i.store)[O].apply(m,arguments),i}});var b=J0(),y=function(){var m=function($,S){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),b.resolve(S),s($,S)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return m(null,i.t.bind(i));i.changeLanguage(i.options.lng,m)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),b}},{key:"loadResources",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yb,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 p=o.services.languageUtils.toResolveHierarchy(d);p.forEach(function(b){c.indexOf(b)<0&&c.push(b)})}};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=J0();return i||(i=this.languages),o||(o=this.options.ns),s||(s=Yb),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"&&DG.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=J0();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(p){c(p,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(Pa(f)!=="object"){for(var d=arguments.length,p=new Array(d>2?d-2:0),b=2;b<d;b++)p[b-2]=arguments[b];h=a.options.overloadTranslationOptionHandler([u,f].concat(p))}else h=qc({},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||".",O=h.keyPrefix?"".concat(h.keyPrefix).concat(y).concat(u):u;return a.t(O,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,p){var b=o.services.backendConnector.state["".concat(d,"|").concat(p)];return b===-1||b===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=J0();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=J0();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]:Yb,a=qc(qc(qc({},this.options),o),{isClone:!0}),l=new n(a),c=["store","services","language"];return c.forEach(function(u){l[u]=i[u]}),l.services=qc({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new JM(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}(Yd);Xn(G5,"createInstance",function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new G5(t,e)});var Po=G5.createInstance();Po.createInstance=G5.createInstance;Po.createInstance;Po.init;Po.loadResources;Po.reloadResources;Po.use;Po.changeLanguage;Po.getFixedT;var n2e=Po.t;Po.exists;Po.setDefaultNamespace;Po.hasLoadedNamespace;Po.loadNamespaces;Po.loadLanguages;function T1(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 qo(t,e){if(t==null)return{};var n=T1(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 r2e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230);/g,i2e={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026"},o2e=function(e){return i2e[e]},s2e=function(e){return e.replace(r2e,o2e)};function aN(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 lN(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?aN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):aN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var QQ={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:s2e},XG,a2e=z.exports.createContext();function l2e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};QQ=lN(lN({},QQ),t)}function c2e(){return QQ}var u2e=function(){function t(){ra(this,t),this.usedNamespaces={}}return ia(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 f2e(t){XG=t}function d2e(){return XG}var h2e={type:"3rdParty",init:function(e){l2e(e.options.react),f2e(e)}};function O2e(){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 cN={};function EQ(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&cN[e[0]]||(typeof e[0]=="string"&&(cN[e[0]]=new Date),O2e.apply(void 0,e))}function uN(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 p2e(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 m2e(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e.languages||!e.languages.length)return EQ("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}}):p2e(t,e,n)}function g2e(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 zn(t,e){return IG(t)||g2e(t,e)||SE(t,e)||LG()}function fN(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 Uk(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fN(Object(n),!0).forEach(function(r){Xn(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fN(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var v2e=function(e,n){var r=z.exports.useRef();return z.exports.useEffect(function(){r.current=n?r.current:e},[e,n]),r.current};function oa(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.i18n,r=z.exports.useContext(a2e)||{},i=r.i18n,o=r.defaultNS,s=n||i||d2e();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new u2e),!s){EQ("You will need to pass in an i18next instance by using initReactI18next");var a=function(L){return Array.isArray(L)?L[L.length-1]:L},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&EQ("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=Uk(Uk(Uk({},c2e()),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(I){return m2e(I,s,c)});function p(){return s.getFixedT(null,c.nsMode==="fallback"?h:h[0],f)}var b=z.exports.useState(p),y=zn(b,2),O=y[0],m=y[1],v=h.join(),$=v2e(v),S=z.exports.useRef(!0);z.exports.useEffect(function(){var I=c.bindI18n,L=c.bindI18nStore;S.current=!0,!d&&!u&&uN(s,h,function(){S.current&&m(p)}),d&&$&&$!==v&&S.current&&m(p);function C(){S.current&&m(p)}return I&&s&&s.on(I,C),L&&s&&s.store.on(L,C),function(){S.current=!1,I&&s&&I.split(" ").forEach(function(T){return s.off(T,C)}),L&&s&&L.split(" ").forEach(function(T){return s.store.off(T,C)})}},[s,v]);var w=z.exports.useRef(!0);z.exports.useEffect(function(){S.current&&!w.current&&m(p),w.current=!1},[s]);var k=[O,s,d];if(k.t=O,k.i18n=s,k.ready=d,d||!d&&!u)return k;throw new Promise(function(I){uN(s,h,function(){I()})})}var y2e={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",editor_pending_update:"{{pendingUpdate}} updates to be written",editor_ot_success:"Success",editor_file_is_not_editable:"The file is not editable",editor_image_preview_failed_to_load_image:"Failed to load image",editor_image_preview_loading:"loading",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",\u56DE\u653E\u5DF2\u6682\u505C:"Playback already pause.",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"Cannot open the file with playback mode.",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_down_file:"Download",file_tree_failed_to_download_file:"Failed to download file",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",file_tree_space_char_exist_in_file_or_folder:"There is a space character",file_tree_file_exceeds_size_limit:"The file {{filePath}} exceeds the size limit of 16M",file_tree_rename_cannot_be_empty:"Rename cannot be empty",output_browser_click_run_start_application:"Click \u3010Run\u3011 to start the application",helpers_invalid_parameter_rate_x:"Invalid parameter: rate={{x}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"The area has already set the answering area and cannot be set repeatedly",lib_x_file_cannot_set_the_answer_area:"The {{x}} file cannot set the answer area",lib_locked:"locked",lib_hidden:"hidden",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",debug_variables:"Variables",debug_call_stack:"Call stack",debug_staring:"staring",debug_tooltip_run:"Run",debug_tooltip_stop:"Stop",debug_tooltip_continue:"Continue",debug_tooltip_step_over:"Step Over",debug_tooltip_step_into:"Step Into",debug_tooltip_step_out:"Step Out",debug_call_stack_cannot_open_file:"Cannot open non-workspace file",dao_paas_cannot_follow_each_other:"Cannot follow each other",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"Cannt copy the content",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"Cannt edit the content",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",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"Pleas go to file tree to select one file and open it",dao_paas_file_does_not_exist:"File does not exist",dao_pass_set_answer_wrong:"Get wrong when insert answer for question",dao_paas_docker_has_been_destoryed:"docker has been destroyed","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","No results":"No results","Collapse the file tree":"Collapse the file tree","Create or rename to hidden files, will not be visible":"Create or rename to hidden files, will not be visible","Live refresh":"Live refresh","Code diagnosis":"Code diagnosis"},b2e={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",editor_pending_update:"{{pendingUpdate}}\u4E2A\u66F4\u65B0\u5F85\u5199\u5165",editor_ot_success:"\u6210\u529F",editor_file_is_not_editable:"\u8BE5\u6587\u4EF6\u4E0D\u53EF\u7F16\u8F91",editor_image_preview_failed_to_load_image:"\u52A0\u8F7D\u56FE\u7247\u5931\u8D25",editor_image_preview_loading:"\u52A0\u8F7D\u4E2D...",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",\u56DE\u653E\u5DF2\u6682\u505C:"\u56DE\u653E\u5DF2\u6682\u505C",\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6:"\u56DE\u653E\u6A21\u5F0F\u4E0D\u652F\u6301\u6253\u5F00\u8BE5\u6587\u4EF6",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_down_file:"\u4E0B\u8F7D",file_tree_failed_to_download_file:"\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25",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",file_tree_space_char_exist_in_file_or_folder:"\u5B58\u5728\u7A7A\u683C\u5B57\u7B26",file_tree_file_exceeds_size_limit:"\u6587\u4EF6{{filePath}}\u8D85\u51FA\u4E8616M\u7684\u5927\u5C0F\u9650\u5236",file_tree_rename_cannot_be_empty:"\u91CD\u547D\u540D\u4E0D\u80FD\u4E3A\u7A7A",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}}",lib_the_area_already_set_answer_area_cannot_repeatedly:"\u8BE5\u533A\u57DF\u5DF2\u8BBE\u7F6E\u7B54\u9898\u533A\uFF0C\u4E0D\u53EF\u91CD\u590D\u8BBE\u7F6E",lib_x_file_cannot_set_the_answer_area:"{{x}}\u6587\u4EF6\u4E0D\u53EF\u4EE5\u8BBE\u7F6E\u7B54\u9898\u533A",lib_locked:"\u52A0\u9501",lib_hidden:"\u9690\u85CF",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",debug_variables:"\u53D8\u91CF",debug_call_stack:"\u8C03\u7528\u5806\u6808",debug_staring:"\u542F\u52A8\u4E2D",debug_tooltip_run:"\u8FD0\u884C",debug_tooltip_stop:"\u505C\u6B62",debug_tooltip_continue:"\u7EE7\u7EED",debug_tooltip_step_over:"\u5355\u6B65\u8DF3\u8FC7",debug_tooltip_step_into:"\u5355\u6B65\u8C03\u8BD5",debug_tooltip_step_out:"\u5355\u6B65\u8DF3\u51FA",debug_call_stack_cannot_open_file:"\u65E0\u6CD5\u6253\u5F00\u975E\u5DE5\u4F5C\u533A\u6587\u4EF6",dao_paas_cannot_follow_each_other:"\u4E0D\u80FD\u4E92\u76F8\u8DDF\u968F",\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9:"\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9",\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91:"\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91",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",\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91:"\u8BF7\u5728\u6587\u4EF6\u6811\u4E2D\u6253\u5F00\u6587\u4EF6\u8FDB\u884C\u7F16\u8F91",dao_paas_file_does_not_exist:"\u6587\u4EF6\u4E0D\u5B58\u5728",dao_pass_set_answer_wrong:"\u8BBE\u7F6E\u9898\u76EE\u7B54\u6848\u9519\u8BEF",dao_paas_docker_has_been_destoryed:"docker\u5DF2\u7ECF\u88AB\u9500\u6BC1","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","No results":"\u6CA1\u6709\u7ED3\u679C","Collapse the file tree":"\u6536\u8D77\u6587\u4EF6\u6811","Create or rename to hidden files, will not be visible":"\u521B\u5EFA\u6216\u8005\u91CD\u547D\u540D\u4E3A\u9690\u85CF\u6587\u4EF6\uFF0C\u5C06\u4E0D\u53EF\u89C1","Live refresh":"\u5B9E\u65F6\u5237\u65B0","Code diagnosis":"\u4EE3\u7801\u8BCA\u65AD"},H5=(t=>(t.ZH="ZH",t.EN="EN",t))(H5||{});const _2e={EN:{translation:y2e},ZH:{translation:b2e}},$2e="ZH";Po.use(h2e).init({resources:_2e,lng:$2e,keySeparator:!1,interpolation:{escapeValue:!1}});const Bn=Po.t,S2e=[1,2,3,5,8,16];class x2e{constructor(e,n,r,i,o,s,a,l){at(this,"start");at(this,"end");at(this,"totalTime");at(this,"rate");at(this,"preFrameTime",0);at(this,"resumeTime",0);at(this,"dataBuffer",[]);at(this,"playing",!1);at(this,"isReplay",!1);at(this,"index",0);at(this,"firstFrameTime",0);at(this,"isMovePosition",!1);at(this,"preTerminalIndex",{});at(this,"preDebugIndex",{});at(this,"preFireTreeIndex",{});at(this,"preTerminalDockerId","");at(this,"preConsoleDockerId","");at(this,"isStopMovePosition",!1);at(this,"triggerEventForMaxTimespanRecord","");at(this,"triggerEventForMaxTimespan",-1);at(this,"eventCustomize");at(this,"eventDispatcher");at(this,"getPlaybackSnapshot");at(this,"progressDispatcher");at(this,"currentDockerId");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),this.currentDockerId=""}logger(...e){bt.info(`${new Date(Date.now()).toLocaleString()} [Playback]${e.join(",")}`)}convertToAbsoluteTime(e){return this.start+e}getFileRootPathByDockerId(e){const n=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index;for(let r=n;r>=0;r--){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}for(let r=0;r<this.dataBuffer.length;r++){const i=this.dataBuffer[r];if(this.isFileTree(i.eventName)&&i.dockerId===e&&i.data.fileRootPath)return i.data.fileRootPath}}getCurrentDocByPathAndDocker(e,n){const r=this.index>=this.dataBuffer.length?this.dataBuffer.length-1:this.index,i=(o,s)=>{var l;if(this.isEditor(o.eventName)&&o.dockerId===e&&o.data.openedPath===n)return o.snapshot||(o=((l=this.getPlaybackSnapshot)==null?void 0:l.call(this,o.eventName,o,this.getPreFrameByFrame(o,s)))||o),o};for(let o=r;o>=0;o--){const s=this.dataBuffer[o],a=i(s,o);if(a)return a}for(let o=0;o<this.dataBuffer.length;o++){const s=this.dataBuffer[o],a=i(s,o);if(a)return a}}getCurrentFrame(){return this.index>=this.dataBuffer.length?this.dataBuffer[this.dataBuffer.length-1]:this.dataBuffer[this.index]}setRate(e){e&&!S2e.includes(e)&&this.progressDispatcher&&this.progressDispatcher("error",`${Bn("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.logger("Click Pause!"),!this.playing){bt.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.preTerminalIndex={},this.preDebugIndex={},this.preTerminalDockerId="",this.preConsoleDockerId="",xe.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={},this.preDebugIndex={},xe.dao.resetTerminal(),xe.dao.resetConsole(),J.dao.channel().xtermStatus({resetConsole:!0}),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),p=n[d].timestamp;return p===e?d:e===((c=n[d-1])==null?void 0:c.timestamp)?d-1:e===((u=n[d+1])==null?void 0:u.timestamp)?d+1:e>((f=n[d-1])==null?void 0:f.timestamp)&&e<((h=n[d+1])==null?void 0:h.timestamp)?d:(e<p?l=d-1:e>p&&(a=d+1),i(a,l))}else return bt.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.isStopMovePosition?(this.playing=!1,this.isStopMovePosition=!1):(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.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(e.eventName==="customize"&&(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)&&(this.logger(this.index,e.index,e.eventName,e._id),this.index++,this.triggerCustomizeEvent(e)),!this.isStopMovePosition)){this.gotoNextFrame();return}if(this.isMovePosition){this.triggerPreFrames(),this.isMovePosition=!1;return}if(this.firstFrameTime+this.resumeTime>(e==null?void 0:e.timestamp)){let o=0;const s=this.firstFrameTime+this.resumeTime;for(let a=this.index+1;a<this.dataBuffer.length&&this.dataBuffer[a].timestamp<=s;a++)o++,this.index=a;o>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===ht.Editor}isFileTree(e){return e===ht.FileTree}isTerminal(e){return e===ht.Terminal}isConsole(e){return e===ht.Console}isDebug(e){return e===ht.Debug}isTerminalOrConsole(e){return[ht.Terminal.toString(),ht.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(){var s;const e=[ht.FileTree.toString(),ht.Editor.toString(),ht.Terminal.toString(),ht.Console.toString(),ht.Debug.toString()],n=J.file.doc().openedPath;let r=!1;const i=this.index,o=this.dataBuffer[i].dockerId;this.currentDockerId=o;for(let a=i;a>=0;a--){if(!e.length)return;if(e.includes(this.dataBuffer[a].eventName)&&this.dataBuffer[a].dockerId===this.currentDockerId){const l=this.dataBuffer[a],c=e.findIndex(u=>u===l.eventName);e.splice(c,1),l.eventName===ht.Editor.toString()&&!r&&n!==l.data.openedPath&&(J.file.editorView()&&((s=J.file.editorView())==null||s.destroy(),xe.file.editorView(void 0),bt.log("%c[Editor]: unmount","color: red")),xe.file.resetFile(),r=!0),l.snapshot||this.setSnapshotByIndex(a),this.trigger(l.eventName,l,!1)}}e.forEach(a=>{this.logger("trigger reset eventName:",a),this.trigger(a,null,!1)})}trigger(e,n,r=!0){if(e==="customize"){this.logger(this.index,e,n==null?void 0:n._id),this.triggerCustomizeEvent(n),r&&this.index++;return}const i=this.isTerminalOrConsole(e),o=this.isDebug(e);if(!i&&!o){this.logger(this.index,e,n==null?void 0:n._id),this.eventDispatcher(e,n),r&&this.index++;return}const s=n==null?void 0:n.dockerId;this.logger("[TR]",s);const a=this.preTerminalIndex[s]||0,l=this.preDebugIndex[s]||0,c=o?l:a;for(let u=c+1;u<=this.index;u++){const f=this.dataBuffer[u];f&&(this.isTerminalOrConsole(f.eventName)||o)&&f.dockerId===s&&(this.logger("[TR]",u,this.index,f.eventName,this.dataBuffer[u].dockerId,this.dataBuffer[u]._id),this.isTerminal(e)&&(this.preTerminalDockerId&&this.preTerminalDockerId!==s&&xe.dao.resetTerminal(),this.preTerminalDockerId=s),this.isConsole(e)&&(this.preConsoleDockerId&&this.preConsoleDockerId!==s&&(xe.dao.resetConsole(),J.dao.channel().xtermStatus({resetConsole:!0})),this.preConsoleDockerId=s),this.eventDispatcher(f.eventName,f))}o?this.preDebugIndex[s]=this.index:this.preTerminalIndex[s]=this.index,r&&this.index++}}const w2e="@dao42/d42paas-front",k2e="0.9.150",T2e="d42paas front",P2e="dao42 paas team",Q2e="https://github.com/dao42/d42paas_frontend#readme",E2e="UNLICENSED",C2e="./dist/DaoPaaS.cjs",R2e="./dist/DaoPaaS.cjs",A2e="./dist/DaoPaaS.d.ts",I2e={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",test1:"jest --coverage",test:"jest",prepublish:"pnpm build",publish:"npm publish --access public"},z2e={"@babel/core":"7.4.5","@babel/preset-env":"7.4.5","@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.5.0","@codemirror/legacy-modes":"^6.0.0","@codemirror/lint":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.2.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.8.1","@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.9.3","@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","@testing-library/user-event":"^14.4.3","@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.debounce":"^4.0.7","@types/lodash.isequal":"^4.5.6","@types/lodash.throttle":"^4.1.7","@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/testing-library__jest-dom":"^5.14.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","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-gfm":"^3.0.1","remark-math":"^5.1.1","remark-parse":"^10.0.1","remark-rehype":"^10.1.0",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.9.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.9.15","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"},L2e=["dist"],M2e={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},N2e={url:"https://github.com/dao42/d42paas_frontend/issues"},D2e={workerDirectory:"src"},X2e={"@babel/plugin-transform-modules-commonjs":"^7.18.2","babel-jest":"^29.3.1","babel-preset-react-app":"^10.0.1","codemirror-lang-elixir":"^3.0.0","detect-indent":"^7.0.1",i18next:"^21.8.16","jest-websocket-mock":"^2.4.0",lib0:"^0.2.58","lodash.clonedeep":"^4.5.0","lodash.debounce":"^4.0.8","lodash.isequal":"^4.5.0","lodash.throttle":"^4.1.1",minimatch:"^5.1.0","range-analyzer":"0.1.1-alpha.2","rc-dropdown":"^4.0.1","rc-menu":"^9.6.3","react-app-polyfill":"^3.0.0","react-i18next":"11.18.3","socket.io":"^4.5.1","socket.io-mock":"^1.3.2","socket.io-msgpack-parser":"^3.0.1","xterm-addon-web-links":"^0.6.0"};var W2e={name:w2e,version:k2e,description:T2e,author:P2e,homepage:Q2e,license:E2e,main:C2e,module:R2e,types:A2e,scripts:I2e,devDependencies:z2e,files:L2e,repository:M2e,bugs:N2e,msw:D2e,dependencies:X2e};const U2e=()=>W2e.version,q2e=async(t,e,n)=>{const r=window.localStorage.getItem("__paas__testServerCode__"),i=r?{serverCode:r}:{};return new Promise((o,s)=>{fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:n,...i})}).then(a=>a.json()).then(a=>{o(a)}).catch(a=>{s(a)})})},WG=(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})`},B2e=()=>{const t=`
50
50
  @keyframes fadeOut {
51
51
  0% {opacity: 1;}
52
52
  100% {opacity: 0;}
@@ -1135,14 +1135,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1135
1135
  `}),i)return!i.end||!i.start?void 0:{open:jp(n.doc,i.start),close:jp(n.doc,i.end)}}function jp(t,e){return{from:Tl(t,e.from),to:Tl(t,e.to)}}function pKe(t,e){for(var n=t.cm6.state,r=t.indexFromPos(e),i=n.sliceDoc(0,r),o=r;o>0;){var s=Gs(n,o,1,{brackets:`
1136
1136
 
1137
1137
  `});if(s&&s.start&&s.end)return{open:jp(n.doc,s.start),close:jp(n.doc,s.end)};o=i.lastIndexOf(">",o-1)}}class mKe{constructor(e,n,r){this.cm=e,this.id=e.$mid++,this.offset=n,this.assoc=r,e.marks[this.id]=this}clear(){delete this.cm.marks[this.id]}find(){return this.offset==null?null:this.cm.posFromIndex(this.offset)}update(e){this.offset!=null&&(this.offset=e.mapPos(this.offset,this.assoc,Xo.TrackDel))}}class gKe{constructor(e,n,r,i,o,s,a,l,c,u){this.left=e,this.top=n,this.height=r,this.fontFamily=i,this.fontSize=o,this.fontWeight=s,this.color=a,this.className=l,this.letter=c,this.partial=u}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",e.style.height=this.height+"px",e.style.lineHeight=this.height+"px",e.style.fontFamily=this.fontFamily,e.style.fontSize=this.fontSize,e.style.fontWeight=this.fontWeight,e.style.color=this.partial?"transparent":this.color,e.className=this.className,e.textContent=this.letter}eq(e){return this.left==e.left&&this.top==e.top&&this.height==e.height&&this.fontFamily==e.fontFamily&&this.fontSize==e.fontSize&&this.fontWeight==e.fontWeight&&this.color==e.color&&this.className==e.className&&this.letter==e.letter}}class vKe{constructor(e,n){this.view=e,this.rangePieces=[],this.cursors=[],this.cm=n,this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.cursorLayer=e.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer cm-vimCursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),e.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=1200+"ms"}update(e){(e.selectionSet||e.geometryChanged||e.viewportChanged)&&(this.view.requestMeasure(this.measureReq),this.cursorLayer.style.animationName=this.cursorLayer.style.animationName=="cm-blink"?"cm-blink2":"cm-blink")}scheduleRedraw(){this.view.requestMeasure(this.measureReq)}readPos(){let{state:e}=this.view,n=[];for(let r of e.selection.ranges){let i=r==e.selection.main,o=$Ke(this.cm,this.view,r,i);o&&n.push(o)}return{cursors:n}}drawSel({cursors:e}){if(e.length!=this.cursors.length||e.some((n,r)=>!n.eq(this.cursors[r]))){let n=this.cursorLayer.children;if(n.length!==e.length){this.cursorLayer.textContent="";for(const r of e)this.cursorLayer.appendChild(r.draw())}else e.forEach((r,i)=>r.adjust(n[i]));this.cursors=e}}destroy(){this.cursorLayer.remove()}}const yKe={".cm-vimMode .cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-fat-cursor":{position:"absolute",background:"#ff9696",border:"none",whiteSpace:"pre"},"&:not(.cm-focused) .cm-fat-cursor":{background:"none",outline:"solid 1px #ff9696"}},bKe=xu.highest(dt.theme(yKe));function _Ke(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==bi.LTR?e.left:e.right-t.scrollDOM.clientWidth)-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function $Ke(t,e,n,r){let i=n.head,o=!1,s=1,a=t.state.vim;if(a&&(!a.insertMode||t.state.overwrite)){if(o=!0,a.visualBlock&&!r)return null;n.anchor<n.head&&i--,t.state.overwrite?s=.2:a.status&&(s=.5)}if(o){let l=e.coordsAtPos(i,n.assoc||1);if(!l)return null;let c=_Ke(e),u=e.domAtPos(i),f=u?u.node:e.contentDOM;for(;u&&u.node instanceof HTMLElement;)f=u.node,u={node:u.node.childNodes[u.offset],offset:0};f instanceof HTMLElement||(f=f.parentNode);let h=getComputedStyle(f),d=i<e.state.doc.length&&e.state.sliceDoc(i,i+1);(!d||d==`
1138
- `||d=="\r")&&(d="\xA0");let p=l.bottom-l.top;return new gKe(l.left-c.left,l.top-c.top+p*(1-s),p*s,h.fontFamily,h.fontSize,h.fontWeight,h.color,r?"cm-fat-cursor cm-cursor-primary":"cm-fat-cursor cm-cursor-secondary",d,s!=1)}else return null}const uB=aKe(Vr),SKe=250,xKe=dt.baseTheme({".cm-vimMode .cm-cursorLayer:not(.cm-vimCursorLayer)":{display:"none"},".cm-vim-panel":{padding:"0px 10px",fontFamily:"monospace",minHeight:"1.3em"},".cm-vim-panel input":{border:"none",outline:"none",backgroundColor:"inherit"},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"}}),wKe=Fr.fromClass(class{constructor(t){this.status="",this.query=null,this.decorations=Rt.none,this.view=t;const e=this.cm=new Vr(t);uB.enterVimMode(this.cm),this.view.cm=this.cm,this.cm.state.vimPlugin=this,this.blockCursor=new vKe(t,e),this.updateClass(),this.cm.on("vim-command-done",()=>{e.state.vim&&(e.state.vim.status=""),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on("vim-mode-change",n=>{e.state.vim.mode=n.mode,n.subMode&&(e.state.vim.mode+=" block"),e.state.vim.status="",this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus()}),this.cm.on("dialog",()=>{this.cm.state.statusbar?this.updateStatus():t.dispatch({effects:Noe.of(!!this.cm.state.dialog)})}),this.dom=document.createElement("span"),this.dom.style.cssText="position: absolute; right: 10px; top: 1px"}update(t){var e;if(t.docChanged&&(this.cm.onChange(t),this.query&&this.highlight(this.query)),t.selectionSet&&this.cm.onSelectionChange(),t.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),t.transactions){for(let n of t.transactions)for(let r of n.effects)if(r.is(th))if(!((e=r.value)==null?void 0:e.forVim))this.highlight(null);else{let o=r.value.create();this.highlight(o)}}this.blockCursor.update(t)}updateClass(){const t=this.cm.state;!t.vim||t.vim.insertMode&&!t.overwrite?this.view.scrollDOM.classList.remove("cm-vimMode"):this.view.scrollDOM.classList.add("cm-vimMode")}updateStatus(){let t=this.cm.state.statusbar;if(!t)return;let e=this.cm.state.dialog,n=this.cm.state.vim;e?e.parentElement!=t&&(t.textContent="",t.appendChild(e)):t.textContent=`--${(n.mode||"normal").toUpperCase()}--`,this.dom.textContent=n.status,t.appendChild(this.dom)}destroy(){this.cm.state.vim=null,this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(t){if(this.query=t,!t)return this.decorations=Rt.none;let{view:e}=this,n=new $u;for(let r=0,i=e.visibleRanges,o=i.length;r<o;r++){let{from:s,to:a}=i[r];for(;r<o-1&&a>i[r+1].from-2*SKe;)a=i[++r].to;t.highlight(e.state.doc,s,a,(l,c)=>{n.add(l,c,kKe)})}return this.decorations=n.finish()}},{eventHandlers:{keydown:function(t,e){const n=Vr.vimKey(t),r=this.cm;if(!n)return;let i=r.state.vim;n=="<Esc>"&&!i.insertMode&&!i.visualMode&&this.query&&r.removeOverlay(null),r.state.vim.status=(r.state.vim.status||"")+n;let o=uB.multiSelectHandleKey(r,n,"user");return!o&&r.state.vim.insertMode&&r.state.overwrite&&(t.key&&t.key.length==1&&!/\n/.test(t.key)?(o=!0,r.overWriteSelection(t.key)):t.key=="Backspace"&&(o=!0,Vr.commands.cursorCharLeft(r))),o&&(t.preventDefault(),t.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!o}},decorations:t=>t.decorations}),kKe=Rt.mark({class:"cm-searchMatch"}),Noe=fn.define(),TKe=ni.define({create:()=>!1,update(t,e){for(let n of e.effects)n.is(Noe)&&(t=n.value);return t},provide:t=>Hd.from(t,e=>e?PKe:null)});function PKe(t){let e=document.createElement("div");e.className="cm-vim-panel";let n=t.cm;return n.state.dialog&&e.appendChild(n.state.dialog),{top:!1,dom:e}}function QKe(t){let e=document.createElement("div");e.className="cm-vim-panel";let n=t.cm;return n.state.statusbar=e,n.state.vimPlugin.updateStatus(),{dom:e}}function EKe(t={}){return[xKe,wKe,bKe,t.status?Hd.of(QKe):TKe]}var Doe=(t=>(t.erb="erb",t.ru="ruby",t.ejs="html",t.json="json",t.abap="abap",t.cls="apex",t.azcli="azcli",t.bat="bat",t.cmd="bat",t.c="c",t.h="c",t.mligo="cameligo",t.clj="clojure",t.cljs="clojure",t.cljc="clojure",t.edn="clojure",t.coffee="coffeescript",t.cpp="cpp",t.cc="cpp",t.cxx="cpp",t.hpp="cpp",t.hh="cpp",t.hxx="cpp",t.cs="csharp",t.csx="csharp",t.cake="csharp",t.css="css",t.dart="dart",t.dockerfile="dockerfile",t.ecl="ecl",t.erl="erlang",t.fs="fsharp",t.fsi="fsharp",t.mli="fsharp",t.fsx="fsharp",t.fsscript="fsharp",t.go="go",t.graphql="graphql",t.gql="graphql",t.handlebars="handlebars",t.hbs="handlebars",t.tf="hcl",t.tfvars="hcl",t.hcl="hcl",t.html="html",t.htm="html",t.shtml="html",t.xhtml="html",t.mdoc="html",t.jsp="html",t.asp="html",t.aspx="html",t.jshtm="html",t.vue="html",t.ini="ini",t.properties="ini",t.gitconfig="ini",t.java="java",t.jav="java",t.js="javascript",t.es6="javascript",t.jsx="javascript",t.mjs="javascript",t.jl="julia",t.kt="kotlin",t.less="css",t.lex="lexon",t.lua="lua",t.m3="m3",t.i3="m3",t.mg="m3",t.ig="m3",t.md="markdown",t.markdown="markdown",t.mdown="markdown",t.mkdn="markdown",t.mkd="markdown",t.mdwn="markdown",t.mdtxt="markdown",t.mdtext="markdown",t.s="gas",t.dax="msdax",t.msdax="msdax",t.m="objectiveC",t.pas="pascal",t.p="pascal",t.pp="pascal",t.ligo="pascaligo",t.pl="perl",t.php="php",t.php4="php",t.php5="php",t.phtml="php",t.ctp="php",t.dats="postiats",t.sats="postiats",t.hats="postiats",t.pq="powerquery",t.pqm="powerquery",t.ps1="powershell",t.psm1="powershell",t.psd1="powershell",t.jade="pug",t.pug="pug",t.py="python",t.rpy="python",t.pyw="python",t.cpy="python",t.gyp="python",t.gypi="python",t.r="r",t.rhistory="r",t.rmd="r",t.rprofile="r",t.rt="r",t.cshtml="razor",t.redis="redis",t.rst="restructuredtext",t.rb="ruby",t.rbx="ruby",t.rjs="ruby",t.gemspec="ruby",t.rs="rust",t.rlib="rust",t.sb="sb",t.scala="scala",t.sc="scala",t.sbt="scala",t.scm="scheme",t.ss="scheme",t.sch="scheme",t.rkt="scheme",t.scss="css",t.sass="css",t.sh="shell",t.bash="shell",t.aes="sophia",t.sol="sol",t.sql="sql",t.st="st",t.iecst="st",t.iecplc="st",t.lc3lib="st",t.swift="swift",t.sv="systemverilog",t.svh="systemverilog",t.tcl="tcl",t.twig="twig",t.ts="typescript",t.tsx="typescript",t.vb="vb",t.v="verilog",t.vh="verilog",t.xml="xml",t.dtd="xml",t.ascx="xml",t.csproj="xml",t.config="xml",t.wxi="xml",t.wxl="xml",t.wxs="xml",t.xaml="xml",t.svg="xml",t.svgz="xml",t.opf="xml",t.xsl="xml",t.yaml="yaml",t.yml="yaml",t.vhdl="vhdl",t.hs="hs",t.asm="asm",t.ml="oCaml",t.ex="elixir",t.exs="elixir",t.beam="elixir",t))(Doe||{}),Xoe=(t=>(t.Gemfile="ruby",t.Rakefile="ruby",t.artisan="php",t["Gemfile.lock"]="ruby",t[".npmrc"]="javascript",t[".eslintrc"]="javascript",t[".1024"]="yaml",t))(Xoe||{});const no=(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})`};function Woe(t,e){return dt.theme({".user-selection-E55050":{backgroundColor:`${no("#E55050",e)}`},".user-selection-F28149":{backgroundColor:`${no("#F28149",e)}`},".user-selection-F2B230":{backgroundColor:`${no("#F2B230",e)}`},".user-selection-A3CC52":{backgroundColor:`${no("#A3CC52",e)}`},".user-selection-2ACC96":{backgroundColor:`${no("#2ACC96",e)}`},".user-selection-3091F2":{backgroundColor:`${no("#3091F2",e)}`},".user-selection-5C5CE5":{backgroundColor:`${no("#5C5CE5",e)}`},".user-selection-F26191":{backgroundColor:`${no("#F26191",e)}`},".user-selection-F29130":{backgroundColor:`${no("#F29130",e)}`},".user-selection-D9D957":{backgroundColor:`${no("#D9D957",e)}`},".user-selection-52CC7A":{backgroundColor:`${no("#52CC7A",e)}`},".user-selection-17A1E5":{backgroundColor:`${no("#17A1E5",e)}`},".user-selection-4965F2":{backgroundColor:`${no("#4965F2",e)}`},".user-selection-AA61F2":{backgroundColor:`${no("#AA61F2",e)}`},".user-selection-E573D2":{backgroundColor:`${no("#E573D2",e)}`},".user-selection-F26549":{backgroundColor:`${no("#F26549",e)}`},".user-selection-85CC52":{backgroundColor:`${no("#85CC52",e)}`},".user-selection-24B2B2":{backgroundColor:`${no("#24B2B2",e)}`},".user-selection-3377FF":{backgroundColor:`${no("#3377FF",e)}`},".user-selection-7961F2":{backgroundColor:`${no("#7961F2",e)}`},".cm-focused .cm-selectionBackground":{backgroundColor:`${no(t,e)} !important`},".cm-selectionBackground":{backgroundColor:`${no(t,e)} !important`},".cm-cursor":{borderLeft:`2px solid ${t} !important`},"::selection":{background:"transparent !important",color:"inherit !important"},".cm-tooltip.mutiplayer-tooltip":{backgroundColor:"transparent",boxShadow:"none",border:"0 none",padding:"0px","& .mutiplayer-cursor":{top:"calc(100% - 1px)",left:"-1px",width:"2px",borderRadius:"4px",pointerEvents:"none",position:"absolute",color:"transparent"},"& .mutiplayer-label":{padding:"2px 7px",position:"relative",left:"-1px",borderRadius:"4px",borderBottomLeftRadius:"0px",animation:"fadeOut 2s ease-in forwards"}},".cm-content":{caretColor:`${t} !important`}})}const D_=t=>!J.file.docLoading()&&J.file.getOpenedPath()===t;dt.baseTheme({".cm-d42-selection":{},".cm-d42-lineSelection":{padding:0,margin:"0px 2px 0px 4px"},".cm-d42-selectionCaret":{position:"relative",borderLeft:"1px solid black",borderRight:"1px solid black",marginLeft:"-1px",marginRight:"-1px",boxSizing:"border-box",display:"inline"},".cm-d42-selectionCaretDot":{display:"none",borderRadius:"50%",position:"absolute",width:".4em",height:".4em",top:"-.2em",left:"-.2em",backgroundColor:"inherit",transition:"transform .3s ease-in-out",boxSizing:"border-box"},".cm-d42-selectionCaret:hover > .cm-d42-selectionCaretDot":{transformOrigin:"bottom center",transform:"scale(0)"},".cm-d42-selectionInfo":{position:"absolute",top:"-1.05em",left:"-1px",padding:"2px 7px",fontSize:".75em",userSelect:"none",color:"white",zIndex:101,transition:"opacity .3s ease-in-out",backgroundColor:"inherit",opacity:1,transitionDelay:"0s",whiteSpace:"nowrap",borderRadius:"4px"},".cm-d42-selectionCaret:hover > .cm-d42-selectionInfo":{opacity:1,transitionDelay:"0s"}});const CKe=dt.theme({".cm-tooltip.mutiplayer-tooltip":{"& .mutiplayer-label":{display:"none"}}}),RKe=dt.theme({".cm-tooltip.mutiplayer-tooltip":{"& .mutiplayer-label":{display:"block"}}}),Uoe=ni.define({create(){return[]},update(t,e){return AKe(t,e)},provide:t=>f0.computeN([t],e=>e.field(t))});function AKe(t,e){let n=t;const r=e.annotation(Jr.remote);let i=!1;for(const o of e.effects)if(o.is(zx)){i=!0,n=[];const s=o.value||{};if(GG(s))return n;const a=J.dao.currentAgentUserId(),l=J.dao.isPlayBack();for(const c in s){const u=J.dao.getAgentUserById(c);if((c===a||(u==null?void 0:u.status)!=="online")&&!l)continue;const f=s[c];if(!f)return n;let h=Ne.fromJSON(f);!r&&!J.dao.isPlayBack()&&e.changes&&(h=h.map(e.changes)),s[c]=h.toJSON();const d=h.ranges;for(const p of d){const b=u==null?void 0:u.userInfo.username,y=WG((u==null?void 0:u.color)||"#91d5ff",.7),O=document.createElement("div");O.className="mutiplayer-tooltip";const m=document.createElement("div");m.className="mutiplayer-cursor";const v=document.createElement("div");v.className="mutiplayer-label",n.push({pos:Math.min(p.head,e.state.doc.length),above:!0,strictSide:!0,arrow:!1,create:()=>(m.style.cssText=`
1139
- background-color: ${y};
1138
+ `||d=="\r")&&(d="\xA0");let p=l.bottom-l.top;return new gKe(l.left-c.left,l.top-c.top+p*(1-s),p*s,h.fontFamily,h.fontSize,h.fontWeight,h.color,r?"cm-fat-cursor cm-cursor-primary":"cm-fat-cursor cm-cursor-secondary",d,s!=1)}else return null}const uB=aKe(Vr),SKe=250,xKe=dt.baseTheme({".cm-vimMode .cm-cursorLayer:not(.cm-vimCursorLayer)":{display:"none"},".cm-vim-panel":{padding:"0px 10px",fontFamily:"monospace",minHeight:"1.3em"},".cm-vim-panel input":{border:"none",outline:"none",backgroundColor:"inherit"},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"}}),wKe=Fr.fromClass(class{constructor(t){this.status="",this.query=null,this.decorations=Rt.none,this.view=t;const e=this.cm=new Vr(t);uB.enterVimMode(this.cm),this.view.cm=this.cm,this.cm.state.vimPlugin=this,this.blockCursor=new vKe(t,e),this.updateClass(),this.cm.on("vim-command-done",()=>{e.state.vim&&(e.state.vim.status=""),this.blockCursor.scheduleRedraw(),this.updateStatus()}),this.cm.on("vim-mode-change",n=>{e.state.vim.mode=n.mode,n.subMode&&(e.state.vim.mode+=" block"),e.state.vim.status="",this.blockCursor.scheduleRedraw(),this.updateClass(),this.updateStatus()}),this.cm.on("dialog",()=>{this.cm.state.statusbar?this.updateStatus():t.dispatch({effects:Noe.of(!!this.cm.state.dialog)})}),this.dom=document.createElement("span"),this.dom.style.cssText="position: absolute; right: 10px; top: 1px"}update(t){var e;if(t.docChanged&&(this.cm.onChange(t),this.query&&this.highlight(this.query)),t.selectionSet&&this.cm.onSelectionChange(),t.viewportChanged,this.cm.curOp&&!this.cm.curOp.isVimOp&&this.cm.onBeforeEndOperation(),t.transactions){for(let n of t.transactions)for(let r of n.effects)if(r.is(th))if(!((e=r.value)==null?void 0:e.forVim))this.highlight(null);else{let o=r.value.create();this.highlight(o)}}this.blockCursor.update(t)}updateClass(){const t=this.cm.state;!t.vim||t.vim.insertMode&&!t.overwrite?this.view.scrollDOM.classList.remove("cm-vimMode"):this.view.scrollDOM.classList.add("cm-vimMode")}updateStatus(){let t=this.cm.state.statusbar;if(!t)return;let e=this.cm.state.dialog,n=this.cm.state.vim;e?e.parentElement!=t&&(t.textContent="",t.appendChild(e)):t.textContent=`--${(n.mode||"normal").toUpperCase()}--`,this.dom.textContent=n.status,t.appendChild(this.dom)}destroy(){this.cm.state.vim=null,this.updateClass(),this.blockCursor.destroy(),delete this.view.cm}highlight(t){if(this.query=t,!t)return this.decorations=Rt.none;let{view:e}=this,n=new $u;for(let r=0,i=e.visibleRanges,o=i.length;r<o;r++){let{from:s,to:a}=i[r];for(;r<o-1&&a>i[r+1].from-2*SKe;)a=i[++r].to;t.highlight(e.state.doc,s,a,(l,c)=>{n.add(l,c,kKe)})}return this.decorations=n.finish()}},{eventHandlers:{keydown:function(t,e){const n=Vr.vimKey(t),r=this.cm;if(!n)return;let i=r.state.vim;n=="<Esc>"&&!i.insertMode&&!i.visualMode&&this.query&&r.removeOverlay(null),r.state.vim.status=(r.state.vim.status||"")+n;let o=uB.multiSelectHandleKey(r,n,"user");return!o&&r.state.vim.insertMode&&r.state.overwrite&&(t.key&&t.key.length==1&&!/\n/.test(t.key)?(o=!0,r.overWriteSelection(t.key)):t.key=="Backspace"&&(o=!0,Vr.commands.cursorCharLeft(r))),o&&(t.preventDefault(),t.stopPropagation(),this.blockCursor.scheduleRedraw()),this.updateStatus(),!!o}},decorations:t=>t.decorations}),kKe=Rt.mark({class:"cm-searchMatch"}),Noe=fn.define(),TKe=ni.define({create:()=>!1,update(t,e){for(let n of e.effects)n.is(Noe)&&(t=n.value);return t},provide:t=>Hd.from(t,e=>e?PKe:null)});function PKe(t){let e=document.createElement("div");e.className="cm-vim-panel";let n=t.cm;return n.state.dialog&&e.appendChild(n.state.dialog),{top:!1,dom:e}}function QKe(t){let e=document.createElement("div");e.className="cm-vim-panel";let n=t.cm;return n.state.statusbar=e,n.state.vimPlugin.updateStatus(),{dom:e}}function EKe(t={}){return[xKe,wKe,bKe,t.status?Hd.of(QKe):TKe]}var Doe=(t=>(t.erb="erb",t.ru="ruby",t.ejs="html",t.json="json",t.abap="abap",t.cls="apex",t.azcli="azcli",t.bat="bat",t.cmd="bat",t.c="c",t.h="c",t.mligo="cameligo",t.clj="clojure",t.cljs="clojure",t.cljc="clojure",t.edn="clojure",t.coffee="coffeescript",t.cpp="cpp",t.cc="cpp",t.cxx="cpp",t.hpp="cpp",t.hh="cpp",t.hxx="cpp",t.cs="csharp",t.csx="csharp",t.cake="csharp",t.css="css",t.dart="dart",t.dockerfile="dockerfile",t.ecl="ecl",t.erl="erlang",t.fs="fsharp",t.fsi="fsharp",t.mli="fsharp",t.fsx="fsharp",t.fsscript="fsharp",t.go="go",t.graphql="graphql",t.gql="graphql",t.handlebars="handlebars",t.hbs="handlebars",t.tf="hcl",t.tfvars="hcl",t.hcl="hcl",t.html="html",t.htm="html",t.shtml="html",t.xhtml="html",t.mdoc="html",t.jsp="html",t.asp="html",t.aspx="html",t.jshtm="html",t.vue="html",t.ini="ini",t.properties="ini",t.gitconfig="ini",t.java="java",t.jav="java",t.js="javascript",t.es6="javascript",t.jsx="javascript",t.mjs="javascript",t.jl="julia",t.kt="kotlin",t.less="css",t.lex="lexon",t.lua="lua",t.m3="m3",t.i3="m3",t.mg="m3",t.ig="m3",t.md="markdown",t.markdown="markdown",t.mdown="markdown",t.mkdn="markdown",t.mkd="markdown",t.mdwn="markdown",t.mdtxt="markdown",t.mdtext="markdown",t.s="gas",t.dax="msdax",t.msdax="msdax",t.m="objectiveC",t.pas="pascal",t.p="pascal",t.pp="pascal",t.ligo="pascaligo",t.pl="perl",t.php="php",t.php4="php",t.php5="php",t.phtml="php",t.ctp="php",t.dats="postiats",t.sats="postiats",t.hats="postiats",t.pq="powerquery",t.pqm="powerquery",t.ps1="powershell",t.psm1="powershell",t.psd1="powershell",t.jade="pug",t.pug="pug",t.py="python",t.rpy="python",t.pyw="python",t.cpy="python",t.gyp="python",t.gypi="python",t.r="r",t.rhistory="r",t.rmd="r",t.rprofile="r",t.rt="r",t.cshtml="razor",t.redis="redis",t.rst="restructuredtext",t.rb="ruby",t.rbx="ruby",t.rjs="ruby",t.gemspec="ruby",t.rs="rust",t.rlib="rust",t.sb="sb",t.scala="scala",t.sc="scala",t.sbt="scala",t.scm="scheme",t.ss="scheme",t.sch="scheme",t.rkt="scheme",t.scss="css",t.sass="css",t.sh="shell",t.bash="shell",t.aes="sophia",t.sol="sol",t.sql="sql",t.st="st",t.iecst="st",t.iecplc="st",t.lc3lib="st",t.swift="swift",t.sv="systemverilog",t.svh="systemverilog",t.tcl="tcl",t.twig="twig",t.ts="typescript",t.tsx="typescript",t.vb="vb",t.v="verilog",t.vh="verilog",t.xml="xml",t.dtd="xml",t.ascx="xml",t.csproj="xml",t.config="xml",t.wxi="xml",t.wxl="xml",t.wxs="xml",t.xaml="xml",t.svg="xml",t.svgz="xml",t.opf="xml",t.xsl="xml",t.yaml="yaml",t.yml="yaml",t.vhdl="vhdl",t.hs="hs",t.asm="asm",t.ml="oCaml",t.ex="elixir",t.exs="elixir",t.beam="elixir",t))(Doe||{}),Xoe=(t=>(t.Gemfile="ruby",t.Rakefile="ruby",t.artisan="php",t["Gemfile.lock"]="ruby",t[".npmrc"]="javascript",t[".eslintrc"]="javascript",t[".1024"]="yaml",t))(Xoe||{});const no=(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})`};function Woe(t,e){return dt.theme({".user-selection-E55050":{backgroundColor:`${no("#E55050",e)}`},".user-selection-F28149":{backgroundColor:`${no("#F28149",e)}`},".user-selection-F2B230":{backgroundColor:`${no("#F2B230",e)}`},".user-selection-A3CC52":{backgroundColor:`${no("#A3CC52",e)}`},".user-selection-2ACC96":{backgroundColor:`${no("#2ACC96",e)}`},".user-selection-3091F2":{backgroundColor:`${no("#3091F2",e)}`},".user-selection-5C5CE5":{backgroundColor:`${no("#5C5CE5",e)}`},".user-selection-F26191":{backgroundColor:`${no("#F26191",e)}`},".user-selection-F29130":{backgroundColor:`${no("#F29130",e)}`},".user-selection-D9D957":{backgroundColor:`${no("#D9D957",e)}`},".user-selection-52CC7A":{backgroundColor:`${no("#52CC7A",e)}`},".user-selection-17A1E5":{backgroundColor:`${no("#17A1E5",e)}`},".user-selection-4965F2":{backgroundColor:`${no("#4965F2",e)}`},".user-selection-AA61F2":{backgroundColor:`${no("#AA61F2",e)}`},".user-selection-E573D2":{backgroundColor:`${no("#E573D2",e)}`},".user-selection-F26549":{backgroundColor:`${no("#F26549",e)}`},".user-selection-85CC52":{backgroundColor:`${no("#85CC52",e)}`},".user-selection-24B2B2":{backgroundColor:`${no("#24B2B2",e)}`},".user-selection-3377FF":{backgroundColor:`${no("#3377FF",e)}`},".user-selection-7961F2":{backgroundColor:`${no("#7961F2",e)}`},".cm-focused .cm-selectionBackground":{backgroundColor:`${no(t,e)} !important`},".cm-selectionBackground":{backgroundColor:`${no(t,e)} !important`},".cm-cursor":{borderLeft:`2px solid ${t} !important`},"::selection":{background:"transparent !important",color:"inherit !important"},".cm-tooltip.mutiplayer-tooltip":{backgroundColor:"transparent",boxShadow:"none",border:"0 none",padding:"0px","& .mutiplayer-cursor":{top:"calc(100% - 1px)",left:"-1px",width:"2px",borderRadius:"4px",pointerEvents:"none",position:"absolute",color:"transparent"},"& .mutiplayer-label":{padding:"2px 7px",position:"relative",left:"-1px",borderRadius:"4px",borderBottomLeftRadius:"0px",animation:"fadeOut 2s ease-in forwards"}},".cm-content":{caretColor:`${t} !important`}})}const D_=t=>!J.file.docLoading()&&J.file.getOpenedPath()===t;dt.baseTheme({".cm-d42-selection":{},".cm-d42-lineSelection":{padding:0,margin:"0px 2px 0px 4px"},".cm-d42-selectionCaret":{position:"relative",borderLeft:"1px solid black",borderRight:"1px solid black",marginLeft:"-1px",marginRight:"-1px",boxSizing:"border-box",display:"inline"},".cm-d42-selectionCaretDot":{display:"none",borderRadius:"50%",position:"absolute",width:".4em",height:".4em",top:"-.2em",left:"-.2em",backgroundColor:"inherit",transition:"transform .3s ease-in-out",boxSizing:"border-box"},".cm-d42-selectionCaret:hover > .cm-d42-selectionCaretDot":{transformOrigin:"bottom center",transform:"scale(0)"},".cm-d42-selectionInfo":{position:"absolute",top:"-1.05em",left:"-1px",padding:"2px 7px",fontSize:".75em",userSelect:"none",color:"white",zIndex:101,transition:"opacity .3s ease-in-out",backgroundColor:"inherit",opacity:1,transitionDelay:"0s",whiteSpace:"nowrap",borderRadius:"4px"},".cm-d42-selectionCaret:hover > .cm-d42-selectionInfo":{opacity:1,transitionDelay:"0s"}});const CKe=dt.theme({".cm-tooltip.mutiplayer-tooltip":{"& .mutiplayer-label":{visibility:"hidden"}}}),RKe=dt.theme({".cm-tooltip.mutiplayer-tooltip":{"& .mutiplayer-label":{visibility:"visible"}}}),Uoe=ni.define({create(){return[]},update(t,e){return AKe(t,e)},provide:t=>f0.computeN([t],e=>e.field(t))});function AKe(t,e){let n=t;const r=e.annotation(Jr.remote);let i=!1;for(const s of e.effects)if(s.is(zx)){i=!0,n=[];const a=s.value||{};if(GG(a))return n;const l=J.dao.currentAgentUserId(),c=J.dao.isPlayBack();for(const u in a){const f=J.dao.getAgentUserById(u);if((u===l||(f==null?void 0:f.status)!=="online")&&!c)continue;const h=a[u];if(!h)return n;let d=Ne.fromJSON(h);!r&&!J.dao.isPlayBack()&&e.changes&&(d=d.map(e.changes)),a[u]=d.toJSON();const p=d.ranges;for(const b of p){const y=f==null?void 0:f.userInfo.username,O=WG((f==null?void 0:f.color)||"#91d5ff",.7),m=document.createElement("div");m.className="mutiplayer-tooltip";const v=document.createElement("div");v.className="mutiplayer-cursor";const $=document.createElement("div");$.className="mutiplayer-label",n.push({pos:Math.min(b.head,e.state.doc.length),above:!0,strictSide:!0,arrow:!1,create:()=>(v.style.cssText=`
1139
+ background-color: ${O};
1140
1140
  height: 19px;
1141
1141
  transform: translateY(1px)
1142
- `,v.style.cssText=`
1143
- background-color: ${y};
1142
+ `,$.style.cssText=`
1143
+ background-color: ${O};
1144
1144
  color: white;
1145
- `,J.dao.isPlayBack()&&(v.style.animationPlayState="paused"),v.textContent=b,O.append(m,b?v:""),{dom:O,overlap:!0})})}}}if(!i){if(!e.docChanged||e.isUserEvent("delete.selection.smart"))return n;n=n.map(o=>{const s=e.changes.mapPos(o.pos);return o.pos=Math.min(s,e.state.doc.length),o})}return n}const zx=fn.define({}),qoe=ni.define({create(){return Rt.none},update(t,e){try{t=t.map(e.changes)}catch(n){return J.dao.channel().uploadLog("peerSelections",`error:${n==null?void 0:n.message}; }`),t=Rt.none,t}for(const n of e.effects)if(n.is(zx)){t=Rt.none;const r=n.value||{},i=J.dao.isPlayBack();if(GG(r))continue;const o=J.dao.currentAgentUserId();for(const s in n.value){const a=J.dao.getAgentUserById(s);if((s===o||(a==null?void 0:a.status)!=="online")&&!i)continue;const l=`user-selection-${a==null?void 0:a.color.slice(1)}`,c=n.value[s];if(!c)continue;const u=Ne.fromJSON(c),{ranges:f}=u,h=Rt.mark({class:l,attributes:{style:`background-color: ${WG((a==null?void 0:a.color)||"#F2B230",.4)}`}});document.querySelectorAll(".cm-selectionBackground").forEach(d=>{d.style.backgroundColor=a.color});for(const d of f){const p=Math.min(d.head,d.anchor),b=Math.max(d.head,d.anchor);p===b?t=Rt.none:t=t.update({add:[h.range(p,b)]})}}}return t},provide:t=>dt.decorations.from(t)}),IKe=[Uoe,qoe];var Lj;const zKe=[Uoe,qoe,Woe(((Lj=J.dao.currentAgentUser())==null?void 0:Lj.color)||"#F2B230",.4)],LKe=t=>{const{startVersion:e,agentUser:n}=t,r=Fr.fromClass(class{constructor(i){at(this,"pushing",!1);at(this,"view");at(this,"timer",null);at(this,"offlineToOnline",!1);at(this,"pendingPullOTUpdates",[]);at(this,"continueResolve",null);bt.log(`[Editor] \u8DEF\u5F84 - [ ${J.file.getOpenedPath()} ] - \u7684\u7F16\u8F91\u5668\u7684state\u5B9E\u4F8B\u521B\u5EFA`),this.view=i,this.syncUpdates(),this.onSyncSelected(),this.onSyncOTUpdates(),this.onPullUpdates(),this.monitorChannelStatus(),this.onPushUpdates()}syncUpdates(i){if(!J.file.getOpenedPath())return;const o=i==null?void 0:i.syncStartVersion;xe.file.syncDoc(!0),J.dao.channel().send("syncOTUpdates",{version:dH(o)?o:gT(this.view.state),path:J.file.getOpenedPath(),agentUserId:J.dao.currentAgentUserId(),fileRootId:J.file.fileRootId()})}onSyncSelected(){J.dao.channel().on(ht.SelectedUpdated,o=>{const{path:s,mapSelection:a}=o;J.file.getOpenedPath()===s&&this.receiveSelectionUpdates(a)})}monitorChannelStatus(){const i=J.dao.channel();i.addMessageEventListener(Gt.Offline,()=>{this.offlineToOnline=!1,this.pushing=!1}),i.addMessageEventListener(Gt.Online,()=>{J.file.syncDoc()||!J.file.getOpenedPath()||(this.offlineToOnline=!0,this.syncUpdates({type:"reconnect"}))})}receiveOTUpdates(i){if(!J.dao.channelAvailable())return;const{path:o,id:s,updates:a,mapSelection:l={}}=i;if(!D_(o)||J.file.updatedOTIds().includes(s))return;J.dao.channel().uploadLog("receiveOTUpdates",`id:${s}; OTIds:${J.file.updatedOTIds()}`),xe.file.updatedOTIds([...J.file.updatedOTIds(),i.id]);const c=xe.dao.setLatestDocContent,u=a.map(f=>({changes:Ri.fromJSON(f.changes),clientID:f.agentUserId}));this.view.dispatch(IX(this.view.state,u)),this.receiveSelectionUpdates(l),c(this.view.state.doc.toJSON().join(`
1145
+ `,J.dao.isPlayBack()&&($.style.animationPlayState="paused"),$.textContent=y,m.append(v,y?$:""),{dom:m,overlap:!0})})}}}const o=J.dao.isPlayBack();if(!i&&!o){if(!e.docChanged||e.isUserEvent("delete.selection.smart"))return n;n=n.map(s=>{const a=e.changes.mapPos(s.pos);return s.pos=Math.min(a,e.state.doc.length),s})}return n}const zx=fn.define({}),qoe=ni.define({create(){return Rt.none},update(t,e){try{t=t.map(e.changes)}catch(n){return J.dao.channel().uploadLog("peerSelections",`error:${n==null?void 0:n.message}; }`),t=Rt.none,t}for(const n of e.effects)if(n.is(zx)){t=Rt.none;const r=n.value||{},i=J.dao.isPlayBack();if(GG(r))continue;const o=J.dao.currentAgentUserId();for(const s in n.value){const a=J.dao.getAgentUserById(s);if((s===o||(a==null?void 0:a.status)!=="online")&&!i)continue;const l=`user-selection-${a==null?void 0:a.color.slice(1)}`,c=n.value[s];if(!c)continue;const u=Ne.fromJSON(c),{ranges:f}=u,h=Rt.mark({class:l,attributes:{style:`background-color: ${WG((a==null?void 0:a.color)||"#F2B230",.4)}`}});document.querySelectorAll(".cm-selectionBackground").forEach(d=>{d.style.backgroundColor=a.color});for(const d of f){const p=Math.min(d.head,d.anchor),b=Math.max(d.head,d.anchor);p===b?t=Rt.none:t=t.update({add:[h.range(p,b)]})}}}return t},provide:t=>dt.decorations.from(t)}),IKe=[Uoe,qoe];var Lj;const zKe=[Uoe,qoe,Woe(((Lj=J.dao.currentAgentUser())==null?void 0:Lj.color)||"#F2B230",.4)],LKe=t=>{const{startVersion:e,agentUser:n}=t,r=Fr.fromClass(class{constructor(i){at(this,"pushing",!1);at(this,"view");at(this,"timer",null);at(this,"offlineToOnline",!1);at(this,"pendingPullOTUpdates",[]);at(this,"continueResolve",null);bt.log(`[Editor] \u8DEF\u5F84 - [ ${J.file.getOpenedPath()} ] - \u7684\u7F16\u8F91\u5668\u7684state\u5B9E\u4F8B\u521B\u5EFA`),this.view=i,this.syncUpdates(),this.onSyncSelected(),this.onSyncOTUpdates(),this.onPullUpdates(),this.monitorChannelStatus(),this.onPushUpdates()}syncUpdates(i){if(!J.file.getOpenedPath())return;const o=i==null?void 0:i.syncStartVersion;xe.file.syncDoc(!0),J.dao.channel().send("syncOTUpdates",{version:dH(o)?o:gT(this.view.state),path:J.file.getOpenedPath(),agentUserId:J.dao.currentAgentUserId(),fileRootId:J.file.fileRootId()})}onSyncSelected(){J.dao.channel().on(ht.SelectedUpdated,o=>{const{path:s,mapSelection:a}=o;J.file.getOpenedPath()===s&&this.receiveSelectionUpdates(a)})}monitorChannelStatus(){const i=J.dao.channel();i.addMessageEventListener(Gt.Offline,()=>{this.offlineToOnline=!1,this.pushing=!1}),i.addMessageEventListener(Gt.Online,()=>{J.file.syncDoc()||!J.file.getOpenedPath()||(this.offlineToOnline=!0,this.syncUpdates({type:"reconnect"}))})}receiveOTUpdates(i){if(!J.dao.channelAvailable())return;const{path:o,id:s,updates:a,mapSelection:l={}}=i;if(!D_(o)||J.file.updatedOTIds().includes(s))return;J.dao.channel().uploadLog("receiveOTUpdates",`id:${s}; OTIds:${J.file.updatedOTIds()}`),xe.file.updatedOTIds([...J.file.updatedOTIds(),i.id]);const c=xe.dao.setLatestDocContent,u=a.map(f=>({changes:Ri.fromJSON(f.changes),clientID:f.agentUserId}));this.view.dispatch(IX(this.view.state,u)),this.receiveSelectionUpdates(l),c(this.view.state.doc.toJSON().join(`
1146
1146
  `))}receiveSelectionUpdates(i){const o=J.file.doc();xe.file.doc({...o,mapSelection:i}),xe.file.mapSelection(i),this.view.dispatch({effects:zx.of(i)})}onPullUpdates(){J.dao.channel().on("pullOTUpdates",o=>{!D_(o.path)||!J.file.getOpenedPath()||(J.file.syncDoc()?this.pendingPullOTUpdates.push(o):this.receiveOTUpdates(o),J.dao.channel().uploadLog("consume-pullOTUpdates",`data:${JSON.stringify(o)}`))})}onPushUpdates(){J.dao.channel().on("pushOTUpdates",async o=>{const{path:s}=o;if(this.pushing=!1,!D_(s)||!J.file.getOpenedPath())return;if(o.result===3){xe.file.resetFile();return}if(o.updates&&o.result===0){const l=Math.max(0,J.file.pendingUpdateCount()-o.updates.length);xe.file.pendingUpdateCount(l),this.receiveOTUpdates(o),this.continueResolve&&this.continueResolve(!1),await this.isContinue();const c=fg(this.view.state);c.length&&this.push(c);return}if(o.result===2){this.syncUpdates({syncStartVersion:o.lastRevision});return}xe.file.refresh(),bt.log("[Editor] pushOTUpdates",o.message)})}onSyncOTUpdates(){J.dao.channel().on("syncOTUpdates",o=>{const{path:s,mapSelection:a={}}=o;if(!D_(s)){xe.file.syncDoc(!1);return}if(o.result===3){xe.file.resetFile(),xe.file.syncDoc(!1);return}const l=o.allUpdates.filter(d=>!J.file.updatedOTIds().includes(d.id)),c=l.map(d=>d.id);xe.file.updatedOTIds(J.file.updatedOTIds().concat(c));const f=l.map(d=>d.updates).flat().map(d=>({changes:Ri.fromJSON(d.changes),clientID:d.agentUserId})),h=fg(this.view.state);for(h&&this.push(h),f.length&&this.view.dispatch(IX(this.view.state,f)),this.receiveSelectionUpdates(a),xe.file.doc({...J.file.doc(),latestRevsion:gT(this.view.state)}),xe.file.syncDoc(!1);this.pendingPullOTUpdates.length;){const d=this.pendingPullOTUpdates.shift();d&&this.receiveOTUpdates(d)}this.offlineToOnline=!1})}isContinue(i=200){const o=i*(1+(Math.random()-.5));return new Promise(s=>{if(this.continueResolve)return!1;this.continueResolve=a=>{this.continueResolve=null,s(a)},setTimeout(()=>{this.continueResolve=null,s(!0)},o)})}update(i){this.validateBeforePush(i)}async validateBeforePush(i){if(this.pushing||!await this.isContinue())return;const o=i.docChanged||i.selectionSet,s=fg(this.view.state);if(!!s.length){if(i.docChanged&&xe.file.pendingUpdateCount(s.filter(a=>!a.changes.empty).length),!o||!J.dao.channelAvailable()){bt.log("[Editor] docChange",i.docChanged),bt.log("[Editor] selectionSet",i.selectionSet);return}if(J.file.syncDoc()){bt.log("[Editor] Syncing");return}this.push(s)}}async push(i){if(this.pushing||!i.length){bt.log("[Editor] pushing",this.pushing),bt.log("[Editor] updates.length",i.length);return}const o=i.some(a=>!a.changes.empty);if(!o&&i.length&&!this.view.hasFocus)return;this.pushing=!0;const s=gT(this.view.state);this.pushUpdates(s,i,o)}async pushUpdates(i,o,s){const a=J.dao.channel(),l=k6(),c=o.map(u=>{var f;return{agentUserId:u.clientID,changes:u.changes.toJSON(),selection:(f=u.origin.selection)==null?void 0:f.toJSON()}});a.send("pushOTUpdates",{uuid:l,path:J.file.doc().openedPath,updates:c,version:i,docChange:s,fileRootId:J.file.fileRootId()})}destroy(){const i=J.dao.channel();bt.log(`[Editor] \u8DEF\u5F84 - [ ${J.file.getOpenedPath()} ] - \u7684\u7F16\u8F91\u5668\u7684state\u9500\u6BC1`),xe.file.updatedOTIds([]),i.off(["pushOTUpdates","pullOTUpdates","syncOTUpdates",ht.SelectedUpdated]),i.removeMessageEventListener([Gt.Offline,Gt.Online])}});return[N7e({startVersion:e,clientID:n.agentUserId,sharedEffects:i=>i.selection?[fn.define().of(i.selection)]:[]}),IKe,r,Woe(n.color,.4)]};class MKe{constructor(e){at(this,"decorations",Rt.none);tv(e.state.doc.toJSON())&&this.buildDeco(e)}update(e){tv(e.state.doc.toJSON())?this.buildDeco(e.view):this.decorations=Rt.none}highlightLine(e,n,r){const i=[];for(let o=n;o<=r;o++){const s=e.state.doc.line(o);i.push([s.from,s.from,Rt.line({class:"dao__cm--blockquote_highlight"})])}return i}buildDeco(e){const n=new $u,r=[];e.viewportLineBlocks.forEach((i,o)=>{const s=e.state.doc.lineAt(i.from);if(vi(Tr.BLOCK_START).test(s.text)){let l="dao__cm--blockquote ";if(s.text.includes(`${AQ}`)&&(l=l+"hidden"),r.push([s.from,s.from,Rt.line({class:l})]),vi(Tr.BLOCK_START).test(s.text)){const u=vi(Tr.BLOCK_END),f=e.viewportLineBlocks.slice(o).find(h=>{const d=e.state.doc.lineAt(h.from);return u.test(d.text)});if(f){const h=e.state.doc.lineAt(f.from),d=this.highlightLine(e,s.number+1,h.number-1);r.push(...d)}}}}),r.sort((i,o)=>i[0]-o[0]),r.forEach(i=>{n.add(i[0],i[1],i[2])}),this.decorations=n.finish()}}var NKe=Fr.define(t=>new MKe(t),{decorations:t=>t.decorations});const DKe=[{name:"Java",type:"programming",extensions:[".java"]},{name:"Go",type:"programming",extensions:[".go"]},{name:"Ruby",type:"programming",extensions:[".rb",".builder",".fcgi",".gemspec",".god",".irbrc",".jbuilder",".mspec",".pluginspec",".podspec",".rabl",".rake",".rbuild",".rbw",".rbx",".ru",".ruby",".thor",".watchr"]},{name:"Python",type:"programming",extensions:[".py",".bzl",".cgi",".fcgi",".gyp",".lmi",".pyde",".pyp",".pyt",".pyw",".rpy",".tac",".wsgi",".xpy"]},{name:"C",type:"programming",extensions:[".c",".cats",".h",".idc",".w",".cpp",".c++",".cc",".cp",".cxx",".h",".h++",".hh",".hpp",".hxx",".inc",".inl",".ipp",".tcc",".tpp"]},{name:"Lua",type:"programming",extensions:[".lua",".fcgi",".nse",".pd_lua",".rbxs",".wlua"]},{name:"PHP",type:"programming",extensions:[".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"]},{name:"TypeScript",type:"programming",extensions:[".ts",".tsx",".js","._js",".bones",".es",".es6",".frag",".gs",".jake",".jsb",".jscad",".jsfl",".jsm",".jss",".njs",".pac",".sjs",".ssjs",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session",".xsjs",".xsjslib",".vue"]},{name:"Erlang",type:"programming",extensions:[".erl",".es",".escript",".hrl",".xrl",".yrl"]},{name:"C#",type:"programming",extensions:[".cs",".cake",".cshtml",".csx"]},{name:"Swift",type:"programming",extensions:[".swift"]},{name:"Rust",type:"programming",extensions:[".rs",".rs.in"]},{name:"Dart",type:"programming",extensions:[".dart"]},{name:"Clojure",type:"programming",extensions:[".clj",".boot",".cl2",".cljc",".cljs",".cljs.hl",".cljscm",".cljx",".hic"]},{name:"Kotlin",type:"programming",extensions:[".kt",".ktm",".kts"]},{name:"Objective-C",type:"programming",extensions:[".m",".h"]}].map(t=>(t.name=t.name.toLocaleLowerCase(),t)),XKe=(t,e,n,r)=>{const i={}.PAAS_CLIENT_DEBUG?{}.PASS_CLIENT_LSP_WORKSPACE_DIR:t.rootUri,o=J.file.doc(),s=o.openedPath.lastIndexOf(".");if(s===-1)return[];const a=o.openedPath.substring(s),l=DKe.find(u=>u.name===t.lspLanguageId.toLocaleLowerCase());return l?l.extensions.includes(a)?(e.client.ready&&e.client.initOpen({documentText:o.content,documentUri:`file://${i}/${o.openedPath}`,documentVersion:n,languageId:t.lspLanguageId}),kRe({...PE(t),transport:e.transport,client:e.client,version:n,keyWordsCompletions:r})):[]:[]},WKe={go:[".go"],java:[".java"],c:[".cpp",".c"],cpp:[".cpp",".c"],python:[".py"],node:[".js",".ts"],typescript:[".js",".ts"],ruby:[".rb",".ruby"],php:[".php"],lua:[".lua"],erlang:[".erl"],"c#":[".cs"],swift:[".swift"],rust:[".rs"],dart:[".dart"],clojure:[".clj"],kotlin:[".kt",".kts"],"objective-c":[".m"]};function UKe(){const t=J.file.getOpenedPath();let e=J.dao.playgroundInfo().lspLanguageId||"";e=e.toLocaleLowerCase();const n=t.substring(t.lastIndexOf(".")).toLocaleLowerCase();return!!(WKe[e]||[]).includes(n)}const qKe=dt.baseTheme({".dao__cm-breakpoint":{cursor:"default"},".dao__cm-breakpoint > .cm-gutterElement":{paddingLeft:"5px"},".dao__cm-default-breakpoint":{boxSizing:"border-box",position:"relative",zIndex:2,cursor:"pointer",width:"10px",height:"10px",borderRadius:"50%",transform:"translateY(49%)",marginBottom:0,padding:0,backgroundColor:"#D9574C"},".dao__cm-active-breakpoint":{boxSizing:"border-box",position:"relative",zIndex:2,cursor:"pointer",width:"10px",height:"10px",borderRadius:"50%",transform:"translateY(49%)",marginBottom:0,padding:0,backgroundColor:"#E5A82E"},".dao__cm-hover-breakpoint":{boxSizing:"border-box",position:"absolute",width:"10px",height:"10px",borderRadius:"50%",border:"1px solid rgba(255, 255, 255, 0.2)",transform:"translateY(49%)",zIndex:1,padding:0,cursor:"pointer"},".dao__cm-hover-breakpoint:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}}),BKe=dt.theme({".dao__cm-breakpoint > .cm-activeLineGutter":{position:"relative"},".dao__cm-breakpoint > .cm-activeLineGutter::after":{position:"absolute",top:0,left:"5px",content:'""',display:"inline-block",width:"10px",height:"10px",borderRadius:"50%",border:"1px solid rgba(255, 255, 255, 0.2)",transform:"translateY(49%)"}}),FKe=dt.theme({".dao__cm-breakpoint > .cm-activeLineGutter":{position:"relative"},".dao__cm-breakpoint > .cm-activeLineGutter::after":{content:'""',display:"none"}});let js;function Lx(){const{disableEditable:t}=J.dao.config(),e=J.dao.playgroundInfo().debugSupport,n=J.dao.isOpenDebugMode();return UKe()&&e&&n&&!t}const jm=fn.define({map:(t,e)=>({pos:e.mapPos(t.pos),on:t.on,active:t.active})}),u1=ni.define({create(t){js=Boe();const e=J.file.getOpenedPath(),r=J.file.getBreakPoints(e).map(i=>{const o=i.line;if(uu(o,t.doc.lines))return;const s=t.doc.line(o).from,a=js===i.line;return{from:s,to:s,value:new s5(a)}}).filter(i=>i);return Ir.of(r,!0)},update(t,e){t=t.map(e.changes);for(const n of e.effects)if(n.is(jm))if(n.value.on){const{status:r,isDebugLine:i}=n.value.active;r==="replace"?t=t.update({filter:o=>o!=n.value.pos,add:[new s5(i).range(n.value.pos)]}):t=t.update({add:[new s5(i).range(n.value.pos)]})}else t=t.update({filter:r=>r!=n.value.pos});return t}});function uu(t,e){return t>e}function Boe(){const t=J.file.getDebugStackFrame();if(t.length&&Xv(t)){const e=t[0].line,n=J.file.getOpenedPath();return J.file.getBreakPoints(n).some(o=>o.line===e)?t[0].line:void 0}}function Xv(t){var o,s,a;const e=J.dao.playgroundInfo().lspRootPath,r=((a=(s=(o=t[0])==null?void 0:o.source)==null?void 0:s.path)!=null?a:"").replace(`${e}`,"").substring(1);return J.file.getOpenedPath()===r}function YKe(t,e){if(!Lx())return;const n=t.state.doc.lineAt(e).number,r=J.file.getOpenedPath(),i=t.state.field(u1),o=[];i.between(0,t.state.doc.length,l=>{const c=t.state.doc.lineAt(l).number;o.push({line:c})});const s=o.findIndex(l=>l.line===+n);s===-1?o.push({line:+n}):o.splice(s,1);const a={[r]:o};J.dao.channel().emitBreakPoint({data:a,isOnlySyncData:!1})}class s5 extends Ic{constructor(n){super();at(this,"active");this.active=n}eq(n){return this.active==n.active}toDOM(){const n=document.createElement("p");return n.setAttribute("class",this.active?"dao__cm-active-breakpoint":"dao__cm-default-breakpoint"),n}}const jKe=new class extends Ic{toDOM(){const t=document.createElement("p");return t.classList.add("dao__cm-hover-breakpoint"),t}},bS=fn.define({map:(t,e)=>({pos:e.mapPos(t.pos),on:t.on})}),Mx=ni.define({create(){return Ir.empty},update(t,e){t=t.map(e.changes);for(const n of e.effects)n.is(bS)&&(n.value.on?t=t.update({add:[jKe.range(n.value.pos)]}):t=t.update({filter:r=>r!=n.value.pos}));return t}});function Foe(t,e){if(!Lx())return;const n=t.state.field(Mx),r=[];let i=!1;n.between(e,e,()=>{i=!0}),i||(n.between(0,t.state.doc.length,o=>{r.push(bS.of({pos:o,on:!1}))}),r.push(bS.of({pos:e,on:!0})),t.dispatch({effects:r}))}function Yoe(t){const e=t.state.field(Mx),n=[];e.between(0,t.state.doc.length,r=>{n.push(bS.of({pos:r,on:!1}))}),n.length&&t.dispatch({effects:n})}const ZKe=UK({class:"dao__cm-breakpoint",renderEmptyElements:!0,domEventHandlers:{mousedown(t,e){return YKe(t,e.from),!0},mouseover(t,e){return Foe(t,e.from),!0},mouseleave(t){return Yoe(t),!0}},markers:t=>[t.state.field(Mx),t.state.field(u1)],initialSpacer:()=>new s5(!1)}),VKe=Fr.fromClass(class{constructor(t){at(this,"view");at(this,"stackCallback");at(this,"breakPointCallBack");this.view=t,this.stackCallback=null,this.breakPointCallBack=null;const{breakpoints:e}=J.dao.debugCallback();e.length&&e.forEach(n=>{J.dao.channel().removeMessageListener(n)}),this.onBreakPoint(),this.onCallStack()}update(t){const e=t.startState.field(u1);let n=!1;if(e.between(0,t.startState.doc.length,()=>(n=!0,!1)),!(!Lx()||!n)&&(this.view=t.view,!!fg(this.view.state).length&&t.docChanged)){const r=J.file.getOpenedPath(),i=t.state.field(u1),o=[];i.between(0,t.state.doc.length,a=>{const l=t.state.doc.lineAt(a).number;o.push({line:l})});const s={[r]:o};xe.file.setBreakPoints(s,r),J.dao.channel().emitBreakPoint({data:s,isOnlySyncData:!0})}}onBreakPoint(){const t=J.dao.channel();this.breakPointCallBack=this.updateBreakPoint.bind(this),t.addMessageListener(this.breakPointCallBack);const{breakpoints:e,lineDecorator:n}=J.dao.debugCallback();e.push(this.breakPointCallBack),xe.dao.debugCallback({lineDecorator:n,breakpoints:e})}updateBreakPoint(t){const{name:e,payload:n}=t;try{if(e!==ht.SetBreakPoint)return;const{data:r,isOnlySyncData:i}=n;if(i)return;const o=J.file.getOpenedPath(),s=this.view.state.field(u1),a=[];s.between(0,this.view.state.doc.length,f=>{const h=this.view.state.doc.lineAt(f).number;a.push(h)});const c=(r[o]||[]).map(f=>f.line),u=[...a,...c].filter(f=>!(a.includes(f)&&c.includes(f)));if(u.length){const f=[];u.forEach(h=>{if(uu(h,this.view.state.doc.lines))return;const d=this.view.state.doc.line(h).from;let p=!1;js=Boe(),s.between(d,d,()=>{p=!0}),f.push(jm.of({pos:d,on:!p,active:{status:"update",isDebugLine:js===h}}))}),this.view.dispatch({effects:f})}}catch(r){bt.error(r)}}onCallStack(){const t=J.dao.channel();this.stackCallback=this.updateBreakPointByStack.bind(this),t.addMessageListener(this.stackCallback);const{breakpoints:e,lineDecorator:n}=J.dao.debugCallback();e.push(this.stackCallback),xe.dao.debugCallback({lineDecorator:n,breakpoints:e})}updateBreakPointByStack(t){var r;const{name:e,payload:n}=t;try{if(e!==ht.StoppedData)return;const{data:i}=n,o=((r=i.stack_trace_body)==null?void 0:r.stackFrames)||[],{state:s}=this.view;if(o.length){const a=[];if(Xv(o)){if(js!==void 0&&!uu(js,s.doc.lines)){const h=s.doc.line(js).from;a.push(jm.of({pos:h,on:!0,active:{status:"replace",isDebugLine:!1}})),js=void 0}const l=o[0].line,c=J.file.getOpenedPath();if(J.file.getBreakPoints(c).some(h=>h.line===l)&&!uu(l,this.view.state.doc.lines)){js=l;const h=this.view.state.doc.line(js).from;a.push(jm.of({pos:h,on:!0,active:{status:"replace",isDebugLine:!0}}))}this.view.dispatch({effects:a})}}else if(js!==void 0){const a=J.file.getOpenedPath();if(J.file.getBreakPoints(a).some(u=>u.line===js)&&!uu(js,this.view.state.doc.lines)){const u=this.view.state.doc.line(js).from,f=jm.of({pos:u,on:!0,active:{status:"replace",isDebugLine:!1}});this.view.dispatch({effects:f})}js=void 0}}catch(i){bt.error(i)}}destroy(){this.stackCallback&&J.dao.channel().removeMessageListener(this.stackCallback),this.breakPointCallBack&&J.dao.channel().removeMessageListener(this.breakPointCallBack);const t=J.dao.debugCallback();xe.dao.debugCallback({...t,breakpoints:[]})}});function GKe(){return[Mx,u1,qKe,ZKe,VKe]}const HKe=dt.baseTheme({".cm-completionIcon":{marginRight:"5px",display:"block"},".cm-completionIcon-keyword:after":{transform:"scale(0.5)",display:"block",fontSize:"15px",marginTop:"-7px",marginLeft:"-2px"},".cm-tooltip.cm-tooltip-autocomplete > ul":{backgroundColor:"rgba(23,24,26,.8) !important",border:"1px solid #3F3F3F"},".cm-tooltip-autocomplete > ul > li[aria-selected]":{backgroundColor:"rgba(255,255,255,.1) !important"},".cm-tooltip.lint":{whiteSpace:"pre"},".cm-tooltip-autocomplete > ul::-webkit-scrollbar":{width:"7px"},".cm-tooltip-autocomplete > ul::-webkit-scrollbar-thumb":{backgroundColor:"#333"},".cm-tooltip-autocomplete >ul::-webkit-scrollbar-track":{background:"transparent"},".cm-tooltip-autocomplete> ul::-webkit-scrollbar-corner":{background:"transparent"},".cm-tooltip.cm-tooltip-autocomplete > ul > li":{padding:"5px 3px !important",fontSize:"14px",lineHeight:"normal",display:"flex"},".cm-completionIcon-class":{transform:"translateY(1px)"},".cm-completionDetail":{marginLeft:"auto !important",float:"right",fontStyle:"normal !important",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",paddingRight:"8px",paddingLeft:"10px",maxWidth:"80%"},".cm-tooltip-lint .cm-diagnostic":{borderLeftWidth:"2px",padding:"6px",position:"relative",color:"rgba(255, 255, 255, 0.8)","&:last-child::after":{display:"none"}},".cm-tooltip-lint .cm-diagnosticText::selection":{background:"#1890ff !important",color:"#fff !important"},".cm-tooltip-lint .cm-diagnostic::after":{position:"absolute",content:"''",display:"block",height:"1px",left:"2px",right:0,bottom:0,background:"rgba(0, 0, 0, 0.2)",transform:"translateY(1px)"},".cm-gutter.cm-lineNumbers":{minWidth:"34px",cursor:"default"}}),KKe=dt.theme({".cm-gutter.cm-lineNumbers":{visibility:"visible"}}),JKe=dt.theme({".cm-gutter.cm-lineNumbers":{visibility:"hidden"}}),eJe=t=>{const n=J.dao.isPlayBack()?[]:[xee()];return[HKe,YK({domEventHandlers:{mouseover(r,i){return Foe(r,i.from),!0},mouseleave(r){return Yoe(r),!0}}}),GE(),ZE(),Y4(),...n,jE(),IK(),ir.allowMultipleSelections.of(!0),hee(),M4($C,{fallback:!0}),Qee(),Fee(),vv(),MK(),kne(),Mf.of([...t,...Zee,...ux,...Ene,...V4,..._ee,...AC,...GK]),dt.clickAddsSelectionRange.of(r=>r.altKey),dt.domEventHandlers({blur:(r,i)=>{const o=document.querySelector(".cm-layer.cm-selectionLayer");o&&o.replaceChildren(),i.contentDOM.blur();const s=J.file.getOpenedPath();J.dao.channel().editorBlur(s)}})]};var bg=function(){return bg=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},bg.apply(this,arguments)};function dp(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}var Jo=function(t){return/^-?\d+$/.test(t)},joe=function(t,e,n){n===void 0&&(n={from:void 0,to:void 0});var r=t.map(function(v){if(v.from=Jo(v.from)?v.from:void 0,v.to=Jo(v.to)?v.to:void 0,Jo(v.from)&&Jo(v.to)){var $=bg({},v);v.from=Math.min($.from,$.to),v.to=Math.max($.from,$.to)}return v}),i={from:Jo(e==null?void 0:e.from)?e==null?void 0:e.from:void 0,to:Jo(e==null?void 0:e.to)?e==null?void 0:e.to:void 0};if(Jo(i.from)&&Jo(i.to)){var o=bg({},i);i.from=Math.min(o.from,o.to),i.to=Math.max(o.from,o.to)}var s={from:Jo(n==null?void 0:n.from)?n==null?void 0:n.from:void 0,to:Jo(n==null?void 0:n.to)?n==null?void 0:n.to:void 0};if(Jo(s.from)&&Jo(s.to)){var a=bg({},s);s.from=Math.min(a.from,a.to),s.to=Math.max(a.from,a.to)}var l=r.map(function(v){return v.from}),c=dp(dp([],l,!0),[i==null?void 0:i.from,s==null?void 0:s.from],!1).filter(function(v){return v!==void 0}),u=r.map(function(v){return v.to}),f=dp(dp([],u,!0),[i==null?void 0:i.to,s==null?void 0:s.to],!1).filter(function(v){return v!==void 0}),h=dp(dp([],c,!0),f,!0),d=0,p=0;h.length>0&&(d=Math.max.apply(Math,h),p=Math.min.apply(Math,h));var b=Math.abs(d),y=Math.abs(p),O=Math.max(b,y)+1,m=-O;return r=r.map(function(v){return v.from=Jo(v.from)?v.from:m,v.to=Jo(v.to)?v.to:O,v}),i={from:Jo(i.from)?i.from:m,to:Jo(i.to)?i.to:O},s={from:Jo(s.from)?s.from:m,to:Jo(s.to)?s.to:O},r=r.slice().sort(function(v,$){var S=v.to-v.from,w=$.to-$.from;if(v.from>$.from)return 1;if(v.from===$.from){if(v.from+S>$.from+w)return-1;if(v.from+S===$.from+w)return 0;if(v.from+S<$.from+w)return 1}return-1}),Zoe(r,i,[],s).map(function(v){return{from:v.from===m?void 0:v.from,to:v.to===O?void 0:v.to}})},Zoe=function(t,e,n,r){var i=n;if(e===null||t.length===0)return e===null||n.some(function(l){return l.from===(e==null?void 0:e.from)&&l.to===(e==null?void 0:e.to)})||i.push(e),i=(i=i.filter(function(l){return l.from<=r.to&&l.to>=r.from})).map(function(l){return function(c,u){return{from:c.from<u.from?u.from:c.from,to:c.to>u.to?u.to:c.to}}(l,r)});var o=e.to-e.from;if(e.from>=t[0].from&&e.from<=t[0].to)e.from+o<=t[0].to?e=null:e.from=t[0].to+1;else if(e.from<t[0].from&&e.from+o>=t[0].from){var s=e.to,a={from:e.from,to:t[0].from-1};n.push(a),s>t[0].to?e.from=t[0].to+1:e=null}return t.shift(),Zoe(t,e,n,r)};const tJe=t=>ir.transactionFilter.of(e=>{const n=e.isUserEvent("delete.forward")||e.isUserEvent("delete.backward")||e.isUserEvent("delete.cut"),r=e.isUserEvent("delete.forward.smart")||e.isUserEvent("delete.backward.smart")||e.isUserEvent("delete.cut.smart");if(n&&!r){const{ranges:i}=e.startState.selection,{doc:o}=e.startState,s=[];return i.forEach(a=>{const{from:l,to:c}=a,u=o.lineAt(a.from);if(u.number>1&&o.lines>u.number){const f=o.line(u.number-1),h=o.line(u.number+1),d=vi(Tr.BLOCK_START),p=vi(Tr.BLOCK_END);d.test(f.text)&&p.test(h.text)&&(e.isUserEvent("delete.cut")&&l===c||e.isUserEvent("delete.backward")&&a.from-1===f.to||e.isUserEvent("delete.forward")&&a.from+1===h.from)&&s.push({from:u.from,to:u.to,insert:""})}}),s.length?{changes:s,annotations:Jr.userEvent.of(`${e.annotation(Jr.userEvent)}.smart`)}:e}if(e.isUserEvent("delete.selection")&&!e.isUserEvent("delete.selection.smart")){const i=e.startState.selection.ranges.map(o=>({from:o.from,to:o.to}));if(i.length>0){const o=t(e.startState);return joe(o,i[0],{from:0,to:e.startState.doc.line(e.startState.doc.lines).to}).map(a=>e.startState.update({changes:{from:a.from,to:a.to},annotations:Jr.userEvent.of(`${e.annotation(Jr.userEvent)}.smart`)}))}}return e}),nJe=t=>ir.changeFilter.of(e=>{var n,r,i,o;try{const s=t(e.startState),a=t(e.state),l=e.isUserEvent(oO),c=e.isUserEvent("input.complete");if(l||c)return!0;for(let u=0;u<s.length;u++){const f=(n=s[u].from)!=null?n:0,h=(r=s[u].to)!=null?r:e.startState.doc.line(e.startState.doc.lines).to,d=(i=a[u].from)!=null?i:0,p=(o=a[u].to)!=null?o:e.state.doc.line(e.state.doc.lines).to;if(e.startState.sliceDoc(f,h)!==e.state.sliceDoc(d,p))return!1}}catch{return!1}return!0}),rJe=t=>{const e=(n,r)=>{var i,o;try{const s=r.state.selection.ranges.map(l=>({from:l.from,to:l.to})),a=((o=(i=n==null?void 0:n.clipboardData)==null?void 0:i.getData("text"))==null?void 0:o.split(`
1147
1147
  `))||[];if(a!=null&&a.length&&a.find(c=>{const u=vi(Tr.BLOCK_START),f=vi(Tr.BLOCK_END);return u.test(c)||f.test(c)})){Br.error(Bn("\u4E0D\u80FD\u76F4\u63A5\u590D\u5236\u7B54\u9898\u533A\u57DF\u5185\u5BB9").toString()),n.preventDefault();return}if(s.length>0){const l=t(r.state);joe(l,s[0],{from:0,to:r.state.doc.line(r.state.doc.lines).to}).length||(Br.error(Bn("\u8BE5\u533A\u57DF\u4E0D\u53EF\u7F16\u8F91").toString()),n.preventDefault())}}catch{bt.debug("[smartPaste]error ")}};return dt.domEventHandlers({paste:e})},iJe=t=>[rJe(t),tJe(t),nJe(t)],Voe=t=>{if(!tv(t.doc.toJSON()))return[];const n=[],r=t.doc.lines,i=J.file.freezeCode();for(let o=1;o<=r;o++){const s=t.doc.line(o);let a=vi(Tr.BLOCK_END),l=vi(Tr.BLOCK_START);if((a.test(s.text)||l.test(s.text))&&n.push({from:s.from,to:s.to}),a=vi(Tr.BLOCK_END),l=vi(Tr.BLOCK_START),l.test(s.text)){for(let c=o+1;c<=r;c++){const u=t.doc.line(c);if(a.test(u.text)){o=c,n.push({from:u.from,to:u.to});break}}continue}i&&n.push({from:s.from,to:s.to})}return n};class oJe extends Jl{constructor(n){super();at(this,"state");this.state=n}toDOM(){var u,f;const n=document.createElement("span"),{data:r}=this.state;let{content:i}=this.state;const s=vi(Tr.BLOCK_END).test(i);i=(u=this.state.content)==null?void 0:u.replace(r,""),s&&(i=i.substring(0,10));const a=r==null?void 0:r.replace(/^\[|\]$/g,"");let l={};try{l=JSON.parse(a||"{}")}catch{bt.info("JSON Parse Wrong")}const c=(f=l.flag)==null?void 0:f.toString();if(console.log("jsonData: ",l),c){let h=i.split(`(${c})`);if(h.length<2){const p=h[0],b=p.indexOf("/*");h=[p.substring(0,b+2),p.substring(b+2)]}const d=document.createElement("span");h.reduce((p,b,y)=>{const O=document.createElement("span");if(O.textContent=b,y<h.length-1){const m=document.createElement("span");m.textContent=c,m.className="dao__cm--blockquote--container-flag",O.append(m)}return p.append(O),p},d),n.append(d)}else n.append(i);if(!s){const h=document.createElement("i");if(l.iconLabel){const p=document.createElement("span");p.innerHTML=l.iconLabel,p.className="icon-label",h.appendChild(p)}h.className=`d42 ${l.icon||"dao42__icon--question-circle"} d42-cursor-pointer`;const d=J.dao.channel();h.addEventListener("click",()=>{d.trigger(Gt.LineAction,{name:Gt.LineAction,payload:{...l}})}),n.appendChild(h)}return n.className="dao__cm--blockquote--container",s&&(n.className="dao__cm--blockquote--container transparent"),n}updateDOM(n){return!1}}const sJe=()=>new zK({regexp:vi(Tr.ALL_CUSTOM),decoration:(t,e,n)=>{const r=t[0],i=t[1],o=n,s=new oJe({view:e,pos:n,at:o,content:r,data:i});return Rt.replace({widget:s,side:1})}});class aJe{constructor(e){at(this,"decorator");at(this,"decorations",Rt.none);if(e){this.decorator=sJe();const n=tv(e.state.doc.toJSON());this.decorator&&n&&(this.decorations=this.decorator.createDeco(e))}}update(e){if(!tv(e.state.doc.toJSON())){this.decorations=Rt.none;return}(e.docChanged||e.viewportChanged)&&this.decorator&&this.decorations&&(this.decorations=this.decorator.updateDeco(e,this.decorations))}}var lJe=Fr.define(t=>new aJe(t),{decorations:t=>t.decorations});class cJe{constructor(){at(this,"editorElementList",[]);at(this,"previewElementList",[]);at(this,"currentScrollArea","editor")}syncPreviewScroll(){try{if(this.currentScrollArea!=="editor")return;const e=J.file.editorView(),n=J.file.preview(),{scrollRef:r,contentRef:i,treeData:o}=n;if(!i||!r||!e||Array.from(i.childNodes||[]).length===0)return;this.computedPosition(e,i,o);const a=e.scrollDOM.scrollTop;let l=0;if(a<=5){r.scrollTop=0;return}for(let c=0;c<this.editorElementList.length;c++)if(a<this.editorElementList[c]){l=c-1;break}if(a+5>=e.scrollDOM.scrollHeight-e.scrollDOM.clientHeight){r.scrollTop=r.scrollHeight-r.clientHeight;return}if(l>=0){const u=(a-this.editorElementList[l])/(this.editorElementList[l+1]-this.editorElementList[l])*(this.previewElementList[l+1]-this.previewElementList[l])+this.previewElementList[l];r.scrollTop=u}}catch(e){bt.error(e)}}syncEditorScroll(){try{if(this.currentScrollArea!=="preview")return;const e=J.file.editorView(),n=J.file.preview(),{scrollRef:r,contentRef:i,treeData:o}=n;if(!e||!r||!i||Array.from(i.childNodes||[]).length===0)return;this.computedPosition(e,i,o);const a=r.scrollTop;let l=0;if(a<=5){e.scrollDOM.scrollTop=0;return}for(let c=0;c<this.previewElementList.length;c++)if(a<this.previewElementList[c]){l=c-1;break}if(a+5>=r.scrollHeight-r.clientHeight){const c=e.scrollDOM;e.scrollDOM.scrollTop=c.scrollHeight-c.clientHeight;return}if(l>=0){const u=(a-this.previewElementList[l])/(this.previewElementList[l+1]-this.previewElementList[l])*(this.editorElementList[l+1]-this.editorElementList[l])+this.editorElementList[l];e.scrollDOM.scrollTop=u}}catch(e){bt.error(e)}}computedPosition(e,n,r){const o=Array.from(n.childNodes||[]).filter(s=>s.nodeType===1&&s.nodeName!="META");this.editorElementList=[],this.previewElementList=[],r.forEach((s,a)=>{var c,u,f;const l=e==null?void 0:e.lineBlockAt(s.position.start.offset);this.editorElementList.push((c=l==null?void 0:l.top)!=null?c:0),this.previewElementList.push((f=(u=o[a])==null?void 0:u.offsetTop)!=null?f:0)})}}const _g=new cJe,uJe=()=>[dt.domEventHandlers({scroll:CE((e,n)=>{var s;_g.syncPreviewScroll();const r=!((s=J.dao.currentAgentUser())!=null&&s.followingAgentUserId)&&J.dao.playgroundInfo().agentUsers.map(a=>a.followingAgentUserId).includes(J.dao.currentAgentUserId()),i={path:J.file.getOpenedPath(),scroll:{ratio:n.scrollDOM.scrollTop/(n.scrollDOM.scrollHeight-n.scrollDOM.getBoundingClientRect().height)}};r&&!J.dao.isPlayBack()&&J.dao.channel().editorScroll(i);const o=J.file.scrollTrigger();J.dao.isPlayBack()&&o!=="channel"&&J.dao.channel().trigger("editorScroll",{name:"editorScroll",payload:{...i}}),xe.file.scrollTrigger("")},80),mouseenter(){_g.currentScrollArea="editor"}})],fJe=Fr.fromClass(class{constructor(e){at(this,"view");at(this,"openedPath");this.view=e,this.onEditorScroll();const n=J.file.getOpenedPath();this.openedPath=n}initScroll(){const e=J.dao.waitingAreaInfo();if(Object.keys(e).length){const{type:n,id:r,text:i}=e;n==="jump"?J.dao.channel().transitionJumpToAreaById(r):n==="remove"&&J.dao.channel().transitionRemoveAreaTextById(r,i),xe.dao.waitingAreaInfo({})}}onEditorScroll(){J.dao.channel().off("editorScroll"),J.dao.channel().on("editorScroll",e=>{const n=J.dao.currentAgentUser();if((n==null?void 0:n.followingAgentUserId)===e.agentUserId||J.dao.isPlayBack()){const r=this.view.scrollDOM.scrollHeight-this.view.scrollDOM.getBoundingClientRect().height,i=e.data.scroll.ratio,o=r*i;this.view.scrollDOM.scrollTop=o,xe.file.scrollTrigger("channel")}})}destroy(){}});function U3(t){const[e,n]=z.exports.useState(t),r=z.exports.useCallback(i=>{i!==null&&n(i)},[]);return[e,r,n]}const v9=(t,e)=>{var s;let n=t.state.doc.toJSON(),r=vi(Tr.BLOCK_START);const i=n.filter(a=>r.test(a));(s=kT[e])==null||s.call(kT,t),n=t.state.doc.toJSON(),r=vi(Tr.BLOCK_START);const o=n.filter(a=>r.test(a));if(i.length!==o.length){const a=i.length>o.length?"remove":"add",[l,c]=o.length>i.length?[o,i]:[i,o],u=l.reduce((h,d)=>{if(!c.includes(d)){const p=d.match(/"id":(\d+),.*/);p&&p[1]&&h.push(p[1])}return h},[]),f={name:ht.UpdateArea,payload:{action:a,ids:u,file:J.file.doc().openedPath}};bt.info("[\u7B54\u9898\u533A\u57DF]Redo/Undo:",f),J.dao.channel().trigger(ht.UpdateArea,f)}},dJe=[{key:"Mod-s",run:()=>{const t=J.file.pendingUpdateCount();return Br.success(ue("div",{children:t?`\u8FD8\u6709${t}\u4E2A\u66F4\u65B0\u6B63\u5728\u5199\u5165\uFF0C\u8BF7\u7A0D\u7B49`:"\u4FDD\u5B58\u6210\u529F"})),t||J.dao.channel().manualRefresh(),!0},preventDefault:!0},{key:"Mod-p",run:()=>(xe.file.openSearch(),!0),preventDefault:!0},{key:"Mod-i",run:()=>(xe.dao.resetConsole(!0),J.dao.channel().xtermStatus({resetConsole:!0}),!0),preventDefault:!0},{key:"Mod-l",run:t=>eR(t),preventDefault:!0},{key:"Mod-z",run:t=>(v9(t,"undo"),!0),preventDefault:!0},{key:"Mod-y",run:t=>(v9(t,"redo"),!0),preventDefault:!0},{key:"Shift-Mod-z",run:t=>(v9(t,"redo"),!0),preventDefault:!0},{key:"Mod-u",run:t=>qC(t),preventDefault:!0},{key:"Mod-k Mod-c",run:t=>Ate(t),preventDefault:!0},{key:"Mod-k Mod-u",run:t=>Ite(t),preventDefault:!0},{key:"Alt-Enter",run:t=>Pne(t),preventDefault:!0},{key:"Mod-h",run:t=>F8(t),preventDefault:!0},{key:"Mod-k Mod-0",run:t=>yee(t),preventDefault:!0},{key:"Mod-k Mod-j",run:t=>bee(t),preventDefault:!0},{key:"Mod-ArrowDown",run:t=>{const{scrollDOM:e}=t;return e.scrollTop=e.scrollTop+t.defaultLineHeight,!0},preventDefault:!0},{key:"Mod-ArrowUp",run:t=>{const{scrollDOM:e}=t;return e.scrollTop=e.scrollTop-t.defaultLineHeight,!0},preventDefault:!0},{key:"Shift-Alt-i",run:()=>!0,preventDefault:!0},{key:"Mod-Alt-f",run:t=>{const e=J.file.doc().ext;return["py","go"].includes(e)?hJe(t):OJe(t),!0},preventDefault:!0},{key:"Tab",run:t=>{const{state:e}=t,n=e.changeByRange(r=>{const{from:i,to:o}=r,s=e.doc.lineAt(i).number,a=e.doc.lineAt(o).number;if(s===a){const l=e.facet(Qf);return{changes:{from:i,to:o,insert:l},range:Ne.cursor(r.from+l.length)}}else{let l=-1;const c=[];for(let f=r.from;f<=r.to;){const h=e.doc.lineAt(f);h.number>l&&(r.empty||r.to>h.from)&&(c.push({from:h.from,insert:e.facet(Qf)}),l=h.number),f=h.to+1}const u=e.changes(c);return{changes:c,range:Ne.range(u.mapPos(r.anchor,1),u.mapPos(r.head,1))}}});return t.dispatch(e.update(n,{userEvent:"input.indent"})),!0},preventDefault:!0}];async function hJe(t){var e;try{const{scrollDOM:n,state:r}=t,i=r.selection.main.head,o=r.doc.lineAt(i).number,s=n.scrollTop,a=J.file.doc().openedPath,l=J.file.lspClient();if(l){const c=J.dao.playgroundInfo().lspRootPath,u={}.PAAS_CLIENT_DEBUG?{}.PASS_CLIENT_LSP_WORKSPACE_DIR:c,f=await l.textDocumentFormatting({textDocument:{uri:`file://${u}/${a}`},options:{tabSize:t.state.tabSize,insertSpaces:!0}});if(f&&((e=f.result)==null?void 0:e.length)){const h=f.result,d=[];h.forEach(y=>{var v;const O=ef(r.doc,y.range.start),m=(v=ef(r.doc,y.range.end))!=null?v:r.doc.length;if(O!==void 0&&m!==void 0){const $=mv(t.state,y.newText,O,m);d.push($)}}),t.dispatch(...d);const p=t.state.doc.lines,b=o>p?t.state.doc.line(p).from:t.state.doc.line(o).from;t.dispatch({selection:{anchor:b}}),n.scrollTop=s}}}catch(n){bt.error("\u683C\u5F0F\u5316\u5931\u8D25,\u9519\u8BEF\u4E3A:",n)}}function OJe(t){const{scrollDOM:e,state:n}=t,r=n.selection.main.head,i=n.doc.lineAt(r).number,o=e.scrollTop,s=t.state.doc.toString(),a=J.file.getOpenedPath(),l=t.state.tabSize,c=J.dao.channel();c.on("pullFormatCode",u=>{try{const f=J.file.getOpenedPath();if(!f||f&&f!==u.filePath)return;const h=mv(n,u.code,0,n.doc.length);t.dispatch(h);const d=t.state.doc.lines,p=i>d?t.state.doc.line(d).from:t.state.doc.line(i).from;t.dispatch({selection:{anchor:p}}),e.scrollTop=o,c.off(["pullFormatCode"])}catch(f){bt.error("\u683C\u5F0F\u5316\u5931\u8D25,\u9519\u8BEF\u4E3A:",f)}}),J.dao.channel().emitFormatCode({code:s,filePath:a,tabSize:l})}const pJe=dt.baseTheme({"&light .dao__cm-debug-line-decorator":{backgroundColor:"rgba(229, 168, 46, 0.2) !important"},"&dark .dao__cm-debug-line-decorator":{backgroundColor:"rgba(229, 168, 46, 0.2) !important"}}),fB=Rt.line({attributes:{class:"dao__cm-debug-line-decorator"}}),q3=fn.define(),mJe=ni.define({create(t){const e=J.file.getDebugStackFrame();if(e.length){if(Xv(e)){const n=e[0].line;if(uu(n,t.doc.lines))return Rt.none;const r=t.doc.line(n).from,i=[{from:r,to:r,value:fB}];return Ir.of(i,!0)}return Rt.none}else return Rt.none},update(t,e){t=t.map(e.changes);for(const n of e.effects)n.is(q3)&&(t=Rt.none,n.value!==void 0&&(t=t.update({add:[fB.range(n.value)]})));return t},provide:t=>dt.decorations.from(t)}),gJe=Fr.fromClass(class{constructor(t){at(this,"view");at(this,"callback");this.view=t,this.callback=null;const{lineDecorator:e}=J.dao.debugCallback();e.length&&e.forEach(r=>{J.dao.channel().removeMessageListener(r)}),this.onCallStack(),Promise.resolve().then(()=>{this.syncActiveLineAndScroll()})}syncActiveLineAndScroll(){var e;const t=J.file.getDebugStackFrame();if(t.length&&Xv(t)){const n=t[0].line,{state:r}=this.view;if(uu(n,r.doc.lines))return;const i=r.doc.line(n).from;(e=this.view)==null||e.dispatch({effects:dt.scrollIntoView(i,{y:"center"})})}}onCallStack(){const t=J.dao.channel();this.callback=this.updateLineDecorator.bind(this),t.addMessageListener(this.callback);const{breakpoints:e,lineDecorator:n}=J.dao.debugCallback();n.push(this.callback),xe.dao.debugCallback({lineDecorator:n,breakpoints:e})}updateLineDecorator(t){var r,i,o;const{name:e,payload:n}=t;try{if(!this.view||e!==ht.StoppedData)return;const{data:s}=n,a=((r=s.stack_trace_body)==null?void 0:r.stackFrames)||[];if(a.length){if(Xv(a)){const l=a[0].line,{state:c}=this.view;if(uu(l,c.doc.lines))return;const u=c.doc.line(l).from;(i=this.view)==null||i.dispatch({effects:[q3.of(u),dt.scrollIntoView(u,{y:"center"})]})}}else(o=this.view)==null||o.dispatch({effects:q3.of(void 0)})}catch(s){bt.error(s)}}destroy(){this.callback&&J.dao.channel().removeMessageListener(this.callback);const t=J.dao.debugCallback();xe.dao.debugCallback({...t,lineDecorator:[]})}});function vJe(){return[pJe,mJe,gJe]}class yJe{constructor(e,n){at(this,"menuData");at(this,"varible");at(this,"dom");at(this,"expandItems");at(this,"unconsumedExpandItems");at(this,"variablesBodyMap");at(this,"callback");const{variablesReference:r}=n;this.varible=n,this.dom=e,this.expandItems=[],this.unconsumedExpandItems=new Map,this.callback=null,this.createMenuStyle(),this.variablesBodyMap=J.file.getDebugVariablesBodyMap(),this.menuData=this.firstLevelVariblesToMenuData(r),this.onCallStack()}onCallStack(){const e=J.dao.channel();this.callback=this.updateTreeList.bind(this),e.addMessageListener(this.callback)}updateTreeList(e){const{name:n,payload:r}=e;try{if(n!==ht.StoppedData)return;const{data:i}=r;this.update(i)}catch(i){bt.error(i)}}createMenuStyle(){const e="d42-debug-hover-widget-style";if(document.getElementById(e))return;const r=document.createElement("style");r.id=e,r.innerHTML=`
1148
1148
  .d42-debug-hover-list {