@dao42/d42paas-front 0.9.16 → 0.9.17-alpha.0
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 +1 -1
- package/dist/sdk/docs/interfaces/BrowserProps.html +5 -5
- package/dist/sdk/docs/interfaces/Component.html +2 -2
- package/dist/sdk/docs/interfaces/ConsoleOrShellProps.html +8 -8
- package/dist/sdk/docs/interfaces/DiffPatternInfo.html +1 -1
- package/dist/sdk/docs/interfaces/EditorProps.html +4 -4
- package/dist/sdk/docs/interfaces/IDaoPaaS.html +9 -9
- package/dist/sdk/docs/interfaces/MenuTagProps.html +1 -1
- package/dist/sdk/docs/interfaces/PaaSOptions.html +4 -4
- package/dist/sdk/docs/interfaces/TreeProps.html +8 -8
- package/dist/sdk/docs/modules.html +2 -2
- package/package.json +1 -1
package/dist/DaoPaaS.cjs
CHANGED
|
@@ -401,7 +401,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
|
|
|
401
401
|
color: #a0a0a0;
|
|
402
402
|
width: 200px;
|
|
403
403
|
}
|
|
404
|
-
`,JH=()=>ae(KH,{children:vt("div",{className:"d42-preloader",children:[ae("svg",{className:"d42-first-svg",version:"1.1",id:"sun",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"10px",height:"10px",viewBox:"0 0 10 10",enableBackground:"new 0 0 10 10",xmlSpace:"preserve",children:vt("g",{children:[ae("path",{fill:"none",d:"M6.942,3.876c-0.4-0.692-1.146-1.123-1.946-1.123c-0.392,0-0.779,0.104-1.121,0.301c-1.072,0.619-1.44,1.994-0.821,3.067C3.454,6.815,4.2,7.245,5,7.245c0.392,0,0.779-0.104,1.121-0.301C6.64,6.644,7.013,6.159,7.167,5.581C7.321,5,7.243,4.396,6.942,3.876z M6.88,5.505C6.745,6.007,6.423,6.427,5.973,6.688C5.676,6.858,5.34,6.948,5,6.948c-0.695,0-1.343-0.373-1.69-0.975C2.774,5.043,3.093,3.849,4.024,3.312C4.32,3.14,4.656,3.05,4.996,3.05c0.695,0,1.342,0.374,1.69,0.975C6.946,4.476,7.015,5,6.88,5.505z"}),ae("path",{fill:"none",d:"M8.759,2.828C8.718,2.757,8.626,2.732,8.556,2.774L7.345,3.473c-0.07,0.041-0.094,0.132-0.053,0.202C7.319,3.723,7.368,3.75,7.419,3.75c0.025,0,0.053-0.007,0.074-0.02l1.211-0.699C8.774,2.989,8.8,2.899,8.759,2.828z"}),ae("path",{fill:"none",d:"M1.238,7.171c0.027,0.047,0.077,0.074,0.128,0.074c0.025,0,0.051-0.008,0.074-0.02l1.211-0.699c0.071-0.041,0.095-0.133,0.054-0.203S2.574,6.228,2.503,6.269l-1.21,0.699C1.221,7.009,1.197,7.101,1.238,7.171z"}),ae("path",{fill:"none",d:"M6.396,2.726c0.052,0,0.102-0.026,0.13-0.075l0.349-0.605C6.915,1.976,6.89,1.885,6.819,1.844c-0.07-0.042-0.162-0.017-0.202,0.054L6.269,2.503C6.228,2.574,6.251,2.666,6.322,2.706C6.346,2.719,6.371,2.726,6.396,2.726z"}),ae("path",{fill:"none",d:"M3.472,7.347L3.123,7.952c-0.041,0.07-0.017,0.162,0.054,0.203C3.2,8.169,3.226,8.175,3.25,8.175c0.052,0,0.102-0.027,0.129-0.074l0.349-0.605c0.041-0.07,0.017-0.16-0.054-0.203C3.603,7.251,3.513,7.276,3.472,7.347z"}),ae("path",{fill:"none",d:"M3.601,2.726c0.025,0,0.051-0.007,0.074-0.02C3.746,2.666,3.77,2.574,3.729,2.503l-0.35-0.604C3.338,1.828,3.248,1.804,3.177,1.844C3.106,1.886,3.082,1.976,3.123,2.047l0.35,0.604C3.5,2.7,3.549,2.726,3.601,2.726z"}),ae("path",{fill:"none",d:"M6.321,7.292c-0.07,0.043-0.094,0.133-0.054,0.203l0.351,0.605c0.026,0.047,0.076,0.074,0.127,0.074c0.025,0,0.051-0.006,0.074-0.02c0.072-0.041,0.096-0.133,0.055-0.203l-0.35-0.605C6.483,7.276,6.393,7.253,6.321,7.292z"}),ae("path",{fill:"none",d:"M2.202,5.146c0.082,0,0.149-0.065,0.149-0.147S2.284,4.851,2.202,4.851H1.503c-0.082,0-0.148,0.066-0.148,0.148s0.066,0.147,0.148,0.147H2.202z"}),ae("path",{fill:"none",d:"M8.493,4.851H7.794c-0.082,0-0.148,0.066-0.148,0.148s0.066,0.147,0.148,0.147l0,0h0.699c0.082,0,0.148-0.065,0.148-0.147S8.575,4.851,8.493,4.851L8.493,4.851z"}),ae("path",{fill:"none",d:"M5.146,2.203V0.805c0-0.082-0.066-0.148-0.148-0.148c-0.082,0-0.148,0.066-0.148,0.148v1.398c0,0.082,0.066,0.149,0.148,0.149C5.08,2.352,5.146,2.285,5.146,2.203z"}),ae("path",{fill:"none",d:"M4.85,7.796v1.396c0,0.082,0.066,0.15,0.148,0.15c0.082,0,0.148-0.068,0.148-0.15V7.796c0-0.082-0.066-0.148-0.148-0.148C4.917,7.647,4.85,7.714,4.85,7.796z"}),ae("path",{fill:"none",d:"M2.651,3.473L1.44,2.774C1.369,2.732,1.279,2.757,1.238,2.828C1.197,2.899,1.221,2.989,1.292,3.031l1.21,0.699c0.023,0.013,0.049,0.02,0.074,0.02c0.051,0,0.101-0.026,0.129-0.075C2.747,3.604,2.722,3.514,2.651,3.473z"}),ae("path",{fill:"none",d:"M8.704,6.968L7.493,6.269c-0.07-0.041-0.162-0.016-0.201,0.055c-0.041,0.07-0.018,0.162,0.053,0.203l1.211,0.699c0.023,0.012,0.049,0.02,0.074,0.02c0.051,0,0.102-0.027,0.129-0.074C8.8,7.101,8.776,7.009,8.704,6.968z"})]})}),ae("svg",{version:"1.1",id:"cloud",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"10px",height:"10px",viewBox:"0 0 10 10",enableBackground:"new 0 0 10 10",xmlSpace:"preserve",children:ae("path",{fill:"none",d:"M8.528,5.624H8.247c-0.085,0-0.156-0.068-0.156-0.154c0-0.694-0.563-1.257-1.257-1.257c-0.098,0-0.197,0.013-0.3,0.038C6.493,4.259,6.45,4.252,6.415,4.229C6.38,4.208,6.356,4.172,6.348,4.131C6.117,3.032,5.135,2.235,4.01,2.235c-1.252,0-2.297,0.979-2.379,2.23c-0.004,0.056-0.039,0.108-0.093,0.13C1.076,4.793,0.776,5.249,0.776,5.752c0,0.693,0.564,1.257,1.257,1.257h6.495c0.383,0,0.695-0.31,0.695-0.692S8.911,5.624,8.528,5.624z"})}),vt("div",{className:"rain",children:[ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"})]}),ae("div",{className:"text",children:"Loading......"})]})}),eK="@dao42/d42paas-front",tK="0.9.15",rK="d42paas front",nK="dao42 paas team",iK="https://github.com/dao42/d42paas_frontend#readme",oK="UNLICENSED",aK="./dist/DaoPaaS.cjs",sK="./dist/DaoPaaS.cjs",lK="./dist/DaoPaaS.d.ts",cK={prebuild:"rimraf dist",build:"cross-env VITE_BUILD_EVENT=true pnpm tsc && pnpm vite && pnpm typedoc",copydist:"cp -r dist/sdk ../demo/public/",vite:"vite build --config ./config/vite.config.ts && shx cp ./src/types/DaoPaaS.d.ts ./dist",typedoc:"npx typedoc --tsconfig ./doc.tsconfig.json",workNameSpaceToFix:"node ./config/workNameSpaceToFix.js",tsc:"tsc -p ./tsconfig.json --isolatedModules false",test:"jest --coverage",prepublish:"pnpm build",publish:"npm publish --access public"},uK={"@codemirror/autocomplete":"^6.0.0","@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.0.0","@codemirror/legacy-modes":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.0.0","@emotion/babel-plugin":"^11.3.0","@emotion/babel-preset-css-prop":"^11.2.0","@emotion/core":"^11.0.0","@emotion/css":"^11.1.3","@emotion/eslint-plugin":"^11.2.0","@emotion/react":"^11.4.1","@emotion/styled":"^11.3.0","@headlessui/react":"^1.4.3","@loadable/component":"^5.15.2","@rsuite/icons":"^1.0.2","@testing-library/jest-dom":"^5.16.2","@testing-library/react":"^12.1.4","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/loadable__component":"^5.13.4","@types/lodash":"^4.14.175","@types/lodash.clonedeep":"^4.5.7","@types/lodash.isequal":"^4.5.6","@types/node":"^16.11.1","@types/ot":"^0.0.5","@types/react":"^17.0.24","@types/react-dom":"^17.0.9","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","@udecode/zustood":"^1.1.1","@uiw/react-codemirror":"^4.7.0","@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",immer:"^9.0.14",jest:"27.0.6",lodash:"^4.17.21",msw:"^0.39.2","ninja-keys":"^1.1.12",ot:"^0.0.15",prettier:"^2.3.2",react:"^17.0.2","react-complex-tree":"^1.1.6","react-dom":"^17.0.2","react-icons":"^4.3.1","react-markdown":"^8.0.0","reconnecting-websocket":"^4.4.0","rehype-katex":"^6.0.2","remark-math":"^5.1.1",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.6.0",rsuite:"5.6.4",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","use-immer":"^0.7.0","utf-8-validate":"^5.0.9",uuid:"^8.3.2",vite:"^2.7.2","vite-plugin-html":"^3.0.6","whatwg-fetch":"^3.6.2",xterm:"^4.13.0","xterm-addon-attach":"^0.6.0","xterm-addon-fit":"^0.5.0",zustand:"^4.0.0-rc.1"},fK=["dist"],dK={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},pK={url:"https://github.com/dao42/d42paas_frontend/issues"},hK={workerDirectory:"src"},OK={"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0"};var mK={name:eK,version:tK,description:rK,author:nK,homepage:iK,license:oK,main:aK,module:sK,types:lK,scripts:cK,devDependencies:uK,files:fK,repository:dK,bugs:pK,msw:hK,dependencies:OK};const gK=()=>mK.version,vK=async(t,e,r)=>{const o=await(await fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:r})})).json();if(o.status==="failure")throw console.error(o),new Error(o.errors[0].erromsg);return o.data},yK=t=>{const e=Ce.dao.playgroundInfo().fileTree;let r=null;const n=o=>{if(o.path===t){r=o;return}else for(let a=0;a<o.children.length;a++)n(o.children[a])};return n(e),r},bK=t=>{if(!t)throw new Error("username can't be blank");return`https://ui-avatars.com/api/?background=e9f3f0&rounded=true&uppercase=true&bold=true&length=1&name=${t}`},ua=Object.create(null);ua.open="0";ua.close="1";ua.ping="2";ua.pong="3";ua.message="4";ua.upgrade="5";ua.noop="6";const Dh=Object.create(null);Object.keys(ua).forEach(t=>{Dh[ua[t]]=t});const wK={type:"error",data:"parser error"},xK=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",QK=typeof ArrayBuffer=="function",PK=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,$C=({type:t,data:e},r,n)=>xK&&e instanceof Blob?r?n(e):N$(e,n):QK&&(e instanceof ArrayBuffer||PK(e))?r?n(e):N$(new Blob([e]),n):n(ua[t]+(e||"")),N$=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+n)},r.readAsDataURL(t)},B$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let t=0;t<B$.length;t++)Wf[B$.charCodeAt(t)]=t;const SK=t=>{let e=t.length*.75,r=t.length,n,o=0,a,c,u,f;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const i=new ArrayBuffer(e),s=new Uint8Array(i);for(n=0;n<r;n+=4)a=Wf[t.charCodeAt(n)],c=Wf[t.charCodeAt(n+1)],u=Wf[t.charCodeAt(n+2)],f=Wf[t.charCodeAt(n+3)],s[o++]=a<<2|c>>4,s[o++]=(c&15)<<4|u>>2,s[o++]=(u&3)<<6|f&63;return i},$K=typeof ArrayBuffer=="function",kC=(t,e)=>{if(typeof t!="string")return{type:"message",data:_C(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:kK(t.substring(1),e)}:Dh[r]?t.length>1?{type:Dh[r],data:t.substring(1)}:{type:Dh[r]}:wK},kK=(t,e)=>{if($K){const r=SK(t);return _C(r,e)}else return{base64:!0,data:t}},_C=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},RC=String.fromCharCode(30),_K=(t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((a,c)=>{$C(a,!1,u=>{n[c]=u,++o===r&&e(n.join(RC))})})},RK=(t,e)=>{const r=t.split(RC),n=[];for(let o=0;o<r.length;o++){const a=kC(r[o],e);if(n.push(a),a.type==="error")break}return n},TC=4;function Hr(t){if(t)return TK(t)}function TK(t){for(var e in Hr.prototype)t[e]=Hr.prototype[e];return t}Hr.prototype.on=Hr.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Hr.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};Hr.prototype.off=Hr.prototype.removeListener=Hr.prototype.removeAllListeners=Hr.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+t],this};Hr.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this};Hr.prototype.emitReserved=Hr.prototype.emit;Hr.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Hr.prototype.hasListeners=function(t){return!!this.listeners(t).length};const hs=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function CC(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const CK=setTimeout,WK=clearTimeout;function Tg(t,e){e.useNativeTimers?(t.setTimeoutFn=CK.bind(hs),t.clearTimeoutFn=WK.bind(hs)):(t.setTimeoutFn=setTimeout.bind(hs),t.clearTimeoutFn=clearTimeout.bind(hs))}const zK=1.33;function XK(t){return typeof t=="string"?EK(t):Math.ceil((t.byteLength||t.size)*zK)}function EK(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}class qK extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class WC extends Hr{constructor(e){super(),this.writable=!1,Tg(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,r,n){return super.emitReserved("error",new qK(e,r,n)),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 r=kC(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const zC="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Uy=64,MK={};let F$=0,Np=0,G$;function j$(t){let e="";do e=zC[t%Uy]+e,t=Math.floor(t/Uy);while(t>0);return e}function XC(){const t=j$(+new Date);return t!==G$?(F$=0,G$=t):t+"."+j$(F$++)}for(;Np<Uy;Np++)MK[zC[Np]]=Np;function EC(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function UK(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let a=r[n].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}let qC=!1;try{qC=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch{}const AK=qC;function MC(t){const e=t.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!e||AK))return new XMLHttpRequest}catch{}if(!e)try{return new hs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function LK(){}const IK=function(){return new MC({xdomain:!1}).responseType!=null}();class DK extends WC{constructor(e){if(super(e),this.polling=!1,typeof location!="undefined"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location!="undefined"&&e.hostname!==location.hostname||o!==e.port,this.xs=e.secure!==n}const r=e&&e.forceBase64;this.supportsBinary=IK&&!r}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let n=0;this.polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};RK(e,this.socket.binaryType).forEach(r),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,_K(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const r=this.opts.secure?"https":"http";let n="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=XC()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(r==="https"&&Number(this.opts.port)!==443||r==="http"&&Number(this.opts.port)!==80)&&(n=":"+this.opts.port);const o=EC(e),a=this.opts.hostname.indexOf(":")!==-1;return r+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(o.length?"?"+o:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new aa(this.uri(),e)}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class aa extends Hr{constructor(e,r){super(),Tg(this,r),this.opts=r,this.method=r.method||"GET",this.uri=e,this.async=r.async!==!1,this.data=r.data!==void 0?r.data:null,this.create()}create(){const e=CC(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const r=this.xhr=new MC(e);try{r.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let n in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this.opts.extraHeaders[n])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(n){this.setTimeoutFn(()=>{this.onError(n)},0);return}typeof document!="undefined"&&(this.index=aa.requestsCount++,aa.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=LK,e)try{this.xhr.abort()}catch{}typeof document!="undefined"&&delete aa.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()}}aa.requestsCount=0;aa.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",H$);else if(typeof addEventListener=="function"){const t="onpagehide"in hs?"pagehide":"unload";addEventListener(t,H$,!1)}}function H$(){for(let t in aa.requests)aa.requests.hasOwnProperty(t)&&aa.requests[t].abort()}const YK=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0))(),Bp=hs.WebSocket||hs.MozWebSocket,K$=!0,ZK="arraybuffer",J$=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VK extends WC{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),r=this.opts.protocols,n=J$?{}:CC(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=K$&&!J$?r?new Bp(e,r):new Bp(e):new Bp(e,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||ZK,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 r=0;r<e.length;r++){const n=e[r],o=r===e.length-1;$C(n,this.supportsBinary,a=>{const c={};try{K$&&this.ws.send(a)}catch{}o&&YK(()=>{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 r=this.opts.secure?"wss":"ws";let n="";this.opts.port&&(r==="wss"&&Number(this.opts.port)!==443||r==="ws"&&Number(this.opts.port)!==80)&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=XC()),this.supportsBinary||(e.b64=1);const o=EC(e),a=this.opts.hostname.indexOf(":")!==-1;return r+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(o.length?"?"+o:"")}check(){return!!Bp}}const NK={websocket:VK,polling:DK},BK=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,FK=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ay(t){const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=BK.exec(t||""),a={},c=14;for(;c--;)a[FK[c]]=o[c]||"";return r!=-1&&n!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=GK(a,a.path),a.queryKey=jK(a,a.query),a}function GK(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.substr(0,1)=="/"||e.length===0)&&n.splice(0,1),e.substr(e.length-1,1)=="/"&&n.splice(n.length-1,1),n}function jK(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,a){o&&(r[o]=a)}),r}class cs extends Hr{constructor(e,r={}){super(),e&&typeof e=="object"&&(r=e,e=null),e?(e=Ay(e),r.hostname=e.host,r.secure=e.protocol==="https"||e.protocol==="wss",r.port=e.port,e.query&&(r.query=e.query)):r.host&&(r.hostname=Ay(r.host).host),Tg(this,r),this.secure=r.secure!=null?r.secure:typeof location!="undefined"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=r.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=UK(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 r=Object.assign({},this.opts.query);r.EIO=TC,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts.transportOptions[e],this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new NK[e](n)}open(){let e;if(this.opts.rememberUpgrade&&cs.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",r=>this.onClose("transport close",r))}probe(e){let r=this.createTransport(e),n=!1;cs.priorWebsocketSuccess=!1;const o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",l=>{if(!n)if(l.type==="pong"&&l.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;cs.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(s(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=r.name,this.emitReserved("upgradeError",p)}}))};function a(){n||(n=!0,s(),r.close(),r=null)}const c=l=>{const p=new Error("probe error: "+l);p.transport=r.name,a(),this.emitReserved("upgradeError",p)};function u(){c("transport closed")}function f(){c("socket closed")}function i(l){r&&l.name!==r.name&&a()}const s=()=>{r.removeListener("open",o),r.removeListener("error",c),r.removeListener("close",u),this.off("close",f),this.off("upgrading",i)};r.once("open",o),r.once("error",c),r.once("close",u),this.once("close",f),this.once("upgrading",i),r.open()}onOpen(){if(this.readyState="open",cs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let e=0;const r=this.upgrades.length;for(;e<r;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 r=new Error("server error");r.code=e.data,this.onError(r);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 r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=XK(o)),n>0&&r>this.maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}write(e,r,n){return this.sendPacket("message",e,r,n),this}send(e,r,n){return this.sendPacket("message",e,r,n),this}sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:e,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}onError(e){cs.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,r){(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,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const r=[];let n=0;const o=e.length;for(;n<o;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}cs.protocol=TC;function HK(t,e="",r){let n=t;r=r||typeof location!="undefined"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r!="undefined"?t=r.protocol+"//"+t:t="https://"+t),n=Ay(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+e,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const KK=typeof ArrayBuffer=="function",JK=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,UC=Object.prototype.toString,eJ=typeof Blob=="function"||typeof Blob!="undefined"&&UC.call(Blob)==="[object BlobConstructor]",tJ=typeof File=="function"||typeof File!="undefined"&&UC.call(File)==="[object FileConstructor]";function J5(t){return KK&&(t instanceof ArrayBuffer||JK(t))||eJ&&t instanceof Blob||tJ&&t instanceof File}function Yh(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Yh(t[r]))return!0;return!1}if(J5(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Yh(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Yh(t[r]))return!0;return!1}function rJ(t){const e=[],r=t.data,n=t;return n.data=Ly(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Ly(t,e){if(!t)return t;if(J5(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Ly(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Ly(t[n],e));return r}return t}function nJ(t,e){return t.data=Iy(t.data,e),t.attachments=void 0,t}function Iy(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=Iy(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Iy(t[r],e));return t}const iJ=5;var Pt;(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"})(Pt||(Pt={}));class oJ{constructor(e){this.replacer=e}encode(e){return(e.type===Pt.EVENT||e.type===Pt.ACK)&&Yh(e)?(e.type=e.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,this.encodeAsBinary(e)):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===Pt.BINARY_EVENT||e.type===Pt.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=rJ(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}}class e2 extends Hr{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string")r=this.decodeString(e),r.type===Pt.BINARY_EVENT||r.type===Pt.BINARY_ACK?(this.reconstructor=new aJ(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r);else if(J5(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(Pt[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Pt.BINARY_EVENT||n.type===Pt.BINARY_ACK){const a=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const c=e.substring(a,r);if(c!=Number(c)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(c)}if(e.charAt(r+1)==="/"){const a=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(a,r)}else n.nsp="/";const o=e.charAt(r+1);if(o!==""&&Number(o)==o){const a=r+1;for(;++r;){const c=e.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===e.length)break}n.id=Number(e.substring(a,r+1))}if(e.charAt(++r)){const a=this.tryParse(e.substr(r));if(e2.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Pt.CONNECT:return typeof r=="object";case Pt.DISCONNECT:return r===void 0;case Pt.CONNECT_ERROR:return typeof r=="string"||typeof r=="object";case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(r)&&r.length>0;case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class aJ{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=nJ(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var sJ=Object.freeze(Object.defineProperty({__proto__:null,protocol:iJ,get PacketType(){return Pt},Encoder:oJ,Decoder:e2},Symbol.toStringTag,{value:"Module"}));function Ro(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const lJ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class AC extends Hr{constructor(e,r,n){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Ro(e,"open",this.onopen.bind(this)),Ro(e,"packet",this.onpacket.bind(this)),Ro(e,"error",this.onerror.bind(this)),Ro(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,...r){if(lJ.hasOwnProperty(e))throw new Error('"'+e+'" is a reserved event name');r.unshift(e);const n={type:Pt.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const c=this.ids++,u=r.pop();this._registerAckCallback(c,u),n.id=c}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,r){const n=this.flags.timeout;if(n===void 0){this.acks[e]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n);this.acks[e]=(...a)=>{this.io.clearTimeoutFn(o),r.apply(this,[null,...a])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this.packet({type:Pt.CONNECT,data:e})}):this.packet({type:Pt.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Pt.CONNECT:if(e.data&&e.data.sid){const o=e.data.sid;this.onconnect(o)}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 Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(e);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(e);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e)}ack(e){const r=this;let n=!1;return function(...o){n||(n=!0,r.packet({type:Pt.ACK,id:e,data:o}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(r.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:Pt.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 r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function ku(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}ku.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};ku.prototype.reset=function(){this.attempts=0};ku.prototype.setMin=function(t){this.ms=t};ku.prototype.setMax=function(t){this.max=t};ku.prototype.setJitter=function(t){this.jitter=t};class Dy extends Hr{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Tg(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new ku({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const o=r.parser||sJ;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.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 r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.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 cs(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=Ro(r,"open",function(){n.onopen(),e&&e()}),a=Ro(r,"error",c=>{n.cleanup(),n._readyState="closed",this.emitReserved("error",c),e?e(c):n.maybeReconnectOnOpen()});if(this._timeout!==!1){const c=this._timeout;c===0&&o();const u=this.setTimeoutFn(()=>{o(),r.close(),r.emit("error",new Error("timeout"))},c);this.opts.autoUnref&&u.unref(),this.subs.push(function(){clearTimeout(u)})}return this.subs.push(o),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Ro(e,"ping",this.onping.bind(this)),Ro(e,"data",this.ondata.bind(this)),Ro(e,"error",this.onerror.bind(this)),Ro(e,"close",this.onclose.bind(this)),Ro(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,r){let n=this.nsps[e];return n||(n=new AC(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),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 r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(function(){clearTimeout(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const sf={};function Zh(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=HK(t,e.path||"/socket.io"),n=r.source,o=r.id,a=r.path,c=sf[o]&&a in sf[o].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||c;let f;return u?f=new Dy(n,e):(sf[o]||(sf[o]=new Dy(n,e)),f=sf[o]),r.query&&!e.query&&(e.query=r.queryKey),f.socket(r.path,e)}Object.assign(Zh,{Manager:Dy,Socket:AC,io:Zh,connect:Zh});const cJ="loading",t2="ready",LC="offline",IC="online",uJ="statusChanged",fJ="lspStatusChanged",dJ="playgroundChanged",pJ="following",hJ="unFollowing",OJ="runStatusChanged",mJ="ApplicationAvailable",r2="playbackInfo",gJ="userEnter",vJ="userLeave",yJ="usersUpdated",bJ="connectionBroken",wJ="authorizationFailed",O1="errorFromServer",xJ="auth",QJ="connect",PJ="disconnect",SJ="authAck",$J="active",kJ="syncPlaygroundInfo",_J="runStatus",RJ="lspStatus",TJ="following",CJ="unFollowing",WJ="userEnter",zJ="userLeave",XJ="usersUpdated",EJ="portOpen",qJ="playbackInfo",MJ="playbackData",UJ="file",Yy="run",Zy="console",Vy="terminal";class AJ{constructor(e,r=2e3){Ze(this,"name");Ze(this,"channel");Ze(this,"_timeout");Ze(this,"_messageId");Ze(this,"_messages");Ze(this,"_filter");this.name=e,this._messageId=0,this.channel=new BroadcastChannel(e),this.channel.onmessage=n=>this.receive(n),this._messages=[],this._timeout=r}setFilter(e){this._filter=e}send(e,r){const n=new LJ(r||this._timeout),o=new Promise((a,c)=>{n._reject=c,n._resolve=a});return this._messages.push(n),this.channel.postMessage({id:this._messageId++,type:"request",payload:e}),o}answer(e,r){this.channel.postMessage({id:e,type:"response",payload:r})}receive(e){const r=e.data;r.type==="request"?(!this._filter||this._filter(r.payload))&&this.answer(r.id,{active:!0}):r.type==="response"&&this._messages[r.id].reject(r.payload)}}class LJ{constructor(e){Ze(this,"_resolve");Ze(this,"_reject");Ze(this,"_interval");this._interval=setTimeout(()=>this.resolve({active:!1,reason:"timeout, no one uses it"}),e)}resolve(e){clearTimeout(this._interval),this._resolve(e)}reject(e){this._reject(e)}}const ek=new AJ("dao-paas",500);let DC;async function IJ(){let t="";ek.setFilter(n=>n.id===t);const e=JSON.parse(localStorage.getItem("agentUsers")||"[]")||[],r=[];for(const n of e){const o=ek.send(n).then(()=>{if(t==="")return n.time=new Date().getTime(),t=n.id,localStorage.setItem("agentUsers",JSON.stringify(e)),Promise.resolve(t)});r.push(o)}return Promise.any(r)}function DJ(t){const e=JSON.parse(localStorage.getItem("agentUsers")||"[]")||[],r=e.find(n=>n.id==t);r?r.time=new Date().getTime():e.push({id:t,time:new Date().getTime()}),localStorage.setItem("agentUsers",JSON.stringify(e)),DC=t}function YJ(t){return t===DC}class ZJ{constructor(e,r,n,o,a){Ze(this,"start");Ze(this,"end");Ze(this,"total");Ze(this,"rate");Ze(this,"dataBuffer",[]);Ze(this,"index",0);Ze(this,"startTimestamp");Ze(this,"endTimestamp");Ze(this,"previousTimeStamp");Ze(this,"pausedTime",0);Ze(this,"escapeTime",0);Ze(this,"playing",!1);Ze(this,"eventDispatcher");Ze(this,"progressDispatcher");this.start=e,this.end=r,this.total=n,this.rate=1,this.eventDispatcher=o,this.progressDispatcher=a,this.step=this.step.bind(this)}convertToAbsoluteTime(e){return this.start+e}setRate(e){this.rate=e||this.rate}buffer(e){this.dataBuffer=this.dataBuffer.concat(e)}pause(){if(!this.playing){console.warn("Do not pause more than one time");return}this.playing=!1}resume(){this.previousTimeStamp&&(this.pausedTime+=performance.now()-this.previousTimeStamp),this.playing=!0,window.requestAnimationFrame(this.step)}restart(){this.index=0,this.startTimestamp=void 0,this.pausedTime=0,this.escapeTime=0,this.playing=!0,window.requestAnimationFrame(this.step)}movePosition(e){const r=this.index;let n=0,o=this.dataBuffer.length-1;for(;n<o;){const a=Math.floor(n+(o-n)/2);this.dataBuffer[a].timestamp<this.dataBuffer[0].timestamp+e?n=a+1:o=a}this.index=n,this.escapeTime=this.escapeTime+this.dataBuffer[this.index].timestamp-this.dataBuffer[r].timestamp}step(e){if(!!this.playing){if(this.index==this.dataBuffer.length){this.index-=1,this.playing=!1,this.endTimestamp=e,this.progressDispatcher&&this.progressDispatcher("complete",this.endTimestamp-this.startTimestamp);return}if(this.startTimestamp===void 0){const r=this.dataBuffer[this.index];this.startTimestamp=e,this.trigger(r.eventName,r.data),this.index++}else{const r=(e-this.pausedTime-this.startTimestamp+this.escapeTime)*this.rate;if(this.progressDispatcher&&this.progressDispatcher("progress",r),this.previousTimeStamp!==e){const n=this.dataBuffer[0].timestamp,o=this.dataBuffer[this.index];if(!o.timestamp){this.index++,window.requestAnimationFrame(this.step);return}n+r>=o.timestamp&&(this.trigger(o.eventName,o.data),this.index++)}this.previousTimeStamp=e}window.requestAnimationFrame(this.step)}}trigger(e,r){this.eventDispatcher(e,r)}}class VJ{constructor(e,r,n=10){Ze(this,"socket");Ze(this,"ioPath");Ze(this,"authOptions");Ze(this,"heartbeatInterval",null);Ze(this,"maxReconnectionAttemps");Ze(this,"playControlSubscribers");Ze(this,"componentSubscribersMap");Ze(this,"messageListeners");Ze(this,"errorListeners");Ze(this,"playbackEngine");this.ioPath=e,this.authOptions=r,this.maxReconnectionAttemps=n,this.messageListeners=[],this.errorListeners=[],this.playControlSubscribers=[],this.componentSubscribersMap={fileTree:[],editor:[],console:[],terminal:[],simulator:[],focusChange:[],run:[],keyEvent:[]}}addMessageListener(e){this.messageListeners.find(e)||this.messageListeners.push(e)}removeMessageListener(e){const r=this.messageListeners.findIndex(n=>n===e);r>-1&&this.messageListeners.splice(r,1)}addErrorListener(e){this.errorListeners.find(e)||this.errorListeners.push(e)}removeErrorListener(e){const r=this.errorListeners.findIndex(n=>n===e);r>-1&&this.errorListeners.splice(r,1)}startChannel(){if(this.socket&&this.socket.connected){console.warn("The connection is already established.");return}this.connect()}connect(){Ce.dao.appStatus()==="drafted"&&this.transitionLoading(),this.socket=Zh(this.ioPath,{reconnectionAttempts:10,reconnectionDelayMax:1e4,transports:["websocket"]}),this.registerEventsOnSocket(),this.socket.on(QJ,()=>{this.authorize(),Ce.dao.isReadyOffline()&&this.transitionOnline()}),this.socket.on(PJ,()=>{Et.dao._channelAvailable(!1),this.clearHeartbeatInterval(),Ce.dao.isReady()&&this.transitionOffline()}),this.socket.io.on("reconnect_attempt",e=>{e>=this.maxReconnectionAttemps&&this.transitionError(bJ,"Reconnection attemps exceeds the maximum times")}),this.socket.on(SJ,({result:e,data:r,error:n})=>{if(!e){this.transitionError(wJ,n);return}const{agentUserId:o}=r;if(DJ(o),!YJ(o))throw new Error(`The agentUserId ${o} is inconsistent`);this.startHeartbeatInterval(),this.authOptions.agentUserId=o,this.updateCurrentAgentUserId(o),Et.dao._channelAvailable(!0)})}authorize(){this.send(xJ,this.authOptions)}subscribeForComponent(e,r){this.componentSubscribersMap[e].push(r)}unsubscribeForComponent(e,r){const n=this.componentSubscribersMap[e].findIndex(o=>o===r);n>-1&&this.componentSubscribersMap[e].splice(n,1)}subscribeForPlayControl(e){this.playControlSubscribers.push(e)}unsubscribeForPlayControl(e){const r=this.playControlSubscribers.findIndex(n=>n===e);r>-1&&this.playControlSubscribers.splice(r,1)}registerEventsOnSocket(){if(!this.socket)throw new Error("The connection has not been established yet.");this.socket.on(kJ,e=>{if(e.playgroundIDEServerStatus==="ERROR"){this.transitionError(O1,e.playgroundIDEServerStatusReason);return}if(Ce.dao.appStatus()==="loading"){this.initAppStatusLoadingPlaygroundInfo(e);return}if(Ce.dao.isReady()){this.changeAppStatusReadyPlaygroundInfo(e);return}console.warn("syncPlaygroundInfo event happened at a wrong appStatus")}),this.socket.on($J,e=>{const{success:r,reason:n}=e,o={SUCCESS:"\u6210\u529F",PLAYGROUND_NOT_EXISTED:"playground\u4E0D\u5B58\u5728",DOCKER_NOT_BIND:"playground\u672A\u7ED1\u5B9A\u5BB9\u5668",DOCKER_START_FAIL:"\u5BB9\u5668\u542F\u52A8\u5931\u8D25",RESOURCE_NOT_ENOUG:"\u670D\u52A1\u5668\u8D44\u6E90\u4E0D\u8DB3",BUSY:"\u670D\u52A1\u5668\u7E41\u5FD9"};r||this.transitionError(O1,`\u542F\u52A8\u5931\u8D25: ${o[n]||n}`)}),this.socket.on(TJ,e=>{const{agentUsers:r}=Ce.dao.playgroundInfo(),n=r.findIndex(o=>o.userId===e.agentUserId);n>-1&&(r[n]=e),this.updatePlaygroundInfoPartial({agentUsers:r}),this.trigger("message",{name:pJ,payload:{user:e}})}),this.socket.on(CJ,e=>{const{agentUsers:r}=Ce.dao.playgroundInfo(),n=r.findIndex(o=>o.userId===e.agentUserId);n>-1&&(r[n]=e),this.updatePlaygroundInfoPartial({agentUsers:r}),this.trigger("message",{name:hJ,payload:{user:e}})}),this.socket.on(_J,e=>{const{status:r,runResult:n}=e,{dockerInfo:o}=Ce.dao.playgroundInfo();if(o.runStatus===r){console.debug("runStatus event is the same, ignored");return}this.updatePlaygroundInfoPartial({dockerInfo:nt(ze({},o),{runStatus:r})}),this.trigger("message",{name:OJ,payload:{status:r,runResult:n}})}),this.socket.on(RJ,e=>{const{dockerInfo:r}=Ce.dao.playgroundInfo(),n=r.lspStatus,{status:o}=e;if(n===o){console.debug("lspStatus event is the same, ignored");return}this.updatePlaygroundInfoPartial({dockerInfo:nt(ze({},r),{lspStatus:o})}),this.trigger("message",{name:fJ,payload:{status:o}})}),this.socket.on(UJ,e=>{const r=Ce.dao.currentAgentUserId(),n=Et.currentDoc.switchDoc,o=Ce.dao.currentAgentUser(),a=Et.dao.updateAgentUser;this.updateCRDTInfo(e),(e.agentUserId===r||o.followingAgentUserId===e.agentUserId)&&n(nt(ze({},e.data),{agentUserId:e.agentUserId})),a(e.agentUserId,{fileOpened:e.data.path}),o.followingAgentUserId&&a(r,{fileOpened:e.data.path}),Et.loading.setModuleLoading({Editor:!1})}),this.socket.on(WJ,e=>{Ce.dao.getAgentUserById(e.agentUserId)?Et.dao.updateAgentUser(e.agentUserId,e):Et.dao.addAgentUser(e),this.trigger("message",{name:gJ,payload:{agentUser:e}})}),this.socket.on(zJ,e=>{Et.dao.updateAgentUser(e.agentUserId,e),this.trigger("message",{name:vJ,payload:{agentUser:e}})}),this.socket.on(XJ,e=>{this.updatePlaygroundInfoPartial({agentUsers:e}),this.trigger("message",{name:yJ,payload:{agentUsers:e}})}),this.socket.on("fileNode",e=>{Et.fileTree.switchFileTree(e),this.updatePlaygroundInfoPartial({fileTree:e})}),this.socket.on(Yy,e=>{this.dispatchDataEvent(Yy,e)}),this.socket.on(Zy,e=>{this.dispatchDataEvent(Zy,e.data)}),this.socket.on(Vy,e=>{this.dispatchDataEvent(Vy,e.data)}),this.socket.on(EJ,()=>{this.trigger("message",{name:mJ})}),this.socket.on(qJ,e=>{const{start:r,end:n,total:o}=e;this.trigger("message",{name:r2,payload:e}),this.playbackEngine=new ZJ(r,n,o,this.dispatchDataEvent.bind(this),this.dispatchProgressEvent.bind(this))}),this.socket.on(MJ,e=>{this.playbackEngine.buffer(e),this.playControlSubscribers.forEach(r=>r.onAvailable()),this.playbackEngine.resume()}),this.socket.onAny((e,r)=>{console.debug(`<< ${e}`)}),this.socket.on("errorHandler",e=>{this.transitionError(O1,`${e.name}: ${e.message}`)})}initAppStatusLoadingPlaygroundInfo(e){Et.dao.setPlaygroundInfo(e),e.playgroundIDEServerStatus==="SYNCED"&&this.transitionReady()}changeAppStatusReadyPlaygroundInfo(e){const r=Ce.dao.playgroundInfo().status,n=Ce.dao.playgroundInfo().dockerInfo.dockerId;Et.dao.setPlaygroundInfo(e),e.status!=r&&this.trigger("message",{name:uJ,payload:{status:e.status}}),e.dockerInfo.dockerId&&e.dockerInfo.dockerId!==n&&this.trigger("message",{name:dJ})}transitionOnline(){Et.dao.transitionOnline(),this.trigger("message",{name:IC})}transitionOffline(){Et.dao.transitionOffline(),this.trigger("message",{name:LC})}transitionLoading(){Et.dao.transitionLoading(),this.trigger("message",{name:cJ})}transitionReady(){Et.dao.transitionReady(),this.trigger("message",{name:t2})}transitionError(e,r){Et.dao.transitionError(),this.trigger("error",{name:e,error:r}),this.closeChannel()}updatePlaygroundInfoPartial(e){Et.dao.setPlaygroundInfo(ze(ze({},Ce.dao.playgroundInfo()),e))}updateCurrentAgentUserId(e){Et.dao.currentAgentUserId(e)}updateCRDTInfo(e){Et.dao.setCRDTInfo(e)}dispatchDataEvent(e,r){this.componentSubscribersMap[e].forEach(n=>{n.onData(r)})}dispatchProgressEvent(e,r){this.playControlSubscribers.forEach(n=>{e==="complete"?n.onComplete():n.onProgress(r)})}trigger(e,r){if(console.debug(`<trigger: ${r.name}`),e==="error"){this.errorListeners.forEach(n=>n(r));return}this.messageListeners.forEach(n=>n(r))}clearHeartbeatInterval(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null)}startHeartbeatInterval(){this.heartbeatInterval=setInterval(()=>{this.heartbeat()},6e4)}active(){this.send("active")}run(){this.send("run")}stop(){this.send("stop")}loadFile(e){this.send("file",e)}loadFolder(e){this.send("fileDir",e)}editFile(e){this.send("editFile",e)}operateFileTree(e){this.send("fileTreeOp",e)}uploadFolder(e){this.send("uploadFolder",e)}uploadFile(e){this.send("uploadFile",e)}terminal(e){this.send("terminal",e)}cursor(e){this.send("cursor",e)}heartbeat(){this.send("heartbeat")}getPlaybackInfo(){this.send("getPlaybackInfo")}fetchPlaybackData(e){this.send("loadPlaybackData",e)}fetchReplayData(e){this.send("getReplayData",e)}followingAgentUser(e){this.send("followingAgentUser",e)}featureConfig(e){this.send("setFeaturesConfig",e)}setFileLockStatus(e){this.send("setFileLockStatus",e)}setFileVisiable(e){this.send("setFileVisiable",e)}addFileToUnitTest(e){this.send("addFileToUnitTest",e)}removeFileFromUnitTest(e){this.send("removeFileFromUnitTest",e)}followingFocusComponent(e){const r=Ce.dao.currentAgentUser();!r||r.focusComponent!==e&&(r.followingAgentUserId||this.send("followingFocusComponent",e))}followingEditorScroll(e){const r=Ce.dao.currentAgentUser();r!=null&&r.followingAgentUserId||this.send("followingEditorScroll",e)}unFollowingAgentUser(){this.send("unFollowingAgentUser")}restartPlayback(e){this.playbackEngine.setRate(e),this.playbackEngine.restart()}startPlayback(e=0,r=1){this.playbackEngine.setRate(r);const n=this.playbackEngine.convertToAbsoluteTime(e);this.playControlSubscribers.forEach(o=>o.onLoad()),this.fetchPlaybackData({start:n})}goToPlayback(e){console.log("drag to a new position",e),this.playbackEngine.movePosition(e)}pausePlayback(){this.playbackEngine.pause()}resumePlayback(){this.playbackEngine.resume()}setPlaybackRate(e){this.playbackEngine.setRate(e)}stopPlayback(){}send(e,r={}){if(!this.socket)throw new Error("socket is not ready");console.debug(`>> ${e}`),this.socket.emit(e,r)}on(e,r){if(!this.socket)throw new Error("socket is not ready");this.socket.on(e,r)}off(e){if(!this.socket)throw new Error("socket is not ready");this.socket.off(e)}isReady(){var e;return(e=this.socket)==null?void 0:e.connected}closeChannel(){var e,r;console.debug("close Channel..."),this.clearHeartbeatInterval(),(e=this.socket)==null||e.removeAllListeners(),(r=this.socket)==null||r.close(),this.socket=void 0}}const NJ=Su(async()=>(await Promise.resolve().then(function(){return Y2e})).FileTree),BJ=Su(async()=>(await Promise.resolve().then(function(){return BWe})).Editor),FJ=Su(async()=>(await Promise.resolve().then(function(){return Mze})).default),GJ=Su(async()=>(await Promise.resolve().then(function(){return Ize})).default),jJ=Su(async()=>(await Promise.resolve().then(function(){return Zze})).default);class HJ{constructor(e){Ze(this,"components",{Tree:null,Editor:null,Console:null,Browser:null,Shell:null});Ze(this,"paasOptions");Ze(this,"paasDomainPath");Ze(this,"sdkVersion");Ze(this,"isRendered",!1);Ze(this,"_onMessages",[]);Ze(this,"_onErrors",[]);Ze(this,"_playControlSubscribers",[]);Ze(this,"_componentSubscribers",{});Ze(this,"themeType",zy.dark);this.sdkVersion=gK(),this.setPaasOptionsWithDefaultAvatar(e),this.setPaasDomainPathWithDefaultOrigin(e.paasDomain),this.themeType=e.themeType||zy.dark,this.init()}loadTheme(e){this.themeType=e,Et.theme.setTheme(this.themeType,za.terminal),Et.theme.setTheme(this.themeType,za.console),Sj(this.themeType)}setPaasOptionsWithDefaultAvatar(e){this.paasOptions=e,this.paasOptions.userInfo.avatarUrl||(this.paasOptions.userInfo.avatarUrl=bK(this.paasOptions.userInfo.username))}setPaasDomainPathWithDefaultOrigin(e){this.paasDomainPath={}.PAAS_MANAGER_API_ORIGIN||"https://www.1024paas.com",e&&(this.paasDomainPath=e)}get playgroundStatus(){return Ce.dao.playgroundInfo().status}get dockerStatus(){var e;return(e=Ce.dao.playgroundInfo().dockerInfo)==null?void 0:e.runStatus}get currentAgentUser(){return Ce.dao.currentAgentUser()}get agentUsers(){return Ce.dao.playgroundInfo().agentUsers}get playgroundInfo(){return Ce.dao.playgroundInfo()}get currentFollowingAgentUser(){return Ce.dao.getFollowingAgentUser()}followUser(e){this.currentAgentUser.fileOpened&&Ce.dao.channel().loadFile(this.currentAgentUser.fileOpened),Ce.dao.channel().followingAgentUser(e)}unFollowUser(){Ce.dao.channel().unFollowingAgentUser()}preparePlayback(){Et.dao.setPlaygroundMode(ca.playback),Ce.dao.channel().getPlaybackInfo()}restartPlayback(e){Ce.dao.channel().restartPlayback(e)}startPlayback(e,r){Ce.dao.channel().startPlayback(e,r)}goToPlayback(e){Ce.dao.channel().goToPlayback(e)}pausePlayback(){Ce.dao.channel().pausePlayback()}resumePlayback(){Ce.dao.channel().resumePlayback()}setRate(e){Ce.dao.channel().setPlaybackRate(e)}stopPlayback(){Ce.dao.channel().stopPlayback()}activePlayground(){Ce.dao.channel().active()}runPlayground(){Ce.dao.channel().run()}stopPlayground(){Ce.dao.channel().stop()}onUploadFile(e){Ce.dao.channel().send("upload",e)}async init(){this.loadTheme(this.themeType),console.debug(`sdk: init with ${this.paasDomainPath} passDomain`);const e=await vK(this.paasDomainPath,this.paasOptions.ticket,this.sdkVersion);let r;try{r=await IJ()}catch{}const n=new VJ(e,nt(ze({},this.paasOptions),{agentUserId:r}));this._onMessages.forEach(o=>n.addMessageListener(o)),this._onMessages=[],this._onErrors.forEach(o=>n.addErrorListener(o)),this._onErrors=[],Et.dao.reset(),Et.dao.setChannel(n),n.startChannel()}addMessageListener(e){var r;Ce.dao.channel()?(r=Ce.dao.channel())==null||r.addMessageListener(e):this._onMessages.push(e)}addErrorListener(e){var r;Ce.dao.channel()?(r=Ce.dao.channel())==null||r.addErrorListener(e):this._onErrors.push(e)}addPlayControlSubscriber(e){var r;Ce.dao.channel()?(r=Ce.dao.channel())==null||r.subscribeForPlayControl(e):this._playControlSubscribers.push(e)}removePlayControlSubscriber(e){var r;if(Ce.dao.channel())(r=Ce.dao.channel())==null||r.unsubscribeForPlayControl(e);else{const n=this._playControlSubscribers.findIndex(o=>o===e);n>-1&&this._playControlSubscribers.splice(n,1)}}addComponentSubscriber(e,r){var n;Ce.dao.channel()?(n=Ce.dao.channel())==null||n.subscribeForComponent(e,r):(this._componentSubscribers[e]&&(this._componentSubscribers[e]=new Array),this._componentSubscribers[e].push(r))}removeComponentSubscriber(e,r){var n,o;if(Ce.dao.channel())(o=Ce.dao.channel())==null||o.unsubscribeForComponent(e,r);else{this._componentSubscribers[e]&&(this._componentSubscribers[e]=new Array);const a=(n=this._componentSubscribers[e])==null?void 0:n.findIndex(c=>c===r);a>-1&&this._componentSubscribers[e].splice(a,1)}}initComponent(e,r,n){const o=c=>{switch(e){case"Tree":return ae(NJ,ze({},c));case"Editor":return ae(BJ,ze({},c));case"Browser":return ae(GJ,ze({},c));case"Console":return ae(FJ,ze({},c));case"Shell":return ae(jJ,ze({},c));default:throw new Error("wrong component name")}};this.components[e]={reactComponent:o,container:r,props:n};const a=document.querySelector(r);xl.exports.render(ae(X.exports.Suspense,{fallback:ae(JH,{}),children:ae(o,ze({},n))}),a)}mapRender(e){e.forEach((r,n)=>{const{item:o,container:a,props:c}=r;this.initComponent(o,a,c)})}dispose(){var e;console.debug("destroy components...",this.components),(e=Ce.dao._channel())==null||e.closeChannel(),Et.dao.setChannel(null),Et.dao.reset();for(const[r,n]of Object.entries(this.components)){if(!n)break;const o=document.querySelector(n.container);if(o){const a=xl.exports.unmountComponentAtNode(o);console.debug(`destroy unmount: ${n.container}, ${a}`)}}}}var qa;(function(t){t.DoubleClickItemToExpand="double-click-item-to-expand",t.ClickItemToExpand="click-item-to-expand",t.ClickArrowToExpand="click-arrow-to-expand"})(qa||(qa={}));var ZO=globalThis&&globalThis.__assign||function(){return ZO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},ZO.apply(this,arguments)},KJ=function(t,e){return{mode:t.mode,createInteractiveElementProps:function(r,n,o,a){return ZO(ZO({},e.createInteractiveElementProps(r,n,o,a)),t.createInteractiveElementProps(r,n,o,a))}}},JJ=function(){function t(e){this.mode=qa.DoubleClickItemToExpand,this.environment=e}return t.prototype.createInteractiveElementProps=function(e,r,n,o){var a=this;return{onClick:function(c){n.focusItem(),c.shiftKey?n.selectUpTo():c.ctrlKey?o.isSelected?n.unselectItem():n.addToSelectedItems():n.selectItem()},onDoubleClick:function(){n.focusItem(),n.selectItem(),e.hasChildren&&n.toggleExpandedState(),(!e.hasChildren||a.environment.canInvokePrimaryActionOnItemContainer)&&n.primaryAction()},onFocus:function(){n.focusItem()},onDragStart:function(c){c.dataTransfer.dropEffect="move",n.startDragging()},onDragOver:function(c){c.preventDefault()},draggable:o.canDrag&&!o.isRenaming,tabIndex:o.isRenaming?void 0:o.isFocused?0:-1}},t}(),eee=function(){function t(e){this.mode=qa.ClickItemToExpand,this.environment=e}return t.prototype.createInteractiveElementProps=function(e,r,n,o){var a=this;return{onClick:function(c){n.focusItem(),c.shiftKey?n.selectUpTo():c.ctrlKey?o.isSelected?n.unselectItem():n.addToSelectedItems():(e.hasChildren&&n.toggleExpandedState(),n.selectItem(),(!e.hasChildren||a.environment.canInvokePrimaryActionOnItemContainer)&&n.primaryAction())},onFocus:function(){n.focusItem()},onDragStart:function(c){c.dataTransfer.dropEffect="move",n.startDragging()},onDragOver:function(c){c.preventDefault()},draggable:o.canDrag&&!o.isRenaming,tabIndex:o.isRenaming?void 0:o.isFocused?0:-1}},t}(),tee=function(){function t(e){this.mode=qa.ClickItemToExpand,this.environment=e}return t.prototype.createInteractiveElementProps=function(e,r,n,o){var a=this;return{onClick:function(c){n.focusItem(),c.shiftKey?n.selectUpTo():c.ctrlKey?o.isSelected?n.unselectItem():n.addToSelectedItems():(n.selectItem(),(!e.hasChildren||a.environment.canInvokePrimaryActionOnItemContainer)&&n.primaryAction())},onFocus:function(){n.focusItem()},onDragStart:function(c){c.dataTransfer.dropEffect="move",n.startDragging()},onDragOver:function(c){c.preventDefault()},draggable:o.canDrag&&!o.isRenaming,tabIndex:o.isRenaming?void 0:o.isFocused?0:-1}},t}(),tk=function(t,e){switch(t){case qa.DoubleClickItemToExpand:return new JJ(e);case qa.ClickItemToExpand:return new eee(e);case qa.ClickArrowToExpand:return new tee(e);default:throw Error("Unknown interaction mode "+t)}},YC=X.exports.createContext(null),ree=function(){return X.exports.useContext(YC)},nee=function(t){var e=ir(),r=e.defaultInteractionMode,n=X.exports.useMemo(function(){var o;return r&&typeof r!="string"?r.extends?KJ(r,tk(r.extends,e)):r:tk((o=r)!==null&&o!==void 0?o:qa.ClickItemToExpand,e)},[]);return X.exports.createElement(YC.Provider,{value:n},t.children)},ZC=function(){var t=ir();return X.exports.useCallback(function(e,r){for(var n=t.linearItems[r],o=n[e].depth,a=e;!!n[a]&&n[a].depth!==o-1;a--);var c=n[a];return c||(c={item:t.trees[r].rootItem,depth:0},a=0),c},[t.linearItems,t.trees])},iee=function(t,e){return t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom},oee=function(t,e,r,n,o){var a=(t-e)/r,c=Math.floor(a),u=void 0,f=n||o?.2:.5;return a%1<f?u="top":a%1>1-f&&(u="bottom"),{linearIndex:c,offset:u}},aee=function(t,e,r,n,o){var a=ir(),c=a.canDropOnItemWithChildren,u=a.canDropOnItemWithoutChildren,f=a.canDragAndDrop,i=a.linearItems,s=a.items,l=a.canReorderItems,p=a.viewState,d=ZC();return X.exports.useCallback(function(h,x,g){var O,m,v,w;if(!!f&&!!g.current&&!(h.clientX<0||h.clientY<0)){var Q=g.current.getBoundingClientRect(),P=iee(h,Q),k=oee(h.clientY,Q.top,r,c,u),W=k.linearIndex,z=k.offset,C=P?"outside":""+x+W+(z!=null?z:"");if(t!==C){if(e(C),P){n(void 0);return}if(W<0||W>=i[x].length){n(void 0);return}var E=i[x][W],T=E.depth,q=s[E.item];if(!z&&!u&&!q.hasChildren){n(void 0);return}if(!z&&!c&&q.hasChildren){n(void 0);return}if(z&&!l){n(void 0);return}var F=d(W,x);if(!(!((m=(O=p[x])===null||O===void 0?void 0:O.selectedItems)===null||m===void 0)&&m.includes(E.item))){var I=s[F.item].children.indexOf(E.item)+(z==="top"?0:1);z==="top"&&T===((w=(v=i[x][W-1])===null||v===void 0?void 0:v.depth)!==null&&w!==void 0?w:-1)&&(z="bottom",W-=1);var U;z?U={targetType:"between-items",treeId:x,parentItem:F.item,depth:E.depth,linearIndex:W+(z==="top"?0:1),childIndex:I,linePosition:z}:U={targetType:"item",treeId:x,parentItem:F.item,targetItem:E.item,depth:E.depth,linearIndex:W},o(U)}}}},[f,c,u,l,d,r,s,t,i,n,o,e,p])},VC=function(){var t=ir();return X.exports.useCallback(function(e,r){if(e.targetType==="between-items"){if(!t.canReorderItems)return!1}else{var n=t.items[e.targetItem];if(!t.canDropOnItemWithChildren&&n.hasChildren||!t.canDropOnItemWithoutChildren&&!n.hasChildren)return!1}return!(t.canDropAt&&(!r||!t.canDropAt(r,e)))},[t])},rk=globalThis&&globalThis.__spreadArray||function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},see=function(){var t=ir(),e=ZC(),r=VC();return X.exports.useCallback(function(n,o){var a=t.linearItems[n];return a.map(function(c,u){var f,i,s=c.item,l=c.depth,p=e(u,n),d=t.items[p.item].children.indexOf(s),h={targetType:"item",parentItem:p.item,targetItem:s,linearIndex:u,depth:l,treeId:n},x={targetType:"between-items",parentItem:p.item,linePosition:"top",childIndex:d,depth:l,treeId:n,linearIndex:u},g={targetType:"between-items",parentItem:p.item,linePosition:"bottom",linearIndex:u+1,childIndex:d+1,depth:l,treeId:n},O=l===((i=(f=a[u-1])===null||f===void 0?void 0:f.depth)!==null&&i!==void 0?i:-1);return O?[h,g]:[x,h,g]}).reduce(function(c,u){return rk(rk([],c),u)},[]).filter(function(c){return r(c,o)})},[r,t.items,t.linearItems,e])},Fp=globalThis&&globalThis.__spreadArray||function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},VO=function(t,e,r){var n=X.exports.useRef();X.exports.useEffect(function(){if(!n.current)n.current=Fp([],r),t();else{var o=n.current.some(function(a,c){return a!==r[c]});o&&(n.current=Fp([],r),t())}},Fp(Fp([],e),r))},NO=globalThis&&globalThis.__assign||function(){return NO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},NO.apply(this,arguments)},NC=function(t,e){return t.map(function(r){return[r,e(r)]}).reduce(function(r,n){var o,a=n[0],c=n[1];return NO(NO({},r),(o={},o[a]=c,o))},{})};function _u(){var t=X.exports.useRef(new Array);X.exports.useEffect(function(){var r=t.current;return function(){return r.forEach(function(n){return cancelAnimationFrame(n)})}},[t]);var e=X.exports.useCallback(function(r){var n=requestAnimationFrame(function(){t.current.splice(t.current.indexOf(n),1),r()});t.current.push(n)},[t]);return e}var BC=X.exports.createContext(null),Oa=function(){return X.exports.useContext(BC)},lee=function(t){var e=ir(),r=X.exports.useState(!1),n=r[0],o=r[1],a=X.exports.useState(4),c=a[0],u=a[1],f=X.exports.useState({}),i=f[0],s=f[1],l=X.exports.useState(0),p=l[0],d=l[1],h=X.exports.useState(),x=h[0],g=h[1],O=X.exports.useState(),m=O[0],v=O[1],w=X.exports.useState("_nodrag"),Q=w[0],P=w[1],k=see(),W=_u();X.exports.useRef(!1);var z=X.exports.useCallback(function(ce,se){var ye;if(e.activeTreeId&&((ye=e.viewState[e.activeTreeId])===null||ye===void 0?void 0:ye.focusedItem)&&e.linearItems&&se){var L=e.viewState[e.activeTreeId].focusedItem,le=k(e.activeTreeId,se),Y=le.findIndex(function(B){if(B.targetType==="item")return B.targetItem===L;if(B.targetType==="between-items")return e.items[B.parentItem].children[B.childIndex]===L});d(Y?Math.min(Y+1,le.length-1):0)}else d(0)},[e.activeTreeId,e.items,e.linearItems,e.viewState,k]),C=X.exports.useCallback(function(){o(!1),u(4),s({}),d(0),g(void 0),v(void 0),P("_nodrag")},[]);VO(function(){e.activeTreeId&&e.linearItems[e.activeTreeId]&&i[e.activeTreeId]&&z(i[e.activeTreeId],x)},[x,e.activeTreeId,e.linearItems,z,i],[e.activeTreeId]),VO(function(){n&&e.activeTreeId&&v(i[e.activeTreeId][p])},[p,e.activeTreeId,n,i],[p,e.activeTreeId]);var E=VC(),T=function(ce){var se;x&&!E(ce,x)||(v(ce),e.setActiveTree(ce.treeId),x&&e.activeTreeId!==ce.treeId&&((se=e.onSelectItems)===null||se===void 0||se.call(e,x.map(function(ye){return ye.index}),ce.treeId)))},q=aee(Q,P,c,v,T),F=X.exports.useCallback(function(){x&&m&&e.onDrop&&(e.onDrop(x,m),W(function(){var ce;(ce=e.onFocusItem)===null||ce===void 0||ce.call(e,x[0],m.treeId),C()}))},[x,m,e,C,W]),I=X.exports.useCallback(function(ce,se){var ye,L,le=NC(e.treeIds,function(B){return k(B,ce)}),Y=(L=(ye=document.querySelector('[data-rct-tree="'+se+'"] [data-rct-item-container="true"]'))===null||ye===void 0?void 0:ye.offsetHeight)!==null&&L!==void 0?L:5;u(Y),g(ce),s(le),e.activeTreeId&&z(le[e.activeTreeId],ce)},[e.activeTreeId,e.treeIds,k,z]),U=X.exports.useCallback(function(){var ce,se,ye;if(!!e.canDragAndDrop&&e.activeTreeId){var L=(se=(ce=e.viewState[e.activeTreeId])===null||ce===void 0?void 0:ce.selectedItems)!==null&&se!==void 0?se:[(ye=e.viewState[e.activeTreeId])===null||ye===void 0?void 0:ye.focusedItem];if(L.length===0||L[0]===void 0)return;var le=L.map(function(Y){return e.items[Y]});if(e.canDrag&&!e.canDrag(le))return;I(le,e.activeTreeId),setTimeout(function(){o(!0)})}},[I,e]),D=X.exports.useCallback(function(){C()},[C]),G=X.exports.useCallback(function(){F(),C()},[F,C]),H=X.exports.useCallback(function(){d(function(ce){return Math.max(0,ce-1)})},[]),ie=X.exports.useCallback(function(){e.activeTreeId&&d(function(ce){return Math.min(i[e.activeTreeId].length,ce+1)})},[e.activeTreeId,i]),ee={onStartDraggingItems:I,startProgrammaticDrag:U,abortProgrammaticDrag:D,completeProgrammaticDrag:G,programmaticDragUp:H,programmaticDragDown:ie,draggingItems:x,draggingPosition:m,itemHeight:c,isProgrammaticallyDragging:n,onDragOverTreeHandler:q,viableDragPositions:i};return X.exports.useEffect(function(){return window.addEventListener("dragend",C),window.addEventListener("drop",F),function(){window.removeEventListener("dragend",C),window.removeEventListener("drop",F)}},[F,C]),X.exports.createElement(BC.Provider,{value:ee},t.children)},Kf=globalThis&&globalThis.__assign||function(){return Kf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Kf.apply(this,arguments)},cee=function(t,e){var r=ir(),n=Oa();X.exports.useImperativeHandle(t,function(){return Kf(Kf(Kf({},e),r),{treeEnvironmentContext:r,dragAndDropContext:n})})},nk=globalThis&&globalThis.__spreadArray||function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},FC=X.exports.createContext(null),uee=function(){return X.exports.useContext(FC)},fee=X.exports.forwardRef(function(t,e){var r=ir(),n=r.onCollapseItem,o=r.items;r.trees;var a=r.viewState,c=r.onExpandItem,u=r.onFocusItem,f=r.setActiveTree,i=r.onRenameItem,s=r.onSelectItems,l=r.onPrimaryAction,p=r.linearItems,d=Oa(),h=d.abortProgrammaticDrag,x=d.completeProgrammaticDrag,g=d.programmaticDragDown,O=d.programmaticDragUp,m=d.startProgrammaticDrag,v={abortProgrammaticDrag:X.exports.useCallback(function(){h()},[h]),collapseItem:X.exports.useCallback(function(w,Q){n==null||n(o[w],Q)},[o,n]),completeProgrammaticDrag:X.exports.useCallback(function(){x()},[x]),expandItem:X.exports.useCallback(function(w,Q){c==null||c(o[w],Q)},[o,c]),focusItem:X.exports.useCallback(function(w,Q){u==null||u(o[w],Q)},[o,u]),focusTree:X.exports.useCallback(function(w,Q){Q===void 0&&(Q=!0),f(w,Q)},[f]),moveFocusDown:X.exports.useCallback(function(w){var Q=p[w],P=Q.findIndex(function(z){var C,E=z.item;return E===((C=a[w])===null||C===void 0?void 0:C.focusedItem)}),k=P!==void 0?Math.min(Q.length-1,P+1):0,W=o[Q[k].item];u==null||u(W,w)},[o,p,u,a]),moveFocusUp:X.exports.useCallback(function(w){var Q=p[w],P=Q.findIndex(function(z){var C,E=z.item;return E===((C=a[w])===null||C===void 0?void 0:C.focusedItem)}),k=P!==void 0?Math.max(0,P-1):0,W=o[Q[k].item];u==null||u(W,w)},[o,p,u,a]),moveProgrammaticDragPositionDown:X.exports.useCallback(function(){g()},[g]),moveProgrammaticDragPositionUp:X.exports.useCallback(function(){O()},[O]),renameItem:X.exports.useCallback(function(w,Q,P){i==null||i(o[w],Q,P)},[o,i]),selectItems:X.exports.useCallback(function(w,Q){s==null||s(w,Q)},[s]),startProgrammaticDrag:X.exports.useCallback(function(){m()},[m]),toggleItemExpandedState:X.exports.useCallback(function(w,Q){var P,k;!((k=(P=a[Q])===null||P===void 0?void 0:P.expandedItems)===null||k===void 0)&&k.includes(w)?n==null||n(o[w],Q):c==null||c(o[w],Q)},[o,n,c,a]),toggleItemSelectStatus:X.exports.useCallback(function(w,Q){var P,k,W,z,C;!((k=(P=a[Q])===null||P===void 0?void 0:P.selectedItems)===null||k===void 0)&&k.includes(w)?s==null||s((z=(W=a[Q].selectedItems)===null||W===void 0?void 0:W.filter(function(E){return E!==w}))!==null&&z!==void 0?z:[],Q):s==null||s(nk(nk([],(C=a[Q].selectedItems)!==null&&C!==void 0?C:[]),[w]),Q)},[s,a]),invokePrimaryAction:X.exports.useCallback(function(w,Q){l==null||l(o[w],Q)},[o,l])};return cee(e,v),X.exports.createElement(FC.Provider,{value:v},t.children)}),dee=function(t){if(!!t)if(t.scrollIntoViewIfNeeded)t.scrollIntoViewIfNeeded();else{var e=t.getBoundingClientRect(),r=e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth);r||t.scrollIntoView()}},Ci=globalThis&&globalThis.__assign||function(){return Ci=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Ci.apply(this,arguments)},Ja=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(r){return!!r}).join(" ")},pee=function(t){return{renderItemTitle:function(e){var r=e.title,n=e.context,o=e.info;if(!o.isSearching||!n.isSearchMatching)return Pe.createElement(Pe.Fragment,null,r);var a=r.toLowerCase().indexOf(o.search.toLowerCase());return Pe.createElement(Pe.Fragment,null,a>0&&Pe.createElement("span",null,r.slice(0,a)),Pe.createElement("span",{className:"rct-tree-item-search-highlight"},r.slice(a,a+o.search.length)),a+o.search.length<r.length&&Pe.createElement("span",null,r.slice(a+o.search.length,r.length)))},renderItemArrow:function(e){var r=e.item,n=e.context;return Pe.createElement("div",Ci({className:Ja(r.hasChildren&&"rct-tree-item-arrow-hasChildren","rct-tree-item-arrow")},n.arrowProps),r.hasChildren&&(n.isExpanded?Pe.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 16 16",enableBackground:"new 0 0 16 16",xmlSpace:"preserve"},Pe.createElement("g",null,Pe.createElement("g",null,Pe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:`M12,5c-0.28,0-0.53,0.11-0.71,0.29L8,8.59L4.71,5.29C4.53,5.11,4.28,5,4,5
|
|
404
|
+
`,JH=()=>ae(KH,{children:vt("div",{className:"d42-preloader",children:[ae("svg",{className:"d42-first-svg",version:"1.1",id:"sun",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"10px",height:"10px",viewBox:"0 0 10 10",enableBackground:"new 0 0 10 10",xmlSpace:"preserve",children:vt("g",{children:[ae("path",{fill:"none",d:"M6.942,3.876c-0.4-0.692-1.146-1.123-1.946-1.123c-0.392,0-0.779,0.104-1.121,0.301c-1.072,0.619-1.44,1.994-0.821,3.067C3.454,6.815,4.2,7.245,5,7.245c0.392,0,0.779-0.104,1.121-0.301C6.64,6.644,7.013,6.159,7.167,5.581C7.321,5,7.243,4.396,6.942,3.876z M6.88,5.505C6.745,6.007,6.423,6.427,5.973,6.688C5.676,6.858,5.34,6.948,5,6.948c-0.695,0-1.343-0.373-1.69-0.975C2.774,5.043,3.093,3.849,4.024,3.312C4.32,3.14,4.656,3.05,4.996,3.05c0.695,0,1.342,0.374,1.69,0.975C6.946,4.476,7.015,5,6.88,5.505z"}),ae("path",{fill:"none",d:"M8.759,2.828C8.718,2.757,8.626,2.732,8.556,2.774L7.345,3.473c-0.07,0.041-0.094,0.132-0.053,0.202C7.319,3.723,7.368,3.75,7.419,3.75c0.025,0,0.053-0.007,0.074-0.02l1.211-0.699C8.774,2.989,8.8,2.899,8.759,2.828z"}),ae("path",{fill:"none",d:"M1.238,7.171c0.027,0.047,0.077,0.074,0.128,0.074c0.025,0,0.051-0.008,0.074-0.02l1.211-0.699c0.071-0.041,0.095-0.133,0.054-0.203S2.574,6.228,2.503,6.269l-1.21,0.699C1.221,7.009,1.197,7.101,1.238,7.171z"}),ae("path",{fill:"none",d:"M6.396,2.726c0.052,0,0.102-0.026,0.13-0.075l0.349-0.605C6.915,1.976,6.89,1.885,6.819,1.844c-0.07-0.042-0.162-0.017-0.202,0.054L6.269,2.503C6.228,2.574,6.251,2.666,6.322,2.706C6.346,2.719,6.371,2.726,6.396,2.726z"}),ae("path",{fill:"none",d:"M3.472,7.347L3.123,7.952c-0.041,0.07-0.017,0.162,0.054,0.203C3.2,8.169,3.226,8.175,3.25,8.175c0.052,0,0.102-0.027,0.129-0.074l0.349-0.605c0.041-0.07,0.017-0.16-0.054-0.203C3.603,7.251,3.513,7.276,3.472,7.347z"}),ae("path",{fill:"none",d:"M3.601,2.726c0.025,0,0.051-0.007,0.074-0.02C3.746,2.666,3.77,2.574,3.729,2.503l-0.35-0.604C3.338,1.828,3.248,1.804,3.177,1.844C3.106,1.886,3.082,1.976,3.123,2.047l0.35,0.604C3.5,2.7,3.549,2.726,3.601,2.726z"}),ae("path",{fill:"none",d:"M6.321,7.292c-0.07,0.043-0.094,0.133-0.054,0.203l0.351,0.605c0.026,0.047,0.076,0.074,0.127,0.074c0.025,0,0.051-0.006,0.074-0.02c0.072-0.041,0.096-0.133,0.055-0.203l-0.35-0.605C6.483,7.276,6.393,7.253,6.321,7.292z"}),ae("path",{fill:"none",d:"M2.202,5.146c0.082,0,0.149-0.065,0.149-0.147S2.284,4.851,2.202,4.851H1.503c-0.082,0-0.148,0.066-0.148,0.148s0.066,0.147,0.148,0.147H2.202z"}),ae("path",{fill:"none",d:"M8.493,4.851H7.794c-0.082,0-0.148,0.066-0.148,0.148s0.066,0.147,0.148,0.147l0,0h0.699c0.082,0,0.148-0.065,0.148-0.147S8.575,4.851,8.493,4.851L8.493,4.851z"}),ae("path",{fill:"none",d:"M5.146,2.203V0.805c0-0.082-0.066-0.148-0.148-0.148c-0.082,0-0.148,0.066-0.148,0.148v1.398c0,0.082,0.066,0.149,0.148,0.149C5.08,2.352,5.146,2.285,5.146,2.203z"}),ae("path",{fill:"none",d:"M4.85,7.796v1.396c0,0.082,0.066,0.15,0.148,0.15c0.082,0,0.148-0.068,0.148-0.15V7.796c0-0.082-0.066-0.148-0.148-0.148C4.917,7.647,4.85,7.714,4.85,7.796z"}),ae("path",{fill:"none",d:"M2.651,3.473L1.44,2.774C1.369,2.732,1.279,2.757,1.238,2.828C1.197,2.899,1.221,2.989,1.292,3.031l1.21,0.699c0.023,0.013,0.049,0.02,0.074,0.02c0.051,0,0.101-0.026,0.129-0.075C2.747,3.604,2.722,3.514,2.651,3.473z"}),ae("path",{fill:"none",d:"M8.704,6.968L7.493,6.269c-0.07-0.041-0.162-0.016-0.201,0.055c-0.041,0.07-0.018,0.162,0.053,0.203l1.211,0.699c0.023,0.012,0.049,0.02,0.074,0.02c0.051,0,0.102-0.027,0.129-0.074C8.8,7.101,8.776,7.009,8.704,6.968z"})]})}),ae("svg",{version:"1.1",id:"cloud",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",width:"10px",height:"10px",viewBox:"0 0 10 10",enableBackground:"new 0 0 10 10",xmlSpace:"preserve",children:ae("path",{fill:"none",d:"M8.528,5.624H8.247c-0.085,0-0.156-0.068-0.156-0.154c0-0.694-0.563-1.257-1.257-1.257c-0.098,0-0.197,0.013-0.3,0.038C6.493,4.259,6.45,4.252,6.415,4.229C6.38,4.208,6.356,4.172,6.348,4.131C6.117,3.032,5.135,2.235,4.01,2.235c-1.252,0-2.297,0.979-2.379,2.23c-0.004,0.056-0.039,0.108-0.093,0.13C1.076,4.793,0.776,5.249,0.776,5.752c0,0.693,0.564,1.257,1.257,1.257h6.495c0.383,0,0.695-0.31,0.695-0.692S8.911,5.624,8.528,5.624z"})}),vt("div",{className:"rain",children:[ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"}),ae("span",{className:"d42-drop"})]}),ae("div",{className:"text",children:"Loading......"})]})}),eK="@dao42/d42paas-front",tK="0.9.17-alpha.0",rK="d42paas front",nK="dao42 paas team",iK="https://github.com/dao42/d42paas_frontend#readme",oK="UNLICENSED",aK="./dist/DaoPaaS.cjs",sK="./dist/DaoPaaS.cjs",lK="./dist/DaoPaaS.d.ts",cK={prebuild:"rimraf dist",build:"cross-env VITE_BUILD_EVENT=true pnpm tsc && pnpm vite && pnpm typedoc",copydist:"cp -r dist/sdk ../demo/public/",vite:"vite build --config ./config/vite.config.ts && shx cp ./src/types/DaoPaaS.d.ts ./dist",typedoc:"npx typedoc --tsconfig ./doc.tsconfig.json",workNameSpaceToFix:"node ./config/workNameSpaceToFix.js",tsc:"tsc -p ./tsconfig.json --isolatedModules false",test:"jest --coverage",prepublish:"pnpm build",publish:"npm publish --access public"},uK={"@codemirror/autocomplete":"^6.0.0","@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.0.0","@codemirror/legacy-modes":"^6.0.0","@codemirror/search":"^6.0.0","@codemirror/state":"^6.0.0","@codemirror/theme-one-dark":"^6.0.0","@codemirror/view":"^6.0.0","@emotion/babel-plugin":"^11.3.0","@emotion/babel-preset-css-prop":"^11.2.0","@emotion/core":"^11.0.0","@emotion/css":"^11.1.3","@emotion/eslint-plugin":"^11.2.0","@emotion/react":"^11.4.1","@emotion/styled":"^11.3.0","@headlessui/react":"^1.4.3","@loadable/component":"^5.15.2","@rsuite/icons":"^1.0.2","@testing-library/jest-dom":"^5.16.2","@testing-library/react":"^12.1.4","@types/fs-extra":"^9.0.13","@types/jest":"^27.0.2","@types/loadable__component":"^5.13.4","@types/lodash":"^4.14.175","@types/lodash.clonedeep":"^4.5.7","@types/lodash.isequal":"^4.5.6","@types/node":"^16.11.1","@types/ot":"^0.0.5","@types/react":"^17.0.24","@types/react-dom":"^17.0.9","@types/uuid":"^8.3.1","@typescript-eslint/eslint-plugin":"^4.28.2","@typescript-eslint/parser":"^4.28.2","@udecode/zustood":"^1.1.1","@uiw/react-codemirror":"^4.7.0","@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",immer:"^9.0.14",jest:"27.0.6",lodash:"^4.17.21",msw:"^0.39.2","ninja-keys":"^1.1.12",ot:"^0.0.15",prettier:"^2.3.2",react:"^17.0.2","react-complex-tree":"^1.1.6","react-dom":"^17.0.2","react-icons":"^4.3.1","react-markdown":"^8.0.0","reconnecting-websocket":"^4.4.0","rehype-katex":"^6.0.2","remark-math":"^5.1.1",rimraf:"^3.0.2","rollup-plugin-visualizer":"^5.6.0",rsuite:"5.6.4",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","use-immer":"^0.7.0","utf-8-validate":"^5.0.9",uuid:"^8.3.2",vite:"^2.7.2","vite-plugin-html":"^3.0.6","whatwg-fetch":"^3.6.2",xterm:"^4.13.0","xterm-addon-attach":"^0.6.0","xterm-addon-fit":"^0.5.0",zustand:"^4.0.0-rc.1"},fK=["dist"],dK={type:"git",url:"git+https://github.com/dao42/d42paas_frontend.git"},pK={url:"https://github.com/dao42/d42paas_frontend/issues"},hK={workerDirectory:"src"},OK={"lodash.clonedeep":"^4.5.0","lodash.isequal":"^4.5.0"};var mK={name:eK,version:tK,description:rK,author:nK,homepage:iK,license:oK,main:aK,module:sK,types:lK,scripts:cK,devDependencies:uK,files:fK,repository:dK,bugs:pK,msw:hK,dependencies:OK};const gK=()=>mK.version,vK=async(t,e,r)=>{const o=await(await fetch(t+"/api/v1/jssdk/ticket",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ticket:e,packageVersion:r})})).json();if(o.status==="failure")throw console.error(o),new Error(o.errors[0].erromsg);return o.data},yK=t=>{const e=Ce.dao.playgroundInfo().fileTree;let r=null;const n=o=>{if(o.path===t){r=o;return}else for(let a=0;a<o.children.length;a++)n(o.children[a])};return n(e),r},bK=t=>{if(!t)throw new Error("username can't be blank");return`https://ui-avatars.com/api/?background=e9f3f0&rounded=true&uppercase=true&bold=true&length=1&name=${t}`},ua=Object.create(null);ua.open="0";ua.close="1";ua.ping="2";ua.pong="3";ua.message="4";ua.upgrade="5";ua.noop="6";const Dh=Object.create(null);Object.keys(ua).forEach(t=>{Dh[ua[t]]=t});const wK={type:"error",data:"parser error"},xK=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",QK=typeof ArrayBuffer=="function",PK=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,$C=({type:t,data:e},r,n)=>xK&&e instanceof Blob?r?n(e):N$(e,n):QK&&(e instanceof ArrayBuffer||PK(e))?r?n(e):N$(new Blob([e]),n):n(ua[t]+(e||"")),N$=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+n)},r.readAsDataURL(t)},B$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let t=0;t<B$.length;t++)Wf[B$.charCodeAt(t)]=t;const SK=t=>{let e=t.length*.75,r=t.length,n,o=0,a,c,u,f;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const i=new ArrayBuffer(e),s=new Uint8Array(i);for(n=0;n<r;n+=4)a=Wf[t.charCodeAt(n)],c=Wf[t.charCodeAt(n+1)],u=Wf[t.charCodeAt(n+2)],f=Wf[t.charCodeAt(n+3)],s[o++]=a<<2|c>>4,s[o++]=(c&15)<<4|u>>2,s[o++]=(u&3)<<6|f&63;return i},$K=typeof ArrayBuffer=="function",kC=(t,e)=>{if(typeof t!="string")return{type:"message",data:_C(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:kK(t.substring(1),e)}:Dh[r]?t.length>1?{type:Dh[r],data:t.substring(1)}:{type:Dh[r]}:wK},kK=(t,e)=>{if($K){const r=SK(t);return _C(r,e)}else return{base64:!0,data:t}},_C=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},RC=String.fromCharCode(30),_K=(t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((a,c)=>{$C(a,!1,u=>{n[c]=u,++o===r&&e(n.join(RC))})})},RK=(t,e)=>{const r=t.split(RC),n=[];for(let o=0;o<r.length;o++){const a=kC(r[o],e);if(n.push(a),a.type==="error")break}return n},TC=4;function Hr(t){if(t)return TK(t)}function TK(t){for(var e in Hr.prototype)t[e]=Hr.prototype[e];return t}Hr.prototype.on=Hr.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};Hr.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};Hr.prototype.off=Hr.prototype.removeListener=Hr.prototype.removeAllListeners=Hr.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===e||n.fn===e){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+t],this};Hr.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,e)}return this};Hr.prototype.emitReserved=Hr.prototype.emit;Hr.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};Hr.prototype.hasListeners=function(t){return!!this.listeners(t).length};const hs=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function CC(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const CK=setTimeout,WK=clearTimeout;function Tg(t,e){e.useNativeTimers?(t.setTimeoutFn=CK.bind(hs),t.clearTimeoutFn=WK.bind(hs)):(t.setTimeoutFn=setTimeout.bind(hs),t.clearTimeoutFn=clearTimeout.bind(hs))}const zK=1.33;function XK(t){return typeof t=="string"?EK(t):Math.ceil((t.byteLength||t.size)*zK)}function EK(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}class qK extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class WC extends Hr{constructor(e){super(),this.writable=!1,Tg(this,e),this.opts=e,this.query=e.query,this.readyState="",this.socket=e.socket}onError(e,r,n){return super.emitReserved("error",new qK(e,r,n)),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 r=kC(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}}const zC="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Uy=64,MK={};let F$=0,Np=0,G$;function j$(t){let e="";do e=zC[t%Uy]+e,t=Math.floor(t/Uy);while(t>0);return e}function XC(){const t=j$(+new Date);return t!==G$?(F$=0,G$=t):t+"."+j$(F$++)}for(;Np<Uy;Np++)MK[zC[Np]]=Np;function EC(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function UK(t){let e={},r=t.split("&");for(let n=0,o=r.length;n<o;n++){let a=r[n].split("=");e[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return e}let qC=!1;try{qC=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch{}const AK=qC;function MC(t){const e=t.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!e||AK))return new XMLHttpRequest}catch{}if(!e)try{return new hs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function LK(){}const IK=function(){return new MC({xdomain:!1}).responseType!=null}();class DK extends WC{constructor(e){if(super(e),this.polling=!1,typeof location!="undefined"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location!="undefined"&&e.hostname!==location.hostname||o!==e.port,this.xs=e.secure!==n}const r=e&&e.forceBase64;this.supportsBinary=IK&&!r}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let n=0;this.polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};RK(e,this.socket.binaryType).forEach(r),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,_K(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const r=this.opts.secure?"https":"http";let n="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=XC()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(r==="https"&&Number(this.opts.port)!==443||r==="http"&&Number(this.opts.port)!==80)&&(n=":"+this.opts.port);const o=EC(e),a=this.opts.hostname.indexOf(":")!==-1;return r+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(o.length?"?"+o:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new aa(this.uri(),e)}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class aa extends Hr{constructor(e,r){super(),Tg(this,r),this.opts=r,this.method=r.method||"GET",this.uri=e,this.async=r.async!==!1,this.data=r.data!==void 0?r.data:null,this.create()}create(){const e=CC(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const r=this.xhr=new MC(e);try{r.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let n in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this.opts.extraHeaders[n])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(n){this.setTimeoutFn(()=>{this.onError(n)},0);return}typeof document!="undefined"&&(this.index=aa.requestsCount++,aa.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=LK,e)try{this.xhr.abort()}catch{}typeof document!="undefined"&&delete aa.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()}}aa.requestsCount=0;aa.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",H$);else if(typeof addEventListener=="function"){const t="onpagehide"in hs?"pagehide":"unload";addEventListener(t,H$,!1)}}function H$(){for(let t in aa.requests)aa.requests.hasOwnProperty(t)&&aa.requests[t].abort()}const YK=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0))(),Bp=hs.WebSocket||hs.MozWebSocket,K$=!0,ZK="arraybuffer",J$=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VK extends WC{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),r=this.opts.protocols,n=J$?{}:CC(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=K$&&!J$?r?new Bp(e,r):new Bp(e):new Bp(e,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||ZK,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 r=0;r<e.length;r++){const n=e[r],o=r===e.length-1;$C(n,this.supportsBinary,a=>{const c={};try{K$&&this.ws.send(a)}catch{}o&&YK(()=>{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 r=this.opts.secure?"wss":"ws";let n="";this.opts.port&&(r==="wss"&&Number(this.opts.port)!==443||r==="ws"&&Number(this.opts.port)!==80)&&(n=":"+this.opts.port),this.opts.timestampRequests&&(e[this.opts.timestampParam]=XC()),this.supportsBinary||(e.b64=1);const o=EC(e),a=this.opts.hostname.indexOf(":")!==-1;return r+"://"+(a?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(o.length?"?"+o:"")}check(){return!!Bp}}const NK={websocket:VK,polling:DK},BK=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,FK=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ay(t){const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=BK.exec(t||""),a={},c=14;for(;c--;)a[FK[c]]=o[c]||"";return r!=-1&&n!=-1&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=GK(a,a.path),a.queryKey=jK(a,a.query),a}function GK(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.substr(0,1)=="/"||e.length===0)&&n.splice(0,1),e.substr(e.length-1,1)=="/"&&n.splice(n.length-1,1),n}function jK(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,a){o&&(r[o]=a)}),r}class cs extends Hr{constructor(e,r={}){super(),e&&typeof e=="object"&&(r=e,e=null),e?(e=Ay(e),r.hostname=e.host,r.secure=e.protocol==="https"||e.protocol==="wss",r.port=e.port,e.query&&(r.query=e.query)):r.host&&(r.hostname=Ay(r.host).host),Tg(this,r),this.secure=r.secure!=null?r.secure:typeof location!="undefined"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=r.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.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},r),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=UK(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 r=Object.assign({},this.opts.query);r.EIO=TC,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts.transportOptions[e],this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new NK[e](n)}open(){let e;if(this.opts.rememberUpgrade&&cs.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",r=>this.onClose("transport close",r))}probe(e){let r=this.createTransport(e),n=!1;cs.priorWebsocketSuccess=!1;const o=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",l=>{if(!n)if(l.type==="pong"&&l.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;cs.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(s(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=r.name,this.emitReserved("upgradeError",p)}}))};function a(){n||(n=!0,s(),r.close(),r=null)}const c=l=>{const p=new Error("probe error: "+l);p.transport=r.name,a(),this.emitReserved("upgradeError",p)};function u(){c("transport closed")}function f(){c("socket closed")}function i(l){r&&l.name!==r.name&&a()}const s=()=>{r.removeListener("open",o),r.removeListener("error",c),r.removeListener("close",u),this.off("close",f),this.off("upgrading",i)};r.once("open",o),r.once("error",c),r.once("close",u),this.once("close",f),this.once("upgrading",i),r.open()}onOpen(){if(this.readyState="open",cs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let e=0;const r=this.upgrades.length;for(;e<r;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 r=new Error("server error");r.code=e.data,this.onError(r);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 r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=XK(o)),n>0&&r>this.maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}write(e,r,n){return this.sendPacket("message",e,r,n),this}send(e,r,n){return this.sendPacket("message",e,r,n),this}sendPacket(e,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:e,data:r,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}onError(e){cs.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,r){(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,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const r=[];let n=0;const o=e.length;for(;n<o;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}cs.protocol=TC;function HK(t,e="",r){let n=t;r=r||typeof location!="undefined"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r!="undefined"?t=r.protocol+"//"+t:t="https://"+t),n=Ay(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+e,n.href=n.protocol+"://"+a+(r&&r.port===n.port?"":":"+n.port),n}const KK=typeof ArrayBuffer=="function",JK=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,UC=Object.prototype.toString,eJ=typeof Blob=="function"||typeof Blob!="undefined"&&UC.call(Blob)==="[object BlobConstructor]",tJ=typeof File=="function"||typeof File!="undefined"&&UC.call(File)==="[object FileConstructor]";function J5(t){return KK&&(t instanceof ArrayBuffer||JK(t))||eJ&&t instanceof Blob||tJ&&t instanceof File}function Yh(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Yh(t[r]))return!0;return!1}if(J5(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Yh(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Yh(t[r]))return!0;return!1}function rJ(t){const e=[],r=t.data,n=t;return n.data=Ly(r,e),n.attachments=e.length,{packet:n,buffers:e}}function Ly(t,e){if(!t)return t;if(J5(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=Ly(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=Ly(t[n],e));return r}return t}function nJ(t,e){return t.data=Iy(t.data,e),t.attachments=void 0,t}function Iy(t,e){if(!t)return t;if(t&&t._placeholder)return e[t.num];if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=Iy(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Iy(t[r],e));return t}const iJ=5;var Pt;(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"})(Pt||(Pt={}));class oJ{constructor(e){this.replacer=e}encode(e){return(e.type===Pt.EVENT||e.type===Pt.ACK)&&Yh(e)?(e.type=e.type===Pt.EVENT?Pt.BINARY_EVENT:Pt.BINARY_ACK,this.encodeAsBinary(e)):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===Pt.BINARY_EVENT||e.type===Pt.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=rJ(e),n=this.encodeAsString(r.packet),o=r.buffers;return o.unshift(n),o}}class e2 extends Hr{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string")r=this.decodeString(e),r.type===Pt.BINARY_EVENT||r.type===Pt.BINARY_ACK?(this.reconstructor=new aJ(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r);else if(J5(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(Pt[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Pt.BINARY_EVENT||n.type===Pt.BINARY_ACK){const a=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const c=e.substring(a,r);if(c!=Number(c)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(c)}if(e.charAt(r+1)==="/"){const a=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(a,r)}else n.nsp="/";const o=e.charAt(r+1);if(o!==""&&Number(o)==o){const a=r+1;for(;++r;){const c=e.charAt(r);if(c==null||Number(c)!=c){--r;break}if(r===e.length)break}n.id=Number(e.substring(a,r+1))}if(e.charAt(++r)){const a=this.tryParse(e.substr(r));if(e2.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Pt.CONNECT:return typeof r=="object";case Pt.DISCONNECT:return r===void 0;case Pt.CONNECT_ERROR:return typeof r=="string"||typeof r=="object";case Pt.EVENT:case Pt.BINARY_EVENT:return Array.isArray(r)&&r.length>0;case Pt.ACK:case Pt.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class aJ{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=nJ(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var sJ=Object.freeze(Object.defineProperty({__proto__:null,protocol:iJ,get PacketType(){return Pt},Encoder:oJ,Decoder:e2},Symbol.toStringTag,{value:"Module"}));function Ro(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const lJ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class AC extends Hr{constructor(e,r,n){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Ro(e,"open",this.onopen.bind(this)),Ro(e,"packet",this.onpacket.bind(this)),Ro(e,"error",this.onerror.bind(this)),Ro(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,...r){if(lJ.hasOwnProperty(e))throw new Error('"'+e+'" is a reserved event name');r.unshift(e);const n={type:Pt.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const c=this.ids++,u=r.pop();this._registerAckCallback(c,u),n.id=c}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,r){const n=this.flags.timeout;if(n===void 0){this.acks[e]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);r.call(this,new Error("operation has timed out"))},n);this.acks[e]=(...a)=>{this.io.clearTimeoutFn(o),r.apply(this,[null,...a])}}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this.packet({type:Pt.CONNECT,data:e})}):this.packet({type:Pt.CONNECT,data:this.auth})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Pt.CONNECT:if(e.data&&e.data.sid){const o=e.data.sid;this.onconnect(o)}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 Pt.EVENT:case Pt.BINARY_EVENT:this.onevent(e);break;case Pt.ACK:case Pt.BINARY_ACK:this.onack(e);break;case Pt.DISCONNECT:this.ondisconnect();break;case Pt.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e)}ack(e){const r=this;let n=!1;return function(...o){n||(n=!0,r.packet({type:Pt.ACK,id:e,data:o}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(r.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:Pt.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 r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,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 r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function ku(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}ku.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};ku.prototype.reset=function(){this.attempts=0};ku.prototype.setMin=function(t){this.ms=t};ku.prototype.setMax=function(t){this.max=t};ku.prototype.setJitter=function(t){this.jitter=t};class Dy extends Hr{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,Tg(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new ku({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const o=r.parser||sJ;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.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 r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.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 cs(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=Ro(r,"open",function(){n.onopen(),e&&e()}),a=Ro(r,"error",c=>{n.cleanup(),n._readyState="closed",this.emitReserved("error",c),e?e(c):n.maybeReconnectOnOpen()});if(this._timeout!==!1){const c=this._timeout;c===0&&o();const u=this.setTimeoutFn(()=>{o(),r.close(),r.emit("error",new Error("timeout"))},c);this.opts.autoUnref&&u.unref(),this.subs.push(function(){clearTimeout(u)})}return this.subs.push(o),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Ro(e,"ping",this.onping.bind(this)),Ro(e,"data",this.ondata.bind(this)),Ro(e,"error",this.onerror.bind(this)),Ro(e,"close",this.onclose.bind(this)),Ro(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,r){let n=this.nsps[e];return n||(n=new AC(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],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,r){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),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 r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(function(){clearTimeout(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const sf={};function Zh(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=HK(t,e.path||"/socket.io"),n=r.source,o=r.id,a=r.path,c=sf[o]&&a in sf[o].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||c;let f;return u?f=new Dy(n,e):(sf[o]||(sf[o]=new Dy(n,e)),f=sf[o]),r.query&&!e.query&&(e.query=r.queryKey),f.socket(r.path,e)}Object.assign(Zh,{Manager:Dy,Socket:AC,io:Zh,connect:Zh});const cJ="loading",t2="ready",LC="offline",IC="online",uJ="statusChanged",fJ="lspStatusChanged",dJ="playgroundChanged",pJ="following",hJ="unFollowing",OJ="runStatusChanged",mJ="ApplicationAvailable",r2="playbackInfo",gJ="userEnter",vJ="userLeave",yJ="usersUpdated",bJ="connectionBroken",wJ="authorizationFailed",O1="errorFromServer",xJ="auth",QJ="connect",PJ="disconnect",SJ="authAck",$J="active",kJ="syncPlaygroundInfo",_J="runStatus",RJ="lspStatus",TJ="following",CJ="unFollowing",WJ="userEnter",zJ="userLeave",XJ="usersUpdated",EJ="portOpen",qJ="playbackInfo",MJ="playbackData",UJ="file",Yy="run",Zy="console",Vy="terminal";class AJ{constructor(e,r=2e3){Ze(this,"name");Ze(this,"channel");Ze(this,"_timeout");Ze(this,"_messageId");Ze(this,"_messages");Ze(this,"_filter");this.name=e,this._messageId=0,this.channel=new BroadcastChannel(e),this.channel.onmessage=n=>this.receive(n),this._messages=[],this._timeout=r}setFilter(e){this._filter=e}send(e,r){const n=new LJ(r||this._timeout),o=new Promise((a,c)=>{n._reject=c,n._resolve=a});return this._messages.push(n),this.channel.postMessage({id:this._messageId++,type:"request",payload:e}),o}answer(e,r){this.channel.postMessage({id:e,type:"response",payload:r})}receive(e){const r=e.data;r.type==="request"?(!this._filter||this._filter(r.payload))&&this.answer(r.id,{active:!0}):r.type==="response"&&this._messages[r.id].reject(r.payload)}}class LJ{constructor(e){Ze(this,"_resolve");Ze(this,"_reject");Ze(this,"_interval");this._interval=setTimeout(()=>this.resolve({active:!1,reason:"timeout, no one uses it"}),e)}resolve(e){clearTimeout(this._interval),this._resolve(e)}reject(e){this._reject(e)}}const ek=new AJ("dao-paas",500);let DC;async function IJ(){let t="";ek.setFilter(n=>n.id===t);const e=JSON.parse(localStorage.getItem("agentUsers")||"[]")||[],r=[];for(const n of e){const o=ek.send(n).then(()=>{if(t==="")return n.time=new Date().getTime(),t=n.id,localStorage.setItem("agentUsers",JSON.stringify(e)),Promise.resolve(t)});r.push(o)}return Promise.any(r)}function DJ(t){const e=JSON.parse(localStorage.getItem("agentUsers")||"[]")||[],r=e.find(n=>n.id==t);r?r.time=new Date().getTime():e.push({id:t,time:new Date().getTime()}),localStorage.setItem("agentUsers",JSON.stringify(e)),DC=t}function YJ(t){return t===DC}class ZJ{constructor(e,r,n,o,a){Ze(this,"start");Ze(this,"end");Ze(this,"total");Ze(this,"rate");Ze(this,"dataBuffer",[]);Ze(this,"index",0);Ze(this,"startTimestamp");Ze(this,"endTimestamp");Ze(this,"previousTimeStamp");Ze(this,"pausedTime",0);Ze(this,"escapeTime",0);Ze(this,"playing",!1);Ze(this,"eventDispatcher");Ze(this,"progressDispatcher");this.start=e,this.end=r,this.total=n,this.rate=1,this.eventDispatcher=o,this.progressDispatcher=a,this.step=this.step.bind(this)}convertToAbsoluteTime(e){return this.start+e}setRate(e){this.rate=e||this.rate}buffer(e){this.dataBuffer=this.dataBuffer.concat(e)}pause(){if(!this.playing){console.warn("Do not pause more than one time");return}this.playing=!1}resume(){this.previousTimeStamp&&(this.pausedTime+=performance.now()-this.previousTimeStamp),this.playing=!0,window.requestAnimationFrame(this.step)}restart(){this.index=0,this.startTimestamp=void 0,this.pausedTime=0,this.escapeTime=0,this.playing=!0,window.requestAnimationFrame(this.step)}movePosition(e){const r=this.index;let n=0,o=this.dataBuffer.length-1;for(;n<o;){const a=Math.floor(n+(o-n)/2);this.dataBuffer[a].timestamp<this.dataBuffer[0].timestamp+e?n=a+1:o=a}this.index=n,this.escapeTime=this.escapeTime+this.dataBuffer[this.index].timestamp-this.dataBuffer[r].timestamp}step(e){if(!!this.playing){if(this.index==this.dataBuffer.length){this.index-=1,this.playing=!1,this.endTimestamp=e,this.progressDispatcher&&this.progressDispatcher("complete",this.endTimestamp-this.startTimestamp);return}if(this.startTimestamp===void 0){const r=this.dataBuffer[this.index];this.startTimestamp=e,this.trigger(r.eventName,r.data),this.index++}else{const r=(e-this.pausedTime-this.startTimestamp+this.escapeTime)*this.rate;if(this.progressDispatcher&&this.progressDispatcher("progress",r),this.previousTimeStamp!==e){const n=this.dataBuffer[0].timestamp,o=this.dataBuffer[this.index];if(!o.timestamp){this.index++,window.requestAnimationFrame(this.step);return}n+r>=o.timestamp&&(this.trigger(o.eventName,o.data),this.index++)}this.previousTimeStamp=e}window.requestAnimationFrame(this.step)}}trigger(e,r){this.eventDispatcher(e,r)}}class VJ{constructor(e,r,n=10){Ze(this,"socket");Ze(this,"ioPath");Ze(this,"authOptions");Ze(this,"heartbeatInterval",null);Ze(this,"maxReconnectionAttemps");Ze(this,"playControlSubscribers");Ze(this,"componentSubscribersMap");Ze(this,"messageListeners");Ze(this,"errorListeners");Ze(this,"playbackEngine");this.ioPath=e,this.authOptions=r,this.maxReconnectionAttemps=n,this.messageListeners=[],this.errorListeners=[],this.playControlSubscribers=[],this.componentSubscribersMap={fileTree:[],editor:[],console:[],terminal:[],simulator:[],focusChange:[],run:[],keyEvent:[]}}addMessageListener(e){this.messageListeners.find(e)||this.messageListeners.push(e)}removeMessageListener(e){const r=this.messageListeners.findIndex(n=>n===e);r>-1&&this.messageListeners.splice(r,1)}addErrorListener(e){this.errorListeners.find(e)||this.errorListeners.push(e)}removeErrorListener(e){const r=this.errorListeners.findIndex(n=>n===e);r>-1&&this.errorListeners.splice(r,1)}startChannel(){if(this.socket&&this.socket.connected){console.warn("The connection is already established.");return}this.connect()}connect(){Ce.dao.appStatus()==="drafted"&&this.transitionLoading(),this.socket=Zh(this.ioPath,{reconnectionAttempts:10,reconnectionDelayMax:1e4,transports:["websocket"]}),this.registerEventsOnSocket(),this.socket.on(QJ,()=>{this.authorize(),Ce.dao.isReadyOffline()&&this.transitionOnline()}),this.socket.on(PJ,()=>{Et.dao._channelAvailable(!1),this.clearHeartbeatInterval(),Ce.dao.isReady()&&this.transitionOffline()}),this.socket.io.on("reconnect_attempt",e=>{e>=this.maxReconnectionAttemps&&this.transitionError(bJ,"Reconnection attemps exceeds the maximum times")}),this.socket.on(SJ,({result:e,data:r,error:n})=>{if(!e){this.transitionError(wJ,n);return}const{agentUserId:o}=r;if(DJ(o),!YJ(o))throw new Error(`The agentUserId ${o} is inconsistent`);this.startHeartbeatInterval(),this.authOptions.agentUserId=o,this.updateCurrentAgentUserId(o),Et.dao._channelAvailable(!0)})}authorize(){this.send(xJ,this.authOptions)}subscribeForComponent(e,r){this.componentSubscribersMap[e].push(r)}unsubscribeForComponent(e,r){const n=this.componentSubscribersMap[e].findIndex(o=>o===r);n>-1&&this.componentSubscribersMap[e].splice(n,1)}subscribeForPlayControl(e){this.playControlSubscribers.push(e)}unsubscribeForPlayControl(e){const r=this.playControlSubscribers.findIndex(n=>n===e);r>-1&&this.playControlSubscribers.splice(r,1)}registerEventsOnSocket(){if(!this.socket)throw new Error("The connection has not been established yet.");this.socket.on(kJ,e=>{if(e.playgroundIDEServerStatus==="ERROR"){this.transitionError(O1,e.playgroundIDEServerStatusReason);return}if(Ce.dao.appStatus()==="loading"){this.initAppStatusLoadingPlaygroundInfo(e);return}if(Ce.dao.isReady()){this.changeAppStatusReadyPlaygroundInfo(e);return}console.warn("syncPlaygroundInfo event happened at a wrong appStatus")}),this.socket.on($J,e=>{const{success:r,reason:n}=e,o={SUCCESS:"\u6210\u529F",PLAYGROUND_NOT_EXISTED:"playground\u4E0D\u5B58\u5728",DOCKER_NOT_BIND:"playground\u672A\u7ED1\u5B9A\u5BB9\u5668",DOCKER_START_FAIL:"\u5BB9\u5668\u542F\u52A8\u5931\u8D25",RESOURCE_NOT_ENOUG:"\u670D\u52A1\u5668\u8D44\u6E90\u4E0D\u8DB3",BUSY:"\u670D\u52A1\u5668\u7E41\u5FD9"};r||this.transitionError(O1,`\u542F\u52A8\u5931\u8D25: ${o[n]||n}`)}),this.socket.on(TJ,e=>{const{agentUsers:r}=Ce.dao.playgroundInfo(),n=r.findIndex(o=>o.userId===e.agentUserId);n>-1&&(r[n]=e),this.updatePlaygroundInfoPartial({agentUsers:r}),this.trigger("message",{name:pJ,payload:{user:e}})}),this.socket.on(CJ,e=>{const{agentUsers:r}=Ce.dao.playgroundInfo(),n=r.findIndex(o=>o.userId===e.agentUserId);n>-1&&(r[n]=e),this.updatePlaygroundInfoPartial({agentUsers:r}),this.trigger("message",{name:hJ,payload:{user:e}})}),this.socket.on(_J,e=>{const{status:r,runResult:n}=e,{dockerInfo:o}=Ce.dao.playgroundInfo();if(o.runStatus===r){console.debug("runStatus event is the same, ignored");return}this.updatePlaygroundInfoPartial({dockerInfo:nt(ze({},o),{runStatus:r})}),this.trigger("message",{name:OJ,payload:{status:r,runResult:n}})}),this.socket.on(RJ,e=>{const{dockerInfo:r}=Ce.dao.playgroundInfo(),n=r.lspStatus,{status:o}=e;if(n===o){console.debug("lspStatus event is the same, ignored");return}this.updatePlaygroundInfoPartial({dockerInfo:nt(ze({},r),{lspStatus:o})}),this.trigger("message",{name:fJ,payload:{status:o}})}),this.socket.on(UJ,e=>{const r=Ce.dao.currentAgentUserId(),n=Et.currentDoc.switchDoc,o=Ce.dao.currentAgentUser(),a=Et.dao.updateAgentUser;this.updateCRDTInfo(e),(e.agentUserId===r||o.followingAgentUserId===e.agentUserId)&&n(nt(ze({},e.data),{agentUserId:e.agentUserId})),a(e.agentUserId,{fileOpened:e.data.path}),o.followingAgentUserId&&a(r,{fileOpened:e.data.path}),Et.loading.setModuleLoading({Editor:!1})}),this.socket.on(WJ,e=>{Ce.dao.getAgentUserById(e.agentUserId)?Et.dao.updateAgentUser(e.agentUserId,e):Et.dao.addAgentUser(e),this.trigger("message",{name:gJ,payload:{agentUser:e}})}),this.socket.on(zJ,e=>{Et.dao.updateAgentUser(e.agentUserId,e),this.trigger("message",{name:vJ,payload:{agentUser:e}})}),this.socket.on(XJ,e=>{this.updatePlaygroundInfoPartial({agentUsers:e}),this.trigger("message",{name:yJ,payload:{agentUsers:e}})}),this.socket.on("fileNode",e=>{Et.fileTree.switchFileTree(e),this.updatePlaygroundInfoPartial({fileTree:e})}),this.socket.on(Yy,e=>{this.dispatchDataEvent(Yy,e)}),this.socket.on(Zy,e=>{this.dispatchDataEvent(Zy,e.data)}),this.socket.on(Vy,e=>{this.dispatchDataEvent(Vy,e.data)}),this.socket.on(EJ,()=>{this.trigger("message",{name:mJ})}),this.socket.on(qJ,e=>{const{start:r,end:n,total:o}=e;this.trigger("message",{name:r2,payload:e}),this.playbackEngine=new ZJ(r,n,o,this.dispatchDataEvent.bind(this),this.dispatchProgressEvent.bind(this))}),this.socket.on(MJ,e=>{this.playbackEngine.buffer(e),this.playControlSubscribers.forEach(r=>r.onAvailable()),this.playbackEngine.resume()}),this.socket.onAny((e,r)=>{console.debug(`<< ${e}`)}),this.socket.on("errorHandler",e=>{this.transitionError(O1,`${e.name}: ${e.message}`)})}initAppStatusLoadingPlaygroundInfo(e){Et.dao.setPlaygroundInfo(e),e.playgroundIDEServerStatus==="SYNCED"&&this.transitionReady()}changeAppStatusReadyPlaygroundInfo(e){const r=Ce.dao.playgroundInfo().status,n=Ce.dao.playgroundInfo().dockerInfo.dockerId;Et.dao.setPlaygroundInfo(e),e.status!=r&&this.trigger("message",{name:uJ,payload:{status:e.status}}),e.dockerInfo.dockerId&&e.dockerInfo.dockerId!==n&&this.trigger("message",{name:dJ})}transitionOnline(){Et.dao.transitionOnline(),this.trigger("message",{name:IC})}transitionOffline(){Et.dao.transitionOffline(),this.trigger("message",{name:LC})}transitionLoading(){Et.dao.transitionLoading(),this.trigger("message",{name:cJ})}transitionReady(){Et.dao.transitionReady(),this.trigger("message",{name:t2})}transitionError(e,r){Et.dao.transitionError(),this.trigger("error",{name:e,error:r}),this.closeChannel()}updatePlaygroundInfoPartial(e){Et.dao.setPlaygroundInfo(ze(ze({},Ce.dao.playgroundInfo()),e))}updateCurrentAgentUserId(e){Et.dao.currentAgentUserId(e)}updateCRDTInfo(e){Et.dao.setCRDTInfo(e)}dispatchDataEvent(e,r){this.componentSubscribersMap[e].forEach(n=>{n.onData(r)})}dispatchProgressEvent(e,r){this.playControlSubscribers.forEach(n=>{e==="complete"?n.onComplete():n.onProgress(r)})}trigger(e,r){if(console.debug(`<trigger: ${r.name}`),e==="error"){this.errorListeners.forEach(n=>n(r));return}this.messageListeners.forEach(n=>n(r))}clearHeartbeatInterval(){this.heartbeatInterval&&(clearInterval(this.heartbeatInterval),this.heartbeatInterval=null)}startHeartbeatInterval(){this.heartbeatInterval=setInterval(()=>{this.heartbeat()},6e4)}active(){this.send("active")}run(){this.send("run")}stop(){this.send("stop")}loadFile(e){this.send("file",e)}loadFolder(e){this.send("fileDir",e)}editFile(e){this.send("editFile",e)}operateFileTree(e){this.send("fileTreeOp",e)}uploadFolder(e){this.send("uploadFolder",e)}uploadFile(e){this.send("uploadFile",e)}terminal(e){this.send("terminal",e)}cursor(e){this.send("cursor",e)}heartbeat(){this.send("heartbeat")}getPlaybackInfo(){this.send("getPlaybackInfo")}fetchPlaybackData(e){this.send("loadPlaybackData",e)}fetchReplayData(e){this.send("getReplayData",e)}followingAgentUser(e){this.send("followingAgentUser",e)}featureConfig(e){this.send("setFeaturesConfig",e)}setFileLockStatus(e){this.send("setFileLockStatus",e)}setFileVisiable(e){this.send("setFileVisiable",e)}addFileToUnitTest(e){this.send("addFileToUnitTest",e)}removeFileFromUnitTest(e){this.send("removeFileFromUnitTest",e)}followingFocusComponent(e){const r=Ce.dao.currentAgentUser();!r||r.focusComponent!==e&&(r.followingAgentUserId||this.send("followingFocusComponent",e))}followingEditorScroll(e){const r=Ce.dao.currentAgentUser();r!=null&&r.followingAgentUserId||this.send("followingEditorScroll",e)}unFollowingAgentUser(){this.send("unFollowingAgentUser")}restartPlayback(e){this.playbackEngine.setRate(e),this.playbackEngine.restart()}startPlayback(e=0,r=1){this.playbackEngine.setRate(r);const n=this.playbackEngine.convertToAbsoluteTime(e);this.playControlSubscribers.forEach(o=>o.onLoad()),this.fetchPlaybackData({start:n})}goToPlayback(e){console.log("drag to a new position",e),this.playbackEngine.movePosition(e)}pausePlayback(){this.playbackEngine.pause()}resumePlayback(){this.playbackEngine.resume()}setPlaybackRate(e){this.playbackEngine.setRate(e)}stopPlayback(){}send(e,r={}){if(!this.socket)throw new Error("socket is not ready");console.debug(`>> ${e}`),this.socket.emit(e,r)}on(e,r){if(!this.socket)throw new Error("socket is not ready");this.socket.on(e,r)}off(e){if(!this.socket)throw new Error("socket is not ready");this.socket.off(e)}isReady(){var e;return(e=this.socket)==null?void 0:e.connected}closeChannel(){var e,r;console.debug("close Channel..."),this.clearHeartbeatInterval(),(e=this.socket)==null||e.removeAllListeners(),(r=this.socket)==null||r.close(),this.socket=void 0}}const NJ=Su(async()=>(await Promise.resolve().then(function(){return Y2e})).FileTree),BJ=Su(async()=>(await Promise.resolve().then(function(){return BWe})).Editor),FJ=Su(async()=>(await Promise.resolve().then(function(){return Mze})).default),GJ=Su(async()=>(await Promise.resolve().then(function(){return Ize})).default),jJ=Su(async()=>(await Promise.resolve().then(function(){return Zze})).default);class HJ{constructor(e){Ze(this,"components",{Tree:null,Editor:null,Console:null,Browser:null,Shell:null});Ze(this,"paasOptions");Ze(this,"paasDomainPath");Ze(this,"sdkVersion");Ze(this,"isRendered",!1);Ze(this,"_onMessages",[]);Ze(this,"_onErrors",[]);Ze(this,"_playControlSubscribers",[]);Ze(this,"_componentSubscribers",{});Ze(this,"themeType",zy.dark);this.sdkVersion=gK(),this.setPaasOptionsWithDefaultAvatar(e),this.setPaasDomainPathWithDefaultOrigin(e.paasDomain),this.themeType=e.themeType||zy.dark,this.init()}loadTheme(e){this.themeType=e,Et.theme.setTheme(this.themeType,za.terminal),Et.theme.setTheme(this.themeType,za.console),Sj(this.themeType)}setPaasOptionsWithDefaultAvatar(e){this.paasOptions=e,this.paasOptions.userInfo.avatarUrl||(this.paasOptions.userInfo.avatarUrl=bK(this.paasOptions.userInfo.username))}setPaasDomainPathWithDefaultOrigin(e){this.paasDomainPath={}.PAAS_MANAGER_API_ORIGIN||"https://www.1024paas.com",e&&(this.paasDomainPath=e)}get playgroundStatus(){return Ce.dao.playgroundInfo().status}get dockerStatus(){var e;return(e=Ce.dao.playgroundInfo().dockerInfo)==null?void 0:e.runStatus}get currentAgentUser(){return Ce.dao.currentAgentUser()}get agentUsers(){return Ce.dao.playgroundInfo().agentUsers}get playgroundInfo(){return Ce.dao.playgroundInfo()}get currentFollowingAgentUser(){return Ce.dao.getFollowingAgentUser()}followUser(e){this.currentAgentUser.fileOpened&&Ce.dao.channel().loadFile(this.currentAgentUser.fileOpened),Ce.dao.channel().followingAgentUser(e)}unFollowUser(){Ce.dao.channel().unFollowingAgentUser()}preparePlayback(){Et.dao.setPlaygroundMode(ca.playback),Ce.dao.channel().getPlaybackInfo()}restartPlayback(e){Ce.dao.channel().restartPlayback(e)}startPlayback(e,r){Ce.dao.channel().startPlayback(e,r)}goToPlayback(e){Ce.dao.channel().goToPlayback(e)}pausePlayback(){Ce.dao.channel().pausePlayback()}resumePlayback(){Ce.dao.channel().resumePlayback()}setRate(e){Ce.dao.channel().setPlaybackRate(e)}stopPlayback(){Ce.dao.channel().stopPlayback()}activePlayground(){Ce.dao.channel().active()}runPlayground(){Ce.dao.channel().run()}stopPlayground(){Ce.dao.channel().stop()}onUploadFile(e){Ce.dao.channel().send("upload",e)}async init(){this.loadTheme(this.themeType),console.debug(`sdk: init with ${this.paasDomainPath} passDomain`);const e=await vK(this.paasDomainPath,this.paasOptions.ticket,this.sdkVersion);let r;try{r=await IJ()}catch{}const n=new VJ(e,nt(ze({},this.paasOptions),{agentUserId:r}));this._onMessages.forEach(o=>n.addMessageListener(o)),this._onMessages=[],this._onErrors.forEach(o=>n.addErrorListener(o)),this._onErrors=[],Et.dao.reset(),Et.dao.setChannel(n),n.startChannel()}addMessageListener(e){var r;Ce.dao.channel()?(r=Ce.dao.channel())==null||r.addMessageListener(e):this._onMessages.push(e)}addErrorListener(e){var r;Ce.dao.channel()?(r=Ce.dao.channel())==null||r.addErrorListener(e):this._onErrors.push(e)}addPlayControlSubscriber(e){var r;Ce.dao.channel()?(r=Ce.dao.channel())==null||r.subscribeForPlayControl(e):this._playControlSubscribers.push(e)}removePlayControlSubscriber(e){var r;if(Ce.dao.channel())(r=Ce.dao.channel())==null||r.unsubscribeForPlayControl(e);else{const n=this._playControlSubscribers.findIndex(o=>o===e);n>-1&&this._playControlSubscribers.splice(n,1)}}addComponentSubscriber(e,r){var n;Ce.dao.channel()?(n=Ce.dao.channel())==null||n.subscribeForComponent(e,r):(this._componentSubscribers[e]&&(this._componentSubscribers[e]=new Array),this._componentSubscribers[e].push(r))}removeComponentSubscriber(e,r){var n,o;if(Ce.dao.channel())(o=Ce.dao.channel())==null||o.unsubscribeForComponent(e,r);else{this._componentSubscribers[e]&&(this._componentSubscribers[e]=new Array);const a=(n=this._componentSubscribers[e])==null?void 0:n.findIndex(c=>c===r);a>-1&&this._componentSubscribers[e].splice(a,1)}}initComponent(e,r,n){const o=c=>{switch(e){case"Tree":return ae(NJ,ze({},c));case"Editor":return ae(BJ,ze({},c));case"Browser":return ae(GJ,ze({},c));case"Console":return ae(FJ,ze({},c));case"Shell":return ae(jJ,ze({},c));default:throw new Error("wrong component name")}};this.components[e]={reactComponent:o,container:r,props:n};const a=document.querySelector(r);xl.exports.render(ae(X.exports.Suspense,{fallback:ae(JH,{}),children:ae(o,ze({},n))}),a)}mapRender(e){e.forEach((r,n)=>{const{item:o,container:a,props:c}=r;this.initComponent(o,a,c)})}dispose(){var e;console.debug("destroy components...",this.components),(e=Ce.dao._channel())==null||e.closeChannel(),Et.dao.setChannel(null),Et.dao.reset();for(const[r,n]of Object.entries(this.components)){if(!n)break;const o=document.querySelector(n.container);if(o){const a=xl.exports.unmountComponentAtNode(o);console.debug(`destroy unmount: ${n.container}, ${a}`)}}}}var qa;(function(t){t.DoubleClickItemToExpand="double-click-item-to-expand",t.ClickItemToExpand="click-item-to-expand",t.ClickArrowToExpand="click-arrow-to-expand"})(qa||(qa={}));var ZO=globalThis&&globalThis.__assign||function(){return ZO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},ZO.apply(this,arguments)},KJ=function(t,e){return{mode:t.mode,createInteractiveElementProps:function(r,n,o,a){return ZO(ZO({},e.createInteractiveElementProps(r,n,o,a)),t.createInteractiveElementProps(r,n,o,a))}}},JJ=function(){function t(e){this.mode=qa.DoubleClickItemToExpand,this.environment=e}return t.prototype.createInteractiveElementProps=function(e,r,n,o){var a=this;return{onClick:function(c){n.focusItem(),c.shiftKey?n.selectUpTo():c.ctrlKey?o.isSelected?n.unselectItem():n.addToSelectedItems():n.selectItem()},onDoubleClick:function(){n.focusItem(),n.selectItem(),e.hasChildren&&n.toggleExpandedState(),(!e.hasChildren||a.environment.canInvokePrimaryActionOnItemContainer)&&n.primaryAction()},onFocus:function(){n.focusItem()},onDragStart:function(c){c.dataTransfer.dropEffect="move",n.startDragging()},onDragOver:function(c){c.preventDefault()},draggable:o.canDrag&&!o.isRenaming,tabIndex:o.isRenaming?void 0:o.isFocused?0:-1}},t}(),eee=function(){function t(e){this.mode=qa.ClickItemToExpand,this.environment=e}return t.prototype.createInteractiveElementProps=function(e,r,n,o){var a=this;return{onClick:function(c){n.focusItem(),c.shiftKey?n.selectUpTo():c.ctrlKey?o.isSelected?n.unselectItem():n.addToSelectedItems():(e.hasChildren&&n.toggleExpandedState(),n.selectItem(),(!e.hasChildren||a.environment.canInvokePrimaryActionOnItemContainer)&&n.primaryAction())},onFocus:function(){n.focusItem()},onDragStart:function(c){c.dataTransfer.dropEffect="move",n.startDragging()},onDragOver:function(c){c.preventDefault()},draggable:o.canDrag&&!o.isRenaming,tabIndex:o.isRenaming?void 0:o.isFocused?0:-1}},t}(),tee=function(){function t(e){this.mode=qa.ClickItemToExpand,this.environment=e}return t.prototype.createInteractiveElementProps=function(e,r,n,o){var a=this;return{onClick:function(c){n.focusItem(),c.shiftKey?n.selectUpTo():c.ctrlKey?o.isSelected?n.unselectItem():n.addToSelectedItems():(n.selectItem(),(!e.hasChildren||a.environment.canInvokePrimaryActionOnItemContainer)&&n.primaryAction())},onFocus:function(){n.focusItem()},onDragStart:function(c){c.dataTransfer.dropEffect="move",n.startDragging()},onDragOver:function(c){c.preventDefault()},draggable:o.canDrag&&!o.isRenaming,tabIndex:o.isRenaming?void 0:o.isFocused?0:-1}},t}(),tk=function(t,e){switch(t){case qa.DoubleClickItemToExpand:return new JJ(e);case qa.ClickItemToExpand:return new eee(e);case qa.ClickArrowToExpand:return new tee(e);default:throw Error("Unknown interaction mode "+t)}},YC=X.exports.createContext(null),ree=function(){return X.exports.useContext(YC)},nee=function(t){var e=ir(),r=e.defaultInteractionMode,n=X.exports.useMemo(function(){var o;return r&&typeof r!="string"?r.extends?KJ(r,tk(r.extends,e)):r:tk((o=r)!==null&&o!==void 0?o:qa.ClickItemToExpand,e)},[]);return X.exports.createElement(YC.Provider,{value:n},t.children)},ZC=function(){var t=ir();return X.exports.useCallback(function(e,r){for(var n=t.linearItems[r],o=n[e].depth,a=e;!!n[a]&&n[a].depth!==o-1;a--);var c=n[a];return c||(c={item:t.trees[r].rootItem,depth:0},a=0),c},[t.linearItems,t.trees])},iee=function(t,e){return t.clientX<e.left||t.clientX>e.right||t.clientY<e.top||t.clientY>e.bottom},oee=function(t,e,r,n,o){var a=(t-e)/r,c=Math.floor(a),u=void 0,f=n||o?.2:.5;return a%1<f?u="top":a%1>1-f&&(u="bottom"),{linearIndex:c,offset:u}},aee=function(t,e,r,n,o){var a=ir(),c=a.canDropOnItemWithChildren,u=a.canDropOnItemWithoutChildren,f=a.canDragAndDrop,i=a.linearItems,s=a.items,l=a.canReorderItems,p=a.viewState,d=ZC();return X.exports.useCallback(function(h,x,g){var O,m,v,w;if(!!f&&!!g.current&&!(h.clientX<0||h.clientY<0)){var Q=g.current.getBoundingClientRect(),P=iee(h,Q),k=oee(h.clientY,Q.top,r,c,u),W=k.linearIndex,z=k.offset,C=P?"outside":""+x+W+(z!=null?z:"");if(t!==C){if(e(C),P){n(void 0);return}if(W<0||W>=i[x].length){n(void 0);return}var E=i[x][W],T=E.depth,q=s[E.item];if(!z&&!u&&!q.hasChildren){n(void 0);return}if(!z&&!c&&q.hasChildren){n(void 0);return}if(z&&!l){n(void 0);return}var F=d(W,x);if(!(!((m=(O=p[x])===null||O===void 0?void 0:O.selectedItems)===null||m===void 0)&&m.includes(E.item))){var I=s[F.item].children.indexOf(E.item)+(z==="top"?0:1);z==="top"&&T===((w=(v=i[x][W-1])===null||v===void 0?void 0:v.depth)!==null&&w!==void 0?w:-1)&&(z="bottom",W-=1);var U;z?U={targetType:"between-items",treeId:x,parentItem:F.item,depth:E.depth,linearIndex:W+(z==="top"?0:1),childIndex:I,linePosition:z}:U={targetType:"item",treeId:x,parentItem:F.item,targetItem:E.item,depth:E.depth,linearIndex:W},o(U)}}}},[f,c,u,l,d,r,s,t,i,n,o,e,p])},VC=function(){var t=ir();return X.exports.useCallback(function(e,r){if(e.targetType==="between-items"){if(!t.canReorderItems)return!1}else{var n=t.items[e.targetItem];if(!t.canDropOnItemWithChildren&&n.hasChildren||!t.canDropOnItemWithoutChildren&&!n.hasChildren)return!1}return!(t.canDropAt&&(!r||!t.canDropAt(r,e)))},[t])},rk=globalThis&&globalThis.__spreadArray||function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},see=function(){var t=ir(),e=ZC(),r=VC();return X.exports.useCallback(function(n,o){var a=t.linearItems[n];return a.map(function(c,u){var f,i,s=c.item,l=c.depth,p=e(u,n),d=t.items[p.item].children.indexOf(s),h={targetType:"item",parentItem:p.item,targetItem:s,linearIndex:u,depth:l,treeId:n},x={targetType:"between-items",parentItem:p.item,linePosition:"top",childIndex:d,depth:l,treeId:n,linearIndex:u},g={targetType:"between-items",parentItem:p.item,linePosition:"bottom",linearIndex:u+1,childIndex:d+1,depth:l,treeId:n},O=l===((i=(f=a[u-1])===null||f===void 0?void 0:f.depth)!==null&&i!==void 0?i:-1);return O?[h,g]:[x,h,g]}).reduce(function(c,u){return rk(rk([],c),u)},[]).filter(function(c){return r(c,o)})},[r,t.items,t.linearItems,e])},Fp=globalThis&&globalThis.__spreadArray||function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},VO=function(t,e,r){var n=X.exports.useRef();X.exports.useEffect(function(){if(!n.current)n.current=Fp([],r),t();else{var o=n.current.some(function(a,c){return a!==r[c]});o&&(n.current=Fp([],r),t())}},Fp(Fp([],e),r))},NO=globalThis&&globalThis.__assign||function(){return NO=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},NO.apply(this,arguments)},NC=function(t,e){return t.map(function(r){return[r,e(r)]}).reduce(function(r,n){var o,a=n[0],c=n[1];return NO(NO({},r),(o={},o[a]=c,o))},{})};function _u(){var t=X.exports.useRef(new Array);X.exports.useEffect(function(){var r=t.current;return function(){return r.forEach(function(n){return cancelAnimationFrame(n)})}},[t]);var e=X.exports.useCallback(function(r){var n=requestAnimationFrame(function(){t.current.splice(t.current.indexOf(n),1),r()});t.current.push(n)},[t]);return e}var BC=X.exports.createContext(null),Oa=function(){return X.exports.useContext(BC)},lee=function(t){var e=ir(),r=X.exports.useState(!1),n=r[0],o=r[1],a=X.exports.useState(4),c=a[0],u=a[1],f=X.exports.useState({}),i=f[0],s=f[1],l=X.exports.useState(0),p=l[0],d=l[1],h=X.exports.useState(),x=h[0],g=h[1],O=X.exports.useState(),m=O[0],v=O[1],w=X.exports.useState("_nodrag"),Q=w[0],P=w[1],k=see(),W=_u();X.exports.useRef(!1);var z=X.exports.useCallback(function(ce,se){var ye;if(e.activeTreeId&&((ye=e.viewState[e.activeTreeId])===null||ye===void 0?void 0:ye.focusedItem)&&e.linearItems&&se){var L=e.viewState[e.activeTreeId].focusedItem,le=k(e.activeTreeId,se),Y=le.findIndex(function(B){if(B.targetType==="item")return B.targetItem===L;if(B.targetType==="between-items")return e.items[B.parentItem].children[B.childIndex]===L});d(Y?Math.min(Y+1,le.length-1):0)}else d(0)},[e.activeTreeId,e.items,e.linearItems,e.viewState,k]),C=X.exports.useCallback(function(){o(!1),u(4),s({}),d(0),g(void 0),v(void 0),P("_nodrag")},[]);VO(function(){e.activeTreeId&&e.linearItems[e.activeTreeId]&&i[e.activeTreeId]&&z(i[e.activeTreeId],x)},[x,e.activeTreeId,e.linearItems,z,i],[e.activeTreeId]),VO(function(){n&&e.activeTreeId&&v(i[e.activeTreeId][p])},[p,e.activeTreeId,n,i],[p,e.activeTreeId]);var E=VC(),T=function(ce){var se;x&&!E(ce,x)||(v(ce),e.setActiveTree(ce.treeId),x&&e.activeTreeId!==ce.treeId&&((se=e.onSelectItems)===null||se===void 0||se.call(e,x.map(function(ye){return ye.index}),ce.treeId)))},q=aee(Q,P,c,v,T),F=X.exports.useCallback(function(){x&&m&&e.onDrop&&(e.onDrop(x,m),W(function(){var ce;(ce=e.onFocusItem)===null||ce===void 0||ce.call(e,x[0],m.treeId),C()}))},[x,m,e,C,W]),I=X.exports.useCallback(function(ce,se){var ye,L,le=NC(e.treeIds,function(B){return k(B,ce)}),Y=(L=(ye=document.querySelector('[data-rct-tree="'+se+'"] [data-rct-item-container="true"]'))===null||ye===void 0?void 0:ye.offsetHeight)!==null&&L!==void 0?L:5;u(Y),g(ce),s(le),e.activeTreeId&&z(le[e.activeTreeId],ce)},[e.activeTreeId,e.treeIds,k,z]),U=X.exports.useCallback(function(){var ce,se,ye;if(!!e.canDragAndDrop&&e.activeTreeId){var L=(se=(ce=e.viewState[e.activeTreeId])===null||ce===void 0?void 0:ce.selectedItems)!==null&&se!==void 0?se:[(ye=e.viewState[e.activeTreeId])===null||ye===void 0?void 0:ye.focusedItem];if(L.length===0||L[0]===void 0)return;var le=L.map(function(Y){return e.items[Y]});if(e.canDrag&&!e.canDrag(le))return;I(le,e.activeTreeId),setTimeout(function(){o(!0)})}},[I,e]),D=X.exports.useCallback(function(){C()},[C]),G=X.exports.useCallback(function(){F(),C()},[F,C]),H=X.exports.useCallback(function(){d(function(ce){return Math.max(0,ce-1)})},[]),ie=X.exports.useCallback(function(){e.activeTreeId&&d(function(ce){return Math.min(i[e.activeTreeId].length,ce+1)})},[e.activeTreeId,i]),ee={onStartDraggingItems:I,startProgrammaticDrag:U,abortProgrammaticDrag:D,completeProgrammaticDrag:G,programmaticDragUp:H,programmaticDragDown:ie,draggingItems:x,draggingPosition:m,itemHeight:c,isProgrammaticallyDragging:n,onDragOverTreeHandler:q,viableDragPositions:i};return X.exports.useEffect(function(){return window.addEventListener("dragend",C),window.addEventListener("drop",F),function(){window.removeEventListener("dragend",C),window.removeEventListener("drop",F)}},[F,C]),X.exports.createElement(BC.Provider,{value:ee},t.children)},Kf=globalThis&&globalThis.__assign||function(){return Kf=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Kf.apply(this,arguments)},cee=function(t,e){var r=ir(),n=Oa();X.exports.useImperativeHandle(t,function(){return Kf(Kf(Kf({},e),r),{treeEnvironmentContext:r,dragAndDropContext:n})})},nk=globalThis&&globalThis.__spreadArray||function(t,e){for(var r=0,n=e.length,o=t.length;r<n;r++,o++)t[o]=e[r];return t},FC=X.exports.createContext(null),uee=function(){return X.exports.useContext(FC)},fee=X.exports.forwardRef(function(t,e){var r=ir(),n=r.onCollapseItem,o=r.items;r.trees;var a=r.viewState,c=r.onExpandItem,u=r.onFocusItem,f=r.setActiveTree,i=r.onRenameItem,s=r.onSelectItems,l=r.onPrimaryAction,p=r.linearItems,d=Oa(),h=d.abortProgrammaticDrag,x=d.completeProgrammaticDrag,g=d.programmaticDragDown,O=d.programmaticDragUp,m=d.startProgrammaticDrag,v={abortProgrammaticDrag:X.exports.useCallback(function(){h()},[h]),collapseItem:X.exports.useCallback(function(w,Q){n==null||n(o[w],Q)},[o,n]),completeProgrammaticDrag:X.exports.useCallback(function(){x()},[x]),expandItem:X.exports.useCallback(function(w,Q){c==null||c(o[w],Q)},[o,c]),focusItem:X.exports.useCallback(function(w,Q){u==null||u(o[w],Q)},[o,u]),focusTree:X.exports.useCallback(function(w,Q){Q===void 0&&(Q=!0),f(w,Q)},[f]),moveFocusDown:X.exports.useCallback(function(w){var Q=p[w],P=Q.findIndex(function(z){var C,E=z.item;return E===((C=a[w])===null||C===void 0?void 0:C.focusedItem)}),k=P!==void 0?Math.min(Q.length-1,P+1):0,W=o[Q[k].item];u==null||u(W,w)},[o,p,u,a]),moveFocusUp:X.exports.useCallback(function(w){var Q=p[w],P=Q.findIndex(function(z){var C,E=z.item;return E===((C=a[w])===null||C===void 0?void 0:C.focusedItem)}),k=P!==void 0?Math.max(0,P-1):0,W=o[Q[k].item];u==null||u(W,w)},[o,p,u,a]),moveProgrammaticDragPositionDown:X.exports.useCallback(function(){g()},[g]),moveProgrammaticDragPositionUp:X.exports.useCallback(function(){O()},[O]),renameItem:X.exports.useCallback(function(w,Q,P){i==null||i(o[w],Q,P)},[o,i]),selectItems:X.exports.useCallback(function(w,Q){s==null||s(w,Q)},[s]),startProgrammaticDrag:X.exports.useCallback(function(){m()},[m]),toggleItemExpandedState:X.exports.useCallback(function(w,Q){var P,k;!((k=(P=a[Q])===null||P===void 0?void 0:P.expandedItems)===null||k===void 0)&&k.includes(w)?n==null||n(o[w],Q):c==null||c(o[w],Q)},[o,n,c,a]),toggleItemSelectStatus:X.exports.useCallback(function(w,Q){var P,k,W,z,C;!((k=(P=a[Q])===null||P===void 0?void 0:P.selectedItems)===null||k===void 0)&&k.includes(w)?s==null||s((z=(W=a[Q].selectedItems)===null||W===void 0?void 0:W.filter(function(E){return E!==w}))!==null&&z!==void 0?z:[],Q):s==null||s(nk(nk([],(C=a[Q].selectedItems)!==null&&C!==void 0?C:[]),[w]),Q)},[s,a]),invokePrimaryAction:X.exports.useCallback(function(w,Q){l==null||l(o[w],Q)},[o,l])};return cee(e,v),X.exports.createElement(FC.Provider,{value:v},t.children)}),dee=function(t){if(!!t)if(t.scrollIntoViewIfNeeded)t.scrollIntoViewIfNeeded();else{var e=t.getBoundingClientRect(),r=e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth);r||t.scrollIntoView()}},Ci=globalThis&&globalThis.__assign||function(){return Ci=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},Ci.apply(this,arguments)},Ja=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.filter(function(r){return!!r}).join(" ")},pee=function(t){return{renderItemTitle:function(e){var r=e.title,n=e.context,o=e.info;if(!o.isSearching||!n.isSearchMatching)return Pe.createElement(Pe.Fragment,null,r);var a=r.toLowerCase().indexOf(o.search.toLowerCase());return Pe.createElement(Pe.Fragment,null,a>0&&Pe.createElement("span",null,r.slice(0,a)),Pe.createElement("span",{className:"rct-tree-item-search-highlight"},r.slice(a,a+o.search.length)),a+o.search.length<r.length&&Pe.createElement("span",null,r.slice(a+o.search.length,r.length)))},renderItemArrow:function(e){var r=e.item,n=e.context;return Pe.createElement("div",Ci({className:Ja(r.hasChildren&&"rct-tree-item-arrow-hasChildren","rct-tree-item-arrow")},n.arrowProps),r.hasChildren&&(n.isExpanded?Pe.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 16 16",enableBackground:"new 0 0 16 16",xmlSpace:"preserve"},Pe.createElement("g",null,Pe.createElement("g",null,Pe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:`M12,5c-0.28,0-0.53,0.11-0.71,0.29L8,8.59L4.71,5.29C4.53,5.11,4.28,5,4,5
|
|
405
405
|
C3.45,5,3,5.45,3,6c0,0.28,0.11,0.53,0.29,0.71l4,4C7.47,10.89,7.72,11,8,11s0.53-0.11,0.71-0.29l4-4C12.89,6.53,13,6.28,13,6
|
|
406
406
|
C13,5.45,12.55,5,12,5z`,className:"rct-tree-item-arrow-path"})))):Pe.createElement("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 16 16",enableBackground:"new 0 0 16 16",xmlSpace:"preserve"},Pe.createElement("g",null,Pe.createElement("g",null,Pe.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:`M10.71,7.29l-4-4C6.53,3.11,6.28,3,6,3C5.45,3,5,3.45,5,4
|
|
407
407
|
c0,0.28,0.11,0.53,0.29,0.71L8.59,8l-3.29,3.29C5.11,11.47,5,11.72,5,12c0,0.55,0.45,1,1,1c0.28,0,0.53-0.11,0.71-0.29l4-4
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BrowserProps | DaoPaaS API Options</title><meta name="description" content="Documentation for DaoPaaS API Options"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">DaoPaaS API Options</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">DaoPaaS API Options</a></li><li><a href="BrowserProps.html">BrowserProps</a></li></ul><h1>Interface BrowserProps </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">BrowserProps</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#bgColor" class="tsd-kind-icon">bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#freshIconColor" class="tsd-kind-icon">fresh<wbr/>Icon<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputBgColor" class="tsd-kind-icon">input<wbr/>Bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputColor" class="tsd-kind-icon">input<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputTextColor" class="tsd-kind-icon">input<wbr/>Text<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#navBgColor" class="tsd-kind-icon">nav<wbr/>Bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#navBorder" class="tsd-kind-icon">nav<wbr/>Border</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#openIconColor" class="tsd-kind-icon">open<wbr/>Icon<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#showURL" class="tsd-kind-icon">showURL</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#url" class="tsd-kind-icon">url</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="bgColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> bg<wbr/>Color<a href="#bgColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">bg<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BrowserProps | DaoPaaS API Options</title><meta name="description" content="Documentation for DaoPaaS API Options"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">DaoPaaS API Options</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">DaoPaaS API Options</a></li><li><a href="BrowserProps.html">BrowserProps</a></li></ul><h1>Interface BrowserProps </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">BrowserProps</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#bgColor" class="tsd-kind-icon">bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#freshIconColor" class="tsd-kind-icon">fresh<wbr/>Icon<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputBgColor" class="tsd-kind-icon">input<wbr/>Bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputColor" class="tsd-kind-icon">input<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputTextColor" class="tsd-kind-icon">input<wbr/>Text<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#navBgColor" class="tsd-kind-icon">nav<wbr/>Bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#navBorder" class="tsd-kind-icon">nav<wbr/>Border</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#openIconColor" class="tsd-kind-icon">open<wbr/>Icon<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#showURL" class="tsd-kind-icon">showURL</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#url" class="tsd-kind-icon">url</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="bgColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> bg<wbr/>Color<a href="#bgColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">bg<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L244">DaoPaaS.d.ts:244</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="freshIconColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> fresh<wbr/>Icon<wbr/>Color<a href="#freshIconColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">fresh<wbr/>Icon<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L230">DaoPaaS.d.ts:230</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
2
|
<p>The fresh icon color</p>
|
|
3
|
-
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="inputBgColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> input<wbr/>Bg<wbr/>Color<a href="#inputBgColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">input<wbr/>Bg<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/
|
|
3
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="inputBgColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> input<wbr/>Bg<wbr/>Color<a href="#inputBgColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">input<wbr/>Bg<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L243">DaoPaaS.d.ts:243</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="inputColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> input<wbr/>Color<a href="#inputColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">input<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L235">DaoPaaS.d.ts:235</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
4
4
|
<p>The input text color</p>
|
|
5
|
-
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="inputTextColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> input<wbr/>Text<wbr/>Color<a href="#inputTextColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">input<wbr/>Text<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/
|
|
5
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="inputTextColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> input<wbr/>Text<wbr/>Color<a href="#inputTextColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">input<wbr/>Text<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L242">DaoPaaS.d.ts:242</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="navBgColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> nav<wbr/>Bg<wbr/>Color<a href="#navBgColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">nav<wbr/>Bg<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L245">DaoPaaS.d.ts:245</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="navBorder" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> nav<wbr/>Border<a href="#navBorder" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">nav<wbr/>Border<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L246">DaoPaaS.d.ts:246</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="openIconColor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> open<wbr/>Icon<wbr/>Color<a href="#openIconColor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">open<wbr/>Icon<wbr/>Color<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L240">DaoPaaS.d.ts:240</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
6
6
|
<p>The open icon color</p>
|
|
7
|
-
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="showURL" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> showURL<a href="#showURL" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">showURL<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/
|
|
7
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="showURL" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> showURL<a href="#showURL" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">showURL<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L225">DaoPaaS.d.ts:225</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
8
8
|
<p>if the browser can show the url</p>
|
|
9
|
-
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="url" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> url<a href="#url" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">url<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/
|
|
9
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="url" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> url<a href="#url" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">url<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/dao42/d42paas_frontend/blob/af097d81/packages/client/src/types/DaoPaaS.d.ts#L220">DaoPaaS.d.ts:220</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
10
10
|
<p>The url of the browser</p>
|
|
11
11
|
</div></div></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="BrowserProps.html" class="tsd-kind-icon">Browser<wbr/>Props</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#bgColor" class="tsd-kind-icon">bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#freshIconColor" class="tsd-kind-icon">fresh<wbr/>Icon<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputBgColor" class="tsd-kind-icon">input<wbr/>Bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputColor" class="tsd-kind-icon">input<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#inputTextColor" class="tsd-kind-icon">input<wbr/>Text<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#navBgColor" class="tsd-kind-icon">nav<wbr/>Bg<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#navBorder" class="tsd-kind-icon">nav<wbr/>Border</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#openIconColor" class="tsd-kind-icon">open<wbr/>Icon<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#showURL" class="tsd-kind-icon">showURL</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="BrowserProps.html#url" class="tsd-kind-icon">url</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|