comp-hub 0.31.1 → 0.41.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/bin/cli.js +1 -0
- package/bin/lib/startup.js +33 -13
- package/dist/index.js +3 -3
- package/dist/master.js +23 -23
- package/dist/website/container/assets/{index-BR_ZVtEf.js → index-BF46-8S8.js} +13 -13
- package/dist/website/container/assets/{index-Y--RAA6W.css → index-DN-EG3Qh.css} +1 -1
- package/dist/website/container/index.html +3 -2
- package/dist/website/container/js/react-jsx-loader.js +233 -0
- package/dist/website/item/assets/index-iYpmJN_Z.css +1 -0
- package/dist/website/item/assets/index-r0gnU8T3.js +62 -0
- package/dist/website/item/index.html +2 -2
- package/dist/website/main/assets/{AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-C5to3ZQC.js → AuthCodeSendBtn.vue_vue_type_script_setup_true_lang-XaDuBXZe.js} +1 -1
- package/dist/website/main/assets/{BaseBadge-DUuZfvYd.js → BaseBadge-CwPduDSy.js} +1 -1
- package/dist/website/main/assets/{BaseDialog.vue_vue_type_script_setup_true_lang-DhPHn879.js → BaseDialog.vue_vue_type_script_setup_true_lang-CkNHSg5g.js} +1 -1
- package/dist/website/main/assets/{BaseSegmented.vue_vue_type_script_setup_true_lang-D46cMrVi.js → BaseSegmented.vue_vue_type_script_setup_true_lang-QoRVS1cj.js} +1 -1
- package/dist/website/main/assets/{CanvasAnimation.vue_vue_type_script_setup_true_lang-CisWACfW.js → CanvasAnimation.vue_vue_type_script_setup_true_lang-C4ID6BIz.js} +1 -1
- package/dist/website/main/assets/{CodeMirrorEditor-Cqow8ROO-DMgFI1zV.js → CodeMirrorEditor-Cqow8ROO-Cb1F80wf.js} +3 -3
- package/dist/website/main/assets/{EmptyStatusContainer.vue_vue_type_script_setup_true_lang-CAB4mEGu.js → EmptyStatusContainer.vue_vue_type_script_setup_true_lang-D9ipEmGE.js} +1 -1
- package/dist/website/main/assets/GithubCallback-CvYaECQV.js +1 -0
- package/dist/website/main/assets/ReplyForm.vue_vue_type_script_setup_true_lang-Cg6jGDaf.js +1 -0
- package/dist/website/main/assets/{core-DIlcfMir.js → core-yetgou6F.js} +1 -1
- package/dist/website/main/assets/{el-table-column-DUFMPIr5.js → el-table-column-BpgDq_WF.js} +1 -1
- package/dist/website/main/assets/index-3zCQDZnh.js +2 -0
- package/dist/website/main/assets/{index-72rReQ2I-sU_re5gS.js → index-72rReQ2I-BUkUG78x.js} +1 -1
- package/dist/website/main/assets/index-74ZEuWc8.js +1 -0
- package/dist/website/main/assets/index-9wcpsZe1.js +1 -0
- package/dist/website/main/assets/index-BCpgCtua.js +1 -0
- package/dist/website/main/assets/{index-HnLIbMTX.js → index-BJKOBdMx.js} +1 -1
- package/dist/website/main/assets/index-BMOsY3cQ.js +2 -0
- package/dist/website/main/assets/index-BMVmqejS.js +1 -0
- package/dist/website/main/assets/{index-BiQ2dJm4.js → index-BcfC5qCh.js} +1 -1
- package/dist/website/main/assets/{index-DwDo8mID.js → index-BnX30az1.js} +1 -1
- package/dist/website/main/assets/{index-Ct_U5I7y.js → index-BouHS9Ky.js} +1 -1
- package/dist/website/main/assets/index-Bp79GOY4.js +1 -0
- package/dist/website/main/assets/{index-Cbpqtmwk.js → index-BsZl8udl.js} +1 -1
- package/dist/website/main/assets/{index-B-fZjRMn.js → index-Bucicr-O.js} +1 -1
- package/dist/website/main/assets/index-CXKzXFNq.js +1 -0
- package/dist/website/main/assets/{index-DlU_hLR3.js → index-CbpqTP74.js} +1 -1
- package/dist/website/main/assets/{index-CxLzXF-b.js → index-CgJn84pE.js} +1 -1
- package/dist/website/main/assets/{index-CvGH1xqJ.css → index-CioMG7I6.css} +1 -1
- package/dist/website/main/assets/index-ClqLWOrM.js +1 -0
- package/dist/website/main/assets/index-CopP0_Oh.js +1 -0
- package/dist/website/main/assets/{index-Da5ZhB-r.js → index-CxeWFTBn.js} +1 -1
- package/dist/website/main/assets/index-CzxUr7HV.js +1 -0
- package/dist/website/main/assets/{index-CjE-geY_.css → index-D-8GYlU8.css} +1 -1
- package/dist/website/main/assets/{index-Jp4YN25a.js → index-D4WFMTSP.js} +1 -1
- package/dist/website/main/assets/{index-D76eWsZ1-BUecZt4E.js → index-D76eWsZ1-7KvuCuMg.js} +1 -1
- package/dist/website/main/assets/index-DCet9p8Y.js +1 -0
- package/dist/website/main/assets/{index-Cz3keLmq.js → index-DMO6XTC0.js} +1 -1
- package/dist/website/main/assets/{index-DKv4dFPY.js → index-DP0Xav0B.js} +1 -1
- package/dist/website/main/assets/index-DXY5BNS4.js +1 -0
- package/dist/website/main/assets/{index-Dms7ZQ2h-DY4-ZFKr.js → index-Dms7ZQ2h-BXeasSDQ.js} +1 -1
- package/dist/website/main/assets/{index-DqiFCfGx-BY8MJk0B.js → index-DqiFCfGx-4HZIi15Y.js} +1 -1
- package/dist/website/main/assets/{index-DxypSQ0K-CDh8t7kw.js → index-DxypSQ0K-DsBZbAQO.js} +1 -1
- package/dist/website/main/assets/{index-CnhaF7r3.js → index-FOvWqIoM.js} +1 -1
- package/dist/website/main/assets/{index-CQSvO48y.js → index-HvNFjpLq.js} +1 -1
- package/dist/website/main/assets/{index-Cu1aNpBv.js → index-KZ5xMbrf.js} +1 -1
- package/dist/website/main/assets/index-PtEeGBK6.js +1 -0
- package/dist/website/main/assets/{index-T76vWLBU-Bpnxnyfv.js → index-T76vWLBU-C2L4ZR6a.js} +1 -1
- package/dist/website/main/assets/{index-CnTuJQbj.js → index-YvDl_1WK.js} +23 -23
- package/dist/website/main/assets/{index-fZBcgzqR-QE1WZxps.js → index-fZBcgzqR-DZ4VEjtI.js} +1 -1
- package/dist/website/main/assets/{index-mqeGrL6B-DZ51JJUI.js → index-mqeGrL6B-zaO8HgOa.js} +1 -1
- package/dist/website/main/assets/{index-QDS7dx0M.js → index-rm7l2BT_.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-B5HoY3_0.js → index.vue_vue_type_script_setup_true_lang-2Z80ry6F.js} +1 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-C7h-Ycpm.js +1 -0
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-BBmEjb-A.js → index.vue_vue_type_script_setup_true_lang-CHyooj4T.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-t73JgDYM.js → index.vue_vue_type_script_setup_true_lang-ChXDjhzT.js} +2 -2
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Cy3ZPsfb.js +1 -0
- package/dist/website/main/assets/{index.vue_vue_type_script_setup_true_lang-87WT-7PF.js → index.vue_vue_type_script_setup_true_lang-DHWblo58.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-SpJl7c7B.js → index.vue_vue_type_style_index_0_lang-Bsi5S1XY.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-C30OZgOy.js → index.vue_vue_type_style_index_0_lang-DfBu8zdC.js} +1 -1
- package/dist/website/main/assets/{index.vue_vue_type_style_index_0_lang-YYZCGIEM.js → index.vue_vue_type_style_index_0_lang-Digz_UdY.js} +1 -1
- package/dist/website/main/assets/{md5-BaIvdSuD.js → md5-CWhVn6LA.js} +1 -1
- package/dist/website/main/assets/{useCacheOssStore-B5wqgiBM.js → useCacheOssStore-KoEbWj57.js} +1 -1
- package/dist/website/main/assets/useCompEditStore-Ch5sDzy4.js +1 -0
- package/dist/website/main/assets/useCompEditStore-GUrodzAV.css +1 -0
- package/dist/website/main/assets/{useKeyword-BygMrCvJ.js → useKeyword-Bmq02ywx.js} +1 -1
- package/dist/website/main/assets/{useMessage-CHhLVawp.js → useMessage-BLwQdu5o.js} +1 -1
- package/dist/website/main/assets/{useTeamHeaders-a-XSRO3U.css → useTeamHeaders-BMHQzwDq.css} +1 -1
- package/dist/website/main/assets/{useTeamHeaders-C1Nwzx4f.js → useTeamHeaders-Bttl7tEb.js} +2 -2
- package/dist/website/main/assets/{useUnreadStore-D50CXC_9.js → useUnreadStore-kWR1ykK7.js} +1 -1
- package/dist/website/main/assets/{useVscodeOpen-CJ-3bg9h.js → useVscodeOpen-DyvB87xz.js} +1 -1
- package/dist/website/main/assets/{vendor-ui-BAx7vAkH.js → vendor-ui-KquZSIP0.js} +10 -10
- package/dist/website/main/index.html +3 -3
- package/package.json +1 -2
- package/dist/website/item/assets/index-BxlM4TBc.js +0 -60
- package/dist/website/item/assets/index-Cg5t9Ndz.css +0 -1
- package/dist/website/main/assets/GithubCallback-DP3YU9rH.js +0 -1
- package/dist/website/main/assets/ReplyForm.vue_vue_type_script_setup_true_lang-BnN1jBiO.js +0 -1
- package/dist/website/main/assets/index--J05rNIX.js +0 -1
- package/dist/website/main/assets/index-B2rWNHgy.js +0 -1
- package/dist/website/main/assets/index-B6fwGRmY.js +0 -1
- package/dist/website/main/assets/index-B8TdXR68.js +0 -1
- package/dist/website/main/assets/index-BBzEF7CC.js +0 -1
- package/dist/website/main/assets/index-BQKN7xQr.js +0 -2
- package/dist/website/main/assets/index-BWKB83Cd.js +0 -1
- package/dist/website/main/assets/index-BjKOeMxH.js +0 -1
- package/dist/website/main/assets/index-D03XtNqB.js +0 -1
- package/dist/website/main/assets/index-DEvtplax.js +0 -2
- package/dist/website/main/assets/index-DQTRYmEL.js +0 -1
- package/dist/website/main/assets/index-DRytU1Iu.js +0 -1
- package/dist/website/main/assets/index-DcfKevFQ.js +0 -1
- package/dist/website/main/assets/index-tSn-zTTf.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-C1EYwhRp.js +0 -1
- package/dist/website/main/assets/index.vue_vue_type_script_setup_true_lang-Dl1KwcTe.js +0 -1
- package/dist/website/main/assets/useCompEditStore-Br3x5A7Q.css +0 -1
- package/dist/website/main/assets/useCompEditStore-rtFXUPNg.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as Ye,a as L,I as Je,aA as Xe,aC as de,w as Qe,f as je,L as Ge,M as Ze,a7 as et,O as tt,P as st,R as nt}from"./vendor-core-Do-oxgl9.js";import{r as rt,a as it,b as ot,c as at}from"./vendor-xterm-mNFjEaKn.js";import{v as ct,w as ht}from"./index-CnTuJQbj.js";import{aj as ut,a as lt}from"./vendor-ui-BAx7vAkH.js";var ft=rt(),dt=it(),pt=ot();const A=Object.create(null);A.open="0";A.close="1";A.ping="2";A.pong="3";A.message="4";A.upgrade="5";A.noop="6";const P=Object.create(null);Object.keys(A).forEach(r=>{P[A[r]]=r});const X={type:"error",data:"parser error"},we=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ee=typeof ArrayBuffer=="function",be=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,ee=({type:r,data:e},t,n)=>we&&e instanceof Blob?t?n(e):pe(e,n):Ee&&(e instanceof ArrayBuffer||be(e))?t?n(e):pe(new Blob([e]),n):n(A[r]+(e||"")),pe=(r,e)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];e("b"+(n||""))},t.readAsDataURL(r)};function xe(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let K;function xt(r,e){if(we&&r.data instanceof Blob)return r.data.arrayBuffer().then(xe).then(e);if(Ee&&(r.data instanceof ArrayBuffer||be(r.data)))return e(xe(r.data));ee(r,!1,t=>{K||(K=new TextEncoder),e(K.encode(t))})}const me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<me.length;r++)S[me.charCodeAt(r)]=r;const mt=r=>{let e=r.length*.75,t=r.length,n,i=0,o,s,h,c;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);const f=new ArrayBuffer(e),d=new Uint8Array(f);for(n=0;n<t;n+=4)o=S[r.charCodeAt(n)],s=S[r.charCodeAt(n+1)],h=S[r.charCodeAt(n+2)],c=S[r.charCodeAt(n+3)],d[i++]=o<<2|s>>4,d[i++]=(s&15)<<4|h>>2,d[i++]=(h&3)<<6|c&63;return f},yt=typeof ArrayBuffer=="function",te=(r,e)=>{if(typeof r!="string")return{type:"message",data:ve(r,e)};const t=r.charAt(0);return t==="b"?{type:"message",data:gt(r.substring(1),e)}:P[t]?r.length>1?{type:P[t],data:r.substring(1)}:{type:P[t]}:X},gt=(r,e)=>{if(yt){const t=mt(r);return ve(t,e)}else return{base64:!0,data:r}},ve=(r,e)=>e==="blob"?r instanceof Blob?r:new Blob([r]):r instanceof ArrayBuffer?r:r.buffer,Ce="",_t=(r,e)=>{const t=r.length,n=new Array(t);let i=0;r.forEach((o,s)=>{ee(o,!1,h=>{n[s]=h,++i===t&&e(n.join(Ce))})})},wt=(r,e)=>{const t=r.split(Ce),n=[];for(let i=0;i<t.length;i++){const o=te(t[i],e);if(n.push(o),o.type==="error")break}return n};function Et(){return new TransformStream({transform(r,e){xt(r,t=>{const n=t.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,n)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(n))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let z;function D(r){return r.reduce((e,t)=>e+t.length,0)}function N(r,e){if(r[0].length===e)return r.shift();const t=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)t[i]=r[0][n++],n===r[0].length&&(r.shift(),n=0);return r.length&&n<r[0].length&&(r[0]=r[0].slice(n)),t}function bt(r,e){z||(z=new TextDecoder);const t=[];let n=0,i=-1,o=!1;return new TransformStream({transform(s,h){for(t.push(s);;){if(n===0){if(D(t)<1)break;const c=N(t,1);o=(c[0]&128)===128,i=c[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(D(t)<2)break;const c=N(t,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(D(t)<8)break;const c=N(t,8),f=new DataView(c.buffer,c.byteOffset,c.length),d=f.getUint32(0);if(d>Math.pow(2,21)-1){h.enqueue(X);break}i=d*Math.pow(2,32)+f.getUint32(4),n=3}else{if(D(t)<i)break;const c=N(t,i);h.enqueue(te(o?c:z.decode(c),e)),n=0}if(i===0||i>r){h.enqueue(X);break}}}})}const Ae=4;function g(r){if(r)return vt(r)}function vt(r){for(var e in g.prototype)r[e]=g.prototype[e];return r}g.prototype.on=g.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};g.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};g.prototype.off=g.prototype.removeListener=g.prototype.removeAllListeners=g.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var n,i=0;i<t.length;i++)if(n=t[i],n===e||n.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};g.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,i=t.length;n<i;++n)t[n].apply(this,e)}return this};g.prototype.emitReserved=g.prototype.emit;g.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};g.prototype.hasListeners=function(r){return!!this.listeners(r).length};const M=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),w=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ct="arraybuffer";function Fe(r,...e){return e.reduce((t,n)=>(r.hasOwnProperty(n)&&(t[n]=r[n]),t),{})}const At=w.setTimeout,Ft=w.clearTimeout;function H(r,e){e.useNativeTimers?(r.setTimeoutFn=At.bind(w),r.clearTimeoutFn=Ft.bind(w)):(r.setTimeoutFn=w.setTimeout.bind(w),r.clearTimeoutFn=w.clearTimeout.bind(w))}const Bt=1.33;function kt(r){return typeof r=="string"?Tt(r):Math.ceil((r.byteLength||r.size)*Bt)}function Tt(r){let e=0,t=0;for(let n=0,i=r.length;n<i;n++)e=r.charCodeAt(n),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(n++,t+=4);return t}function Be(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Rt(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Ot(r){let e={},t=r.split("&");for(let n=0,i=t.length;n<i;n++){let o=t[n].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class St extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class se extends g{constructor(e){super(),this.writable=!1,H(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new St(e,t,n)),this}open(){return 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 t=te(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Rt(e);return t.length?"?"+t:""}}class Dt extends se{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=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)};wt(e,this.socket.binaryType).forEach(t),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,_t(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Be()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let ke=!1;try{ke=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Nt=ke;function Lt(){}class Pt extends Dt{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=e}}class C extends g{constructor(e,t,n){super(),this.createRequest=e,H(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const t=Fe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=C.requestsCount++,C.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Lt,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete C.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()}}C.requestsCount=0;C.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ye);else if(typeof addEventListener=="function"){const r="onpagehide"in w?"pagehide":"unload";addEventListener(r,ye,!1)}}function ye(){for(let r in C.requests)C.requests.hasOwnProperty(r)&&C.requests[r].abort()}const qt=(function(){const r=Te({xdomain:!1});return r&&r.responseType!==null})();class It extends Pt{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=qt&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new C(Te,this.uri(),e)}}function Te(r){const e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Nt))return new XMLHttpRequest}catch{}if(!e)try{return new w[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Re=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ut extends se{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=Re?{}:Fe(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=this.createSocket(e,t,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,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 t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;ee(n,this.supportsBinary,o=>{try{this.doWrite(n,o)}catch{}i&&M(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Be()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Y=w.WebSocket||w.MozWebSocket;class Vt extends Ut{createSocket(e,t,n){return Re?new Y(e,t,n):t?new Y(e,t):new Y(e)}doWrite(e,t){this.ws.send(t)}}class Mt extends se{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=bt(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),i=Et();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const o=()=>{n.read().then(({done:h,value:c})=>{h||(this.onPacket(c),o())}).catch(h=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;this._writer.write(n).then(()=>{i&&M(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Ht={websocket:Vt,webtransport:Mt,polling:It},$t=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Q(r){if(r.length>8e3)throw"URI too long";const e=r,t=r.indexOf("["),n=r.indexOf("]");t!=-1&&n!=-1&&(r=r.substring(0,t)+r.substring(t,n).replace(/:/g,";")+r.substring(n,r.length));let i=$t.exec(r||""),o={},s=14;for(;s--;)o[Wt[s]]=i[s]||"";return t!=-1&&n!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Kt(o,o.path),o.queryKey=zt(o,o.query),o}function Kt(r,e){const t=/\/{2,9}/g,n=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function zt(r,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,o){i&&(t[i]=o)}),t}const j=typeof addEventListener=="function"&&typeof removeEventListener=="function",q=[];j&&addEventListener("offline",()=>{q.forEach(r=>r())},!1);class B extends g{constructor(e,t){if(super(),this.binaryType=Ct,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const n=Q(e);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Q(t.host).host);H(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ot(this.opts.query)),j&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},q.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ae,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&B.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}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",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",B.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_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._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);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._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),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 t=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(t+=kt(i)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,M(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,i){if(typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};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){if(B.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),j&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=q.indexOf(this._offlineEventListener);n!==-1&&q.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}B.protocol=Ae;class Yt extends B{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;B.priorWebsocketSuccess=!1;const i=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",p=>{if(!n)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;B.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=t.name,this.emitReserved("upgradeError",x)}}))};function o(){n||(n=!0,d(),t.close(),t=null)}const s=p=>{const x=new Error("probe error: "+p);x.transport=t.name,o(),this.emitReserved("upgradeError",x)};function h(){s("transport closed")}function c(){s("socket closed")}function f(p){t&&p.name!==t.name&&o()}const d=()=>{t.removeListener("open",i),t.removeListener("error",s),t.removeListener("close",h),this.off("close",c),this.off("upgrading",f)};t.once("open",i),t.once("error",s),t.once("close",h),this.once("close",c),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Jt=class extends Yt{constructor(e,t={}){const n=typeof e=="object",i=n?{...e}:{...t};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(o=>Ht[o]).filter(o=>!!o)),super(n?i:e,i)}};function Xt(r,e="",t){let n=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),n=Q(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+e,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}const Qt=typeof ArrayBuffer=="function",jt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Oe=Object.prototype.toString,Gt=typeof Blob=="function"||typeof Blob<"u"&&Oe.call(Blob)==="[object BlobConstructor]",Zt=typeof File=="function"||typeof File<"u"&&Oe.call(File)==="[object FileConstructor]";function ne(r){return Qt&&(r instanceof ArrayBuffer||jt(r))||Gt&&r instanceof Blob||Zt&&r instanceof File}function I(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,n=r.length;t<n;t++)if(I(r[t]))return!0;return!1}if(ne(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return I(r.toJSON(),!0);for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&I(r[t]))return!0;return!1}function es(r){const e=[],t=r.data,n=r;return n.data=U(t,e),n.attachments=e.length,{packet:n,buffers:e}}function U(r,e,t){if(!r)return r;if(ne(r)){const n={_placeholder:!0,num:e.length};return e.push(r),n}else if(Array.isArray(r)){const n=new Array(r.length);for(let i=0;i<r.length;i++)n[i]=U(r[i],e);return n}else if(typeof r=="object"&&!(r instanceof Date)){if(r.toJSON&&typeof r.toJSON=="function"&&!t)return U(r.toJSON(),e,!0);const n={};for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=U(r[i],e));return n}return r}function ts(r,e){return r.data=G(r.data,e),delete r.attachments,r}function G(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=G(r[t],e);else if(typeof r=="object")for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=G(r[t],e));return r}const ss=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var l;(function(r){r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK"})(l||(l={}));class ns{constructor(e){this.replacer=e}encode(e){return(e.type===l.EVENT||e.type===l.ACK)&&I(e)?this.encodeAsBinary({type:e.type===l.EVENT?l.BINARY_EVENT:l.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===l.BINARY_EVENT||e.type===l.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=es(e),n=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(n),i}}class re extends g{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===l.BINARY_EVENT;n||t.type===l.BINARY_ACK?(t.type=n?l.EVENT:l.ACK,this.reconstructor=new rs(t)):super.emitReserved("decoded",t)}else if(ne(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(l[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===l.BINARY_EVENT||n.type===l.BINARY_ACK){const o=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const s=e.substring(o,t);if(s!=Number(s)||e.charAt(t)!=="-")throw new Error("Illegal attachments");const h=Number(s);if(!is(h)||h<1)throw new Error("Illegal attachments");if(h>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=h}if(e.charAt(t+1)==="/"){const o=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););n.nsp=e.substring(o,t)}else n.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const o=t+1;for(;++t;){const s=e.charAt(t);if(s==null||Number(s)!=s){--t;break}if(t===e.length)break}n.id=Number(e.substring(o,t+1))}if(e.charAt(++t)){const o=this.tryParse(e.substr(t));if(re.isPayloadValid(n.type,o))n.data=o;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case l.CONNECT:return ge(t);case l.DISCONNECT:return t===void 0;case l.CONNECT_ERROR:return typeof t=="string"||ge(t);case l.EVENT:case l.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&ss.indexOf(t[0])===-1);case l.ACK:case l.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rs{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=ts(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const is=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function ge(r){return Object.prototype.toString.call(r)==="[object Object]"}const os=Object.freeze(Object.defineProperty({__proto__:null,Decoder:re,Encoder:ns,get PacketType(){return l}},Symbol.toStringTag,{value:"Module"}));function b(r,e,t){return r.on(e,t),function(){r.off(e,t)}}const as=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Se extends g{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[b(e,"open",this.onopen.bind(this)),b(e,"packet",this.onpacket.bind(this)),b(e,"error",this.onerror.bind(this)),b(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,...t){var n,i,o;if(as.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const s={type:l.EVENT,data:t};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const d=this.ids++,p=t.pop();this._registerAckCallback(d,p),s.id=d}const h=(i=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!h||(c?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,t){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===e&&this.sendBuffer.splice(h,1);t.call(this,new Error("operation has timed out"))},i),s=(...h)=>{this.io.clearTimeoutFn(o),t.apply(this,h)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...t){return new Promise((n,i)=>{const o=(s,h)=>s?i(s):n(h);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>(this._queue[0],i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...o)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:l.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case l.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):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 l.EVENT:case l.BINARY_EVENT:this.onevent(e);break;case l.ACK:case l.BINARY_ACK:this.onack(e);break;case l.DISCONNECT:this.ondisconnect();break;case l.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 t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...i){n||(n=!0,t.packet({type:l.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),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:l.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 t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.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 t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function T(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}T.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};T.prototype.reset=function(){this.attempts=0};T.prototype.setMin=function(r){this.ms=r};T.prototype.setMax=function(r){this.max=r};T.prototype.setJitter=function(r){this.jitter=r};class Z extends g{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,H(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new T({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||os;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.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 Jt(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=b(t,"open",function(){n.onopen(),e&&e()}),o=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),e?e(h):this.maybeReconnectOnOpen()},s=b(t,"error",o);if(this._timeout!==!1){const h=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),t.close()},h);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(b(e,"ping",this.onping.bind(this)),b(e,"data",this.ondata.bind(this)),b(e,"error",this.onerror.bind(this)),b(e,"close",this.onclose.bind(this)),b(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){M(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Se(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[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")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),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 t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const R={};function V(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};const t=Xt(r,e.path||"/socket.io"),n=t.source,i=t.id,o=t.path,s=R[i]&&o in R[i].nsps,h=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return h?c=new Z(n,e):(R[i]||(R[i]=new Z(n,e)),c=R[i]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(V,{Manager:Z,Socket:Se,io:V,connect:V});const _=V("/terminal",{autoConnect:!1});_.on("connect",()=>{console.log("手动连接成功")});_.on("disconnect",()=>{console.log("连接已断开")});var J={exports:{}},_e;function cs(){return _e||(_e=1,(function(r){var e={};r.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length===2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s===12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s===8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s===172||s===175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s===161||s===164||167<=s&&s<=168||s===170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s===198||s===208||215<=s&&s<=216||222<=s&&s<=225||s===230||232<=s&&s<=234||236<=s&&s<=237||s===240||242<=s&&s<=243||247<=s&&s<=250||s===252||s===254||s===257||s===273||s===275||s===283||294<=s&&s<=295||s===299||305<=s&&s<=307||s===312||319<=s&&s<=322||s===324||328<=s&&s<=331||s===333||338<=s&&s<=339||358<=s&&s<=359||s===363||s===462||s===464||s===466||s===468||s===470||s===472||s===474||s===476||s===593||s===609||s===708||s===711||713<=s&&s<=715||s===717||s===720||728<=s&&s<=731||s===733||s===735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s===1025||1040<=s&&s<=1103||s===1105||s===8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s===8240||8242<=s&&s<=8243||s===8245||s===8251||s===8254||s===8308||s===8319||8321<=s&&s<=8324||s===8364||s===8451||s===8453||s===8457||s===8467||s===8470||8481<=s&&s<=8482||s===8486||s===8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s===8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s===8658||s===8660||s===8679||s===8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s===8715||s===8719||s===8721||s===8725||s===8730||8733<=s&&s<=8736||s===8739||s===8741||8743<=s&&s<=8748||s===8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s===8776||s===8780||s===8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s===8853||s===8857||s===8869||s===8895||s===8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s===9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s===9711||9733<=s&&s<=9734||s===9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s===9756||s===9758||s===9792||s===9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s===9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s===9955||9960<=s&&s<=9983||s===10045||s===10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s===65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i==="F"||i==="W"||i==="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=t(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){var s=e.length(n);i=i??0,o=o===void 0||i===null?1:o,i<0&&(i=s+i),o<0&&(o=s+o);for(var h="",c=0,f=t(n),d=0;d<f.length;d++){var p=f[d],x=e.length(p);if(c>=i-(x===2?1:0))if(c+x<=o)h+=p;else break;c+=x}return h}})(J)),J.exports}var O=cs();const hs=()=>{const r=L("/"),e=c=>{const f=/^([A-Za-z]):[\\/]?(.*)/.exec(c);if(!f)return{letter:"",rest:c.replace(/\\/g,"/")};if(!f[1]||!f[2])throw new Error("splitDriveLetter path error");return{letter:f[1].toUpperCase(),rest:f[2].replace(/\\/g,"/")}},t=(c,f)=>c?`${c}:\\${f.replace(/\//g,"\\")}`:f.replace(/\//g,"\\"),n=async()=>{r.value=window.__GLOBAL_CONFIG__.cwd||"/"},i=c=>{r.value=c},o=c=>{const f=/^\s*cd\s+([^\s]*)\s*$/i,d=c.match(f);if(!d)return{isCd:!1};const p=d[1]||"/",{rest:x,letter:u}=e(r.value),m=ct.resolve(`/${x}`,p);return{newCwd:t(u,m.slice(1)),oldCwd:r.value,isCd:!0}},s=c=>{const{isCd:f,newCwd:d,oldCwd:p}=o(c);if(f){_.emit("command",{command:"",cwd:d,oldCwd:p});return}_.emit("command",{command:c,cwd:r.value})},h=(c="")=>{_.emit("tab",{cwd:r.value,lastWord:c})};return{cwd:Ye(()=>r.value),initCwd:n,sendCommand:s,updateCwd:i,sendTabCommand:h}};var us=at();const ls={ref:"terminalContainer",class:"size-full overflow-hidden p-2 pr-0 bg-[#1e1e1e]"},fs={ref:"terminalEl",class:"!h-full"},gs=Je({__name:"index",setup(r){const{t:e}=Xe(),t=hs(),n=de("terminalContainer"),i=de("terminalEl"),{height:o,width:s}=ut(n),h=new dt.FitAddon,c=L(!1),f=L(!1),d=a=>{u&&(u.options.cursorStyle=a?"bar":"block",u.options.cursorBlink=!0,f.value=a)},p=lt(ht,[]),x=L(-1);let u=null,m="",v="",E="",ie;const oe=async()=>{u||(u=new ft.Terminal({theme:{background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#c5c5c5"},fontSize:14,fontFamily:'Consolas, "Courier New", monospace',cursorBlink:!0,windowsMode:!0,allowProposedApi:!0,convertEol:!0}),u.loadAddon(h),u.loadAddon(new pt.Unicode11Addon),u.loadAddon(new us.WebLinksAddon),u.attachCustomKeyEventHandler(a=>a.type==="keydown"&&(a.ctrlKey||a.metaKey)&&a.key==="v"?(a.preventDefault(),Le(),!1):!0),i.value&&(u.open(i.value),h.fit()),u.onData(De),ie=await Ke())},$=()=>{m="",v="",E=""},De=a=>{if(u){if(a==="\x1B[A"||a==="\x1B[B"){$e(a);return}if(a==="\r"){Ve();return}if(a===""){Pe();return}if(a.charCodeAt(0)===9||a===" "){qe();return}if(a===""){Ne();return}a.charCodeAt(0)<32&&a!==" "||(m+=a,u.write(a))}},Ne=()=>{d(!1),$(),u?.write("^C"),u?.write(`\r
|
|
1
|
+
import{m as Ye,a as L,I as Je,aA as Xe,aC as de,w as Qe,f as je,L as Ge,M as Ze,a7 as et,O as tt,P as st,R as nt}from"./vendor-core-Do-oxgl9.js";import{r as rt,a as it,b as ot,c as at}from"./vendor-xterm-mNFjEaKn.js";import{t as ct,v as ht}from"./index-YvDl_1WK.js";import{aj as ut,a as lt}from"./vendor-ui-KquZSIP0.js";var ft=rt(),dt=it(),pt=ot();const A=Object.create(null);A.open="0";A.close="1";A.ping="2";A.pong="3";A.message="4";A.upgrade="5";A.noop="6";const P=Object.create(null);Object.keys(A).forEach(r=>{P[A[r]]=r});const X={type:"error",data:"parser error"},we=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ee=typeof ArrayBuffer=="function",be=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,ee=({type:r,data:e},t,n)=>we&&e instanceof Blob?t?n(e):pe(e,n):Ee&&(e instanceof ArrayBuffer||be(e))?t?n(e):pe(new Blob([e]),n):n(A[r]+(e||"")),pe=(r,e)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];e("b"+(n||""))},t.readAsDataURL(r)};function xe(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let K;function xt(r,e){if(we&&r.data instanceof Blob)return r.data.arrayBuffer().then(xe).then(e);if(Ee&&(r.data instanceof ArrayBuffer||be(r.data)))return e(xe(r.data));ee(r,!1,t=>{K||(K=new TextEncoder),e(K.encode(t))})}const me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<me.length;r++)S[me.charCodeAt(r)]=r;const mt=r=>{let e=r.length*.75,t=r.length,n,i=0,o,s,h,c;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);const f=new ArrayBuffer(e),d=new Uint8Array(f);for(n=0;n<t;n+=4)o=S[r.charCodeAt(n)],s=S[r.charCodeAt(n+1)],h=S[r.charCodeAt(n+2)],c=S[r.charCodeAt(n+3)],d[i++]=o<<2|s>>4,d[i++]=(s&15)<<4|h>>2,d[i++]=(h&3)<<6|c&63;return f},yt=typeof ArrayBuffer=="function",te=(r,e)=>{if(typeof r!="string")return{type:"message",data:ve(r,e)};const t=r.charAt(0);return t==="b"?{type:"message",data:gt(r.substring(1),e)}:P[t]?r.length>1?{type:P[t],data:r.substring(1)}:{type:P[t]}:X},gt=(r,e)=>{if(yt){const t=mt(r);return ve(t,e)}else return{base64:!0,data:r}},ve=(r,e)=>e==="blob"?r instanceof Blob?r:new Blob([r]):r instanceof ArrayBuffer?r:r.buffer,Ce="",_t=(r,e)=>{const t=r.length,n=new Array(t);let i=0;r.forEach((o,s)=>{ee(o,!1,h=>{n[s]=h,++i===t&&e(n.join(Ce))})})},wt=(r,e)=>{const t=r.split(Ce),n=[];for(let i=0;i<t.length;i++){const o=te(t[i],e);if(n.push(o),o.type==="error")break}return n};function Et(){return new TransformStream({transform(r,e){xt(r,t=>{const n=t.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,n)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(n))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let z;function D(r){return r.reduce((e,t)=>e+t.length,0)}function N(r,e){if(r[0].length===e)return r.shift();const t=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)t[i]=r[0][n++],n===r[0].length&&(r.shift(),n=0);return r.length&&n<r[0].length&&(r[0]=r[0].slice(n)),t}function bt(r,e){z||(z=new TextDecoder);const t=[];let n=0,i=-1,o=!1;return new TransformStream({transform(s,h){for(t.push(s);;){if(n===0){if(D(t)<1)break;const c=N(t,1);o=(c[0]&128)===128,i=c[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(D(t)<2)break;const c=N(t,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),n=3}else if(n===2){if(D(t)<8)break;const c=N(t,8),f=new DataView(c.buffer,c.byteOffset,c.length),d=f.getUint32(0);if(d>Math.pow(2,21)-1){h.enqueue(X);break}i=d*Math.pow(2,32)+f.getUint32(4),n=3}else{if(D(t)<i)break;const c=N(t,i);h.enqueue(te(o?c:z.decode(c),e)),n=0}if(i===0||i>r){h.enqueue(X);break}}}})}const Ae=4;function g(r){if(r)return vt(r)}function vt(r){for(var e in g.prototype)r[e]=g.prototype[e];return r}g.prototype.on=g.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};g.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};g.prototype.off=g.prototype.removeListener=g.prototype.removeAllListeners=g.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var n,i=0;i<t.length;i++)if(n=t[i],n===e||n.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};g.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,i=t.length;n<i;++n)t[n].apply(this,e)}return this};g.prototype.emitReserved=g.prototype.emit;g.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};g.prototype.hasListeners=function(r){return!!this.listeners(r).length};const M=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),w=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ct="arraybuffer";function Fe(r,...e){return e.reduce((t,n)=>(r.hasOwnProperty(n)&&(t[n]=r[n]),t),{})}const At=w.setTimeout,Ft=w.clearTimeout;function H(r,e){e.useNativeTimers?(r.setTimeoutFn=At.bind(w),r.clearTimeoutFn=Ft.bind(w)):(r.setTimeoutFn=w.setTimeout.bind(w),r.clearTimeoutFn=w.clearTimeout.bind(w))}const Bt=1.33;function kt(r){return typeof r=="string"?Tt(r):Math.ceil((r.byteLength||r.size)*Bt)}function Tt(r){let e=0,t=0;for(let n=0,i=r.length;n<i;n++)e=r.charCodeAt(n),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(n++,t+=4);return t}function Be(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Rt(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Ot(r){let e={},t=r.split("&");for(let n=0,i=t.length;n<i;n++){let o=t[n].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class St extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class se extends g{constructor(e){super(),this.writable=!1,H(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved("error",new St(e,t,n)),this}open(){return 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 t=te(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Rt(e);return t.length?"?"+t:""}}class Dt extends se{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=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)};wt(e,this.socket.binaryType).forEach(t),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,_t(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Be()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let ke=!1;try{ke=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Nt=ke;function Lt(){}class Pt extends Dt{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=e}}class C extends g{constructor(e,t,n){super(),this.createRequest=e,H(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const t=Fe(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=C.requestsCount++,C.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Lt,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete C.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()}}C.requestsCount=0;C.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ye);else if(typeof addEventListener=="function"){const r="onpagehide"in w?"pagehide":"unload";addEventListener(r,ye,!1)}}function ye(){for(let r in C.requests)C.requests.hasOwnProperty(r)&&C.requests[r].abort()}const qt=(function(){const r=Te({xdomain:!1});return r&&r.responseType!==null})();class It extends Pt{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=qt&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new C(Te,this.uri(),e)}}function Te(r){const e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Nt))return new XMLHttpRequest}catch{}if(!e)try{return new w[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Re=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ut extends se{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,n=Re?{}:Fe(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=this.createSocket(e,t,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,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 t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;ee(n,this.supportsBinary,o=>{try{this.doWrite(n,o)}catch{}i&&M(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Be()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Y=w.WebSocket||w.MozWebSocket;class Vt extends Ut{createSocket(e,t,n){return Re?new Y(e,t,n):t?new Y(e,t):new Y(e)}doWrite(e,t){this.ws.send(t)}}class Mt extends se{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=bt(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),i=Et();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const o=()=>{n.read().then(({done:h,value:c})=>{h||(this.onPacket(c),o())}).catch(h=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;this._writer.write(n).then(()=>{i&&M(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Ht={websocket:Vt,webtransport:Mt,polling:It},$t=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Wt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Q(r){if(r.length>8e3)throw"URI too long";const e=r,t=r.indexOf("["),n=r.indexOf("]");t!=-1&&n!=-1&&(r=r.substring(0,t)+r.substring(t,n).replace(/:/g,";")+r.substring(n,r.length));let i=$t.exec(r||""),o={},s=14;for(;s--;)o[Wt[s]]=i[s]||"";return t!=-1&&n!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Kt(o,o.path),o.queryKey=zt(o,o.query),o}function Kt(r,e){const t=/\/{2,9}/g,n=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function zt(r,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,o){i&&(t[i]=o)}),t}const j=typeof addEventListener=="function"&&typeof removeEventListener=="function",q=[];j&&addEventListener("offline",()=>{q.forEach(r=>r())},!1);class B extends g{constructor(e,t){if(super(),this.binaryType=Ct,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const n=Q(e);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Q(t.host).host);H(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const i=n.prototype.name;this.transports.push(i),this._transportsByName[i]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ot(this.opts.query)),j&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},q.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ae,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&B.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}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",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",B.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_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._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);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._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),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 t=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(t+=kt(i)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,M(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket("message",e,t,n),this}send(e,t,n){return this._sendPacket("message",e,t,n),this}_sendPacket(e,t,n,i){if(typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};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){if(B.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),j&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=q.indexOf(this._offlineEventListener);n!==-1&&q.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}B.protocol=Ae;class Yt extends B{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;B.priorWebsocketSuccess=!1;const i=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",p=>{if(!n)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;B.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=t.name,this.emitReserved("upgradeError",x)}}))};function o(){n||(n=!0,d(),t.close(),t=null)}const s=p=>{const x=new Error("probe error: "+p);x.transport=t.name,o(),this.emitReserved("upgradeError",x)};function h(){s("transport closed")}function c(){s("socket closed")}function f(p){t&&p.name!==t.name&&o()}const d=()=>{t.removeListener("open",i),t.removeListener("error",s),t.removeListener("close",h),this.off("close",c),this.off("upgrading",f)};t.once("open",i),t.once("error",s),t.once("close",h),this.once("close",c),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}let Jt=class extends Yt{constructor(e,t={}){const n=typeof e=="object",i=n?{...e}:{...t};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(o=>Ht[o]).filter(o=>!!o)),super(n?i:e,i)}};function Xt(r,e="",t){let n=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),n=Q(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+e,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}const Qt=typeof ArrayBuffer=="function",jt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Oe=Object.prototype.toString,Gt=typeof Blob=="function"||typeof Blob<"u"&&Oe.call(Blob)==="[object BlobConstructor]",Zt=typeof File=="function"||typeof File<"u"&&Oe.call(File)==="[object FileConstructor]";function ne(r){return Qt&&(r instanceof ArrayBuffer||jt(r))||Gt&&r instanceof Blob||Zt&&r instanceof File}function I(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,n=r.length;t<n;t++)if(I(r[t]))return!0;return!1}if(ne(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return I(r.toJSON(),!0);for(const t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&I(r[t]))return!0;return!1}function es(r){const e=[],t=r.data,n=r;return n.data=U(t,e),n.attachments=e.length,{packet:n,buffers:e}}function U(r,e,t){if(!r)return r;if(ne(r)){const n={_placeholder:!0,num:e.length};return e.push(r),n}else if(Array.isArray(r)){const n=new Array(r.length);for(let i=0;i<r.length;i++)n[i]=U(r[i],e);return n}else if(typeof r=="object"&&!(r instanceof Date)){if(r.toJSON&&typeof r.toJSON=="function"&&!t)return U(r.toJSON(),e,!0);const n={};for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=U(r[i],e));return n}return r}function ts(r,e){return r.data=G(r.data,e),delete r.attachments,r}function G(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=G(r[t],e);else if(typeof r=="object")for(const t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=G(r[t],e));return r}const ss=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var l;(function(r){r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK"})(l||(l={}));class ns{constructor(e){this.replacer=e}encode(e){return(e.type===l.EVENT||e.type===l.ACK)&&I(e)?this.encodeAsBinary({type:e.type===l.EVENT?l.BINARY_EVENT:l.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===l.BINARY_EVENT||e.type===l.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=es(e),n=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(n),i}}class re extends g{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===l.BINARY_EVENT;n||t.type===l.BINARY_ACK?(t.type=n?l.EVENT:l.ACK,this.reconstructor=new rs(t)):super.emitReserved("decoded",t)}else if(ne(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(l[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===l.BINARY_EVENT||n.type===l.BINARY_ACK){const o=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const s=e.substring(o,t);if(s!=Number(s)||e.charAt(t)!=="-")throw new Error("Illegal attachments");const h=Number(s);if(!is(h)||h<1)throw new Error("Illegal attachments");if(h>this.opts.maxAttachments)throw new Error("too many attachments");n.attachments=h}if(e.charAt(t+1)==="/"){const o=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););n.nsp=e.substring(o,t)}else n.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const o=t+1;for(;++t;){const s=e.charAt(t);if(s==null||Number(s)!=s){--t;break}if(t===e.length)break}n.id=Number(e.substring(o,t+1))}if(e.charAt(++t)){const o=this.tryParse(e.substr(t));if(re.isPayloadValid(n.type,o))n.data=o;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case l.CONNECT:return ge(t);case l.DISCONNECT:return t===void 0;case l.CONNECT_ERROR:return typeof t=="string"||ge(t);case l.EVENT:case l.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&ss.indexOf(t[0])===-1);case l.ACK:case l.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rs{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=ts(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const is=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function ge(r){return Object.prototype.toString.call(r)==="[object Object]"}const os=Object.freeze(Object.defineProperty({__proto__:null,Decoder:re,Encoder:ns,get PacketType(){return l}},Symbol.toStringTag,{value:"Module"}));function b(r,e,t){return r.on(e,t),function(){r.off(e,t)}}const as=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Se extends g{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[b(e,"open",this.onopen.bind(this)),b(e,"packet",this.onpacket.bind(this)),b(e,"error",this.onerror.bind(this)),b(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,...t){var n,i,o;if(as.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const s={type:l.EVENT,data:t};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const d=this.ids++,p=t.pop();this._registerAckCallback(d,p),s.id=d}const h=(i=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!h||(c?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,t){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===e&&this.sendBuffer.splice(h,1);t.call(this,new Error("operation has timed out"))},i),s=(...h)=>{this.io.clearTimeoutFn(o),t.apply(this,h)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...t){return new Promise((n,i)=>{const o=(s,h)=>s?i(s):n(h);o.withError=!0,t.push(o),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>(this._queue[0],i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...o)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:l.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case l.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):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 l.EVENT:case l.BINARY_EVENT:this.onevent(e);break;case l.ACK:case l.BINARY_ACK:this.onack(e);break;case l.DISCONNECT:this.ondisconnect();break;case l.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 t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...i){n||(n=!0,t.packet({type:l.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),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:l.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 t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.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 t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function T(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}T.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};T.prototype.reset=function(){this.attempts=0};T.prototype.setMin=function(r){this.ms=r};T.prototype.setMax=function(r){this.max=r};T.prototype.setJitter=function(r){this.jitter=r};class Z extends g{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,H(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new T({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||os;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.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 Jt(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=b(t,"open",function(){n.onopen(),e&&e()}),o=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),e?e(h):this.maybeReconnectOnOpen()},s=b(t,"error",o);if(this._timeout!==!1){const h=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),t.close()},h);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(b(e,"ping",this.onping.bind(this)),b(e,"data",this.ondata.bind(this)),b(e,"error",this.onerror.bind(this)),b(e,"close",this.onclose.bind(this)),b(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){M(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Se(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[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")}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),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 t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const R={};function V(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};const t=Xt(r,e.path||"/socket.io"),n=t.source,i=t.id,o=t.path,s=R[i]&&o in R[i].nsps,h=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return h?c=new Z(n,e):(R[i]||(R[i]=new Z(n,e)),c=R[i]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(V,{Manager:Z,Socket:Se,io:V,connect:V});const _=V("/terminal",{autoConnect:!1});_.on("connect",()=>{console.log("手动连接成功")});_.on("disconnect",()=>{console.log("连接已断开")});var J={exports:{}},_e;function cs(){return _e||(_e=1,(function(r){var e={};r.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length===2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s===12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s===8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s===172||s===175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s===161||s===164||167<=s&&s<=168||s===170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s===198||s===208||215<=s&&s<=216||222<=s&&s<=225||s===230||232<=s&&s<=234||236<=s&&s<=237||s===240||242<=s&&s<=243||247<=s&&s<=250||s===252||s===254||s===257||s===273||s===275||s===283||294<=s&&s<=295||s===299||305<=s&&s<=307||s===312||319<=s&&s<=322||s===324||328<=s&&s<=331||s===333||338<=s&&s<=339||358<=s&&s<=359||s===363||s===462||s===464||s===466||s===468||s===470||s===472||s===474||s===476||s===593||s===609||s===708||s===711||713<=s&&s<=715||s===717||s===720||728<=s&&s<=731||s===733||s===735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s===1025||1040<=s&&s<=1103||s===1105||s===8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s===8240||8242<=s&&s<=8243||s===8245||s===8251||s===8254||s===8308||s===8319||8321<=s&&s<=8324||s===8364||s===8451||s===8453||s===8457||s===8467||s===8470||8481<=s&&s<=8482||s===8486||s===8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s===8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s===8658||s===8660||s===8679||s===8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s===8715||s===8719||s===8721||s===8725||s===8730||8733<=s&&s<=8736||s===8739||s===8741||8743<=s&&s<=8748||s===8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s===8776||s===8780||s===8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s===8853||s===8857||s===8869||s===8895||s===8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s===9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s===9711||9733<=s&&s<=9734||s===9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s===9756||s===9758||s===9792||s===9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s===9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s===9955||9960<=s&&s<=9983||s===10045||s===10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s===65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i==="F"||i==="W"||i==="A"?2:1};function t(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=t(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){var s=e.length(n);i=i??0,o=o===void 0||i===null?1:o,i<0&&(i=s+i),o<0&&(o=s+o);for(var h="",c=0,f=t(n),d=0;d<f.length;d++){var p=f[d],x=e.length(p);if(c>=i-(x===2?1:0))if(c+x<=o)h+=p;else break;c+=x}return h}})(J)),J.exports}var O=cs();const hs=()=>{const r=L("/"),e=c=>{const f=/^([A-Za-z]):[\\/]?(.*)/.exec(c);if(!f)return{letter:"",rest:c.replace(/\\/g,"/")};if(!f[1]||!f[2])throw new Error("splitDriveLetter path error");return{letter:f[1].toUpperCase(),rest:f[2].replace(/\\/g,"/")}},t=(c,f)=>c?`${c}:\\${f.replace(/\//g,"\\")}`:f.replace(/\//g,"\\"),n=async()=>{r.value=window.__GLOBAL_CONFIG__.cwd||"/"},i=c=>{r.value=c},o=c=>{const f=/^\s*cd\s+([^\s]*)\s*$/i,d=c.match(f);if(!d)return{isCd:!1};const p=d[1]||"/",{rest:x,letter:u}=e(r.value),m=ct.resolve(`/${x}`,p);return{newCwd:t(u,m.slice(1)),oldCwd:r.value,isCd:!0}},s=c=>{const{isCd:f,newCwd:d,oldCwd:p}=o(c);if(f){_.emit("command",{command:"",cwd:d,oldCwd:p});return}_.emit("command",{command:c,cwd:r.value})},h=(c="")=>{_.emit("tab",{cwd:r.value,lastWord:c})};return{cwd:Ye(()=>r.value),initCwd:n,sendCommand:s,updateCwd:i,sendTabCommand:h}};var us=at();const ls={ref:"terminalContainer",class:"size-full overflow-hidden p-2 pr-0 bg-[#1e1e1e]"},fs={ref:"terminalEl",class:"!h-full"},gs=Je({__name:"index",setup(r){const{t:e}=Xe(),t=hs(),n=de("terminalContainer"),i=de("terminalEl"),{height:o,width:s}=ut(n),h=new dt.FitAddon,c=L(!1),f=L(!1),d=a=>{u&&(u.options.cursorStyle=a?"bar":"block",u.options.cursorBlink=!0,f.value=a)},p=lt(ht,[]),x=L(-1);let u=null,m="",v="",E="",ie;const oe=async()=>{u||(u=new ft.Terminal({theme:{background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#c5c5c5"},fontSize:14,fontFamily:'Consolas, "Courier New", monospace',cursorBlink:!0,windowsMode:!0,allowProposedApi:!0,convertEol:!0}),u.loadAddon(h),u.loadAddon(new pt.Unicode11Addon),u.loadAddon(new us.WebLinksAddon),u.attachCustomKeyEventHandler(a=>a.type==="keydown"&&(a.ctrlKey||a.metaKey)&&a.key==="v"?(a.preventDefault(),Le(),!1):!0),i.value&&(u.open(i.value),h.fit()),u.onData(De),ie=await Ke())},$=()=>{m="",v="",E=""},De=a=>{if(u){if(a==="\x1B[A"||a==="\x1B[B"){$e(a);return}if(a==="\r"){Ve();return}if(a===""){Pe();return}if(a.charCodeAt(0)===9||a===" "){qe();return}if(a===""){Ne();return}a.charCodeAt(0)<32&&a!==" "||(m+=a,u.write(a))}},Ne=()=>{d(!1),$(),u?.write("^C"),u?.write(`\r
|
|
2
2
|
`),t.sendCommand("^C")},Le=async()=>{try{const a=await navigator.clipboard.readText();if(!a||!u)return;const y=[...a].filter(k=>{const F=k.charCodeAt(0);return F>=32||F===9||F===10||F===13}).join("");y&&(m+=y,u.write(y))}catch{}},Pe=()=>{if(v.length){E.length&&(E=v);const a=v.slice(-1),y=O.characterLength(a);u?.write("\b \b".repeat(y)),v=v.slice(0,-1),E=E.slice(0,-1);return}if(m.length){const a=m.slice(-1),y=O.characterLength(a);u?.write("\b \b".repeat(y)),m=m.slice(0,-1)}},qe=()=>{if(E){t.sendTabCommand(E);return}const a=m.trim().split(/\s+/);a.length>1&&(E=a[a.length-1],t.sendTabCommand(E))},Ie=()=>{for(const a of m){const y=O.characterLength(a);u?.write("\b \b".repeat(y))}m=""},Ue=()=>{for(const a of v){const y=O.characterLength(a);u?.write("\b \b".repeat(y))}v=""},Ve=()=>{if(u?.write(`\r
|
|
3
3
|
`),m==="clear"){u?.clear(),t.sendCommand(""),$();return}m.trim()?(t.sendCommand(m+v),d(!0)):t.sendCommand(""),$()},Me=a=>{a&&(p.value=p.value.filter(y=>y!==a),p.value.unshift(a))},He=a=>`PS ${a}>`,$e=a=>{const y=x.value;a==="\x1B[A"&&(x.value=Math.min(x.value+1,p.value.length-1)),a==="\x1B[B"&&(x.value=Math.max(x.value-1,-1)),y!==x.value&&(Ie(),x.value===-1?m="":m=p.value[x.value]??"",u?.write(m))},We=a=>{if(a){if(Ue(),m.endsWith(E))for(const k of E){const F=O.characterLength(k);u?.write("\b \b".repeat(F)),m=m.slice(0,-1)}u?.write(`${a}`),v=`${a}`}},Ke=async()=>{await t.initCwd(),_.connect();const a=F=>{console.log("终端输出:",F);const{stderr:ce,stdout:he,cwd:W,err:ue,command:le,tab:fe}=F;if(ce){u?.write(`${ce}`);return}if(he){u?.write(`${he}`);return}if(W){const ze=He(W);u?.write(ze),t.updateCwd(W),le&&Me(le),x.value=-1,d(!1);return}if(ue){u?.write(`\x1B[31m${ue}\x1B[0m`),u?.write(`\r
|
|
4
4
|
`),d(!1);return}fe&&We(fe)},y=()=>{c.value=!0,t.sendCommand("")},k=()=>{c.value=!1,u?.writeln(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ac as te,a7 as ae,N as oe,a as se,v as le,c as ne,n as N,a5 as y}from"./vendor-ui-
|
|
1
|
+
import{ac as te,a7 as ae,N as oe,a as se,v as le,c as ne,n as N,a5 as y}from"./vendor-ui-KquZSIP0.js";import{N as d,J as ce,E as I,z as D,f as $,o as re}from"./index-YvDl_1WK.js";import{C as ie}from"./useCompEditStore-Ch5sDzy4.js";import{c as pe}from"./index-Bucicr-O.js";import{u as me}from"./useTeamHeaders-Bttl7tEb.js";/* empty css */import{I as A,aD as de,O as _,Q as L,Y as h,P as H,H as ue,af as fe,u,R as k,a1 as V,a2 as x,ad as he,a0 as Y,aE as Ce,aA as _e,j as ve,Z as ge,U as Pe,W as Ee,a as F,m as B,n as Ue,J as ye}from"./vendor-core-Do-oxgl9.js";import{u as Ie}from"./useVscodeOpen-DyvB87xz.js";import{_ as Te}from"./BaseDialog.vue_vue_type_script_setup_true_lang-CkNHSg5g.js";import{v as we}from"./v4-EwEgHOG0.js";const Oe={class:"flex items-center justify-between"},Se=["title"],Me=A({__name:"index",props:Ce({options:{type:Array,default:()=>[]},placeholderText:{type:String,default:""},openInVscodeText:{type:String,default:""}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(f){const{openCompPathInVscode:T,handlePath:v}=Ie(),c=de(f,"modelValue"),g=f;function w(r){const e=g.options.find(i=>i.fullPath===r);e&&T(e.fullPath,`./${d.COMP_CONFIG_FILENAME}`)}function P(r){c.value=r}return(r,e)=>{const i=ae,C=te,O=oe;return _(),L(O,{"model-value":c.value,placeholder:f.placeholderText,onChange:P},{default:h(()=>[(_(!0),H(ue,null,fe(f.options,p=>(_(),L(C,{key:p.value,label:u(v)(p.fullPath),value:p.value},{default:h(()=>[k("div",Oe,[k("span",{title:p.fullPath},V(u(v)(p.fullPath)),9,Se),x(i,{type:"primary",href:"javascript:void(0)",onClick:he(b=>w(p.fullPath),["stop"])},{default:h(()=>[Y(V(f.openInVscodeText),1)]),_:1},8,["onClick"])])]),_:2},1032,["label","value"]))),128))]),_:1},8,["model-value","placeholder"])}}}),Be=A({__name:"index",emits:["updateSuccess"],setup(f,{expose:T,emit:v}){const{t:c}=_e(),g=v,{headers:w,teamId:P}=me(),r=se(ce,!1),e=ve(d.PROVIDE_KEY_COMP_EDIT_STORE),i=F(!1),C=F(!0),O=B(()=>{const a=e.selectedFolder?.basename,t=e.compDetail?.name??"";return a?`${c("comp.compOnlineUpdate")}:${t}`:`${c("comp.compOfflineUpdate")}:${t}`}),p=B(()=>({title:O.value,fullscreen:r.value,top:"5vh",width:"70%"}));async function b(a){C.value=!0;try{const t=await I.comp.compcontrollerLocalcompsbyids({compIds:[a]}),{compInfos:o}=t.data;if(o?.length){let s=o[0];if(o.length>1&&(s=await j(o),!s))return;e.setCompUpdateType(d.COMP_UPDATE_TYPE_ONLINE),i.value=!0,e.setSelectedFolder(s),await M(a,s.path)}else{if(await N.confirm(c("comp.compNotInLocal"),c("common.info"),{type:"warning"}).catch(()=>{})!=="confirm")return;e.setCompUpdateType(d.COMP_UPDATE_TYPE_OFFLINE),i.value=!0,await M(a)}}catch(t){console.error(t),y.error(t.message)}finally{C.value=!1}}async function j(a){const t=a.map(n=>({value:n.fullPathHash,label:n.fullPath,fullPath:n.fullPath})),o=F("");return await N({title:c("comp.selectUpdateFolder"),customClass:"select-message",message:()=>ye(Me,{modelValue:o.value,"onUpdate:modelValue":n=>o.value=n,options:t,placeholderText:c("comp.selectUpdateFolder"),openInVscodeText:c("comp.openInVscode")}),beforeClose:(n,m,E)=>{if(n==="confirm"){if(!o.value){y.error(c("comp.selectUpdateFolder"));return}E()}else E()}}).catch(()=>{})!=="confirm"?void 0:a.find(n=>n.fullPathHash===o.value)}function S(){i.value=!1}function z(){e.$reset()}function W(a,t){const o=l=>{if(!l?.length||!a)return"";const n=we(),m=re.getPreviewUrl(a,l);return`${d.COMP_PREVIEW_PREFIX_LOCAL}/${m}?v=${n}`};return t.map(l=>({...l,activeTab:d.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:o(l.miniPath),fullEntryUrl:o(l.fullPath)}))}function J(a,t){const o=new Map(a.map(({path:s,signedUrl:l})=>[s,l]));return t.map(s=>{const l=$.replaceBackslashWithSlash(s.miniPath.at(-1)??""),n=$.replaceBackslashWithSlash(s.fullPath?.at(-1)??"");return{...s,activeTab:d.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:o.get(l)??"",fullEntryUrl:o.get(n)??""}})}async function M(a,t){e.setLoading(!0);const o=await D.v1Comp.compcontrollerCompdetail({compId:a}),{desc:s,previewConfigs:l,bgColor:n,dep:m,name:E,version:X,tags:Z}=o.data||{};if(e.setCompDetail(o.data),e.setOnlineCompDep(m),e.setCompBgColor(n??"#fff"),e.setExtraInfo({description:s,name:E,tags:Z}),e.setEditCompId(a),e.isOnlineUpdate&&t){const R=await D.v1Comp.compcontrollerComphash({compId:a}),U=await I.comp.compcontrollerCompfilehash({compPath:t}),q=await I.comp.compcontrollerDep({compPath:t}),{thirdParty:ee}=q.data;e.setCompDep(ee),e.setLocalCompHash(U.data.compHash),e.setRemoteCompHash(R.data.compHash),e.setPreviewCompList(W(t,l))}else{const U=pe(a)().versionToFileAccessPath[X]??[];e.setSignedUrls(U),e.setPreviewCompList(J(U,l)),e.setCompDep(m)}e.setLoading(!1)}function G({end:a}){const t=e.getCompSubmitParams();if(e.isOnlineUpdate)I.comp.compcontrollerUpdate({compId:e.editCompId,...t,...P?{teamId:P}:{}}).then(()=>{y.success(c("message.success.update")),g("updateSuccess",e.editCompId),S()}).finally(()=>{a()});else if(e.isOfflineUpdate){const{name:o,desc:s,bgColor:l,previewConfigs:n,tags:m}=t;D.v1Comp.compcontrollerUpdatebasicinfo({compId:e.editCompId,name:o,desc:s,bgColor:l,previewConfigs:n,tags:m},{headers:w}).then(()=>{y.success(c("message.success.update")),g("updateSuccess",e.editCompId),S()}).finally(()=>{a()})}}async function K(){r.value=!r.value}async function Q(){const a=e.editCompId,t=e.selectedFolder,o=e.compUpdateType;e.$reset(),await Ue(),e.setCompUpdateType(o),e.setSelectedFolder(t),M(a,t.path)}return T({open:b,close:S}),(a,t)=>{const o=ne,s=le;return _(),L(u(Te),Ee({modelValue:i.value,"onUpdate:modelValue":t[0]||(t[0]=l=>i.value=l),class:"comp-update-dialog"},p.value,{"destroy-on-close":"","show-close":"",onClose:z}),{footer:h(()=>[x(o,{onClick:K},{default:h(()=>[Y(V(u(r)?u(c)("common.exitFullscreen"):u(c)("common.fullscreen")),1)]),_:1})]),default:h(()=>[ge((_(),H("div",{class:Pe(u(r)?"size-full":"h-[70vh]")},[x(ie,{class:"h-full",onConfirmUpload:G,onReload:Q})],2)),[[s,C.value]])]),_:1},16,["modelValue"])}}});export{Be as _};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ao as kt,ap as xt,u as wt,aj as yt,aq as Et,a8 as _t}from"./vendor-ui-
|
|
1
|
+
import{ao as kt,ap as xt,u as wt,aj as yt,aq as Et,a8 as _t}from"./vendor-ui-KquZSIP0.js";import{f as St,H as Tt,N as J,s as Rt}from"./index-YvDl_1WK.js";import{I as Te,aA as qe,ak as At,O as A,Q as xe,ae as vt,Y as ne,P as $,H as He,af as Ke,R as ee,a1 as re,$ as we,m as U,ac as Nt,aC as te,f as Qe,a2 as ye,W as Ct,u as O,w as se,n as Xe,j as It,a as B,T as $t,U as Mt,S as ze,a0 as Ot}from"./vendor-core-Do-oxgl9.js";import{H as L}from"./core-yetgou6F.js";async function Lt(t){try{return(await fetch(t)).ok}catch(e){return console.log(`Error fetching ${t}:`,e.message),!1}}const zt={key:0,class:"text-red-500 text-[10px]"},Pt=Te({__name:"AnchorNode",props:{node:{},isDebug:{type:Boolean,default:!1}},setup(t){const{t:e}=qe(),n=t,s=U(()=>n.node.href.replace(/\s+/g,"-")),r=U(()=>{const a=n.node.titles.join(""),{reason:l,reasonParams:o={}}=St.validateHash(a);return l?e(l,o):""}),i=U(()=>n.node.titles.join(""));return(a,l)=>{const o=At("AnchorNode",!0),u=kt;return A(),xe(u,{href:s.value},vt({default:ne(()=>[ee("div",null,re(i.value),1),t.isDebug&&r.value?(A(),$("div",zt,"("+re(r.value)+")",1)):we("",!0)]),_:2},[t.node.children.length?{name:"sub-link",fn:ne(()=>[(A(!0),$(He,null,Ke(t.node.children,c=>(A(),xe(o,{key:c.href,node:c,"is-debug":t.isDebug},null,8,["node","is-debug"]))),128))]),key:"0"}:void 0]),1032,["href"])}}}),Dt=Te({__name:"index",props:{headings:{},isDebug:{type:Boolean}},emits:["change"],setup(t,{emit:e}){const n=t,s=e,r=Nt(),i=U(()=>Tt.flatHeadingsToTree(n.headings));function a(o){s("change",o)}const l=te("tocRef");return Qe(()=>{l.value?.addEventListener("click",o=>{o.target.closest(".el-anchor__link")&&o.preventDefault()})}),(o,u)=>{const c=xt;return A(),$("div",{ref_key:"tocRef",ref:l,class:"toc-wrapper"},[ye(c,Ct(O(r),{onChange:a}),{default:ne(()=>[(A(!0),$(He,null,Ke(i.value,h=>(A(),xe(Pt,{key:h.href,node:h,"is-debug":t.isDebug},null,8,["node","is-debug"]))),128))]),_:1},16)],512)}}});function Re(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var G=Re();function We(t){G=t}var D={exec:()=>null};function g(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(S.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,e)};return s}var Bt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),S={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Ut=/^(?:[ \t]*(?:\n|$))+/,Zt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Gt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,V=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ft=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ae=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ye=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ve=g(Ye).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),qt=g(Ye).replace(/bull/g,Ae).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ve=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ht=/^[^\n]+/,Ne=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Kt=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ne).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Qt=g(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ae).getRegex(),ce="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ce=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Xt=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ce).replace("tag",ce).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Je=g(ve).replace("hr",V).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex(),Wt=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Je).getRegex(),Ie={blockquote:Wt,code:Zt,def:Kt,fences:Gt,heading:Ft,hr:V,html:Xt,lheading:Ve,list:Qt,newline:Ut,paragraph:Je,table:D,text:Ht},Pe=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",V).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex(),Yt={...Ie,lheading:qt,table:Pe,paragraph:g(ve).replace("hr",V).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Pe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ce).getRegex()},Vt={...Ie,html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ce).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:D,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(ve).replace("hr",V).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Ve).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Jt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,jt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,je=/^( {2,}|\\)\n(?!\s*$)/,en=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,ue=/[\s\p{P}\p{S}]/u,$e=/[^\s\p{P}\p{S}]/u,tn=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ue).getRegex(),et=/(?!~)[\p{P}\p{S}]/u,nn=/(?!~)[\s\p{P}\p{S}]/u,rn=/(?:[^\s\p{P}\p{S}]|~)/u,sn=g(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Bt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,an=g(tt,"u").replace(/punct/g,F).getRegex(),on=g(tt,"u").replace(/punct/g,et).getRegex(),nt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ln=g(nt,"gu").replace(/notPunctSpace/g,$e).replace(/punctSpace/g,ue).replace(/punct/g,F).getRegex(),cn=g(nt,"gu").replace(/notPunctSpace/g,rn).replace(/punctSpace/g,nn).replace(/punct/g,et).getRegex(),un=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$e).replace(/punctSpace/g,ue).replace(/punct/g,F).getRegex(),pn=g(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),hn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",dn=g(hn,"gu").replace(/notPunctSpace/g,$e).replace(/punctSpace/g,ue).replace(/punct/g,F).getRegex(),gn=g(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),fn=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bn=g(Ce).replace("(?:-->|$)","-->").getRegex(),mn=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ae=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,kn=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",ae).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),rt=g(/^!?\[(label)\]\[(ref)\]/).replace("label",ae).replace("ref",Ne).getRegex(),st=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ne).getRegex(),xn=g("reflink|nolink(?!\\()","g").replace("reflink",rt).replace("nolink",st).getRegex(),De=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Me={_backpedal:D,anyPunctuation:gn,autolink:fn,blockSkip:sn,br:je,code:jt,del:D,delLDelim:D,delRDelim:D,emStrongLDelim:an,emStrongRDelimAst:ln,emStrongRDelimUnd:un,escape:Jt,link:kn,nolink:st,punctuation:tn,reflink:rt,reflinkSearch:xn,tag:mn,text:en,url:D},wn={...Me,link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",ae).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ae).getRegex()},Ee={...Me,emStrongRDelimAst:cn,emStrongLDelim:on,delLDelim:pn,delRDelim:dn,url:g(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",De).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:g(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",De).getRegex()},yn={...Ee,br:g(je).replace("{2,}","*").getRegex(),text:g(Ee.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},j={normal:Ie,gfm:Yt,pedantic:Vt},X={normal:Me,gfm:Ee,breaks:yn,pedantic:wn},En={"&":"&","<":"<",">":">",'"':""","'":"'"},Be=t=>En[t];function I(t,e){if(e){if(S.escapeTest.test(t))return t.replace(S.escapeReplace,Be)}else if(S.escapeTestNoEncode.test(t))return t.replace(S.escapeReplaceNoEncode,Be);return t}function Ue(t){try{t=encodeURI(t).replace(S.percentDecode,"%")}catch{return null}return t}function Ze(t,e){let n=t.replace(S.findPipe,(i,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),s=n.split(S.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(S.slashPipe,"|");return s}function W(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function _n(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function Sn(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function Ge(t,e,n,s,r){let i=e.href,a=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,o}function Tn(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
3
3
|
`).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=r.length?i.slice(r.length):i}).join(`
|
|
4
4
|
`)}var ie=class{options;rules;lexer;constructor(t){this.options=t||G}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:W(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as E}from"./vendor-ui-
|
|
1
|
+
import{k as E}from"./vendor-ui-KquZSIP0.js";var x={exports:{}},y={exports:{}},_;function H(){return _||(_=1,(function(){var F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l={rotl:function(f,i){return f<<i|f>>>32-i},rotr:function(f,i){return f<<32-i|f>>>i},endian:function(f){if(f.constructor==Number)return l.rotl(f,8)&16711935|l.rotl(f,24)&4278255360;for(var i=0;i<f.length;i++)f[i]=l.endian(f[i]);return f},randomBytes:function(f){for(var i=[];f>0;f--)i.push(Math.floor(Math.random()*256));return i},bytesToWords:function(f){for(var i=[],c=0,a=0;c<f.length;c++,a+=8)i[a>>>5]|=f[c]<<24-a%32;return i},wordsToBytes:function(f){for(var i=[],c=0;c<f.length*32;c+=8)i.push(f[c>>>5]>>>24-c%32&255);return i},bytesToHex:function(f){for(var i=[],c=0;c<f.length;c++)i.push((f[c]>>>4).toString(16)),i.push((f[c]&15).toString(16));return i.join("")},hexToBytes:function(f){for(var i=[],c=0;c<f.length;c+=2)i.push(parseInt(f.substr(c,2),16));return i},bytesToBase64:function(f){for(var i=[],c=0;c<f.length;c+=3)for(var a=f[c]<<16|f[c+1]<<8|f[c+2],h=0;h<4;h++)c*8+h*6<=f.length*8?i.push(F.charAt(a>>>6*(3-h)&63)):i.push("=");return i.join("")},base64ToBytes:function(f){f=f.replace(/[^A-Z0-9+\/]/ig,"");for(var i=[],c=0,a=0;c<f.length;a=++c%4)a!=0&&i.push((F.indexOf(f.charAt(c-1))&Math.pow(2,-2*a+8)-1)<<a*2|F.indexOf(f.charAt(c))>>>6-a*2);return i}};y.exports=l})()),y.exports}var B,S;function C(){if(S)return B;S=1;var F={utf8:{stringToBytes:function(l){return F.bin.stringToBytes(unescape(encodeURIComponent(l)))},bytesToString:function(l){return decodeURIComponent(escape(F.bin.bytesToString(l)))}},bin:{stringToBytes:function(l){for(var f=[],i=0;i<l.length;i++)f.push(l.charCodeAt(i)&255);return f},bytesToString:function(l){for(var f=[],i=0;i<l.length;i++)f.push(String.fromCharCode(l[i]));return f.join("")}}};return B=F,B}var T,A;function U(){if(A)return T;A=1,T=function(f){return f!=null&&(F(f)||l(f)||!!f._isBuffer)};function F(f){return!!f.constructor&&typeof f.constructor.isBuffer=="function"&&f.constructor.isBuffer(f)}function l(f){return typeof f.readFloatLE=="function"&&typeof f.slice=="function"&&F(f.slice(0,0))}return T}var q;function k(){return q||(q=1,(function(){var F=H(),l=C().utf8,f=U(),i=C().bin,c=function(a,h){a.constructor==String?h&&h.encoding==="binary"?a=i.stringToBytes(a):a=l.stringToBytes(a):f(a)?a=Array.prototype.slice.call(a,0):!Array.isArray(a)&&a.constructor!==Uint8Array&&(a=a.toString());for(var e=F.bytesToWords(a),g=a.length*8,t=1732584193,r=-271733879,u=-1732584194,n=271733878,o=0;o<e.length;o++)e[o]=(e[o]<<8|e[o]>>>24)&16711935|(e[o]<<24|e[o]>>>8)&4278255360;e[g>>>5]|=128<<g%32,e[(g+64>>>9<<4)+14]=g;for(var p=c._ff,v=c._gg,s=c._hh,d=c._ii,o=0;o<e.length;o+=16){var I=t,R=r,M=u,w=n;t=p(t,r,u,n,e[o+0],7,-680876936),n=p(n,t,r,u,e[o+1],12,-389564586),u=p(u,n,t,r,e[o+2],17,606105819),r=p(r,u,n,t,e[o+3],22,-1044525330),t=p(t,r,u,n,e[o+4],7,-176418897),n=p(n,t,r,u,e[o+5],12,1200080426),u=p(u,n,t,r,e[o+6],17,-1473231341),r=p(r,u,n,t,e[o+7],22,-45705983),t=p(t,r,u,n,e[o+8],7,1770035416),n=p(n,t,r,u,e[o+9],12,-1958414417),u=p(u,n,t,r,e[o+10],17,-42063),r=p(r,u,n,t,e[o+11],22,-1990404162),t=p(t,r,u,n,e[o+12],7,1804603682),n=p(n,t,r,u,e[o+13],12,-40341101),u=p(u,n,t,r,e[o+14],17,-1502002290),r=p(r,u,n,t,e[o+15],22,1236535329),t=v(t,r,u,n,e[o+1],5,-165796510),n=v(n,t,r,u,e[o+6],9,-1069501632),u=v(u,n,t,r,e[o+11],14,643717713),r=v(r,u,n,t,e[o+0],20,-373897302),t=v(t,r,u,n,e[o+5],5,-701558691),n=v(n,t,r,u,e[o+10],9,38016083),u=v(u,n,t,r,e[o+15],14,-660478335),r=v(r,u,n,t,e[o+4],20,-405537848),t=v(t,r,u,n,e[o+9],5,568446438),n=v(n,t,r,u,e[o+14],9,-1019803690),u=v(u,n,t,r,e[o+3],14,-187363961),r=v(r,u,n,t,e[o+8],20,1163531501),t=v(t,r,u,n,e[o+13],5,-1444681467),n=v(n,t,r,u,e[o+2],9,-51403784),u=v(u,n,t,r,e[o+7],14,1735328473),r=v(r,u,n,t,e[o+12],20,-1926607734),t=s(t,r,u,n,e[o+5],4,-378558),n=s(n,t,r,u,e[o+8],11,-2022574463),u=s(u,n,t,r,e[o+11],16,1839030562),r=s(r,u,n,t,e[o+14],23,-35309556),t=s(t,r,u,n,e[o+1],4,-1530992060),n=s(n,t,r,u,e[o+4],11,1272893353),u=s(u,n,t,r,e[o+7],16,-155497632),r=s(r,u,n,t,e[o+10],23,-1094730640),t=s(t,r,u,n,e[o+13],4,681279174),n=s(n,t,r,u,e[o+0],11,-358537222),u=s(u,n,t,r,e[o+3],16,-722521979),r=s(r,u,n,t,e[o+6],23,76029189),t=s(t,r,u,n,e[o+9],4,-640364487),n=s(n,t,r,u,e[o+12],11,-421815835),u=s(u,n,t,r,e[o+15],16,530742520),r=s(r,u,n,t,e[o+2],23,-995338651),t=d(t,r,u,n,e[o+0],6,-198630844),n=d(n,t,r,u,e[o+7],10,1126891415),u=d(u,n,t,r,e[o+14],15,-1416354905),r=d(r,u,n,t,e[o+5],21,-57434055),t=d(t,r,u,n,e[o+12],6,1700485571),n=d(n,t,r,u,e[o+3],10,-1894986606),u=d(u,n,t,r,e[o+10],15,-1051523),r=d(r,u,n,t,e[o+1],21,-2054922799),t=d(t,r,u,n,e[o+8],6,1873313359),n=d(n,t,r,u,e[o+15],10,-30611744),u=d(u,n,t,r,e[o+6],15,-1560198380),r=d(r,u,n,t,e[o+13],21,1309151649),t=d(t,r,u,n,e[o+4],6,-145523070),n=d(n,t,r,u,e[o+11],10,-1120210379),u=d(u,n,t,r,e[o+2],15,718787259),r=d(r,u,n,t,e[o+9],21,-343485551),t=t+I>>>0,r=r+R>>>0,u=u+M>>>0,n=n+w>>>0}return F.endian([t,r,u,n])};c._ff=function(a,h,e,g,t,r,u){var n=a+(h&e|~h&g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._gg=function(a,h,e,g,t,r,u){var n=a+(h&g|e&~g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._hh=function(a,h,e,g,t,r,u){var n=a+(h^e^g)+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._ii=function(a,h,e,g,t,r,u){var n=a+(e^(h|~g))+(t>>>0)+u;return(n<<r|n>>>32-r)+h},c._blocksize=16,c._digestsize=16,x.exports=function(a,h){if(a==null)throw new Error("Illegal argument "+a);var e=F.wordsToBytes(c(a,h));return h&&h.asBytes?e:h&&h.asString?i.bytesToString(e):F.bytesToHex(e)}})()),x.exports}var z=k();const O=E(z);export{O as m};
|
package/dist/website/main/assets/{useCacheOssStore-B5wqgiBM.js → useCacheOssStore-KoEbWj57.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aB as h}from"./vendor-core-Do-oxgl9.js";import{E as i}from"./index-
|
|
1
|
+
import{aB as h}from"./vendor-core-Do-oxgl9.js";import{E as i}from"./index-YvDl_1WK.js";const s=new Map,U=h("cacheOssStore",{state:()=>({cacheUrl:{}}),actions:{setCacheUrl(e,t){this.$patch(r=>{r.cacheUrl[e]=t})},getCacheUrl(e){return this.cacheUrl[e]},async getOrFetchSignUrl(e){const t=this.cacheUrl[e];if(t)return t;const r=s.get(e);if(r)return r;const a=i.oss.osscontrollerFilesignurl({objectId:e}).then(n=>{const c=n.data.signUrl;return this.setCacheUrl(e,c),c}).catch(n=>{throw s.delete(e),n}).finally(()=>{s.delete(e)});return s.set(e,a),a}}});export{U as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as fe,C as je,c as ne,f as Ce,B as ge,aa as we,a8 as se,a5 as Ie,as as ze,P as qe,N as Xe,ac as Je,a6 as Re,O as Qe,at as Ze,au as et,I as tt,K as ot,s as Me,u as at,w as nt,t as st,a7 as rt,S as lt}from"./vendor-ui-KquZSIP0.js";import{_ as De,N as r,x as Oe,o as _e,f as pe,E as J,z as it,p as he,K as ct,c as pt,T as ut,m as Pe}from"./index-YvDl_1WK.js";/* empty css *//* empty css */import{I as Y,aS as dt,O as m,Q as P,Y as n,S as Le,aa as mt,P as N,m as h,aA as H,ak as be,R as w,a2 as p,u as i,ad as Ne,aD as ke,j as G,aC as ae,H as Z,af as te,a0 as F,a1 as y,U as Ve,aE as Fe,n as ve,a as z,w as B,L as _t,$ as U,d as ft,aG as Et,E as ht,aF as vt,_ as Ct,W as gt,h as It,l as Tt,aB as Pt}from"./vendor-core-Do-oxgl9.js";import{c as ye,p as Ot}from"./index-Bucicr-O.js";import{_ as $e}from"./EmptyStatusContainer.vue_vue_type_script_setup_true_lang-D9ipEmGE.js";import{v as oe}from"./v4-EwEgHOG0.js";import{u as yt,a as wt,e as Dt,b as X,I as Se,c as bt}from"./useMessage-BLwQdu5o.js";import{u as Ue,_ as Be,a as At}from"./index.vue_vue_type_style_index_0_lang-Digz_UdY.js";import{_ as Lt}from"./BaseDialog.vue_vue_type_script_setup_true_lang-CkNHSg5g.js";import{u as St}from"./useVscodeOpen-DyvB87xz.js";import{D as xt,a as Rt}from"./useTeamHeaders-Bttl7tEb.js";import{_ as Mt}from"./PanelBackground.vue_vue_type_script_setup_true_lang-C8JwSZDA.js";import{_ as Nt}from"./BaseSegmented.vue_vue_type_script_setup_true_lang-QoRVS1cj.js";import{B as kt}from"./BaseBadge-CwPduDSy.js";import{_ as Vt}from"./LoadingWrapper.vue_vue_type_script_setup_true_lang-DYO0UGlK.js";const Ft={key:1,class:"grid-container"},$t=Y({__name:"GridContainer",props:{itemMinWidth:{type:Number,default:300},gap:{type:Number,default:20},useTransition:{type:Boolean,default:!0},useLeaveTransition:{type:Boolean,default:!0}},setup(O){dt(a=>({v435dab90:e.value,v6971b9fd:t.value}));const l=O,t=h(()=>l.gap+"px"),e=h(()=>l.itemMinWidth+"px");return(a,o)=>O.useTransition?(m(),P(mt,{key:0,class:"grid-container",name:"list",tag:"div","leave-active-class":O.useLeaveTransition?void 0:"list-leave-none","leave-to-class":O.useLeaveTransition?void 0:"list-leave-none"},{default:n(()=>[Le(a.$slots,"default",{},void 0,!0)]),_:3},8,["leave-active-class","leave-to-class"])):(m(),N("div",Ft,[Le(a.$slots,"default",{},void 0,!0)]))}}),Ut=De($t,[["__scopeId","data-v-0e1fb53a"]]),Bt={class:"flex justify-between items-center w-full gap-1"},Gt=Y({__name:"PreviewPathItem",props:{modelValue:{},pathConfig:{},cascaderOptions:{},disabled:{type:Boolean}},emits:["change","view"],setup(O,{emit:l}){const t=O,e=l,{t:a}=H(),o={value:"path",label:"name"},c=h(()=>{const f=t.modelValue[t.pathConfig.pathKey];return Array.isArray(f)?f:[]}),E=h(()=>t.modelValue.activeTab===t.pathConfig.type);function T(f){e("change",f??[])}function u(){e("view")}return(f,v)=>{const d=je,S=be("Icon"),M=ne,C=fe;return m(),P(C,{label:O.pathConfig.label+":",prop:O.pathConfig.prop},{default:n(()=>[w("div",Bt,[p(d,{class:"flex-1","model-value":c.value,options:O.cascaderOptions,props:o,placeholder:i(a)("comp.pleaseSelectPreviewFile"),clearable:O.pathConfig.clearable,onChange:T},null,8,["model-value","options","placeholder","clearable"]),p(M,{type:E.value?"primary":"info",circle:"",disabled:O.disabled,onClick:Ne(u,["stop"])},{default:n(()=>[p(S,{icon:"material-symbols:eye-tracking"})]),_:1},8,["type","disabled"])])]),_:1},8,["label","prop"])}}}),Yt={class:"text-right"},Ht=Y({__name:"Item",props:Fe({index:{}},{modelValue:{default:()=>({_id:"",desc:"",miniPath:[],fullPath:[],activeTab:r.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:"",fullEntryUrl:""})},modelModifiers:{}}),emits:["update:modelValue"],setup(O,{expose:l}){const t={LOCAL_PREFIX:r.COMP_PREVIEW_PREFIX_LOCAL,ALLOWED_EXTENSIONS:[".vue",".jsx",".tsx"]},e=O,a=ke(O,"modelValue"),{t:o}=H(),c=G(r.PROVIDE_KEY_COMP_EDIT_STORE),E=ae("form"),T=h(()=>c.compCarouselIndex===f.value),u=h(()=>e.index===0),f=h(()=>c.previewList.findIndex(I=>I._id===a.value._id)),v=h(()=>c.selectedFolder?.path),d=h(()=>c.directory?Oe.mapTree(c.directory,D=>{const k=D.type==="file"&&t.ALLOWED_EXTENSIONS.some($=>D.name.endsWith($));return D.disabled=D.type==="file"&&!k,D}).children??[]:[]),S=h(()=>u.value?{miniPath:[{required:!0,validator:(I,D,k)=>{!D||D.length===0?k(new Error(o("comp.pleaseSelectPreviewFile"))):k()},trigger:"blur"}]}:{}),M=h(()=>[{type:r.COMP_EDIT_TAB_TYPE_MINI,label:o("comp.miniPreviewFile"),prop:u.value?"miniPath":"",pathKey:"miniPath",urlKey:"miniEntryUrl",clearable:!u.value},{type:r.COMP_EDIT_TAB_TYPE_FULL,label:o("comp.fullPreviewFile"),prop:"fullPath",pathKey:"fullPath",urlKey:"fullEntryUrl",clearable:!0}]);function C(I){if(!I.length)return"";const D=c.isOnlineUpdate||c.isAddComp,k=c.isOfflineUpdate&&c.editCompId;if(D){const $=_e.getPreviewUrl(v.value,I);return`${t.LOCAL_PREFIX}/${$}`}return k?x(I):""}function x(I){const k=ye(c.editCompId)().latestVersionToFileAccessPath,$=new Map(k.map(({path:j,signedUrl:re})=>[j,re])),W=pe.replaceBackslashWithSlash(I.at(-1)??"");return $.get(W)??""}function L(I){a.value={...a.value,desc:I}}function V(){c.setCompCarouselIndex(f.value)}function b(I){a.value={...a.value,activeTab:I}}async function s(I,D){const k=D??[],$=C(k),W={[r.COMP_EDIT_TAB_TYPE_MINI]:{miniPath:k,miniEntryUrl:$},[r.COMP_EDIT_TAB_TYPE_FULL]:{fullPath:k,fullEntryUrl:$}};a.value={...a.value,...W[I]},I===r.COMP_EDIT_TAB_TYPE_MINI&&u.value&&(await ve(),E.value?.validateField("miniPath"))}function _(){a.value._id&&c.delPreviewCompItemById(a.value._id)}function g(){return E.value?.validate()}return l({validateForm:g}),(I,D)=>{const k=ge,$=fe,W=Ce,j=ne,re=we;return m(),P(re,{"body-class":"!p-0",class:Ve(["cursor-pointer p-[5px] overflow-auto",{active:T.value}]),onClick:V},{default:n(()=>[p(W,{ref:"form",model:a.value,rules:S.value,"label-width":"auto"},{default:n(()=>[(m(!0),N(Z,null,te(M.value,ee=>(m(),P(Gt,{key:ee.type,modelValue:a.value,"onUpdate:modelValue":D[0]||(D[0]=le=>a.value=le),"path-config":ee,"cascader-options":d.value,disabled:!T.value,onChange:le=>s(ee.type,le),onView:()=>b(ee.type)},null,8,["modelValue","path-config","cascader-options","disabled","onChange","onView"]))),128)),p($,{label:i(o)("comp.remarkDesc")+":"},{default:n(()=>[p(k,{"model-value":a.value.desc,type:"textarea",onInput:L},null,8,["model-value"])]),_:1},8,["label"])]),_:1},8,["model","rules"]),w("div",Yt,[p(j,{type:"danger",disabled:u.value,onClick:Ne(_,["stop"])},{default:n(()=>[F(y(i(o)("common.delete")),1)]),_:1},8,["disabled"])])]),_:1},8,["class"])}}}),Kt=De(Ht,[["__scopeId","data-v-ce18658f"]]),Wt={class:"size-full overflow-auto flex flex-col gap-2 items-start"},jt=Y({__name:"index",setup(O){const{t:l}=H(),t=G(r.PROVIDE_KEY_COMP_EDIT_STORE),e=G(r.PROVIDE_KEY_CALLBACKS),a=ae("items");async function o(){if(t.previewList.length>=5){Ie.error(l("comp.maxPreviewEntry",{n:5}));return}t.addPreviewCompItem({_id:oe(),miniPath:[],fullPath:[],activeTab:r.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:"",fullEntryUrl:""}),await ve(),t.setCompCarouselIndex(t.previewList.length-1)}function c(E){const{_id:T}=E;T&&t.updatePreviewCompItemById(T,E)}return e.set(r.COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM,()=>{a.value?.forEach(E=>{E?.validateForm()})}),(E,T)=>{const u=ne,f=se;return m(),N("div",Wt,[p(u,{type:"primary",onClick:o},{default:n(()=>[F(y(i(l)("comp.addPreviewEntry")),1)]),_:1}),p(f,{class:"flex-1 overflow-x-hidden size-full pr-3"},{default:n(()=>[p(i($e),{class:"size-full",isEmpty:!i(t).previewList.length,emptyDescription:i(l)("comp.pleaseAddPreviewEntry")},{default:n(()=>[p(i(Ut),{"item-min-width":350},{default:n(()=>[(m(!0),N(Z,null,te(i(t).previewList,(v,d)=>(m(),P(Kt,{ref_for:!0,ref:"items",key:v._id,index:d,"model-value":v,"onUpdate:modelValue":c},null,8,["index","model-value"]))),128))]),_:1})]),_:1},8,["isEmpty","emptyDescription"])]),_:1})])}}}),zt={class:"flex flex-col gap-2 w-full"},qt={class:"w-full max-w-80 aspect-[16/10] border border-dashed border-[var(--el-border-color)] rounded flex items-center justify-center overflow-hidden bg-[var(--el-fill-color-light)]"},Xt={key:1,class:"flex flex-col items-center gap-2"},Jt={class:"text-xs text-gray-400 text-center px-2"},Qt={class:"flex items-center gap-2"},Zt={class:"text-[#909399] text-xs mt-1"},eo={class:"text-[#909399] text-xs mt-1"},to=Y({__name:"ExtraInfo",setup(O){const{t:l}=H(),t=G(r.PROVIDE_KEY_COMP_EDIT_STORE),e=G(r.PROVIDE_KEY_CALLBACKS),a=ae("form"),o=z(200),c=z([...t.extraInfo.tags||[]]),E=z([]),T=z(!1),u=z(oe()),f=h(()=>{const _=t.selectedFolder?.path;if(!_)return"";const g=_.replace(r.FILE_MANAGER_DIRNAME||"","").replace(/\\/g,"/"),I=g.startsWith("/")?g.slice(1):g;return`${r.COMP_PREVIEW_PREFIX_LOCAL}/${I}/${r.COMP_SCREENSHOT_MINI_FILENAME}?t=${u.value}`});function v(){t.setPreviewImageExists(!1)}function d(){t.setPreviewImageExists(!0)}B(()=>t.screenshotTimestamp,_=>{_&&(u.value=oe())});async function S(_){const g=_.raw;if(!g)return;const I=t.selectedFolder?.path;if(I)try{const k=(await new Promise(($,W)=>{const j=new FileReader;j.onload=()=>$(j.result),j.onerror=W,j.readAsDataURL(g)})).replace(/^data:image\/\w+;base64,/,"");await J.comp.compcontrollerWritefile({compPath:I,filename:r.COMP_SCREENSHOT_MINI_FILENAME,content:k}),u.value=oe(),t.setPreviewImageExists(!0)}catch{}}function M(){t.triggerManualScreenshot()}async function C(_){T.value=!0;const I=(await it.v1Comp.compcontrollerTags({keyword:_})).data?.rows??[];E.value=I.map(D=>({value:D,label:D})),T.value=!1}const x={name:[{required:!0,validator:(_,g,I)=>{if(!g)return I(new Error(l("comp.compNameRequired")));pe.validateCompName(g)?I():I(new Error(l("comp.compNameNamingRule")))},trigger:["blur"]}],description:[{required:!0,message:l("comp.remarksDescRequired"),trigger:"blur"},{min:3,max:o.value,message:l("comp.lengthBetween",{min:3,max:o.value}),trigger:"blur"}],tags:[{validator:(_,g,I)=>{if(!g||!Array.isArray(g)||g.length===0)return I();const D=pe.validateTags(g);D.valid?I():I(new Error(l(`comp.${D.error}`)))},trigger:["blur","change"]}]},L=h(()=>t.selectedFolder.basename);async function V(){await a.value?.validate()}function b(_){t.setExtraInfo({...t.extraInfo,description:_.trim()})}function s(_){t.setExtraInfo({...t.extraInfo,name:_.trim()})}return _t(()=>{u.value=oe()}),B(c,_=>{const g=pe.normalizeTags(_),I=t.extraInfo.tags||[];g.join(",")!==I.join(",")&&t.setExtraInfo({...t.extraInfo,tags:g})}),B(()=>t.extraInfo.tags,_=>{const g=_||[];g.join(",")!==c.value.join(",")&&(c.value=[...g])}),B(L,_=>{t.extraInfo.name||t.setExtraInfo({...t.extraInfo,name:_})},{immediate:!0}),e.set(r.COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM,V),(_,g)=>{const I=ge,D=fe,k=ze,$=ne,W=qe,j=Je,re=Xe,ee=Ce,le=se;return m(),P(le,{class:"size-full pr-3"},{default:n(()=>[p(ee,{ref:"form","label-width":"auto",model:i(t).extraInfo,rules:x},{default:n(()=>[p(D,{label:i(l)("comp.name")+":",prop:"name"},{default:n(()=>[p(I,{maxlength:50,"show-word-limit":"","model-value":i(t).extraInfo.name,placeholder:i(l)("comp.pleaseInputCompName"),onInput:s},null,8,["model-value","placeholder"])]),_:1},8,["label"]),p(D,{label:i(l)("comp.remarksDesc")+":",prop:"description"},{default:n(()=>[p(I,{maxlength:o.value,"show-word-limit":"","model-value":i(t).extraInfo.description,placeholder:i(l)("comp.pleaseInputRemarks"),rows:4,type:"textarea",onInput:b},null,8,["maxlength","model-value","placeholder"])]),_:1},8,["label"]),i(t).isOfflineUpdate?U("",!0):(m(),P(D,{key:0,label:i(l)("comp.previewImage")+":",prop:"previewImage",class:Ve({"is-required":!0})},{default:n(()=>[w("div",zt,[w("div",qt,[f.value?(m(),P(k,{key:u.value,src:f.value,"preview-src-list":[f.value],fit:"contain",class:"w-full h-full",onError:v,onLoad:d},null,8,["src","preview-src-list"])):(m(),N("div",Xt,[g[1]||(g[1]=w("span",{class:"text-3xl opacity-30"},"🖼",-1)),w("span",Jt,y(i(l)("comp.previewImageHint")),1)]))]),w("div",Qt,[p(W,{class:"preview-upload","show-file-list":!1,"auto-upload":!1,accept:"image/png","on-change":S},{default:n(()=>[p($,{type:"primary",plain:"",size:"small"},{default:n(()=>[F(y(i(l)("comp.uploadPreviewImage")),1)]),_:1})]),_:1}),p($,{type:"success",plain:"",size:"small",onClick:M},{default:n(()=>[F(y(i(l)("comp.generateScreenshot")),1)]),_:1})]),w("div",Zt,y(i(l)("comp.previewImageFallbackHint")),1)])]),_:1},8,["label"])),p(D,{label:i(l)("comp.tags")+":",prop:"tags"},{default:n(()=>[p(re,{modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=ie=>c.value=ie),multiple:"",filterable:"",remote:"","allow-create":"","default-first-option":"","reserve-keyword":!1,"remote-method":C,loading:T.value,placeholder:i(l)("comp.pleaseInputTags"),class:"w-full"},{default:n(()=>[(m(!0),N(Z,null,te(E.value,ie=>(m(),P(j,{key:ie.value,label:ie.label,value:ie.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","placeholder"]),w("div",eo,y(i(l)("comp.tagsHelp")),1)]),_:1},8,["label"])]),_:1},8,["model"])]),_:1})}}}),oo={class:"flex items-center gap-[50px]"},ao=Y({__name:"Dir",setup(O){const l={children:"children",label:"name"},t=G(r.PROVIDE_KEY_COMP_EDIT_STORE),e=z([]);return B(()=>t.directory,a=>{a?.children&&(e.value=Re(a.children))},{deep:!0,immediate:!0}),(a,o)=>{const c=Qe,E=se;return m(),P(E,{class:"size-full tree-container"},{default:n(()=>[p(c,{data:e.value,props:l},{default:n(({node:T})=>[w("div",oo,[w("span",null,y(T.label),1)])]),_:1},8,["data"])]),_:1})}}}),no={class:"flex gap-[10px] items-center justify-center"},so={class:"inline-block"},ro={key:0,class:"flex items-center justify-center text-[20px] font-bold text-gray-500"},lo={class:"inline-block"},io={class:"size-full flex justify-center items-center"},co={class:"inline-block"},po={class:"flex gap-2"},uo={key:0},mo={class:"ml-auto"},_o=Y({__name:"Deps",setup(O){const{t:l}=H(),t=h(()=>({TITLE_LOCAL:l("comp.localDep"),TITLE_ONLINE:l("comp.onlineDep"),TITLE_FINAL:l("comp.finalDep"),LABEL_LOCAL:l("comp.localVersion"),LABEL_ONLINE:l("comp.onlineVersion"),EMPTY_ONLINE_DEPS:l("comp.onlineDepEmpty"),TAG_CONSISTENT:l("comp.versionConsistent"),TAG_CHANGE:l("comp.versionChange"),TAG_CHANGE_CONFIRMED:l("comp.versionChangeConfirmed"),TAG_ADD:l("comp.newDep"),TYPE_CONSISTENT:"consistent",TYPE_CHANGE:"change",TYPE_ADD:"add",SOURCE_LOCAL:"local",SOURCE_ONLINE:"online"})),e=G(r.PROVIDE_KEY_COMP_EDIT_STORE),a=z({}),o=h(()=>_e.handleDepData(e.compDep)),c=h(()=>_e.handleDepData(e.onlineCompDep)),E=h(()=>{const f={};return c.value.length===0&&e.isEditComp||o.value.forEach(v=>{const d={},S=c.value.find(M=>M.name===v.name);S?he.isVersionEqual(v.version??"",S.version??"")?(d.selectedVersion=v.version,d.type=t.value.TYPE_CONSISTENT):(d.type=t.value.TYPE_CHANGE,d.selectedVersion=a.value[v.name]||"",d.versions=[{version:v.version,type:t.value.SOURCE_LOCAL},{version:S.version,type:t.value.SOURCE_ONLINE}]):(d.selectedVersion=a.value[v.name]||(e.isEditComp?"":v.version),d.type=t.value.TYPE_ADD,d.versions=[{version:v.version,type:t.value.SOURCE_LOCAL}]),f[v.name]=d}),f}),T=h(()=>Object.keys(c.value).length===0);function u(f,v){a.value[f]=v}return B(()=>E.value,f=>{for(const v in f){const d=f[v];d.type!==t.value.TYPE_CHANGE&&(d.type===t.value.TYPE_ADD&&e.isEditComp||(a.value[v]=d.selectedVersion))}},{immediate:!0,deep:!0}),ft(()=>{e.setAffirmCompDep(Re(a.value))}),(f,v)=>{const d=et,S=Ze,M=we,C=ot,x=tt,L=Me,V=se;return m(),P(V,{class:"size-full"},{default:n(()=>[w("div",no,[p(M,{"body-class":"!p-0",class:"p-[5px]"},{default:n(()=>[w("div",null,[p(S,{title:t.value.TITLE_LOCAL,column:1,border:"","label-width":"auto"},{default:n(()=>[(m(!0),N(Z,null,te(o.value,(b,s)=>(m(),P(d,{key:s},{label:n(()=>[w("div",so,y(b.name),1)]),default:n(()=>[F(" "+y(b.version),1)]),_:2},1024))),128))]),_:1},8,["title"])])]),_:1}),T.value?U("",!0):(m(),N("div",ro,"+")),T.value?U("",!0):(m(),P(M,{key:1,"body-class":"!p-0",class:"p-[5px]"},{default:n(()=>[p(i($e),{isEmpty:T.value,class:"size-full"},{"empty-content":n(()=>[w("div",io,y(t.value.EMPTY_ONLINE_DEPS),1)]),default:n(()=>[p(S,{title:t.value.TITLE_ONLINE,column:1,border:"","label-width":"auto"},{default:n(()=>[(m(!0),N(Z,null,te(c.value,(b,s)=>(m(),P(d,{key:s},{label:n(()=>[w("div",lo,y(b.name),1)]),default:n(()=>[F(" "+y(b.version),1)]),_:2},1024))),128))]),_:1},8,["title"])]),_:1},8,["isEmpty"])]),_:1})),v[0]||(v[0]=w("div",{class:"flex items-center justify-center text-[20px] font-bold text-gray-500"},"=",-1)),p(M,{"body-class":"!p-0 !overflow-hidden",class:"p-[5px] overflow-hidden"},{default:n(()=>[p(S,{title:t.value.TITLE_FINAL,column:1,border:"","label-width":"auto"},{default:n(()=>[(m(!0),N(Z,null,te(E.value,(b,s)=>(m(),P(d,{key:s},{label:n(()=>[w("div",co,y(s),1)]),default:n(()=>[w("div",po,[w("div",null,[b.versions?.length?(m(),P(x,{key:1,"model-value":b.selectedVersion,size:"small",class:"ml-[10px]",onChange:_=>u(s,_)},{default:n(()=>[(m(!0),N(Z,null,te(b.versions,_=>(m(),P(C,{key:_.version,value:_.version},{default:n(()=>[w("span",null,y(_.type===t.value.SOURCE_LOCAL?t.value.LABEL_LOCAL:t.value.LABEL_ONLINE)+" "+y(_.version),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["model-value","onChange"])):(m(),N("span",uo,y(b.selectedVersion),1))]),w("div",mo,[b.type===t.value.TYPE_CONSISTENT?(m(),P(L,{key:0,type:"info","disable-transitions":""},{default:n(()=>[F(y(t.value.TAG_CONSISTENT),1)]),_:1})):b.type===t.value.TYPE_CHANGE&&!b.selectedVersion?(m(),P(L,{key:1,type:"danger","disable-transitions":""},{default:n(()=>[F(y(t.value.TAG_CHANGE),1)]),_:1})):b.type===t.value.TYPE_CHANGE&&b.selectedVersion?(m(),P(L,{key:2,type:"success","disable-transitions":""},{default:n(()=>[F(y(t.value.TAG_CHANGE_CONFIRMED),1)]),_:1})):b.type===t.value.TYPE_ADD&&!b.selectedVersion?(m(),P(L,{key:3,type:"danger","disable-transitions":""},{default:n(()=>[F(y(t.value.TAG_ADD),1)]),_:1})):b.type===t.value.TYPE_ADD&&b.selectedVersion?(m(),P(L,{key:4,type:"success","disable-transitions":""},{default:n(()=>[F(y(t.value.TAG_ADD),1)]),_:1})):U("",!0)])])]),_:2},1024))),128))]),_:1},8,["title"])]),_:1})])]),_:1})}}}),fo={class:"flex items-center gap-[4px]"},Eo={key:0},ho=Y({__name:"VersionInput",props:Fe({disabled:{type:Boolean},latestVersion:{}},{modelValue:{default:()=>({major:"",minor:"",patch:""})},modelModifiers:{}}),emits:["update:modelValue"],setup(O){const l=O,t=ke(O,"modelValue"),{t:e}=H(),a=["major","minor","patch"],o={width:"60px"};function c(u){return`${u.major}.${u.minor}.${u.patch}`}function E(u,f){const v={...t.value,[f]:u},d=c(v);if(T(d)){Ie.warning(e("comp.versionCannotBeLessThanLatest",{version:l.latestVersion}));return}t.value=v}function T(u){return l.latestVersion?he.compareVersions(u,l.latestVersion)===r.VERSION_COMPARE_LESS:!1}return(u,f)=>{const v=ge;return m(),N("div",fo,[(m(),N(Z,null,te(a,(d,S)=>(m(),N(Z,{key:d},[p(v,{"model-value":t.value[d],style:o,min:0,size:"small",type:"number",disabled:O.disabled,onInput:M=>E(M,d)},null,8,["model-value","disabled","onInput"]),S<a.length-1?(m(),N("span",Eo,".")):U("",!0)],64))),64))])}}}),vo={class:"flex gap-2 items-center"},Co={key:0},go={class:"flex items-center gap-2"},Io={key:0},To={class:"text-red-500"},Po=Y({__name:"index",emits:["show-diff"],setup(O){const{t:l}=H(),t=G(r.PROVIDE_KEY_COMP_EDIT_STORE),e=G(r.PROVIDE_KEY_CALLBACKS),a=z({major:"",minor:"",patch:""}),o=h(()=>t.selectedFolder?.path??""),c=h(()=>t.configStatus?.compJsonPath??""),E=h(()=>t.configStatus?.entryIndexPath??""),T=h(()=>t.configStatus?.errorMsg??""),u=h(()=>t.isNeedAddVersion||t.isEditCompFileChange);async function f(){if(!t.framework)return;const C=await J.comp.compcontrollerCheck({compPath:o.value,framework:t.framework});t.setConfigStatus(C.data)}async function v(){await J.comp.compcontrollerGeneratecompjson({compPath:o.value});const C=await J.comp.compcontrollerDir({compPath:o.value}),{tree:x,files:L}=C.data;t.setOriginalDirectory(x),t.setOriginalDirectoryList(L),await f(),Ie.success(l("common.generateSuccess"))}function d(C){const[x="1",L="0",V="0"]=C.split(".");return{major:x,minor:L,patch:V}}function S(C){const{major:x,minor:L,patch:V}=C,b=["undefined","null"];return![x,L,V].some(s=>s===""||ct.isType(s,b))}function M(C){return`${C.major}.${C.minor}.${C.patch}`}return B(a,async(C,x)=>{if(!S(C))return;const L=M(C),V=x?M(x):"";L!==V&&(await J.comp.compcontrollerUpdateversion({compPath:o.value,version:L}),await f(),t.setLocalCompVersion(L))},{deep:!0}),B(()=>t.localCompVersion,C=>{C&&(a.value=d(C))},{immediate:!0}),e.set(r.COMP_METHOD_KEY_CHECK_COMP_CONFIG,f),(C,x)=>{const L=fe,V=ne,b=Me,s=Ce,_=se;return m(),P(_,{class:"size-full"},{default:n(()=>[p(s,{"label-width":"auto"},{default:n(()=>[p(L,{label:i(l)("comp.entryFile")+":"},{default:n(()=>[w("span",null,y(E.value),1)]),_:1},8,["label"]),p(L,{label:i(l)("comp.configFile")+":"},{default:n(()=>[w("div",vo,[c.value?(m(),N("span",Co,y(c.value),1)):(m(),P(V,{key:1,size:"small",onClick:v},{default:n(()=>[F(y(i(l)("common.generate")),1)]),_:1})),T.value&&c.value?(m(),P(V,{key:2,size:"small",onClick:v},{default:n(()=>[F(y(i(l)("common.regenerate")),1)]),_:1})):U("",!0)])]),_:1},8,["label"]),p(L,{label:i(l)("comp.version")+":"},{default:n(()=>[w("div",go,[p(ho,{modelValue:a.value,"onUpdate:modelValue":x[0]||(x[0]=g=>a.value=g),"latest-version":i(t).prodCompVersion,disabled:!i(t).compFileIsChange},null,8,["modelValue","latest-version","disabled"]),u.value?(m(),N("div",Io,[i(t).isNeedAddVersion?(m(),P(b,{key:0,type:"danger","disable-transitions":!0},{default:n(()=>[F(y(i(l)("comp.fileChangedNeedVersion")),1)]),_:1})):U("",!0),i(t).isEditCompFileChange?(m(),P(V,{key:1,size:"small",class:"ml-2",onClick:x[1]||(x[1]=g=>C.$emit("show-diff"))},{default:n(()=>[F(y(i(l)("comp.viewFileChanges")),1)]),_:1})):U("",!0)])):i(t).isVersionChangeButFileSame?(m(),P(b,{key:1,type:"danger","disable-transitions":!0},{default:n(()=>[F(y(i(l)("comp.versionChangedButFileSame")),1)]),_:1})):U("",!0)])]),_:1},8,["label"]),T.value?(m(),P(L,{key:0,label:i(l)("comp.errorMsg")+":"},{default:n(()=>[w("span",To,y(T.value),1)]),_:1},8,["label"])):U("",!0)]),_:1})]),_:1})}}}),Oo=Y({__name:"UpgradeLog",setup(O){const{t:l}=H(),t=G(r.PROVIDE_KEY_COMP_EDIT_STORE),e=G(r.PROVIDE_KEY_CALLBACKS),a=z(200),o=ae("form"),c=h(()=>({upgradeLog:[{required:!0,message:l("comp.pleaseInputUpgradeLog"),trigger:"blur"},{min:3,max:a.value,message:l("comp.lengthBetween",{min:3,max:a.value}),trigger:"blur"}]}));function E(u){t.setUpgradeInfo({...t.upgradeInfo,upgradeLog:u})}async function T(){await o.value?.validate()}return e.set(r.COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM,T),(u,f)=>{const v=ge,d=fe,S=se;return m(),P(S,{class:"size-full"},{default:n(()=>[p(i(Ce),{ref:"form","label-width":"auto",model:i(t).upgradeInfo,rules:c.value},{default:n(()=>[p(d,{label:i(l)("comp.upgradeLog")+":",prop:"upgradeLog"},{default:n(()=>[p(v,{maxlength:a.value,"show-word-limit":"","model-value":i(t).upgradeInfo.upgradeLog,placeholder:i(l)("comp.pleaseInputUpgradeLog"),rows:4,type:"textarea",onInput:E},null,8,["maxlength","model-value","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1})}}}),yo={class:"size-full"},wo=["src"],Do=Y({__name:"index",props:{compType:{},iuid:{}},setup(O){const l=O,t=G(r.PROVIDE_KEY_COMP_EDIT_STORE),e=G(r.PROVIDE_KEY_CALLBACKS),{IFRAME_POST_MESSAGE_TYPE:a}=Dt,{locale:o}=H(),c=pt(),{instanceUid:E,messageListener:T,sendMessageToTargetIframe:u}=bt(),f=yt(!1,window.__GLOBAL_CONFIG__.subPort),{createIframeParams:v}=wt(),{addListener:d}=T(),M=at().value,C=ae("iframe"),x=z(!1),L=h(()=>t.selectedFolder?.path),V=(()=>{const s={topOrigin:window.location.origin,instanceUid:[E.value,l.iuid].filter(Boolean).join(",")??"",isSfc:!0},_={params:v(s),isDark:M.toString()},g=new URLSearchParams(_).toString();return`${f}/${r.WEBSITE_PATH_ITEM}/${l.compType}?${g}`})();async function b(){const _=Ot(t.compDep,c.deps).map(D=>D.name),g=await J.module.modulecontrollerPrebuild({deps:_}),{entryNameToFile:I={}}=g.data;return I}return d(a.COMP_PREVIEW_LIST_GET,X(h(()=>t.previewList),()=>{const s=C.value?.contentWindow;s&&u(s,a.COMP_PREVIEW_LIST_SET,t.previewList,f)}).triggerCallback),d(a.SELECTED_FOLDER_GET,X(h(()=>t.selectedFolder),()=>{const s=C.value?.contentWindow;s&&u(s,a.SELECTED_FOLDER_SET,t.selectedFolder,f)}).triggerCallback),d(a.COMP_RENDER_INFO_GET,X(h(()=>t.compDep),async()=>{if(t.compDep.length===0)return;const s=C.value?.contentWindow;if(s){const _=await b();u(s,a.COMP_RENDER_INFO_SET,{entryNameToFile:_,compDep:t.compDep,signedUrls:t.signedUrls,framework:t.framework},f)}}).triggerCallback),d(a.SHOW_REFRESH_BTN_GET,X(h(()=>t.isShowRefreshBtn),()=>{const s=C.value?.contentWindow;s&&u(s,a.SHOW_REFRESH_BTN_SET,t.isShowRefreshBtn,f)}).triggerCallback),d(a.IS_ONLINE_UPDATE_GET,X(h(()=>t.isOnlineUpdate),()=>{const s=C.value?.contentWindow;s&&u(s,a.IS_ONLINE_UPDATE_SET,t.isOnlineUpdate,f)}).triggerCallback),d(a.IS_ADD_GET,X(h(()=>t.isAddComp),()=>{const s=C.value?.contentWindow;s&&u(s,a.IS_ADD_SET,t.isAddComp,f)}).triggerCallback),d(a.CAROUSEL_INDEX_GET,X(h(()=>t.compCarouselIndex),()=>{const s=C.value?.contentWindow;s&&u(s,a.CAROUSEL_INDEX_SET,t.compCarouselIndex,f)}).triggerCallback),d(a.BG_COLOR_GET,X(h(()=>t.compBgColor),()=>{const s=C.value?.contentWindow;s&&u(s,a.BG_COLOR_SET,t.compBgColor,f)}).triggerCallback),d(a.COMP_EDIT_TAB_TYPE_SET,s=>{s._id&&t.updatePreviewCompItemById(s._id,s)}),d(a.ACTION_REFRESH,s=>{if(s.activeTab===r.COMP_EDIT_TAB_TYPE_MINI&&s.miniPath?.length){const _=_e.getPreviewUrl(L?.value||"",s.miniPath),g=_?`${r.COMP_PREVIEW_PREFIX_LOCAL}/${_}?v=${oe()}`:"";t.updatePreviewCompItemById(s._id,{...s,miniEntryUrl:g})}if(s.activeTab===r.COMP_EDIT_TAB_TYPE_FULL&&s.fullPath?.length){const _=_e.getPreviewUrl(L?.value||"",s.fullPath||[]),g=_?`${r.COMP_PREVIEW_PREFIX_LOCAL}/${_}?v=${oe()}`:"";t.updatePreviewCompItemById(s._id,{...s,fullEntryUrl:g})}}),d(a.BG_COLOR_SET,s=>{t.setCompBgColor(s)}),d(a.LOCALE_GET,()=>{const{stopWatch:s,triggerCallback:_}=X(h(()=>o.value),()=>{const g=C.value?.contentWindow;g?u(g,a.LOCALE_SET,o.value,f):s()});_()}),d(a.COMP_RENDER_ERROR_SET,({hasError:s,hasWarn:_})=>{x.value=s||_}),d(a.COMP_SCREENSHOT_AUTO,async s=>{if(t.isOfflineUpdate)return;const _=s?.screenshot;if(!(!_||!L.value))try{await J.comp.compcontrollerWritefile({compPath:L.value,filename:r.COMP_SCREENSHOT_MINI_FILENAME,content:_.replace(/^data:image\/\w+;base64,/,"")}),t.setPreviewImageExists(!0),t.refreshScreenshot()}catch{}}),d(Se.SETTING_DATA_LEAF_GET,X(h(()=>c.deps),()=>{const s=C.value?.contentWindow;s&&u(s,Se.SETTING_DATA_LEAF_SET,c.deps,f)}).triggerCallback),B(x,s=>{s?e.set(r.COMP_METHOD_KEY_GET_COMP_ERROR,()=>!0):e.delete(r.COMP_METHOD_KEY_GET_COMP_ERROR)},{immediate:!0}),B(()=>t.manualScreenshotTrigger,s=>{if(!s)return;t.setCompCarouselIndex(0);const _=C.value?.contentWindow;_&&u(_,a.COMP_SCREENSHOT_MANUAL_SET,null,f)}),(s,_)=>(m(),N("div",yo,[w("iframe",{ref:"iframe",class:"size-full",src:i(V),frameborder:"0"},null,8,wo)]))}}),xe=Y({__name:"MarkdownPreview",props:{result:{}},setup(O){const{t:l}=H(),t=Et(),{markdownSrc:e}=Ue();function a(){const{href:o}=t.resolve({name:"mdPreview",query:{markdownSrc:e.value}});window.open(o,"_blank")}return(o,c)=>{const E=be("Icon"),T=ne,u=se;return m(),P(u,{"wrap-class":"md-container",class:"relative pr-3"},{default:n(()=>[i(e)?(m(),P(T,{key:0,type:"primary",circle:"",title:i(l)("common.newPage"),class:"absolute top-0 right-3 z-100",onClick:a},{default:n(()=>[p(E,{icon:"material-symbols:screen-share-rounded"})]),_:1},8,["title"])):U("",!0),p(Be,{result:O.result,src:i(e),"show-toc":!0,scrollContainer:".md-container","is-debug":!0},null,8,["result","src"])]),_:1})}}}),bo=O=>{const{locale:l}=H();return{src:h(()=>`/${r.WEBSITE_PATH_MAIN}/md/${O.replace(".md",`.${l.value}.md`)}`)}},Ao={class:"h-[70vh] overflow-hidden flex flex-col"},Lo={key:0,class:"flex justify-end"},So={class:"text-lg"},xo={class:"text-lg"},Ro=Y({__name:"index",props:{isAction:{type:Boolean,default:!0}},setup(O,{expose:l}){const{t}=H(),e=z(!1),{src:a}=bo("PUT_TREATY.md");let o;function c(u){e.value=!0,o=u}function E(){e.value=!1}function T(u){o?.(u),E()}return l({open:c,close:E}),(u,f)=>{const v=se,d=ne;return m(),P(i(Lt),{modelValue:e.value,"onUpdate:modelValue":f[2]||(f[2]=S=>e.value=S),title:"",width:"55%","show-close":"",top:"10vh"},{default:n(()=>[w("div",Ao,[p(v,{class:"flex-1 flex justify-center"},{default:n(()=>[p(Be,{src:i(a)},null,8,["src"])]),_:1}),O.isAction?(m(),N("div",Lo,[p(d,{onClick:f[0]||(f[0]=S=>T(!1))},{default:n(()=>[w("span",So,y(i(t)("team.reject")),1)]),_:1}),p(d,{type:"primary",onClick:f[1]||(f[1]=S=>T(!0))},{default:n(()=>[w("span",xo,y(i(t)("team.agree")),1)]),_:1})])):U("",!0)])]),_:1},8,["modelValue"])}}}),Mo={class:"size-full"},No={class:"flex justify-between mt-auto items-center p-1"},ko={class:"flex gap-2 items-center"},Vo={class:"text-xs"},Fo={class:"flex-1 overflow-hidden p-2"},$o={class:"flex justify-center p-1"},Uo=Y({__name:"index",emits:["confirmUpload","reload"],setup(O,{emit:l}){const t=l,{t:e}=H(),a=It(),o=G(r.PROVIDE_KEY_COMP_EDIT_STORE),c=ae("compIframeEditRef"),E=Tt(new Map);ht(r.PROVIDE_KEY_CALLBACKS,E);const T=ae("diffDialog"),u=ae("dialogPutTreaty"),{openCompPathInVscode:f}=St(),{buildDiffTree:v}=Rt(),d=z([]),S=h(()=>o.selectedFolder?.path),M=h(()=>!o.isOnlineUpdate||!o.editCompId?null:ye(o.editCompId)()),C=h(()=>o.isOnlineUpdate?M.value?.localCompInfo[0]?.fullPath??"":o.isAddComp?o.compFolderFullPath:""),x=h(()=>C.value);function L(){C.value&&f(C.value,`./${r.COMP_CONFIG_FILENAME}`)}const V=h(()=>({version:e("comp.remoteVersionPrefix")+o.prodCompVersion})),b=h(()=>({version:e("comp.localVersionPrefix")+o.localCompVersion})),{markdownSrc:s}=Ue(),_=At(s),g=h(()=>[{label:e("comp.previewConfig"),value:r.TAB_TYPE_PREVIEW,isDot:o.previewIsError,component:jt,visible:()=>!0,validate:()=>o.previewIsError?{valid:!1,callbackKey:r.COMP_METHOD_KEY_CHECK_PREVIEW_LIST_FORM}:{valid:!0}},{label:e("comp.baseInfo"),value:r.TAB_TYPE_EXTRA,isDot:o.extraIsError,component:to,visible:()=>!0,validate:()=>o.extraIsError?{valid:!1,callbackKey:r.COMP_METHOD_KEY_CHECK_EXTRA_INFO_FORM}:{valid:!0}},{label:e("comp.checkConfig"),value:r.TAB_TYPE_CONFIG,isDot:o.configIsError,component:Po,visible:()=>o.isOnlineUpdate||o.isAddComp,validate:()=>o.configIsError?{valid:!1,callbackKey:r.COMP_METHOD_KEY_CHECK_COMP_CONFIG}:{valid:!0}},{label:e("comp.dep"),value:r.TAB_TYPE_DEPS,isDot:o.compDepIsError,component:_o,visible:()=>o.isOnlineUpdate||o.isAddComp,validate:()=>o.compDepIsError?{valid:!1}:{valid:!0}},{label:e("comp.upgradeLog"),value:r.TAB_TYPE_UPGRADE_LOG,isDot:o.upgradeLogIsError,component:Oo,visible:()=>o.isShowUpgradeLogTab,validate:()=>o.upgradeLogIsError?{valid:!1,callbackKey:r.COMP_METHOD_KEY_CHECK_UPGRADE_LOG_FORM}:{valid:!0}},{label:"README.md",value:r.TAB_TYPE_README,isDot:o.markdownIsError,component:xe,visible:()=>!o.isOfflineUpdate,validate:()=>o.markdownIsError?{valid:!1}:{valid:!0}},{label:e("comp.dir"),value:r.TAB_TYPE_DIR,component:ao,visible:()=>o.isOnlineUpdate||o.isAddComp}]),I=h(()=>g.value.filter(A=>A.visible?.()??!0)),D=h(()=>I.value.find(R=>R.value===o.activeName)?.component||{render:()=>null}),k=h(()=>D.value===xe?{result:_.result.value}:{});function $(){u.value?.open()}function W(A,R){R(A),o.setCompBgColor(A??""),window?.umami?.track(Pe.EDIT_BG_COLOR_CHANGE,{color:A})}function j(A){o.setActiveName(A)}async function re(){for(const A of E.keys())if(A.startsWith(r.COMP_METHOD_KEY_GET_COMP_ERROR)&&E.get(A)?.())return!0;return!1}async function ee(A){if(A.start(),await re()&&(o.isOnlineUpdate||o.isAddComp)){Ie.error(e("message.error.pleaseFixCompileError")),A.end();return}for(const R of I.value){if(!R.validate)continue;const K=R.validate();if(!K.valid){o.setActiveName(""),await ve(),o.setActiveName(R.value),K.callbackKey&&E.get(K.callbackKey)?.(),A.end();return}}t("confirmUpload",{end:A.end})}async function le(){if(!o.framework)return;const A=await J.comp.compcontrollerCheck({compPath:S.value,framework:o.framework});o.setConfigStatus(A.data)}async function ie(){const R=(o.originalDirectory.children||[]).find(q=>q.name===r.COMP_CONFIG_FILENAME);if(!R)return;const K=await J.comp.compcontrollerFile({filePath:R.path}),{content:Q}=K.data,ce=JSON.parse(Q);o.setLocalCompVersion(ce.version)}async function Ge(){await Te(),d.value=Ae(),await ve(),T.value?.open(),window?.umami?.track(Pe.EDIT_VIEW_DIFF,{compPath:S.value})}async function Ye(){await Te(),d.value=Ae()}function Ae(){const A=o.localDirectory?.children??[],R=o.onlineDirectory?.children??[],Q=ye(o.editCompId)().latestVersionToFileAccessPath,ce=S.value.replace(r.FILE_MANAGER_DIRNAME,"");return v(R,A,q=>Q.find(ue=>ue.path===q)?.signedUrl??"",q=>`${r.COMP_PREVIEW_PREFIX_LOCAL}/${ce}${q}`)}async function Te(){const A=await J.comp.compcontrollerDir({compPath:S.value}),{tree:R,files:K}=A.data;o.setOriginalDirectory(R),o.setOriginalDirectoryList(K)}function He(){t("reload")}return B(()=>o.originalDirectory,async()=>{await ie()},{immediate:!0,deep:!0}),B(()=>S.value,async(A,R)=>{A===R||!A||o.isAddComp||await Te()},{immediate:!0}),B(()=>o.framework,A=>{A&&(o.isOnlineUpdate||o.isAddComp)&&le()}),B(_.result,A=>{if(!A)return;const{headings:R=[]}=A;if(R.length){const K=R.every(Q=>{const ce=Q.tokens.map(ue=>ue?.text||"").join(""),{valid:q}=pe.validateHash(ce);return q});o.setMarkdownValid(K)}}),(A,R)=>{const K=be("Icon"),Q=rt,ce=lt,q=we,ue=st,Ke=ne,We=nt;return m(),N("div",Mo,[p(We,{class:"size-full",layout:"vertical"},{default:n(()=>[p(ue,{class:"size-full",size:"50%",min:300},{default:n(()=>[p(q,{"body-class":"!p-0",class:"size-full"},{default:n(()=>[p(i(Mt),{class:"size-full flex flex-col",bg:i(o).compBgColor},{default:n(({bg:de,updateColor:Ee})=>[p(Do,{ref_key:"compIframeEditRef",ref:c,class:"flex-1",compType:i(r).IFRAME_ROUTES.ITEM.EDIT_PANEL,iuid:i(a)?.uid},null,8,["compType","iuid"]),w("div",No,[w("div",ko,[i(o).isOnlineUpdate||i(o).isAddComp?(m(),P(Q,{key:0,title:i(e)("comp.reload"),class:"ml-2",type:"primary",underline:"always",onClick:He},{default:n(()=>[p(K,{icon:"material-symbols:frame-reload",height:i(r).COMP_ACTION_ICON_HEIGHT},null,8,["height"])]),_:1},8,["title"])):U("",!0),p(Q,{title:i(e)("comp.uploadProtocol"),type:"primary",underline:"always",onClick:R[0]||(R[0]=me=>$())},{default:n(()=>[p(K,{icon:"material-symbols:docs",height:i(r).COMP_ACTION_ICON_HEIGHT},null,8,["height"])]),_:1},8,["title"]),(i(o).isOnlineUpdate||i(o).isAddComp)&&C.value?(m(),P(Q,{key:1,title:C.value,type:"primary",underline:"always",class:"text-xs",onClick:L},{default:n(()=>[F(y(x.value),1)]),_:1},8,["title"])):U("",!0)]),w("div",Vo,[w("span",null,y(i(e)("comp.bgPanel"))+":",1),p(ce,{modelValue:de,clearable:"",onChange:me=>W(me,Ee),onActiveChange:me=>W(me,Ee)},null,8,["modelValue","onChange","onActiveChange"])])])]),_:1},8,["bg"])]),_:1})]),_:1}),p(ue,{class:"size-full",collapsible:""},{default:n(()=>[p(q,{"body-class":"!p-0 flex flex-col",class:"size-full"},{default:n(()=>[p(q,{"body-class":"!p-0"},{default:n(()=>[p(i(Nt),{"model-value":i(o).activeName,options:I.value,onChange:j},{default:n(({item:de})=>[p(i(kt),{"is-dot":de.isDot},{default:n(()=>[F(y(de.label),1)]),_:2},1032,["is-dot"])]),_:1},8,["model-value","options"])]),_:1}),w("div",Fo,[p(i(ut),null,{default:n(()=>[(m(),P(vt,null,[(m(),P(Ct(D.value),gt(k.value,{onShowDiff:Ge}),null,16))],1024))]),_:1})]),w("div",$o,[p(i(Vt),null,{default:n(({instance:de,loading:Ee})=>[p(Ke,{id:i(Pe).UPLOAD_CONFIRM,loading:Ee,type:"primary",class:"w-[200px]",round:"",onClick:me=>ee(de)},{default:n(()=>[F(y(i(o).compSubmitBtnText),1)]),_:1},8,["id","loading","onClick"])]),_:1})])]),_:1})]),_:1})]),_:1}),p(Ro,{ref:"dialogPutTreaty",isAction:!1},null,512),d.value.length?(m(),P(i(xt),{key:0,ref:"diffDialog",resultTree:d.value,oldMeta:V.value,newMeta:b.value,onRefresh:Ye},null,8,["resultTree","oldMeta","newMeta"])):U("",!0)])}}}),na=De(Uo,[["__scopeId","data-v-0c24870e"]]),sa=(O,l)=>{const{t}=H();return Pt(`compEdit_${O}`,{state:()=>({scopeId:O,extraInfo:{},upgradeInfo:{},previewList:[],compDep:[],onlineCompDep:[],affirmCompDep:{},activeName:"preview",compCarouselIndex:0,selectedFolder:{},originalDirectory:{},originalDirectoryList:[],compDialogType:l??"",editCompId:"",compBgColor:"",configStatus:{},compDetail:{},localCompHash:"",remoteCompHash:"",localCompVersion:"",loading:!1,compUpdateType:"",signedUrls:[],markdownValid:!0,previewImageExists:!1,manualScreenshotTrigger:0,screenshotTimestamp:0}),getters:{isInitState:e=>e.compDialogType.trim()==="",isEditComp:e=>e.compDialogType===r.DIALOG_TYPE_EDIT,isAddComp:e=>e.compDialogType===r.DIALOG_TYPE_ADD,isOnlineUpdate:e=>e.compUpdateType===r.COMP_UPDATE_TYPE_ONLINE,isOfflineUpdate:e=>e.compUpdateType===r.COMP_UPDATE_TYPE_OFFLINE,isShowRefreshBtn(){return this.isOnlineUpdate||this.isAddComp},prodCompVersion:e=>e.compDetail?.version||"",versionCompareResult(){return!this.localCompVersion||!this.prodCompVersion?r.VERSION_COMPARE_GREATER:he.compareVersions(this.localCompVersion,this.prodCompVersion)},isEditCompFileChange(){return this.compFileIsChange&&this.isEditComp},isNeedAddVersion(){return this.versionCompareResult!==1&&this.isEditCompFileChange},compSubmitBtnText(){return this.isEditComp?t("comp.update"):this.isAddComp?t("comp.upload"):""},framework(){const e=this.compDep.map(c=>c.name),a=e.includes(r.COMP_FRAMEWORK_VUE),o=e.includes(r.COMP_FRAMEWORK_REACT);return a&&o?"":a?r.COMP_FRAMEWORK_VUE:o?r.COMP_FRAMEWORK_REACT:""},previewIsError(e){return this.isInitState||this.loading?!1:!e.previewList[0]?.miniPath?.length},configIsException:e=>{const{errorMsg:a}=e.configStatus;return!!a},configIsError(){return this.isInitState||this.loading||this.isOfflineUpdate?!1:!!(this.isNeedAddVersion||this.configIsException||this.isVersionChangeButFileSame)},extraIsError(e){if(this.isInitState||this.loading)return!1;const a=e.extraInfo.name?.trim()||"";if((e.extraInfo?.description||"").length<3||!pe.validateCompName(a))return!0;const c=e.extraInfo.tags;return!!(c&&c.length>0&&!pe.validateTags(c).valid||!this.isOfflineUpdate&&!e.previewImageExists)},compDepIsError(e){if(!e.onlineCompDep.length||this.isOfflineUpdate)return!1;let a=!1;return e.compDep.forEach(o=>{const c=e.onlineCompDep.find(u=>u.name===o.name),E=e.affirmCompDep[o.name]??e.affirmCompDep[o?.parent?.name??""];!(c?.version&&he.isVersionEqual(o?.version,c.version))&&!E&&(a=!0)}),a},compFileIsChange:e=>e.localCompHash!==e.remoteCompHash,compFolderFullPath(e){return this.isAddComp&&e.originalDirectory?.path?e.originalDirectory.path:""},isVersionChangeButFileSame(){return this.versionCompareResult!==r.VERSION_COMPARE_SAME&&!this.compFileIsChange&&this.isEditComp},isShowUpgradeLogTab(e){return this.isInitState||this.loading?!1:!!(this.compFileIsChange&&e.editCompId)},upgradeLogIsError(e){if(this.isOfflineUpdate)return!1;const a=e.upgradeInfo?.upgradeLog||"",o=this.versionCompareResult===r.VERSION_COMPARE_GREATER;return(a.length||0)<3&&(this.compFileIsChange||o)&&this.isEditComp},markdownIsError(e){return this.hasMdFile?!e.markdownValid:!1},affirmCompDepVersion:e=>e.compDep.map(a=>{const o=e.affirmCompDep[a.name],c=e.affirmCompDep[a?.parent?.name??""],E=o??c??a.version,T=a.parent?{parent:{...a.parent,version:E}}:{};return{...a,version:E,...T}}),localDirectory:e=>{const{srcPath:a,sep:o}=window.__GLOBAL_CONFIG__,c=e.selectedFolder.path;if(!c||Object.keys(e.originalDirectory).length===0)return null;const E=c.replace(r.FILE_MANAGER_DIRNAME,"").replaceAll("/",o);return Oe.mapTree(e.originalDirectory,u=>(u.path=u.path.replace(`${a}${o}${E}`,""),u))},onlineDirectory:e=>e.compDetail.files?.length?Oe.convertFlatToTree(e.compDetail.files,{pathSeparator:"\\",createNode:(a,o,c)=>({name:o,path:c.startsWith("\\")?c:"\\"+c,type:a,children:[]})}):null,directory(){return this.localDirectory?this.localDirectory:this.onlineDirectory},hasMdFile(){return this.directory?.children?.find(e=>e.name===r.COMP_README_FILENAME)!==void 0}},actions:{setMarkdownValid(e){this.$patch({markdownValid:e})},setPreviewImageExists(e){this.$patch({previewImageExists:e})},triggerManualScreenshot(){this.$patch({manualScreenshotTrigger:Date.now()})},refreshScreenshot(){this.$patch({screenshotTimestamp:Date.now()})},setSignedUrls(e){this.$patch({signedUrls:e})},setCompUpdateType(e){this.$patch({compUpdateType:e})},setLocalCompVersion(e){this.$patch({localCompVersion:e})},setOriginalDirectory(e){this.$patch({originalDirectory:e})},setOriginalDirectoryList(e){this.$patch({originalDirectoryList:e})},setLoading(e){this.$patch({loading:e})},setLocalCompHash(e){this.$patch({localCompHash:e})},setRemoteCompHash(e){this.$patch({remoteCompHash:e})},setCompDetail(e){this.$patch({compDetail:e})},setUpgradeInfo(e){this.$patch({upgradeInfo:e})},setConfigStatus(e){this.$patch({configStatus:e})},setExtraInfo(e){this.$patch({extraInfo:e})},addPreviewCompItem(e){this.$patch(a=>{a.previewList.push(e)})},delPreviewCompItemById(e){this.$patch(a=>{a.previewList=a.previewList.filter(o=>o._id!==e)})},setPreviewCompList(e){this.$patch({previewList:e})},updatePreviewCompItemById(e,a){this.$patch(o=>{const c=o.previewList.findIndex(E=>E._id===e);c!==-1&&(o.previewList[c]=a)})},initPreviewCompList(){this.$patch(e=>{e.compDialogType===r.DIALOG_TYPE_ADD&&(e.previewList=[{_id:oe(),miniPath:[],fullPath:[],activeTab:r.COMP_EDIT_TAB_TYPE_MINI,miniEntryUrl:"",fullEntryUrl:""}])})},setCompDep(e){this.$patch({compDep:e})},setOnlineCompDep(e){this.$patch({onlineCompDep:e})},setAffirmCompDep(e){this.$patch({affirmCompDep:e})},setActiveName(e){this.$patch({activeName:e})},setCompCarouselIndex(e){this.$patch({compCarouselIndex:e})},setSelectedFolder(e){this.$patch({selectedFolder:e})},setEditCompId(e){this.$patch({editCompId:e})},setCompBgColor(e){this.$patch({compBgColor:e})},getCompSubmitParams(){if(this.extraIsError)throw new Error("组件信息不完整,请检查组件名称和描述");if(this.previewIsError)throw new Error("预览配置不完整,请检查预览配置");if(this.configIsError)throw new Error("配置检查未通过,请检查配置");const e=this.selectedFolder.path,{name:a,description:o,tags:c}=this.extraInfo,E=this.framework,T=this.previewList.map(v=>({miniPath:v.miniPath,fullPath:v.fullPath,desc:v?.desc||""})),u=this.upgradeInfo?.upgradeLog??"",f=this.isEditComp?{upgradeDesc:u}:{};return{compPath:e,dep:this.affirmCompDepVersion,name:a,desc:o,previewConfigs:T,bgColor:this.compBgColor,tags:c,framework:E,...f}}}})};export{na as C,Ro as _,sa as c,bo as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid-container[data-v-0e1fb53a]{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--v435dab90),1fr));gap:var(--v6971b9fd)}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute;width:var(--v435dab90)}.list-leave-none{display:none}.active[data-v-ce18658f]{border:1px solid #23b2c5;border-radius:8px}.el-image-viewer__wrapper{position:fixed;inset:0}.el-image-viewer__wrapper:focus{outline:none!important}.el-image-viewer__btn{z-index:1;opacity:.8;cursor:pointer;box-sizing:border-box;-webkit-user-select:none;user-select:none;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute}.el-image-viewer__btn .el-icon{cursor:pointer}.el-image-viewer__close{width:40px;height:40px;font-size:40px;top:40px;right:40px}.el-image-viewer__canvas{-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:static}.el-image-viewer__actions{background-color:var(--el-text-color-regular);border-color:#fff;border-radius:22px;height:44px;padding:0 23px;bottom:30px;left:50%;transform:translate(-50%)}.el-image-viewer__actions__inner{cursor:default;color:#fff;justify-content:space-around;align-items:center;gap:22px;width:100%;height:100%;padding:0 6px;font-size:23px;display:flex}.el-image-viewer__actions__divider{margin:0 -6px}.el-image-viewer__progress{cursor:default;color:#fff;bottom:90px;left:50%;transform:translate(-50%)}.el-image-viewer__prev{color:#fff;background-color:var(--el-text-color-regular);border-color:#fff;width:44px;height:44px;font-size:24px;top:50%;left:40px;transform:translateY(-50%)}.el-image-viewer__next{text-indent:2px;color:#fff;background-color:var(--el-text-color-regular);border-color:#fff;width:44px;height:44px;font-size:24px;top:50%;right:40px;transform:translateY(-50%)}.el-image-viewer__close{color:#fff;background-color:var(--el-text-color-regular);border-color:#fff;width:44px;height:44px;font-size:24px}.el-image-viewer__mask{opacity:.5;background:#000;width:100%;height:100%;position:absolute;top:0;left:0}.el-image-viewer-parent--hidden{overflow:hidden}.viewer-fade-enter-active{animation:viewer-fade-in var(--el-transition-duration)}.viewer-fade-leave-active{animation:viewer-fade-out var(--el-transition-duration)}@keyframes viewer-fade-in{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translate(0)}}@keyframes viewer-fade-out{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translateY(-20px)}}.el-image__error,.el-image__placeholder,.el-image__wrapper,.el-image__inner{width:100%;height:100%}.el-image{display:inline-block;position:relative;overflow:hidden}.el-image__inner{vertical-align:top;opacity:1}.el-image__inner.is-loading{opacity:0}.el-image__wrapper{position:absolute;top:0;left:0}.el-image__placeholder{background:var(--el-fill-color-light)}.el-image__error{background:var(--el-fill-color-light);color:var(--el-text-color-placeholder);vertical-align:middle;justify-content:center;align-items:center;font-size:14px;display:flex}.el-image__preview{cursor:pointer}.el-descriptions__label.el-descriptions__cell.is-bordered-label{color:var(--el-text-color-regular);background:var(--el-descriptions-item-bordered-label-background);font-weight:700}.el-descriptions__label:not(.is-bordered-label){color:var(--el-text-color-primary);margin-right:16px}.el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:6px}.el-descriptions__content.el-descriptions__cell.is-bordered-content{color:var(--el-text-color-primary)}.el-descriptions__content:not(.is-bordered-label){color:var(--el-text-color-regular)}.el-descriptions--large .el-descriptions__label:not(.is-bordered-label){margin-right:16px}.el-descriptions--large .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:8px}.el-descriptions--small .el-descriptions__label:not(.is-bordered-label){margin-right:12px}.el-descriptions--small .el-descriptions__label.el-descriptions__cell:not(.is-bordered-label).is-vertical-label{padding-bottom:4px}.el-descriptions{--el-descriptions-table-border:1px solid var(--el-border-color-lighter);--el-descriptions-item-bordered-label-background:var(--el-fill-color-light);box-sizing:border-box;font-size:var(--el-font-size-base);color:var(--el-text-color-primary)}.el-descriptions__header{justify-content:space-between;align-items:center;margin-bottom:16px;display:flex}.el-descriptions__title{color:var(--el-text-color-primary);font-size:16px;font-weight:700}.el-descriptions__body{background-color:var(--el-fill-color-blank)}.el-descriptions__body .el-descriptions__table{border-collapse:collapse;width:100%}.el-descriptions__body .el-descriptions__table .el-descriptions__cell{box-sizing:border-box;text-align:left;font-size:14px;line-height:23px}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-left{text-align:left}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-center{text-align:center}.el-descriptions__body .el-descriptions__table .el-descriptions__cell.is-right{text-align:right}.el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{border:var(--el-descriptions-table-border);padding:8px 11px}.el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:12px}.el-descriptions--large{font-size:14px}.el-descriptions--large .el-descriptions__header{margin-bottom:20px}.el-descriptions--large .el-descriptions__header .el-descriptions__title{font-size:16px}.el-descriptions--large .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:14px}.el-descriptions--large .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:12px 15px}.el-descriptions--large .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:16px}.el-descriptions--small{font-size:12px}.el-descriptions--small .el-descriptions__header{margin-bottom:12px}.el-descriptions--small .el-descriptions__header .el-descriptions__title{font-size:14px}.el-descriptions--small .el-descriptions__body .el-descriptions__table .el-descriptions__cell{font-size:12px}.el-descriptions--small .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions__cell{padding:4px 7px}.el-descriptions--small .el-descriptions__body .el-descriptions__table:not(.is-bordered) .el-descriptions__cell{padding-bottom:8px}[data-v-0c24870e] .el-segmented__item-label{overflow:unset}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as n,I as a,b as d,c as u}from"./useMessage-
|
|
1
|
+
import{d as n,I as a,b as d,c as u}from"./useMessage-BLwQdu5o.js";import{m as E}from"./vendor-core-Do-oxgl9.js";const T=(s,o)=>{const{sendMessageToTargetIframe:r,messageListener:t}=u(),{addListener:i}=t(),_=n(!1,window.__GLOBAL_CONFIG__.subPort);i(a.SEARCH_KEYWORD_GET,()=>{const{triggerCallback:c,stopWatch:m}=d(E(()=>s.value),()=>{o.value?.sendMessageToTargetIframeByCompId(e=>{e?r(e,a.SEARCH_KEYWORD_SET,s.value,_):m()})});c()})};export{T as u};
|