hortimagic 1.0.6 → 1.0.7

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.
@@ -712,7 +712,6 @@ style="width:${this.size}; height:${this.size};"
712
712
  <div
713
713
  class="switch ${this.disabled?"disabled":""} ${this.loading?"loading":""} ${this.checked?"checked":""}"
714
714
  @click="${this.change}"
715
- @touchstart="${this.change}"
716
715
  style="--switch-color: ${this.color}"
717
716
  >
718
717
  <div class="switch-inner">
@@ -8,7 +8,7 @@
8
8
  // @grant none
9
9
  // @run-at onmessage-end
10
10
  // @license MIT
11
- // @buildtime 2026-01-02T09:03:04.108Z
11
+ // @buildtime 2026-01-02T09:13:18.438Z
12
12
  // ==/UserScript==
13
13
  top.window.hortimagic=window.hortimagic=function(t){"use strict";async function e(t){return new Promise(e=>setTimeout(e,t))}function o(t){return t=(t=(t=(t=(t=(t=t.replace("&","&amp;")).replace("<","&lt;")).replace(">","&gt;")).replace('"',"&quot;")).replace("'","&#039;")).replace("\\","&#092;")}function i(t){return t=(t=(t=(t=(t=(t=t.replace("&lt;","<")).replace("&gt;",">")).replace("&quot;",'"')).replace("&#039;","'")).replace("&#092;","\\")).replace("&amp;","&")}function n(){return window.myself?window.myself:null}function s(){return window.uid?window.uid:null}function r(){return window.inputcolorhex?window.inputcolorhex:null}const l=Object.freeze(Object.defineProperty({__proto__:null,addStyle:function(t){let e=document.createElement("style");e.innerText=t,document.body.append(e)},changeRoom:function(t){(t=String(t))&&window.Objs.mapHolder?.function?.roomchanger(t)},compressCSS:function(t){return t=(t=(t=(t=(t=t.replace(/\s{2,}/g," ")).replace(/\/\*[\s\S]*?\*\//g,"")).replace(/\s*([{};:,])\s*/g,"$1")).replace(/;\s*}/g,"}")).trim()},compressHTML:function(t){return t=(t=(t=(t=t.replace(/>\s+</g,"><")).replace(/\s{2,}/g," ")).replace(/<!--[\s\S]*?-->/g,"")).trim()},generatePrivateMessageBubble:function(t,e,i){window.privatechatfunc&&window.privatechatfunc([Math.floor(Date.now()/1e3).toString(10),s(),o(n()),o(window.avatar2&&window.avatarconv?window.avatarconv(window.avatar2):null),o(e),o(r()),"",o(r()),"","",i,t,"","","","",""].join(">"))},getAllOnlineUserInfo:function(){let t=window.Objs.mapHolder.Assets.userJson;return t?Object.keys(t).map(e=>{let o=t[e];return{name:o[2],uid:o[8],color:o[3],avatar:o[0],roomId:o[4],personalizedSignature:o[6]}}):null},getOnlineUserInfoById:function(t){t=String(t);let e=window.Objs.mapHolder?.function?.findUserByUid?.(t);return e?{name:e[2],uid:t,color:e[3],avatar:e[0],roomId:e[4],personalizedSignature:e[6]}:null},getRoomId:function(){return window.roomn?window.roomn:null},getRoomInfoById:function(t){let e=window.Objs.mapHolder?.Assets?.roomJson?.[t];if(e){let t=e[5].split("&&").map(t=>t.split(" & ")),o=i(t[0][0]),n=o.indexOf(" ");return{name:e[1],color:e[2],roomPath:e[0].split("_"),description:o.slice(n+1),roomImage:o.slice(0,n),currentUserNum:"number"==typeof e[7]?e[7]:"hidden",ownerName:t[1][0],member:t[4].map(t=>({name:i(t.slice(1)),auth:"0"==t[0]?"member":"1"==t[0]?"admin":"unknow"}))}}return null},getUserInputColor:r,getUserName:n,getUserUid:s,htmlSpecialCharsDecode:i,htmlSpecialCharsEscape:o,sleep:e,switchRoom:function(t){window.Objs.mapHolder?.function?.roomchanger&&window.Objs.mapHolder.function.roomchanger(t)}},Symbol.toStringTag,{value:"Module"}));class a{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.designation="",this.messageUid=""}}class c{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.messageUid=""}}class h{constructor(){this.messageName="",this.uid="",this.data=""}}class d{constructor(){this.username="",this.avatar="",this.message="",this.color="",this.gender="",this.timeStamp="",this.uid=""}}class p{constructor(){this.privateUID="",this.uid="",this.messageUid="",this.dataUid=""}}class u{constructor(){this.userMessageList=[]}}class g{constructor(){this.result="",this.stockPrice=NaN,this.totalStock=NaN,this.holdingAmount=NaN,this.totalEquity=NaN,this.balance=NaN}}class m{constructor(){this.message=""}}const f=Object.freeze(Object.defineProperty({__proto__:null,Danmu:d,Hidden:h,Private:c,Public:a,Stock:g,System:u,Unkonw:m,Withdrawn:p},Symbol.toStringTag,{value:"Module"}));let v=[];function b(t){return t instanceof a?"public":t instanceof c?"private":t instanceof h?"hidden":t instanceof d?"danmu":t instanceof p?"withdrawn":t instanceof u?"system":t instanceof g?"stock":"unknown"}function y(t){let e=new a,o=t.split(">");return e.timeStamp=o[0],e.headPortrait=o[1],e.name=o[2],e.message=o[3],e.color=o[5],e.gender=o[6],e.uid=o[8],e.designation=o[9],e.messageUid=o[10],e}function w(t){let e=new c,o=t.split(">");return e.timeStamp=o[0].slice(1),e.uid=o[1],e.name=o[2],e.headPortrait=o[3],e.message=o[4],e.color=o[5],e.gender=o[8],e.messageUid=o[10],e}function x(t){let e=new d,o=t.split(">");return e.username=o[0],e.message=o[1],e.color=o[2],e.gender=o[4],e.avatar=o[5],e.timeStamp=o[6],e.uid=o[7],e}function $(t){if(v=[],/^"[^"].*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(y(e[t]))}else if(/^"".*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(w(e[t]))}else if(/^=.*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(x(e[t]))}else/^[/]<.*>[0-9|a-z]{13}:.*/gs.test(t)?v.push(function(t){let e,o=new h;return e=t.match(/(?<=^[/]<).*(?=>[0-9|a-z]{13}:.*)/gs),o.messageName=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>)[0-9|a-z]{13}(?=:.*)/gs),o.uid=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>[0-9|a-z]{13}:).*/gs),o.data=null==e?"":e[0],o}(t)):/^v0.*/gs.test(t)?v.push(function(t){let e=new p;return"#"==t[2]?(e.privateUID="",e.uid=t.slice(3,16),e.messageUid=t.slice(17,29),e.dataUid=t.slice(3,29)):(e.privateUID=t.slice(3,16),e.uid=t.slice(17,30),e.messageUid=t.slice(31),e.dataUid=t.slice(17)),e}(t)):/^%\*".*/gs.test(t)?v.push(function(t){let e=new u;return e.userMessageList=t.split("<"),e}(t)):/^>.*/gs.test(t)?v.push(function(t){let e=new g;if(e.result=t[2],"*"==e.result)return e;if(">"==e.result)return e.holdingAmount=parseInt(t.slice(2)),e;if("<"==e.result)return e.balance=parseInt(t.slice(2)),e;{let o=t.split('"');if(5==o.length)return e.stockPrice=parseFloat(o[2]),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[3]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[4]),e;if(4==o.length)return e.stockPrice=parseFloat(o[1])/parseInt(o[0].slice(1)),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[2]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[3]),e}return e}(t)):v.push(function(t){let e=new m;return e.message=t,e}(t))}const _=Object.freeze(Object.defineProperty({__proto__:null,decodeMessage:$,judegMessageClass:b,get messageObjList(){return v}},Symbol.toStringTag,{value:"Module"}));class S{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}off(t,e){this.events[t]&&(e?this.events[t]=this.events[t].filter(t=>t!==e):delete this.events[t])}once(t,e){const o=(...i)=>{e(...i),this.off(t,o)};this.on(t,o)}emit(t,...e){const o=this.events[t];return!(!o||0===o.length)&&([...o].forEach(t=>t(...e)),!0)}}const k=Symbol(),A=Object.getPrototypeOf,C=new WeakMap,O=t=>(t=>t&&(C.has(t)?C.get(t):A(t)===Object.prototype||A(t)===Array.prototype))(t)&&t[k]||null,E=(t,e=!0)=>{C.set(t,e)},M={},z=t=>"object"==typeof t&&null!==t,H=(t,e)=>{const o=j.get(t);if((null==o?void 0:o[0])===e)return o[1];const i=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return E(i,!0),j.set(t,[e,i]),Reflect.ownKeys(t).forEach(e=>{if(Object.getOwnPropertyDescriptor(i,e))return;const o=Reflect.get(t,e),{enumerable:n}=Reflect.getOwnPropertyDescriptor(t,e),s={value:o,enumerable:n,configurable:!0};if(P.has(o))E(o,!1);else if(T.has(o)){const[t,e]=T.get(o);s.value=H(t,e())}Object.defineProperty(i,e,s)}),Object.preventExtensions(i)},T=new WeakMap,P=new WeakSet,j=new WeakMap,L=[1],B=new WeakMap;let I=Object.is,D=(t,e)=>new Proxy(t,e),N=t=>z(t)&&!P.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),U=H,R=(t,e,o,i)=>({deleteProperty(t,e){const n=Reflect.get(t,e);o(e);const s=Reflect.deleteProperty(t,e);return s&&i(["delete",[e],n]),s},set(n,s,r,l){const a=!t()&&Reflect.has(n,s),c=Reflect.get(n,s,l);if(a&&(I(c,r)||B.has(r)&&I(c,B.get(r))))return!0;o(s),z(r)&&(r=O(r)||r);const h=!T.has(r)&&N(r)?V(r):r;return e(s,h),Reflect.set(n,s,h,l),i(["set",[s],r,c]),!0}});function V(t={}){if(!z(t))throw new Error("object required");const e=B.get(t);if(e)return e;let o=L[0];const i=new Set,n=(t,e=++L[0])=>{o!==e&&(s=o=e,i.forEach(o=>o(t,e)))};let s=o;const r=t=>(e,o)=>{const i=[...e];i[1]=[t,...i[1]],n(i,o)},l=new Map;let a=!0;const c=R(()=>a,(t,e)=>{const o=!P.has(e)&&T.get(e);if(o){if("production"!==(M?"production":void 0)&&l.has(t))throw new Error("prop listener already exists");if(i.size){const e=o[2](r(t));l.set(t,[o,e])}else l.set(t,[o])}},t=>{var e;const o=l.get(t);o&&(l.delete(t),null==(e=o[1])||e.call(o))},n),h=D(t,c);B.set(t,h);const d=[t,(t=L[0])=>(s!==t&&(s=t,l.forEach(([e])=>{const i=e[1](t);i>o&&(o=i)})),o),t=>{i.add(t),1===i.size&&l.forEach(([t,e],o)=>{if("production"!==(M?"production":void 0)&&e)throw new Error("remove already exists");const i=t[2](r(o));l.set(o,[t,i])});return()=>{i.delete(t),0===i.size&&l.forEach(([t,e],o)=>{e&&(e(),l.set(o,[t]))})}}];return T.set(h,d),Reflect.ownKeys(t).forEach(e=>{const o=Object.getOwnPropertyDescriptor(t,e);"value"in o&&o.writable&&(h[e]=t[e])}),a=!1,h}function F(t,e,o){const i=T.get(t);let n;"production"===(M?"production":void 0)||i||console.warn("Please use proxy object");const s=[],r=i[2];let l=!1;const a=r(t=>{s.push(t),o?e(s.splice(0)):n||(n=Promise.resolve().then(()=>{n=void 0,l&&e(s.splice(0))}))});return l=!0,()=>{l=!1,a()}}const q="store",W="HortimagicStore",G={proxy:V,subscribe:F,snapshot:function(t){const e=T.get(t);"production"===(M?"production":void 0)||e||console.warn("Please use proxy object");const[o,i]=e;return U(o,i())}},X=V({autoSave:!1,logFlag:{log:!1,info:!0,debug:!0,warn:!0,error:!0},messageLogFlag:{send:!1,decode:!1,emit:!0,receive:!1},logListLength:20,scriptList:[]});function J(){localStorage.setItem(W,JSON.stringify(X)),tt.debug(q,"保存至本地存储")}function Z(){let t=localStorage.getItem(W);if(null!=t){const e=JSON.parse(t);e.autoSave?X.autoSave=1==e.autoSave:X.autoSave=!1,e.logFlag?X.logFlag=e.logFlag:isNaN(e.logLevel)&&(X.logFlag=e.logLevel),e.scriptList&&(X.scriptList=e.scriptList),e.logListLength&&(X.logListLength=e.logListLength)}else X.logFlag.log=!0,X.logFlag.info=!0,X.logFlag.debug=!0,X.logFlag.warn=!0,X.logFlag.error=!0,X.autoSave=!0,X.logListLength=20,X.messageLogFlag.decode=!1,X.messageLogFlag.emit=!0,X.messageLogFlag.send=!1,X.messageLogFlag.receive=!1,X.scriptList=[],tt.debug(q,"没有读取到配置,使用默认配置"),J();tt.debug(q,"从本地存储加载")}function Y(){Z(),F(X,()=>{X.autoSave&&J()})}const K=Object.freeze(Object.defineProperty({__proto__:null,HortimagicStore:X,initStore:Y,loadStore:Z,reactive:G,saveStore:J},Symbol.toStringTag,{value:"Module"})),Q=new S,tt={log(t,...e){X.logFlag.log&&(Q.emit("log",t,...e),console.log(t,...e))},debug(t,...e){X.logFlag.debug&&(Q.emit("log",t,...e),console.debug(t,...e))},info(t,...e){X.logFlag.info&&(Q.emit("log",t,...e),console.info(t,...e))},warn(t,...e){X.logFlag.warn&&(Q.emit("log",t,...e),console.warn(t,...e))},error(t,...e){X.logFlag.error&&(Q.emit("log",t,...e),console.error(t,...e))}},et=Object.freeze(Object.defineProperty({__proto__:null,logEmitter:Q,logger:tt},Symbol.toStringTag,{value:"Module"})),ot="socket-tools",it=new S;async function nt(){tt.debug(ot,"代理网络");for(let o=0;o<30;o++)try{if(tt.debug(ot,"等待网络连接",o),null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send){tt.debug(ot,"网络连接成功");break}await e(500);continue}catch(t){tt.error(ot,t)}null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send?(st.originalSend=window.socket.send,window.socket.send=st.send,st.originalOnmessage=window.socket._onmessage,window.socket._onmessage=st.onmessage):tt.error("连接失败")}const st={beforeSend:async function(t){return t},originalSend:function(t){return t},afterSend:function(t){return t},send:async function(t){X.messageLogFlag.send&&tt.debug(ot,"发送",{message:t});let e=await st.beforeSend(t);try{null!=e&&(st.originalSend(e),st.afterSend(e))}catch(o){tt.error(ot,o)}},beforeOnmessage:async function(t){return X.messageLogFlag.decode&&tt.debug(ot,"解码",{message:t}),$(t),t},originalOnmessage:function(t){return t},afterOnmessage:async function(t){for(let e of v)X.messageLogFlag.emit&&tt.debug(ot,`触发${b(e)}消息`,{message:t,messageObj:e}),it.emit(b(e),e);return t},onmessage:async function(t){X.messageLogFlag.receive&&tt.debug(ot,"接收",{message:t});let e=await st.beforeOnmessage(t);try{null!=e&&(st.originalOnmessage(e),st.afterOnmessage(e))}catch(o){tt.error("捕获到错误",o)}},initSocket:nt},rt=Object.freeze(Object.defineProperty({__proto__:null,initSocket:nt,messageEmitter:it,socketTools:st},Symbol.toStringTag,{value:"Module"}));function lt(t,e){return"cut"===t?`{0${JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}`:JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}const at=Object.freeze(Object.defineProperty({__proto__:null,danmu:function(t,e,o="0"){return`~{"t":"${t}","c":"${e}","v":${o}}`},hidden:function(t,e,o){return`/<${t}>${e}:${o}`},like:function(t,e=""){return`+*${t}${e}`},musicCard:function(t,e,o,i,n,s){return lt(`m__4=${t}>${e}>${o}>${i}>${n}>${s}`,n)},privateChat:function(t,e,o){return JSON.stringify({g:t,m:e,mc:o,i:Math.random().toString().slice(2,12)})},publicChat:lt,stockRequest:function(t){return null==t?">#":t>0?`>$${Math.round(Math.abs(t))}`:t<0?`>@${Math.round(Math.abs(t))}`:">#"},videoCard:function(t,e,o,i,n,s,r){return lt(`m__4*${t}>${e}>${o}>${i}>${n}>${s}>${r}`,n)},withdrawn:function(t,e=""){return""==e?`v0#${t}`:`v0*${e}#${t}`}},Symbol.toStringTag,{value:"Module"})),ct="elements-hooks";let ht={movePanelHolder:document.querySelector("#movePanelHolder"),functionHolder:document.querySelector("#functionHolder"),functionButtonGroupList:[...document.querySelectorAll(".functionButton.functionButtonGroup")],msgholderBox:document.querySelector("#msgholder .fullBox.msgholderBox"),homeHolderMsgBox:document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),sessionHolderPmTaskBoxItems:[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],moveinputDisplay:document.querySelector("#moveinputDisplay"),moveinput:document.getElementById("moveinput"),moveinputSendBtnFunc:document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),moveinputSendBtnSend:document.querySelector("#moveinputDisplay #moveinputSendBtnSend")};function dt(){ht.movePanelHolder=document.querySelector("#movePanelHolder"),ht.functionHolder=document.querySelector("#functionHolder"),ht.functionButtonGroupList=[...document.querySelectorAll(".functionButton.functionButtonGroup")],ht.msgholderBox=document.querySelector("#msgholder .fullBox .fullBox.msgholderBox"),ht.homeHolderMsgBox=document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),ht.sessionHolderPmTaskBoxItems=[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],ht.moveinputDisplay=document.querySelector("#moveinputDisplay"),ht.moveinput=document.getElementById("moveinput"),ht.moveinputSendBtnFunc=document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),ht.moveinputSendBtnSend=document.querySelector("#moveinputDisplay #moveinputSendBtnSend")}let pt={elementHooks:{moveinput:{oninputBefore:()=>!0,oninputAfter:()=>!0,onblurBefore:()=>!0,onblurAfter:()=>!0,onfocusBefore:()=>!0,onfocusAfter:()=>!0}},functionHooks:{processer:{onBefore:(t,e,o,i)=>!0,onAfter:(t,e,o,i)=>!0}},replaceMoveinput:()=>{try{let t=ht.moveinput.oninput;ht.moveinput.oninput=function(){1==pt.elementHooks.moveinput.oninputBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.oninputAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onblur=function(){1==pt.elementHooks.moveinput.onblurBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onblurAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onfocus=function(){1==pt.elementHooks.moveinput.onfocusBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onfocusAfter())}}catch(t){tt.error(ct,t)}},replaceButtonProcesser:()=>{try{let t=buttonProcesser;buttonProcesser=(e,o,i,n)=>{1==pt.functionHooks.processer.onBefore(e,o,i,n)&&(t(e,o,i,n),pt.functionHooks.processer.onAfter(e,o,i,n))}}catch(t){tt.error(ct,t)}}};function ut(){pt.replaceMoveinput(),pt.replaceButtonProcesser()}const gt=Object.freeze(Object.defineProperty({__proto__:null,Hooks:pt,elements:ht,initHooks:ut,refreshAll:dt},Symbol.toStringTag,{value:"Module"})),mt="script-tools",ft=[];class vt{constructor(t,e,o=!0){this.name=t,this.url=e,this.enable=o}}function bt(t){return tt.debug(mt,`添加${t.name},${t.url}`),xt(t.url)>=0||$t(t.name)>=0?(tt.warn(mt,`脚本${t.name}${t.url}已经存在`),!1):(X.scriptList.push(t),!0)}function yt(t){tt.debug(mt,`更新脚本${t.name}${t.url}`);for(let e=0;e<X.scriptList.length;e++){if(X.scriptList[e].name===t.name)return X.scriptList[e]=t,!0;if(X.scriptList[e].url===t.url)return X.scriptList[e]=t,!0}return!1}function wt(t){tt.debug(mt,`删除${t.name},${t.url}`);let e=$t(t.name);return e>=0?(X.scriptList.splice(e,1),!0):(e=xt(t.url),e>=0&&(X.scriptList.splice(e,1),!0))}function xt(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].url==t)return e;return-1}function $t(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].name==t)return e;return-1}function _t(t){if(ft.includes(t.url))return tt.warn(mt,`脚本${t.name}${t.url}已经注入`),!1;{const e=document.createElement("script");return e.src=t.url,document.body.appendChild(e),ft.push(t.url),tt.debug(mt,`注入${t.name}`),!0}}function St(){X.scriptList.forEach(t=>{t.enable&&!ft.includes(t.url)&&_t(t)})}const kt=Object.freeze(Object.defineProperty({__proto__:null,Script:vt,addScriptToList:bt,clearScriptList:function(){X.scriptList=[]},findScriptByName:$t,findScriptByUrl:xt,ingecteScript:_t,ingecteScriptList:St,ingectedUrlList:ft,removeScriptFromList:wt,updateScriptInList:yt},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,Emitter:S,Message:f,decoder:_,elements_hooks:gt,encoder:at,log_tools:et,script_tools:kt,socket_tools:rt,store:K,tools:l},Symbol.toStringTag,{value:"Module"})),Ct=globalThis,Ot=Ct.ShadowRoot&&(void 0===Ct.ShadyCSS||Ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),Mt=new WeakMap;let zt=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Ot&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=Mt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}};const Ht=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1],t[0]);return new zt(o,t,Et)},Tt=Ot?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new zt("string"==typeof t?t:t+"",void 0,Et))(e)})(t):t,{is:Pt,defineProperty:jt,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Bt,getOwnPropertySymbols:It,getPrototypeOf:Dt}=Object,Nt=globalThis,Ut=Nt.trustedTypes,Rt=Ut?Ut.emptyScript:"",Vt=Nt.reactiveElementPolyfillSupport,Ft=(t,e)=>t,qt={toAttribute(t,e){switch(e){case Boolean:t=t?Rt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(i){o=null}}return o}},Wt=(t,e)=>!Pt(t,e),Gt={attribute:!0,type:String,converter:qt,reflect:!1,useDefault:!1,hasChanged:Wt};Symbol.metadata??=Symbol("metadata"),Nt.litPropertyMetadata??=new WeakMap;let Xt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Gt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&jt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:n}=Lt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const s=i?.call(this);n?.call(this,e),this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Gt}static _$Ei(){if(this.hasOwnProperty(Ft("elementProperties")))return;const t=Dt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ft("properties"))){const t=this.properties,e=[...Bt(t),...It(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[e,o]of this.elementProperties){const t=this._$Eu(e,o);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(Tt(t))}else void 0!==t&&e.push(Tt(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Ot)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const o of e){const e=document.createElement("style"),i=Ct.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const n=(void 0!==o.converter?.toAttribute?o.converter:qt).toAttribute(e,o.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:qt;this._$Em=i;const s=n.fromAttribute(e,t.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){const i=this.constructor,n=this[t];if(o??=i.getPropertyOptions(t),!((o.hasChanged??Wt)(n,e)||o.useDefault&&o.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:n},s){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==n||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t){const{wrapped:t}=o,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,o,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Xt[Ft("elementProperties")]=new Map,Xt[Ft("finalized")]=new Map,Vt?.({ReactiveElement:Xt}),(Nt.reactiveElementVersions??=[]).push("2.1.1");const Jt=globalThis,Zt=Jt.trustedTypes,Yt=Zt?Zt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Kt="$lit$",Qt=`lit$${Math.random().toFixed(9).slice(2)}$`,te="?"+Qt,ee=`<${te}>`,oe=document,ie=()=>oe.createComment(""),ne=t=>null===t||"object"!=typeof t&&"function"!=typeof t,se=Array.isArray,re="[ \t\n\f\r]",le=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ae=/-->/g,ce=/>/g,he=RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),de=/'/g,pe=/"/g,ue=/^(?:script|style|textarea|title)$/i,ge=(ye=1,(t,...e)=>({_$litType$:ye,strings:t,values:e})),me=Symbol.for("lit-noChange"),fe=Symbol.for("lit-nothing"),ve=new WeakMap,be=oe.createTreeWalker(oe,129);var ye;function we(t,e){if(!se(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Yt?Yt.createHTML(e):e}class xe{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,c]=((t,e)=>{const o=t.length-1,i=[];let n,s=2===e?"<svg>":3===e?"<math>":"",r=le;for(let l=0;l<o;l++){const e=t[l];let o,a,c=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===le?"!--"===a[1]?r=ae:void 0!==a[1]?r=ce:void 0!==a[2]?(ue.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=he):void 0!==a[3]&&(r=he):r===he?">"===a[0]?(r=n??le,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,o=a[1],r=void 0===a[3]?he:'"'===a[3]?pe:de):r===pe||r===de?r=he:r===ae||r===ce?r=le:(r=he,n=void 0);const d=r===he&&t[l+1].startsWith("/>")?" ":"";s+=r===le?e+ee:c>=0?(i.push(o),e.slice(0,c)+Kt+e.slice(c)+Qt+d):e+Qt+(-2===c?l:d)}return[we(t,s+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=xe.createElement(a,o),be.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=be.nextNode())&&l.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Kt)){const e=c[s++],o=i.getAttribute(t).split(Qt),r=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:r[2],strings:o,ctor:"."===r[1]?Ae:"?"===r[1]?Ce:"@"===r[1]?Oe:ke}),i.removeAttribute(t)}else t.startsWith(Qt)&&(l.push({type:6,index:n}),i.removeAttribute(t));if(ue.test(i.tagName)){const t=i.textContent.split(Qt),e=t.length-1;if(e>0){i.textContent=Zt?Zt.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],ie()),be.nextNode(),l.push({type:2,index:++n});i.append(t[e],ie())}}}else if(8===i.nodeType)if(i.data===te)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(Qt,t+1));)l.push({type:7,index:n}),t+=Qt.length-1}n++}}static createElement(t,e){const o=oe.createElement("template");return o.innerHTML=t,o}}function $e(t,e,o=t,i){if(e===me)return e;let n=void 0!==i?o._$Co?.[i]:o._$Cl;const s=ne(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),void 0===s?n=void 0:(n=new s(t),n._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=n:o._$Cl=n),void 0!==n&&(e=$e(t,n._$AS(t,e.values),n,i)),e}class _e{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??oe).importNode(e,!0);be.currentNode=i;let n=be.nextNode(),s=0,r=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new Se(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new Ee(n,this,t)),this._$AV.push(e),l=o[++r]}s!==l?.index&&(n=be.nextNode(),s++)}return be.currentNode=oe,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class Se{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=fe,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$e(this,t,e),ne(t)?t===fe||null==t||""===t?(this._$AH!==fe&&this._$AR(),this._$AH=fe):t!==this._$AH&&t!==me&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>se(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==fe&&ne(this._$AH)?this._$AA.nextSibling.data=t:this.T(oe.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=xe.createElement(we(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new _e(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=ve.get(t.strings);return void 0===e&&ve.set(t.strings,e=new xe(t)),e}k(t){se(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const n of t)i===e.length?e.push(o=new Se(this.O(ie()),this.O(ie()),this,this.options)):o=e[i],o._$AI(n),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ke{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,n){this.type=1,this._$AH=fe,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=fe}_$AI(t,e=this,o,i){const n=this.strings;let s=!1;if(void 0===n)t=$e(this,t,e,0),s=!ne(t)||t!==this._$AH&&t!==me,s&&(this._$AH=t);else{const i=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=$e(this,i[o+r],e,r),l===me&&(l=this._$AH[r]),s||=!ne(l)||l!==this._$AH[r],l===fe?t=fe:t!==fe&&(t+=(l??"")+n[r+1]),this._$AH[r]=l}s&&!i&&this.j(t)}j(t){t===fe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ae extends ke{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===fe?void 0:t}}class Ce extends ke{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==fe)}}class Oe extends ke{constructor(t,e,o,i,n){super(t,e,o,i,n),this.type=5}_$AI(t,e=this){if((t=$e(this,t,e,0)??fe)===me)return;const o=this._$AH,i=t===fe&&o!==fe||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==fe&&(o===fe||i);i&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ee{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){$e(this,t)}}const Me=Jt.litHtmlPolyfillSupport;Me?.(xe,Se),(Jt.litHtmlVersions??=[]).push("3.3.1");const ze=globalThis;let He=class extends Xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const i=o?.renderBefore??e;let n=i._$litPart$;if(void 0===n){const t=o?.renderBefore??null;i._$litPart$=n=new Se(e.insertBefore(ie(),t),t,void 0,o??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return me}};He._$litElement$=!0,He.finalized=!0,ze.litElementHydrateSupport?.({LitElement:He});const Te=ze.litElementPolyfillSupport;Te?.({LitElement:He}),(ze.litElementVersions??=[]).push("4.2.1");const Pe=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},je={attribute:!0,type:String,converter:qt,reflect:!1,hasChanged:Wt},Le=(t=je,e,o)=>{const{kind:i,metadata:n}=o;let s=globalThis.litPropertyMetadata.get(n);if(void 0===s&&globalThis.litPropertyMetadata.set(n,s=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),s.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const n=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const n=this[i];e.call(this,o),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)};function Be(t){return(e,o)=>"object"==typeof o?Le(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}function Ie(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var De=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ue=(t,e,o,i)=>{for(var n,s=i>1?void 0:i?Ne(e,o):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(i?n(e,o,s):n(s))||s);return i&&s&&De(e,o,s),s};let Re=[],Ve=99999,Fe=class extends He{constructor(){super(),this.width=320,this.height=490,this.headerBackgroundColor="rgba(66,134,182,0.9)",this.headerColor="rgb(255,255,255)",this.bodyBackgroundColor="rgba(255,255,255,0.7)",this.bodyColor="rgba(23, 23, 23, 0.9)",this.footerBackgroundColor="rgba(255,255,255,0.7)",this.buttonBackground="rgba(255,255,255,0.9)",this.buttonColor="rgba(66,134,182,0.9)",this.titleContent="面板",this.leftButtonText="",this.rightButtonText="",this.isDisplay=!1,this.zIndex=Ve,this.icon="magic-wand",this.leftIcon="magic-wand",this.rightIcon="magic-wand",this.left=(window.innerWidth-this.width)/2,this.top=(window.innerHeight-(this.height+80))/2,this.dragging=!1,Re.push(this),this.zIndex=++Ve}hideMovePanel(){this.isDisplay=!1,this.dispatchEvent(new CustomEvent("close",{detail:{isDisplay:this.isDisplay,message:"关闭事件"},bubbles:!0,composed:!0}))}showMovePanel(){this.isDisplay=!0,this.dispatchEvent(new CustomEvent("show",{detail:{isDisplay:this.isDisplay},bubbles:!0,composed:!0}))}toogleDisplay(){this.isDisplay?this.hideMovePanel():this.showMovePanel()}mouseDragging(t){let e=this.left,o=this.top,i=t.clientX-e,n=t.clientY-o;0==this.dragging&&(this.dragging=!0),document.onmousemove=t=>{this.dragging&&(this.left=t.clientX-i,this.top=t.clientY-n)},document.onmouseup=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}touchDragging(t){let e=this.left,o=this.top,i=t.touches[0].clientX-e,n=t.touches[0].clientY-o;0==this.dragging&&(this.dragging=!0),document.ontouchmove=t=>{this.dragging&&(this.left=t.touches[0].clientX-i,this.top=t.touches[0].clientY-n)},document.ontouchend=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}putTop(){let t=!1;if(Re.includes(this)){for(let t=0;t<Re.length;t++)Re[t].zIndex>this.zIndex&&(Re[t].zIndex=Re[t].zIndex-1);this.zIndex=Ve,t=!0}else tt.warn("MovePanel","置顶失败,窗口不在列表中"),t=!1;return t}putTopToggel(){this.zIndex!=Ve?(this.putTop(),this.showMovePanel()):this.toogleDisplay()}render(){return ge`
14
14
  <div
@@ -724,7 +724,6 @@ style="width:${this.size}; height:${this.size};"
724
724
  <div
725
725
  class="switch ${this.disabled?"disabled":""} ${this.loading?"loading":""} ${this.checked?"checked":""}"
726
726
  @click="${this.change}"
727
- @touchstart="${this.change}"
728
727
  style="--switch-color: ${this.color}"
729
728
  >
730
729
  <div class="switch-inner">
@@ -8,7 +8,7 @@
8
8
  // @grant none
9
9
  // @run-at onmessage-end
10
10
  // @license MIT
11
- // @buildtime 2026-01-02T09:03:04.108Z
11
+ // @buildtime 2026-01-02T09:13:18.438Z
12
12
  // ==/UserScript==
13
13
  top.window.hortimagic=window.hortimagic=function(t){"use strict";async function e(t){return new Promise(e=>setTimeout(e,t))}function o(t){return t=(t=(t=(t=(t=(t=t.replace("&","&amp;")).replace("<","&lt;")).replace(">","&gt;")).replace('"',"&quot;")).replace("'","&#039;")).replace("\\","&#092;")}function i(t){return t=(t=(t=(t=(t=(t=t.replace("&lt;","<")).replace("&gt;",">")).replace("&quot;",'"')).replace("&#039;","'")).replace("&#092;","\\")).replace("&amp;","&")}function n(){return window.myself?window.myself:null}function s(){return window.uid?window.uid:null}function r(){return window.inputcolorhex?window.inputcolorhex:null}const l=Object.freeze(Object.defineProperty({__proto__:null,addStyle:function(t){let e=document.createElement("style");e.innerText=t,document.body.append(e)},changeRoom:function(t){(t=String(t))&&window.Objs.mapHolder?.function?.roomchanger(t)},compressCSS:function(t){return t=(t=(t=(t=(t=t.replace(/\s{2,}/g," ")).replace(/\/\*[\s\S]*?\*\//g,"")).replace(/\s*([{};:,])\s*/g,"$1")).replace(/;\s*}/g,"}")).trim()},compressHTML:function(t){return t=(t=(t=(t=t.replace(/>\s+</g,"><")).replace(/\s{2,}/g," ")).replace(/<!--[\s\S]*?-->/g,"")).trim()},generatePrivateMessageBubble:function(t,e,i){window.privatechatfunc&&window.privatechatfunc([Math.floor(Date.now()/1e3).toString(10),s(),o(n()),o(window.avatar2&&window.avatarconv?window.avatarconv(window.avatar2):null),o(e),o(r()),"",o(r()),"","",i,t,"","","","",""].join(">"))},getAllOnlineUserInfo:function(){let t=window.Objs.mapHolder.Assets.userJson;return t?Object.keys(t).map(e=>{let o=t[e];return{name:o[2],uid:o[8],color:o[3],avatar:o[0],roomId:o[4],personalizedSignature:o[6]}}):null},getOnlineUserInfoById:function(t){t=String(t);let e=window.Objs.mapHolder?.function?.findUserByUid?.(t);return e?{name:e[2],uid:t,color:e[3],avatar:e[0],roomId:e[4],personalizedSignature:e[6]}:null},getRoomId:function(){return window.roomn?window.roomn:null},getRoomInfoById:function(t){let e=window.Objs.mapHolder?.Assets?.roomJson?.[t];if(e){let t=e[5].split("&&").map(t=>t.split(" & ")),o=i(t[0][0]),n=o.indexOf(" ");return{name:e[1],color:e[2],roomPath:e[0].split("_"),description:o.slice(n+1),roomImage:o.slice(0,n),currentUserNum:"number"==typeof e[7]?e[7]:"hidden",ownerName:t[1][0],member:t[4].map(t=>({name:i(t.slice(1)),auth:"0"==t[0]?"member":"1"==t[0]?"admin":"unknow"}))}}return null},getUserInputColor:r,getUserName:n,getUserUid:s,htmlSpecialCharsDecode:i,htmlSpecialCharsEscape:o,sleep:e,switchRoom:function(t){window.Objs.mapHolder?.function?.roomchanger&&window.Objs.mapHolder.function.roomchanger(t)}},Symbol.toStringTag,{value:"Module"}));class a{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.designation="",this.messageUid=""}}class c{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.messageUid=""}}class h{constructor(){this.messageName="",this.uid="",this.data=""}}class d{constructor(){this.username="",this.avatar="",this.message="",this.color="",this.gender="",this.timeStamp="",this.uid=""}}class p{constructor(){this.privateUID="",this.uid="",this.messageUid="",this.dataUid=""}}class u{constructor(){this.userMessageList=[]}}class g{constructor(){this.result="",this.stockPrice=NaN,this.totalStock=NaN,this.holdingAmount=NaN,this.totalEquity=NaN,this.balance=NaN}}class m{constructor(){this.message=""}}const f=Object.freeze(Object.defineProperty({__proto__:null,Danmu:d,Hidden:h,Private:c,Public:a,Stock:g,System:u,Unkonw:m,Withdrawn:p},Symbol.toStringTag,{value:"Module"}));let v=[];function b(t){return t instanceof a?"public":t instanceof c?"private":t instanceof h?"hidden":t instanceof d?"danmu":t instanceof p?"withdrawn":t instanceof u?"system":t instanceof g?"stock":"unknown"}function y(t){let e=new a,o=t.split(">");return e.timeStamp=o[0],e.headPortrait=o[1],e.name=o[2],e.message=o[3],e.color=o[5],e.gender=o[6],e.uid=o[8],e.designation=o[9],e.messageUid=o[10],e}function w(t){let e=new c,o=t.split(">");return e.timeStamp=o[0].slice(1),e.uid=o[1],e.name=o[2],e.headPortrait=o[3],e.message=o[4],e.color=o[5],e.gender=o[8],e.messageUid=o[10],e}function x(t){let e=new d,o=t.split(">");return e.username=o[0],e.message=o[1],e.color=o[2],e.gender=o[4],e.avatar=o[5],e.timeStamp=o[6],e.uid=o[7],e}function $(t){if(v=[],/^"[^"].*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(y(e[t]))}else if(/^"".*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(w(e[t]))}else if(/^=.*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(x(e[t]))}else/^[/]<.*>[0-9|a-z]{13}:.*/gs.test(t)?v.push(function(t){let e,o=new h;return e=t.match(/(?<=^[/]<).*(?=>[0-9|a-z]{13}:.*)/gs),o.messageName=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>)[0-9|a-z]{13}(?=:.*)/gs),o.uid=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>[0-9|a-z]{13}:).*/gs),o.data=null==e?"":e[0],o}(t)):/^v0.*/gs.test(t)?v.push(function(t){let e=new p;return"#"==t[2]?(e.privateUID="",e.uid=t.slice(3,16),e.messageUid=t.slice(17,29),e.dataUid=t.slice(3,29)):(e.privateUID=t.slice(3,16),e.uid=t.slice(17,30),e.messageUid=t.slice(31),e.dataUid=t.slice(17)),e}(t)):/^%\*".*/gs.test(t)?v.push(function(t){let e=new u;return e.userMessageList=t.split("<"),e}(t)):/^>.*/gs.test(t)?v.push(function(t){let e=new g;if(e.result=t[2],"*"==e.result)return e;if(">"==e.result)return e.holdingAmount=parseInt(t.slice(2)),e;if("<"==e.result)return e.balance=parseInt(t.slice(2)),e;{let o=t.split('"');if(5==o.length)return e.stockPrice=parseFloat(o[2]),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[3]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[4]),e;if(4==o.length)return e.stockPrice=parseFloat(o[1])/parseInt(o[0].slice(1)),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[2]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[3]),e}return e}(t)):v.push(function(t){let e=new m;return e.message=t,e}(t))}const _=Object.freeze(Object.defineProperty({__proto__:null,decodeMessage:$,judegMessageClass:b,get messageObjList(){return v}},Symbol.toStringTag,{value:"Module"}));class S{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}off(t,e){this.events[t]&&(e?this.events[t]=this.events[t].filter(t=>t!==e):delete this.events[t])}once(t,e){const o=(...i)=>{e(...i),this.off(t,o)};this.on(t,o)}emit(t,...e){const o=this.events[t];return!(!o||0===o.length)&&([...o].forEach(t=>t(...e)),!0)}}const k=Symbol(),A=Object.getPrototypeOf,C=new WeakMap,O=t=>(t=>t&&(C.has(t)?C.get(t):A(t)===Object.prototype||A(t)===Array.prototype))(t)&&t[k]||null,E=(t,e=!0)=>{C.set(t,e)},M={},z=t=>"object"==typeof t&&null!==t,H=(t,e)=>{const o=j.get(t);if((null==o?void 0:o[0])===e)return o[1];const i=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return E(i,!0),j.set(t,[e,i]),Reflect.ownKeys(t).forEach(e=>{if(Object.getOwnPropertyDescriptor(i,e))return;const o=Reflect.get(t,e),{enumerable:n}=Reflect.getOwnPropertyDescriptor(t,e),s={value:o,enumerable:n,configurable:!0};if(P.has(o))E(o,!1);else if(T.has(o)){const[t,e]=T.get(o);s.value=H(t,e())}Object.defineProperty(i,e,s)}),Object.preventExtensions(i)},T=new WeakMap,P=new WeakSet,j=new WeakMap,L=[1],B=new WeakMap;let I=Object.is,D=(t,e)=>new Proxy(t,e),N=t=>z(t)&&!P.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),U=H,R=(t,e,o,i)=>({deleteProperty(t,e){const n=Reflect.get(t,e);o(e);const s=Reflect.deleteProperty(t,e);return s&&i(["delete",[e],n]),s},set(n,s,r,l){const a=!t()&&Reflect.has(n,s),c=Reflect.get(n,s,l);if(a&&(I(c,r)||B.has(r)&&I(c,B.get(r))))return!0;o(s),z(r)&&(r=O(r)||r);const h=!T.has(r)&&N(r)?V(r):r;return e(s,h),Reflect.set(n,s,h,l),i(["set",[s],r,c]),!0}});function V(t={}){if(!z(t))throw new Error("object required");const e=B.get(t);if(e)return e;let o=L[0];const i=new Set,n=(t,e=++L[0])=>{o!==e&&(s=o=e,i.forEach(o=>o(t,e)))};let s=o;const r=t=>(e,o)=>{const i=[...e];i[1]=[t,...i[1]],n(i,o)},l=new Map;let a=!0;const c=R(()=>a,(t,e)=>{const o=!P.has(e)&&T.get(e);if(o){if("production"!==(M?"production":void 0)&&l.has(t))throw new Error("prop listener already exists");if(i.size){const e=o[2](r(t));l.set(t,[o,e])}else l.set(t,[o])}},t=>{var e;const o=l.get(t);o&&(l.delete(t),null==(e=o[1])||e.call(o))},n),h=D(t,c);B.set(t,h);const d=[t,(t=L[0])=>(s!==t&&(s=t,l.forEach(([e])=>{const i=e[1](t);i>o&&(o=i)})),o),t=>{i.add(t),1===i.size&&l.forEach(([t,e],o)=>{if("production"!==(M?"production":void 0)&&e)throw new Error("remove already exists");const i=t[2](r(o));l.set(o,[t,i])});return()=>{i.delete(t),0===i.size&&l.forEach(([t,e],o)=>{e&&(e(),l.set(o,[t]))})}}];return T.set(h,d),Reflect.ownKeys(t).forEach(e=>{const o=Object.getOwnPropertyDescriptor(t,e);"value"in o&&o.writable&&(h[e]=t[e])}),a=!1,h}function F(t,e,o){const i=T.get(t);let n;"production"===(M?"production":void 0)||i||console.warn("Please use proxy object");const s=[],r=i[2];let l=!1;const a=r(t=>{s.push(t),o?e(s.splice(0)):n||(n=Promise.resolve().then(()=>{n=void 0,l&&e(s.splice(0))}))});return l=!0,()=>{l=!1,a()}}const q="store",W="HortimagicStore",G={proxy:V,subscribe:F,snapshot:function(t){const e=T.get(t);"production"===(M?"production":void 0)||e||console.warn("Please use proxy object");const[o,i]=e;return U(o,i())}},X=V({autoSave:!1,logFlag:{log:!1,info:!0,debug:!0,warn:!0,error:!0},messageLogFlag:{send:!1,decode:!1,emit:!0,receive:!1},logListLength:20,scriptList:[]});function J(){localStorage.setItem(W,JSON.stringify(X)),tt.debug(q,"保存至本地存储")}function Z(){let t=localStorage.getItem(W);if(null!=t){const e=JSON.parse(t);e.autoSave?X.autoSave=1==e.autoSave:X.autoSave=!1,e.logFlag?X.logFlag=e.logFlag:isNaN(e.logLevel)&&(X.logFlag=e.logLevel),e.scriptList&&(X.scriptList=e.scriptList),e.logListLength&&(X.logListLength=e.logListLength)}else X.logFlag.log=!0,X.logFlag.info=!0,X.logFlag.debug=!0,X.logFlag.warn=!0,X.logFlag.error=!0,X.autoSave=!0,X.logListLength=20,X.messageLogFlag.decode=!1,X.messageLogFlag.emit=!0,X.messageLogFlag.send=!1,X.messageLogFlag.receive=!1,X.scriptList=[],tt.debug(q,"没有读取到配置,使用默认配置"),J();tt.debug(q,"从本地存储加载")}function Y(){Z(),F(X,()=>{X.autoSave&&J()})}const K=Object.freeze(Object.defineProperty({__proto__:null,HortimagicStore:X,initStore:Y,loadStore:Z,reactive:G,saveStore:J},Symbol.toStringTag,{value:"Module"})),Q=new S,tt={log(t,...e){X.logFlag.log&&(Q.emit("log",t,...e),console.log(t,...e))},debug(t,...e){X.logFlag.debug&&(Q.emit("log",t,...e),console.debug(t,...e))},info(t,...e){X.logFlag.info&&(Q.emit("log",t,...e),console.info(t,...e))},warn(t,...e){X.logFlag.warn&&(Q.emit("log",t,...e),console.warn(t,...e))},error(t,...e){X.logFlag.error&&(Q.emit("log",t,...e),console.error(t,...e))}},et=Object.freeze(Object.defineProperty({__proto__:null,logEmitter:Q,logger:tt},Symbol.toStringTag,{value:"Module"})),ot="socket-tools",it=new S;async function nt(){tt.debug(ot,"代理网络");for(let o=0;o<30;o++)try{if(tt.debug(ot,"等待网络连接",o),null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send){tt.debug(ot,"网络连接成功");break}await e(500);continue}catch(t){tt.error(ot,t)}null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send?(st.originalSend=window.socket.send,window.socket.send=st.send,st.originalOnmessage=window.socket._onmessage,window.socket._onmessage=st.onmessage):tt.error("连接失败")}const st={beforeSend:async function(t){return t},originalSend:function(t){return t},afterSend:function(t){return t},send:async function(t){X.messageLogFlag.send&&tt.debug(ot,"发送",{message:t});let e=await st.beforeSend(t);try{null!=e&&(st.originalSend(e),st.afterSend(e))}catch(o){tt.error(ot,o)}},beforeOnmessage:async function(t){return X.messageLogFlag.decode&&tt.debug(ot,"解码",{message:t}),$(t),t},originalOnmessage:function(t){return t},afterOnmessage:async function(t){for(let e of v)X.messageLogFlag.emit&&tt.debug(ot,`触发${b(e)}消息`,{message:t,messageObj:e}),it.emit(b(e),e);return t},onmessage:async function(t){X.messageLogFlag.receive&&tt.debug(ot,"接收",{message:t});let e=await st.beforeOnmessage(t);try{null!=e&&(st.originalOnmessage(e),st.afterOnmessage(e))}catch(o){tt.error("捕获到错误",o)}},initSocket:nt},rt=Object.freeze(Object.defineProperty({__proto__:null,initSocket:nt,messageEmitter:it,socketTools:st},Symbol.toStringTag,{value:"Module"}));function lt(t,e){return"cut"===t?`{0${JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}`:JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}const at=Object.freeze(Object.defineProperty({__proto__:null,danmu:function(t,e,o="0"){return`~{"t":"${t}","c":"${e}","v":${o}}`},hidden:function(t,e,o){return`/<${t}>${e}:${o}`},like:function(t,e=""){return`+*${t}${e}`},musicCard:function(t,e,o,i,n,s){return lt(`m__4=${t}>${e}>${o}>${i}>${n}>${s}`,n)},privateChat:function(t,e,o){return JSON.stringify({g:t,m:e,mc:o,i:Math.random().toString().slice(2,12)})},publicChat:lt,stockRequest:function(t){return null==t?">#":t>0?`>$${Math.round(Math.abs(t))}`:t<0?`>@${Math.round(Math.abs(t))}`:">#"},videoCard:function(t,e,o,i,n,s,r){return lt(`m__4*${t}>${e}>${o}>${i}>${n}>${s}>${r}`,n)},withdrawn:function(t,e=""){return""==e?`v0#${t}`:`v0*${e}#${t}`}},Symbol.toStringTag,{value:"Module"})),ct="elements-hooks";let ht={movePanelHolder:document.querySelector("#movePanelHolder"),functionHolder:document.querySelector("#functionHolder"),functionButtonGroupList:[...document.querySelectorAll(".functionButton.functionButtonGroup")],msgholderBox:document.querySelector("#msgholder .fullBox.msgholderBox"),homeHolderMsgBox:document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),sessionHolderPmTaskBoxItems:[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],moveinputDisplay:document.querySelector("#moveinputDisplay"),moveinput:document.getElementById("moveinput"),moveinputSendBtnFunc:document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),moveinputSendBtnSend:document.querySelector("#moveinputDisplay #moveinputSendBtnSend")};function dt(){ht.movePanelHolder=document.querySelector("#movePanelHolder"),ht.functionHolder=document.querySelector("#functionHolder"),ht.functionButtonGroupList=[...document.querySelectorAll(".functionButton.functionButtonGroup")],ht.msgholderBox=document.querySelector("#msgholder .fullBox .fullBox.msgholderBox"),ht.homeHolderMsgBox=document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),ht.sessionHolderPmTaskBoxItems=[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],ht.moveinputDisplay=document.querySelector("#moveinputDisplay"),ht.moveinput=document.getElementById("moveinput"),ht.moveinputSendBtnFunc=document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),ht.moveinputSendBtnSend=document.querySelector("#moveinputDisplay #moveinputSendBtnSend")}let pt={elementHooks:{moveinput:{oninputBefore:()=>!0,oninputAfter:()=>!0,onblurBefore:()=>!0,onblurAfter:()=>!0,onfocusBefore:()=>!0,onfocusAfter:()=>!0}},functionHooks:{processer:{onBefore:(t,e,o,i)=>!0,onAfter:(t,e,o,i)=>!0}},replaceMoveinput:()=>{try{let t=ht.moveinput.oninput;ht.moveinput.oninput=function(){1==pt.elementHooks.moveinput.oninputBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.oninputAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onblur=function(){1==pt.elementHooks.moveinput.onblurBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onblurAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onfocus=function(){1==pt.elementHooks.moveinput.onfocusBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onfocusAfter())}}catch(t){tt.error(ct,t)}},replaceButtonProcesser:()=>{try{let t=buttonProcesser;buttonProcesser=(e,o,i,n)=>{1==pt.functionHooks.processer.onBefore(e,o,i,n)&&(t(e,o,i,n),pt.functionHooks.processer.onAfter(e,o,i,n))}}catch(t){tt.error(ct,t)}}};function ut(){pt.replaceMoveinput(),pt.replaceButtonProcesser()}const gt=Object.freeze(Object.defineProperty({__proto__:null,Hooks:pt,elements:ht,initHooks:ut,refreshAll:dt},Symbol.toStringTag,{value:"Module"})),mt="script-tools",ft=[];class vt{constructor(t,e,o=!0){this.name=t,this.url=e,this.enable=o}}function bt(t){return tt.debug(mt,`添加${t.name},${t.url}`),xt(t.url)>=0||$t(t.name)>=0?(tt.warn(mt,`脚本${t.name}${t.url}已经存在`),!1):(X.scriptList.push(t),!0)}function yt(t){tt.debug(mt,`更新脚本${t.name}${t.url}`);for(let e=0;e<X.scriptList.length;e++){if(X.scriptList[e].name===t.name)return X.scriptList[e]=t,!0;if(X.scriptList[e].url===t.url)return X.scriptList[e]=t,!0}return!1}function wt(t){tt.debug(mt,`删除${t.name},${t.url}`);let e=$t(t.name);return e>=0?(X.scriptList.splice(e,1),!0):(e=xt(t.url),e>=0&&(X.scriptList.splice(e,1),!0))}function xt(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].url==t)return e;return-1}function $t(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].name==t)return e;return-1}function _t(t){if(ft.includes(t.url))return tt.warn(mt,`脚本${t.name}${t.url}已经注入`),!1;{const e=document.createElement("script");return e.src=t.url,document.body.appendChild(e),ft.push(t.url),tt.debug(mt,`注入${t.name}`),!0}}function St(){X.scriptList.forEach(t=>{t.enable&&!ft.includes(t.url)&&_t(t)})}const kt=Object.freeze(Object.defineProperty({__proto__:null,Script:vt,addScriptToList:bt,clearScriptList:function(){X.scriptList=[]},findScriptByName:$t,findScriptByUrl:xt,ingecteScript:_t,ingecteScriptList:St,ingectedUrlList:ft,removeScriptFromList:wt,updateScriptInList:yt},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,Emitter:S,Message:f,decoder:_,elements_hooks:gt,encoder:at,log_tools:et,script_tools:kt,socket_tools:rt,store:K,tools:l},Symbol.toStringTag,{value:"Module"})),Ct=globalThis,Ot=Ct.ShadowRoot&&(void 0===Ct.ShadyCSS||Ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),Mt=new WeakMap;let zt=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Ot&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=Mt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}};const Ht=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1],t[0]);return new zt(o,t,Et)},Tt=Ot?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new zt("string"==typeof t?t:t+"",void 0,Et))(e)})(t):t,{is:Pt,defineProperty:jt,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Bt,getOwnPropertySymbols:It,getPrototypeOf:Dt}=Object,Nt=globalThis,Ut=Nt.trustedTypes,Rt=Ut?Ut.emptyScript:"",Vt=Nt.reactiveElementPolyfillSupport,Ft=(t,e)=>t,qt={toAttribute(t,e){switch(e){case Boolean:t=t?Rt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(i){o=null}}return o}},Wt=(t,e)=>!Pt(t,e),Gt={attribute:!0,type:String,converter:qt,reflect:!1,useDefault:!1,hasChanged:Wt};Symbol.metadata??=Symbol("metadata"),Nt.litPropertyMetadata??=new WeakMap;let Xt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Gt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&jt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:n}=Lt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const s=i?.call(this);n?.call(this,e),this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Gt}static _$Ei(){if(this.hasOwnProperty(Ft("elementProperties")))return;const t=Dt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ft("properties"))){const t=this.properties,e=[...Bt(t),...It(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[e,o]of this.elementProperties){const t=this._$Eu(e,o);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(Tt(t))}else void 0!==t&&e.push(Tt(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Ot)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const o of e){const e=document.createElement("style"),i=Ct.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const n=(void 0!==o.converter?.toAttribute?o.converter:qt).toAttribute(e,o.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:qt;this._$Em=i;const s=n.fromAttribute(e,t.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){const i=this.constructor,n=this[t];if(o??=i.getPropertyOptions(t),!((o.hasChanged??Wt)(n,e)||o.useDefault&&o.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:n},s){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==n||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t){const{wrapped:t}=o,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,o,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Xt[Ft("elementProperties")]=new Map,Xt[Ft("finalized")]=new Map,Vt?.({ReactiveElement:Xt}),(Nt.reactiveElementVersions??=[]).push("2.1.1");const Jt=globalThis,Zt=Jt.trustedTypes,Yt=Zt?Zt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Kt="$lit$",Qt=`lit$${Math.random().toFixed(9).slice(2)}$`,te="?"+Qt,ee=`<${te}>`,oe=document,ie=()=>oe.createComment(""),ne=t=>null===t||"object"!=typeof t&&"function"!=typeof t,se=Array.isArray,re="[ \t\n\f\r]",le=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ae=/-->/g,ce=/>/g,he=RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),de=/'/g,pe=/"/g,ue=/^(?:script|style|textarea|title)$/i,ge=(ye=1,(t,...e)=>({_$litType$:ye,strings:t,values:e})),me=Symbol.for("lit-noChange"),fe=Symbol.for("lit-nothing"),ve=new WeakMap,be=oe.createTreeWalker(oe,129);var ye;function we(t,e){if(!se(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Yt?Yt.createHTML(e):e}class xe{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,c]=((t,e)=>{const o=t.length-1,i=[];let n,s=2===e?"<svg>":3===e?"<math>":"",r=le;for(let l=0;l<o;l++){const e=t[l];let o,a,c=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===le?"!--"===a[1]?r=ae:void 0!==a[1]?r=ce:void 0!==a[2]?(ue.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=he):void 0!==a[3]&&(r=he):r===he?">"===a[0]?(r=n??le,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,o=a[1],r=void 0===a[3]?he:'"'===a[3]?pe:de):r===pe||r===de?r=he:r===ae||r===ce?r=le:(r=he,n=void 0);const d=r===he&&t[l+1].startsWith("/>")?" ":"";s+=r===le?e+ee:c>=0?(i.push(o),e.slice(0,c)+Kt+e.slice(c)+Qt+d):e+Qt+(-2===c?l:d)}return[we(t,s+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=xe.createElement(a,o),be.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=be.nextNode())&&l.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Kt)){const e=c[s++],o=i.getAttribute(t).split(Qt),r=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:r[2],strings:o,ctor:"."===r[1]?Ae:"?"===r[1]?Ce:"@"===r[1]?Oe:ke}),i.removeAttribute(t)}else t.startsWith(Qt)&&(l.push({type:6,index:n}),i.removeAttribute(t));if(ue.test(i.tagName)){const t=i.textContent.split(Qt),e=t.length-1;if(e>0){i.textContent=Zt?Zt.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],ie()),be.nextNode(),l.push({type:2,index:++n});i.append(t[e],ie())}}}else if(8===i.nodeType)if(i.data===te)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(Qt,t+1));)l.push({type:7,index:n}),t+=Qt.length-1}n++}}static createElement(t,e){const o=oe.createElement("template");return o.innerHTML=t,o}}function $e(t,e,o=t,i){if(e===me)return e;let n=void 0!==i?o._$Co?.[i]:o._$Cl;const s=ne(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),void 0===s?n=void 0:(n=new s(t),n._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=n:o._$Cl=n),void 0!==n&&(e=$e(t,n._$AS(t,e.values),n,i)),e}class _e{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??oe).importNode(e,!0);be.currentNode=i;let n=be.nextNode(),s=0,r=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new Se(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new Ee(n,this,t)),this._$AV.push(e),l=o[++r]}s!==l?.index&&(n=be.nextNode(),s++)}return be.currentNode=oe,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class Se{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=fe,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$e(this,t,e),ne(t)?t===fe||null==t||""===t?(this._$AH!==fe&&this._$AR(),this._$AH=fe):t!==this._$AH&&t!==me&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>se(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==fe&&ne(this._$AH)?this._$AA.nextSibling.data=t:this.T(oe.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=xe.createElement(we(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new _e(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=ve.get(t.strings);return void 0===e&&ve.set(t.strings,e=new xe(t)),e}k(t){se(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const n of t)i===e.length?e.push(o=new Se(this.O(ie()),this.O(ie()),this,this.options)):o=e[i],o._$AI(n),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ke{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,n){this.type=1,this._$AH=fe,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=fe}_$AI(t,e=this,o,i){const n=this.strings;let s=!1;if(void 0===n)t=$e(this,t,e,0),s=!ne(t)||t!==this._$AH&&t!==me,s&&(this._$AH=t);else{const i=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=$e(this,i[o+r],e,r),l===me&&(l=this._$AH[r]),s||=!ne(l)||l!==this._$AH[r],l===fe?t=fe:t!==fe&&(t+=(l??"")+n[r+1]),this._$AH[r]=l}s&&!i&&this.j(t)}j(t){t===fe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ae extends ke{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===fe?void 0:t}}class Ce extends ke{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==fe)}}class Oe extends ke{constructor(t,e,o,i,n){super(t,e,o,i,n),this.type=5}_$AI(t,e=this){if((t=$e(this,t,e,0)??fe)===me)return;const o=this._$AH,i=t===fe&&o!==fe||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==fe&&(o===fe||i);i&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ee{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){$e(this,t)}}const Me=Jt.litHtmlPolyfillSupport;Me?.(xe,Se),(Jt.litHtmlVersions??=[]).push("3.3.1");const ze=globalThis;let He=class extends Xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const i=o?.renderBefore??e;let n=i._$litPart$;if(void 0===n){const t=o?.renderBefore??null;i._$litPart$=n=new Se(e.insertBefore(ie(),t),t,void 0,o??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return me}};He._$litElement$=!0,He.finalized=!0,ze.litElementHydrateSupport?.({LitElement:He});const Te=ze.litElementPolyfillSupport;Te?.({LitElement:He}),(ze.litElementVersions??=[]).push("4.2.1");const Pe=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},je={attribute:!0,type:String,converter:qt,reflect:!1,hasChanged:Wt},Le=(t=je,e,o)=>{const{kind:i,metadata:n}=o;let s=globalThis.litPropertyMetadata.get(n);if(void 0===s&&globalThis.litPropertyMetadata.set(n,s=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),s.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const n=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const n=this[i];e.call(this,o),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)};function Be(t){return(e,o)=>"object"==typeof o?Le(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}function Ie(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var De=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ue=(t,e,o,i)=>{for(var n,s=i>1?void 0:i?Ne(e,o):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(i?n(e,o,s):n(s))||s);return i&&s&&De(e,o,s),s};let Re=[],Ve=99999,Fe=class extends He{constructor(){super(),this.width=320,this.height=490,this.headerBackgroundColor="rgba(66,134,182,0.9)",this.headerColor="rgb(255,255,255)",this.bodyBackgroundColor="rgba(255,255,255,0.7)",this.bodyColor="rgba(23, 23, 23, 0.9)",this.footerBackgroundColor="rgba(255,255,255,0.7)",this.buttonBackground="rgba(255,255,255,0.9)",this.buttonColor="rgba(66,134,182,0.9)",this.titleContent="面板",this.leftButtonText="",this.rightButtonText="",this.isDisplay=!1,this.zIndex=Ve,this.icon="magic-wand",this.leftIcon="magic-wand",this.rightIcon="magic-wand",this.left=(window.innerWidth-this.width)/2,this.top=(window.innerHeight-(this.height+80))/2,this.dragging=!1,Re.push(this),this.zIndex=++Ve}hideMovePanel(){this.isDisplay=!1,this.dispatchEvent(new CustomEvent("close",{detail:{isDisplay:this.isDisplay,message:"关闭事件"},bubbles:!0,composed:!0}))}showMovePanel(){this.isDisplay=!0,this.dispatchEvent(new CustomEvent("show",{detail:{isDisplay:this.isDisplay},bubbles:!0,composed:!0}))}toogleDisplay(){this.isDisplay?this.hideMovePanel():this.showMovePanel()}mouseDragging(t){let e=this.left,o=this.top,i=t.clientX-e,n=t.clientY-o;0==this.dragging&&(this.dragging=!0),document.onmousemove=t=>{this.dragging&&(this.left=t.clientX-i,this.top=t.clientY-n)},document.onmouseup=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}touchDragging(t){let e=this.left,o=this.top,i=t.touches[0].clientX-e,n=t.touches[0].clientY-o;0==this.dragging&&(this.dragging=!0),document.ontouchmove=t=>{this.dragging&&(this.left=t.touches[0].clientX-i,this.top=t.touches[0].clientY-n)},document.ontouchend=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}putTop(){let t=!1;if(Re.includes(this)){for(let t=0;t<Re.length;t++)Re[t].zIndex>this.zIndex&&(Re[t].zIndex=Re[t].zIndex-1);this.zIndex=Ve,t=!0}else tt.warn("MovePanel","置顶失败,窗口不在列表中"),t=!1;return t}putTopToggel(){this.zIndex!=Ve?(this.putTop(),this.showMovePanel()):this.toogleDisplay()}render(){return ge`
14
14
  <div
@@ -724,7 +724,6 @@ style="width:${this.size}; height:${this.size};"
724
724
  <div
725
725
  class="switch ${this.disabled?"disabled":""} ${this.loading?"loading":""} ${this.checked?"checked":""}"
726
726
  @click="${this.change}"
727
- @touchstart="${this.change}"
728
727
  style="--switch-color: ${this.color}"
729
728
  >
730
729
  <div class="switch-inner">
@@ -8,7 +8,7 @@
8
8
  // @grant none
9
9
  // @run-at onmessage-end
10
10
  // @license MIT
11
- // @buildtime 2026-01-02T09:03:04.108Z
11
+ // @buildtime 2026-01-02T09:13:18.438Z
12
12
  // ==/UserScript==
13
13
  top.window.hortimagic=window.hortimagic=function(t){"use strict";async function e(t){return new Promise(e=>setTimeout(e,t))}function o(t){return t=(t=(t=(t=(t=(t=t.replace("&","&amp;")).replace("<","&lt;")).replace(">","&gt;")).replace('"',"&quot;")).replace("'","&#039;")).replace("\\","&#092;")}function i(t){return t=(t=(t=(t=(t=(t=t.replace("&lt;","<")).replace("&gt;",">")).replace("&quot;",'"')).replace("&#039;","'")).replace("&#092;","\\")).replace("&amp;","&")}function n(){return window.myself?window.myself:null}function s(){return window.uid?window.uid:null}function r(){return window.inputcolorhex?window.inputcolorhex:null}const l=Object.freeze(Object.defineProperty({__proto__:null,addStyle:function(t){let e=document.createElement("style");e.innerText=t,document.body.append(e)},changeRoom:function(t){(t=String(t))&&window.Objs.mapHolder?.function?.roomchanger(t)},compressCSS:function(t){return t=(t=(t=(t=(t=t.replace(/\s{2,}/g," ")).replace(/\/\*[\s\S]*?\*\//g,"")).replace(/\s*([{};:,])\s*/g,"$1")).replace(/;\s*}/g,"}")).trim()},compressHTML:function(t){return t=(t=(t=(t=t.replace(/>\s+</g,"><")).replace(/\s{2,}/g," ")).replace(/<!--[\s\S]*?-->/g,"")).trim()},generatePrivateMessageBubble:function(t,e,i){window.privatechatfunc&&window.privatechatfunc([Math.floor(Date.now()/1e3).toString(10),s(),o(n()),o(window.avatar2&&window.avatarconv?window.avatarconv(window.avatar2):null),o(e),o(r()),"",o(r()),"","",i,t,"","","","",""].join(">"))},getAllOnlineUserInfo:function(){let t=window.Objs.mapHolder.Assets.userJson;return t?Object.keys(t).map(e=>{let o=t[e];return{name:o[2],uid:o[8],color:o[3],avatar:o[0],roomId:o[4],personalizedSignature:o[6]}}):null},getOnlineUserInfoById:function(t){t=String(t);let e=window.Objs.mapHolder?.function?.findUserByUid?.(t);return e?{name:e[2],uid:t,color:e[3],avatar:e[0],roomId:e[4],personalizedSignature:e[6]}:null},getRoomId:function(){return window.roomn?window.roomn:null},getRoomInfoById:function(t){let e=window.Objs.mapHolder?.Assets?.roomJson?.[t];if(e){let t=e[5].split("&&").map(t=>t.split(" & ")),o=i(t[0][0]),n=o.indexOf(" ");return{name:e[1],color:e[2],roomPath:e[0].split("_"),description:o.slice(n+1),roomImage:o.slice(0,n),currentUserNum:"number"==typeof e[7]?e[7]:"hidden",ownerName:t[1][0],member:t[4].map(t=>({name:i(t.slice(1)),auth:"0"==t[0]?"member":"1"==t[0]?"admin":"unknow"}))}}return null},getUserInputColor:r,getUserName:n,getUserUid:s,htmlSpecialCharsDecode:i,htmlSpecialCharsEscape:o,sleep:e,switchRoom:function(t){window.Objs.mapHolder?.function?.roomchanger&&window.Objs.mapHolder.function.roomchanger(t)}},Symbol.toStringTag,{value:"Module"}));class a{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.designation="",this.messageUid=""}}class c{constructor(){this.timeStamp="",this.headPortrait="",this.name="",this.message="",this.color="",this.gender="",this.uid="",this.messageUid=""}}class h{constructor(){this.messageName="",this.uid="",this.data=""}}class d{constructor(){this.username="",this.avatar="",this.message="",this.color="",this.gender="",this.timeStamp="",this.uid=""}}class p{constructor(){this.privateUID="",this.uid="",this.messageUid="",this.dataUid=""}}class u{constructor(){this.userMessageList=[]}}class g{constructor(){this.result="",this.stockPrice=NaN,this.totalStock=NaN,this.holdingAmount=NaN,this.totalEquity=NaN,this.balance=NaN}}class m{constructor(){this.message=""}}const f=Object.freeze(Object.defineProperty({__proto__:null,Danmu:d,Hidden:h,Private:c,Public:a,Stock:g,System:u,Unkonw:m,Withdrawn:p},Symbol.toStringTag,{value:"Module"}));let v=[];function b(t){return t instanceof a?"public":t instanceof c?"private":t instanceof h?"hidden":t instanceof d?"danmu":t instanceof p?"withdrawn":t instanceof u?"system":t instanceof g?"stock":"unknown"}function y(t){let e=new a,o=t.split(">");return e.timeStamp=o[0],e.headPortrait=o[1],e.name=o[2],e.message=o[3],e.color=o[5],e.gender=o[6],e.uid=o[8],e.designation=o[9],e.messageUid=o[10],e}function w(t){let e=new c,o=t.split(">");return e.timeStamp=o[0].slice(1),e.uid=o[1],e.name=o[2],e.headPortrait=o[3],e.message=o[4],e.color=o[5],e.gender=o[8],e.messageUid=o[10],e}function x(t){let e=new d,o=t.split(">");return e.username=o[0],e.message=o[1],e.color=o[2],e.gender=o[4],e.avatar=o[5],e.timeStamp=o[6],e.uid=o[7],e}function $(t){if(v=[],/^"[^"].*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(y(e[t]))}else if(/^"".*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(w(e[t]))}else if(/^=.*/gs.test(t)){let e=t.slice(1).split("<");for(let t=e.length-1;t>=0;t--)v.push(x(e[t]))}else/^[/]<.*>[0-9|a-z]{13}:.*/gs.test(t)?v.push(function(t){let e,o=new h;return e=t.match(/(?<=^[/]<).*(?=>[0-9|a-z]{13}:.*)/gs),o.messageName=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>)[0-9|a-z]{13}(?=:.*)/gs),o.uid=null==e?"":e[0],e=t.match(/(?<=^[/]<.*>[0-9|a-z]{13}:).*/gs),o.data=null==e?"":e[0],o}(t)):/^v0.*/gs.test(t)?v.push(function(t){let e=new p;return"#"==t[2]?(e.privateUID="",e.uid=t.slice(3,16),e.messageUid=t.slice(17,29),e.dataUid=t.slice(3,29)):(e.privateUID=t.slice(3,16),e.uid=t.slice(17,30),e.messageUid=t.slice(31),e.dataUid=t.slice(17)),e}(t)):/^%\*".*/gs.test(t)?v.push(function(t){let e=new u;return e.userMessageList=t.split("<"),e}(t)):/^>.*/gs.test(t)?v.push(function(t){let e=new g;if(e.result=t[2],"*"==e.result)return e;if(">"==e.result)return e.holdingAmount=parseInt(t.slice(2)),e;if("<"==e.result)return e.balance=parseInt(t.slice(2)),e;{let o=t.split('"');if(5==o.length)return e.stockPrice=parseFloat(o[2]),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[3]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[4]),e;if(4==o.length)return e.stockPrice=parseFloat(o[1])/parseInt(o[0].slice(1)),e.totalStock=parseInt(o[0].slice(1)),e.holdingAmount=parseInt(o[2]),e.totalEquity=parseFloat(o[1]),e.balance=parseFloat(o[3]),e}return e}(t)):v.push(function(t){let e=new m;return e.message=t,e}(t))}const _=Object.freeze(Object.defineProperty({__proto__:null,decodeMessage:$,judegMessageClass:b,get messageObjList(){return v}},Symbol.toStringTag,{value:"Module"}));class S{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}off(t,e){this.events[t]&&(e?this.events[t]=this.events[t].filter(t=>t!==e):delete this.events[t])}once(t,e){const o=(...i)=>{e(...i),this.off(t,o)};this.on(t,o)}emit(t,...e){const o=this.events[t];return!(!o||0===o.length)&&([...o].forEach(t=>t(...e)),!0)}}const k=Symbol(),A=Object.getPrototypeOf,C=new WeakMap,O=t=>(t=>t&&(C.has(t)?C.get(t):A(t)===Object.prototype||A(t)===Array.prototype))(t)&&t[k]||null,E=(t,e=!0)=>{C.set(t,e)},M={},z=t=>"object"==typeof t&&null!==t,H=(t,e)=>{const o=j.get(t);if((null==o?void 0:o[0])===e)return o[1];const i=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return E(i,!0),j.set(t,[e,i]),Reflect.ownKeys(t).forEach(e=>{if(Object.getOwnPropertyDescriptor(i,e))return;const o=Reflect.get(t,e),{enumerable:n}=Reflect.getOwnPropertyDescriptor(t,e),s={value:o,enumerable:n,configurable:!0};if(P.has(o))E(o,!1);else if(T.has(o)){const[t,e]=T.get(o);s.value=H(t,e())}Object.defineProperty(i,e,s)}),Object.preventExtensions(i)},T=new WeakMap,P=new WeakSet,j=new WeakMap,L=[1],B=new WeakMap;let I=Object.is,D=(t,e)=>new Proxy(t,e),N=t=>z(t)&&!P.has(t)&&(Array.isArray(t)||!(Symbol.iterator in t))&&!(t instanceof WeakMap)&&!(t instanceof WeakSet)&&!(t instanceof Error)&&!(t instanceof Number)&&!(t instanceof Date)&&!(t instanceof String)&&!(t instanceof RegExp)&&!(t instanceof ArrayBuffer)&&!(t instanceof Promise),U=H,R=(t,e,o,i)=>({deleteProperty(t,e){const n=Reflect.get(t,e);o(e);const s=Reflect.deleteProperty(t,e);return s&&i(["delete",[e],n]),s},set(n,s,r,l){const a=!t()&&Reflect.has(n,s),c=Reflect.get(n,s,l);if(a&&(I(c,r)||B.has(r)&&I(c,B.get(r))))return!0;o(s),z(r)&&(r=O(r)||r);const h=!T.has(r)&&N(r)?V(r):r;return e(s,h),Reflect.set(n,s,h,l),i(["set",[s],r,c]),!0}});function V(t={}){if(!z(t))throw new Error("object required");const e=B.get(t);if(e)return e;let o=L[0];const i=new Set,n=(t,e=++L[0])=>{o!==e&&(s=o=e,i.forEach(o=>o(t,e)))};let s=o;const r=t=>(e,o)=>{const i=[...e];i[1]=[t,...i[1]],n(i,o)},l=new Map;let a=!0;const c=R(()=>a,(t,e)=>{const o=!P.has(e)&&T.get(e);if(o){if("production"!==(M?"production":void 0)&&l.has(t))throw new Error("prop listener already exists");if(i.size){const e=o[2](r(t));l.set(t,[o,e])}else l.set(t,[o])}},t=>{var e;const o=l.get(t);o&&(l.delete(t),null==(e=o[1])||e.call(o))},n),h=D(t,c);B.set(t,h);const d=[t,(t=L[0])=>(s!==t&&(s=t,l.forEach(([e])=>{const i=e[1](t);i>o&&(o=i)})),o),t=>{i.add(t),1===i.size&&l.forEach(([t,e],o)=>{if("production"!==(M?"production":void 0)&&e)throw new Error("remove already exists");const i=t[2](r(o));l.set(o,[t,i])});return()=>{i.delete(t),0===i.size&&l.forEach(([t,e],o)=>{e&&(e(),l.set(o,[t]))})}}];return T.set(h,d),Reflect.ownKeys(t).forEach(e=>{const o=Object.getOwnPropertyDescriptor(t,e);"value"in o&&o.writable&&(h[e]=t[e])}),a=!1,h}function F(t,e,o){const i=T.get(t);let n;"production"===(M?"production":void 0)||i||console.warn("Please use proxy object");const s=[],r=i[2];let l=!1;const a=r(t=>{s.push(t),o?e(s.splice(0)):n||(n=Promise.resolve().then(()=>{n=void 0,l&&e(s.splice(0))}))});return l=!0,()=>{l=!1,a()}}const q="store",W="HortimagicStore",G={proxy:V,subscribe:F,snapshot:function(t){const e=T.get(t);"production"===(M?"production":void 0)||e||console.warn("Please use proxy object");const[o,i]=e;return U(o,i())}},X=V({autoSave:!1,logFlag:{log:!1,info:!0,debug:!0,warn:!0,error:!0},messageLogFlag:{send:!1,decode:!1,emit:!0,receive:!1},logListLength:20,scriptList:[]});function J(){localStorage.setItem(W,JSON.stringify(X)),tt.debug(q,"保存至本地存储")}function Z(){let t=localStorage.getItem(W);if(null!=t){const e=JSON.parse(t);e.autoSave?X.autoSave=1==e.autoSave:X.autoSave=!1,e.logFlag?X.logFlag=e.logFlag:isNaN(e.logLevel)&&(X.logFlag=e.logLevel),e.scriptList&&(X.scriptList=e.scriptList),e.logListLength&&(X.logListLength=e.logListLength)}else X.logFlag.log=!0,X.logFlag.info=!0,X.logFlag.debug=!0,X.logFlag.warn=!0,X.logFlag.error=!0,X.autoSave=!0,X.logListLength=20,X.messageLogFlag.decode=!1,X.messageLogFlag.emit=!0,X.messageLogFlag.send=!1,X.messageLogFlag.receive=!1,X.scriptList=[],tt.debug(q,"没有读取到配置,使用默认配置"),J();tt.debug(q,"从本地存储加载")}function Y(){Z(),F(X,()=>{X.autoSave&&J()})}const K=Object.freeze(Object.defineProperty({__proto__:null,HortimagicStore:X,initStore:Y,loadStore:Z,reactive:G,saveStore:J},Symbol.toStringTag,{value:"Module"})),Q=new S,tt={log(t,...e){X.logFlag.log&&(Q.emit("log",t,...e),console.log(t,...e))},debug(t,...e){X.logFlag.debug&&(Q.emit("log",t,...e),console.debug(t,...e))},info(t,...e){X.logFlag.info&&(Q.emit("log",t,...e),console.info(t,...e))},warn(t,...e){X.logFlag.warn&&(Q.emit("log",t,...e),console.warn(t,...e))},error(t,...e){X.logFlag.error&&(Q.emit("log",t,...e),console.error(t,...e))}},et=Object.freeze(Object.defineProperty({__proto__:null,logEmitter:Q,logger:tt},Symbol.toStringTag,{value:"Module"})),ot="socket-tools",it=new S;async function nt(){tt.debug(ot,"代理网络");for(let o=0;o<30;o++)try{if(tt.debug(ot,"等待网络连接",o),null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send){tt.debug(ot,"网络连接成功");break}await e(500);continue}catch(t){tt.error(ot,t)}null==window.socket.__onmessage&&null!=window.socket._onmessage&&null!=window.socket.send?(st.originalSend=window.socket.send,window.socket.send=st.send,st.originalOnmessage=window.socket._onmessage,window.socket._onmessage=st.onmessage):tt.error("连接失败")}const st={beforeSend:async function(t){return t},originalSend:function(t){return t},afterSend:function(t){return t},send:async function(t){X.messageLogFlag.send&&tt.debug(ot,"发送",{message:t});let e=await st.beforeSend(t);try{null!=e&&(st.originalSend(e),st.afterSend(e))}catch(o){tt.error(ot,o)}},beforeOnmessage:async function(t){return X.messageLogFlag.decode&&tt.debug(ot,"解码",{message:t}),$(t),t},originalOnmessage:function(t){return t},afterOnmessage:async function(t){for(let e of v)X.messageLogFlag.emit&&tt.debug(ot,`触发${b(e)}消息`,{message:t,messageObj:e}),it.emit(b(e),e);return t},onmessage:async function(t){X.messageLogFlag.receive&&tt.debug(ot,"接收",{message:t});let e=await st.beforeOnmessage(t);try{null!=e&&(st.originalOnmessage(e),st.afterOnmessage(e))}catch(o){tt.error("捕获到错误",o)}},initSocket:nt},rt=Object.freeze(Object.defineProperty({__proto__:null,initSocket:nt,messageEmitter:it,socketTools:st},Symbol.toStringTag,{value:"Module"}));function lt(t,e){return"cut"===t?`{0${JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}`:JSON.stringify({m:t,mc:e,i:Math.random().toString().slice(2,12)})}const at=Object.freeze(Object.defineProperty({__proto__:null,danmu:function(t,e,o="0"){return`~{"t":"${t}","c":"${e}","v":${o}}`},hidden:function(t,e,o){return`/<${t}>${e}:${o}`},like:function(t,e=""){return`+*${t}${e}`},musicCard:function(t,e,o,i,n,s){return lt(`m__4=${t}>${e}>${o}>${i}>${n}>${s}`,n)},privateChat:function(t,e,o){return JSON.stringify({g:t,m:e,mc:o,i:Math.random().toString().slice(2,12)})},publicChat:lt,stockRequest:function(t){return null==t?">#":t>0?`>$${Math.round(Math.abs(t))}`:t<0?`>@${Math.round(Math.abs(t))}`:">#"},videoCard:function(t,e,o,i,n,s,r){return lt(`m__4*${t}>${e}>${o}>${i}>${n}>${s}>${r}`,n)},withdrawn:function(t,e=""){return""==e?`v0#${t}`:`v0*${e}#${t}`}},Symbol.toStringTag,{value:"Module"})),ct="elements-hooks";let ht={movePanelHolder:document.querySelector("#movePanelHolder"),functionHolder:document.querySelector("#functionHolder"),functionButtonGroupList:[...document.querySelectorAll(".functionButton.functionButtonGroup")],msgholderBox:document.querySelector("#msgholder .fullBox.msgholderBox"),homeHolderMsgBox:document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),sessionHolderPmTaskBoxItems:[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],moveinputDisplay:document.querySelector("#moveinputDisplay"),moveinput:document.getElementById("moveinput"),moveinputSendBtnFunc:document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),moveinputSendBtnSend:document.querySelector("#moveinputDisplay #moveinputSendBtnSend")};function dt(){ht.movePanelHolder=document.querySelector("#movePanelHolder"),ht.functionHolder=document.querySelector("#functionHolder"),ht.functionButtonGroupList=[...document.querySelectorAll(".functionButton.functionButtonGroup")],ht.msgholderBox=document.querySelector("#msgholder .fullBox .fullBox.msgholderBox"),ht.homeHolderMsgBox=document.querySelector("#homeHolder .homeHolderMsgContentBox .homeHolderMsgBox.fullBox"),ht.sessionHolderPmTaskBoxItems=[...document.querySelectorAll(".sessionHolderPmTaskBoxItem.whoisTouch2")],ht.moveinputDisplay=document.querySelector("#moveinputDisplay"),ht.moveinput=document.getElementById("moveinput"),ht.moveinputSendBtnFunc=document.querySelector("#moveinputDisplay #moveinputSendBtnFunc"),ht.moveinputSendBtnSend=document.querySelector("#moveinputDisplay #moveinputSendBtnSend")}let pt={elementHooks:{moveinput:{oninputBefore:()=>!0,oninputAfter:()=>!0,onblurBefore:()=>!0,onblurAfter:()=>!0,onfocusBefore:()=>!0,onfocusAfter:()=>!0}},functionHooks:{processer:{onBefore:(t,e,o,i)=>!0,onAfter:(t,e,o,i)=>!0}},replaceMoveinput:()=>{try{let t=ht.moveinput.oninput;ht.moveinput.oninput=function(){1==pt.elementHooks.moveinput.oninputBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.oninputAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onblur=function(){1==pt.elementHooks.moveinput.onblurBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onblurAfter())}}catch(t){tt.error(ct,t)}try{let t=ht.moveinput.oninput;ht.moveinput.onfocus=function(){1==pt.elementHooks.moveinput.onfocusBefore()&&(t?.call(ht.moveinput),pt.elementHooks.moveinput.onfocusAfter())}}catch(t){tt.error(ct,t)}},replaceButtonProcesser:()=>{try{let t=buttonProcesser;buttonProcesser=(e,o,i,n)=>{1==pt.functionHooks.processer.onBefore(e,o,i,n)&&(t(e,o,i,n),pt.functionHooks.processer.onAfter(e,o,i,n))}}catch(t){tt.error(ct,t)}}};function ut(){pt.replaceMoveinput(),pt.replaceButtonProcesser()}const gt=Object.freeze(Object.defineProperty({__proto__:null,Hooks:pt,elements:ht,initHooks:ut,refreshAll:dt},Symbol.toStringTag,{value:"Module"})),mt="script-tools",ft=[];class vt{constructor(t,e,o=!0){this.name=t,this.url=e,this.enable=o}}function bt(t){return tt.debug(mt,`添加${t.name},${t.url}`),xt(t.url)>=0||$t(t.name)>=0?(tt.warn(mt,`脚本${t.name}${t.url}已经存在`),!1):(X.scriptList.push(t),!0)}function yt(t){tt.debug(mt,`更新脚本${t.name}${t.url}`);for(let e=0;e<X.scriptList.length;e++){if(X.scriptList[e].name===t.name)return X.scriptList[e]=t,!0;if(X.scriptList[e].url===t.url)return X.scriptList[e]=t,!0}return!1}function wt(t){tt.debug(mt,`删除${t.name},${t.url}`);let e=$t(t.name);return e>=0?(X.scriptList.splice(e,1),!0):(e=xt(t.url),e>=0&&(X.scriptList.splice(e,1),!0))}function xt(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].url==t)return e;return-1}function $t(t){for(let e=0;e<X.scriptList.length;e++)if(X.scriptList[e].name==t)return e;return-1}function _t(t){if(ft.includes(t.url))return tt.warn(mt,`脚本${t.name}${t.url}已经注入`),!1;{const e=document.createElement("script");return e.src=t.url,document.body.appendChild(e),ft.push(t.url),tt.debug(mt,`注入${t.name}`),!0}}function St(){X.scriptList.forEach(t=>{t.enable&&!ft.includes(t.url)&&_t(t)})}const kt=Object.freeze(Object.defineProperty({__proto__:null,Script:vt,addScriptToList:bt,clearScriptList:function(){X.scriptList=[]},findScriptByName:$t,findScriptByUrl:xt,ingecteScript:_t,ingecteScriptList:St,ingectedUrlList:ft,removeScriptFromList:wt,updateScriptInList:yt},Symbol.toStringTag,{value:"Module"})),At=Object.freeze(Object.defineProperty({__proto__:null,Emitter:S,Message:f,decoder:_,elements_hooks:gt,encoder:at,log_tools:et,script_tools:kt,socket_tools:rt,store:K,tools:l},Symbol.toStringTag,{value:"Module"})),Ct=globalThis,Ot=Ct.ShadowRoot&&(void 0===Ct.ShadyCSS||Ct.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),Mt=new WeakMap;let zt=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Ot&&void 0===t){const o=void 0!==e&&1===e.length;o&&(t=Mt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}};const Ht=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,o,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+t[i+1],t[0]);return new zt(o,t,Et)},Tt=Ot?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return(t=>new zt("string"==typeof t?t:t+"",void 0,Et))(e)})(t):t,{is:Pt,defineProperty:jt,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Bt,getOwnPropertySymbols:It,getPrototypeOf:Dt}=Object,Nt=globalThis,Ut=Nt.trustedTypes,Rt=Ut?Ut.emptyScript:"",Vt=Nt.reactiveElementPolyfillSupport,Ft=(t,e)=>t,qt={toAttribute(t,e){switch(e){case Boolean:t=t?Rt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=null!==t;break;case Number:o=null===t?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch(i){o=null}}return o}},Wt=(t,e)=>!Pt(t,e),Gt={attribute:!0,type:String,converter:qt,reflect:!1,useDefault:!1,hasChanged:Wt};Symbol.metadata??=Symbol("metadata"),Nt.litPropertyMetadata??=new WeakMap;let Xt=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Gt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);void 0!==i&&jt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:n}=Lt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const s=i?.call(this);n?.call(this,e),this.requestUpdate(t,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Gt}static _$Ei(){if(this.hasOwnProperty(Ft("elementProperties")))return;const t=Dt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ft("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ft("properties"))){const t=this.properties,e=[...Bt(t),...It(t)];for(const o of e)this.createProperty(o,t[o])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,o]of e)this.elementProperties.set(t,o)}this._$Eh=new Map;for(const[e,o]of this.elementProperties){const t=this._$Eu(e,o);void 0!==t&&this._$Eh.set(t,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const t of o)e.unshift(Tt(t))}else void 0!==t&&e.push(Tt(t));return e}static _$Eu(t,e){const o=e.attribute;return!1===o?void 0:"string"==typeof o?o:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Ot)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const o of e){const e=document.createElement("style"),i=Ct.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=o.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(void 0!==i&&!0===o.reflect){const n=(void 0!==o.converter?.toAttribute?o.converter:qt).toAttribute(e,o.type);this._$Em=t,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const o=this.constructor,i=o._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=o.getPropertyOptions(i),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:qt;this._$Em=i;const s=n.fromAttribute(e,t.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(t,e,o){if(void 0!==t){const i=this.constructor,n=this[t];if(o??=i.getPropertyOptions(t),!((o.hasChanged??Wt)(n,e)||o.useDefault&&o.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:i,wrapped:n},s){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==n||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,o]of t){const{wrapped:t}=o,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,o,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};Xt.elementStyles=[],Xt.shadowRootOptions={mode:"open"},Xt[Ft("elementProperties")]=new Map,Xt[Ft("finalized")]=new Map,Vt?.({ReactiveElement:Xt}),(Nt.reactiveElementVersions??=[]).push("2.1.1");const Jt=globalThis,Zt=Jt.trustedTypes,Yt=Zt?Zt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Kt="$lit$",Qt=`lit$${Math.random().toFixed(9).slice(2)}$`,te="?"+Qt,ee=`<${te}>`,oe=document,ie=()=>oe.createComment(""),ne=t=>null===t||"object"!=typeof t&&"function"!=typeof t,se=Array.isArray,re="[ \t\n\f\r]",le=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ae=/-->/g,ce=/>/g,he=RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),de=/'/g,pe=/"/g,ue=/^(?:script|style|textarea|title)$/i,ge=(ye=1,(t,...e)=>({_$litType$:ye,strings:t,values:e})),me=Symbol.for("lit-noChange"),fe=Symbol.for("lit-nothing"),ve=new WeakMap,be=oe.createTreeWalker(oe,129);var ye;function we(t,e){if(!se(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Yt?Yt.createHTML(e):e}class xe{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,c]=((t,e)=>{const o=t.length-1,i=[];let n,s=2===e?"<svg>":3===e?"<math>":"",r=le;for(let l=0;l<o;l++){const e=t[l];let o,a,c=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===le?"!--"===a[1]?r=ae:void 0!==a[1]?r=ce:void 0!==a[2]?(ue.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=he):void 0!==a[3]&&(r=he):r===he?">"===a[0]?(r=n??le,c=-1):void 0===a[1]?c=-2:(c=r.lastIndex-a[2].length,o=a[1],r=void 0===a[3]?he:'"'===a[3]?pe:de):r===pe||r===de?r=he:r===ae||r===ce?r=le:(r=he,n=void 0);const d=r===he&&t[l+1].startsWith("/>")?" ":"";s+=r===le?e+ee:c>=0?(i.push(o),e.slice(0,c)+Kt+e.slice(c)+Qt+d):e+Qt+(-2===c?l:d)}return[we(t,s+(t[o]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=xe.createElement(a,o),be.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=be.nextNode())&&l.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Kt)){const e=c[s++],o=i.getAttribute(t).split(Qt),r=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:r[2],strings:o,ctor:"."===r[1]?Ae:"?"===r[1]?Ce:"@"===r[1]?Oe:ke}),i.removeAttribute(t)}else t.startsWith(Qt)&&(l.push({type:6,index:n}),i.removeAttribute(t));if(ue.test(i.tagName)){const t=i.textContent.split(Qt),e=t.length-1;if(e>0){i.textContent=Zt?Zt.emptyScript:"";for(let o=0;o<e;o++)i.append(t[o],ie()),be.nextNode(),l.push({type:2,index:++n});i.append(t[e],ie())}}}else if(8===i.nodeType)if(i.data===te)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(Qt,t+1));)l.push({type:7,index:n}),t+=Qt.length-1}n++}}static createElement(t,e){const o=oe.createElement("template");return o.innerHTML=t,o}}function $e(t,e,o=t,i){if(e===me)return e;let n=void 0!==i?o._$Co?.[i]:o._$Cl;const s=ne(e)?void 0:e._$litDirective$;return n?.constructor!==s&&(n?._$AO?.(!1),void 0===s?n=void 0:(n=new s(t),n._$AT(t,o,i)),void 0!==i?(o._$Co??=[])[i]=n:o._$Cl=n),void 0!==n&&(e=$e(t,n._$AS(t,e.values),n,i)),e}class _e{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=(t?.creationScope??oe).importNode(e,!0);be.currentNode=i;let n=be.nextNode(),s=0,r=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new Se(n,n.nextSibling,this,t):1===l.type?e=new l.ctor(n,l.name,l.strings,this,t):6===l.type&&(e=new Ee(n,this,t)),this._$AV.push(e),l=o[++r]}s!==l?.index&&(n=be.nextNode(),s++)}return be.currentNode=oe,i}p(t){let e=0;for(const o of this._$AV)void 0!==o&&(void 0!==o.strings?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class Se{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,i){this.type=2,this._$AH=fe,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=$e(this,t,e),ne(t)?t===fe||null==t||""===t?(this._$AH!==fe&&this._$AR(),this._$AH=fe):t!==this._$AH&&t!==me&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>se(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==fe&&ne(this._$AH)?this._$AA.nextSibling.data=t:this.T(oe.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=xe.createElement(we(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new _e(i,this),o=t.u(this.options);t.p(e),this.T(o),this._$AH=t}}_$AC(t){let e=ve.get(t.strings);return void 0===e&&ve.set(t.strings,e=new xe(t)),e}k(t){se(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const n of t)i===e.length?e.push(o=new Se(this.O(ie()),this.O(ie()),this,this.options)):o=e[i],o._$AI(n),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ke{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,n){this.type=1,this._$AH=fe,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,o.length>2||""!==o[0]||""!==o[1]?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=fe}_$AI(t,e=this,o,i){const n=this.strings;let s=!1;if(void 0===n)t=$e(this,t,e,0),s=!ne(t)||t!==this._$AH&&t!==me,s&&(this._$AH=t);else{const i=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=$e(this,i[o+r],e,r),l===me&&(l=this._$AH[r]),s||=!ne(l)||l!==this._$AH[r],l===fe?t=fe:t!==fe&&(t+=(l??"")+n[r+1]),this._$AH[r]=l}s&&!i&&this.j(t)}j(t){t===fe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ae extends ke{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===fe?void 0:t}}class Ce extends ke{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==fe)}}class Oe extends ke{constructor(t,e,o,i,n){super(t,e,o,i,n),this.type=5}_$AI(t,e=this){if((t=$e(this,t,e,0)??fe)===me)return;const o=this._$AH,i=t===fe&&o!==fe||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==fe&&(o===fe||i);i&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Ee{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){$e(this,t)}}const Me=Jt.litHtmlPolyfillSupport;Me?.(xe,Se),(Jt.litHtmlVersions??=[]).push("3.3.1");const ze=globalThis;let He=class extends Xt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,o)=>{const i=o?.renderBefore??e;let n=i._$litPart$;if(void 0===n){const t=o?.renderBefore??null;i._$litPart$=n=new Se(e.insertBefore(ie(),t),t,void 0,o??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return me}};He._$litElement$=!0,He.finalized=!0,ze.litElementHydrateSupport?.({LitElement:He});const Te=ze.litElementPolyfillSupport;Te?.({LitElement:He}),(ze.litElementVersions??=[]).push("4.2.1");const Pe=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},je={attribute:!0,type:String,converter:qt,reflect:!1,hasChanged:Wt},Le=(t=je,e,o)=>{const{kind:i,metadata:n}=o;let s=globalThis.litPropertyMetadata.get(n);if(void 0===s&&globalThis.litPropertyMetadata.set(n,s=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),s.set(o.name,t),"accessor"===i){const{name:i}=o;return{set(o){const n=e.get.call(this);e.set.call(this,o),this.requestUpdate(i,n,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=o;return function(o){const n=this[i];e.call(this,o),this.requestUpdate(i,n,t)}}throw Error("Unsupported decorator location: "+i)};function Be(t){return(e,o)=>"object"==typeof o?Le(t,e,o):((t,e,o)=>{const i=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),i?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}function Ie(t,e){return(e,o,i)=>((t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,o),o))(e,o,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}var De=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,Ue=(t,e,o,i)=>{for(var n,s=i>1?void 0:i?Ne(e,o):e,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(i?n(e,o,s):n(s))||s);return i&&s&&De(e,o,s),s};let Re=[],Ve=99999,Fe=class extends He{constructor(){super(),this.width=320,this.height=490,this.headerBackgroundColor="rgba(66,134,182,0.9)",this.headerColor="rgb(255,255,255)",this.bodyBackgroundColor="rgba(255,255,255,0.7)",this.bodyColor="rgba(23, 23, 23, 0.9)",this.footerBackgroundColor="rgba(255,255,255,0.7)",this.buttonBackground="rgba(255,255,255,0.9)",this.buttonColor="rgba(66,134,182,0.9)",this.titleContent="面板",this.leftButtonText="",this.rightButtonText="",this.isDisplay=!1,this.zIndex=Ve,this.icon="magic-wand",this.leftIcon="magic-wand",this.rightIcon="magic-wand",this.left=(window.innerWidth-this.width)/2,this.top=(window.innerHeight-(this.height+80))/2,this.dragging=!1,Re.push(this),this.zIndex=++Ve}hideMovePanel(){this.isDisplay=!1,this.dispatchEvent(new CustomEvent("close",{detail:{isDisplay:this.isDisplay,message:"关闭事件"},bubbles:!0,composed:!0}))}showMovePanel(){this.isDisplay=!0,this.dispatchEvent(new CustomEvent("show",{detail:{isDisplay:this.isDisplay},bubbles:!0,composed:!0}))}toogleDisplay(){this.isDisplay?this.hideMovePanel():this.showMovePanel()}mouseDragging(t){let e=this.left,o=this.top,i=t.clientX-e,n=t.clientY-o;0==this.dragging&&(this.dragging=!0),document.onmousemove=t=>{this.dragging&&(this.left=t.clientX-i,this.top=t.clientY-n)},document.onmouseup=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}touchDragging(t){let e=this.left,o=this.top,i=t.touches[0].clientX-e,n=t.touches[0].clientY-o;0==this.dragging&&(this.dragging=!0),document.ontouchmove=t=>{this.dragging&&(this.left=t.touches[0].clientX-i,this.top=t.touches[0].clientY-n)},document.ontouchend=()=>{this.dragging&&(this.dragging=!1),document.onmousemove=null}}putTop(){let t=!1;if(Re.includes(this)){for(let t=0;t<Re.length;t++)Re[t].zIndex>this.zIndex&&(Re[t].zIndex=Re[t].zIndex-1);this.zIndex=Ve,t=!0}else tt.warn("MovePanel","置顶失败,窗口不在列表中"),t=!1;return t}putTopToggel(){this.zIndex!=Ve?(this.putTop(),this.showMovePanel()):this.toogleDisplay()}render(){return ge`
14
14
  <div
@@ -724,7 +724,6 @@ style="width:${this.size}; height:${this.size};"
724
724
  <div
725
725
  class="switch ${this.disabled?"disabled":""} ${this.loading?"loading":""} ${this.checked?"checked":""}"
726
726
  @click="${this.change}"
727
- @touchstart="${this.change}"
728
727
  style="--switch-color: ${this.color}"
729
728
  >
730
729
  <div class="switch-inner">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hortimagic",
3
3
  "private": false,
4
- "version": "1.0.6",
4
+ "version": "1.0.7",
5
5
  "changelog": "修复了单元格组件拼写错误的bug",
6
6
  "author": "Narlen",
7
7
  "description": "园艺魔法,花园插件",
@@ -65,11 +65,11 @@ export class HmSwitch extends LitElement {
65
65
  }
66
66
 
67
67
  render() {
68
+ // @touchstart="${this.change}"
68
69
  return html`
69
70
  <div
70
71
  class="switch ${this.disabled ? 'disabled' : ''} ${this.loading ? 'loading' : ''} ${this.checked ? 'checked' : ''}"
71
72
  @click="${this.change}"
72
- @touchstart="${this.change}"
73
73
  style="--switch-color: ${this.color}"
74
74
  >
75
75
  <div class="switch-inner">