koishi-plugin-chat-patch 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -13
- package/lib/file-manager.d.ts +2 -0
- package/lib/index.js +64 -50
- package/package.json +1 -1
- package/src/file-manager.ts +35 -3
package/dist/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import{defineComponent as q,openBlock as p,createElementBlock as E,createElementVNode as m,warn as wa,computed as k,getCurrentInstance as et,watch as _e,unref as s,onMounted as Ge,watchEffect as xa,onBeforeUnmount as Kt,inject as Te,ref as L,isRef as vt,onScopeDispose as _a,shallowRef as tn,provide as Pn,renderSlot as xe,mergeProps as Nt,toRef as an,onUnmounted as pn,useAttrs as Ca,useSlots as $o,nextTick as de,createCommentVNode as z,Fragment as pe,normalizeClass as R,createBlock as j,withCtx as S,resolveDynamicComponent as ze,withModifiers as Pe,createVNode as C,toDisplayString as K,normalizeStyle as Ke,Transition as On,withDirectives as it,vShow as ct,Text as ka,reactive as $t,h as te,shallowReactive as Sa,isVNode as vn,render as sn,toRefs as Ea,resolveComponent as ue,withKeys as Rt,createTextVNode as ee,renderList as Ue}from"vue";import{send as Se,receive as Yt,icons as Ia}from"@koishijs/client";import{isClient as He,useEventListener as Bo,useResizeObserver as Lo,useTimeoutFn as Ma}from"@vueuse/core";/*! Element Plus Icons Vue v2.3.2 */var Ta=q({name:"ChatLineRound",__name:"chat-line-round",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),m("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),Zn=Ta,$a=q({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),m("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Ba=$a,La=q({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),zn=La,Aa=q({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),m("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Ao=Aa,Pa=q({name:"CirclePlus",__name:"circle-plus",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),m("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),m("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Oa=Pa,za=q({name:"Close",__name:"close",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Po=za,Ra=q({name:"Collection",__name:"collection",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M192 736h640V128H256a64 64 0 0 0-64 64zm64-672h608a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160l-32 57.536V192A128 128 0 0 1 256 64"}),m("path",{fill:"currentColor",d:"M240 800a48 48 0 1 0 0 96h592v-96zm0-64h656v160a64 64 0 0 1-64 64H240a112 112 0 0 1 0-224m144-608v250.88l96-76.8 96 76.8V128zm-64-64h320v381.44a32 32 0 0 1-51.968 24.96L480 384l-108.032 86.4A32 32 0 0 1 320 445.44z"})]))}}),Jn=Ra,Na=q({name:"Delete",__name:"delete",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Va=Na,Fa=q({name:"DocumentCopy",__name:"document-copy",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}}),Ha=Fa,Da=q({name:"Download",__name:"download",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Ua=Da,ja=q({name:"Hide",__name:"hide",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),m("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),Ka=ja,qa=q({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Oo=qa,Wa=q({name:"Loading",__name:"loading",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),gt=Wa,Ya=q({name:"Picture",__name:"picture",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),m("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),Qn=Ya,Ga=q({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M313.6 924.48a70.4 70.4 0 0 1-74.152-5.365 70.4 70.4 0 0 1-27.992-68.875l37.888-220.928L88.96 472.96a70.4 70.4 0 0 1 3.788-104.225A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 100.246-28.595 70.4 70.4 0 0 1 25.962 28.595l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),eo=Ga,Xa=q({name:"Star",__name:"star",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),Za=Xa,Ja=q({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),zo=Ja,Qa=q({name:"Top",__name:"top",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),es=Qa,ts=q({name:"View",__name:"view",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),ns=ts,os=q({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(p(),E("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[m("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),Ro=os;const as='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',ss=e=>getComputedStyle(e).position==="fixed"?false:e.offsetParent!==null,to=e=>Array.from(e.querySelectorAll(as)).filter(t=>rs(t)&&ss(t)),rs=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return true;if(e.disabled)return false;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return true;default:return false}},ls=()=>He&&/firefox/i.test(window.navigator.userAgent);/**
|
|
2
|
-
* @vue/shared v3.
|
|
3
|
-
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
-
* @license MIT
|
|
5
|
-
**/const Vt=()=>{},is=Object.prototype.hasOwnProperty,rn=(e,t)=>is.call(e,t),bt=e=>typeof e=="function",We=e=>typeof e=="string",Ft=e=>e!==null&&typeof e=="object",cs=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},us=/-\w/g,ds=cs(e=>e.replace(us,t=>t.slice(1).toUpperCase()));var fs=typeof global=="object"&&global&&global.Object===Object&&global,ps=typeof self=="object"&&self&&self.Object===Object&&self,Rn=fs||ps||Function("return this")(),ut=Rn.Symbol,No=Object.prototype,vs=No.hasOwnProperty,hs=No.toString,zt=ut?ut.toStringTag:void 0;function ms(e){var t=vs.call(e,zt),n=e[zt];try{e[zt]=void 0;var o=true}catch{}var a=hs.call(e);return o&&(t?e[zt]=n:delete e[zt]),a}var gs=Object.prototype,bs=gs.toString;function ys(e){return bs.call(e)}var ws="[object Null]",xs="[object Undefined]",no=ut?ut.toStringTag:void 0;function Nn(e){return e==null?e===void 0?xs:ws:no&&no in Object(e)?ms(e):ys(e)}function Vn(e){return e!=null&&typeof e=="object"}var _s="[object Symbol]";function Fn(e){return typeof e=="symbol"||Vn(e)&&Nn(e)==_s}function Cs(e,t){for(var n=-1,o=e==null?0:e.length,a=Array(o);++n<o;)a[n]=t(e[n],n,e);return a}var qt=Array.isArray,oo=ut?ut.prototype:void 0,ao=oo?oo.toString:void 0;function Vo(e){if(typeof e=="string")return e;if(qt(e))return Cs(e,Vo)+"";if(Fn(e))return ao?ao.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ln(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ks(e){return e}var Ss="[object AsyncFunction]",Es="[object Function]",Is="[object GeneratorFunction]",Ms="[object Proxy]";function Ts(e){if(!ln(e))return false;var t=Nn(e);return t==Es||t==Is||t==Ss||t==Ms}var xn=Rn["__core-js_shared__"],so=function(){var e=/[^.]+$/.exec(xn&&xn.keys&&xn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function $s(e){return!!so&&so in e}var Bs=Function.prototype,Ls=Bs.toString;function As(e){if(e!=null){try{return Ls.call(e)}catch{}try{return e+""}catch{}}return""}var Ps=/[\\^$.*+?()[\]{}|]/g,Os=/^\[object .+?Constructor\]$/,zs=Function.prototype,Rs=Object.prototype,Ns=zs.toString,Vs=Rs.hasOwnProperty,Fs=RegExp("^"+Ns.call(Vs).replace(Ps,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hs(e){if(!ln(e)||$s(e))return false;var t=Ts(e)?Fs:Os;return t.test(As(e))}function Ds(e,t){return e==null?void 0:e[t]}function Hn(e,t){var n=Ds(e,t);return Hs(n)?n:void 0}function Us(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var js=800,Ks=16,qs=Date.now;function Ws(e){var t=0,n=0;return function(){var o=qs(),a=Ks-(o-n);if(n=o,a>0){if(++t>=js)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ys(e){return function(){return e}}var cn=function(){try{var e=Hn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Gs=cn?function(e,t){return cn(e,"toString",{configurable:true,enumerable:false,value:Ys(t),writable:true})}:ks,Xs=Ws(Gs),Zs=9007199254740991,Js=/^(?:0|[1-9]\d*)$/;function Fo(e,t){var n=typeof e;return t=t??Zs,!!t&&(n=="number"||n!="symbol"&&Js.test(e))&&e>-1&&e%1==0&&e<t}function Qs(e,t,n){t=="__proto__"&&cn?cn(e,t,{configurable:true,enumerable:true,value:n,writable:true}):e[t]=n}function Ho(e,t){return e===t||e!==e&&t!==t}var er=Object.prototype,tr=er.hasOwnProperty;function nr(e,t,n){var o=e[t];(!(tr.call(e,t)&&Ho(o,n))||n===void 0&&!(t in e))&&Qs(e,t,n)}var ro=Math.max;function or(e,t,n){return t=ro(t===void 0?e.length-1:t,0),function(){for(var o=arguments,a=-1,r=ro(o.length-t,0),l=Array(r);++a<r;)l[a]=o[t+a];a=-1;for(var i=Array(t+1);++a<t;)i[a]=o[a];return i[t]=n(l),Us(e,this,i)}}var ar=9007199254740991;function sr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ar}var rr="[object Arguments]";function lo(e){return Vn(e)&&Nn(e)==rr}var Do=Object.prototype,lr=Do.hasOwnProperty,ir=Do.propertyIsEnumerable,Uo=lo(function(){return arguments}())?lo:function(e){return Vn(e)&&lr.call(e,"callee")&&!ir.call(e,"callee")},cr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ur=/^\w*$/;function dr(e,t){if(qt(e))return false;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Fn(e)?true:ur.test(e)||!cr.test(e)||t!=null&&e in Object(t)}var Ht=Hn(Object,"create");function fr(){this.__data__=Ht?Ht(null):{},this.size=0}function pr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vr="__lodash_hash_undefined__",hr=Object.prototype,mr=hr.hasOwnProperty;function gr(e){var t=this.__data__;if(Ht){var n=t[e];return n===vr?void 0:n}return mr.call(t,e)?t[e]:void 0}var br=Object.prototype,yr=br.hasOwnProperty;function wr(e){var t=this.__data__;return Ht?t[e]!==void 0:yr.call(t,e)}var xr="__lodash_hash_undefined__";function _r(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ht&&t===void 0?xr:t,this}function yt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}yt.prototype.clear=fr;yt.prototype.delete=pr;yt.prototype.get=gr;yt.prototype.has=wr;yt.prototype.set=_r;function Cr(){this.__data__=[],this.size=0}function hn(e,t){for(var n=e.length;n--;)if(Ho(e[n][0],t))return n;return-1}var kr=Array.prototype,Sr=kr.splice;function Er(e){var t=this.__data__,n=hn(t,e);if(n<0)return false;var o=t.length-1;return n==o?t.pop():Sr.call(t,n,1),--this.size,true}function Ir(e){var t=this.__data__,n=hn(t,e);return n<0?void 0:t[n][1]}function Mr(e){return hn(this.__data__,e)>-1}function Tr(e,t){var n=this.__data__,o=hn(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}function Lt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}Lt.prototype.clear=Cr;Lt.prototype.delete=Er;Lt.prototype.get=Ir;Lt.prototype.has=Mr;Lt.prototype.set=Tr;var $r=Hn(Rn,"Map");function Br(){this.size=0,this.__data__={hash:new yt,map:new($r||Lt),string:new yt}}function Lr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function mn(e,t){var n=e.__data__;return Lr(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ar(e){var t=mn(this,e).delete(e);return this.size-=t?1:0,t}function Pr(e){return mn(this,e).get(e)}function Or(e){return mn(this,e).has(e)}function zr(e,t){var n=mn(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}function xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}xt.prototype.clear=Br;xt.prototype.delete=Ar;xt.prototype.get=Pr;xt.prototype.has=Or;xt.prototype.set=zr;var Rr="Expected a function";function Dn(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Rr);var n=function(){var o=arguments,a=t?t.apply(this,o):o[0],r=n.cache;if(r.has(a))return r.get(a);var l=e.apply(this,o);return n.cache=r.set(a,l)||r,l};return n.cache=new(Dn.Cache||xt),n}Dn.Cache=xt;var Nr=500;function Vr(e){var t=Dn(e,function(o){return n.size===Nr&&n.clear(),o}),n=t.cache;return t}var Fr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hr=/\\(\\)?/g,Dr=Vr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Fr,function(n,o,a,r){t.push(a?r.replace(Hr,"$1"):o||n)}),t});function Ur(e){return e==null?"":Vo(e)}function gn(e,t){return qt(e)?e:dr(e,t)?[e]:Dr(Ur(e))}function Un(e){if(typeof e=="string"||Fn(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function jo(e,t){t=gn(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Un(t[n++])];return n&&n==o?e:void 0}function jr(e,t,n){var o=e==null?void 0:jo(e,t);return o===void 0?n:o}function Kr(e,t){for(var n=-1,o=t.length,a=e.length;++n<o;)e[a+n]=t[n];return e}var io=ut?ut.isConcatSpreadable:void 0;function qr(e){return qt(e)||Uo(e)||!!(io&&e&&e[io])}function Wr(e,t,n,o,a){var r=-1,l=e.length;for(n||(n=qr),a||(a=[]);++r<l;){var i=e[r];n(i)?Kr(a,i):a[a.length]=i}return a}function Yr(e){var t=e==null?0:e.length;return t?Wr(e):[]}function Gr(e){return Xs(or(e,void 0,Yr),e+"")}function Xr(e,t){return e!=null&&t in Object(e)}function Zr(e,t,n){t=gn(t,e);for(var o=-1,a=t.length,r=false;++o<a;){var l=Un(t[o]);if(!(r=e!=null&&n(e,l)))break;e=e[l]}return r||++o!=a?r:(a=e==null?0:e.length,!!a&&sr(a)&&Fo(l,a)&&(qt(e)||Uo(e)))}function Jr(e,t){return e!=null&&Zr(e,t,Xr)}function Ko(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var a=e[t];o[a[0]]=a[1]}return o}function qo(e){return e==null}function Qr(e,t,n,o){if(!ln(e))return e;t=gn(t,e);for(var a=-1,r=t.length,l=r-1,i=e;i!=null&&++a<r;){var u=Un(t[a]),d=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(a!=l){var T=i[u];d=void 0,d===void 0&&(d=ln(T)?T:Fo(t[a+1])?[]:{})}nr(i,u,d),i=i[u]}return e}function el(e,t,n){for(var o=-1,a=t.length,r={};++o<a;){var l=t[o],i=jo(e,l);n(i,l)&&Qr(r,gn(l,e),i)}return r}function tl(e,t){return el(e,t,function(n,o){return Jr(e,o)})}var nl=Gr(function(e,t){return e==null?{}:tl(e,t)});const Wo=e=>e===void 0,wt=e=>typeof e=="number",In=e=>typeof Element>"u"?false:e instanceof Element,ol=e=>We(e)?!Number.isNaN(Number(e)):false,co=e=>Object.keys(e);class al extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function sl(e,t){throw new al(`[${e}] ${t}`)}const Yo=(e="")=>e.split(" ").filter(t=>!!t.trim()),uo=(e,t)=>{if(!e||!t)return false;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},rl=(e,t)=>{!e||!t.trim()||e.classList.add(...Yo(t))},ll=(e,t)=>{!e||!t.trim()||e.classList.remove(...Yo(t))},il=(e,t)=>{var n;if(!He||!e||!t)return"";let o=ds(t);o==="float"&&(o="cssFloat");try{const a=e.style[o];if(a)return a;const r=(n=document.defaultView)==null?void 0:n.getComputedStyle(e,"");return r?r[o]:""}catch{return e.style[o]}};function Dt(e,t="px"){if(!e)return"";if(wt(e)||ol(e))return`${e}${t}`;if(We(e))return e}let Gt;const cl=e=>{var t;if(!He)return 0;if(Gt!==void 0)return Gt;const n=document.createElement("div");n.className=`${e}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const o=n.offsetWidth;n.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",n.appendChild(a);const r=a.offsetWidth;return(t=n.parentNode)==null||t.removeChild(n),Gt=o-r,Gt},Go="__epPropKey",he=e=>e,ul=e=>Ft(e)&&!!e[Go],Xo=(e,t)=>{if(!Ft(e)||ul(e))return e;const{values:n,required:o,default:a,type:r,validator:l}=e,u={type:r,required:!!o,validator:n||l?d=>{let T=false,_=[];if(n&&(_=Array.from(n),rn(e,"default")&&_.push(a),T||(T=_.includes(d))),l&&(T||(T=l(d))),!T&&_.length>0){const N=[...new Set(_)].map(b=>JSON.stringify(b)).join(", ");wa(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${N}], got value ${JSON.stringify(d)}.`)}return T}:void 0,[Go]:true};return rn(e,"default")&&(u.default=a),u},tt=e=>Ko(Object.entries(e).map(([t,n])=>[t,Xo(n,t)])),Ut=he([String,Object,Function]),Zo={Close:Po,SuccessFilled:zo,InfoFilled:Oo,WarningFilled:Ro,CircleCloseFilled:zn},un={success:zo,warning:Ro,error:zn,info:Oo},dl={validating:gt,success:Ba,error:Ao},bn=(e,t)=>{if(e.install=n=>{for(const o of[e,...Object.values(t??{})])n.component(o.name,o)},t)for(const[n,o]of Object.entries(t))e[n]=o;return e},fl=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e),pl=e=>(e.install=Vt,e),yn={tab:"Tab",esc:"Escape"},Mn="update:modelValue",Jo=["","default","small","large"],vl=e=>["",...Jo].includes(e);var nn=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(nn||{});const hl=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),Qo=e=>e,ml=["class","style"],gl=/^on[A-Z]/,bl=(e={})=>{const{excludeListeners:t=false,excludeKeys:n}=e,o=k(()=>((n==null?void 0:n.value)||[]).concat(ml)),a=et();return a?k(()=>{var r;return Ko(Object.entries((r=a.proxy)==null?void 0:r.$attrs).filter(([l])=>!o.value.includes(l)&&!(t&&gl.test(l))))}):k(()=>({}))},dn=({from:e,replacement:t,scope:n,version:o,ref:a,type:r="API"},l)=>{_e(()=>s(l),i=>{},{immediate:true})},yl=(e,t,n,o)=>{let a={offsetX:0,offsetY:0};const r=u=>{const d=u.clientX,T=u.clientY,{offsetX:_,offsetY:N}=a,b=e.value.getBoundingClientRect(),v=b.left,c=b.top,I=b.width,$=b.height,D=document.documentElement.clientWidth,Q=document.documentElement.clientHeight,ie=-v+_,P=-c+N,M=D-v-I+_,g=Q-c-$+N,F=Y=>{let G=_+Y.clientX-d,U=N+Y.clientY-T;o!=null&&o.value||(G=Math.min(Math.max(G,ie),M),U=Math.min(Math.max(U,P),g)),a={offsetX:G,offsetY:U},e.value&&(e.value.style.transform=`translate(${Dt(G)}, ${Dt(U)})`)},A=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",A)},l=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",r)},i=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",r)};Ge(()=>{xa(()=>{n.value?l():i()})}),Kt(()=>{i()})};var wl={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const xl=e=>(t,n)=>_l(t,n,s(e)),_l=(e,t,n)=>jr(n,e,e).replace(/\{(\w+)\}/g,(o,a)=>{var r;return`${(r=t==null?void 0:t[a])!=null?r:`{${a}}`}`}),Cl=e=>{const t=k(()=>s(e).name),n=vt(e)?e:L(e);return{lang:t,locale:n,t:xl(e)}},ea=Symbol("localeContextKey"),kl=e=>{const t=e||Te(ea,L());return Cl(k(()=>t.value||wl))},on="el",Sl="is-",pt=(e,t,n,o,a)=>{let r=`${e}-${t}`;return n&&(r+=`-${n}`),o&&(r+=`__${o}`),a&&(r+=`--${a}`),r},ta=Symbol("namespaceContextKey"),na=e=>{const t=e||(et()?Te(ta,L(on)):L(on));return k(()=>s(t)||on)},Ye=(e,t)=>{const n=na(t);return{namespace:n,b:(c="")=>pt(n.value,e,c,"",""),e:c=>c?pt(n.value,e,"",c,""):"",m:c=>c?pt(n.value,e,"","",c):"",be:(c,I)=>c&&I?pt(n.value,e,c,I,""):"",em:(c,I)=>c&&I?pt(n.value,e,"",c,I):"",bm:(c,I)=>c&&I?pt(n.value,e,c,"",I):"",bem:(c,I,$)=>c&&I&&$?pt(n.value,e,c,I,$):"",is:(c,...I)=>{const $=I.length>=1?I[0]:true;return c&&$?`${Sl}${c}`:""},cssVar:c=>{const I={};for(const $ in c)c[$]&&(I[`--${n.value}-${$}`]=c[$]);return I},cssVarName:c=>`--${n.value}-${c}`,cssVarBlock:c=>{const I={};for(const $ in c)c[$]&&(I[`--${n.value}-${e}-${$}`]=c[$]);return I},cssVarBlockName:c=>`--${n.value}-${e}-${c}`}},El=(e,t={})=>{vt(e)||sl("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||Ye("popup"),o=k(()=>n.bm("parent","hidden"));if(!He||uo(document.body,o.value))return;let a=0,r=false,l="0";const i=()=>{setTimeout(()=>{ll(document==null?void 0:document.body,o.value),r&&document&&(document.body.style.width=l)},200)};_e(e,u=>{if(!u){i();return}r=!uo(document.body,o.value),r&&(l=document.body.style.width),a=cl(n.namespace.value);const d=document.documentElement.clientHeight<document.body.scrollHeight,T=il(document.body,"overflowY");a>0&&(d||T==="scroll")&&r&&(document.body.style.width=`calc(100% - ${a}px)`),rl(document.body,o.value)}),_a(()=>i())},oa=e=>{const t=et();return k(()=>{var n,o;return(o=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:o[e]})},aa=e=>{if(!e)return{onClick:Vt,onMousedown:Vt,onMouseup:Vt};let t=false,n=false;return{onClick:l=>{t&&n&&e(l),t=n=false},onMousedown:l=>{t=l.target===l.currentTarget},onMouseup:l=>{n=l.target===l.currentTarget}}},fo={prefix:Math.floor(Math.random()*1e4),current:0},Il=Symbol("elIdInjection"),Ml=()=>et()?Te(Il,fo):fo,Tn=e=>{const t=Ml(),n=na();return k(()=>s(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let Tt=[];const po=e=>{const t=e;t.key===yn.esc&&Tt.forEach(n=>n(t))},Tl=e=>{Ge(()=>{Tt.length===0&&document.addEventListener("keydown",po),He&&Tt.push(e)}),Kt(()=>{Tt=Tt.filter(t=>t!==e),Tt.length===0&&He&&document.removeEventListener("keydown",po)})},vo={current:0},ho=L(0),sa=2e3,mo=Symbol("elZIndexContextKey"),ra=Symbol("zIndexContextKey"),$l=e=>{const t=et()?Te(mo,vo):vo,n=e||(et()?Te(ra,void 0):void 0),o=k(()=>{const l=s(n);return wt(l)?l:sa}),a=k(()=>o.value+ho.value),r=()=>(t.current++,ho.value=t.current,a.value);return!He&&Te(mo),{initialZIndex:o,currentZIndex:a,nextZIndex:r}};function Bl(e){const t=L();function n(){if(e.value==null)return;const{selectionStart:a,selectionEnd:r,value:l}=e.value;if(a==null||r==null)return;const i=l.slice(0,Math.max(0,a)),u=l.slice(Math.max(0,r));t.value={selectionStart:a,selectionEnd:r,value:l,beforeTxt:i,afterTxt:u}}function o(){if(e.value==null||t.value==null)return;const{value:a}=e.value,{beforeTxt:r,afterTxt:l,selectionStart:i}=t.value;if(r==null||l==null||i==null)return;let u=a.length;if(a.endsWith(l))u=a.length-l.length;else if(a.startsWith(r))u=r.length;else{const d=r[i-1],T=a.indexOf(d,i-1);T!==-1&&(u=T+1)}e.value.setSelectionRange(u,u)}return[n,o]}const jn=Xo({type:String,values:Jo,required:false}),la=Symbol("size"),Ll=()=>{const e=Te(la,{});return k(()=>s(e.size)||"")};function Al(e,{afterFocus:t,beforeBlur:n,afterBlur:o}={}){const a=et(),{emit:r}=a,l=tn(),i=L(false),u=_=>{i.value||(i.value=true,r("focus",_),t==null||t())},d=_=>{var N;bt(n)&&n(_)||_.relatedTarget&&((N=l.value)!=null&&N.contains(_.relatedTarget))||(i.value=false,r("blur",_),o==null||o())},T=()=>{var _;(_=e.value)==null||_.focus()};return _e(l,_=>{_&&_.setAttribute("tabindex","-1")}),Bo(l,"click",T),{wrapperRef:l,isFocused:i,handleFocus:u,handleBlur:d}}const Pl=Symbol("emptyValuesContextKey"),Ol=tt({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>bt(e)?!e():!e}}),zl=tt({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Rl=e=>nl(zl,e),ia=Symbol(),fn=L();function Kn(e,t=void 0){const n=et()?Te(ia,fn):fn;return e?k(()=>{var o,a;return(a=(o=n.value)==null?void 0:o[e])!=null?a:t}):n}function ca(e,t){const n=Kn(),o=Ye(e,k(()=>{var i;return((i=n.value)==null?void 0:i.namespace)||on})),a=kl(k(()=>{var i;return(i=n.value)==null?void 0:i.locale})),r=$l(k(()=>{var i;return((i=n.value)==null?void 0:i.zIndex)||sa})),l=k(()=>{var i;return s(t)||((i=n.value)==null?void 0:i.size)||""});return ua(k(()=>s(n)||{})),{ns:o,locale:a,zIndex:r,size:l}}const ua=(e,t,n=false)=>{var o;const a=!!et(),r=a?Kn():void 0,l=(o=void 0)!=null?o:a?Pn:void 0;if(!l)return;const i=k(()=>{const u=s(e);return r!=null&&r.value?Nl(r.value,u):u});return l(ia,i),l(ea,k(()=>i.value.locale)),l(ta,k(()=>i.value.namespace)),l(ra,k(()=>i.value.zIndex)),l(la,{size:k(()=>i.value.size||"")}),l(Pl,k(()=>({emptyValues:i.value.emptyValues,valueOnClear:i.value.valueOnClear}))),(n||!fn.value)&&(fn.value=i.value),i},Nl=(e,t)=>{const n=[...new Set([...co(e),...co(t)])],o={};for(const a of n)o[a]=t[a]!==void 0?t[a]:e[a];return o},Vl=tt({a11y:{type:Boolean,default:true},locale:{type:he(Object)},size:jn,button:{type:he(Object)},experimentalFeatures:{type:he(Object)},keyboardNavigation:{type:Boolean,default:true},message:{type:he(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Ol}),$n={};q({name:"ElConfigProvider",props:Vl,setup(e,{slots:t}){_e(()=>e.message,o=>{Object.assign($n,o??{})},{immediate:true,deep:true});const n=ua(e);return()=>xe(t,"default",{config:n==null?void 0:n.value})}});var dt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n};const Fl=tt({size:{type:he([Number,String])},color:{type:String}}),Hl=q({name:"ElIcon",inheritAttrs:false}),Dl=q({...Hl,props:Fl,setup(e){const t=e,n=Ye("icon"),o=k(()=>{const{size:a,color:r}=t;return!a&&!r?{}:{fontSize:Wo(a)?void 0:Dt(a),"--color":r}});return(a,r)=>(p(),E("i",Nt({class:s(n).b(),style:s(o)},a.$attrs),[xe(a.$slots,"default")],16))}});var Ul=dt(Dl,[["__file","icon.vue"]]);const qe=bn(Ul),qn=Symbol("formContextKey"),da=Symbol("formItemContextKey"),fa=(e,t={})=>{const n=L(void 0),o=t.prop?n:oa("size"),a=t.global?n:Ll(),r=t.form?{size:void 0}:Te(qn,void 0),l=t.formItem?{size:void 0}:Te(da,void 0);return k(()=>o.value||s(e)||(l==null?void 0:l.size)||(r==null?void 0:r.size)||a.value||"")},Wn=e=>{const t=oa("disabled"),n=Te(qn,void 0);return k(()=>t.value||s(e)||(n==null?void 0:n.disabled)||false)},pa=()=>{const e=Te(qn,void 0),t=Te(da,void 0);return{form:e,formItem:t}},jl=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:o})=>{n||(n=L(false)),o||(o=L(false));const a=L();let r;const l=k(()=>{var i;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((i=t.inputIds)==null?void 0:i.length)<=1)});return Ge(()=>{r=_e([an(e,"id"),n],([i,u])=>{const d=i??(u?void 0:Tn().value);d!==a.value&&(t!=null&&t.removeInputId&&(a.value&&t.removeInputId(a.value),!(o!=null&&o.value)&&!u&&d&&t.addInputId(d)),a.value=d)},{immediate:true})}),pn(()=>{r&&r(),t!=null&&t.removeInputId&&a.value&&t.removeInputId(a.value)}),{isLabeledByFormItem:l,inputId:a}};let Ne;const Kl=`
|
|
6
|
-
|
|
7
|
-
visibility:hidden !important;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
right:0 !important;
|
|
13
|
-
`,ql=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Wl(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),a=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:ql.map(l=>`${l}:${t.getPropertyValue(l)}`).join(";"),paddingSize:o,borderSize:a,boxSizing:n}}function go(e,t=1,n){var o;Ne||(Ne=document.createElement("textarea"),document.body.appendChild(Ne));const{paddingSize:a,borderSize:r,boxSizing:l,contextStyle:i}=Wl(e);Ne.setAttribute("style",`${i};${Kl}`),Ne.value=e.value||e.placeholder||"";let u=Ne.scrollHeight;const d={};l==="border-box"?u=u+r:l==="content-box"&&(u=u-a),Ne.value="";const T=Ne.scrollHeight-a;if(wt(t)){let _=T*t;l==="border-box"&&(_=_+a+r),u=Math.max(_,u),d.minHeight=`${_}px`}if(wt(n)){let _=T*n;l==="border-box"&&(_=_+a+r),u=Math.min(_,u)}return d.height=`${u}px`,(o=Ne.parentNode)==null||o.removeChild(Ne),Ne=void 0,d}const Yl=tt({id:{type:String,default:void 0},size:jn,disabled:Boolean,modelValue:{type:he([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:he([Boolean,Object]),default:false},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:false},clearable:{type:Boolean,default:false},showPassword:{type:Boolean,default:false},showWordLimit:{type:Boolean,default:false},suffixIcon:{type:Ut},prefixIcon:{type:Ut},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:true},inputStyle:{type:he([Object,Array,String]),default:()=>Qo({})},autofocus:{type:Boolean,default:false},...Rl(["ariaLabel"])}),Gl={[Mn]:e=>We(e),input:e=>We(e),change:e=>We(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>true,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},Xl=["role"],Zl=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],Jl=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],Ql=q({name:"ElInput",inheritAttrs:false}),ei=q({...Ql,props:Yl,emits:Gl,setup(e,{expose:t,emit:n}){const o=e,a=Ca(),r=$o(),l=k(()=>{const f={};return o.containerRole==="combobox"&&(f["aria-haspopup"]=a["aria-haspopup"],f["aria-owns"]=a["aria-owns"],f["aria-expanded"]=a["aria-expanded"]),f}),i=k(()=>[o.type==="textarea"?I.b():c.b(),c.m(b.value),c.is("disabled",v.value),c.is("exceed",_t.value),{[c.b("group")]:r.prepend||r.append,[c.m("prefix")]:r.prefix||o.prefixIcon,[c.m("suffix")]:r.suffix||o.suffixIcon||o.clearable||o.showPassword,[c.bm("suffix","password-clear")]:Ie.value&&Xe.value,[c.b("hidden")]:o.type==="hidden"},a.class]),u=k(()=>[c.e("wrapper"),c.is("focus",Y.value)]),d=bl({excludeKeys:k(()=>Object.keys(l.value))}),{form:T,formItem:_}=pa(),{inputId:N}=jl(o,{formItemContext:_}),b=fa(),v=Wn(),c=Ye("input"),I=Ye("textarea"),$=tn(),D=tn(),Q=L(false),ie=L(false),P=L(false),M=L(),g=tn(o.inputStyle),F=k(()=>$.value||D.value),{wrapperRef:A,isFocused:Y,handleFocus:G,handleBlur:U}=Al(F,{afterBlur(){var f;o.validateEvent&&((f=_==null?void 0:_.validate)==null||f.call(_,"blur").catch(H=>void 0))}}),X=k(()=>{var f;return(f=T==null?void 0:T.statusIcon)!=null?f:false}),fe=k(()=>(_==null?void 0:_.validateState)||""),Ee=k(()=>fe.value&&dl[fe.value]),ae=k(()=>P.value?ns:Ka),Ce=k(()=>[a.style]),ke=k(()=>[o.inputStyle,g.value,{resize:o.resize}]),ge=k(()=>qo(o.modelValue)?"":String(o.modelValue)),Ie=k(()=>o.clearable&&!v.value&&!o.readonly&&!!ge.value&&(Y.value||Q.value)),Xe=k(()=>o.showPassword&&!v.value&&!o.readonly&&!!ge.value&&(!!ge.value||Y.value)),Oe=k(()=>o.showWordLimit&&!!o.maxlength&&(o.type==="text"||o.type==="textarea")&&!v.value&&!o.readonly&&!o.showPassword),$e=k(()=>ge.value.length),_t=k(()=>!!Oe.value&&$e.value>Number(o.maxlength)),Ct=k(()=>!!r.suffix||!!o.suffixIcon||Ie.value||o.showPassword||Oe.value||!!fe.value&&X.value),[kt,nt]=Bl($);Lo(D,f=>{if(Pt(),!Oe.value||o.resize!=="both")return;const H=f[0],{width:oe}=H.contentRect;M.value={right:`calc(100% - ${oe+15+6}px)`}});const Ze=()=>{const{type:f,autosize:H}=o;if(!(!He||f!=="textarea"||!D.value))if(H){const oe=Ft(H)?H.minRows:void 0,ce=Ft(H)?H.maxRows:void 0,ot=go(D.value,oe,ce);g.value={overflowY:"hidden",...ot},de(()=>{D.value.offsetHeight,g.value=ot})}else g.value={minHeight:go(D.value).minHeight}},Pt=(f=>{let H=false;return()=>{var oe;if(H||!o.autosize)return;((oe=D.value)==null?void 0:oe.offsetParent)===null||(f(),H=true)}})(Ze),De=()=>{const f=F.value,H=o.formatter?o.formatter(ge.value):ge.value;!f||f.value===H||(f.value=H)},Re=async f=>{kt();let{value:H}=f.target;if(o.formatter&&(H=o.parser?o.parser(H):H),!ie.value){if(H===ge.value){De();return}n(Mn,H),n("input",H),await de(),De(),nt()}},ft=f=>{n("change",f.target.value)},Be=f=>{n("compositionstart",f),ie.value=true},St=f=>{var H;n("compositionupdate",f);const oe=(H=f.target)==null?void 0:H.value,ce=oe[oe.length-1]||"";ie.value=!hl(ce)},Et=f=>{n("compositionend",f),ie.value&&(ie.value=false,Re(f))},It=()=>{P.value=!P.value,Me()},Me=async()=>{var f;await de(),(f=F.value)==null||f.focus()},Je=()=>{var f;return(f=F.value)==null?void 0:f.blur()},Ot=f=>{Q.value=false,n("mouseleave",f)},Mt=f=>{Q.value=true,n("mouseenter",f)},Z=f=>{n("keydown",f)},w=()=>{var f;(f=F.value)==null||f.select()},ve=()=>{n(Mn,""),n("change",""),n("clear"),n("input","")};return _e(()=>o.modelValue,()=>{var f;de(()=>Ze()),o.validateEvent&&((f=_==null?void 0:_.validate)==null||f.call(_,"change").catch(H=>void 0))}),_e(ge,()=>De()),_e(()=>o.type,async()=>{await de(),De(),Ze()}),Ge(()=>{!o.formatter&&o.parser,De(),de(Ze)}),dn({from:"label",replacement:"aria-label",version:"2.8.0",scope:"el-input",ref:"https://element-plus.org/en-US/component/input.html"},k(()=>!!o.label)),t({input:$,textarea:D,ref:F,textareaStyle:ke,autosize:an(o,"autosize"),focus:Me,blur:Je,select:w,clear:ve,resizeTextarea:Ze}),(f,H)=>(p(),E("div",Nt(s(l),{class:[s(i),{[s(c).bm("group","append")]:f.$slots.append,[s(c).bm("group","prepend")]:f.$slots.prepend}],style:s(Ce),role:f.containerRole,onMouseenter:Mt,onMouseleave:Ot}),[z(" input "),f.type!=="textarea"?(p(),E(pe,{key:0},[z(" prepend slot "),f.$slots.prepend?(p(),E("div",{key:0,class:R(s(c).be("group","prepend"))},[xe(f.$slots,"prepend")],2)):z("v-if",true),m("div",{ref_key:"wrapperRef",ref:A,class:R(s(u))},[z(" prefix slot "),f.$slots.prefix||f.prefixIcon?(p(),E("span",{key:0,class:R(s(c).e("prefix"))},[m("span",{class:R(s(c).e("prefix-inner"))},[xe(f.$slots,"prefix"),f.prefixIcon?(p(),j(s(qe),{key:0,class:R(s(c).e("icon"))},{default:S(()=>[(p(),j(ze(f.prefixIcon)))]),_:1},8,["class"])):z("v-if",true)],2)],2)):z("v-if",true),m("input",Nt({id:s(N),ref_key:"input",ref:$,class:s(c).e("inner")},s(d),{minlength:f.minlength,maxlength:f.maxlength,type:f.showPassword?P.value?"text":"password":f.type,disabled:s(v),readonly:f.readonly,autocomplete:f.autocomplete,tabindex:f.tabindex,"aria-label":f.label||f.ariaLabel,placeholder:f.placeholder,style:f.inputStyle,form:f.form,autofocus:f.autofocus,onCompositionstart:Be,onCompositionupdate:St,onCompositionend:Et,onInput:Re,onFocus:H[0]||(H[0]=(...oe)=>s(G)&&s(G)(...oe)),onBlur:H[1]||(H[1]=(...oe)=>s(U)&&s(U)(...oe)),onChange:ft,onKeydown:Z}),null,16,Zl),z(" suffix slot "),s(Ct)?(p(),E("span",{key:1,class:R(s(c).e("suffix"))},[m("span",{class:R(s(c).e("suffix-inner"))},[!s(Ie)||!s(Xe)||!s(Oe)?(p(),E(pe,{key:0},[xe(f.$slots,"suffix"),f.suffixIcon?(p(),j(s(qe),{key:0,class:R(s(c).e("icon"))},{default:S(()=>[(p(),j(ze(f.suffixIcon)))]),_:1},8,["class"])):z("v-if",true)],64)):z("v-if",true),s(Ie)?(p(),j(s(qe),{key:1,class:R([s(c).e("icon"),s(c).e("clear")]),onMousedown:Pe(s(Vt),["prevent"]),onClick:ve},{default:S(()=>[C(s(Ao))]),_:1},8,["class","onMousedown"])):z("v-if",true),s(Xe)?(p(),j(s(qe),{key:2,class:R([s(c).e("icon"),s(c).e("password")]),onClick:It},{default:S(()=>[(p(),j(ze(s(ae))))]),_:1},8,["class"])):z("v-if",true),s(Oe)?(p(),E("span",{key:3,class:R(s(c).e("count"))},[m("span",{class:R(s(c).e("count-inner"))},K(s($e))+" / "+K(f.maxlength),3)],2)):z("v-if",true),s(fe)&&s(Ee)&&s(X)?(p(),j(s(qe),{key:4,class:R([s(c).e("icon"),s(c).e("validateIcon"),s(c).is("loading",s(fe)==="validating")])},{default:S(()=>[(p(),j(ze(s(Ee))))]),_:1},8,["class"])):z("v-if",true)],2)],2)):z("v-if",true)],2),z(" append slot "),f.$slots.append?(p(),E("div",{key:1,class:R(s(c).be("group","append"))},[xe(f.$slots,"append")],2)):z("v-if",true)],64)):(p(),E(pe,{key:1},[z(" textarea "),m("textarea",Nt({id:s(N),ref_key:"textarea",ref:D,class:[s(I).e("inner"),s(c).is("focus",s(Y))]},s(d),{minlength:f.minlength,maxlength:f.maxlength,tabindex:f.tabindex,disabled:s(v),readonly:f.readonly,autocomplete:f.autocomplete,style:s(ke),"aria-label":f.label||f.ariaLabel,placeholder:f.placeholder,form:f.form,autofocus:f.autofocus,onCompositionstart:Be,onCompositionupdate:St,onCompositionend:Et,onInput:Re,onFocus:H[2]||(H[2]=(...oe)=>s(G)&&s(G)(...oe)),onBlur:H[3]||(H[3]=(...oe)=>s(U)&&s(U)(...oe)),onChange:ft,onKeydown:Z}),null,16,Jl),s(Oe)?(p(),E("span",{key:0,style:Ke(M.value),class:R(s(c).e("count"))},K(s($e))+" / "+K(f.maxlength),7)):z("v-if",true)],64))],16,Xl))}});var ti=dt(ei,[["__file","input.vue"]]);const ni=bn(ti),_n="focus-trap.focus-after-trapped",Cn="focus-trap.focus-after-released",oi="focus-trap.focusout-prevented",bo={cancelable:true,bubbles:false},ai={cancelable:true,bubbles:false},yo="focusAfterTrapped",wo="focusAfterReleased",si=Symbol("elFocusTrap"),Yn=L(),wn=L(0),Gn=L(0);let Xt=0;const va=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},xo=(e,t)=>{for(const n of e)if(!ri(n,t))return n},ri=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return true;for(;e;){if(t&&e===t)return false;if(getComputedStyle(e).display==="none")return true;e=e.parentElement}return false},li=e=>{const t=va(e),n=xo(t,e),o=xo(t.reverse(),e);return[n,o]},ii=e=>e instanceof HTMLInputElement&&"select"in e,st=(e,t)=>{if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:true}),Gn.value=window.performance.now(),e!==n&&ii(e)&&t&&e.select()}};function _o(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const ci=()=>{let e=[];return{push:o=>{const a=e[0];a&&o!==a&&a.pause(),e=_o(e,o),e.unshift(o)},remove:o=>{var a,r;e=_o(e,o),(r=(a=e[0])==null?void 0:a.resume)==null||r.call(a)}}},ui=(e,t=false)=>{const n=document.activeElement;for(const o of e)if(st(o,t),document.activeElement!==n)return},Co=ci(),di=()=>wn.value>Gn.value,Zt=()=>{Yn.value="pointer",wn.value=window.performance.now()},ko=()=>{Yn.value="keyboard",wn.value=window.performance.now()},fi=()=>(Ge(()=>{Xt===0&&(document.addEventListener("mousedown",Zt),document.addEventListener("touchstart",Zt),document.addEventListener("keydown",ko)),Xt++}),Kt(()=>{Xt--,Xt<=0&&(document.removeEventListener("mousedown",Zt),document.removeEventListener("touchstart",Zt),document.removeEventListener("keydown",ko))}),{focusReason:Yn,lastUserFocusTimestamp:wn,lastAutomatedFocusTimestamp:Gn}),Jt=e=>new CustomEvent(oi,{...ai,detail:e}),pi=q({name:"ElFocusTrap",inheritAttrs:false,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[yo,wo,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=L();let o,a;const{focusReason:r}=fi();Tl(v=>{e.trapped&&!l.paused&&t("release-requested",v)});const l={paused:false,pause(){this.paused=true},resume(){this.paused=false}},i=v=>{if(!e.loop&&!e.trapped||l.paused)return;const{key:c,altKey:I,ctrlKey:$,metaKey:D,currentTarget:Q,shiftKey:ie}=v,{loop:P}=e,M=c===yn.tab&&!I&&!$&&!D,g=document.activeElement;if(M&&g){const F=Q,[A,Y]=li(F);if(A&&Y){if(!ie&&g===Y){const U=Jt({focusReason:r.value});t("focusout-prevented",U),U.defaultPrevented||(v.preventDefault(),P&&st(A,true))}else if(ie&&[A,F].includes(g)){const U=Jt({focusReason:r.value});t("focusout-prevented",U),U.defaultPrevented||(v.preventDefault(),P&&st(Y,true))}}else if(g===F){const U=Jt({focusReason:r.value});t("focusout-prevented",U),U.defaultPrevented||v.preventDefault()}}};Pn(si,{focusTrapRef:n,onKeydown:i}),_e(()=>e.focusTrapEl,v=>{v&&(n.value=v)},{immediate:true}),_e([n],([v],[c])=>{v&&(v.addEventListener("keydown",i),v.addEventListener("focusin",T),v.addEventListener("focusout",_)),c&&(c.removeEventListener("keydown",i),c.removeEventListener("focusin",T),c.removeEventListener("focusout",_))});const u=v=>{t(yo,v)},d=v=>t(wo,v),T=v=>{const c=s(n);if(!c)return;const I=v.target,$=v.relatedTarget,D=I&&c.contains(I);e.trapped||$&&c.contains($)||(o=$),D&&t("focusin",v),!l.paused&&e.trapped&&(D?a=I:st(a,true))},_=v=>{const c=s(n);if(!(l.paused||!c))if(e.trapped){const I=v.relatedTarget;!qo(I)&&!c.contains(I)&&setTimeout(()=>{if(!l.paused&&e.trapped){const $=Jt({focusReason:r.value});t("focusout-prevented",$),$.defaultPrevented||st(a,true)}},0)}else{const I=v.target;I&&c.contains(I)||t("focusout",v)}};async function N(){await de();const v=s(n);if(v){Co.push(l);const c=v.contains(document.activeElement)?o:document.activeElement;if(o=c,!v.contains(c)){const $=new Event(_n,bo);v.addEventListener(_n,u),v.dispatchEvent($),$.defaultPrevented||de(()=>{let D=e.focusStartEl;We(D)||(st(D),document.activeElement!==D&&(D="first")),D==="first"&&ui(va(v),true),(document.activeElement===c||D==="container")&&st(v)})}}}function b(){const v=s(n);if(v){v.removeEventListener(_n,u);const c=new CustomEvent(Cn,{...bo,detail:{focusReason:r.value}});v.addEventListener(Cn,d),v.dispatchEvent(c),!c.defaultPrevented&&(r.value=="keyboard"||!di()||v.contains(document.activeElement))&&st(o??document.body),v.removeEventListener(Cn,d),Co.remove(l)}}return Ge(()=>{e.trapped&&N(),_e(()=>e.trapped,v=>{v?N():b()})}),Kt(()=>{e.trapped&&b()}),{onKeydown:i}}});function vi(e,t,n,o,a,r){return xe(e.$slots,"default",{handleKeydown:e.onKeydown})}var hi=dt(pi,[["render",vi],["__file","focus-trap.vue"]]);const mi=tt({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:true},color:String,dotStyle:{type:he([String,Object,Array])},badgeStyle:{type:he([String,Object,Array])},offset:{type:he(Array),default:[0,0]},dotClass:{type:String},badgeClass:{type:String}}),gi=["textContent"],bi=q({name:"ElBadge"}),yi=q({...bi,props:mi,setup(e,{expose:t}){const n=e,o=Ye("badge"),a=k(()=>n.isDot?"":wt(n.value)&&wt(n.max)?n.max<n.value?`${n.max}+`:n.value===0&&!n.showZero?"":`${n.value}`:`${n.value}`),r=k(()=>{var l,i,u,d,T,_;return[{backgroundColor:n.color,marginRight:Dt(-((i=(l=n.offset)==null?void 0:l[0])!=null?i:0)),marginTop:Dt((d=(u=n.offset)==null?void 0:u[1])!=null?d:0)},(T=n.dotStyle)!=null?T:{},(_=n.badgeStyle)!=null?_:{}]});return dn({from:"dot-style",replacement:"badge-style",version:"2.8.0",scope:"el-badge",ref:"https://element-plus.org/en-US/component/badge.html"},k(()=>!!n.dotStyle)),dn({from:"dot-class",replacement:"badge-class",version:"2.8.0",scope:"el-badge",ref:"https://element-plus.org/en-US/component/badge.html"},k(()=>!!n.dotClass)),t({content:a}),(l,i)=>(p(),E("div",{class:R(s(o).b())},[xe(l.$slots,"default"),C(On,{name:`${s(o).namespace.value}-zoom-in-center`,persisted:""},{default:S(()=>[it(m("sup",{class:R([s(o).e("content"),s(o).em("content",l.type),s(o).is("fixed",!!l.$slots.default),s(o).is("dot",l.isDot),l.dotClass,l.badgeClass]),style:Ke(s(r)),textContent:K(s(a))},null,14,gi),[[ct,!l.hidden&&(s(a)||l.isDot)]])]),_:1},8,["name"])],2))}});var wi=dt(yi,[["__file","badge.vue"]]);const xi=bn(wi),ha=Symbol("buttonGroupContextKey"),_i=(e,t)=>{dn({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},k(()=>e.type==="text"));const n=Te(ha,void 0),o=Kn("button"),{form:a}=pa(),r=fa(k(()=>n==null?void 0:n.size)),l=Wn(),i=L(),u=$o(),d=k(()=>e.type||(n==null?void 0:n.type)||""),T=k(()=>{var v,c,I;return(I=(c=e.autoInsertSpace)!=null?c:(v=o.value)==null?void 0:v.autoInsertSpace)!=null?I:false}),_=k(()=>e.tag==="button"?{ariaDisabled:l.value||e.loading,disabled:l.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),N=k(()=>{var v;const c=(v=u.default)==null?void 0:v.call(u);if(T.value&&(c==null?void 0:c.length)===1){const I=c[0];if((I==null?void 0:I.type)===ka){const $=I.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test($.trim())}}return false});return{_disabled:l,_size:r,_type:d,_ref:i,_props:_,shouldAddSpace:N,handleClick:v=>{e.nativeType==="reset"&&(a==null||a.resetFields()),t("click",v)}}},Ci=["default","primary","success","warning","info","danger","text",""],ki=["button","submit","reset"],Bn=tt({size:jn,disabled:Boolean,type:{type:String,values:Ci,default:""},icon:{type:Ut},nativeType:{type:String,values:ki,default:"button"},loading:Boolean,loadingIcon:{type:Ut,default:()=>gt},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:he([String,Object]),default:"button"}}),Si={click:e=>e instanceof MouseEvent};function me(e,t){Ei(e)&&(e="100%");var n=Ii(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function Qt(e){return Math.min(1,Math.max(0,e))}function Ei(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Ii(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ma(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function en(e){return e<=1?"".concat(Number(e)*100,"%"):e}function ht(e){return e.length===1?"0"+e:String(e)}function Mi(e,t,n){return{r:me(e,255)*255,g:me(t,255)*255,b:me(n,255)*255}}function So(e,t,n){e=me(e,255),t=me(t,255),n=me(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),r=0,l=0,i=(o+a)/2;if(o===a)l=0,r=0;else{var u=o-a;switch(l=i>.5?u/(2-o-a):u/(o+a),o){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4;break}r/=6}return{h:r,s:l,l:i}}function kn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ti(e,t,n){var o,a,r;if(e=me(e,360),t=me(t,100),n=me(n,100),t===0)a=n,r=n,o=n;else{var l=n<.5?n*(1+t):n+t-n*t,i=2*n-l;o=kn(i,l,e+1/3),a=kn(i,l,e),r=kn(i,l,e-1/3)}return{r:o*255,g:a*255,b:r*255}}function Eo(e,t,n){e=me(e,255),t=me(t,255),n=me(n,255);var o=Math.max(e,t,n),a=Math.min(e,t,n),r=0,l=o,i=o-a,u=o===0?0:i/o;if(o===a)r=0;else{switch(o){case e:r=(t-n)/i+(t<n?6:0);break;case t:r=(n-e)/i+2;break;case n:r=(e-t)/i+4;break}r/=6}return{h:r,s:u,v:l}}function $i(e,t,n){e=me(e,360)*6,t=me(t,100),n=me(n,100);var o=Math.floor(e),a=e-o,r=n*(1-t),l=n*(1-a*t),i=n*(1-(1-a)*t),u=o%6,d=[n,l,r,r,i,n][u],T=[i,n,n,l,r,r][u],_=[r,r,i,n,n,l][u];return{r:d*255,g:T*255,b:_*255}}function Io(e,t,n,o){var a=[ht(Math.round(e).toString(16)),ht(Math.round(t).toString(16)),ht(Math.round(n).toString(16))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function Bi(e,t,n,o,a){var r=[ht(Math.round(e).toString(16)),ht(Math.round(t).toString(16)),ht(Math.round(n).toString(16)),ht(Li(o))];return a&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))&&r[3].startsWith(r[3].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0)+r[3].charAt(0):r.join("")}function Li(e){return Math.round(parseFloat(e)*255).toString(16)}function Mo(e){return Ae(e)/255}function Ae(e){return parseInt(e,16)}function Ai(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Ln={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Pi(e){var t={r:0,g:0,b:0},n=1,o=null,a=null,r=null,l=false,i=false;return typeof e=="string"&&(e=Ri(e)),typeof e=="object"&&(Qe(e.r)&&Qe(e.g)&&Qe(e.b)?(t=Mi(e.r,e.g,e.b),l=true,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Qe(e.h)&&Qe(e.s)&&Qe(e.v)?(o=en(e.s),a=en(e.v),t=$i(e.h,o,a),l=true,i="hsv"):Qe(e.h)&&Qe(e.s)&&Qe(e.l)&&(o=en(e.s),r=en(e.l),t=Ti(e.h,o,r),l=true,i="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ma(n),{ok:l,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Oi="[-\\+]?\\d+%?",zi="[-\\+]?\\d*\\.\\d+%?",lt="(?:".concat(zi,")|(?:").concat(Oi,")"),Sn="[\\s|\\(]+(".concat(lt,")[,|\\s]+(").concat(lt,")[,|\\s]+(").concat(lt,")\\s*\\)?"),En="[\\s|\\(]+(".concat(lt,")[,|\\s]+(").concat(lt,")[,|\\s]+(").concat(lt,")[,|\\s]+(").concat(lt,")\\s*\\)?"),Ve={CSS_UNIT:new RegExp(lt),rgb:new RegExp("rgb"+Sn),rgba:new RegExp("rgba"+En),hsl:new RegExp("hsl"+Sn),hsla:new RegExp("hsla"+En),hsv:new RegExp("hsv"+Sn),hsva:new RegExp("hsva"+En),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ri(e){if(e=e.trim().toLowerCase(),e.length===0)return false;var t=false;if(Ln[e])e=Ln[e],t=true;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Ve.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ve.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ve.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Ve.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ve.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Ve.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ve.hex8.exec(e),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),a:Mo(n[4]),format:t?"name":"hex8"}:(n=Ve.hex6.exec(e),n?{r:Ae(n[1]),g:Ae(n[2]),b:Ae(n[3]),format:t?"name":"hex"}:(n=Ve.hex4.exec(e),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),a:Mo(n[4]+n[4]),format:t?"name":"hex8"}:(n=Ve.hex3.exec(e),n?{r:Ae(n[1]+n[1]),g:Ae(n[2]+n[2]),b:Ae(n[3]+n[3]),format:t?"name":"hex"}:false)))))))))}function Qe(e){return!!Ve.CSS_UNIT.exec(String(e))}var Ni=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=Ai(t)),this.originalInput=t;var a=Pi(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,a,r=t.r/255,l=t.g/255,i=t.b/255;return r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),l<=.03928?o=l/12.92:o=Math.pow((l+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*n+.7152*o+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=ma(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Eo(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Eo(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(a,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=So(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=So(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(a,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=false),Io(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=false),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=false),Bi(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=false),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=false),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(me(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(me(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return false;for(var t="#"+Io(this.r,this.g,this.b,false),n=0,o=Object.entries(Ln);n<o.length;n++){var a=o[n],r=a[0],l=a[1];if(t===l)return r}return false},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var o=false,a=this.a<1&&this.a>=0,r=!n&&a&&(t.startsWith("hex")||t==="name");return r?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(true)),t==="hex4"&&(o=this.toHex8String(true)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=Qt(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=Qt(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=Qt(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=Qt(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),a=new e(t).toRgb(),r=n/100,l={r:(a.r-o.r)*r+o.r,g:(a.g-o.g)*r+o.g,b:(a.b-o.b)*r+o.b,a:(a.a-o.a)*r+o.a};return new e(l)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),a=360/n,r=[this];for(o.h=(o.h-(a*t>>1)+720)%360;--t;)o.h=(o.h+a)%360,r.push(new e(o));return r},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,a=n.s,r=n.v,l=[],i=1/t;t--;)l.push(new e({h:o,s:a,v:r})),r=(r+i)%1;return l},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),a=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/a,g:(n.g*n.a+o.g*o.a*(1-n.a))/a,b:(n.b*n.a+o.b*o.a*(1-n.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,a=[this],r=360/t,l=1;l<t;l++)a.push(new e({h:(o+l*r)%360,s:n.s,l:n.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function at(e,t=20){return e.mix("#141414",t).toString()}function Vi(e){const t=Wn(),n=Ye("button");return k(()=>{let o={},a=e.color;if(a){const r=a.match(/var\((.*?)\)/);r&&(a=window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));const l=new Ni(a),i=e.dark?l.tint(20).toString():at(l,20);if(e.plain)o=n.cssVarBlock({"bg-color":e.dark?at(l,90):l.tint(90).toString(),"text-color":a,"border-color":e.dark?at(l,50):l.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":a,"hover-border-color":a,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),t.value&&(o[n.cssVarBlockName("disabled-bg-color")]=e.dark?at(l,90):l.tint(90).toString(),o[n.cssVarBlockName("disabled-text-color")]=e.dark?at(l,50):l.tint(50).toString(),o[n.cssVarBlockName("disabled-border-color")]=e.dark?at(l,80):l.tint(80).toString());else{const u=e.dark?at(l,30):l.tint(30).toString(),d=l.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(o=n.cssVarBlock({"bg-color":a,"text-color":d,"border-color":a,"hover-bg-color":u,"hover-text-color":d,"hover-border-color":u,"active-bg-color":i,"active-border-color":i}),t.value){const T=e.dark?at(l,50):l.tint(50).toString();o[n.cssVarBlockName("disabled-bg-color")]=T,o[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,o[n.cssVarBlockName("disabled-border-color")]=T}}}return o})}const Fi=q({name:"ElButton"}),Hi=q({...Fi,props:Bn,emits:Si,setup(e,{expose:t,emit:n}){const o=e,a=Vi(o),r=Ye("button"),{_ref:l,_size:i,_type:u,_disabled:d,_props:T,shouldAddSpace:_,handleClick:N}=_i(o,n),b=k(()=>[r.b(),r.m(u.value),r.m(i.value),r.is("disabled",d.value),r.is("loading",o.loading),r.is("plain",o.plain),r.is("round",o.round),r.is("circle",o.circle),r.is("text",o.text),r.is("link",o.link),r.is("has-bg",o.bg)]);return t({ref:l,size:i,type:u,disabled:d,shouldAddSpace:_}),(v,c)=>(p(),j(ze(v.tag),Nt({ref_key:"_ref",ref:l},s(T),{class:s(b),style:s(a),onClick:s(N)}),{default:S(()=>[v.loading?(p(),E(pe,{key:0},[v.$slots.loading?xe(v.$slots,"loading",{key:0}):(p(),j(s(qe),{key:1,class:R(s(r).is("loading"))},{default:S(()=>[(p(),j(ze(v.loadingIcon)))]),_:1},8,["class"]))],64)):v.icon||v.$slots.icon?(p(),j(s(qe),{key:1},{default:S(()=>[v.icon?(p(),j(ze(v.icon),{key:0})):xe(v.$slots,"icon",{key:1})]),_:3})):z("v-if",true),v.$slots.default?(p(),E("span",{key:2,class:R({[s(r).em("text","expand")]:s(_)})},[xe(v.$slots,"default")],2)):z("v-if",true)]),_:3},16,["class","style","onClick"]))}});var Di=dt(Hi,[["__file","button.vue"]]);const Ui={size:Bn.size,type:Bn.type},ji=q({name:"ElButtonGroup"}),Ki=q({...ji,props:Ui,setup(e){const t=e;Pn(ha,$t({size:an(t,"size"),type:an(t,"type")}));const n=Ye("button");return(o,a)=>(p(),E("div",{class:R(`${s(n).b("group")}`)},[xe(o.$slots,"default")],2))}});var ga=dt(Ki,[["__file","button-group.vue"]]);const qi=bn(Di,{ButtonGroup:ga});pl(ga);const An="_trap-focus-children",mt=[],To=e=>{if(mt.length===0)return;const t=mt[mt.length-1][An];if(t.length>0&&e.code===yn.tab){if(t.length===1){e.preventDefault(),document.activeElement!==t[0]&&t[0].focus();return}const n=e.shiftKey,o=e.target===t[0],a=e.target===t[t.length-1];o&&n&&(e.preventDefault(),t[t.length-1].focus()),a&&!n&&(e.preventDefault(),t[0].focus())}},Wi={beforeMount(e){e[An]=to(e),mt.push(e),mt.length<=1&&document.addEventListener("keydown",To)},updated(e){de(()=>{e[An]=to(e)})},unmounted(){mt.shift(),mt.length===0&&document.removeEventListener("keydown",To)}},Yi=tt({mask:{type:Boolean,default:true},customMaskEvent:{type:Boolean,default:false},overlayClass:{type:he([String,Array,Object])},zIndex:{type:he([String,Number])}}),Gi={click:e=>e instanceof MouseEvent},Xi="overlay";var Zi=q({name:"ElOverlay",props:Yi,emits:Gi,setup(e,{slots:t,emit:n}){const o=Ye(Xi),a=u=>{n("click",u)},{onClick:r,onMousedown:l,onMouseup:i}=aa(e.customMaskEvent?void 0:a);return()=>e.mask?C("div",{class:[o.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:r,onMousedown:l,onMouseup:i},[xe(t,"default")],nn.STYLE|nn.CLASS|nn.PROPS,["onClick","onMouseup","onMousedown"]):te("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[xe(t,"default")])}});const Ji=Zi,ba=["success","info","warning","error"],we=Qo({customClass:"",center:false,dangerouslyUseHTMLString:false,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:false,type:"info",plain:false,offset:16,zIndex:0,grouping:false,repeatNum:1,appendTo:He?document.body:void 0}),Qi=tt({customClass:{type:String,default:we.customClass},center:{type:Boolean,default:we.center},dangerouslyUseHTMLString:{type:Boolean,default:we.dangerouslyUseHTMLString},duration:{type:Number,default:we.duration},icon:{type:Ut,default:we.icon},id:{type:String,default:we.id},message:{type:he([String,Object,Function]),default:we.message},onClose:{type:he(Function),default:we.onClose},showClose:{type:Boolean,default:we.showClose},type:{type:String,values:ba,default:we.type},plain:{type:Boolean,default:we.plain},offset:{type:Number,default:we.offset},zIndex:{type:Number,default:we.zIndex},grouping:{type:Boolean,default:we.grouping},repeatNum:{type:Number,default:we.repeatNum}}),ec={destroy:()=>true},Fe=Sa([]),tc=e=>{const t=Fe.findIndex(a=>a.id===e),n=Fe[t];let o;return t>0&&(o=Fe[t-1]),{current:n,prev:o}},nc=e=>{const{prev:t}=tc(e);return t?t.vm.exposed.bottom.value:0},oc=(e,t)=>Fe.findIndex(o=>o.id===e)>0?16:t,ac=["id"],sc=["innerHTML"],rc=q({name:"ElMessage"}),lc=q({...rc,props:Qi,emits:ec,setup(e,{expose:t}){const n=e,{Close:o}=Zo,{ns:a,zIndex:r}=ca("message"),{currentZIndex:l,nextZIndex:i}=r,u=L(),d=L(false),T=L(0);let _;const N=k(()=>n.type?n.type==="error"?"danger":n.type:"info"),b=k(()=>{const g=n.type;return{[a.bm("icon",g)]:g&&un[g]}}),v=k(()=>n.icon||un[n.type]||""),c=k(()=>nc(n.id)),I=k(()=>oc(n.id,n.offset)+c.value),$=k(()=>T.value+I.value),D=k(()=>({top:`${I.value}px`,zIndex:l.value}));function Q(){n.duration!==0&&({stop:_}=Ma(()=>{P()},n.duration))}function ie(){_==null||_()}function P(){d.value=false}function M({code:g}){g===yn.esc&&P()}return Ge(()=>{Q(),i(),d.value=true}),_e(()=>n.repeatNum,()=>{ie(),Q()}),Bo(document,"keydown",M),Lo(u,()=>{T.value=u.value.getBoundingClientRect().height}),t({visible:d,bottom:$,close:P}),(g,F)=>(p(),j(On,{name:s(a).b("fade"),onBeforeLeave:g.onClose,onAfterLeave:F[0]||(F[0]=A=>g.$emit("destroy")),persisted:""},{default:S(()=>[it(m("div",{id:g.id,ref_key:"messageRef",ref:u,class:R([s(a).b(),{[s(a).m(g.type)]:g.type},s(a).is("center",g.center),s(a).is("closable",g.showClose),s(a).is("plain",g.plain),g.customClass]),style:Ke(s(D)),role:"alert",onMouseenter:ie,onMouseleave:Q},[g.repeatNum>1?(p(),j(s(xi),{key:0,value:g.repeatNum,type:s(N),class:R(s(a).e("badge"))},null,8,["value","type","class"])):z("v-if",true),s(v)?(p(),j(s(qe),{key:1,class:R([s(a).e("icon"),s(b)])},{default:S(()=>[(p(),j(ze(s(v))))]),_:1},8,["class"])):z("v-if",true),xe(g.$slots,"default",{},()=>[g.dangerouslyUseHTMLString?(p(),E(pe,{key:1},[z(" Caution here, message could've been compromised, never use user's input as message "),m("p",{class:R(s(a).e("content")),innerHTML:g.message},null,10,sc)],2112)):(p(),E("p",{key:0,class:R(s(a).e("content"))},K(g.message),3))]),g.showClose?(p(),j(s(qe),{key:2,class:R(s(a).e("closeBtn")),onClick:Pe(P,["stop"])},{default:S(()=>[C(s(o))]),_:1},8,["class","onClick"])):z("v-if",true)],46,ac),[[ct,d.value]])]),_:3},8,["name","onBeforeLeave"]))}});var ic=dt(lc,[["__file","message.vue"]]);let cc=1;const ya=e=>{const t=!e||We(e)||vn(e)||bt(e)?{message:e}:e,n={...we,...t};if(!n.appendTo)n.appendTo=document.body;else if(We(n.appendTo)){let o=document.querySelector(n.appendTo);In(o)||(o=document.body),n.appendTo=o}return n},uc=e=>{const t=Fe.indexOf(e);if(t===-1)return;Fe.splice(t,1);const{handler:n}=e;n.close()},dc=({appendTo:e,...t},n)=>{const o=`message_${cc++}`,a=t.onClose,r=document.createElement("div"),l={...t,id:o,onClose:()=>{a==null||a(),uc(T)},onDestroy:()=>{sn(null,r)}},i=C(ic,l,bt(l.message)||vn(l.message)?{default:bt(l.message)?l.message:()=>l.message}:null);i.appContext=n||Bt._context,sn(i,r),e.appendChild(r.firstElementChild);const u=i.component,T={id:o,vnode:i,vm:u,handler:{close:()=>{u.exposed.visible.value=false}},props:i.component.props};return T},Bt=(e={},t)=>{if(!He)return{close:()=>{}};if(wt($n.max)&&Fe.length>=$n.max)return{close:()=>{}};const n=ya(e);if(n.grouping&&Fe.length){const a=Fe.find(({vnode:r})=>{var l;return((l=r.props)==null?void 0:l.message)===n.message});if(a)return a.props.repeatNum+=1,a.props.type=n.type,a.handler}const o=dc(n,t);return Fe.push(o),o.handler};ba.forEach(e=>{Bt[e]=(t={},n)=>{const o=ya(t);return Bt({...o,type:e},n)}});function fc(e){for(const t of Fe)(!e||e===t.props.type)&&t.handler.close()}Bt.closeAll=fc;Bt._context=null;const je=fl(Bt,"$message"),pc=q({name:"ElMessageBox",directives:{TrapFocus:Wi},components:{ElButton:qi,ElFocusTrap:hi,ElInput:ni,ElOverlay:Ji,ElIcon:qe,...Zo},inheritAttrs:false,props:{buttonSize:{type:String,validator:vl},modal:{type:Boolean,default:true},lockScroll:{type:Boolean,default:true},showClose:{type:Boolean,default:true},closeOnClickModal:{type:Boolean,default:true},closeOnPressEscape:{type:Boolean,default:true},closeOnHashChange:{type:Boolean,default:true},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:{default:false,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:o,ns:a,size:r}=ca("message-box",k(()=>e.buttonSize)),{t:l}=n,{nextZIndex:i}=o,u=L(false),d=$t({autofocus:true,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:false,distinguishCancelAndClose:false,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:true,modalClass:"",showCancelButton:false,showConfirmButton:true,type:"",title:void 0,showInput:false,action:"",confirmButtonLoading:false,cancelButtonLoading:false,confirmButtonLoadingIcon:gt,cancelButtonLoadingIcon:gt,confirmButtonDisabled:false,editorErrorMessage:"",validateError:false,zIndex:i()}),T=k(()=>{const ae=d.type;return{[a.bm("icon",ae)]:ae&&un[ae]}}),_=Tn(),N=Tn(),b=k(()=>d.icon||un[d.type]||""),v=k(()=>!!d.message),c=L(),I=L(),$=L(),D=L(),Q=L(),ie=k(()=>d.confirmButtonClass);_e(()=>d.inputValue,async ae=>{await de(),e.boxType==="prompt"&&ae!==null&&U()},{immediate:true}),_e(()=>u.value,ae=>{var Ce,ke;ae&&(e.boxType!=="prompt"&&(d.autofocus?$.value=(ke=(Ce=Q.value)==null?void 0:Ce.$el)!=null?ke:c.value:$.value=c.value),d.zIndex=i()),e.boxType==="prompt"&&(ae?de().then(()=>{var ge;D.value&&D.value.$el&&(d.autofocus?$.value=(ge=X())!=null?ge:c.value:$.value=c.value)}):(d.editorErrorMessage="",d.validateError=false))});const P=k(()=>e.draggable),M=k(()=>e.overflow);yl(c,I,P,M),Ge(async()=>{await de(),e.closeOnHashChange&&window.addEventListener("hashchange",g)}),Kt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",g)});function g(){u.value&&(u.value=false,de(()=>{d.action&&t("action",d.action)}))}const F=()=>{e.closeOnClickModal&&G(d.distinguishCancelAndClose?"close":"cancel")},A=aa(F),Y=ae=>{if(d.inputType!=="textarea")return ae.preventDefault(),G("confirm")},G=ae=>{var Ce;e.boxType==="prompt"&&ae==="confirm"&&!U()||(d.action=ae,d.beforeClose?(Ce=d.beforeClose)==null||Ce.call(d,ae,d,g):g())},U=()=>{if(e.boxType==="prompt"){const ae=d.inputPattern;if(ae&&!ae.test(d.inputValue||""))return d.editorErrorMessage=d.inputErrorMessage||l("el.messagebox.error"),d.validateError=true,false;const Ce=d.inputValidator;if(typeof Ce=="function"){const ke=Ce(d.inputValue);if(ke===false)return d.editorErrorMessage=d.inputErrorMessage||l("el.messagebox.error"),d.validateError=true,false;if(typeof ke=="string")return d.editorErrorMessage=ke,d.validateError=true,false}}return d.editorErrorMessage="",d.validateError=false,true},X=()=>{const ae=D.value.$refs;return ae.input||ae.textarea},fe=()=>{G("close")},Ee=()=>{e.closeOnPressEscape&&fe()};return e.lockScroll&&El(u),{...Ea(d),ns:a,overlayEvent:A,visible:u,hasMessage:v,typeClass:T,contentId:_,inputId:N,btnSize:r,iconComponent:b,confirmButtonClasses:ie,rootRef:c,focusStartRef:$,headerRef:I,inputRef:D,confirmRef:Q,doClose:g,handleClose:fe,onCloseRequested:Ee,handleWrapperClick:F,handleInputEnter:Y,handleAction:G,t:l}}}),vc=["aria-label","aria-describedby"],hc=["aria-label"],mc=["id"];function gc(e,t,n,o,a,r){const l=ue("el-icon"),i=ue("close"),u=ue("el-input"),d=ue("el-button"),T=ue("el-focus-trap"),_=ue("el-overlay");return p(),j(On,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=N=>e.$emit("vanish")),persisted:""},{default:S(()=>[it(C(_,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:S(()=>[m("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:R(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...N)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...N)),onMousedown:t[9]||(t[9]=(...N)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...N)),onMouseup:t[10]||(t[10]=(...N)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...N))},[C(T,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:S(()=>[m("div",{ref:"rootRef",class:R([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),{[e.ns.m("center")]:e.center}]),style:Ke(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Pe(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(p(),E("div",{key:0,ref:"headerRef",class:R([e.ns.e("header"),{"show-close":e.showClose}])},[m("div",{class:R(e.ns.e("title"))},[e.iconComponent&&e.center?(p(),j(l,{key:0,class:R([e.ns.e("status"),e.typeClass])},{default:S(()=>[(p(),j(ze(e.iconComponent)))]),_:1},8,["class"])):z("v-if",true),m("span",null,K(e.title),1)],2),e.showClose?(p(),E("button",{key:0,type:"button",class:R(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=N=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=Rt(Pe(N=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[C(l,{class:R(e.ns.e("close"))},{default:S(()=>[C(i)]),_:1},8,["class"])],42,hc)):z("v-if",true)],2)):z("v-if",true),m("div",{id:e.contentId,class:R(e.ns.e("content"))},[m("div",{class:R(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(p(),j(l,{key:0,class:R([e.ns.e("status"),e.typeClass])},{default:S(()=>[(p(),j(ze(e.iconComponent)))]),_:1},8,["class"])):z("v-if",true),e.hasMessage?(p(),E("div",{key:1,class:R(e.ns.e("message"))},[xe(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(p(),j(ze(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(p(),j(ze(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:S(()=>[ee(K(e.dangerouslyUseHTMLString?"":e.message),1)]),_:1},8,["for"]))])],2)):z("v-if",true)],2),it(m("div",{class:R(e.ns.e("input"))},[C(u,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=N=>e.inputValue=N),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:R({invalid:e.validateError}),onKeydown:Rt(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),m("div",{class:R(e.ns.e("errormsg")),style:Ke({visibility:e.editorErrorMessage?"visible":"hidden"})},K(e.editorErrorMessage),7)],2),[[ct,e.showInput]])],10,mc),m("div",{class:R(e.ns.e("btns"))},[e.showCancelButton?(p(),j(d,{key:0,loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:R([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=N=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=Rt(Pe(N=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:S(()=>[ee(K(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size"])):z("v-if",true),it(C(d,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:R([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=N=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=Rt(Pe(N=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:S(()=>[ee(K(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size"]),[[ct,e.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,vc)]),_:3},8,["z-index","overlay-class","mask"]),[[ct,e.visible]])]),_:3})}var bc=dt(pc,[["render",gc],["__file","index.vue"]]);const jt=new Map,yc=e=>{let t=document.body;return e.appendTo&&(We(e.appendTo)&&(t=document.querySelector(e.appendTo)),In(e.appendTo)&&(t=e.appendTo),In(t)||(t=document.body)),t},wc=(e,t,n=null)=>{const o=C(bc,e,bt(e.message)||vn(e.message)?{default:bt(e.message)?e.message:()=>e.message}:null);return o.appContext=n,sn(o,t),yc(e).appendChild(t.firstElementChild),o.component},xc=()=>document.createElement("div"),_c=(e,t)=>{const n=xc();e.onVanish=()=>{sn(null,n),jt.delete(a)},e.onAction=r=>{const l=jt.get(a);let i;e.showInput?i={value:a.inputValue,action:r}:i=r,e.callback?e.callback(i,o.proxy):r==="cancel"||r==="close"?e.distinguishCancelAndClose&&r!=="cancel"?l.reject("close"):l.reject("cancel"):l.resolve(i)};const o=wc(e,n,t),a=o.proxy;for(const r in e)rn(e,r)&&!rn(a.$props,r)&&(a[r]=e[r]);return a.visible=true,a};function At(e,t=null){if(!He)return Promise.reject();let n;return We(e)||vn(e)?e={message:e}:n=e.callback,new Promise((o,a)=>{const r=_c(e,t??At._context);jt.set(r,{options:e,callback:n,resolve:o,reject:a})})}const Cc=["alert","confirm","prompt"],kc={alert:{closeOnPressEscape:false,closeOnClickModal:false},confirm:{showCancelButton:true},prompt:{showCancelButton:true,showInput:true}};Cc.forEach(e=>{At[e]=Sc(e)});function Sc(e){return(t,n,o,a)=>{let r="";return Ft(n)?(o=n,r=""):Wo(n)?r="":r=n,At(Object.assign({title:r,message:t,type:"",...kc[e]},o,{boxType:e}),a)}}At.close=()=>{jt.forEach((e,t)=>{t.doClose()}),jt.clear()};At._context=null;const rt=At;rt.install=e=>{rt._context=e._context,e.config.globalProperties.$msgbox=rt,e.config.globalProperties.$messageBox=rt,e.config.globalProperties.$alert=rt.alert,e.config.globalProperties.$confirm=rt.confirm,e.config.globalProperties.$prompt=rt.prompt};const Ec=rt;function Ic(){const e=L({bots:{},channels:{},messages:{}}),t=L({maxMessagesPerChannel:1e3,loggerinfo:false,blockedPlatforms:[],chatContainerHeight:80,clearIndexedDBOnStart:true}),n=L(new Set),o=L(new Set),a=L({}),r=k(()=>Object.values(e.value.bots).sort((b,v)=>{const c=n.value.has(b.selfId),I=n.value.has(v.selfId);return c===I?0:c?-1:1})),l=b=>!b||!e.value.channels[b]?[]:Object.values(e.value.channels[b]).sort((v,c)=>{const I=o.value.has(`${b}:${v.id}`),$=o.value.has(`${b}:${c.id}`);return I===$?0:I?-1:1}),i=(b,v)=>{const c=`${b}:${v}`;return e.value.messages[c]||[]},u=(b,v)=>{const c=`${b}:${v}`;return a.value[c]||{offset:0,hasMore:true}};async function d(){const b=await Se("get-chat-data");b.success&&b.data&&(e.value={bots:b.data.bots||{},channels:b.data.channels||{},messages:b.data.messages||{}},n.value=new Set(b.data.pinnedBots||[]),o.value=new Set(b.data.pinnedChannels||[]))}async function T(){const b=await Se("get-plugin-config");b.success&&b.config&&(t.value=b.config)}function _(b){var Q,ie;const v=b.selfId,c=b.channelId,I=`${v}:${c}`;if(e.value.bots[v]||(e.value.bots[v]={selfId:v,platform:b.platform||"unknown",username:((Q=b.bot)==null?void 0:Q.name)||`Bot-${v}`,avatar:(ie=b.bot)==null?void 0:ie.avatar,status:"online"}),e.value.channels[v]||(e.value.channels[v]={}),!e.value.channels[v][c]){const P=b.isDirect||c.includes("private");e.value.channels[v][c]={id:c,name:P?`私聊(${b.username||c})`:b.guildName||c,type:b.channelType||0,isDirect:P}}e.value.messages[I]||(e.value.messages[I]=[]);const $=e.value.messages[I];if(!$.some(P=>!!(P.id===b.messageId||P.id===b.id||(b.type==="bot-message"||b.type==="bot-message-sent"||b.type==="bot")&&P.isBot&&Math.abs(P.timestamp-b.timestamp)<2e3&&P.content===b.content))){const P={id:b.messageId||b.id,content:b.content,userId:b.userId,username:b.username,avatar:b.avatar,timestamp:b.timestamp,channelId:c,selfId:v,elements:b.elements,isBot:b.isBot||b.type==="bot-message"||b.type==="bot",quote:b.quote};$.push(P),$.sort((M,g)=>M.timestamp-g.timestamp)}e.value={...e.value}}async function N(b,v,c=50){const I=`${b}:${v}`,$=u(b,v);if(!$.hasMore)return;const D=await Se("get-history-messages",{selfId:b,channelId:v,limit:c,offset:$.offset});if(D.success&&D.messages){e.value.messages[I]||(e.value.messages[I]=[]);const Q=e.value.messages[I],ie=D.messages.filter(P=>!Q.find(M=>M.id===P.id));return e.value.messages[I]=[...ie,...Q].sort((P,M)=>P.timestamp-M.timestamp),a.value[I]={offset:$.offset+D.messages.length,hasMore:D.messages.length>=c&&D.total>$.offset+D.messages.length},e.value={...e.value},D.messages.length}return 0}return{chatData:e,pluginConfig:t,pinnedBots:n,pinnedChannels:o,bots:r,getChannels:l,getMessages:i,getPagination:u,loadInitialData:d,loadConfig:T,addMessage:_,loadHistory:N}}function Mc(){const e=L(false);async function t(i,u,d,T){if(!e.value){e.value=true;try{return await Se("send-message",{selfId:i,channelId:u,content:d,images:T.map(N=>({tempId:N.tempId,filename:N.filename}))})}finally{e.value=false}}}async function n(i){return await Se("delete-bot-data",{selfId:i})}async function o(i,u){return await Se("delete-channel-data",{selfId:i,channelId:u})}async function a(i,u){return await Se("clear-channel-history",{selfId:i,channelId:u})}async function r(i,u,d){u?d.delete(i):d.add(i),await Se("set-pinned-bots",{pinnedBots:Array.from(d)})}async function l(i,u,d,T){const _=`${i}:${u}`;d?T.delete(_):T.add(_),await Se("set-pinned-channels",{pinnedChannels:Array.from(T)})}return{isSending:e,sendMessage:t,deleteBotData:n,deleteChannelData:o,clearHistory:a,togglePinBot:r,togglePinChannel:l}}function Tc(){const e=L({}),t=new Map,n=50*1024*1024,o=30;let a=0,r=0,l=null;const i="ChatImageCache",u=2,d="images",T=500,_=12*1024*1024;async function N(){return new Promise(M=>{const g=indexedDB.deleteDatabase(i);g.onsuccess=()=>{console.log("[ImageCache] IndexedDB 已清空"),M(true)},g.onerror=()=>{console.error("[ImageCache] 清空 IndexedDB 失败"),M(false)}})}async function b(M=false){return M&&await N(),new Promise(g=>{const F=indexedDB.open(i,u);F.onupgradeneeded=A=>{const Y=A.target.result;if(!Y.objectStoreNames.contains(d)){const G=Y.createObjectStore(d,{keyPath:"url"});G.createIndex("channelKey","channelKey",{unique:false}),G.createIndex("timestamp","timestamp",{unique:false})}},F.onsuccess=()=>{l=F.result,g(true)},F.onerror=()=>g(false)})}function v(){if(r>o||a>n){const M=Object.entries(e.value),g=Math.ceil(M.length*.3);for(let F=0;F<g&&M.length>0;F++){const[A,Y]=M[F];URL.revokeObjectURL(Y),delete e.value[A],r--}a=Math.floor(a*.7),console.log(`[ImageCache] 清理内存,剩余 ${r} 个图片`)}}async function c(M,g){if(e.value[g])return e.value[g];if(t.has(g))return t.get(g);const F=(async()=>{try{l||await b();const A=await I(g);if(A){const Y=URL.createObjectURL(A.blob);return e.value[g]=Y,a+=A.size,r++,v(),Y}return null}finally{t.delete(g)}})();return t.set(g,F),F}async function I(M){return l?new Promise(g=>{const Y=l.transaction([d],"readonly").objectStore(d).get(M);Y.onsuccess=()=>g(Y.result||null),Y.onerror=()=>g(null)}):null}async function $(M,g){const F=await c(M,g);if(F)return F;try{const A=await Se("fetch-image",{url:g});if(!A.success)return null;if(A.viteUrl)return e.value[g]=A.viteUrl,A.viteUrl;if(A.dataUrl){const G=await(await fetch(A.dataUrl)).blob();if(G.size>_)return console.warn(`[ImageCache] 图片过大 (${G.size} bytes),不缓存`),A.dataUrl;const U={url:g,blob:G,timestamp:Date.now(),size:G.size,channelKey:M};await D(U);const X=URL.createObjectURL(G);return e.value[g]=X,a+=G.size,r++,v(),X}return null}catch(A){return console.error("[ImageCache] 缓存图片失败:",A),null}}async function D(M){if(l)try{await Q()>=T&&await ie(Math.floor(T*.2)),l.transaction([d],"readwrite").objectStore(d).put(M)}catch(g){console.error("[ImageCache] 保存到 IndexedDB 失败:",g)}}async function Q(){return l?new Promise(M=>{const A=l.transaction([d],"readonly").objectStore(d).count();A.onsuccess=()=>M(A.result),A.onerror=()=>M(0)}):0}async function ie(M){if(l)return new Promise(g=>{const G=l.transaction([d],"readwrite").objectStore(d).index("timestamp").openCursor();let U=0;G.onsuccess=X=>{const fe=X.target.result;fe&&U<M?(fe.delete(),U++,fe.continue()):(console.log(`[ImageCache] 清理了 ${U} 张旧图片`),g())},G.onerror=()=>g()})}async function P(M){Object.keys(e.value).forEach(g=>{URL.revokeObjectURL(e.value[g]),delete e.value[g]}),r=0,a=0}return Ge(async()=>{var M;try{const g=await Se("get-plugin-config");(g==null?void 0:g.success)&&((M=g==null?void 0:g.config)==null?void 0:M.clearIndexedDBOnStart)?(console.log("[ImageCache] 配置要求清空 IndexedDB,正在清理..."),await b(true)):await b(false)}catch(g){console.error("[ImageCache] 初始化失败:",g),await b(false)}}),pn(()=>{Object.values(e.value).forEach(URL.revokeObjectURL),l&&l.close()}),{getCachedImageUrl:c,cacheImage:$,clearChannelCache:P,clearIndexedDB:N}}function $c(){const e=L({}),t=L(new Set),n=L(null);async function o(i){if(e.value[i])return e.value[i];if(t.value.has(i))return new Promise(u=>{const d=setInterval(()=>{e.value[i]&&(clearInterval(d),u(e.value[i])),t.value.has(i)||(clearInterval(d),u(null))},100)});t.value.add(i);try{const u=await Se("fetch-video-temp",{url:i});if(u.success){if(u.viteUrl)return e.value[i]=u.viteUrl,u.viteUrl;if(u.dataUrl){n.value&&URL.revokeObjectURL(n.value);const T=await(await fetch(u.dataUrl)).blob(),_=URL.createObjectURL(T);return n.value=_,e.value[i]=_,_}return null}return null}catch(u){return console.error("加载视频失败:",u),null}finally{t.value.delete(i)}}function a(i){return t.value.has(i)}function r(i){return!!e.value[i]}function l(){Object.values(e.value).forEach(i=>{i.startsWith("blob:")&&URL.revokeObjectURL(i)}),e.value={},n.value=null}return pn(()=>{l()}),{loadVideo:o,isVideoLoading:a,isVideoLoaded:r,clearAllVideos:l}}function Bc(){const{bots:e,pinnedBots:t,pinnedChannels:n,getChannels:o,getMessages:a,loadInitialData:r,loadConfig:l,addMessage:i,loadHistory:u,getPagination:d}=Ic(),{isSending:T,sendMessage:_,deleteBotData:N,deleteChannelData:b,togglePinBot:v,togglePinChannel:c}=Mc(),{getCachedImageUrl:I,cacheImage:$}=Tc(),{loadVideo:D,isVideoLoading:Q,isVideoLoaded:ie}=$c(),P=L({show:false,x:0,y:0,type:"",id:"",isPinned:false,hasMedia:false}),M=L(""),g=L(""),F=L(""),A=L([]),Y=L(null),G=L(null),U=L(false),X=L("bots"),fe=L(false),Ee=L(0),ae=$t({messages:[]}),Ce=L(false),ke=$t({url:""}),ge=L(false),Ie=L(1),Xe=$t({content:""}),Oe=L(false),$e=L(null),_t=$t({data:null}),Ct=L(false),kt=k(()=>o(M.value)),nt=k(()=>a(M.value,g.value)),Ze=k(()=>{const y=kt.value.find(x=>x.id===g.value);return y?y.name:""}),Wt=k(()=>{const y=e.value.find(x=>x.selfId===M.value);return(y==null?void 0:y.platform)||"unknown"}),Pt=y=>{M.value=y,g.value="",U.value&&(X.value="channels")},De=async y=>{g.value=y,U.value&&(X.value="messages"),nt.value.length===0&&await u(M.value,y),await de(),Me(),setTimeout(Me,300),setTimeout(Me,800)},Re=()=>{U.value&&X.value!=="bots"?window.history.back():X.value==="image"?(X.value="messages",Ie.value=1):X.value==="forward"||X.value==="profile"||X.value==="raw"?X.value="messages":X.value==="messages"?X.value="channels":X.value==="channels"&&(X.value="bots")},ft=y=>{U.value&&(y.state&&y.state.view?X.value=y.state.view:X.value="bots")};_e(X,(y,x)=>{var O;U.value&&((O=window.history.state)==null?void 0:O.view)!==y&&window.history.pushState({view:y},"")});const Be=y=>{ae.messages=y.filter(x=>x.type==="message"),U.value?X.value="forward":Ce.value=true},St=y=>{ke.url=y,Ie.value=1,U.value?X.value="image":ge.value=true},Et=y=>{y.deltaY<0?Ie.value=Math.min(Ie.value+.1,3):Ie.value=Math.max(Ie.value-.1,.5)},It=y=>{const x=document.createElement("a");x.href=y,x.download=`chat-image-${Date.now()}.png`,x.click()},Me=()=>{if(Y.value){const y=Y.value.wrapRef;y&&(y.scrollTop=y.scrollHeight)}},Je=async({scrollTop:y})=>{var x;if(y<=10&&!fe.value&&M.value&&g.value&&d(M.value,g.value).hasMore){fe.value=true;const V=(x=Y.value)==null?void 0:x.wrapRef,h=(V==null?void 0:V.scrollHeight)||0;await u(M.value,g.value),await de(),V&&(V.scrollTop=V.scrollHeight-h),fe.value=false}},Ot=async()=>{if(!M.value||!g.value||!F.value.trim()&&!A.value.length)return;let y=F.value;$e.value&&(y=`<quote id="${$e.value.realId||$e.value.id}"/>${y}`);const x=await _(M.value,g.value,y,A.value);x!=null&&x.success?(F.value="",A.value=[],$e.value=null,Me()):je.error((x==null?void 0:x.error)||"发送失败")},Mt=async y=>{if(!M.value||!g.value)return;let x=y.content;if(y.quote){const V=y.quote.id;V&&!V.startsWith("bot-msg-")?x=`<quote id="${V}"/>${x}`:x=y.content}else if(y.isBot||y.userId===M.value){const V=y.realId||y.id;V&&V.startsWith("bot-msg-")?x=y.content:V?x=`<quote id="${V}"/>${x}`:x=y.content}const O=await _(M.value,g.value,x,[]);O!=null&&O.success?Me():je.error((O==null?void 0:O.error)||"复读失败")},Z=(y,x)=>{y.preventDefault(),y.stopPropagation(),P.value={show:true,x:y.clientX,y:y.clientY,type:"bot",id:x.selfId,isPinned:t.value.has(x.selfId),hasMedia:false}},w=(y,x)=>{y.preventDefault(),y.stopPropagation(),P.value={show:true,x:y.clientX,y:y.clientY,type:"channel",id:x.id,isPinned:n.value.has(`${M.value}:${x.id}`),hasMedia:false}},ve=(y,x)=>{var V;if(P.value.show&&P.value.type==="message"&&P.value.id===x.id){P.value.show=false;return}y.preventDefault(),y.stopPropagation();const O=(V=x.elements)==null?void 0:V.some(h=>["image","img","mface","audio","video"].includes(h.type));P.value={show:true,x:y.clientX,y:y.clientY,type:"message",id:x.id,isPinned:false,data:x,hasMedia:O}},f=async y=>{const x=P.value.type,O=P.value.id,V=P.value.isPinned;P.value.show=false,y==="pin"?x==="bot"?await v(O,V,t.value):await c(M.value,O,V,n.value):y==="delete"&&(x==="bot"?await N(O):await b(M.value,O),location.reload())},H=y=>{if(!y)return je.warning("未复制任何内容"),Promise.resolve();if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(y);{const x=document.createElement("textarea");return x.value=y,x.style.position="fixed",x.style.left="-999999px",x.style.top="-999999px",document.body.appendChild(x),x.focus(),x.select(),new Promise((O,V)=>{document.execCommand("copy")?O():V(),x.remove()})}},oe=async y=>{var O,V,h,W;const x=P.value.data;if(P.value.show=false,!!x){if(y==="copy"){const B=(x.content||"").replace(/<[^>]+>/g,"");B?H(B).then(()=>je.success("已复制到剪贴板")):je.warning("未复制任何内容")}else if(y==="copy-raw"){let B=x.content||"";x.quote&&(B=`<quote id="${x.quote.id}"/>${B}`),Xe.content=B,U.value?X.value="raw":Oe.value=true}else if(y==="plus1")await Mt(x);else if(y==="reply")$e.value=x,de(()=>{var le,J,ne,ye,Xn;const B=((J=(le=G.value)==null?void 0:le.$el)==null?void 0:J.querySelector("textarea"))||((ne=G.value)==null?void 0:ne.ref);B?B.focus():(Xn=(ye=G.value)==null?void 0:ye.focus)==null||Xn.call(ye)});else if(y==="download"){const B=(O=x.elements)==null?void 0:O.find(J=>["image","img","mface","audio","video"].includes(J.type)),le=((V=B==null?void 0:B.attrs)==null?void 0:V.src)||((h=B==null?void 0:B.attrs)==null?void 0:h.url)||((W=B==null?void 0:B.attrs)==null?void 0:W.file);le&&It(le)}}},ce=async y=>{if(!M.value)return;const x=await Se("get-user-info",{selfId:M.value,userId:y.userId,guildId:y.guildId});x.success?(_t.data=x.data,U.value?X.value="profile":Ct.value=true):je.error(x.error||"获取用户信息失败")},ot=async y=>{let x=document.querySelector(`[data-id="${y}"]`)||document.getElementById(y);if(!x){if(fe.value)return;je.info("正在向上查找历史消息...");for(let O=0;O<3&&(await u(M.value,g.value),await new Promise(V=>setTimeout(V,150)),x=document.querySelector(`[data-id="${y}"]`)||document.getElementById(y),!x);O++);}if(x){x.scrollIntoView({behavior:"smooth",block:"center"});const O=x.querySelector(".cursor-context-menu")||x;O.classList.add("message-highlight"),setTimeout(()=>O.classList.remove("message-highlight"),1500)}else je.warning("消息太久远,已不在当前列表中")},se=async y=>{var O;const x=(O=y.clipboardData)==null?void 0:O.items;if(x){for(let V=0;V<x.length;V++)if(x[V].type.indexOf("image")!==-1){const h=x[V].getAsFile();if(h){const W=new FileReader;W.onload=async B=>{var ne;const le=(ne=B.target)==null?void 0:ne.result,J=await Se("upload-image",{file:le,filename:`pasted_image_${Date.now()}.png`,mimeType:h.type});J.success&&A.value.push({tempId:J.tempId,preview:URL.createObjectURL(h),filename:`pasted_image_${Date.now()}.png`})},W.readAsDataURL(h)}}}},be=()=>{U.value=window.innerWidth<=768},Le=()=>{if(!U.value){Ee.value=0;return}if(window.visualViewport){const y=window.visualViewport.height,x=window.innerHeight,O=Math.max(0,x-y);Math.abs(O-Ee.value)>50&&(Ee.value=O)}else Ee.value=0};let re=[];return Ge(async()=>{be(),window.addEventListener("resize",be),window.addEventListener("click",()=>P.value.show=false),window.addEventListener("popstate",ft),window.visualViewport&&(window.visualViewport.addEventListener("resize",Le),window.visualViewport.addEventListener("scroll",Le)),window.addEventListener("resize",Le);const y=()=>{setTimeout(Le,300)},x=()=>{setTimeout(()=>{Ee.value=0},100)};de(()=>{var le,J;const B=(J=(le=G.value)==null?void 0:le.$el)==null?void 0:J.querySelector("textarea");B&&(B.addEventListener("focus",y),B.addEventListener("blur",x),re.push(()=>{B.removeEventListener("focus",y),B.removeEventListener("blur",x)}))}),U.value&&window.history.replaceState({view:X.value},""),await l(),await r();const O=Yt("chat-message-event",B=>{var le;if(i(B),B.selfId===M.value&&B.channelId===g.value){const J=(le=Y.value)==null?void 0:le.wrapRef;J&&J.scrollHeight-J.scrollTop-J.clientHeight<100&&de(Me)}});typeof O=="function"&&re.push(O);const V=Yt("bot-message-sent-event",B=>{i(B),B.selfId===M.value&&B.channelId===g.value&&de(Me)});typeof V=="function"&&re.push(V);const h=Yt("chat-bot-message-event",B=>{i(B),B.selfId===M.value&&B.channelId===g.value&&de(Me)});typeof h=="function"&&re.push(h);const W=Yt("bot-message-updated",B=>{const le=`${M.value}:${g.value}`;if(B.channelKey!==le)return;const J=nt.value.find(ne=>ne.id===B.tempId);J&&(J.sending=false,J.realId=B.realId)});typeof W=="function"&&re.push(W)}),pn(()=>{window.removeEventListener("resize",be),window.removeEventListener("popstate",ft),window.removeEventListener("resize",Le),window.visualViewport&&(window.visualViewport.removeEventListener("resize",Le),window.visualViewport.removeEventListener("scroll",Le)),re.forEach(y=>y==null?void 0:y())}),{bots:e,selectedBot:M,selectedChannel:g,currentChannels:kt,currentMessages:nt,currentChannelName:Ze,inputText:F,uploadedImages:A,isSending:T,pinnedBots:t,pinnedChannels:n,scrollRef:Y,isMobile:U,mobileView:X,forwardData:ae,imageViewer:ke,imageZoom:Ie,rawMessage:Xe,isLoadingHistory:fe,forwardDialogVisible:Ce,imageViewerVisible:ge,rawMessageVisible:Oe,replyingTo:$e,userProfile:_t,userProfileVisible:Ct,selectedBotPlatform:Wt,menu:P,keyboardHeight:Ee,selectBot:Pt,selectChannel:De,handleSend:Ot,togglePinBot:v,togglePinChannel:c,deleteBotData:N,deleteChannelData:b,getCachedImageUrl:I,cacheImage:$,loadVideo:D,isVideoLoading:Q,isVideoLoaded:ie,getMessages:a,goBack:Re,showForward:Be,openImageViewer:St,handleImageWheel:Et,downloadImage:It,handleScroll:Je,repeatMessage:Mt,handlePaste:se,copyToClipboard:H,onBotMenu:Z,onChannelMenu:w,onMessageMenu:ve,handleMenuAction:f,handleMessageAction:oe,showUserProfile:ce,inputRef:G,scrollToMessage:ot}}const Lc={key:0,class:"p-10 text-center opacity-40 text-sm"},Ac=["onClick","onContextmenu"],Pc={class:"ml-3 flex-1 overflow-hidden"},Oc={class:"flex items-center gap-1 text-sm font-bold truncate"},zc={class:"text-xs text-[var(--k-text-color-secondary)] truncate opacity-80"},Rc={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"},Nc={key:0,class:"p-10 text-center opacity-40 text-sm"},Vc=["onClick","onContextmenu"],Fc={class:"flex-1 overflow-hidden"},Hc={class:"flex items-center gap-1 text-sm font-medium truncate"},Dc={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm z-10 text-[var(--k-text-color)]"},Uc={class:"truncate"},jc={key:1,class:"ml-2 text-xs opacity-40 font-mono hidden md:inline"},Kc={class:"flex-1 overflow-hidden relative bg-opacity-50 bg-gray-100 dark:bg-black/20"},qc={key:0,class:"flex justify-center py-4"},Wc=["data-id"],Yc={class:"flex items-center gap-2 mb-1.5 text-xs text-[var(--k-text-color-secondary)]"},Gc={class:"font-bold"},Xc={class:"opacity-60"},Zc=["onClick"],Jc={key:0,class:"w-8 h-8 flex items-center justify-center"},Qc={key:1,class:"w-8 h-8 rounded-full border-2 border-blue-500 flex items-center justify-center font-bold text-xs bg-blue-50/10"},eu=["onContextmenu"],tu={key:0,class:"mb-2.5 p-2.5 text-sm bg-black/5 dark:bg-white/5 rounded-lg border-l-4 border-gray-400/50 text-left relative group/quote"},nu={class:"font-bold opacity-70 mb-1 text-xs"},ou={class:"opacity-90"},au=["onClick"],su={class:"text-left min-w-[20px]"},ru={key:0,class:"flex gap-3 mb-3 overflow-x-auto pb-2 scrollbar-hide"},lu={key:1,class:"mb-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-lg flex items-center justify-between text-xs"},iu={class:"flex items-center gap-2 truncate opacity-70"},cu={class:"flex gap-3 items-end"},uu={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},du={class:"p-4 space-y-6"},fu={class:"flex-1 overflow-hidden"},pu={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},vu={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},hu={class:"flex h-14 items-center px-4 font-bold border-b border-white/10 bg-black text-white shadow-sm flex-shrink-0"},mu=["src"],gu={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},bu={class:"p-4 flex flex-col gap-4 h-full overflow-hidden"},yu={class:"flex gap-3 pb-8"},wu={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},xu={class:"p-8 flex flex-col items-center gap-6"},_u={class:"text-center"},Cu={class:"text-2xl font-bold mb-2"},ku={class:"text-sm opacity-60 font-mono"},Su={class:"flex flex-col items-center gap-4 py-4"},Eu={class:"text-center"},Iu={class:"text-xl font-bold"},Mu={class:"text-xs opacity-50 mt-1 font-mono"},Tu={class:"p-6 space-y-6 bg-gray-50 dark:bg-black/10"},$u={class:"flex-1 overflow-hidden"},Bu={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},Lu={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},Au={class:"flex flex-col items-center gap-4"},Pu=["src"],Ou={class:"flex flex-col gap-4"},zu={class:"flex justify-center gap-3"},Ru=q({__name:"index",setup(e){const{bots:t,selectedBot:n,selectedChannel:o,currentChannels:a,currentMessages:r,currentChannelName:l,inputText:i,uploadedImages:u,isSending:d,pinnedBots:T,pinnedChannels:_,scrollRef:N,isMobile:b,mobileView:v,goBack:c,forwardData:I,imageViewer:$,imageZoom:D,rawMessage:Q,isLoadingHistory:ie,forwardDialogVisible:P,imageViewerVisible:M,rawMessageVisible:g,replyingTo:F,userProfile:A,userProfileVisible:Y,selectedBotPlatform:G,keyboardHeight:U,selectBot:X,selectChannel:fe,handleSend:Ee,getCachedImageUrl:ae,cacheImage:Ce,loadVideo:ke,isVideoLoaded:ge,showForward:Ie,openImageViewer:Xe,handleImageWheel:Oe,downloadImage:$e,handleScroll:_t,repeatMessage:Ct,handlePaste:kt,copyToClipboard:nt,onBotMenu:Ze,onChannelMenu:Wt,onMessageMenu:Pt,handleMenuAction:De,handleMessageAction:Re,showUserProfile:ft,menu:Be,inputRef:St,scrollToMessage:Et}=Bc(),It=Z=>new Date(Z).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),Me=async Z=>{if(Z==="delete")try{await Ec.confirm("确定删除所有数据吗?此操作不可恢复。","警告",{type:"warning",confirmButtonClass:"el-button--danger"}),await De(Z)}catch{}else await De(Z)},Je=q({props:["element","botId","channelId","inQuote"],setup(Z){const w=L(""),ve=L(""),f=L(false),H=["img","image","mface","audio","video"].includes(Z.element.type),oe=async()=>{const se=Z.element.attrs.src||Z.element.attrs.url||Z.element.attrs.file;if(se){if(Z.element.type==="video"){ve.value=se;return}const be=await ae(`${Z.botId}:${Z.channelId}`,se);if(be)w.value=be;else{const Le=await Ce(`${Z.botId}:${Z.channelId}`,se);w.value=Le||se}}};H&&oe(),_e(()=>Z.element.attrs.src||Z.element.attrs.url||Z.element.attrs.file,oe);const ce=async()=>{if(!ve.value||f.value)return;if(ge(ve.value)){const be=await ke(ve.value);be&&(w.value=be);return}f.value=true;const se=await ke(ve.value);se&&(w.value=se),f.value=false},ot=()=>{if(Z.inQuote)return;const se=document.querySelector(".el-main .el-scrollbar__wrap");se&&se.scrollHeight-se.scrollTop-se.clientHeight<150&&de(()=>{se.scrollTop=se.scrollHeight})};return()=>{var x;const{element:se,botId:be,channelId:Le}=Z,re=se.type,y=se.attrs;if(re==="text")return te("span",y.content);if(re==="img"||re==="image"||re==="mface"){if(Z.inQuote)return te("span",{class:"opacity-60 italic mx-1"},"[图片]");const O=re==="mface";return te("div",{class:"block my-1.5"},[te("img",{src:w.value,class:["rounded-lg shadow-sm border border-black/5 block cursor-pointer hover:opacity-90 transition-opacity",O?"max-w-[100px] max-h-[100px]":"max-w-full max-h-[400px]"],style:`min-width: ${O?"30px":"50px"}; min-height: ${O?"30px":"50px"}; object-fit: contain; background: rgba(0,0,0,0.05)`,onClick:V=>{V.stopPropagation(),Xe(w.value)},onLoad:ot,onError:V=>{V.target.src="",V.target.alt="图片加载失败"}})])}return re==="audio"?te("audio",{src:w.value,controls:true,class:"max-w-full my-1.5 block"}):re==="video"?w.value?te("video",{src:w.value,controls:true,class:"max-w-full my-1.5 rounded-lg shadow-sm block"}):te("div",{class:"my-1.5 p-4 bg-black/5 dark:bg-white/5 rounded-lg border border-black/10 dark:border-white/10 cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors flex items-center justify-center gap-2",onClick:ce},[f.value?te("el-icon",{class:"is-loading"},{default:()=>te(gt)}):te("el-icon",null,{default:()=>te(Qn)}),te("span",{class:"text-sm"},f.value?"加载中...":"点击加载视频")]):re==="at"?te("span",{class:"text-blue-500 font-bold hover:underline cursor-default mx-0.5"},`@${y.name||y.id}`):re==="p"?te("div",{class:"my-1 block min-h-[1em]"},(se.children||[]).map((O,V)=>te(Je,{key:V,element:O,botId:be,channelId:Le}))):re==="i18n"?te("span",{class:"opacity-80 italic"},`[${y.path||"i18n"}]`):re==="figure"||re==="forward"?te("div",{class:"my-2 p-3 bg-black/5 dark:bg-white/5 rounded-xl border border-black/10 dark:border-white/10 max-w-[300px] cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors",onClick:O=>{O.stopPropagation(),Ie(se.children||[])}},[te("div",{class:"flex items-center gap-2 mb-2 font-bold text-sm opacity-80"},[te("el-icon",null,{default:()=>te(Jn)}),te("span","合并转发记录")]),te("div",{class:"space-y-1.5"},(se.children||[]).filter(O=>O.type==="message").slice(0,4).map(O=>{var V,h,W,B;return te("div",{class:"text-xs truncate opacity-70"},[te("span",{class:"font-bold mr-1"},`${((V=O.attrs)==null?void 0:V.nickname)||"用户"}:`),te("span",((B=(W=(h=O.children)==null?void 0:h[0])==null?void 0:W.attrs)==null?void 0:B.content)||"[富媒体内容]")])})),((x=se.children)==null?void 0:x.length)>4?te("div",{class:"mt-2 pt-2 border-t border-black/5 dark:border-white/5 text-[10px] opacity-50"},`查看更多 ${se.children.length} 条内容...`):null]):re==="quote"?null:te("span",{class:"text-gray-400 italic text-xs"},`[${re}]`)}}}),Ot=async Z=>{const w=new FileReader;w.onload=async ve=>{var oe;const f=(oe=ve.target)==null?void 0:oe.result,H=await Se("upload-image",{file:f,filename:Z.name,mimeType:Z.raw.type});H.success&&u.value.push({tempId:H.tempId,preview:URL.createObjectURL(Z.raw),filename:Z.name})},w.readAsDataURL(Z.raw)},Mt=Z=>{u.value=u.value.filter(w=>w.tempId!==Z)};return(Z,w)=>{const ve=ue("el-avatar"),f=ue("el-icon"),H=ue("el-scrollbar"),oe=ue("el-aside"),ce=ue("el-button"),ot=ue("el-image"),se=ue("el-upload"),be=ue("el-input"),Le=ue("el-empty"),re=ue("el-main"),y=ue("el-descriptions-item"),x=ue("el-descriptions"),O=ue("el-container"),V=ue("el-dialog");return p(),E("div",{class:"chat-patch-wrapper absolute inset-0 flex overflow-hidden bg-[var(--k-page-bg)] text-[var(--k-text-color)] font-sans",style:Ke(s(b)?"height: 100dvh; width: 100vw; position: fixed; top: 0; left: 0;":"height: 100%; width: 100%;")},[C(O,{class:"h-full w-full overflow-hidden"},{default:S(()=>[it(C(oe,{width:s(b)?"100%":"280px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-95 dark:brightness-90 h-full overflow-hidden"},{default:S(()=>[w[21]||(w[21]=m("div",{class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"}," 机器人",-1)),C(H,{class:"flex-1 overflow-auto"},{default:S(()=>[s(t).length===0?(p(),E("div",Lc,"暂无机器人数据")):z("",true),(p(true),E(pe,null,Ue(s(t),h=>(p(),E("div",{key:h.selfId,class:R(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":s(n)===h.selfId}]),onClick:W=>s(X)(h.selfId),onContextmenu:Pe(W=>s(Ze)(W,h),["prevent"])},[C(ve,{size:44,src:h.avatar,class:"flex-shrink-0 shadow-sm"},{default:S(()=>[ee(K(h.username[0]),1)]),_:2},1032,["src"]),m("div",Pc,[m("div",Oc,[ee(K(h.username)+" ",1),s(T).has(h.selfId)?(p(),j(f,{key:0,class:"text-orange-400"},{default:S(()=>[C(s(eo))]),_:1})):z("",true)]),m("div",zc,K(h.platform),1)]),m("div",{class:R(["w-2.5 h-2.5 rounded-full ml-2 shadow-inner",h.status==="online"?"bg-green-500":"bg-gray-400"])},null,2)],42,Ac))),128))]),_:1})]),_:1},8,["width"]),[[ct,!s(b)||s(v)==="bots"]]),it(C(oe,{width:s(b)?"100%":"260px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-100 dark:brightness-95 h-full overflow-hidden"},{default:S(()=>[m("div",Rc,[s(b)?(p(),j(ce,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(c)},null,8,["onClick"])):z("",true),w[22]||(w[22]=ee(" 频道 ",-1))]),C(H,{class:"flex-1 overflow-auto"},{default:S(()=>[s(a).length===0?(p(),E("div",Nc,"暂无频道数据")):z("",true),(p(true),E(pe,null,Ue(s(a),h=>(p(),E("div",{key:h.id,class:R(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":s(o)===h.id}]),onClick:W=>s(fe)(h.id),onContextmenu:Pe(W=>s(Wt)(W,h),["prevent"])},[m("div",Fc,[m("div",Hc,[ee(K(h.name)+" ",1),s(_).has(`${s(n)}:${h.id}`)?(p(),j(f,{key:0,class:"text-orange-400"},{default:S(()=>[C(s(eo))]),_:1})):z("",true)])])],42,Vc))),128))]),_:1})]),_:1},8,["width"]),[[ct,!s(b)&&s(n)||s(b)&&s(v)==="channels"]]),it(C(re,{class:"flex flex-col p-0 bg-[var(--k-page-bg)] relative brightness-105 dark:brightness-100 h-full overflow-hidden"},{default:S(()=>[s(n)&&s(o)?(p(),E(pe,{key:0},[m("div",Dc,[s(b)?(p(),j(ce,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(c)},null,8,["onClick"])):z("",true),m("span",Uc,K(s(l)),1),s(o)?(p(),E("span",jc,"("+K(s(o))+")",1)):z("",true)]),m("div",Kc,[C(H,{ref_key:"scrollRef",ref:N,onScroll:s(_t),class:"h-full"},{default:S(()=>[m("div",{class:"p-6 flex flex-col",style:Ke(s(b)?{paddingBottom:"calc(180px + env(safe-area-inset-bottom))"}:{minHeight:"100%"})},[s(ie)?(p(),E("div",qc,[C(f,{class:"is-loading text-[var(--k-color-primary)]"},{default:S(()=>[C(s(gt))]),_:1})])):z("",true),(p(true),E(pe,null,Ue(s(r),h=>(p(),E("div",{key:h.id,"data-id":h.id,class:R(["flex mb-6 gap-3 group",h.isBot||h.userId===s(n)?"flex-row-reverse":"flex-row"])},[C(ve,{size:40,src:h.avatar,class:"flex-shrink-0 shadow-sm cursor-pointer hover:brightness-90",onClick:W=>s(ft)(h)},{default:S(()=>[ee(K(h.username[0]),1)]),_:2},1032,["src","onClick"]),m("div",{class:R(["max-w-[85%] md:max-w-[75%] flex flex-col",h.isBot||h.userId===s(n)?"items-end":"items-start"])},[m("div",Yc,[m("span",Gc,K(h.username),1),m("span",Xc,K(It(h.timestamp)),1)]),m("div",{class:R(["flex items-end gap-2 group/msg",h.isBot||h.userId===s(n)?"flex-row":"flex-row-reverse"])},[m("div",{class:R(["transition-opacity cursor-pointer text-blue-500 hover:scale-110 active:scale-95 mb-1",s(b)?"opacity-100":"opacity-0 group-hover/msg:opacity-100"]),title:"复读这条消息",onClick:Pe(W=>s(Ct)(h),["stop"])},[h.sending?(p(),E("div",Jc,[C(f,{class:"is-loading"},{default:S(()=>[C(s(gt))]),_:1})])):(p(),E("div",Qc," +1"))],10,Zc),m("div",{class:R(["p-3.5 rounded-2xl shadow-sm text-[15px] leading-relaxed break-all relative cursor-context-menu",h.isBot||h.userId===s(n)?"bg-[#95ec69] text-black rounded-tr-none":"bg-[var(--k-card-bg)] text-[var(--k-text-color)] rounded-tl-none border border-[var(--k-border-color)]"]),onContextmenu:Pe(W=>s(Pt)(W,h),["stop"])},[h.quote?(p(),E("div",tu,[m("div",nu,K(h.quote.user.username)+":",1),m("div",ou,[h.quote.elements&&h.quote.elements.length?(p(true),E(pe,{key:0},Ue(h.quote.elements,(W,B)=>(p(),j(s(Je),{key:B,element:W,"bot-id":s(n),"channel-id":s(o),"in-quote":true},null,8,["element","bot-id","channel-id"]))),128)):(p(),E(pe,{key:1},[ee(K(h.quote.content),1)],64))]),m("div",{class:"absolute top-1 right-1 cursor-pointer text-[var(--k-color-primary)] hover:scale-110 transition-transform",title:"定位到原消息",onClick:Pe(W=>s(Et)(h.quote.id),["stop"])},[C(f,null,{default:S(()=>[C(s(es))]),_:1})],8,au)])):z("",true),m("div",su,[h.elements&&h.elements.length?(p(true),E(pe,{key:0},Ue(h.elements,(W,B)=>(p(),j(s(Je),{key:B,element:W,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128)):h.content?(p(),E(pe,{key:1},[ee(K(h.content),1)],64)):z("",true)])],42,eu)],2)],2)],10,Wc))),128))],4)]),_:1},8,["onScroll"])]),m("div",{class:R(["p-4 border-t border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-[0_-2px_10px_rgba(0,0,0,0.05)]",s(b)?"fixed left-0 right-0 z-50 transition-all duration-200":""]),style:Ke(s(b)?{bottom:s(U)>0?`${s(U)}px`:"0",paddingBottom:"max(env(safe-area-inset-bottom), 16px)"}:{})},[s(u).length?(p(),E("div",ru,[(p(true),E(pe,null,Ue(s(u),h=>(p(),E("div",{key:h.tempId,class:"relative w-20 h-20 flex-shrink-0 group"},[C(ot,{src:h.preview,fit:"cover",class:"w-full h-full rounded-lg border-2 border-[var(--k-border-color)] shadow-sm cursor-pointer hover:brightness-90",onClick:W=>s(Xe)(h.preview)},null,8,["src","onClick"]),C(f,{class:"absolute -top-1.5 -right-1.5 cursor-pointer text-red-500 bg-white rounded-full shadow-md opacity-0 group-hover:opacity-100 transition-opacity z-10",onClick:Pe(W=>Mt(h.tempId),["stop"])},{default:S(()=>[C(s(zn))]),_:1},8,["onClick"])]))),128))])):z("",true),s(F)?(p(),E("div",lu,[m("div",iu,[C(f,null,{default:S(()=>[C(s(Zn))]),_:1}),m("span",null,"回复 "+K(s(F).username)+": "+K(s(F).content.slice(0,20))+K(s(F).content.length>20?"...":""),1)]),C(f,{class:"cursor-pointer hover:text-red-500",onClick:w[0]||(w[0]=h=>F.value=null)},{default:S(()=>[C(s(Po))]),_:1})])):z("",true),m("div",cu,[C(se,{action:"#","auto-upload":false,"show-file-list":false,"on-change":Ot,multiple:""},{default:S(()=>[C(ce,{circle:"",class:"!w-10 !h-10 !text-xl shadow-sm hover:scale-105 transition-transform"},{default:S(()=>[C(f,null,{default:S(()=>[C(s(Qn))]),_:1})]),_:1})]),_:1}),C(be,{ref_key:"inputRef",ref:St,modelValue:s(i),"onUpdate:modelValue":w[1]||(w[1]=h=>vt(i)?i.value=h:null),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"输入消息...",class:"flex-1 !text-base",onKeydown:Rt(Pe(s(Ee),["prevent"]),["enter"]),onPaste:s(kt)},null,8,["modelValue","onKeydown","onPaste"]),C(ce,{type:"primary",loading:s(d),onClick:s(Ee),class:"px-6 h-10 !text-base font-bold shadow-md"},{default:S(()=>[...w[23]||(w[23]=[ee("发送",-1)])]),_:1},8,["loading","onClick"])])],6)],64)):(p(),j(Le,{key:1,description:"请选择频道开始对话",class:"h-full flex items-center justify-center opacity-60"}))]),_:1},512),[[ct,!s(b)&&s(n)&&s(o)||s(b)&&s(v)==="messages"]]),s(b)&&s(v)==="forward"?(p(),j(re,{key:0,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-50 overflow-hidden",style:{height:"100dvh"}},{default:S(()=>[m("div",uu,[C(ce,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(c)},null,8,["onClick"]),w[24]||(w[24]=m("span",null,"聊天记录",-1))]),C(H,{class:"flex-1 bg-gray-50 dark:bg-black/10"},{default:S(()=>[m("div",du,[(p(true),E(pe,null,Ue(s(I).messages,(h,W)=>{var B,le;return p(),E("div",{key:W,class:"flex gap-3"},[C(ve,{size:36,src:(B=h.attrs)==null?void 0:B.avatar,class:"flex-shrink-0 shadow-sm"},{default:S(()=>{var J,ne;return[ee(K((ne=(J=h.attrs)==null?void 0:J.nickname)==null?void 0:ne[0]),1)]}),_:2},1032,["src"]),m("div",fu,[m("div",pu,K((le=h.attrs)==null?void 0:le.nickname),1),m("div",vu,[(p(true),E(pe,null,Ue(h.children,(J,ne)=>(p(),j(s(Je),{key:ne,element:J,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1})):z("",true),s(b)&&s(v)==="image"?(p(),j(re,{key:1,class:"flex flex-col p-0 bg-black absolute inset-0 z-[60] overflow-hidden",style:{height:"100dvh"}},{default:S(()=>[m("div",hu,[C(ce,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3 !bg-white/10 !border-none !text-white",onClick:s(c)},null,8,["onClick"]),w[26]||(w[26]=m("span",{class:"truncate mr-2"},"查看图片",-1)),w[27]||(w[27]=m("div",{class:"flex-1"},null,-1)),C(ce,{type:"primary",icon:"Download",size:"small",onClick:w[2]||(w[2]=h=>s($e)(s($).url))},{default:S(()=>[...w[25]||(w[25]=[ee("下载",-1)])]),_:1})]),m("div",{class:"flex-1 overflow-hidden relative flex items-center justify-center",onWheel:w[3]||(w[3]=(...h)=>s(Oe)&&s(Oe)(...h))},[m("img",{src:s($).url,class:"max-w-full max-h-full object-contain transition-transform duration-200 ease-out will-change-transform",style:Ke({transform:`scale(${s(D)})`})},null,12,mu)],32)]),_:1})):z("",true),s(b)&&s(v)==="raw"?(p(),j(re,{key:2,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[80] overflow-hidden",style:{height:"100dvh"}},{default:S(()=>[m("div",gu,[C(ce,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(c)},null,8,["onClick"]),w[28]||(w[28]=m("div",{class:"flex-1 text-center pr-8"},"原始消息",-1))]),m("div",bu,[C(be,{modelValue:s(Q).content,"onUpdate:modelValue":w[4]||(w[4]=h=>s(Q).content=h),type:"textarea",rows:15,readonly:"",class:"flex-1 raw-content-area"},null,8,["modelValue"]),m("div",yu,[C(ce,{type:"primary",class:"flex-1",onClick:w[5]||(w[5]=h=>s(nt)(s(Q).content).then(()=>s(je).success("已复制")))},{default:S(()=>[...w[29]||(w[29]=[ee("复制内容",-1)])]),_:1}),C(ce,{class:"flex-1",onClick:s(c)},{default:S(()=>[...w[30]||(w[30]=[ee("返回",-1)])]),_:1},8,["onClick"])])])]),_:1})):z("",true),s(b)&&s(v)==="profile"?(p(),j(re,{key:3,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[70] overflow-hidden",style:{height:"100dvh"}},{default:S(()=>{var h,W,B,le,J;return[m("div",wu,[C(ce,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:s(c)},null,8,["onClick"]),w[31]||(w[31]=m("div",{class:"flex-1 text-center pr-8"},"用户资料",-1))]),m("div",xu,[C(ve,{size:120,src:(h=s(A).data)==null?void 0:h.avatar,class:"shadow-lg"},{default:S(()=>{var ne,ye;return[ee(K((ye=(ne=s(A).data)==null?void 0:ne.username)==null?void 0:ye[0]),1)]}),_:1},8,["src"]),m("div",_u,[m("div",Cu,K(((W=s(A).data)==null?void 0:W.username)||((B=s(A).data)==null?void 0:B.name)||"未知用户"),1),m("div",ku,"ID: "+K(((le=s(A).data)==null?void 0:le.userId)||((J=s(A).data)==null?void 0:J.id)),1)]),C(x,{column:1,border:"",class:"w-full mt-4"},{default:S(()=>[C(y,{label:"昵称"},{default:S(()=>{var ne,ye;return[ee(K(((ne=s(A).data)==null?void 0:ne.username)||((ye=s(A).data)==null?void 0:ye.name)),1)]}),_:1}),C(y,{label:"平台"},{default:S(()=>[ee(K(s(G)),1)]),_:1})]),_:1})])]}),_:1})):z("",true)]),_:1}),s(b)?z("",true):(p(),j(V,{key:0,modelValue:s(Y),"onUpdate:modelValue":w[6]||(w[6]=h=>vt(Y)?Y.value=h:null),title:"用户资料",width:"400px",center:"",teleported:"","align-center":""},{default:S(()=>{var h,W,B,le,J;return[m("div",Su,[C(ve,{size:80,src:(h=s(A).data)==null?void 0:h.avatar,class:"shadow"},{default:S(()=>{var ne,ye;return[ee(K((ye=(ne=s(A).data)==null?void 0:ne.username)==null?void 0:ye[0]),1)]}),_:1},8,["src"]),m("div",Eu,[m("div",Iu,K(((W=s(A).data)==null?void 0:W.username)||((B=s(A).data)==null?void 0:B.name)||"未知用户"),1),m("div",Mu,"ID: "+K(((le=s(A).data)==null?void 0:le.userId)||((J=s(A).data)==null?void 0:J.id)),1)]),C(x,{column:1,border:"",class:"w-full mt-4"},{default:S(()=>[C(y,{label:"昵称"},{default:S(()=>{var ne,ye;return[ee(K(((ne=s(A).data)==null?void 0:ne.username)||((ye=s(A).data)==null?void 0:ye.name)),1)]}),_:1}),C(y,{label:"平台"},{default:S(()=>[ee(K(s(G)),1)]),_:1})]),_:1})])]}),_:1},8,["modelValue"])),s(b)?z("",true):(p(),j(V,{key:1,modelValue:s(P),"onUpdate:modelValue":w[7]||(w[7]=h=>vt(P)?P.value=h:null),title:"聊天记录",width:"550px",class:"forward-dialog",teleported:""},{default:S(()=>[C(H,{"max-height":"70vh"},{default:S(()=>[m("div",Tu,[(p(true),E(pe,null,Ue(s(I).messages,(h,W)=>{var B,le;return p(),E("div",{key:W,class:"flex gap-3"},[C(ve,{size:36,src:(B=h.attrs)==null?void 0:B.avatar,class:"flex-shrink-0 shadow-sm"},{default:S(()=>{var J,ne;return[ee(K((ne=(J=h.attrs)==null?void 0:J.nickname)==null?void 0:ne[0]),1)]}),_:2},1032,["src"]),m("div",$u,[m("div",Bu,K((le=h.attrs)==null?void 0:le.nickname),1),m("div",Lu,[(p(true),E(pe,null,Ue(h.children,(J,ne)=>(p(),j(s(Je),{key:ne,element:J,"bot-id":s(n),"channel-id":s(o)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1},8,["modelValue"])),s(b)?z("",true):(p(),j(V,{key:2,modelValue:s(M),"onUpdate:modelValue":w[9]||(w[9]=h=>vt(M)?M.value=h:null),title:"查看图片",width:"fit-content",class:"image-viewer-dialog",teleported:"",center:""},{default:S(()=>[m("div",Au,[m("img",{src:s($).url,class:"max-w-full max-h-[70vh] rounded shadow-lg"},null,8,Pu),C(ce,{type:"primary",icon:"Download",onClick:w[8]||(w[8]=h=>s($e)(s($).url))},{default:S(()=>[...w[32]||(w[32]=[ee("下载图片",-1)])]),_:1})])]),_:1},8,["modelValue"])),s(b)?z("",true):(p(),j(V,{key:3,modelValue:s(g),"onUpdate:modelValue":w[13]||(w[13]=h=>vt(g)?g.value=h:null),title:"原始消息内容",width:"600px",center:"",teleported:"","align-center":""},{default:S(()=>[m("div",Ou,[C(be,{modelValue:s(Q).content,"onUpdate:modelValue":w[10]||(w[10]=h=>s(Q).content=h),type:"textarea",rows:12,readonly:"",class:"raw-content-area"},null,8,["modelValue"]),m("div",zu,[C(ce,{type:"primary",onClick:w[11]||(w[11]=h=>s(nt)(s(Q).content).then(()=>s(je).success("已复制到剪贴板")))},{default:S(()=>[...w[33]||(w[33]=[ee("复制全部内容",-1)])]),_:1}),C(ce,{onClick:w[12]||(w[12]=h=>g.value=false)},{default:S(()=>[...w[34]||(w[34]=[ee("关闭",-1)])]),_:1})])])]),_:1},8,["modelValue"])),s(Be).show?(p(),E("div",{key:4,class:"fixed bg-[var(--k-card-bg)] border border-[var(--k-border-color)] shadow-xl z-[2000] py-1.5 rounded-lg min-w-[140px] backdrop-blur-sm bg-opacity-90",style:Ke({left:s(Be).x+"px",top:s(Be).y+"px"})},[s(Be).type==="bot"||s(Be).type==="channel"?(p(),E(pe,{key:0},[m("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:w[14]||(w[14]=h=>Me("pin"))},[C(f,null,{default:S(()=>[C(s(Za))]),_:1}),ee(" "+K(s(Be).isPinned?"取消置顶":"置顶"),1)]),m("div",{class:"px-4 py-2.5 cursor-pointer text-sm text-red-500 hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:w[15]||(w[15]=h=>Me("delete"))},[C(f,null,{default:S(()=>[C(s(Va))]),_:1}),w[35]||(w[35]=ee(" 删除数据 ",-1))])],64)):s(Be).type==="message"?(p(),E(pe,{key:1},[m("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:w[16]||(w[16]=h=>s(Re)("copy"))},[C(f,null,{default:S(()=>[C(s(Ha))]),_:1}),w[36]||(w[36]=ee(" 复制文本 ",-1))]),m("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:w[17]||(w[17]=h=>s(Re)("copy-raw"))},[C(f,null,{default:S(()=>[C(s(Jn))]),_:1}),w[37]||(w[37]=ee(" 查看原始消息 ",-1))]),m("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:w[18]||(w[18]=h=>s(Re)("plus1"))},[C(f,null,{default:S(()=>[C(s(Oa))]),_:1}),w[38]||(w[38]=ee(" +1 复读 ",-1))]),m("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:w[19]||(w[19]=h=>s(Re)("reply"))},[C(f,null,{default:S(()=>[C(s(Zn))]),_:1}),w[39]||(w[39]=ee(" 回复 ",-1))]),s(Be).hasMedia?(p(),E("div",{key:0,class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:w[20]||(w[20]=h=>s(Re)("download"))},[C(f,null,{default:S(()=>[C(s(Ua))]),_:1}),w[40]||(w[40]=ee(" 下载媒体 ",-1))])):z("",true)],64)):z("",true)],4)):z("",true)],4)}}}),Nu=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},Vu={},Fu={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"};function Hu(e,t){return p(),E("svg",Fu,[...t[0]||(t[0]=[m("path",{d:"M8 10.5H16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),m("path",{d:"M8 14H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),m("path",{d:"M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])}const Du=Nu(Vu,[["render",Hu]]);Ia.register("activity:chat",Du);const qu=e=>{e.page({name:"聊天室",path:"/chat-patch",desc:"",authority:4,icon:"activity:chat",component:q({setup(){return()=>te(ue("k-layout"),{},{default:()=>te(Ru)})}})})};export{qu as default};
|
|
1
|
+
import{defineComponent as ue,openBlock as h,createElementBlock as L,createElementVNode as b,warn as Er,computed as M,getCurrentInstance as ut,watch as Oe,unref as r,ref as j,onMounted as pt,watchEffect as Mr,onBeforeUnmount as Zt,inject as Ke,isRef as It,onScopeDispose as $r,shallowRef as _n,nextTick as we,mergeProps as kn,renderSlot as Ae,toRef as Sn,onUnmounted as An,provide as da,markRaw as En,useAttrs as Tr,useSlots as Co,normalizeStyle as Je,normalizeClass as G,createCommentVNode as $,Fragment as Me,createBlock as J,withCtx as P,resolveDynamicComponent as Ue,withModifiers as Ve,toDisplayString as ae,createVNode as A,Transition as fa,createTextVNode as ce,Text as Ir,reactive as Ut,h as ve,shallowReactive as ko,withDirectives as Ot,vShow as Pt,isVNode as Ln,render as Mn,toRefs as Ar,resolveComponent as $e,withKeys as en,renderList as st}from"vue";import{isClient as Ge,computedEager as Lr,useEventListener as xn,useResizeObserver as So,useTimeoutFn as Or}from"@vueuse/core";import{send as qe,receive as pn,icons as Pr}from"@koishijs/client";/*! Element Plus Icons Vue v2.3.2 */var Br=ue({name:"ChatLineRound",__name:"chat-line-round",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),b("path",{fill:"currentColor",d:"M352 576h320q32 0 32 32t-32 32H352q-32 0-32-32t32-32m32-192h256q32 0 32 32t-32 32H384q-32 0-32-32t32-32"})]))}}),Ma=Br;var zr=ue({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),b("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Dr=zr,Vr=ue({name:"CircleCloseFilled",__name:"circle-close-filled",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),pa=Vr,Nr=ue({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),b("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),va=Nr,Rr=ue({name:"CirclePlus",__name:"circle-plus",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64"}),b("path",{fill:"currentColor",d:"M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0"}),b("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Hr=Rr;var Fr=ue({name:"Close",__name:"close",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Eo=Fr,jr=ue({name:"Collection",__name:"collection",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M192 736h640V128H256a64 64 0 0 0-64 64zm64-672h608a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160l-32 57.536V192A128 128 0 0 1 256 64"}),b("path",{fill:"currentColor",d:"M240 800a48 48 0 1 0 0 96h592v-96zm0-64h656v160a64 64 0 0 1-64 64H240a112 112 0 0 1 0-224m144-608v250.88l96-76.8 96 76.8V128zm-64-64h320v381.44a32 32 0 0 1-51.968 24.96L480 384l-108.032 86.4A32 32 0 0 1 320 445.44z"})]))}}),$a=jr;var Ur=ue({name:"Delete",__name:"delete",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),qr=Ur,Kr=ue({name:"DocumentCopy",__name:"document-copy",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M128 320v576h576V320zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32M960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32M256 672h320v64H256zm0-192h320v64H256z"})]))}}),Gr=Kr;var Wr=ue({name:"Download",__name:"download",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),Yr=Wr;var Zr=ue({name:"Hide",__name:"hide",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),b("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),Xr=Zr,Jr=ue({name:"InfoFilled",__name:"info-filled",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Qn=Jr,Qr=ue({name:"Loading",__name:"loading",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),Bt=Qr;var es=ue({name:"Picture",__name:"picture",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),b("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),Ta=es;var ts=ue({name:"StarFilled",__name:"star-filled",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M313.6 924.48a70.4 70.4 0 0 1-74.152-5.365 70.4 70.4 0 0 1-27.992-68.875l37.888-220.928L88.96 472.96a70.4 70.4 0 0 1 3.788-104.225A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 100.246-28.595 70.4 70.4 0 0 1 25.962 28.595l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),Ia=ts,ns=ue({name:"Star",__name:"star",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),as=ns,os=ue({name:"SuccessFilled",__name:"success-filled",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Mo=os,rs=ue({name:"Top",__name:"top",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),ss=rs,ls=ue({name:"View",__name:"view",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),is=ls,cs=ue({name:"WarningFilled",__name:"warning-filled",setup(e){return(t,n)=>(h(),L("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[b("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),$o=cs;const Kt={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},Cn="update:modelValue",Aa="change",Fn="input",To=["","default","small","large"];/**
|
|
2
|
+
* @vue/shared v3.6.0-rc.2
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/const ct=()=>{},us=Object.prototype.hasOwnProperty,Gt=(e,t)=>us.call(e,t),Io=Array.isArray;const mt=e=>typeof e=="function",Qe=e=>typeof e=="string",Wt=e=>e!==null&&typeof e=="object";const Ao=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ds=/-(\w)/g,fs=(e,t)=>t?t.toUpperCase():"",ps=Ao(e=>e.replace(ds,fs)),c0=Ao(e=>e.charAt(0).toUpperCase()+e.slice(1));var Lo=typeof global=="object"&&global&&global.Object===Object&&global,vs=typeof self=="object"&&self&&self.Object===Object&&self,bt=Lo||vs||Function("return this")(),dt=bt.Symbol,Oo=Object.prototype,hs=Oo.hasOwnProperty,ms=Oo.toString,Qt=dt?dt.toStringTag:void 0;function gs(e){var t=hs.call(e,Qt),n=e[Qt];try{e[Qt]=void 0;var a=true}catch{}var o=ms.call(e);return a&&(t?e[Qt]=n:delete e[Qt]),o}var bs=Object.prototype,ys=bs.toString;function ws(e){return ys.call(e)}var _s="[object Null]",xs="[object Undefined]",La=dt?dt.toStringTag:void 0;function Vt(e){return e==null?e===void 0?xs:_s:La&&La in Object(e)?gs(e):ws(e)}function ln(e){return e!=null&&typeof e=="object"}var Cs="[object Symbol]";function On(e){return typeof e=="symbol"||ln(e)&&Vt(e)==Cs}function ks(e,t){for(var n=-1,a=e==null?0:e.length,o=Array(a);++n<a;)o[n]=t(e[n],n,e);return o}var cn=Array.isArray,Oa=dt?dt.prototype:void 0,Pa=Oa?Oa.toString:void 0;function Po(e){if(typeof e=="string")return e;if(cn(e))return ks(e,Po)+"";if(On(e))return Pa?Pa.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Ss=/\s/;function Es(e){for(var t=e.length;t--&&Ss.test(e.charAt(t)););return t}var Ms=/^\s+/;function $s(e){return e&&e.slice(0,Es(e)+1).replace(Ms,"")}function Yt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ba=NaN,Ts=/^[-+]0x[0-9a-f]+$/i,Is=/^0b[01]+$/i,As=/^0o[0-7]+$/i,Ls=parseInt;function jn(e){if(typeof e=="number")return e;if(On(e))return Ba;if(Yt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Yt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=$s(e);var n=Is.test(e);return n||As.test(e)?Ls(e.slice(2),n?2:8):Ts.test(e)?Ba:+e}function Os(e){return e}var Ps="[object AsyncFunction]",Bs="[object Function]",zs="[object GeneratorFunction]",Ds="[object Proxy]";function Vs(e){if(!Yt(e))return false;var t=Vt(e);return t==Bs||t==zs||t==Ps||t==Ds}var Un=bt["__core-js_shared__"],za=function(){var e=/[^.]+$/.exec(Un&&Un.keys&&Un.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ns(e){return!!za&&za in e}var Rs=Function.prototype,Hs=Rs.toString;function Nt(e){if(e!=null){try{return Hs.call(e)}catch{}try{return e+""}catch{}}return""}var Fs=/[\\^$.*+?()[\]{}|]/g,js=/^\[object .+?Constructor\]$/,Us=Function.prototype,qs=Object.prototype,Ks=Us.toString,Gs=qs.hasOwnProperty,Ws=RegExp("^"+Ks.call(Gs).replace(Fs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ys(e){if(!Yt(e)||Ns(e))return false;var t=Vs(e)?Ws:js;return t.test(Nt(e))}function Zs(e,t){return e==null?void 0:e[t]}function Rt(e,t){var n=Zs(e,t);return Ys(n)?n:void 0}var ea=Rt(bt,"WeakMap");function Xs(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Js=800,Qs=16,el=Date.now;function tl(e){var t=0,n=0;return function(){var a=el(),o=Qs-(a-n);if(n=a,o>0){if(++t>=Js)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function nl(e){return function(){return e}}var $n=function(){try{var e=Rt(Object,"defineProperty");return e({},"",{}),e}catch{}}(),al=$n?function(e,t){return $n(e,"toString",{configurable:true,enumerable:false,value:nl(t),writable:true})}:Os,ol=tl(al),rl=9007199254740991,sl=/^(?:0|[1-9]\d*)$/;function Bo(e,t){var n=typeof e;return t=t??rl,!!t&&(n=="number"||n!="symbol"&&sl.test(e))&&e>-1&&e%1==0&&e<t}function zo(e,t,n){t=="__proto__"&&$n?$n(e,t,{configurable:true,enumerable:true,value:n,writable:true}):e[t]=n}function Do(e,t){return e===t||e!==e&&t!==t}var ll=Object.prototype,il=ll.hasOwnProperty;function cl(e,t,n){var a=e[t];(!(il.call(e,t)&&Do(a,n))||n===void 0&&!(t in e))&&zo(e,t,n)}var Da=Math.max;function ul(e,t,n){return t=Da(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=Da(a.length-t,0),l=Array(s);++o<s;)l[o]=a[t+o];o=-1;for(var i=Array(t+1);++o<t;)i[o]=a[o];return i[t]=n(l),Xs(e,this,i)}}var dl=9007199254740991;function Vo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=dl}var u0=Object.prototype;var fl="[object Arguments]";function Va(e){return ln(e)&&Vt(e)==fl}var No=Object.prototype,pl=No.hasOwnProperty,vl=No.propertyIsEnumerable,Ro=Va(function(){return arguments}())?Va:function(e){return ln(e)&&pl.call(e,"callee")&&!vl.call(e,"callee")};var Ho=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Na=Ho&&typeof module=="object"&&module&&!module.nodeType&&module,hl=Na&&Na.exports===Ho,Ra=hl?bt.Buffer:void 0,d0=Ra?Ra.isBuffer:void 0;var ml="[object Arguments]",gl="[object Array]",bl="[object Boolean]",yl="[object Date]",wl="[object Error]",_l="[object Function]",xl="[object Map]",Cl="[object Number]",kl="[object Object]",Sl="[object RegExp]",El="[object Set]",Ml="[object String]",$l="[object WeakMap]",Tl="[object ArrayBuffer]",Il="[object DataView]",Al="[object Float32Array]",Ll="[object Float64Array]",Ol="[object Int8Array]",Pl="[object Int16Array]",Bl="[object Int32Array]",zl="[object Uint8Array]",Dl="[object Uint8ClampedArray]",Vl="[object Uint16Array]",Nl="[object Uint32Array]",ye={};ye[Al]=ye[Ll]=ye[Ol]=ye[Pl]=ye[Bl]=ye[zl]=ye[Dl]=ye[Vl]=ye[Nl]=true;ye[ml]=ye[gl]=ye[Tl]=ye[bl]=ye[Il]=ye[yl]=ye[wl]=ye[_l]=ye[xl]=ye[Cl]=ye[kl]=ye[Sl]=ye[El]=ye[Ml]=ye[$l]=false;function Rl(e){return ln(e)&&Vo(e.length)&&!!ye[Vt(e)]}function Hl(e){return function(t){return e(t)}}var Fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tn=Fo&&typeof module=="object"&&module&&!module.nodeType&&module,Fl=tn&&tn.exports===Fo,qn=Fl&&Lo.process,Ha=function(){try{var e=tn&&tn.require&&tn.require("util").types;return e||qn&&qn.binding&&qn.binding("util")}catch{}}(),Fa=Ha&&Ha.isTypedArray,f0=Fa?Hl(Fa):Rl,jl=Object.prototype,p0=jl.hasOwnProperty;function jo(e,t){return function(n){return e(t(n))}}var v0=jo(Object.keys,Object),Ul=Object.prototype,h0=Ul.hasOwnProperty;var ql=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kl=/^\w*$/;function Gl(e,t){if(cn(e))return false;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||On(e)?true:Kl.test(e)||!ql.test(e)||t!=null&&e in Object(t)}var an=Rt(Object,"create");function Wl(){this.__data__=an?an(null):{},this.size=0}function Yl(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Zl="__lodash_hash_undefined__",Xl=Object.prototype,Jl=Xl.hasOwnProperty;function Ql(e){var t=this.__data__;if(an){var n=t[e];return n===Zl?void 0:n}return Jl.call(t,e)?t[e]:void 0}var ei=Object.prototype,ti=ei.hasOwnProperty;function ni(e){var t=this.__data__;return an?t[e]!==void 0:ti.call(t,e)}var ai="__lodash_hash_undefined__";function oi(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=an&&t===void 0?ai:t,this}function zt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}zt.prototype.clear=Wl;zt.prototype.delete=Yl;zt.prototype.get=Ql;zt.prototype.has=ni;zt.prototype.set=oi;function ri(){this.__data__=[],this.size=0}function Pn(e,t){for(var n=e.length;n--;)if(Do(e[n][0],t))return n;return-1}var si=Array.prototype,li=si.splice;function ii(e){var t=this.__data__,n=Pn(t,e);if(n<0)return false;var a=t.length-1;return n==a?t.pop():li.call(t,n,1),--this.size,true}function ci(e){var t=this.__data__,n=Pn(t,e);return n<0?void 0:t[n][1]}function ui(e){return Pn(this.__data__,e)>-1}function di(e,t){var n=this.__data__,a=Pn(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}function yt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}yt.prototype.clear=ri;yt.prototype.delete=ii;yt.prototype.get=ci;yt.prototype.has=ui;yt.prototype.set=di;var on=Rt(bt,"Map");function fi(){this.size=0,this.__data__={hash:new zt,map:new(on||yt),string:new zt}}function pi(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Bn(e,t){var n=e.__data__;return pi(t)?n[typeof t=="string"?"string":"hash"]:n.map}function vi(e){var t=Bn(this,e).delete(e);return this.size-=t?1:0,t}function hi(e){return Bn(this,e).get(e)}function mi(e){return Bn(this,e).has(e)}function gi(e,t){var n=Bn(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}function wt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}wt.prototype.clear=fi;wt.prototype.delete=vi;wt.prototype.get=hi;wt.prototype.has=mi;wt.prototype.set=gi;var bi="Expected a function";function ha(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(bi);var n=function(){var a=arguments,o=t?t.apply(this,a):a[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,a);return n.cache=s.set(o,l)||s,l};return n.cache=new(ha.Cache||wt),n}ha.Cache=wt;var yi=500;function wi(e){var t=ha(e,function(a){return n.size===yi&&n.clear(),a}),n=t.cache;return t}var _i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xi=/\\(\\)?/g,Ci=wi(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_i,function(n,a,o,s){t.push(o?s.replace(xi,"$1"):a||n)}),t});function ki(e){return e==null?"":Po(e)}function zn(e,t){return cn(e)?e:Gl(e,t)?[e]:Ci(ki(e))}function ma(e){if(typeof e=="string"||On(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Uo(e,t){t=zn(t,e);for(var n=0,a=t.length;e!=null&&n<a;)e=e[ma(t[n++])];return n&&n==a?e:void 0}function Si(e,t,n){var a=e==null?void 0:Uo(e,t);return a===void 0?n:a}function Ei(e,t){for(var n=-1,a=t.length,o=e.length;++n<a;)e[o+n]=t[n];return e}var ja=dt?dt.isConcatSpreadable:void 0;function Mi(e){return cn(e)||Ro(e)||!!(ja&&e&&e[ja])}function qo(e,t,n,a,o){var s=-1,l=e.length;for(n||(n=Mi),o||(o=[]);++s<l;){var i=e[s];t>0&&n(i)?t>1?qo(i,t-1,n,a,o):Ei(o,i):a||(o[o.length]=i)}return o}function $i(e){var t=e==null?0:e.length;return t?qo(e,1):[]}function Ti(e){return ol(ul(e,void 0,$i),e+"")}var Ii=jo(Object.getPrototypeOf,Object),Ai="[object Object]",Li=Function.prototype,Oi=Object.prototype,Ko=Li.toString,Pi=Oi.hasOwnProperty,Bi=Ko.call(Object);function zi(e){if(!ln(e)||Vt(e)!=Ai)return false;var t=Ii(e);if(t===null)return true;var n=Pi.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ko.call(n)==Bi}function Di(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Ua(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=jn(n),n=n===n?n:0),t!==void 0&&(t=jn(t),t=t===t?t:0),Di(jn(e),t,n)}function Vi(){this.__data__=new yt,this.size=0}function Ni(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ri(e){return this.__data__.get(e)}function Hi(e){return this.__data__.has(e)}var Fi=200;function ji(e,t){var n=this.__data__;if(n instanceof yt){var a=n.__data__;if(!on||a.length<Fi-1)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new wt(a)}return n.set(e,t),this.size=n.size,this}function un(e){var t=this.__data__=new yt(e);this.size=t.size}un.prototype.clear=Vi;un.prototype.delete=Ni;un.prototype.get=Ri;un.prototype.has=Hi;un.prototype.set=ji;var Ui=Object.prototype,m0=Ui.propertyIsEnumerable;var ta=Rt(bt,"DataView"),na=Rt(bt,"Promise"),aa=Rt(bt,"Set"),qa="[object Map]",qi="[object Object]",Ka="[object Promise]",Ga="[object Set]",Wa="[object WeakMap]",Ya="[object DataView]",Ki=Nt(ta),Gi=Nt(on),Wi=Nt(na),Yi=Nt(aa),Zi=Nt(ea),Ft=Vt;(ta&&Ft(new ta(new ArrayBuffer(1)))!=Ya||on&&Ft(new on)!=qa||na&&Ft(na.resolve())!=Ka||aa&&Ft(new aa)!=Ga||ea&&Ft(new ea)!=Wa)&&(Ft=function(e){var t=Vt(e),n=t==qi?e.constructor:void 0,a=n?Nt(n):"";if(a)switch(a){case Ki:return Ya;case Gi:return qa;case Wi:return Ka;case Yi:return Ga;case Zi:return Wa}return t});var g0=bt.Uint8Array,Xi="__lodash_hash_undefined__";function Ji(e){return this.__data__.set(e,Xi),this}function Qi(e){return this.__data__.has(e)}function oa(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new wt;++t<n;)this.add(e[t])}oa.prototype.add=oa.prototype.push=Ji;oa.prototype.has=Qi;var Za=dt?dt.prototype:void 0,b0=Za?Za.valueOf:void 0;var ec=Object.prototype,y0=ec.hasOwnProperty;var tc=Object.prototype,w0=tc.hasOwnProperty;function nc(e,t){return e!=null&&t in Object(e)}function ac(e,t,n){t=zn(t,e);for(var a=-1,o=t.length,s=false;++a<o;){var l=ma(t[a]);if(!(s=e!=null&&n(e,l)))break;e=e[l]}return s||++a!=o?s:(o=e==null?0:e.length,!!o&&Vo(o)&&Bo(l,o)&&(cn(e)||Ro(e)))}function oc(e,t){return e!=null&&ac(e,t,nc)}function ga(e){for(var t=-1,n=e==null?0:e.length,a={};++t<n;){var o=e[t];zo(a,o[0],o[1])}return a}function nn(e){return e==null}function rc(e,t,n,a){if(!Yt(e))return e;t=zn(t,e);for(var o=-1,s=t.length,l=s-1,i=e;i!=null&&++o<s;){var v=ma(t[o]),u=n;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(o!=l){var T=i[v];u=void 0,u===void 0&&(u=Yt(T)?T:Bo(t[o+1])?[]:{})}cl(i,v,u),i=i[v]}return e}function sc(e,t,n){for(var a=-1,o=t.length,s={};++a<o;){var l=t[a],i=Uo(e,l);n(i,l)&&rc(s,zn(l,e),i)}return s}function lc(e,t){return sc(e,t,function(n,a){return oc(e,a)})}var ic=Ti(function(e,t){return e==null?{}:lc(e,t)});const cc=e=>e===void 0,Kn=e=>typeof e=="boolean",gt=e=>typeof e=="number";const ra=e=>typeof Element>"u"?false:e instanceof Element;const uc=e=>Qe(e)?!Number.isNaN(Number(e)):false;const Xa=e=>Object.keys(e);const dc="__epPropKey",me=e=>e,fc=e=>Wt(e)&&!!e.__epPropKey,Go=(e,t)=>{if(!Wt(e)||fc(e))return e;const{values:n,required:a,default:o,type:s,validator:l}=e,i={type:s,required:!!a,validator:n||l?v=>{let u=false,T=[];if(n&&(T=Array.from(n),Gt(e,"default")&&T.push(o),u||(u=T.includes(v))),l&&(u||(u=l(v))),!u&&T.length>0){const C=[...new Set(T)].map(O=>JSON.stringify(O)).join(", ");Er(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${C}], got value ${JSON.stringify(v)}.`)}return u}:void 0,[dc]:true};return Gt(e,"default")&&(i.default=o),i},_t=e=>ga(Object.entries(e).map(([t,n])=>[t,Go(n,t)]));var Wo=class extends Error{constructor(e){super(e),this.name="ElementPlusError"}};function pc(e,t){throw new Wo(`[${e}] ${t}`)}function vt(e,t){{const n=Qe(e)?new Wo(`[${e}] ${t}`):e;console.warn(n)}}const vc=["class","style"],hc=/^on[A-Z]/,mc=(e={})=>{const{excludeListeners:t=false,excludeKeys:n}=e,a=M(()=>((n==null?void 0:n.value)||[]).concat(vc)),o=ut();return o?M(()=>{var s;return ga(Object.entries((s=o.proxy)==null?void 0:s.$attrs).filter(([l])=>!a.value.includes(l)&&!(t&&hc.test(l))))}):(vt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),M(()=>({})))},gc=({from:e,replacement:t,scope:n,version:a,ref:o,type:s="API"},l)=>{Oe(()=>r(l),i=>{i&&vt(n,`[${s}] ${e} is about to be deprecated in version ${a}, please use ${t} instead.
|
|
6
|
+
For more detail, please visit: ${o}
|
|
7
|
+
`)},{immediate:true})},bc='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',yc=e=>typeof ShadowRoot>"u"?false:e instanceof ShadowRoot,Ja=e=>typeof Element>"u"?false:e instanceof Element,wc=e=>getComputedStyle(e).position==="fixed"?false:e.offsetParent!==null,Qa=e=>Array.from(e.querySelectorAll(bc)).filter(t=>ba(t)&&wc(t)),ba=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return true;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return false;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return true;default:return false}};const _c=(e,t)=>{if(!e||!e.focus)return;let n=false;Ja(e)&&!ba(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),n=true),e.focus(t),Ja(e)&&n&&e.removeAttribute("tabindex")};const Yo=()=>Ge&&/firefox/i.test(window.navigator.userAgent),xc=()=>Ge&&/android/i.test(window.navigator.userAgent),Cc="utils/dom/style",Zo=(e="")=>e.split(" ").filter(t=>!!t.trim()),kc=(e,t)=>{if(!e||!t)return false;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Sc=(e,t)=>{!e||!t.trim()||e.classList.add(...Zo(t))},Ec=(e,t)=>{!e||!t.trim()||e.classList.remove(...Zo(t))},Mc=(e,t)=>{var a;if(!Ge||!e||!t||yc(e))return"";let n=ps(t);n==="float"&&(n="cssFloat");try{const o=e.style[n];if(o)return o;const s=(a=document.defaultView)==null?void 0:a.getComputedStyle(e,"");return s?s[n]:""}catch{return e.style[n]}};function rn(e,t="px"){if(!e&&e!==0)return"";if(gt(e)||uc(e))return`${e}${t}`;if(Qe(e))return e;vt(Cc,"binding value must be a string or number")}const $c=(e,t,n,a)=>{const o={offsetX:0,offsetY:0},s=j(false),l=(O,f)=>{if(e.value){const{offsetX:g,offsetY:m}=o,y=e.value.getBoundingClientRect(),B=Math.max(y.left,0),z=Math.max(y.top,0),K=y.width,ie=y.height,q=document.documentElement.clientWidth,S=document.documentElement.clientHeight,E=-B+g,Z=-z+m,D=q-B-K+g,N=S-z-(ie<S?ie:0)+m;a!=null&&a.value||(O=Ua(O,E,D),f=Ua(f,Z,N)),o.offsetX=O,o.offsetY=f,e.value.style.transform=`translate(${rn(O)}, ${rn(f)})`}},i=O=>{const f=O.clientX,g=O.clientY,{offsetX:m,offsetY:y}=o,B=K=>{s.value||(s.value=true),l(m+K.clientX-f,y+K.clientY-g)},z=()=>{s.value=false,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",z)};document.addEventListener("mousemove",B),document.addEventListener("mouseup",z)},v=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",i),window.addEventListener("resize",C))},u=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",i),window.removeEventListener("resize",C))},T=()=>{o.offsetX=0,o.offsetY=0,e.value&&(e.value.style.transform="")},C=()=>{const{offsetX:O,offsetY:f}=o;l(O,f)};return pt(()=>{Mr(()=>{n.value?v():u()})}),Zt(()=>{u()}),{isDragging:s,resetPosition:T,updatePosition:C}};var Tc={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"},inputOTP:{groupLabel:"OTP Input",defaultLabel:"Please enter OTP character {index}"}}};const Ic=e=>(t,n)=>Ac(t,n,r(e)),Ac=(e,t,n)=>Si(n,e,e).replace(/\{(\w+)\}/g,(a,o)=>`${(t==null?void 0:t[o])??`{${o}}`}`),Lc=e=>({lang:M(()=>r(e).name),locale:It(e)?e:j(e),t:Ic(e)}),Xo=Symbol("localeContextKey"),Oc=e=>{const t=e||Ke(Xo,j());return Lc(M(()=>t.value||Tc))},Pc="is-",Tt=(e,t,n,a,o)=>{let s=`${e}-${t}`;return n&&(s+=`-${n}`),a&&(s+=`__${a}`),o&&(s+=`--${o}`),s},Jo=Symbol("namespaceContextKey"),Qo=e=>{const t=e||(ut()?Ke(Jo,j("el")):j("el"));return M(()=>r(t)||"el")},ft=(e,t)=>{const n=Qo(t);return{namespace:n,b:(m="")=>Tt(n.value,e,m,"",""),e:m=>m?Tt(n.value,e,"",m,""):"",m:m=>m?Tt(n.value,e,"","",m):"",be:(m,y)=>m&&y?Tt(n.value,e,m,y,""):"",em:(m,y)=>m&&y?Tt(n.value,e,"",m,y):"",bm:(m,y)=>m&&y?Tt(n.value,e,m,"",y):"",bem:(m,y,B)=>m&&y&&B?Tt(n.value,e,m,y,B):"",is:(m,...y)=>{const B=y.length>=1?y[0]:true;return m&&B?`${Pc}${m}`:""},cssVar:m=>{const y={};for(const B in m)m[B]&&(y[`--${n.value}-${B}`]=m[B]);return y},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const y={};for(const B in m)m[B]&&(y[`--${n.value}-${e}-${B}`]=m[B]);return y},cssVarBlockName:m=>`--${n.value}-${e}-${m}`}};const Bc=e=>Ge?window.requestAnimationFrame(e):setTimeout(e,16),eo=e=>Ge?window.cancelAnimationFrame(e):clearTimeout(e);let vn;const zc=e=>{var s;if(!Ge)return 0;if(vn!==void 0)return vn;const t=document.createElement("div");t.className=`${e}-scrollbar__wrap`,t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const n=t.offsetWidth;t.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",t.appendChild(a);const o=a.offsetWidth;return(s=t.parentNode)==null||s.removeChild(t),vn=n-o,vn};const Dc=(e,t={})=>{It(e)||pc("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||ft("popup"),a=M(()=>n.bm("parent","hidden"));let o=0,s=false,l="0",i=false;const v=()=>{i||(i=true,setTimeout(()=>{typeof document>"u"||s&&document&&(document.body.style.width=l,Ec(document.body,a.value))},200))};Oe(e,u=>{if(!u){v();return}i=false,s=!kc(document.body,a.value),s&&(l=document.body.style.width,Sc(document.body,a.value)),o=zc(n.namespace.value);const T=document.documentElement.clientHeight<document.body.scrollHeight,C=Mc(document.body,"overflowY");o>0&&(T||C==="scroll")&&s&&(document.body.style.width=`calc(100% - ${o}px)`)}),$r(()=>v())};const Dn=e=>{if(e.code&&e.code!=="Unidentified")return e.code;const t=Vc(e);if(t){if(Object.values(Kt).includes(t))return t;switch(t){case" ":return Kt.space;default:return""}}return""},Vc=e=>{let t=e.key&&e.key!=="Unidentified"?e.key:"";if(!t&&e.type==="keyup"&&xc()){const n=e.target;t=n.value.charAt(n.selectionStart-1)}return t},er=e=>{const t=ut();return M(()=>{var n,a;return(a=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:a[e]})},tr=e=>{if(!e)return{onClick:ct,onMousedown:ct,onMouseup:ct};let t=false,n=false;return{onClick:l=>{t&&n&&e(l),t=n=false},onMousedown:l=>{t=l.target===l.currentTarget},onMouseup:l=>{n=l.target===l.currentTarget}}},sa={prefix:Math.floor(Math.random()*1e4),current:0},Nc=Symbol("elIdInjection"),Rc=()=>ut()?Ke(Nc,sa):sa,la=e=>{const t=Rc();!Ge&&t===sa&&vt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
8
|
+
usage: app.provide(ID_INJECTION_KEY, {
|
|
9
|
+
prefix: number,
|
|
10
|
+
current: number,
|
|
11
|
+
})`);const n=Qo();return Lr(()=>r(e)||`${n.value}-id-${t.prefix}-${t.current++}`)};let jt=[];const to=e=>{Dn(e)===Kt.esc&&jt.forEach(t=>t(e))},Hc=e=>{pt(()=>{jt.length===0&&document.addEventListener("keydown",to),Ge&&jt.push(e)}),Zt(()=>{jt=jt.filter(t=>t!==e),jt.length===0&&Ge&&document.removeEventListener("keydown",to)})},no={current:0},ao=j(0),nr=2e3,oo=Symbol("elZIndexContextKey"),ar=Symbol("zIndexContextKey"),Fc=e=>{const t=ut()?Ke(oo,no):no,n=e||(ut()?Ke(ar,void 0):void 0),a=M(()=>{const l=r(n);return gt(l)?l:nr}),o=M(()=>a.value+ao.value),s=()=>(t.current++,ao.value=t.current,o.value);return!Ge&&!Ke(oo)&&vt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
|
|
12
|
+
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:a,currentZIndex:o,nextZIndex:s}};function jc(e){let t;function n(){if(e.value==null)return;const{selectionStart:o,selectionEnd:s,value:l}=e.value;o==null||s==null||(t={selectionStart:o,selectionEnd:s,value:l,beforeTxt:l.slice(0,Math.max(0,o)),afterTxt:l.slice(Math.max(0,s))})}function a(){if(e.value==null||t==null)return;const{value:o}=e.value,{beforeTxt:s,afterTxt:l,selectionStart:i}=t;if(s==null||l==null||i==null)return;let v=o.length;if(o.endsWith(l))v=o.length-l.length;else if(o.startsWith(s))v=s.length;else{const u=s[i-1],T=o.indexOf(u,i-1);T!==-1&&(v=T+1)}e.value.setSelectionRange(v,v)}return[n,a]}const ya=Go({type:String,values:To,required:false}),or=Symbol("size"),Uc=()=>{const e=Ke(or,{});return M(()=>r(e.size)||"")};function qc(e,{disabled:t,beforeFocus:n,afterFocus:a,beforeBlur:o,afterBlur:s}={}){const{emit:l}=ut(),i=_n(),v=j(false),u=O=>{const f=mt(n)?n(O):false;r(t)||v.value||f||(v.value=true,l("focus",O),a==null||a())},T=O=>{var g;const f=mt(o)?o(O):false;r(t)||O.relatedTarget&&((g=i.value)!=null&&g.contains(O.relatedTarget))||f||(v.value=false,l("blur",O),s==null||s())},C=O=>{var f,g;r(t)||ba(O.target)||(f=i.value)!=null&&f.contains(document.activeElement)&&i.value!==document.activeElement||(g=e.value)==null||g.focus()};return Oe([i,()=>r(t)],([O,f])=>{O&&(f?O.removeAttribute("tabindex"):O.setAttribute("tabindex","-1"))}),xn(i,"focus",u,true),xn(i,"blur",T,true),xn(i,"click",C,true),{isFocused:v,wrapperRef:i,handleFocus:u,handleBlur:T}}function Kc({afterComposition:e,emit:t}){const n=j(false),a=i=>{t==null||t("compositionstart",i),n.value=true},o=i=>{t==null||t("compositionupdate",i),n.value=true},s=i=>{t==null||t("compositionend",i),n.value&&(n.value=false,we(()=>e(i)))};return{isComposing:n,handleComposition:i=>{i.type==="compositionend"?s(i):o(i)},handleCompositionStart:a,handleCompositionUpdate:o,handleCompositionEnd:s}}const Gc=Symbol("emptyValuesContextKey");const Wc=_t({emptyValues:Array,valueOnClear:{type:me([String,Number,Boolean,Function]),default:void 0,validator:e=>(e=mt(e)?e():e,Io(e)?e.every(t=>!t):!e)}});const Yc=_t({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),Zc=e=>ic(Yc,e),rr=e=>{const t=e.props,n=Io(t)?ga(t.map(a=>[a,{}])):t;e.setPropsDefaults=a=>{if(n){for(const[o,s]of Object.entries(a)){const l=n[o];if(Gt(n,o)){if(zi(l)){n[o]={...l,default:s};continue}n[o]={type:l,default:s}}}e.props=n}}},Vn=(e,t)=>{if(e.install=n=>{for(const a of[e,...Object.values(t??{})])n.component(a.name,a)},t)for(const[n,a]of Object.entries(t))e[n]=a;return rr(e),e},Xc=(e,t)=>(e.install=n=>{e._context=n._context,n.config.globalProperties[t]=e},e);const Jc=e=>(e.install=ct,rr(e),e),qt=me([String,Object,Function]);const sr={Close:Eo,SuccessFilled:Mo,InfoFilled:Qn,WarningFilled:$o,CircleCloseFilled:pa},Tn={primary:Qn,success:Mo,warning:$o,error:pa,info:Qn},Qc={validating:Bt,success:Dr,error:va},eu=_t({size:{type:me([Number,String])},color:{type:String}});var tu=ue({name:"ElIcon",inheritAttrs:false,__name:"icon",props:eu,setup(e){const t=e,n=ft("icon"),a=M(()=>{const{size:o,color:s}=t,l=rn(o);return!l&&!s?{}:{fontSize:l,"--color":s}});return(o,s)=>(h(),L("i",kn({class:r(n).b(),style:a.value},o.$attrs),[Ae(o.$slots,"default")],16))}}),nu=tu;const at=Vn(nu),wa=Symbol("formContextKey"),lr=Symbol("formItemContextKey"),ir=(e,t={})=>{const n=j(void 0),a=t.prop?n:er("size"),o=t.global?n:Uc(),s=t.form?{size:void 0}:Ke(wa,void 0),l=t.formItem?{size:void 0}:Ke(lr,void 0);return M(()=>a.value||r(e)||(l==null?void 0:l.size)||(s==null?void 0:s.size)||o.value||"")},_a=e=>{const t=er("disabled"),n=Ke(wa,void 0);return M(()=>t.value??r(e)??(n==null?void 0:n.disabled)??false)},cr=()=>({form:Ke(wa,void 0),formItem:Ke(lr,void 0)}),au=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:a})=>{n||(n=j(false)),a||(a=j(false));const o=ut(),s=()=>{let u=o==null?void 0:o.parent;for(;u;){if(u.type.name==="ElFormItem")return false;if(u.type.name==="ElLabelWrap")return true;u=u.parent}return false},l=j();let i;const v=M(()=>{var u;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((u=t.inputIds)==null?void 0:u.length)<=1)});return pt(()=>{i=Oe([Sn(e,"id"),n],([u,T])=>{const C=u??(T?void 0:la().value);C!==l.value&&(t!=null&&t.removeInputId&&!s()&&(l.value&&t.removeInputId(l.value),!(a!=null&&a.value)&&!T&&C&&t.addInputId(C)),l.value=C)},{immediate:true})}),An(()=>{i&&i(),t!=null&&t.removeInputId&&l.value&&t.removeInputId(l.value)}),{isLabeledByFormItem:v,inputId:l}},Gn="focus-trap.focus-after-trapped",Wn="focus-trap.focus-after-released",ou="focus-trap.focusout-prevented",ro={cancelable:true,bubbles:false},ru={cancelable:true,bubbles:false},so="focusAfterTrapped",lo="focusAfterReleased",su=Symbol("elFocusTrap"),xa=j(),Nn=j(0),Ca=j(0);let hn=0;const ur=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const o=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||o?NodeFilter.FILTER_SKIP:a.tabIndex>=0||a===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},io=(e,t)=>{for(const n of e)if(!lu(n,t))return n},lu=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return true;for(;e;){if(t&&e===t)return false;if(getComputedStyle(e).display==="none")return true;e=e.parentElement}return false},iu=e=>{const t=ur(e);return[io(t,e),io(t.reverse(),e)]},cu=e=>e instanceof HTMLInputElement&&"select"in e,Ct=(e,t)=>{if(e){const n=document.activeElement;_c(e,{preventScroll:true}),Ca.value=window.performance.now(),e!==n&&cu(e)&&t&&e.select()}};function co(e,t){const n=[...e],a=e.indexOf(t);return a!==-1&&n.splice(a,1),n}const uu=()=>{let e=[];return{push:a=>{const o=e[0];o&&a!==o&&o.pause(),e=co(e,a),e.unshift(a)},remove:a=>{var o,s;e=co(e,a),(s=(o=e[0])==null?void 0:o.resume)==null||s.call(o)}}},du=(e,t=false)=>{const n=document.activeElement;for(const a of e)if(Ct(a,t),document.activeElement!==n)return},uo=uu(),fu=()=>Nn.value>Ca.value,mn=()=>{xa.value="pointer",Nn.value=window.performance.now()},fo=()=>{xa.value="keyboard",Nn.value=window.performance.now()},pu=()=>(pt(()=>{hn===0&&(document.addEventListener("mousedown",mn),document.addEventListener("touchstart",mn),document.addEventListener("keydown",fo)),hn++}),Zt(()=>{hn--,hn<=0&&(document.removeEventListener("mousedown",mn),document.removeEventListener("touchstart",mn),document.removeEventListener("keydown",fo))}),{focusReason:xa,lastUserFocusTimestamp:Nn,lastAutomatedFocusTimestamp:Ca}),gn=e=>new CustomEvent(ou,{...ru,detail:e});var vu=ue({name:"ElFocusTrap",inheritAttrs:false,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[so,lo,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=j();let a,o;const{focusReason:s}=pu();Hc(g=>{e.trapped&&!l.paused&&t("release-requested",g)});const l={paused:false,pause(){this.paused=true},resume(){this.paused=false}},i=g=>{if(!e.loop&&!e.trapped||l.paused)return;const{altKey:m,ctrlKey:y,metaKey:B,currentTarget:z,shiftKey:K}=g,{loop:ie}=e,q=Dn(g)===Kt.tab&&!m&&!y&&!B,S=document.activeElement;if(q&&S){const E=z,[Z,D]=iu(E);if(Z&&D){if(!K&&S===D){const N=gn({focusReason:s.value});t("focusout-prevented",N),N.defaultPrevented||(g.preventDefault(),ie&&Ct(Z,true))}else if(K&&[Z,E].includes(S)){const N=gn({focusReason:s.value});t("focusout-prevented",N),N.defaultPrevented||(g.preventDefault(),ie&&Ct(D,true))}}else if(S===E){const N=gn({focusReason:s.value});t("focusout-prevented",N),N.defaultPrevented||g.preventDefault()}}};da(su,{focusTrapRef:n,onKeydown:i}),Oe(()=>e.focusTrapEl,g=>{g&&(n.value=g)},{immediate:true}),Oe([n],([g],[m])=>{g&&(g.addEventListener("keydown",i),g.addEventListener("focusin",T),g.addEventListener("focusout",C)),m&&(m.removeEventListener("keydown",i),m.removeEventListener("focusin",T),m.removeEventListener("focusout",C))});const v=g=>{t(so,g)},u=g=>t(lo,g),T=g=>{const m=r(n);if(!m)return;const y=g.target,B=g.relatedTarget,z=y&&m.contains(y);e.trapped||B&&m.contains(B)||(a=B),z&&t("focusin",g),!l.paused&&e.trapped&&(z?o=y:Ct(o,true))},C=g=>{const m=r(n);if(!(l.paused||!m))if(e.trapped){const y=g.relatedTarget;!nn(y)&&!m.contains(y)&&setTimeout(()=>{if(!l.paused&&e.trapped){const B=gn({focusReason:s.value});t("focusout-prevented",B),B.defaultPrevented||Ct(o,true)}},0)}else{const y=g.target;y&&m.contains(y)||t("focusout",g)}};async function O(){await we();const g=r(n);if(g){uo.push(l);const m=g.contains(document.activeElement)?a:document.activeElement;if(a=m,!g.contains(m)){const y=new Event(Gn,ro);g.addEventListener(Gn,v),g.dispatchEvent(y),y.defaultPrevented||we(()=>{let B=e.focusStartEl;Qe(B)||(Ct(B),document.activeElement!==B&&(B="first")),B==="first"&&du(ur(g),true),(document.activeElement===m||B==="container")&&Ct(g)})}}}function f(){const g=r(n);if(g){g.removeEventListener(Gn,v);const m=new CustomEvent(Wn,{...ro,detail:{focusReason:s.value}});g.addEventListener(Wn,u),g.dispatchEvent(m),!m.defaultPrevented&&(s.value=="keyboard"||!fu()||g.contains(document.activeElement))&&Ct(a??document.body),g.removeEventListener(Wn,u),uo.remove(l),a=null,o=null}}return pt(()=>{e.trapped&&O(),Oe(()=>e.trapped,g=>{g?O():f()})}),Zt(()=>{e.trapped&&f(),n.value&&(n.value.removeEventListener("keydown",i),n.value.removeEventListener("focusin",T),n.value.removeEventListener("focusout",C),n.value=void 0),a=null,o=null}),{onKeydown:i}}}),dr=(e,t)=>{const n=e.__vccOpts||e;for(const[a,o]of t)n[a]=o;return n};function hu(e,t,n,a,o,s){return Ae(e.$slots,"default",{handleKeydown:e.onKeydown})}var mu=dr(vu,[["render",hu]]),gu=mu;const fr=e=>e,bu=_t({id:{type:String,default:void 0},size:ya,disabled:{type:Boolean,default:void 0},modelValue:{type:me([String,Number,Object]),default:""},modelModifiers:{type:me(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:me(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:me([Boolean,Object]),default:false},autocomplete:{type:me(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:qt,default:va},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:qt},prefixIcon:{type:qt},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:true},inputStyle:{type:me([Object,Array,String,Boolean]),default:()=>fr({})},countGraphemes:{type:me(Function)},autofocus:Boolean,rows:{type:Number,default:2},...Zc(["ariaLabel"]),inputmode:{type:me(String),default:void 0},name:String}),yu={[Cn]:e=>Qe(e),input:e=>Qe(e),change:(e,t)=>Qe(e)&&(t instanceof Event||t===void 0),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:e=>e===void 0||e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent};En(va);let Be;const wu={height:"0",visibility:"hidden",overflow:Yo()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},_u=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],po=e=>{const t=Number.parseFloat(e);return Number.isNaN(t)?e:t};function xu(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),a=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),o=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:_u.map(s=>[s,t.getPropertyValue(s)]),paddingSize:a,borderSize:o,boxSizing:n}}function vo(e,t=1,n){var T;if(!Be){Be=document.createElement("textarea");let C=document.body;!Yo()&&e.parentNode&&(C=e.parentNode),C.appendChild(Be)}const{paddingSize:a,borderSize:o,boxSizing:s,contextStyle:l}=xu(e);l.forEach(([C,O])=>Be==null?void 0:Be.style.setProperty(C,O)),Object.entries(wu).forEach(([C,O])=>Be==null?void 0:Be.style.setProperty(C,O,"important")),Be.value=e.value||e.placeholder||"";let i=Be.scrollHeight;const v={};s==="border-box"?i=i+o:s==="content-box"&&(i=i-a),Be.value="";const u=Be.scrollHeight-a;if(gt(t)){let C=u*t;s==="border-box"&&(C=C+a+o),i=Math.max(C,i),v.minHeight=`${C}px`}if(gt(n)){let C=u*n;s==="border-box"&&(C=C+a+o),i=Math.min(C,i)}return v.height=`${i}px`,(T=Be.parentNode)==null||T.removeChild(Be),Be=void 0,v}const Cu=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],ku=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],ho="ElInput";var Su=ue({name:ho,inheritAttrs:false,__name:"input",props:bu,emits:yu,setup(e,{expose:t,emit:n}){const a=e,o=n,s=Tr(),l=Co(),i=M(()=>[a.type==="textarea"?B.b():y.b(),y.m(g.value),y.is("disabled",m.value),y.is("exceed",Ye.value),{[y.b("group")]:l.prepend||l.append,[y.m("prefix")]:l.prefix||a.prefixIcon,[y.m("suffix")]:l.suffix||a.suffixIcon||a.clearable||a.showPassword,[y.bm("suffix","password-clear")]:_e.value&&Ne.value,[y.b("hidden")]:a.type==="hidden"},s.class]),v=M(()=>[y.e("wrapper"),y.is("focus",H.value)]),u=mc(),T=M(()=>{var c;return(c=a.maxlength)==null?void 0:c.toString()}),{form:C,formItem:O}=cr(),{inputId:f}=au(a,{formItemContext:O}),g=ir(),m=_a(),y=ft("input"),B=ft("textarea"),z=_n(),K=_n(),ie=j(false),q=j(false),S=j(),E=j(),Z=_n(a.inputStyle),D=j("");let N;const U=j(),Q=M(()=>z.value||K.value),{wrapperRef:Y,isFocused:H,handleFocus:w,handleBlur:k}=qc(Q,{disabled:m,afterFocus(){var c;a.showPassword&&(N=(c=Q.value)==null?void 0:c.value)},beforeBlur(c){var d;if(a.showPassword){const x=Q.value;if(c.relatedTarget&&((d=x==null?void 0:x.parentElement)!=null&&d.contains(c.relatedTarget)))return;const R=x==null?void 0:x.value;!nn(R)&&!nn(N)&&R!==N&&(x==null||x.dispatchEvent(new Event("change",{bubbles:true}))),N=void 0}},afterBlur(){var c;a.validateEvent&&((c=O==null?void 0:O.validate)==null||c.call(O,"blur").catch(ct))}}),F=M(()=>(C==null?void 0:C.statusIcon)??false),I=M(()=>(O==null?void 0:O.validateState)||""),X=M(()=>I.value&&Qc[I.value]),W=M(()=>q.value?is:Xr),le=M(()=>[s.style]),pe=M(()=>[a.inputStyle,Z.value,{resize:a.resize},U.value?{height:U.value}:void 0]),oe=M(()=>nn(a.modelValue)?"":String(a.modelValue)),ge=M(()=>a.clearable&&!m.value&&!a.readonly),_e=M(()=>ge.value&&!!oe.value&&(H.value||ie.value)),Ne=M(()=>a.showPassword&&!m.value&&!!oe.value),xe=M(()=>a.showWordLimit&&!!T.value&&(a.type==="text"||a.type==="textarea")&&!m.value&&!a.readonly&&!a.showPassword),We=M(()=>a.countGraphemes&&a.showWordLimit?a.countGraphemes(oe.value):oe.value.length),Ye=M(()=>!!xe.value&&We.value>Number(T.value)),Se=M(()=>!!l.suffix||!!a.suffixIcon||a.clearable||a.showPassword||xe.value||!!I.value&&F.value),Re=M(()=>!!Object.keys(a.modelModifiers).length),[He,nt]=jc(z);let Le;So(K,c=>{if(Ht(),!xe.value&&!ge.value||a.resize!=="both"&&a.resize!=="horizontal")return;const{width:d}=c[0].target.getBoundingClientRect(),x=()=>{Le=void 0,S.value={right:`calc(100% - ${d-10}px)`},E.value={right:`calc(100% - ${d-11}px)`}};Le&&eo(Le),Le=Bc(x)});const ht=()=>{const{type:c,autosize:d}=a;if(!(!Ge||c!=="textarea"||!K.value))if(d){const x=Wt(d)?d.minRows:void 0,R=Wt(d)?d.maxRows:void 0,p=vo(K.value,x,R);Z.value={overflowY:"hidden",...p},we(()=>{K.value.offsetHeight,Z.value=p})}else Z.value={minHeight:vo(K.value).minHeight}},Ht=(c=>{let d=false;return()=>{var x;if(d||!a.autosize){a.resize!=="none"&&setTimeout(()=>{var R;U.value=(R=K.value)==null?void 0:R.style.height});return}((x=K.value)==null?void 0:x.offsetParent)!==null&&(setTimeout(c),d=true)}})(ht),Ie=()=>{const c=Q.value,d=a.formatter?a.formatter(oe.value):oe.value;!c||c.value===d||a.type==="file"||(c.value=d)},rt=c=>{const{trim:d,number:x}=a.modelModifiers;return d&&(c=c.trim()),x&&(c=`${po(c)}`),a.formatter&&a.parser&&(c=a.parser(c)),c},Et=async c=>{if(se.value)return;const{lazy:d}=a.modelModifiers;let{value:x}=c.target,R=false;if(d){o(Fn,x);return}if(x=rt(x),a.countGraphemes&&T.value!=null){const p=Number(T.value),ne=a.countGraphemes(x),V=a.countGraphemes(D.value);if(ne>p&&ne>V)if(V>p)x=D.value,R=true;else{const re=D.value,ee=x;let te=0;for(;te<re.length&&te<ee.length&&re[te]===ee[te];)te++;let be=re.length,xt=ee.length;for(;be>te&&xt>te&&re[be-1]===ee[xt-1];)be--,xt--;const xr=ee.slice(0,te),Cr=re.slice(te,be),Sa=ee.slice(te,xt),kr=ee.slice(xt),Sr=V-a.countGraphemes(Cr),Rn=Math.max(0,p-Sr);let Jt="";if(Rn>0)if(typeof Intl<"u"&&"Segmenter"in Intl){const Hn=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(const{segment:fn}of Hn.segment(Sa)){const Ea=Jt+fn;if(a.countGraphemes(Ea)>Rn)break;Jt=Ea}}else for(const Hn of Array.from(Sa)){const fn=Jt+Hn;if(a.countGraphemes(fn)>Rn)break;Jt=fn}x=xr+Jt+kr,R=true}}if(String(x)===oe.value){if(a.formatter||R){const p=c.target,ne=p.value,V=p.selectionStart,re=p.selectionEnd;if(Ie(),R&&Q.value&&V!=null&&re!=null){const ee=Q.value.value,te=ne.slice(Math.max(0,re));let be=Math.min(V,ee.length);te&&ee.endsWith(te)&&(be=ee.length-te.length),Q.value.setSelectionRange(be,be)}}return}D.value=x,He(),o(Cn,x),o(Fn,x),await we(),(a.formatter&&a.parser||!Re.value)&&Ie(),nt()},Mt=async c=>{let{value:d}=c.target;a.showPassword&&(N=d),d=rt(d),a.modelModifiers.lazy&&o(Cn,d),o(Aa,d,c),await we(),Ie()},{isComposing:se,handleCompositionStart:_,handleCompositionUpdate:Ce,handleCompositionEnd:de}=Kc({emit:o,afterComposition:Et}),Fe=()=>{q.value=!q.value},et=()=>{var c;return(c=Q.value)==null?void 0:c.focus()},Ee=()=>{var c;return(c=Q.value)==null?void 0:c.blur()},$t=c=>{ie.value=false,o("mouseleave",c)},he=c=>{ie.value=true,o("mouseenter",c)},Te=c=>{o("keydown",c)},je=()=>{var c;(c=Q.value)==null||c.select()},fe=c=>{o(Cn,""),N="",o(Aa,""),o("clear",c),o(Fn,"")};return Oe(()=>a.modelValue,()=>{var c;we(()=>{ht(),a.autosize&&(U.value=void 0)}),a.validateEvent&&((c=O==null?void 0:O.validate)==null||c.call(O,"change").catch(ct))}),Oe(()=>oe.value,c=>{D.value=c},{immediate:true}),Oe(oe,c=>{if(!Q.value)return;const{trim:d,number:x}=a.modelModifiers,R=Q.value.value,p=(x||a.type==="number")&&!/^0\d/.test(R)?`${po(R)}`:R;p!==c&&(document.activeElement===Q.value&&Q.value.type!=="range"&&d&&p.trim()===c||Ie())}),Oe(()=>a.type,async()=>{await we(),Ie(),ht()}),pt(()=>{!a.formatter&&a.parser&&vt(ho,"If you set the parser, you also need to set the formatter."),Ie(),we(ht)}),Zt(()=>{Le&&eo(Le)}),t({input:z,textarea:K,ref:Q,textareaStyle:pe,autosize:Sn(a,"autosize"),isComposing:se,passwordVisible:q,focus:et,blur:Ee,select:je,clear:fe,resizeTextarea:ht}),(c,d)=>(h(),L("div",{class:G([i.value,{[r(y).bm("group","append")]:c.$slots.append,[r(y).bm("group","prepend")]:c.$slots.prepend}]),style:Je(le.value),onMouseenter:he,onMouseleave:$t},[$(" input "),e.type!=="textarea"?(h(),L(Me,{key:0},[$(" prepend slot "),c.$slots.prepend?(h(),L("div",{key:0,class:G(r(y).be("group","prepend"))},[Ae(c.$slots,"prepend")],2)):$("v-if",true),b("div",{ref_key:"wrapperRef",ref:Y,class:G(v.value)},[$(" prefix slot "),c.$slots.prefix||e.prefixIcon?(h(),L("span",{key:0,class:G(r(y).e("prefix"))},[b("span",{class:G(r(y).e("prefix-inner"))},[Ae(c.$slots,"prefix"),e.prefixIcon?(h(),J(r(at),{key:0,class:G(r(y).e("icon"))},{default:P(()=>[(h(),J(Ue(e.prefixIcon)))]),_:1},8,["class"])):$("v-if",true)],2)],2)):$("v-if",true),b("input",kn({id:r(f),ref_key:"input",ref:z,class:r(y).e("inner")},r(u),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:T.value,type:e.showPassword?q.value?"text":"password":e.type,disabled:r(m),readonly:e.readonly,autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-label":e.ariaLabel,placeholder:e.placeholder,style:e.inputStyle,form:e.form,autofocus:e.autofocus,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:d[0]||(d[0]=(...x)=>r(_)&&r(_)(...x)),onCompositionupdate:d[1]||(d[1]=(...x)=>r(Ce)&&r(Ce)(...x)),onCompositionend:d[2]||(d[2]=(...x)=>r(de)&&r(de)(...x)),onInput:Et,onChange:Mt,onKeydown:Te}),null,16,Cu),$(" suffix slot "),Se.value?(h(),L("span",{key:1,class:G(r(y).e("suffix"))},[b("span",{class:G(r(y).e("suffix-inner"))},[ge.value?(h(),J(r(at),{key:0,class:G([r(y).e("icon"),r(y).e("clear")]),style:Je({visibility:_e.value?"visible":"hidden"}),onMousedown:Ve(r(ct),["prevent"]),onClick:fe},{default:P(()=>[(h(),J(Ue(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):$("v-if",true),!_e.value||!Ne.value||!xe.value?(h(),L(Me,{key:1},[Ae(c.$slots,"suffix"),e.suffixIcon?(h(),J(r(at),{key:0,class:G(r(y).e("icon"))},{default:P(()=>[(h(),J(Ue(e.suffixIcon)))]),_:1},8,["class"])):$("v-if",true)],64)):$("v-if",true),Ne.value?(h(),J(r(at),{key:2,class:G([r(y).e("icon"),r(y).e("password")]),onClick:Fe,onMousedown:Ve(r(ct),["prevent"]),onMouseup:Ve(r(ct),["prevent"])},{default:P(()=>[Ae(c.$slots,"password-icon",{visible:q.value},()=>[(h(),J(Ue(W.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):$("v-if",true),xe.value?(h(),L("span",{key:3,class:G([r(y).e("count"),r(y).is("outside",e.wordLimitPosition==="outside")])},[b("span",{class:G(r(y).e("count-inner"))},ae(We.value)+" / "+ae(T.value),3)],2)):$("v-if",true),I.value&&X.value&&F.value?(h(),J(r(at),{key:4,class:G([r(y).e("icon"),r(y).e("validateIcon"),r(y).is("loading",I.value==="validating")])},{default:P(()=>[(h(),J(Ue(X.value)))]),_:1},8,["class"])):$("v-if",true)],2)],2)):$("v-if",true)],2),$(" append slot "),c.$slots.append?(h(),L("div",{key:1,class:G(r(y).be("group","append"))},[Ae(c.$slots,"append")],2)):$("v-if",true)],64)):(h(),L(Me,{key:1},[$(" textarea "),b("textarea",kn({id:r(f),ref_key:"textarea",ref:K,class:[r(B).e("inner"),r(y).is("focus",r(H)),r(B).is("clearable",e.clearable)]},r(u),{name:e.name,minlength:e.countGraphemes?void 0:e.minlength,maxlength:e.countGraphemes?void 0:T.value,tabindex:e.tabindex,disabled:r(m),readonly:e.readonly,autocomplete:e.autocomplete,style:pe.value,"aria-label":e.ariaLabel,placeholder:e.placeholder,form:e.form,autofocus:e.autofocus,rows:e.rows,role:e.containerRole,inputmode:e.inputmode,onCompositionstart:d[3]||(d[3]=(...x)=>r(_)&&r(_)(...x)),onCompositionupdate:d[4]||(d[4]=(...x)=>r(Ce)&&r(Ce)(...x)),onCompositionend:d[5]||(d[5]=(...x)=>r(de)&&r(de)(...x)),onInput:Et,onFocus:d[6]||(d[6]=(...x)=>r(w)&&r(w)(...x)),onBlur:d[7]||(d[7]=(...x)=>r(k)&&r(k)(...x)),onChange:Mt,onKeydown:Te}),null,16,ku),_e.value?(h(),J(r(at),{key:0,class:G([r(B).e("icon"),r(B).e("clear")]),style:Je(E.value),onMousedown:Ve(r(ct),["prevent"]),onClick:fe},{default:P(()=>[(h(),J(Ue(e.clearIcon)))]),_:1},8,["class","style","onMousedown"])):$("v-if",true),xe.value?(h(),L("span",{key:1,style:Je(S.value),class:G([r(y).e("count"),r(y).is("outside",e.wordLimitPosition==="outside")])},ae(We.value)+" / "+ae(T.value),7)):$("v-if",true)],64))],38))}}),Eu=Su;const Mu=Vn(Eu),$u=_t({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:true},color:String,badgeStyle:{type:me([String,Object,Array,Boolean]),default:void 0},offset:{type:me(Array),default:()=>[0,0]},badgeClass:{type:me([String,Array,Object,Boolean]),default:void 0}});var Tu=ue({name:"ElBadge",__name:"badge",props:$u,setup(e,{expose:t}){const n=e,a=ft("badge"),o=M(()=>n.isDot?"":gt(n.value)&>(n.max)?n.max<n.value?`${n.max}+`:`${n.value}`:`${n.value}`),s=M(()=>[{backgroundColor:n.color,marginRight:rn(-n.offset[0]),marginTop:rn(n.offset[1])},n.badgeStyle??{}]);return t({content:o}),(l,i)=>(h(),L("div",{class:G(r(a).b())},[Ae(l.$slots,"default"),A(fa,{name:`${r(a).namespace.value}-zoom-in-center`},{default:P(()=>[!e.hidden&&(o.value||e.isDot||l.$slots.content)?(h(),L("sup",{key:0,class:G([r(a).e("content"),r(a).em("content",e.type),r(a).is("fixed",!!l.$slots.default),r(a).is("dot",e.isDot),r(a).is("hide-zero",!e.showZero&&e.value===0),e.badgeClass]),style:Je(s.value)},[Ae(l.$slots,"content",{value:o.value},()=>[ce(ae(o.value),1)])],6)):$("v-if",true)]),_:3},8,["name"])],2))}}),Iu=Tu;const Au=Vn(Iu),Lu=["default","primary","success","warning","info","danger","text",""],Ou=["button","submit","reset"],ia=_t({size:ya,disabled:{type:Boolean,default:void 0},type:{type:String,values:Lu,default:""},icon:{type:qt},nativeType:{type:String,values:Ou,default:"button"},loading:Boolean,loadingIcon:{type:qt,default:()=>Bt},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,dashed:{type:Boolean,default:void 0},color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:me([String,Object]),default:"button"}}),Pu={click:e=>e instanceof MouseEvent},pr=Symbol(),In=j();function ka(e,t=void 0){const n=ut()?Ke(pr,In):In;return e?M(()=>{var a;return((a=n.value)==null?void 0:a[e])??t}):n}function vr(e,t){const n=ka(),a=ft(e,M(()=>{var i;return((i=n.value)==null?void 0:i.namespace)||"el"})),o=Oc(M(()=>{var i;return(i=n.value)==null?void 0:i.locale})),s=Fc(M(()=>{var v;const i=(v=n.value)==null?void 0:v.zIndex;return nn(i)||Number.isNaN(i)?nr:i})),l=M(()=>{var i;return r(t)||((i=n.value)==null?void 0:i.size)||""});return hr(M(()=>r(n)||{})),{ns:a,locale:o,zIndex:s,size:l}}const hr=(e,t,n=false)=>{const a=!!ut(),o=a?ka():void 0,s=a?da:void 0;if(!s){vt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=M(()=>{const i=r(e);return o!=null&&o.value?Bu(o.value,i):i});return s(pr,l),s(Xo,M(()=>l.value.locale)),s(Jo,M(()=>l.value.namespace)),s(ar,M(()=>l.value.zIndex)),s(or,{size:M(()=>l.value.size||"")}),s(Gc,M(()=>({emptyValues:l.value.emptyValues,valueOnClear:l.value.valueOnClear}))),(n||!In.value)&&(In.value=l.value),l},Bu=(e,t)=>{const n=[...new Set([...Xa(e),...Xa(t)])],a={};for(const o of n)a[o]=t[o]!==void 0?t[o]:e[o];return a},zu=_t({a11y:{type:Boolean,default:true},locale:{type:me(Object)},size:ya,button:{type:me(Object)},card:{type:me(Object)},dialog:{type:me(Object)},link:{type:me(Object)},experimentalFeatures:{type:me(Object)},keyboardNavigation:{type:Boolean,default:true},message:{type:me(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:me(Object)},...Wc}),De={placement:"top"},_0=ue({name:"ElConfigProvider",props:zu,setup(e,{slots:t}){const n=hr(e);return Oe(()=>e.message,a=>{var o;Object.assign(De,((o=n==null?void 0:n.value)==null?void 0:o.message)??{},a??{})},{immediate:true,deep:true}),()=>Ae(t,"default",{config:n==null?void 0:n.value})}}),mr=Symbol("buttonGroupContextKey"),Du=(e,t)=>{gc({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},M(()=>e.type==="text"));const n=Ke(mr,void 0),a=ka("button"),{form:o}=cr(),s=ir(M(()=>n==null?void 0:n.size)),l=_a(),i=j(),v=Co(),u=M(()=>{var z;return e.type||(n==null?void 0:n.type)||((z=a.value)==null?void 0:z.type)||""}),T=M(()=>{var z;return e.autoInsertSpace??((z=a.value)==null?void 0:z.autoInsertSpace)??false}),C=M(()=>{var z;return e.plain??((z=a.value)==null?void 0:z.plain)??false}),O=M(()=>{var z;return e.round??((z=a.value)==null?void 0:z.round)??false}),f=M(()=>{var z;return e.text??((z=a.value)==null?void 0:z.text)??false}),g=M(()=>{var z;return e.dashed??((z=a.value)==null?void 0:z.dashed)??false}),m=M(()=>e.tag==="button"?{ariaDisabled:l.value||e.loading,disabled:l.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),y=M(()=>{var K;const z=(K=v.default)==null?void 0:K.call(v);if(T.value&&(z==null?void 0:z.length)===1){const ie=z[0];if((ie==null?void 0:ie.type)===Ir){const q=ie.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(q.trim())}}return false});return{_disabled:l,_size:s,_type:u,_ref:i,_props:m,_plain:C,_round:O,_text:f,_dashed:g,shouldAddSpace:y,handleClick:z=>{if(l.value||e.loading){z.stopPropagation();return}e.nativeType==="reset"&&(o==null||o.resetFields()),t("click",z)}}};function Pe(e,t){Vu(e)&&(e="100%");const n=Nu(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function bn(e){return Math.min(1,Math.max(0,e))}function Vu(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Nu(e){return typeof e=="string"&&e.indexOf("%")!==-1}function gr(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function yn(e){return Number(e)<=1?`${Number(e)*100}%`:e}function At(e){return e.length===1?"0"+e:String(e)}function Ru(e,t,n){return{r:Pe(e,255)*255,g:Pe(t,255)*255,b:Pe(n,255)*255}}function mo(e,t,n){e=Pe(e,255),t=Pe(t,255),n=Pe(n,255);const a=Math.max(e,t,n),o=Math.min(e,t,n);let s=0,l=0;const i=(a+o)/2;if(a===o)l=0,s=0;else{const v=a-o;switch(l=i>.5?v/(2-a-o):v/(a+o),a){case e:s=(t-n)/v+(t<n?6:0);break;case t:s=(n-e)/v+2;break;case n:s=(e-t)/v+4;break}s/=6}return{h:s,s:l,l:i}}function Yn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Hu(e,t,n){let a,o,s;if(e=Pe(e,360),t=Pe(t,100),n=Pe(n,100),t===0)o=n,s=n,a=n;else{const l=n<.5?n*(1+t):n+t-n*t,i=2*n-l;a=Yn(i,l,e+1/3),o=Yn(i,l,e),s=Yn(i,l,e-1/3)}return{r:a*255,g:o*255,b:s*255}}function go(e,t,n){e=Pe(e,255),t=Pe(t,255),n=Pe(n,255);const a=Math.max(e,t,n),o=Math.min(e,t,n);let s=0;const l=a,i=a-o,v=a===0?0:i/a;if(a===o)s=0;else{switch(a){case e:s=(t-n)/i+(t<n?6:0);break;case t:s=(n-e)/i+2;break;case n:s=(e-t)/i+4;break}s/=6}return{h:s,s:v,v:l}}function Fu(e,t,n){e=Pe(e,360)*6,t=Pe(t,100),n=Pe(n,100);const a=Math.floor(e),o=e-a,s=n*(1-t),l=n*(1-o*t),i=n*(1-(1-o)*t),v=a%6,u=[n,l,s,s,i,n][v],T=[i,n,n,l,s,s][v],C=[s,s,i,n,n,l][v];return{r:u*255,g:T*255,b:C*255}}function bo(e,t,n,a){const o=[At(Math.round(e).toString(16)),At(Math.round(t).toString(16)),At(Math.round(n).toString(16))];return a&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function ju(e,t,n,a,o){const s=[At(Math.round(e).toString(16)),At(Math.round(t).toString(16)),At(Math.round(n).toString(16)),At(qu(a))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function Uu(e,t,n,a){const o=e/100,s=t/100,l=n/100,i=a/100,v=255*(1-o)*(1-i),u=255*(1-s)*(1-i),T=255*(1-l)*(1-i);return{r:v,g:u,b:T}}function yo(e,t,n){let a=1-e/255,o=1-t/255,s=1-n/255,l=Math.min(a,o,s);return l===1?(a=0,o=0,s=0):(a=(a-l)/(1-l)*100,o=(o-l)/(1-l)*100,s=(s-l)/(1-l)*100),l*=100,{c:Math.round(a),m:Math.round(o),y:Math.round(s),k:Math.round(l)}}function qu(e){return Math.round(parseFloat(e)*255).toString(16)}function wo(e){return Xe(e)/255}function Xe(e){return parseInt(e,16)}function Ku(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}const ca={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Gu(e){let t={r:0,g:0,b:0},n=1,a=null,o=null,s=null,l=false,i=false;return typeof e=="string"&&(e=Zu(e)),typeof e=="object"&&(Ze(e.r)&&Ze(e.g)&&Ze(e.b)?(t=Ru(e.r,e.g,e.b),l=true,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ze(e.h)&&Ze(e.s)&&Ze(e.v)?(a=yn(e.s),o=yn(e.v),t=Fu(e.h,a,o),l=true,i="hsv"):Ze(e.h)&&Ze(e.s)&&Ze(e.l)?(a=yn(e.s),s=yn(e.l),t=Hu(e.h,a,s),l=true,i="hsl"):Ze(e.c)&&Ze(e.m)&&Ze(e.y)&&Ze(e.k)&&(t=Uu(e.c,e.m,e.y,e.k),l=true,i="cmyk"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=gr(n),{ok:l,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}const Wu="[-\\+]?\\d+%?",Yu="[-\\+]?\\d*\\.\\d+%?",St="(?:"+Yu+")|(?:"+Wu+")",Zn="[\\s|\\(]+("+St+")[,|\\s]+("+St+")[,|\\s]+("+St+")\\s*\\)?",wn="[\\s|\\(]+("+St+")[,|\\s]+("+St+")[,|\\s]+("+St+")[,|\\s]+("+St+")\\s*\\)?",tt={CSS_UNIT:new RegExp(St),rgb:new RegExp("rgb"+Zn),rgba:new RegExp("rgba"+wn),hsl:new RegExp("hsl"+Zn),hsla:new RegExp("hsla"+wn),hsv:new RegExp("hsv"+Zn),hsva:new RegExp("hsva"+wn),cmyk:new RegExp("cmyk"+wn),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Zu(e){if(e=e.trim().toLowerCase(),e.length===0)return false;let t=false;if(ca[e])e=ca[e],t=true;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=tt.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=tt.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=tt.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=tt.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=tt.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=tt.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=tt.cmyk.exec(e),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=tt.hex8.exec(e),n?{r:Xe(n[1]),g:Xe(n[2]),b:Xe(n[3]),a:wo(n[4]),format:t?"name":"hex8"}:(n=tt.hex6.exec(e),n?{r:Xe(n[1]),g:Xe(n[2]),b:Xe(n[3]),format:t?"name":"hex"}:(n=tt.hex4.exec(e),n?{r:Xe(n[1]+n[1]),g:Xe(n[2]+n[2]),b:Xe(n[3]+n[3]),a:wo(n[4]+n[4]),format:t?"name":"hex8"}:(n=tt.hex3.exec(e),n?{r:Xe(n[1]+n[1]),g:Xe(n[2]+n[2]),b:Xe(n[3]+n[3]),format:t?"name":"hex"}:false))))))))))}function Ze(e){return typeof e=="number"?!Number.isNaN(e):tt.CSS_UNIT.test(e)}class ke{constructor(t="",n={}){if(t instanceof ke)return t;typeof t=="number"&&(t=Ku(t)),this.originalInput=t;const a=Gu(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??a.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3}getLuminance(){const t=this.toRgb();let n,a,o;const s=t.r/255,l=t.g/255,i=t.b/255;return s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),l<=.03928?a=l/12.92:a=Math.pow((l+.055)/1.055,2.4),i<=.03928?o=i/12.92:o=Math.pow((i+.055)/1.055,2.4),.2126*n+.7152*a+.0722*o}getAlpha(){return this.a}setAlpha(t){return this.a=gr(t),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:t}=this.toHsl();return t===0}toHsv(){const t=go(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}}toHsvString(){const t=go(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?`hsv(${n}, ${a}%, ${o}%)`:`hsva(${n}, ${a}%, ${o}%, ${this.roundA})`}toHsl(){const t=mo(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}}toHslString(){const t=mo(this.r,this.g,this.b),n=Math.round(t.h*360),a=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?`hsl(${n}, ${a}%, ${o}%)`:`hsla(${n}, ${a}%, ${o}%, ${this.roundA})`}toHex(t=false){return bo(this.r,this.g,this.b,t)}toHexString(t=false){return"#"+this.toHex(t)}toHex8(t=false){return ju(this.r,this.g,this.b,this.a,t)}toHex8String(t=false){return"#"+this.toHex8(t)}toHexShortString(t=false){return this.a===1?this.toHexString(t):this.toHex8String(t)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const t=Math.round(this.r),n=Math.round(this.g),a=Math.round(this.b);return this.a===1?`rgb(${t}, ${n}, ${a})`:`rgba(${t}, ${n}, ${a}, ${this.roundA})`}toPercentageRgb(){const t=n=>`${Math.round(Pe(n,255)*100)}%`;return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}}toPercentageRgbString(){const t=n=>Math.round(Pe(n,255)*100);return this.a===1?`rgb(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%)`:`rgba(${t(this.r)}%, ${t(this.g)}%, ${t(this.b)}%, ${this.roundA})`}toCmyk(){return{...yo(this.r,this.g,this.b)}}toCmykString(){const{c:t,m:n,y:a,k:o}=yo(this.r,this.g,this.b);return`cmyk(${t}, ${n}, ${a}, ${o})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return false;const t="#"+bo(this.r,this.g,this.b,false);for(const[n,a]of Object.entries(ca))if(t===a)return n;return false}toString(t){const n=!!t;t=t??this.format;let a=false;const o=this.a<1&&this.a>=0;return!n&&o&&(t.startsWith("hex")||t==="name")?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(a=this.toRgbString()),t==="prgb"&&(a=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(a=this.toHexString()),t==="hex3"&&(a=this.toHexString(true)),t==="hex4"&&(a=this.toHex8String(true)),t==="hex8"&&(a=this.toHex8String()),t==="name"&&(a=this.toName()),t==="hsl"&&(a=this.toHslString()),t==="hsv"&&(a=this.toHsvString()),t==="cmyk"&&(a=this.toCmykString()),a||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new ke(this.toString())}lighten(t=10){const n=this.toHsl();return n.l+=t/100,n.l=bn(n.l),new ke(n)}brighten(t=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new ke(n)}darken(t=10){const n=this.toHsl();return n.l-=t/100,n.l=bn(n.l),new ke(n)}tint(t=10){return this.mix("white",t)}shade(t=10){return this.mix("black",t)}desaturate(t=10){const n=this.toHsl();return n.s-=t/100,n.s=bn(n.s),new ke(n)}saturate(t=10){const n=this.toHsl();return n.s+=t/100,n.s=bn(n.s),new ke(n)}greyscale(){return this.desaturate(100)}spin(t){const n=this.toHsl(),a=(n.h+t)%360;return n.h=a<0?360+a:a,new ke(n)}mix(t,n=50){const a=this.toRgb(),o=new ke(t).toRgb(),s=n/100,l={r:(o.r-a.r)*s+a.r,g:(o.g-a.g)*s+a.g,b:(o.b-a.b)*s+a.b,a:(o.a-a.a)*s+a.a};return new ke(l)}analogous(t=6,n=30){const a=this.toHsl(),o=360/n,s=[this];for(a.h=(a.h-(o*t>>1)+720)%360;--t;)a.h=(a.h+o)%360,s.push(new ke(a));return s}complement(){const t=this.toHsl();return t.h=(t.h+180)%360,new ke(t)}monochromatic(t=6){const n=this.toHsv(),{h:a}=n,{s:o}=n;let{v:s}=n;const l=[],i=1/t;for(;t--;)l.push(new ke({h:a,s:o,v:s})),s=(s+i)%1;return l}splitcomplement(){const t=this.toHsl(),{h:n}=t;return[this,new ke({h:(n+72)%360,s:t.s,l:t.l}),new ke({h:(n+216)%360,s:t.s,l:t.l})]}onBackground(t){const n=this.toRgb(),a=new ke(t).toRgb(),o=n.a+a.a*(1-n.a);return new ke({r:(n.r*n.a+a.r*a.a*(1-n.a))/o,g:(n.g*n.a+a.g*a.a*(1-n.a))/o,b:(n.b*n.a+a.b*a.a*(1-n.a))/o,a:o})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(t){const n=this.toHsl(),{h:a}=n,o=[this],s=360/t;for(let l=1;l<t;l++)o.push(new ke({h:(a+l*s)%360,s:n.s,l:n.l}));return o}equals(t){const n=new ke(t);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function lt(e,t=20){return e.mix("#141414",t).toString()}function Xu(e){const t=_a(),n=ft("button");return M(()=>{let a={},o=e.color;if(o){const s=o.match(/var\((.*?)\)/);s&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));const l=new ke(o),i=e.dark?l.tint(20).toString():lt(l,20);if(e.plain)a=n.cssVarBlock({"bg-color":e.dark?lt(l,90):l.tint(90).toString(),"text-color":o,"border-color":e.dark?lt(l,50):l.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":i,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":i}),t.value&&(a[n.cssVarBlockName("disabled-bg-color")]=e.dark?lt(l,90):l.tint(90).toString(),a[n.cssVarBlockName("disabled-text-color")]=e.dark?lt(l,50):l.tint(50).toString(),a[n.cssVarBlockName("disabled-border-color")]=e.dark?lt(l,80):l.tint(80).toString());else if(e.link||e.text){const v=e.dark?lt(l,30):l.tint(30).toString();if(a=n.cssVarBlock({"text-color":o,"hover-text-color":v,"active-text-color":i}),e.link&&(a[n.cssVarBlockName("hover-link-text-color")]=v,a[n.cssVarBlockName("active-color")]=i),t.value){const u=e.dark?lt(l,50):l.tint(50).toString();a[n.cssVarBlockName("disabled-bg-color")]="transparent",a[n.cssVarBlockName("disabled-text-color")]=u,a[n.cssVarBlockName("disabled-border-color")]="transparent"}}else{const v=e.dark?lt(l,30):l.tint(30).toString(),u=l.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(a=n.cssVarBlock({"bg-color":o,"text-color":u,"border-color":o,"hover-bg-color":v,"hover-text-color":u,"hover-border-color":v,"active-bg-color":i,"active-border-color":i}),t.value){const T=e.dark?lt(l,50):l.tint(50).toString();a[n.cssVarBlockName("disabled-bg-color")]=T,a[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,a[n.cssVarBlockName("disabled-border-color")]=T}}}return a})}var Ju=ue({name:"ElButton",__name:"button",props:ia,emits:Pu,setup(e,{expose:t,emit:n}){const a=e,o=n,s=Xu(a),l=ft("button"),{_ref:i,_size:v,_type:u,_disabled:T,_props:C,_plain:O,_round:f,_text:g,_dashed:m,shouldAddSpace:y,handleClick:B}=Du(a,o),z=M(()=>[l.b(),l.m(u.value),l.m(v.value),l.is("disabled",T.value),l.is("loading",a.loading),l.is("plain",O.value),l.is("round",f.value),l.is("circle",a.circle),l.is("text",g.value),l.is("dashed",m.value),l.is("link",a.link),l.is("has-bg",a.bg)]);return t({ref:i,size:v,type:u,disabled:T,shouldAddSpace:y}),(K,ie)=>(h(),J(Ue(e.tag),kn({ref_key:"_ref",ref:i},r(C),{class:z.value,style:r(s),onClick:r(B)}),{default:P(()=>[e.loading?(h(),L(Me,{key:0},[K.$slots.loading?Ae(K.$slots,"loading",{key:0}):(h(),J(r(at),{key:1,class:G(r(l).is("loading"))},{default:P(()=>[(h(),J(Ue(e.loadingIcon)))]),_:1},8,["class"]))],64)):e.icon||K.$slots.icon?(h(),J(r(at),{key:1},{default:P(()=>[e.icon?(h(),J(Ue(e.icon),{key:0})):Ae(K.$slots,"icon",{key:1})]),_:3})):$("v-if",true),K.$slots.default?(h(),L("span",{key:2,class:G({[r(l).em("text","expand")]:r(y)})},[Ae(K.$slots,"default")],2)):$("v-if",true)]),_:3},16,["class","style","onClick"]))}}),Qu=Ju;const ed={size:ia.size,type:ia.type,direction:{type:me(String),values:["horizontal","vertical"],default:"horizontal"}};var td=ue({name:"ElButtonGroup",__name:"button-group",props:ed,setup(e){const t=e;da(mr,Ut({size:Sn(t,"size"),type:Sn(t,"type")}));const n=ft("button");return(a,o)=>(h(),L("div",{class:G([r(n).b("group"),r(n).bm("group",t.direction)])},[Ae(a.$slots,"default")],2))}}),br=td;const nd=Vn(Qu,{ButtonGroup:br}),x0=Jc(br);var ad=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var Xn={exports:{}},_o;function od(){return _o||(_o=1,function(e,t){(function(n,a){e.exports=a()})(ad,function(){var n=1e3,a=6e4,o=36e5,s="millisecond",l="second",i="minute",v="hour",u="day",T="week",C="month",O="quarter",f="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,B=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,z={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(H){var w=["th","st","nd","rd"],k=H%100;return"["+H+(w[(k-20)%10]||w[k]||w[0])+"]"}},K=function(H,w,k){var F=String(H);return!F||F.length>=w?H:""+Array(w+1-F.length).join(k)+H},ie={s:K,z:function(H){var w=-H.utcOffset(),k=Math.abs(w),F=Math.floor(k/60),I=k%60;return(w<=0?"+":"-")+K(F,2,"0")+":"+K(I,2,"0")},m:function H(w,k){if(w.date()<k.date())return-H(k,w);var F=12*(k.year()-w.year())+(k.month()-w.month()),I=w.clone().add(F,C),X=k-I<0,W=w.clone().add(F+(X?-1:1),C);return+(-(F+(k-I)/(X?I-W:W-I))||0)},a:function(H){return H<0?Math.ceil(H)||0:Math.floor(H)},p:function(H){return{M:C,y:f,w:T,d:u,D:g,h:v,m:i,s:l,ms:s,Q:O}[H]||String(H||"").toLowerCase().replace(/s$/,"")},u:function(H){return H===void 0}},q="en",S={};S[q]=z;var E="$isDayjsObject",Z=function(H){return H instanceof Q||!(!H||!H[E])},D=function H(w,k,F){var I;if(!w)return q;if(typeof w=="string"){var X=w.toLowerCase();S[X]&&(I=X),k&&(S[X]=k,I=X);var W=w.split("-");if(!I&&W.length>1)return H(W[0])}else{var le=w.name;S[le]=w,I=le}return!F&&I&&(q=I),I||!F&&q},N=function(H,w){if(Z(H))return H.clone();var k=typeof w=="object"?w:{};return k.date=H,k.args=arguments,new Q(k)},U=ie;U.l=D,U.i=Z,U.w=function(H,w){return N(H,{locale:w.$L,utc:w.$u,x:w.$x,$offset:w.$offset})};var Q=function(){function H(k){this.$L=D(k.locale,null,true),this.parse(k),this.$x=this.$x||k.x||{},this[E]=true}var w=H.prototype;return w.parse=function(k){this.$d=function(F){var I=F.date,X=F.utc;if(I===null)return new Date(NaN);if(U.u(I))return new Date;if(I instanceof Date)return new Date(I);if(typeof I=="string"&&!/Z$/i.test(I)){var W=I.match(y);if(W){var le=W[2]-1||0,pe=(W[7]||"0").substring(0,3);return X?new Date(Date.UTC(W[1],le,W[3]||1,W[4]||0,W[5]||0,W[6]||0,pe)):new Date(W[1],le,W[3]||1,W[4]||0,W[5]||0,W[6]||0,pe)}}return new Date(I)}(k),this.init()},w.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},w.$utils=function(){return U},w.isValid=function(){return this.$d.toString()!==m},w.isSame=function(k,F){var I=N(k);return this.startOf(F)<=I&&I<=this.endOf(F)},w.isAfter=function(k,F){return N(k)<this.startOf(F)},w.isBefore=function(k,F){return this.endOf(F)<N(k)},w.$g=function(k,F,I){return U.u(k)?this[F]:this.set(I,k)},w.unix=function(){return Math.floor(this.valueOf()/1e3)},w.valueOf=function(){return this.$d.getTime()},w.startOf=function(k,F){var I=this,X=!!U.u(F)||F,W=U.p(k),le=function(Ye,Se){var Re=U.w(I.$u?Date.UTC(I.$y,Se,Ye):new Date(I.$y,Se,Ye),I);return X?Re:Re.endOf(u)},pe=function(Ye,Se){return U.w(I.toDate()[Ye].apply(I.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(Se)),I)},oe=this.$W,ge=this.$M,_e=this.$D,Ne="set"+(this.$u?"UTC":"");switch(W){case f:return X?le(1,0):le(31,11);case C:return X?le(1,ge):le(0,ge+1);case T:var xe=this.$locale().weekStart||0,We=(oe<xe?oe+7:oe)-xe;return le(X?_e-We:_e+(6-We),ge);case u:case g:return pe(Ne+"Hours",0);case v:return pe(Ne+"Minutes",1);case i:return pe(Ne+"Seconds",2);case l:return pe(Ne+"Milliseconds",3);default:return this.clone()}},w.endOf=function(k){return this.startOf(k,false)},w.$set=function(k,F){var I,X=U.p(k),W="set"+(this.$u?"UTC":""),le=(I={},I[u]=W+"Date",I[g]=W+"Date",I[C]=W+"Month",I[f]=W+"FullYear",I[v]=W+"Hours",I[i]=W+"Minutes",I[l]=W+"Seconds",I[s]=W+"Milliseconds",I)[X],pe=X===u?this.$D+(F-this.$W):F;if(X===C||X===f){var oe=this.clone().set(g,1);oe.$d[le](pe),oe.init(),this.$d=oe.set(g,Math.min(this.$D,oe.daysInMonth())).$d}else le&&this.$d[le](pe);return this.init(),this},w.set=function(k,F){return this.clone().$set(k,F)},w.get=function(k){return this[U.p(k)]()},w.add=function(k,F){var I,X=this;k=Number(k);var W=U.p(F),le=function(ge){var _e=N(X);return U.w(_e.date(_e.date()+Math.round(ge*k)),X)};if(W===C)return this.set(C,this.$M+k);if(W===f)return this.set(f,this.$y+k);if(W===u)return le(1);if(W===T)return le(7);var pe=(I={},I[i]=a,I[v]=o,I[l]=n,I)[W]||1,oe=this.$d.getTime()+k*pe;return U.w(oe,this)},w.subtract=function(k,F){return this.add(-1*k,F)},w.format=function(k){var F=this,I=this.$locale();if(!this.isValid())return I.invalidDate||m;var X=k||"YYYY-MM-DDTHH:mm:ssZ",W=U.z(this),le=this.$H,pe=this.$m,oe=this.$M,ge=I.weekdays,_e=I.months,Ne=I.meridiem,xe=function(Se,Re,He,nt){return Se&&(Se[Re]||Se(F,X))||He[Re].slice(0,nt)},We=function(Se){return U.s(le%12||12,Se,"0")},Ye=Ne||function(Se,Re,He){var nt=Se<12?"AM":"PM";return He?nt.toLowerCase():nt};return X.replace(B,function(Se,Re){return Re||function(He){switch(He){case"YY":return String(F.$y).slice(-2);case"YYYY":return U.s(F.$y,4,"0");case"M":return oe+1;case"MM":return U.s(oe+1,2,"0");case"MMM":return xe(I.monthsShort,oe,_e,3);case"MMMM":return xe(_e,oe);case"D":return F.$D;case"DD":return U.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return xe(I.weekdaysMin,F.$W,ge,2);case"ddd":return xe(I.weekdaysShort,F.$W,ge,3);case"dddd":return ge[F.$W];case"H":return String(le);case"HH":return U.s(le,2,"0");case"h":return We(1);case"hh":return We(2);case"a":return Ye(le,pe,true);case"A":return Ye(le,pe,false);case"m":return String(pe);case"mm":return U.s(pe,2,"0");case"s":return String(F.$s);case"ss":return U.s(F.$s,2,"0");case"SSS":return U.s(F.$ms,3,"0");case"Z":return W}return null}(Se)||W.replace(":","")})},w.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},w.diff=function(k,F,I){var X,W=this,le=U.p(F),pe=N(k),oe=(pe.utcOffset()-this.utcOffset())*a,ge=this-pe,_e=function(){return U.m(W,pe)};switch(le){case f:X=_e()/12;break;case C:X=_e();break;case O:X=_e()/3;break;case T:X=(ge-oe)/6048e5;break;case u:X=(ge-oe)/864e5;break;case v:X=ge/o;break;case i:X=ge/a;break;case l:X=ge/n;break;default:X=ge}return I?X:U.a(X)},w.daysInMonth=function(){return this.endOf(C).$D},w.$locale=function(){return S[this.$L]},w.locale=function(k,F){if(!k)return this.$L;var I=this.clone(),X=D(k,F,true);return X&&(I.$L=X),I},w.clone=function(){return U.w(this.$d,this)},w.toDate=function(){return new Date(this.valueOf())},w.toJSON=function(){return this.isValid()?this.toISOString():null},w.toISOString=function(){return this.$d.toISOString()},w.toString=function(){return this.$d.toUTCString()},H}(),Y=Q.prototype;return N.prototype=Y,[["$ms",s],["$s",l],["$m",i],["$H",v],["$W",u],["$M",C],["$y",f],["$D",g]].forEach(function(H){Y[H[1]]=function(w){return this.$g(w,H[0],H[1])}}),N.extend=function(H,w){return H.$i||(H(w,Q,N),H.$i=true),N},N.locale=D,N.isDayjs=Z,N.unix=function(H){return N(1e3*H)},N.en=S[q],N.Ls=S,N.p={},N})}(Xn)),Xn.exports}var C0=od();const ua="_trap-focus-children",Lt=[],xo=e=>{if(Lt.length===0)return;const t=Dn(e),n=Lt[Lt.length-1][ua];if(n.length>0&&t===Kt.tab){if(n.length===1){e.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const a=e.shiftKey,o=e.target===n[0],s=e.target===n[n.length-1];o&&a&&(e.preventDefault(),n[n.length-1].focus()),s&&!a&&(e.preventDefault(),n[0].focus())}},rd={beforeMount(e){e[ua]=Qa(e),Lt.push(e),Lt.length<=1&&document.addEventListener("keydown",xo)},updated(e){we(()=>{e[ua]=Qa(e)})},unmounted(){Lt.shift(),Lt.length===0&&document.removeEventListener("keydown",xo)}},sd=_t({mask:{type:Boolean,default:true},customMaskEvent:Boolean,overlayClass:{type:me([String,Array,Object,Boolean]),default:void 0},zIndex:{type:me([String,Number])}}),ld={click:e=>e instanceof MouseEvent},id="overlay";var cd=ue({name:"ElOverlay",props:sd,emits:ld,setup(e,{slots:t,emit:n}){const a=ft(id),o=v=>{n("click",v)},{onClick:s,onMousedown:l,onMouseup:i}=tr(e.customMaskEvent?void 0:o);return()=>e.mask?A("div",{class:[a.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:s,onMousedown:l,onMouseup:i},[Ae(t,"default")],14,["onClick","onMouseup","onMousedown"]):ve("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[Ae(t,"default")])}});const ud=cd,dd=e=>["",...To].includes(e),yr=["primary","success","info","warning","error"],wr=["top","top-left","top-right","bottom","bottom-left","bottom-right"],ze=fr({customClass:"",dangerouslyUseHTMLString:false,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:false,type:"info",plain:false,offset:16,placement:void 0,zIndex:0,grouping:false,repeatNum:1,appendTo:Ge?document.body:void 0}),fd=_t({customClass:{type:me([String,Array,Object,Boolean]),default:ze.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ze.dangerouslyUseHTMLString},duration:{type:Number,default:ze.duration},icon:{type:qt,default:ze.icon},id:{type:String,default:ze.id},message:{type:me([String,Object,Function]),default:ze.message},onClose:{type:me(Function),default:ze.onClose},showClose:{type:Boolean,default:ze.showClose},type:{type:String,values:yr,default:ze.type},plain:{type:Boolean,default:ze.plain},offset:{type:Number,default:ze.offset},placement:{type:String,values:wr,default:ze.placement},zIndex:{type:Number,default:ze.zIndex},grouping:{type:Boolean,default:ze.grouping},repeatNum:{type:Number,default:ze.repeatNum}}),pd={destroy:()=>true},ot=ko({}),vd=e=>(ot[e]||(ot[e]=ko([])),ot[e]),hd=(e,t)=>{const n=ot[t]||[],a=n.findIndex(l=>l.id===e),o=n[a];let s;return a>0&&(s=n[a-1]),{current:o,prev:s}},md=(e,t)=>{const{prev:n}=hd(e,t);return n?n.vm.exposed.bottom.value:0},gd=(e,t,n)=>(ot[n]||[]).findIndex(a=>a.id===e)>0?16:t,bd=["id"],yd=["innerHTML"];var wd=ue({name:"ElMessage",__name:"message",props:fd,emits:pd,setup(e,{expose:t,emit:n}){const{Close:a}=sr,o=e,s=n,l=j(false),{ns:i,zIndex:v}=vr("message"),{currentZIndex:u,nextZIndex:T}=v,C=j(),O=j(false),f=j(0);let g;const m=M(()=>o.type?o.type==="error"?"danger":o.type:"info"),y=M(()=>{const Y=o.type;return{[i.bm("icon",Y)]:Y&&Tn[Y]}}),B=M(()=>o.icon||Tn[o.type]||""),z=M(()=>o.placement||"top"),K=M(()=>md(o.id,z.value)),ie=M(()=>Math.max(gd(o.id,o.offset,z.value)+K.value,o.offset)),q=M(()=>f.value+ie.value),S=M(()=>z.value.includes("left")?i.is("left"):z.value.includes("right")?i.is("right"):i.is("center")),E=M(()=>z.value.startsWith("top")?"top":"bottom"),Z=M(()=>({[E.value]:`${ie.value}px`,zIndex:u.value}));function D(){o.duration!==0&&({stop:g}=Or(()=>{U()},o.duration))}function N(){g==null||g()}function U(){O.value=false,we(()=>{var Y;l.value||((Y=o.onClose)==null||Y.call(o),s("destroy"))})}function Q(Y){Dn(Y)===Kt.esc&&U()}return pt(()=>{D(),T(),O.value=true}),Oe(()=>o.repeatNum,()=>{N(),D()}),xn(document,"keydown",Q),So(C,()=>{f.value=C.value.getBoundingClientRect().height}),t({visible:O,bottom:q,close:U}),(Y,H)=>(h(),J(fa,{name:r(i).b("fade"),onBeforeEnter:H[0]||(H[0]=w=>l.value=true),onBeforeLeave:e.onClose,onAfterLeave:H[1]||(H[1]=w=>Y.$emit("destroy")),persisted:""},{default:P(()=>[Ot(b("div",{id:e.id,ref_key:"messageRef",ref:C,class:G([r(i).b(),{[r(i).m(e.type)]:e.type},r(i).is("closable",e.showClose),r(i).is("plain",e.plain),r(i).is("bottom",E.value==="bottom"),S.value,e.customClass]),style:Je(Z.value),role:"alert",onMouseenter:N,onMouseleave:D},[e.repeatNum>1?(h(),J(r(Au),{key:0,value:e.repeatNum,type:m.value,class:G(r(i).e("badge"))},null,8,["value","type","class"])):$("v-if",true),B.value?(h(),J(r(at),{key:1,class:G([r(i).e("icon"),y.value])},{default:P(()=>[(h(),J(Ue(B.value)))]),_:1},8,["class"])):$("v-if",true),!e.dangerouslyUseHTMLString||Y.$slots.default?(h(),L("p",{key:2,class:G(r(i).e("content"))},[Ae(Y.$slots,"default",{},()=>[ce(ae(e.message),1)])],2)):(h(),L(Me,{key:3},[$(" Caution here, message could've been compromised, never use user's input as message "),b("p",{class:G(r(i).e("content")),innerHTML:e.message},null,10,yd)],2112)),e.showClose?(h(),J(r(at),{key:4,class:G(r(i).e("closeBtn")),onClick:Ve(U,["stop"])},{default:P(()=>[A(r(a))]),_:1},8,["class"])):$("v-if",true)],46,bd),[[Pt,O.value]])]),_:3},8,["name","onBeforeLeave"]))}}),_d=wd;let xd=1;const Cd=e=>{if(!e.appendTo)e.appendTo=document.body;else if(Qe(e.appendTo)){let t=document.querySelector(e.appendTo);ra(t)||(vt("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},kd=e=>{!e.placement&&Qe(De.placement)&&De.placement&&(e.placement=De.placement),e.placement||(e.placement="top"),wr.includes(e.placement)||(vt("ElMessage",`Invalid placement: ${e.placement}. Falling back to 'top'.`),e.placement="top")},_r=e=>{const t=!e||Qe(e)||Ln(e)||mt(e)?{message:e}:e,n={...ze,...t};return Cd(n),kd(n),Kn(De.grouping)&&!n.grouping&&(n.grouping=De.grouping),gt(De.duration)&&n.duration===3e3&&(n.duration=De.duration),gt(De.offset)&&n.offset===16&&(n.offset=De.offset),Kn(De.showClose)&&!n.showClose&&(n.showClose=De.showClose),Kn(De.plain)&&!n.plain&&(n.plain=De.plain),n},Sd=e=>{const t=ot[e.props.placement||"top"],n=t.indexOf(e);if(n===-1)return;t.splice(n,1);const{handler:a}=e;a.close()},Ed=({appendTo:e,...t},n)=>{const a=`message_${xd++}`,o=t.onClose,s=document.createElement("div"),l={...t,id:a,onClose:()=>{o==null||o(),Sd(u)},onDestroy:()=>{Mn(null,s)}},i=A(_d,l,mt(l.message)||Ln(l.message)?{default:mt(l.message)?l.message:()=>l.message}:null);i.appContext=n||Dt._context,Mn(i,s),e.appendChild(s.firstElementChild);const v=i.component,u={id:a,vnode:i,vm:v,handler:{close:()=>{v.exposed.close()}},props:i.component.props};return u},Dt=(e={},t)=>{if(!Ge)return{close:()=>{}};const n=_r(e),a=vd(n.placement||"top");if(n.grouping&&a.length){const s=a.find(({vnode:l})=>{var i;return((i=l.props)==null?void 0:i.message)===n.message});if(s)return s.props.repeatNum+=1,s.props.type=n.type,s.handler}if(gt(De.max)&&a.length>=De.max)return{close:()=>{}};const o=Ed(n,t);return a.push(o),o.handler};yr.forEach(e=>{Dt[e]=(t={},n)=>Dt({..._r(t),type:e},n)});function Md(e){for(const t in ot)if(Gt(ot,t)){const n=[...ot[t]];for(const a of n)(!e||e===a.props.type)&&a.handler.close()}}function $d(e){ot[e]&&[...ot[e]].forEach(t=>t.handler.close())}Dt.closeAll=Md;Dt.closeAllByPlacement=$d;Dt._context=null;const it=Xc(Dt,"$message");var Td=ue({name:"ElMessageBox",directives:{TrapFocus:rd},components:{ElButton:nd,ElFocusTrap:gu,ElInput:Mu,ElOverlay:ud,ElIcon:at,...sr},inheritAttrs:false,props:{buttonSize:{type:String,validator:dd},modal:{type:Boolean,default:true},lockScroll:{type:Boolean,default:true},showClose:{type:Boolean,default:true},closeOnClickModal:{type:Boolean,default:true},closeOnPressEscape:{type:Boolean,default:true},closeOnHashChange:{type:Boolean,default:true},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:a,ns:o,size:s}=vr("message-box",M(()=>e.buttonSize)),{t:l}=n,{nextZIndex:i}=a,v=j(false),u=Ut({autofocus:true,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:false,distinguishCancelAndClose:false,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:true,modalClass:"",showCancelButton:false,showConfirmButton:true,type:"",title:void 0,showInput:false,action:"",confirmButtonLoading:false,cancelButtonLoading:false,confirmButtonLoadingIcon:En(Bt),cancelButtonLoadingIcon:En(Bt),confirmButtonDisabled:false,editorErrorMessage:"",validateError:false,zIndex:i()}),T=M(()=>{const w=u.type;return{[o.bm("icon",w)]:w&&Tn[w]}}),C=la(),O=la(),f=M(()=>{const w=u.type;return u.icon||w&&Tn[w]||""}),g=M(()=>!!u.message),m=j(),y=j(),B=j(),z=j(),K=j(),ie=M(()=>u.confirmButtonClass);Oe(()=>u.inputValue,async w=>{await we(),e.boxType==="prompt"&&w&&U()},{immediate:true}),Oe(()=>v.value,w=>{var k;w&&(e.boxType!=="prompt"&&(u.autofocus?B.value=((k=K.value)==null?void 0:k.$el)??m.value:B.value=m.value),u.zIndex=i()),e.boxType==="prompt"&&(w?we().then(()=>{z.value&&z.value.$el&&(u.autofocus?B.value=Q()??m.value:B.value=m.value)}):(u.editorErrorMessage="",u.validateError=false))});const{isDragging:q}=$c(m,y,M(()=>e.draggable),M(()=>e.overflow));pt(async()=>{await we(),e.closeOnHashChange&&window.addEventListener("hashchange",S)}),Zt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",S)});function S(){v.value&&(v.value=false,we(()=>{u.action&&t("action",u.action)}))}const E=()=>{e.closeOnClickModal&&N(u.distinguishCancelAndClose?"close":"cancel")},Z=tr(E),D=w=>{var k;if(u.inputType!=="textarea"&&!((k=z.value)!=null&&k.isComposing))return w.preventDefault(),N("confirm")},N=w=>{var k;e.boxType==="prompt"&&w==="confirm"&&!U()||(u.action=w,u.beforeClose?(k=u.beforeClose)==null||k.call(u,w,u,S):S())},U=()=>{if(e.boxType==="prompt"){const w=u.inputPattern;if(w&&!w.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||l("el.messagebox.error"),u.validateError=true,false;const k=u.inputValidator;if(mt(k)){const F=k(u.inputValue);if(F===false)return u.editorErrorMessage=u.inputErrorMessage||l("el.messagebox.error"),u.validateError=true,false;if(Qe(F))return u.editorErrorMessage=F,u.validateError=true,false}}return u.editorErrorMessage="",u.validateError=false,true},Q=()=>{var k;const w=(k=z.value)==null?void 0:k.$refs;return(w==null?void 0:w.input)??(w==null?void 0:w.textarea)},Y=()=>{N("close")},H=()=>{e.closeOnPressEscape&&Y()};return e.lockScroll&&Dc(v,{ns:o}),{...Ar(u),ns:o,overlayEvent:Z,visible:v,hasMessage:g,typeClass:T,contentId:C,inputId:O,btnSize:s,iconComponent:f,confirmButtonClasses:ie,rootRef:m,focusStartRef:B,headerRef:y,inputRef:z,isDragging:q,confirmRef:K,doClose:S,handleClose:Y,onCloseRequested:H,handleWrapperClick:E,handleInputEnter:D,handleAction:N,t:l}}});const Id=["aria-label","aria-describedby"],Ad=["aria-label"],Ld=["id"];function Od(e,t,n,a,o,s){const l=$e("el-icon"),i=$e("el-input"),v=$e("el-button"),u=$e("el-focus-trap"),T=$e("el-overlay");return h(),J(fa,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=C=>e.$emit("vanish")),persisted:""},{default:P(()=>[Ot(A(T,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:P(()=>[b("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:G(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...C)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...C)),onMousedown:t[9]||(t[9]=(...C)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...C)),onMouseup:t[10]||(t[10]=(...C)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...C))},[A(u,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:P(()=>[b("div",{ref:"rootRef",class:G([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:Je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Ve(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(h(),L("div",{key:0,ref:"headerRef",class:G([e.ns.e("header"),{"show-close":e.showClose}])},[b("div",{class:G(e.ns.e("title"))},[e.iconComponent&&e.center?(h(),J(l,{key:0,class:G([e.ns.e("status"),e.typeClass])},{default:P(()=>[(h(),J(Ue(e.iconComponent)))]),_:1},8,["class"])):$("v-if",true),b("span",null,ae(e.title),1)],2),e.showClose?(h(),L("button",{key:0,type:"button",class:G(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=C=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=en(Ve(C=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[A(l,{class:G(e.ns.e("close"))},{default:P(()=>[(h(),J(Ue(e.closeIcon||"close")))]),_:1},8,["class"])],42,Ad)):$("v-if",true)],2)):$("v-if",true),b("div",{id:e.contentId,class:G(e.ns.e("content"))},[b("div",{class:G(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(h(),J(l,{key:0,class:G([e.ns.e("status"),e.typeClass])},{default:P(()=>[(h(),J(Ue(e.iconComponent)))]),_:1},8,["class"])):$("v-if",true),e.hasMessage?(h(),L("div",{key:1,class:G(e.ns.e("message"))},[Ae(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(h(),J(Ue(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(h(),J(Ue(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:ae(e.message)},null,8,["for","textContent"]))])],2)):$("v-if",true)],2),Ot(b("div",{class:G(e.ns.e("input"))},[A(i,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=C=>e.inputValue=C),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:G({invalid:e.validateError}),onKeydown:en(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),b("div",{class:G(e.ns.e("errormsg")),style:Je({visibility:e.editorErrorMessage?"visible":"hidden"})},ae(e.editorErrorMessage),7)],2),[[Pt,e.showInput]])],10,Ld),e.showCancelButton||e.showConfirmButton?(h(),L("div",{key:1,class:G(e.ns.e("btns"))},[e.showCancelButton?(h(),J(v,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:G([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=C=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=en(Ve(C=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:P(()=>[ce(ae(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):$("v-if",true),Ot(A(v,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:G([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=C=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=en(Ve(C=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:P(()=>[ce(ae(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[Pt,e.showConfirmButton]])],2)):$("v-if",true)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,Id)]),_:3},8,["z-index","overlay-class","mask"]),[[Pt,e.visible]])]),_:3})}var Pd=dr(Td,[["render",Od]]);const sn=new Map,Bd=e=>{let t=document.body;return e.appendTo&&(Qe(e.appendTo)&&(t=document.querySelector(e.appendTo)),ra(e.appendTo)&&(t=e.appendTo),ra(t)||(vt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},Jn=(e,t)=>{var a;const n=(a=e.component)==null?void 0:a.proxy;return()=>n.handleAction(t)},zd=(e,t,n=null)=>{const a=A(Pd,e,mt(e.message)||Ln(e.message)?{default:mt(e.message)?()=>e.message({confirm:Jn(a,"confirm"),cancel:Jn(a,"cancel"),close:Jn(a,"close")}):()=>e.message}:null);return a.appContext=n,Mn(a,t),Bd(e).appendChild(t.firstElementChild),a.component},Dd=()=>document.createElement("div"),Vd=(e,t)=>{const n=Dd();e.onVanish=()=>{Mn(null,n),sn.delete(o)},e.onAction=s=>{const l=sn.get(o);let i;e.showInput?i={value:o.inputValue,action:s}:i=s,e.callback?e.callback(i,a.proxy):s==="cancel"||s==="close"?e.distinguishCancelAndClose&&s!=="cancel"?l.reject("close"):l.reject("cancel"):l.resolve(i)};const a=zd(e,n,t),o=a.proxy;for(const s in e)Gt(e,s)&&!Gt(o.$props,s)&&(s==="closeIcon"&&Wt(e[s])?o[s]=En(e[s]):o[s]=e[s]);return o.visible=true,o};function Xt(e,t=null){if(!Ge)return Promise.reject();let n;return Qe(e)||Ln(e)?e={message:e}:n=e.callback,new Promise((a,o)=>{const s=Vd(e,t??Xt._context);sn.set(s,{options:e,callback:n,resolve:a,reject:o})})}const Nd=["alert","confirm","prompt"],Rd={alert:{closeOnPressEscape:false,closeOnClickModal:false},confirm:{showCancelButton:true},prompt:{showCancelButton:true,showInput:true}};Nd.forEach(e=>{Xt[e]=Hd(e)});function Hd(e){return(t,n,a,o)=>{let s="";return Wt(n)?(a=n,s=""):cc(n)?s="":s=n,Xt(Object.assign({title:s,message:t,type:"",...Rd[e]},a,{boxType:e}),o)}}Xt.close=()=>{sn.forEach((e,t)=>{t.doClose()}),sn.clear()};Xt._context=null;const kt=Xt;kt.install=e=>{kt._context=e._context,e.config.globalProperties.$msgbox=kt,e.config.globalProperties.$messageBox=kt,e.config.globalProperties.$alert=kt.alert,e.config.globalProperties.$confirm=kt.confirm,e.config.globalProperties.$prompt=kt.prompt};const Fd=kt;function jd(){const e=j({bots:{},channels:{},messages:{}}),t=j({maxMessagesPerChannel:1e3,loggerinfo:false,blockedPlatforms:[],chatContainerHeight:80,clearIndexedDBOnStart:true}),n=j(new Set),a=j(new Set),o=j({}),s=M(()=>Object.values(e.value.bots).sort((f,g)=>{const m=n.value.has(f.selfId),y=n.value.has(g.selfId);return m===y?0:m?-1:1})),l=f=>!f||!e.value.channels[f]?[]:Object.values(e.value.channels[f]).sort((g,m)=>{const y=a.value.has(`${f}:${g.id}`),B=a.value.has(`${f}:${m.id}`);return y===B?0:y?-1:1}),i=(f,g)=>{const m=`${f}:${g}`;return e.value.messages[m]||[]},v=(f,g)=>{const m=`${f}:${g}`;return o.value[m]||{offset:0,hasMore:true}};async function u(){const f=await qe("get-chat-data");f.success&&f.data&&(e.value={bots:f.data.bots||{},channels:f.data.channels||{},messages:f.data.messages||{}},n.value=new Set(f.data.pinnedBots||[]),a.value=new Set(f.data.pinnedChannels||[]))}async function T(){const f=await qe("get-plugin-config");f.success&&f.config&&(t.value=f.config)}function C(f){var K,ie;const g=f.selfId,m=f.channelId,y=`${g}:${m}`;if(e.value.bots[g]||(e.value.bots[g]={selfId:g,platform:f.platform||"unknown",username:((K=f.bot)==null?void 0:K.name)||`Bot-${g}`,avatar:(ie=f.bot)==null?void 0:ie.avatar,status:"online"}),e.value.channels[g]||(e.value.channels[g]={}),!e.value.channels[g][m]){const q=f.isDirect||m.includes("private");e.value.channels[g][m]={id:m,name:q?`私聊(${f.username||m})`:f.guildName||m,type:f.channelType||0,isDirect:q}}e.value.messages[y]||(e.value.messages[y]=[]);const B=e.value.messages[y];if(!B.some(q=>!!(q.id===f.messageId||q.id===f.id||(f.type==="bot-message"||f.type==="bot-message-sent"||f.type==="bot")&&q.isBot&&Math.abs(q.timestamp-f.timestamp)<2e3&&q.content===f.content))){const q={id:f.messageId||f.id,content:f.content,userId:f.userId,username:f.username,avatar:f.avatar,timestamp:f.timestamp,channelId:m,selfId:g,elements:f.elements,isBot:f.isBot||f.type==="bot-message"||f.type==="bot",quote:f.quote};B.push(q),B.sort((S,E)=>S.timestamp-E.timestamp)}e.value={...e.value}}async function O(f,g,m=50){const y=`${f}:${g}`,B=v(f,g);if(!B.hasMore)return;const z=await qe("get-history-messages",{selfId:f,channelId:g,limit:m,offset:B.offset});if(z.success&&z.messages){e.value.messages[y]||(e.value.messages[y]=[]);const K=e.value.messages[y],ie=z.messages.filter(q=>!K.find(S=>S.id===q.id));return e.value.messages[y]=[...ie,...K].sort((q,S)=>q.timestamp-S.timestamp),o.value[y]={offset:B.offset+z.messages.length,hasMore:z.messages.length>=m&&z.total>B.offset+z.messages.length},e.value={...e.value},z.messages.length}return 0}return{chatData:e,pluginConfig:t,pinnedBots:n,pinnedChannels:a,bots:s,getChannels:l,getMessages:i,getPagination:v,loadInitialData:u,loadConfig:T,addMessage:C,loadHistory:O}}function Ud(){const e=j(false);async function t(i,v,u,T){if(!e.value){e.value=true;try{return await qe("send-message",{selfId:i,channelId:v,content:u,images:T.map(O=>({tempId:O.tempId,filename:O.filename}))})}finally{e.value=false}}}async function n(i){return await qe("delete-bot-data",{selfId:i})}async function a(i,v){return await qe("delete-channel-data",{selfId:i,channelId:v})}async function o(i,v){return await qe("clear-channel-history",{selfId:i,channelId:v})}async function s(i,v,u){v?u.delete(i):u.add(i),await qe("set-pinned-bots",{pinnedBots:Array.from(u)})}async function l(i,v,u,T){const C=`${i}:${v}`;u?T.delete(C):T.add(C),await qe("set-pinned-channels",{pinnedChannels:Array.from(T)})}return{isSending:e,sendMessage:t,deleteBotData:n,deleteChannelData:a,clearHistory:o,togglePinBot:s,togglePinChannel:l}}function qd(){const e=j({}),t=new Map,n=50*1024*1024,a=30;let o=0,s=0,l=null;const i="ChatImageCache",v=2,u="images",T=500,C=12*1024*1024;async function O(){return new Promise(S=>{const E=indexedDB.deleteDatabase(i);E.onsuccess=()=>{console.log("[ImageCache] IndexedDB 已清空"),S(true)},E.onerror=()=>{console.error("[ImageCache] 清空 IndexedDB 失败"),S(false)}})}async function f(S=false){return S&&await O(),new Promise(E=>{const Z=indexedDB.open(i,v);Z.onupgradeneeded=D=>{const N=D.target.result;if(!N.objectStoreNames.contains(u)){const U=N.createObjectStore(u,{keyPath:"url"});U.createIndex("channelKey","channelKey",{unique:false}),U.createIndex("timestamp","timestamp",{unique:false})}},Z.onsuccess=()=>{l=Z.result,E(true)},Z.onerror=()=>E(false)})}function g(){if(s>a||o>n){const S=Object.entries(e.value),E=Math.ceil(S.length*.3);for(let Z=0;Z<E&&S.length>0;Z++){const[D,N]=S[Z];URL.revokeObjectURL(N),delete e.value[D],s--}o=Math.floor(o*.7),console.log(`[ImageCache] 清理内存,剩余 ${s} 个图片`)}}async function m(S,E){if(e.value[E])return e.value[E];if(t.has(E))return t.get(E);const Z=(async()=>{try{l||await f();const D=await y(E);if(D){const N=URL.createObjectURL(D.blob);return e.value[E]=N,o+=D.size,s++,g(),N}return null}finally{t.delete(E)}})();return t.set(E,Z),Z}async function y(S){return l?new Promise(E=>{const N=l.transaction([u],"readonly").objectStore(u).get(S);N.onsuccess=()=>E(N.result||null),N.onerror=()=>E(null)}):null}async function B(S,E){const Z=await m(S,E);if(Z)return Z;try{const D=await qe("fetch-image",{url:E});if(!D.success)return null;if(D.viteUrl)return e.value[E]=D.viteUrl,D.viteUrl;if(D.dataUrl){const U=await(await fetch(D.dataUrl)).blob();if(U.size>C)return console.warn(`[ImageCache] 图片过大 (${U.size} bytes),不缓存`),D.dataUrl;const Q={url:E,blob:U,timestamp:Date.now(),size:U.size,channelKey:S};await z(Q);const Y=URL.createObjectURL(U);return e.value[E]=Y,o+=U.size,s++,g(),Y}return null}catch(D){return console.error("[ImageCache] 缓存图片失败:",D),null}}async function z(S){if(l)try{await K()>=T&&await ie(Math.floor(T*.2)),l.transaction([u],"readwrite").objectStore(u).put(S)}catch(E){console.error("[ImageCache] 保存到 IndexedDB 失败:",E)}}async function K(){return l?new Promise(S=>{const D=l.transaction([u],"readonly").objectStore(u).count();D.onsuccess=()=>S(D.result),D.onerror=()=>S(0)}):0}async function ie(S){if(l)return new Promise(E=>{const U=l.transaction([u],"readwrite").objectStore(u).index("timestamp").openCursor();let Q=0;U.onsuccess=Y=>{const H=Y.target.result;H&&Q<S?(H.delete(),Q++,H.continue()):(console.log(`[ImageCache] 清理了 ${Q} 张旧图片`),E())},U.onerror=()=>E()})}async function q(S){Object.keys(e.value).forEach(E=>{URL.revokeObjectURL(e.value[E]),delete e.value[E]}),s=0,o=0}return pt(async()=>{var S;try{const E=await qe("get-plugin-config");(E==null?void 0:E.success)&&((S=E==null?void 0:E.config)==null?void 0:S.clearIndexedDBOnStart)?(console.log("[ImageCache] 配置要求清空 IndexedDB,正在清理..."),await f(true)):await f(false)}catch(E){console.error("[ImageCache] 初始化失败:",E),await f(false)}}),An(()=>{Object.values(e.value).forEach(URL.revokeObjectURL),l&&l.close()}),{getCachedImageUrl:m,cacheImage:B,clearChannelCache:q,clearIndexedDB:O}}function Kd(){const e=j({}),t=j(new Set),n=j(null);async function a(i){if(e.value[i])return e.value[i];if(t.value.has(i))return new Promise(v=>{const u=setInterval(()=>{e.value[i]&&(clearInterval(u),v(e.value[i])),t.value.has(i)||(clearInterval(u),v(null))},100)});t.value.add(i);try{const v=await qe("fetch-video-temp",{url:i});if(v.success){if(v.viteUrl)return e.value[i]=v.viteUrl,v.viteUrl;if(v.dataUrl){n.value&&URL.revokeObjectURL(n.value);const T=await(await fetch(v.dataUrl)).blob(),C=URL.createObjectURL(T);return n.value=C,e.value[i]=C,C}return null}return null}catch(v){return console.error("加载视频失败:",v),null}finally{t.value.delete(i)}}function o(i){return t.value.has(i)}function s(i){return!!e.value[i]}function l(){Object.values(e.value).forEach(i=>{i.startsWith("blob:")&&URL.revokeObjectURL(i)}),e.value={},n.value=null}return An(()=>{l()}),{loadVideo:a,isVideoLoading:o,isVideoLoaded:s,clearAllVideos:l}}function Gd(){const{bots:e,pinnedBots:t,pinnedChannels:n,getChannels:a,getMessages:o,loadInitialData:s,loadConfig:l,addMessage:i,loadHistory:v,getPagination:u}=jd(),{isSending:T,sendMessage:C,deleteBotData:O,deleteChannelData:f,togglePinBot:g,togglePinChannel:m}=Ud(),{getCachedImageUrl:y,cacheImage:B}=qd(),{loadVideo:z,isVideoLoading:K,isVideoLoaded:ie}=Kd(),q=j({show:false,x:0,y:0,type:"",id:"",isPinned:false,hasMedia:false}),S=j(""),E=j(""),Z=j(""),D=j([]),N=j(null),U=j(null),Q=j(false),Y=j("bots"),H=j(false),w=j(0),k=Ut({messages:[]}),F=j(false),I=Ut({url:""}),X=j(false),W=j(1),le=Ut({content:""}),pe=j(false),oe=j(null),ge=Ut({data:null}),_e=j(false),Ne=M(()=>a(S.value)),xe=M(()=>o(S.value,E.value)),We=M(()=>{const c=Ne.value.find(d=>d.id===E.value);return c?c.name:""}),Ye=M(()=>{const c=e.value.find(d=>d.selfId===S.value);return(c==null?void 0:c.platform)||"unknown"}),Se=c=>{S.value=c,E.value="",Q.value&&(Y.value="channels")},Re=async c=>{E.value=c,Q.value&&(Y.value="messages"),xe.value.length===0&&await v(S.value,c),await we(),Ie(),setTimeout(Ie,300),setTimeout(Ie,800)},He=()=>{Q.value&&Y.value!=="bots"?window.history.back():Y.value==="image"?(Y.value="messages",W.value=1):Y.value==="forward"||Y.value==="profile"||Y.value==="raw"?Y.value="messages":Y.value==="messages"?Y.value="channels":Y.value==="channels"&&(Y.value="bots")},nt=c=>{Q.value&&(c.state&&c.state.view?Y.value=c.state.view:Y.value="bots")};Oe(Y,(c,d)=>{var x;Q.value&&((x=window.history.state)==null?void 0:x.view)!==c&&window.history.pushState({view:c},"")});const Le=c=>{k.messages=c.filter(d=>d.type==="message"),Q.value?Y.value="forward":F.value=true},ht=c=>{I.url=c,W.value=1,Q.value?Y.value="image":X.value=true},dn=c=>{c.deltaY<0?W.value=Math.min(W.value+.1,3):W.value=Math.max(W.value-.1,.5)},Ht=c=>{const d=document.createElement("a");d.href=c,d.download=`chat-image-${Date.now()}.png`,d.click()},Ie=()=>{if(N.value){const c=N.value.wrapRef;c&&(c.scrollTop=c.scrollHeight)}},rt=async({scrollTop:c})=>{var d;if(c<=10&&!H.value&&S.value&&E.value&&u(S.value,E.value).hasMore){H.value=true;const R=(d=N.value)==null?void 0:d.wrapRef,p=(R==null?void 0:R.scrollHeight)||0;await v(S.value,E.value),await we(),R&&(R.scrollTop=R.scrollHeight-p),H.value=false}},Et=async()=>{if(!S.value||!E.value||!Z.value.trim()&&!D.value.length)return;let c=Z.value;oe.value&&(c=`<quote id="${oe.value.realId||oe.value.id}"/>${c}`);const d=await C(S.value,E.value,c,D.value);d!=null&&d.success?(Z.value="",D.value=[],oe.value=null,Ie()):it.error((d==null?void 0:d.error)||"发送失败")},Mt=async c=>{if(!S.value||!E.value)return;let d=c.content;if(c.quote){const R=c.quote.id;R&&!R.startsWith("bot-msg-")?d=`<quote id="${R}"/>${d}`:d=c.content}else if(c.isBot||c.userId===S.value){const R=c.realId||c.id;R&&R.startsWith("bot-msg-")?d=c.content:R?d=`<quote id="${R}"/>${d}`:d=c.content}const x=await C(S.value,E.value,d,[]);x!=null&&x.success?Ie():it.error((x==null?void 0:x.error)||"复读失败")},se=(c,d)=>{c.preventDefault(),c.stopPropagation(),q.value={show:true,x:c.clientX,y:c.clientY,type:"bot",id:d.selfId,isPinned:t.value.has(d.selfId),hasMedia:false}},_=(c,d)=>{c.preventDefault(),c.stopPropagation(),q.value={show:true,x:c.clientX,y:c.clientY,type:"channel",id:d.id,isPinned:n.value.has(`${S.value}:${d.id}`),hasMedia:false}},Ce=(c,d)=>{var R;if(q.value.show&&q.value.type==="message"&&q.value.id===d.id){q.value.show=false;return}c.preventDefault(),c.stopPropagation();const x=(R=d.elements)==null?void 0:R.some(p=>["image","img","mface","audio","video"].includes(p.type));q.value={show:true,x:c.clientX,y:c.clientY,type:"message",id:d.id,isPinned:false,data:d,hasMedia:x}},de=async c=>{const d=q.value.type,x=q.value.id,R=q.value.isPinned;q.value.show=false,c==="pin"?d==="bot"?await g(x,R,t.value):await m(S.value,x,R,n.value):c==="delete"&&(d==="bot"?await O(x):await f(S.value,x),location.reload())},Fe=c=>{if(!c)return it.warning("未复制任何内容"),Promise.resolve();if(navigator.clipboard&&window.isSecureContext)return navigator.clipboard.writeText(c);{const d=document.createElement("textarea");return d.value=c,d.style.position="fixed",d.style.left="-999999px",d.style.top="-999999px",document.body.appendChild(d),d.focus(),d.select(),new Promise((x,R)=>{document.execCommand("copy")?x():R(),d.remove()})}},et=async c=>{var x,R,p,ne;const d=q.value.data;if(q.value.show=false,!!d){if(c==="copy"){const V=(d.content||"").replace(/<[^>]+>/g,"");V?Fe(V).then(()=>it.success("已复制到剪贴板")):it.warning("未复制任何内容")}else if(c==="copy-raw"){let V=d.content||"";d.quote&&(V=`<quote id="${d.quote.id}"/>${V}`),le.content=V,Q.value?Y.value="raw":pe.value=true}else if(c==="plus1")await Mt(d);else if(c==="reply")oe.value=d,we(()=>{var re,ee,te,be,xt;const V=((ee=(re=U.value)==null?void 0:re.$el)==null?void 0:ee.querySelector("textarea"))||((te=U.value)==null?void 0:te.ref);V?V.focus():(xt=(be=U.value)==null?void 0:be.focus)==null||xt.call(be)});else if(c==="download"){const V=(x=d.elements)==null?void 0:x.find(ee=>["image","img","mface","audio","video"].includes(ee.type)),re=((R=V==null?void 0:V.attrs)==null?void 0:R.src)||((p=V==null?void 0:V.attrs)==null?void 0:p.url)||((ne=V==null?void 0:V.attrs)==null?void 0:ne.file);re&&Ht(re)}}},Ee=async c=>{if(!S.value)return;const d=await qe("get-user-info",{selfId:S.value,userId:c.userId,guildId:c.guildId});d.success?(ge.data=d.data,Q.value?Y.value="profile":_e.value=true):it.error(d.error||"获取用户信息失败")},$t=async c=>{let d=document.querySelector(`[data-id="${c}"]`)||document.getElementById(c);if(!d){if(H.value)return;it.info("正在向上查找历史消息...");for(let x=0;x<3&&(await v(S.value,E.value),await new Promise(R=>setTimeout(R,150)),d=document.querySelector(`[data-id="${c}"]`)||document.getElementById(c),!d);x++);}if(d){d.scrollIntoView({behavior:"smooth",block:"center"});const x=d.querySelector(".cursor-context-menu")||d;x.classList.add("message-highlight"),setTimeout(()=>x.classList.remove("message-highlight"),1500)}else it.warning("消息太久远,已不在当前列表中")},he=async c=>{var x;const d=(x=c.clipboardData)==null?void 0:x.items;if(d){for(let R=0;R<d.length;R++)if(d[R].type.indexOf("image")!==-1){const p=d[R].getAsFile();if(p){const ne=new FileReader;ne.onload=async V=>{var te;const re=(te=V.target)==null?void 0:te.result,ee=await qe("upload-image",{file:re,filename:`pasted_image_${Date.now()}.png`,mimeType:p.type});ee.success&&D.value.push({tempId:ee.tempId,preview:URL.createObjectURL(p),filename:`pasted_image_${Date.now()}.png`})},ne.readAsDataURL(p)}}}},Te=()=>{Q.value=window.innerWidth<=768},je=()=>{if(!Q.value){w.value=0;return}if(window.visualViewport){const c=window.visualViewport.height,d=window.innerHeight,x=Math.max(0,d-c);Math.abs(x-w.value)>50&&(w.value=x)}else w.value=0};let fe=[];return pt(async()=>{Te(),window.addEventListener("resize",Te),window.addEventListener("click",()=>q.value.show=false),window.addEventListener("popstate",nt),window.visualViewport&&(window.visualViewport.addEventListener("resize",je),window.visualViewport.addEventListener("scroll",je)),window.addEventListener("resize",je);const c=()=>{setTimeout(je,300)},d=()=>{setTimeout(()=>{w.value=0},100)};we(()=>{var re,ee;const V=(ee=(re=U.value)==null?void 0:re.$el)==null?void 0:ee.querySelector("textarea");V&&(V.addEventListener("focus",c),V.addEventListener("blur",d),fe.push(()=>{V.removeEventListener("focus",c),V.removeEventListener("blur",d)}))}),Q.value&&window.history.replaceState({view:Y.value},""),await l(),await s();const x=pn("chat-message-event",V=>{var re;if(i(V),V.selfId===S.value&&V.channelId===E.value){const ee=(re=N.value)==null?void 0:re.wrapRef;ee&&ee.scrollHeight-ee.scrollTop-ee.clientHeight<100&&we(Ie)}});typeof x=="function"&&fe.push(x);const R=pn("bot-message-sent-event",V=>{i(V),V.selfId===S.value&&V.channelId===E.value&&we(Ie)});typeof R=="function"&&fe.push(R);const p=pn("chat-bot-message-event",V=>{i(V),V.selfId===S.value&&V.channelId===E.value&&we(Ie)});typeof p=="function"&&fe.push(p);const ne=pn("bot-message-updated",V=>{const re=`${S.value}:${E.value}`;if(V.channelKey!==re)return;const ee=xe.value.find(te=>te.id===V.tempId);ee&&(ee.sending=false,ee.realId=V.realId)});typeof ne=="function"&&fe.push(ne)}),An(()=>{window.removeEventListener("resize",Te),window.removeEventListener("popstate",nt),window.removeEventListener("resize",je),window.visualViewport&&(window.visualViewport.removeEventListener("resize",je),window.visualViewport.removeEventListener("scroll",je)),fe.forEach(c=>c==null?void 0:c())}),{bots:e,selectedBot:S,selectedChannel:E,currentChannels:Ne,currentMessages:xe,currentChannelName:We,inputText:Z,uploadedImages:D,isSending:T,pinnedBots:t,pinnedChannels:n,scrollRef:N,isMobile:Q,mobileView:Y,forwardData:k,imageViewer:I,imageZoom:W,rawMessage:le,isLoadingHistory:H,forwardDialogVisible:F,imageViewerVisible:X,rawMessageVisible:pe,replyingTo:oe,userProfile:ge,userProfileVisible:_e,selectedBotPlatform:Ye,menu:q,keyboardHeight:w,selectBot:Se,selectChannel:Re,handleSend:Et,togglePinBot:g,togglePinChannel:m,deleteBotData:O,deleteChannelData:f,getCachedImageUrl:y,cacheImage:B,loadVideo:z,isVideoLoading:K,isVideoLoaded:ie,getMessages:o,goBack:He,showForward:Le,openImageViewer:ht,handleImageWheel:dn,downloadImage:Ht,handleScroll:rt,repeatMessage:Mt,handlePaste:he,copyToClipboard:Fe,onBotMenu:se,onChannelMenu:_,onMessageMenu:Ce,handleMenuAction:de,handleMessageAction:et,showUserProfile:Ee,inputRef:U,scrollToMessage:$t}}const Wd={key:0,class:"p-10 text-center opacity-40 text-sm"},Yd=["onClick","onContextmenu"],Zd={class:"ml-3 flex-1 overflow-hidden"},Xd={class:"flex items-center gap-1 text-sm font-bold truncate"},Jd={class:"text-xs text-[var(--k-text-color-secondary)] truncate opacity-80"},Qd={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"},ef={key:0,class:"p-10 text-center opacity-40 text-sm"},tf=["onClick","onContextmenu"],nf={class:"flex-1 overflow-hidden"},af={class:"flex items-center gap-1 text-sm font-medium truncate"},of={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm z-10 text-[var(--k-text-color)]"},rf={class:"truncate"},sf={key:1,class:"ml-2 text-xs opacity-40 font-mono hidden md:inline"},lf={class:"flex-1 overflow-hidden relative bg-opacity-50 bg-gray-100 dark:bg-black/20"},cf={key:0,class:"flex justify-center py-4"},uf=["data-id"],df={class:"flex items-center gap-2 mb-1.5 text-xs text-[var(--k-text-color-secondary)]"},ff={class:"font-bold"},pf={class:"opacity-60"},vf=["onClick"],hf={key:0,class:"w-8 h-8 flex items-center justify-center"},mf={key:1,class:"w-8 h-8 rounded-full border-2 border-blue-500 flex items-center justify-center font-bold text-xs bg-blue-50/10"},gf=["onContextmenu"],bf={key:0,class:"mb-2.5 p-2.5 text-sm bg-black/5 dark:bg-white/5 rounded-lg border-l-4 border-gray-400/50 text-left relative group/quote"},yf={class:"font-bold opacity-70 mb-1 text-xs"},wf={class:"opacity-90"},_f=["onClick"],xf={class:"text-left min-w-[20px]"},Cf={key:0,class:"flex gap-3 mb-3 overflow-x-auto pb-2 scrollbar-hide"},kf={key:1,class:"mb-2 px-3 py-1.5 bg-black/5 dark:bg-white/5 rounded-lg flex items-center justify-between text-xs"},Sf={class:"flex items-center gap-2 truncate opacity-70"},Ef={class:"flex gap-3 items-end"},Mf={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},$f={class:"p-4 space-y-6"},Tf={class:"flex-1 overflow-hidden"},If={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},Af={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},Lf={class:"flex h-14 items-center px-4 font-bold border-b border-white/10 bg-black text-white shadow-sm flex-shrink-0"},Of=["src"],Pf={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Bf={class:"p-4 flex flex-col gap-4 h-full overflow-hidden"},zf={class:"flex gap-3 pb-8"},Df={class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-sm"},Vf={class:"p-8 flex flex-col items-center gap-6"},Nf={class:"text-center"},Rf={class:"text-2xl font-bold mb-2"},Hf={class:"text-sm opacity-60 font-mono"},Ff={class:"flex flex-col items-center gap-4 py-4"},jf={class:"text-center"},Uf={class:"text-xl font-bold"},qf={class:"text-xs opacity-50 mt-1 font-mono"},Kf={class:"p-6 space-y-6 bg-gray-50 dark:bg-black/10"},Gf={class:"flex-1 overflow-hidden"},Wf={class:"text-xs text-[var(--k-text-color-secondary)] mb-1 font-bold"},Yf={class:"p-3 bg-[var(--k-card-bg)] rounded-2xl rounded-tl-none shadow-sm text-sm break-all border border-[var(--k-border-color)]"},Zf={class:"flex flex-col items-center gap-4"},Xf=["src"],Jf={class:"flex flex-col gap-4"},Qf={class:"flex justify-center gap-3"},e0=ue({__name:"index",setup(e){const{bots:t,selectedBot:n,selectedChannel:a,currentChannels:o,currentMessages:s,currentChannelName:l,inputText:i,uploadedImages:v,isSending:u,pinnedBots:T,pinnedChannels:C,scrollRef:O,isMobile:f,mobileView:g,goBack:m,forwardData:y,imageViewer:B,imageZoom:z,rawMessage:K,isLoadingHistory:ie,forwardDialogVisible:q,imageViewerVisible:S,rawMessageVisible:E,replyingTo:Z,userProfile:D,userProfileVisible:N,selectedBotPlatform:U,keyboardHeight:Q,selectBot:Y,selectChannel:H,handleSend:w,getCachedImageUrl:k,cacheImage:F,loadVideo:I,isVideoLoaded:X,showForward:W,openImageViewer:le,handleImageWheel:pe,downloadImage:oe,handleScroll:ge,repeatMessage:_e,handlePaste:Ne,copyToClipboard:xe,onBotMenu:We,onChannelMenu:Ye,onMessageMenu:Se,handleMenuAction:Re,handleMessageAction:He,showUserProfile:nt,menu:Le,inputRef:ht,scrollToMessage:dn}=Gd(),Ht=se=>new Date(se).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),Ie=async se=>{if(se==="delete")try{await Fd.confirm("确定删除所有数据吗?此操作不可恢复。","警告",{type:"warning",confirmButtonClass:"el-button--danger"}),await Re(se)}catch{}else await Re(se)},rt=ue({props:["element","botId","channelId","inQuote"],setup(se){const _=j(""),Ce=j(""),de=j(false),Fe=["img","image","mface","audio","video"].includes(se.element.type),et=async()=>{const he=se.element.attrs.src||se.element.attrs.url||se.element.attrs.file;if(he){if(se.element.type==="video"){Ce.value=he;return}const Te=await k(`${se.botId}:${se.channelId}`,he);if(Te)_.value=Te;else{const je=await F(`${se.botId}:${se.channelId}`,he);_.value=je||he}}};Fe&&et(),Oe(()=>se.element.attrs.src||se.element.attrs.url||se.element.attrs.file,et);const Ee=async()=>{if(!Ce.value||de.value)return;if(X(Ce.value)){const Te=await I(Ce.value);Te&&(_.value=Te);return}de.value=true;const he=await I(Ce.value);he&&(_.value=he),de.value=false},$t=()=>{if(se.inQuote)return;const he=document.querySelector(".el-main .el-scrollbar__wrap");he&&he.scrollHeight-he.scrollTop-he.clientHeight<150&&we(()=>{he.scrollTop=he.scrollHeight})};return()=>{var d;const{element:he,botId:Te,channelId:je}=se,fe=he.type,c=he.attrs;if(fe==="text")return ve("span",c.content);if(fe==="img"||fe==="image"||fe==="mface"){if(se.inQuote)return ve("span",{class:"opacity-60 italic mx-1"},"[图片]");const x=fe==="mface";return ve("div",{class:"block my-1.5"},[ve("img",{src:_.value,class:["rounded-lg shadow-sm border border-black/5 block cursor-pointer hover:opacity-90 transition-opacity",x?"max-w-[100px] max-h-[100px]":"max-w-full max-h-[400px]"],style:`min-width: ${x?"30px":"50px"}; min-height: ${x?"30px":"50px"}; object-fit: contain; background: rgba(0,0,0,0.05)`,onClick:R=>{R.stopPropagation(),le(_.value)},onLoad:$t,onError:R=>{R.target.src="",R.target.alt="图片加载失败"}})])}return fe==="audio"?ve("audio",{src:_.value,controls:true,class:"max-w-full my-1.5 block"}):fe==="video"?_.value?ve("video",{src:_.value,controls:true,class:"max-w-full my-1.5 rounded-lg shadow-sm block"}):ve("div",{class:"my-1.5 p-4 bg-black/5 dark:bg-white/5 rounded-lg border border-black/10 dark:border-white/10 cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors flex items-center justify-center gap-2",onClick:Ee},[de.value?ve("el-icon",{class:"is-loading"},{default:()=>ve(Bt)}):ve("el-icon",null,{default:()=>ve(Ta)}),ve("span",{class:"text-sm"},de.value?"加载中...":"点击加载视频")]):fe==="at"?ve("span",{class:"text-blue-500 font-bold hover:underline cursor-default mx-0.5"},`@${c.name||c.id}`):fe==="p"?ve("div",{class:"my-1 block min-h-[1em]"},(he.children||[]).map((x,R)=>ve(rt,{key:R,element:x,botId:Te,channelId:je}))):fe==="i18n"?ve("span",{class:"opacity-80 italic"},`[${c.path||"i18n"}]`):fe==="figure"||fe==="forward"?ve("div",{class:"my-2 p-3 bg-black/5 dark:bg-white/5 rounded-xl border border-black/10 dark:border-white/10 max-w-[300px] cursor-pointer hover:bg-black/10 dark:hover:bg-white/10 transition-colors",onClick:x=>{x.stopPropagation(),W(he.children||[])}},[ve("div",{class:"flex items-center gap-2 mb-2 font-bold text-sm opacity-80"},[ve("el-icon",null,{default:()=>ve($a)}),ve("span","合并转发记录")]),ve("div",{class:"space-y-1.5"},(he.children||[]).filter(x=>x.type==="message").slice(0,4).map(x=>{var R,p,ne,V;return ve("div",{class:"text-xs truncate opacity-70"},[ve("span",{class:"font-bold mr-1"},`${((R=x.attrs)==null?void 0:R.nickname)||"用户"}:`),ve("span",((V=(ne=(p=x.children)==null?void 0:p[0])==null?void 0:ne.attrs)==null?void 0:V.content)||"[富媒体内容]")])})),((d=he.children)==null?void 0:d.length)>4?ve("div",{class:"mt-2 pt-2 border-t border-black/5 dark:border-white/5 text-[10px] opacity-50"},`查看更多 ${he.children.length} 条内容...`):null]):fe==="quote"?null:ve("span",{class:"text-gray-400 italic text-xs"},`[${fe}]`)}}}),Et=async se=>{const _=new FileReader;_.onload=async Ce=>{var et;const de=(et=Ce.target)==null?void 0:et.result,Fe=await qe("upload-image",{file:de,filename:se.name,mimeType:se.raw.type});Fe.success&&v.value.push({tempId:Fe.tempId,preview:URL.createObjectURL(se.raw),filename:se.name})},_.readAsDataURL(se.raw)},Mt=se=>{v.value=v.value.filter(_=>_.tempId!==se)};return(se,_)=>{const Ce=$e("el-avatar"),de=$e("el-icon"),Fe=$e("el-scrollbar"),et=$e("el-aside"),Ee=$e("el-button"),$t=$e("el-image"),he=$e("el-upload"),Te=$e("el-input"),je=$e("el-empty"),fe=$e("el-main"),c=$e("el-descriptions-item"),d=$e("el-descriptions"),x=$e("el-container"),R=$e("el-dialog");return h(),L("div",{class:"chat-patch-wrapper absolute inset-0 flex overflow-hidden bg-[var(--k-page-bg)] text-[var(--k-text-color)] font-sans",style:Je(r(f)?"height: 100dvh; width: 100vw; position: fixed; top: 0; left: 0;":"height: 100%; width: 100%;")},[A(x,{class:"h-full w-full overflow-hidden"},{default:P(()=>[$(" 机器人列表 "),Ot(A(et,{width:r(f)?"100%":"280px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-95 dark:brightness-90 h-full overflow-hidden"},{default:P(()=>[_[21]||(_[21]=b("div",{class:"flex h-14 items-center px-4 font-bold border-b border-[var(--k-border-color)] text-lg text-[var(--k-text-color)] flex-shrink-0"}," 机器人",-1)),A(Fe,{class:"flex-1 overflow-auto"},{default:P(()=>[r(t).length===0?(h(),L("div",Wd,"暂无机器人数据")):$("v-if",true),(h(true),L(Me,null,st(r(t),p=>(h(),L("div",{key:p.selfId,class:G(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":r(n)===p.selfId}]),onClick:ne=>r(Y)(p.selfId),onContextmenu:Ve(ne=>r(We)(ne,p),["prevent"])},[A(Ce,{size:44,src:p.avatar,class:"flex-shrink-0 shadow-sm"},{default:P(()=>[ce(ae(p.username[0]),1)]),_:2},1032,["src"]),b("div",Zd,[b("div",Xd,[ce(ae(p.username)+" ",1),r(T).has(p.selfId)?(h(),J(de,{key:0,class:"text-orange-400"},{default:P(()=>[A(r(Ia))]),_:1})):$("v-if",true)]),b("div",Jd,ae(p.platform),1)]),b("div",{class:G(["w-2.5 h-2.5 rounded-full ml-2 shadow-inner",p.status==="online"?"bg-green-500":"bg-gray-400"])},null,2)],42,Yd))),128))]),_:1})]),_:1},8,["width"]),[[Pt,!r(f)||r(g)==="bots"]]),$(" 频道列表 "),Ot(A(et,{width:r(f)?"100%":"260px",class:"flex flex-col border-r border-[var(--k-border-color)] bg-[var(--k-page-bg)] brightness-100 dark:brightness-95 h-full overflow-hidden"},{default:P(()=>[b("div",Qd,[r(f)?(h(),J(Ee,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:r(m)},null,8,["onClick"])):$("v-if",true),_[22]||(_[22]=ce(" 频道 ",-1))]),A(Fe,{class:"flex-1 overflow-auto"},{default:P(()=>[r(o).length===0?(h(),L("div",ef,"暂无频道数据")):$("v-if",true),(h(true),L(Me,null,st(r(o),p=>(h(),L("div",{key:p.id,class:G(["flex items-center p-4 cursor-pointer transition-all hover:bg-[var(--k-button-hover-bg)] border-l-4 border-transparent",{"!border-[var(--k-color-primary)] bg-[var(--k-button-active-bg)] text-[var(--k-color-primary)]":r(a)===p.id}]),onClick:ne=>r(H)(p.id),onContextmenu:Ve(ne=>r(Ye)(ne,p),["prevent"])},[b("div",nf,[b("div",af,[ce(ae(p.name)+" ",1),r(C).has(`${r(n)}:${p.id}`)?(h(),J(de,{key:0,class:"text-orange-400"},{default:P(()=>[A(r(Ia))]),_:1})):$("v-if",true)])])],42,tf))),128))]),_:1})]),_:1},8,["width"]),[[Pt,!r(f)&&r(n)||r(f)&&r(g)==="channels"]]),$(" 消息主区域 "),Ot(A(fe,{class:"flex flex-col p-0 bg-[var(--k-page-bg)] relative brightness-105 dark:brightness-100 h-full overflow-hidden"},{default:P(()=>[r(n)&&r(a)?(h(),L(Me,{key:0},[b("div",of,[r(f)?(h(),J(Ee,{key:0,icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:r(m)},null,8,["onClick"])):$("v-if",true),b("span",rf,ae(r(l)),1),r(a)?(h(),L("span",sf,"("+ae(r(a))+")",1)):$("v-if",true)]),b("div",lf,[A(Fe,{ref_key:"scrollRef",ref:O,onScroll:r(ge),class:"h-full"},{default:P(()=>[b("div",{class:"p-6 flex flex-col",style:Je(r(f)?{paddingBottom:"calc(180px + env(safe-area-inset-bottom))"}:{minHeight:"100%"})},[r(ie)?(h(),L("div",cf,[A(de,{class:"is-loading text-[var(--k-color-primary)]"},{default:P(()=>[A(r(Bt))]),_:1})])):$("v-if",true),(h(true),L(Me,null,st(r(s),p=>(h(),L("div",{key:p.id,"data-id":p.id,class:G(["flex mb-6 gap-3 group",p.isBot||p.userId===r(n)?"flex-row-reverse":"flex-row"])},[A(Ce,{size:40,src:p.avatar,class:"flex-shrink-0 shadow-sm cursor-pointer hover:brightness-90",onClick:ne=>r(nt)(p)},{default:P(()=>[ce(ae(p.username[0]),1)]),_:2},1032,["src","onClick"]),b("div",{class:G(["max-w-[85%] md:max-w-[75%] flex flex-col",p.isBot||p.userId===r(n)?"items-end":"items-start"])},[b("div",df,[b("span",ff,ae(p.username),1),b("span",pf,ae(Ht(p.timestamp)),1)]),b("div",{class:G(["flex items-end gap-2 group/msg",p.isBot||p.userId===r(n)?"flex-row":"flex-row-reverse"])},[$(" +1 按钮:靠近屏幕中心的一侧,底部对齐 "),b("div",{class:G(["transition-opacity cursor-pointer text-blue-500 hover:scale-110 active:scale-95 mb-1",r(f)?"opacity-100":"opacity-0 group-hover/msg:opacity-100"]),title:"复读这条消息",onClick:Ve(ne=>r(_e)(p),["stop"])},[p.sending?(h(),L("div",hf,[A(de,{class:"is-loading"},{default:P(()=>[A(r(Bt))]),_:1})])):(h(),L("div",mf," +1"))],10,vf),b("div",{class:G(["p-3.5 rounded-2xl shadow-sm text-[15px] leading-relaxed break-all relative cursor-context-menu",p.isBot||p.userId===r(n)?"bg-[#95ec69] text-black rounded-tr-none":"bg-[var(--k-card-bg)] text-[var(--k-text-color)] rounded-tl-none border border-[var(--k-border-color)]"]),onContextmenu:Ve(ne=>r(Se)(ne,p),["stop"])},[$(" 引用消息渲染 "),p.quote?(h(),L("div",bf,[b("div",yf,ae(p.quote.user.username)+":",1),b("div",wf,[p.quote.elements&&p.quote.elements.length?(h(true),L(Me,{key:0},st(p.quote.elements,(ne,V)=>(h(),J(r(rt),{key:V,element:ne,"bot-id":r(n),"channel-id":r(a),"in-quote":true},null,8,["element","bot-id","channel-id"]))),128)):(h(),L(Me,{key:1},[ce(ae(p.quote.content),1)],64))]),$(" 定位消息按钮 - 常态显示 "),b("div",{class:"absolute top-1 right-1 cursor-pointer text-[var(--k-color-primary)] hover:scale-110 transition-transform",title:"定位到原消息",onClick:Ve(ne=>r(dn)(p.quote.id),["stop"])},[A(de,null,{default:P(()=>[A(r(ss))]),_:1})],8,_f)])):$("v-if",true),$(" 消息内容渲染 "),b("div",xf,[p.elements&&p.elements.length?(h(true),L(Me,{key:0},st(p.elements,(ne,V)=>(h(),J(r(rt),{key:V,element:ne,"bot-id":r(n),"channel-id":r(a)},null,8,["element","bot-id","channel-id"]))),128)):p.content?(h(),L(Me,{key:1},[ce(ae(p.content),1)],64)):$("v-if",true)])],42,gf)],2)],2)],10,uf))),128))],4)]),_:1},8,["onScroll"])]),$(" 输入区域 "),b("div",{class:G(["p-4 border-t border-[var(--k-border-color)] bg-[var(--k-card-bg)] shadow-[0_-2px_10px_rgba(0,0,0,0.05)]",r(f)?"fixed left-0 right-0 z-50 transition-all duration-200":""]),style:Je(r(f)?{bottom:r(Q)>0?`${r(Q)}px`:"0",paddingBottom:"max(env(safe-area-inset-bottom), 16px)"}:{})},[$(" 图片预览区域 "),r(v).length?(h(),L("div",Cf,[(h(true),L(Me,null,st(r(v),p=>(h(),L("div",{key:p.tempId,class:"relative w-20 h-20 flex-shrink-0 group"},[A($t,{src:p.preview,fit:"cover",class:"w-full h-full rounded-lg border-2 border-[var(--k-border-color)] shadow-sm cursor-pointer hover:brightness-90",onClick:ne=>r(le)(p.preview)},null,8,["src","onClick"]),A(de,{class:"absolute -top-1.5 -right-1.5 cursor-pointer text-red-500 bg-white rounded-full shadow-md opacity-0 group-hover:opacity-100 transition-opacity z-10",onClick:Ve(ne=>Mt(p.tempId),["stop"])},{default:P(()=>[A(r(pa))]),_:1},8,["onClick"])]))),128))])):$("v-if",true),r(Z)?(h(),L("div",kf,[b("div",Sf,[A(de,null,{default:P(()=>[A(r(Ma))]),_:1}),b("span",null,"回复 "+ae(r(Z).username)+": "+ae(r(Z).content.slice(0,20))+ae(r(Z).content.length>20?"...":""),1)]),A(de,{class:"cursor-pointer hover:text-red-500",onClick:_[0]||(_[0]=p=>Z.value=null)},{default:P(()=>[A(r(Eo))]),_:1})])):$("v-if",true),b("div",Ef,[$(" 图片上传按钮 "),A(he,{action:"#","auto-upload":false,"show-file-list":false,"on-change":Et,multiple:""},{default:P(()=>[A(Ee,{circle:"",class:"!w-10 !h-10 !text-xl shadow-sm hover:scale-105 transition-transform"},{default:P(()=>[A(de,null,{default:P(()=>[A(r(Ta))]),_:1})]),_:1})]),_:1}),$(" 文本输入框,使用 autosize 以适应单行显示 "),A(Te,{ref_key:"inputRef",ref:ht,modelValue:r(i),"onUpdate:modelValue":_[1]||(_[1]=p=>It(i)?i.value=p:null),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"输入消息...",class:"flex-1 !text-base",onKeydown:en(Ve(r(w),["prevent"]),["enter"]),onPaste:r(Ne)},null,8,["modelValue","onKeydown","onPaste"]),$(" 发送按钮 "),A(Ee,{type:"primary",loading:r(u),onClick:r(w),class:"px-6 h-10 !text-base font-bold shadow-md"},{default:P(()=>[..._[23]||(_[23]=[ce("发送",-1)])]),_:1},8,["loading","onClick"])])],6)],64)):(h(),J(je,{key:1,description:"请选择频道开始对话",class:"h-full flex items-center justify-center opacity-60"}))]),_:1},512),[[Pt,!r(f)&&r(n)&&r(a)||r(f)&&r(g)==="messages"]]),$(" 合并转发详情页 (手机端全屏) "),r(f)&&r(g)==="forward"?(h(),J(fe,{key:0,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-50 overflow-hidden",style:{height:"100dvh"}},{default:P(()=>[b("div",Mf,[A(Ee,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:r(m)},null,8,["onClick"]),_[24]||(_[24]=b("span",null,"聊天记录",-1))]),A(Fe,{class:"flex-1 bg-gray-50 dark:bg-black/10"},{default:P(()=>[b("div",$f,[(h(true),L(Me,null,st(r(y).messages,(p,ne)=>{var V,re;return h(),L("div",{key:ne,class:"flex gap-3"},[A(Ce,{size:36,src:(V=p.attrs)==null?void 0:V.avatar,class:"flex-shrink-0 shadow-sm"},{default:P(()=>{var ee,te;return[ce(ae((te=(ee=p.attrs)==null?void 0:ee.nickname)==null?void 0:te[0]),1)]}),_:2},1032,["src"]),b("div",Tf,[b("div",If,ae((re=p.attrs)==null?void 0:re.nickname),1),b("div",Af,[(h(true),L(Me,null,st(p.children,(ee,te)=>(h(),J(r(rt),{key:te,element:ee,"bot-id":r(n),"channel-id":r(a)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1})):$("v-if",true),$(" 图片查看器 (手机端全屏) "),r(f)&&r(g)==="image"?(h(),J(fe,{key:1,class:"flex flex-col p-0 bg-black absolute inset-0 z-[60] overflow-hidden",style:{height:"100dvh"}},{default:P(()=>[b("div",Lf,[A(Ee,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3 !bg-white/10 !border-none !text-white",onClick:r(m)},null,8,["onClick"]),_[26]||(_[26]=b("span",{class:"truncate mr-2"},"查看图片",-1)),_[27]||(_[27]=b("div",{class:"flex-1"},null,-1)),A(Ee,{type:"primary",icon:"Download",size:"small",onClick:_[2]||(_[2]=p=>r(oe)(r(B).url))},{default:P(()=>[..._[25]||(_[25]=[ce("下载",-1)])]),_:1})]),b("div",{class:"flex-1 overflow-hidden relative flex items-center justify-center",onWheel:_[3]||(_[3]=(...p)=>r(pe)&&r(pe)(...p))},[b("img",{src:r(B).url,class:"max-w-full max-h-full object-contain transition-transform duration-200 ease-out will-change-transform",style:Je({transform:`scale(${r(z)})`})},null,12,Of)],32)]),_:1})):$("v-if",true),$(" 原始消息查看页 (手机端全屏) "),r(f)&&r(g)==="raw"?(h(),J(fe,{key:2,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[80] overflow-hidden",style:{height:"100dvh"}},{default:P(()=>[b("div",Pf,[A(Ee,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:r(m)},null,8,["onClick"]),_[28]||(_[28]=b("div",{class:"flex-1 text-center pr-8"},"原始消息",-1))]),b("div",Bf,[A(Te,{modelValue:r(K).content,"onUpdate:modelValue":_[4]||(_[4]=p=>r(K).content=p),type:"textarea",rows:15,readonly:"",class:"flex-1 raw-content-area"},null,8,["modelValue"]),b("div",zf,[A(Ee,{type:"primary",class:"flex-1",onClick:_[5]||(_[5]=p=>r(xe)(r(K).content).then(()=>r(it).success("已复制")))},{default:P(()=>[..._[29]||(_[29]=[ce("复制内容",-1)])]),_:1}),A(Ee,{class:"flex-1",onClick:r(m)},{default:P(()=>[..._[30]||(_[30]=[ce("返回",-1)])]),_:1},8,["onClick"])])])]),_:1})):$("v-if",true),$(" 用户资料页 (手机端全屏) "),r(f)&&r(g)==="profile"?(h(),J(fe,{key:3,class:"flex flex-col p-0 bg-[var(--k-page-bg)] absolute inset-0 z-[70] overflow-hidden",style:{height:"100dvh"}},{default:P(()=>{var p,ne,V,re,ee;return[b("div",Df,[A(Ee,{icon:"ArrowLeft",circle:"",size:"small",class:"mr-3",onClick:r(m)},null,8,["onClick"]),_[31]||(_[31]=b("div",{class:"flex-1 text-center pr-8"},"用户资料",-1))]),b("div",Vf,[A(Ce,{size:120,src:(p=r(D).data)==null?void 0:p.avatar,class:"shadow-lg"},{default:P(()=>{var te,be;return[ce(ae((be=(te=r(D).data)==null?void 0:te.username)==null?void 0:be[0]),1)]}),_:1},8,["src"]),b("div",Nf,[b("div",Rf,ae(((ne=r(D).data)==null?void 0:ne.username)||((V=r(D).data)==null?void 0:V.name)||"未知用户"),1),b("div",Hf,"ID: "+ae(((re=r(D).data)==null?void 0:re.userId)||((ee=r(D).data)==null?void 0:ee.id)),1)]),A(d,{column:1,border:"",class:"w-full mt-4"},{default:P(()=>[A(c,{label:"昵称"},{default:P(()=>{var te,be;return[ce(ae(((te=r(D).data)==null?void 0:te.username)||((be=r(D).data)==null?void 0:be.name)),1)]}),_:1}),A(c,{label:"平台"},{default:P(()=>[ce(ae(r(U)),1)]),_:1})]),_:1})])]}),_:1})):$("v-if",true)]),_:1}),$(" 用户资料弹窗 (桌面端) "),r(f)?$("v-if",true):(h(),J(R,{key:0,modelValue:r(N),"onUpdate:modelValue":_[6]||(_[6]=p=>It(N)?N.value=p:null),title:"用户资料",width:"400px",center:"",teleported:"","align-center":""},{default:P(()=>{var p,ne,V,re,ee;return[b("div",Ff,[A(Ce,{size:80,src:(p=r(D).data)==null?void 0:p.avatar,class:"shadow"},{default:P(()=>{var te,be;return[ce(ae((be=(te=r(D).data)==null?void 0:te.username)==null?void 0:be[0]),1)]}),_:1},8,["src"]),b("div",jf,[b("div",Uf,ae(((ne=r(D).data)==null?void 0:ne.username)||((V=r(D).data)==null?void 0:V.name)||"未知用户"),1),b("div",qf,"ID: "+ae(((re=r(D).data)==null?void 0:re.userId)||((ee=r(D).data)==null?void 0:ee.id)),1)]),A(d,{column:1,border:"",class:"w-full mt-4"},{default:P(()=>[A(c,{label:"昵称"},{default:P(()=>{var te,be;return[ce(ae(((te=r(D).data)==null?void 0:te.username)||((be=r(D).data)==null?void 0:be.name)),1)]}),_:1}),A(c,{label:"平台"},{default:P(()=>[ce(ae(r(U)),1)]),_:1})]),_:1})])]}),_:1},8,["modelValue"])),$(" 合并转发详情弹窗 (桌面端) "),r(f)?$("v-if",true):(h(),J(R,{key:1,modelValue:r(q),"onUpdate:modelValue":_[7]||(_[7]=p=>It(q)?q.value=p:null),title:"聊天记录",width:"550px",class:"forward-dialog",teleported:""},{default:P(()=>[A(Fe,{"max-height":"70vh"},{default:P(()=>[b("div",Kf,[(h(true),L(Me,null,st(r(y).messages,(p,ne)=>{var V,re;return h(),L("div",{key:ne,class:"flex gap-3"},[A(Ce,{size:36,src:(V=p.attrs)==null?void 0:V.avatar,class:"flex-shrink-0 shadow-sm"},{default:P(()=>{var ee,te;return[ce(ae((te=(ee=p.attrs)==null?void 0:ee.nickname)==null?void 0:te[0]),1)]}),_:2},1032,["src"]),b("div",Gf,[b("div",Wf,ae((re=p.attrs)==null?void 0:re.nickname),1),b("div",Yf,[(h(true),L(Me,null,st(p.children,(ee,te)=>(h(),J(r(rt),{key:te,element:ee,"bot-id":r(n),"channel-id":r(a)},null,8,["element","bot-id","channel-id"]))),128))])])])}),128))])]),_:1})]),_:1},8,["modelValue"])),$(" 图片查看器弹窗 (桌面端) "),r(f)?$("v-if",true):(h(),J(R,{key:2,modelValue:r(S),"onUpdate:modelValue":_[9]||(_[9]=p=>It(S)?S.value=p:null),title:"查看图片",width:"fit-content",class:"image-viewer-dialog",teleported:"",center:""},{default:P(()=>[b("div",Zf,[b("img",{src:r(B).url,class:"max-w-full max-h-[70vh] rounded shadow-lg"},null,8,Xf),A(Ee,{type:"primary",icon:"Download",onClick:_[8]||(_[8]=p=>r(oe)(r(B).url))},{default:P(()=>[..._[32]||(_[32]=[ce("下载图片",-1)])]),_:1})])]),_:1},8,["modelValue"])),$(" 原始消息查看弹窗 (桌面端) "),r(f)?$("v-if",true):(h(),J(R,{key:3,modelValue:r(E),"onUpdate:modelValue":_[13]||(_[13]=p=>It(E)?E.value=p:null),title:"原始消息内容",width:"600px",center:"",teleported:"","align-center":""},{default:P(()=>[b("div",Jf,[A(Te,{modelValue:r(K).content,"onUpdate:modelValue":_[10]||(_[10]=p=>r(K).content=p),type:"textarea",rows:12,readonly:"",class:"raw-content-area"},null,8,["modelValue"]),b("div",Qf,[A(Ee,{type:"primary",onClick:_[11]||(_[11]=p=>r(xe)(r(K).content).then(()=>r(it).success("已复制到剪贴板")))},{default:P(()=>[..._[33]||(_[33]=[ce("复制全部内容",-1)])]),_:1}),A(Ee,{onClick:_[12]||(_[12]=p=>E.value=false)},{default:P(()=>[..._[34]||(_[34]=[ce("关闭",-1)])]),_:1})])])]),_:1},8,["modelValue"])),$(" 右键菜单 "),r(Le).show?(h(),L("div",{key:4,class:"fixed bg-[var(--k-card-bg)] border border-[var(--k-border-color)] shadow-xl z-[2000] py-1.5 rounded-lg min-w-[140px] backdrop-blur-sm bg-opacity-90",style:Je({left:r(Le).x+"px",top:r(Le).y+"px"})},[$(" 机器人/频道菜单 "),r(Le).type==="bot"||r(Le).type==="channel"?(h(),L(Me,{key:0},[b("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:_[14]||(_[14]=p=>Ie("pin"))},[A(de,null,{default:P(()=>[A(r(as))]),_:1}),ce(" "+ae(r(Le).isPinned?"取消置顶":"置顶"),1)]),b("div",{class:"px-4 py-2.5 cursor-pointer text-sm text-red-500 hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:_[15]||(_[15]=p=>Ie("delete"))},[A(de,null,{default:P(()=>[A(r(qr))]),_:1}),_[35]||(_[35]=ce(" 删除数据 ",-1))])],64)):r(Le).type==="message"?(h(),L(Me,{key:1},[$(" 消息菜单 "),b("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:_[16]||(_[16]=p=>r(He)("copy"))},[A(de,null,{default:P(()=>[A(r(Gr))]),_:1}),_[36]||(_[36]=ce(" 复制文本 ",-1))]),b("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:_[17]||(_[17]=p=>r(He)("copy-raw"))},[A(de,null,{default:P(()=>[A(r($a))]),_:1}),_[37]||(_[37]=ce(" 查看原始消息 ",-1))]),b("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:_[18]||(_[18]=p=>r(He)("plus1"))},[A(de,null,{default:P(()=>[A(r(Hr))]),_:1}),_[38]||(_[38]=ce(" +1 复读 ",-1))]),b("div",{class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:_[19]||(_[19]=p=>r(He)("reply"))},[A(de,null,{default:P(()=>[A(r(Ma))]),_:1}),_[39]||(_[39]=ce(" 回复 ",-1))]),r(Le).hasMedia?(h(),L("div",{key:0,class:"px-4 py-2.5 cursor-pointer text-sm hover:bg-[var(--k-button-hover-bg)] transition-colors flex items-center gap-2",onClick:_[20]||(_[20]=p=>r(He)("download"))},[A(de,null,{default:P(()=>[A(r(Yr))]),_:1}),_[40]||(_[40]=ce(" 下载媒体 ",-1))])):$("v-if",true)],64)):$("v-if",true)],4)):$("v-if",true)],4)}}}),t0=(e,t)=>{const n=e.__vccOpts||e;for(const[a,o]of t)n[a]=o;return n},n0={},a0={class:"k-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"};function o0(e,t){return h(),L("svg",a0,[...t[0]||(t[0]=[b("path",{d:"M8 10.5H16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),b("path",{d:"M8 14H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),b("path",{d:"M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)])])}const r0=t0(n0,[["render",o0]]);Pr.register("activity:chat",r0);const k0=e=>{e.page({name:"聊天室",path:"/chat-patch",desc:"",authority:4,icon:"activity:chat",component:ue({setup(){return()=>ve($e("k-layout"),{},{default:()=>ve(e0)})}})})};export{k0 as default};
|
package/lib/file-manager.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -46,16 +46,13 @@ var import_node_path = require("node:path");
|
|
|
46
46
|
var import_node_crypto = require("node:crypto");
|
|
47
47
|
var import_node_url = require("node:url");
|
|
48
48
|
var import_node_fs = require("node:fs");
|
|
49
|
-
var
|
|
49
|
+
var _Utils = class _Utils {
|
|
50
50
|
constructor(config, ctx) {
|
|
51
51
|
this.config = config;
|
|
52
52
|
this.ctx = ctx;
|
|
53
|
+
this.persistImageWriteCount = 0;
|
|
54
|
+
this.pendingTasks = /* @__PURE__ */ new Set();
|
|
53
55
|
}
|
|
54
|
-
static {
|
|
55
|
-
__name(this, "Utils");
|
|
56
|
-
}
|
|
57
|
-
persistImageWriteCount = 0;
|
|
58
|
-
pendingTasks = /* @__PURE__ */ new Set();
|
|
59
56
|
isPlatformBlocked(platform) {
|
|
60
57
|
if (!this.config.blockedPlatforms || this.config.blockedPlatforms.length === 0) {
|
|
61
58
|
return false;
|
|
@@ -200,28 +197,26 @@ var Utils = class {
|
|
|
200
197
|
}
|
|
201
198
|
}
|
|
202
199
|
};
|
|
200
|
+
__name(_Utils, "Utils");
|
|
201
|
+
var Utils = _Utils;
|
|
203
202
|
|
|
204
203
|
// src/message-handler.ts
|
|
205
204
|
var import_node_fs2 = require("node:fs");
|
|
206
205
|
var import_node_path2 = __toESM(require("node:path"));
|
|
207
206
|
var import_node_crypto2 = require("node:crypto");
|
|
208
|
-
var
|
|
207
|
+
var _MessageHandler = class _MessageHandler {
|
|
209
208
|
constructor(ctx, config, fileManager, logger) {
|
|
210
209
|
this.ctx = ctx;
|
|
211
210
|
this.config = config;
|
|
212
211
|
this.fileManager = fileManager;
|
|
213
212
|
this.logger = logger;
|
|
213
|
+
this.correctChannelIds = /* @__PURE__ */ new Map();
|
|
214
|
+
this.scheduledTasks = /* @__PURE__ */ new Set();
|
|
215
|
+
this.channelRefreshInFlight = /* @__PURE__ */ new Set();
|
|
216
|
+
this.lastChannelRefreshAt = /* @__PURE__ */ new Map();
|
|
217
|
+
this.CHANNEL_REFRESH_TTL_MS = 10 * 60 * 1e3;
|
|
214
218
|
this.utils = new Utils(config);
|
|
215
219
|
}
|
|
216
|
-
static {
|
|
217
|
-
__name(this, "MessageHandler");
|
|
218
|
-
}
|
|
219
|
-
utils;
|
|
220
|
-
correctChannelIds = /* @__PURE__ */ new Map();
|
|
221
|
-
scheduledTasks = /* @__PURE__ */ new Set();
|
|
222
|
-
channelRefreshInFlight = /* @__PURE__ */ new Set();
|
|
223
|
-
lastChannelRefreshAt = /* @__PURE__ */ new Map();
|
|
224
|
-
CHANNEL_REFRESH_TTL_MS = 10 * 60 * 1e3;
|
|
225
220
|
recordUserMessage(session, timestamp) {
|
|
226
221
|
this.scheduleTask("记录用户消息", async () => {
|
|
227
222
|
await this.processUserMessage(session, timestamp);
|
|
@@ -601,15 +596,33 @@ var MessageHandler = class {
|
|
|
601
596
|
}
|
|
602
597
|
}
|
|
603
598
|
};
|
|
599
|
+
__name(_MessageHandler, "MessageHandler");
|
|
600
|
+
var MessageHandler = _MessageHandler;
|
|
604
601
|
|
|
605
602
|
// src/file-manager.ts
|
|
606
603
|
var import_node_path3 = __toESM(require("node:path"));
|
|
607
604
|
var import_node_fs3 = require("node:fs");
|
|
608
|
-
var
|
|
605
|
+
var _FileManager = class _FileManager {
|
|
609
606
|
constructor(ctx, config, logger) {
|
|
610
607
|
this.ctx = ctx;
|
|
611
608
|
this.config = config;
|
|
612
609
|
this.logger = logger;
|
|
610
|
+
this.memoryCache = this.createEmptyChatData();
|
|
611
|
+
this.channelMessagesCache = /* @__PURE__ */ new Map();
|
|
612
|
+
this.recentMessageIdsCache = /* @__PURE__ */ new Map();
|
|
613
|
+
this.pendingBotMessageIds = /* @__PURE__ */ new Map();
|
|
614
|
+
this.messageChunkLocationCache = /* @__PURE__ */ new Map();
|
|
615
|
+
this.dirtyChannelKeys = /* @__PURE__ */ new Set();
|
|
616
|
+
this.pendingMessages = /* @__PURE__ */ new Map();
|
|
617
|
+
// 按channelKey分组的待写入消息
|
|
618
|
+
this.writeTimers = /* @__PURE__ */ new Map();
|
|
619
|
+
// 每个频道独立的写入定时器
|
|
620
|
+
this.metadataLoadPromise = null;
|
|
621
|
+
this.channelLoadPromises = /* @__PURE__ */ new Map();
|
|
622
|
+
this.writeQueue = Promise.resolve();
|
|
623
|
+
this.disposed = false;
|
|
624
|
+
this.WRITE_DEBOUNCE_MS = 1e3;
|
|
625
|
+
this.RECENT_MESSAGE_ID_CACHE_SIZE = 200;
|
|
613
626
|
const baseDir = import_node_path3.default.resolve(ctx.baseDir, "data", "chat-patch");
|
|
614
627
|
this.storageBaseDir = import_node_path3.default.join(baseDir, "v2");
|
|
615
628
|
this.chatHistoryDir = import_node_path3.default.join(this.storageBaseDir, "chat-history");
|
|
@@ -619,31 +632,6 @@ var FileManager = class {
|
|
|
619
632
|
void this.cleanupLegacyStorage(baseDir);
|
|
620
633
|
}, 0);
|
|
621
634
|
}
|
|
622
|
-
static {
|
|
623
|
-
__name(this, "FileManager");
|
|
624
|
-
}
|
|
625
|
-
storageBaseDir;
|
|
626
|
-
chatHistoryDir;
|
|
627
|
-
// 聊天记录根目录
|
|
628
|
-
metadataFilePath;
|
|
629
|
-
// 元数据文件路径(存储bots、channels、pinned等信息)
|
|
630
|
-
utils;
|
|
631
|
-
memoryCache = this.createEmptyChatData();
|
|
632
|
-
channelMessagesCache = /* @__PURE__ */ new Map();
|
|
633
|
-
recentMessageIdsCache = /* @__PURE__ */ new Map();
|
|
634
|
-
pendingBotMessageIds = /* @__PURE__ */ new Map();
|
|
635
|
-
messageChunkLocationCache = /* @__PURE__ */ new Map();
|
|
636
|
-
dirtyChannelKeys = /* @__PURE__ */ new Set();
|
|
637
|
-
pendingMessages = /* @__PURE__ */ new Map();
|
|
638
|
-
// 按channelKey分组的待写入消息
|
|
639
|
-
writeTimers = /* @__PURE__ */ new Map();
|
|
640
|
-
// 每个频道独立的写入定时器
|
|
641
|
-
metadataLoadPromise = null;
|
|
642
|
-
channelLoadPromises = /* @__PURE__ */ new Map();
|
|
643
|
-
writeQueue = Promise.resolve();
|
|
644
|
-
disposed = false;
|
|
645
|
-
WRITE_DEBOUNCE_MS = 1e3;
|
|
646
|
-
RECENT_MESSAGE_ID_CACHE_SIZE = 200;
|
|
647
635
|
async initialize() {
|
|
648
636
|
await this.ensureMetadataLoaded();
|
|
649
637
|
}
|
|
@@ -834,7 +822,7 @@ var FileManager = class {
|
|
|
834
822
|
lastSaveTime: Date.now()
|
|
835
823
|
};
|
|
836
824
|
const jsonData = JSON.stringify(dataToWrite, null, 2);
|
|
837
|
-
await
|
|
825
|
+
await this.atomicWriteTextFile(this.metadataFilePath, jsonData);
|
|
838
826
|
} catch (error) {
|
|
839
827
|
this.logger.error("写入元数据失败:", error);
|
|
840
828
|
}
|
|
@@ -1289,7 +1277,7 @@ var FileManager = class {
|
|
|
1289
1277
|
}
|
|
1290
1278
|
async writeChannelIndex(indexFilePath, indexData) {
|
|
1291
1279
|
await this.ensureDir(import_node_path3.default.dirname(indexFilePath));
|
|
1292
|
-
await
|
|
1280
|
+
await this.atomicWriteTextFile(indexFilePath, JSON.stringify(indexData, null, 2));
|
|
1293
1281
|
}
|
|
1294
1282
|
async readChunkMessages(channelDirPath, fileName) {
|
|
1295
1283
|
try {
|
|
@@ -1305,7 +1293,7 @@ var FileManager = class {
|
|
|
1305
1293
|
}
|
|
1306
1294
|
async writeChunkMessages(channelDirPath, fileName, messages) {
|
|
1307
1295
|
await this.ensureDir(channelDirPath);
|
|
1308
|
-
await
|
|
1296
|
+
await this.atomicWriteTextFile(this.getChunkFilePath(channelDirPath, fileName), JSON.stringify(messages, null, 2));
|
|
1309
1297
|
}
|
|
1310
1298
|
async writeMessagesToChunks(channelDirPath, indexData, messages) {
|
|
1311
1299
|
const oldChunks = [...indexData.chunks];
|
|
@@ -1708,7 +1696,34 @@ var FileManager = class {
|
|
|
1708
1696
|
isFileMissingError(error) {
|
|
1709
1697
|
return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
1710
1698
|
}
|
|
1699
|
+
async atomicWriteTextFile(filePath, content) {
|
|
1700
|
+
const tempFilePath = `${filePath}.${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}.tmp`;
|
|
1701
|
+
await import_node_fs3.promises.writeFile(
|
|
1702
|
+
tempFilePath,
|
|
1703
|
+
content,
|
|
1704
|
+
"utf8"
|
|
1705
|
+
);
|
|
1706
|
+
try {
|
|
1707
|
+
await import_node_fs3.promises.rename(tempFilePath, filePath);
|
|
1708
|
+
} catch (error) {
|
|
1709
|
+
if (this.isAtomicRenameReplaceError(error)) {
|
|
1710
|
+
await import_node_fs3.promises.rm(filePath, { force: true });
|
|
1711
|
+
await import_node_fs3.promises.rename(tempFilePath, filePath);
|
|
1712
|
+
return;
|
|
1713
|
+
}
|
|
1714
|
+
try {
|
|
1715
|
+
await import_node_fs3.promises.rm(tempFilePath, { force: true });
|
|
1716
|
+
} catch {
|
|
1717
|
+
}
|
|
1718
|
+
throw error;
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
isAtomicRenameReplaceError(error) {
|
|
1722
|
+
return typeof error === "object" && error !== null && "code" in error && (error.code === "EEXIST" || error.code === "EPERM");
|
|
1723
|
+
}
|
|
1711
1724
|
};
|
|
1725
|
+
__name(_FileManager, "FileManager");
|
|
1726
|
+
var FileManager = _FileManager;
|
|
1712
1727
|
|
|
1713
1728
|
// src/api-handlers.ts
|
|
1714
1729
|
var import_koishi = require("koishi");
|
|
@@ -1717,18 +1732,15 @@ var import_node_fs4 = require("node:fs");
|
|
|
1717
1732
|
var import_node_path4 = __toESM(require("node:path"));
|
|
1718
1733
|
var import_node_crypto3 = require("node:crypto");
|
|
1719
1734
|
var mime = __toESM(require("mime-types"));
|
|
1720
|
-
var
|
|
1735
|
+
var _ApiHandlers = class _ApiHandlers {
|
|
1721
1736
|
constructor(ctx, config, fileManager, messageHandler, logger) {
|
|
1722
1737
|
this.ctx = ctx;
|
|
1723
1738
|
this.config = config;
|
|
1724
1739
|
this.fileManager = fileManager;
|
|
1725
1740
|
this.messageHandler = messageHandler;
|
|
1726
1741
|
this.logger = logger;
|
|
1742
|
+
this.currentTempVideo = null;
|
|
1727
1743
|
}
|
|
1728
|
-
static {
|
|
1729
|
-
__name(this, "ApiHandlers");
|
|
1730
|
-
}
|
|
1731
|
-
currentTempVideo = null;
|
|
1732
1744
|
registerApiHandlers() {
|
|
1733
1745
|
this.ctx.console.addListener("clear-all-indexeddb-data", async () => {
|
|
1734
1746
|
try {
|
|
@@ -2205,6 +2217,8 @@ var ApiHandlers = class {
|
|
|
2205
2217
|
return String(error);
|
|
2206
2218
|
}
|
|
2207
2219
|
};
|
|
2220
|
+
__name(_ApiHandlers, "ApiHandlers");
|
|
2221
|
+
var ApiHandlers = _ApiHandlers;
|
|
2208
2222
|
|
|
2209
2223
|
// src/logger.ts
|
|
2210
2224
|
function createPluginLogger(logger, config) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-chat-patch",
|
|
3
3
|
"description": "[<ruby>chat-patch<rp>(</rp><rt>点我预览效果</rt><rp>)</rp></ruby>](https://i0.hdslb.com/bfs/openplatform/71074dfc9e5256fc3333d8bd8478bec1af874046.png) 视奸小插件((bushi( (低性能警告)。手机端适配。灵感来自 chat 插件。",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
package/src/file-manager.ts
CHANGED
|
@@ -304,7 +304,7 @@ export class FileManager {
|
|
|
304
304
|
lastSaveTime: Date.now()
|
|
305
305
|
}
|
|
306
306
|
const jsonData = JSON.stringify(dataToWrite, null, 2)
|
|
307
|
-
await
|
|
307
|
+
await this.atomicWriteTextFile(this.metadataFilePath, jsonData)
|
|
308
308
|
} catch (error) {
|
|
309
309
|
this.logger.error('写入元数据失败:', error)
|
|
310
310
|
}
|
|
@@ -880,7 +880,7 @@ export class FileManager {
|
|
|
880
880
|
|
|
881
881
|
private async writeChannelIndex(indexFilePath: string, indexData: ChannelIndexData) {
|
|
882
882
|
await this.ensureDir(path.dirname(indexFilePath))
|
|
883
|
-
await
|
|
883
|
+
await this.atomicWriteTextFile(indexFilePath, JSON.stringify(indexData, null, 2))
|
|
884
884
|
}
|
|
885
885
|
|
|
886
886
|
private async readChunkMessages(channelDirPath: string, fileName: string): Promise<MessageInfo[]> {
|
|
@@ -898,7 +898,7 @@ export class FileManager {
|
|
|
898
898
|
|
|
899
899
|
private async writeChunkMessages(channelDirPath: string, fileName: string, messages: MessageInfo[]) {
|
|
900
900
|
await this.ensureDir(channelDirPath)
|
|
901
|
-
await
|
|
901
|
+
await this.atomicWriteTextFile(this.getChunkFilePath(channelDirPath, fileName), JSON.stringify(messages, null, 2))
|
|
902
902
|
}
|
|
903
903
|
|
|
904
904
|
private async writeMessagesToChunks(channelDirPath: string, indexData: ChannelIndexData, messages: MessageInfo[]) {
|
|
@@ -1401,4 +1401,36 @@ export class FileManager {
|
|
|
1401
1401
|
&& 'code' in error
|
|
1402
1402
|
&& error.code === 'ENOENT'
|
|
1403
1403
|
}
|
|
1404
|
+
|
|
1405
|
+
private async atomicWriteTextFile(filePath: string, content: string) {
|
|
1406
|
+
const tempFilePath = `${filePath}.${process.pid}.${Date.now()}.${Math.random().toString(16).slice(2)}.tmp`
|
|
1407
|
+
|
|
1408
|
+
await fs.writeFile(tempFilePath, content, 'utf8'
|
|
1409
|
+
)
|
|
1410
|
+
|
|
1411
|
+
try {
|
|
1412
|
+
await fs.rename(tempFilePath, filePath)
|
|
1413
|
+
} catch (error) {
|
|
1414
|
+
if (this.isAtomicRenameReplaceError(error)) {
|
|
1415
|
+
await fs.rm(filePath, { force: true })
|
|
1416
|
+
await fs.rename(tempFilePath, filePath)
|
|
1417
|
+
return
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
try {
|
|
1421
|
+
await fs.rm(tempFilePath, { force: true })
|
|
1422
|
+
} catch {
|
|
1423
|
+
// 忽略临时文件清理失败,保留原始错误即可。
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
throw error
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
private isAtomicRenameReplaceError(error: unknown): boolean {
|
|
1431
|
+
return typeof error === 'object'
|
|
1432
|
+
&& error !== null
|
|
1433
|
+
&& 'code' in error
|
|
1434
|
+
&& (error.code === 'EEXIST' || error.code === 'EPERM')
|
|
1435
|
+
}
|
|
1404
1436
|
}
|