koishi-plugin-chat-patch 6.1.0 → 6.1.1
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/client/web/dist/assets/Chat-BduEIlJM.js +34 -0
- package/client/web/dist/assets/{Chat-Cee07eDL.css → Chat-DgkvjRIh.css} +1 -1
- package/client/web/dist/assets/{MsgBody-krZlLzRL.js → MsgBody-CVtXorvl.js} +1 -1
- package/client/web/dist/assets/{MsgBody.vue_vue_type_script_setup_true_lang-CLmUjKws.js → MsgBody.vue_vue_type_script_setup_true_lang-D_70Txdf.js} +1 -1
- package/client/web/dist/assets/{index-X9hFOAza.css → index-BW47RWcA.css} +1 -1
- package/client/web/dist/assets/{index-DOJoilEy.js → index-N2_GDY3v.js} +3 -3
- package/client/web/dist/index.html +2 -2
- package/client/web/src/assets/css/chat.css +24 -2
- package/client/web/src/function/custom-element.ts +31 -0
- package/client/web/src/function/utils/msgUtil.ts +39 -23
- package/client/web/src/pages/Chat.vue +136 -7
- package/lib/index.js +28 -0
- package/package.json +1 -1
- package/src/web-error-filter.ts +30 -0
- package/src/web.ts +3 -1
- package/client/web/dist/assets/Chat-BLcuHxzh.js +0 -28
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Cg_esKB0.js","./core-DhEqZVGG.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as Nt,w as Ae,u as B,o as G,c as te,r as Gt,a as ge,b as $e,e as St,F as ke,f as yt,m as vi,t as Eo,n as dt,g as xn,h as $i,i as oe,j as he,k as Vt,l as Se,p as pn,q as ht,s as Fo,v as ni,x as Ct,y as dn,z as $o,A as Dn,B as Ti,C as Bn,D as Li,E as On,G as Un,H as k,I as Y,J as Fn,K as at,T as Ri,L as jt,M as st,N as yi,O as wi,P as an,Q as ct,R as Te,S as Di,_ as Nn,U as Bi,V as bt,W as To,X as Oi,Y as Lo,Z as ii,$ as Ui,a0 as Ro,a1 as kn,a2 as bi,a3 as Ni,a4 as Yn,a5 as zi,a6 as Hi,a7 as Xn,a8 as Zn,a9 as Do,aa as Bo,ab as tn,ac as _n,ad as ki,ae as Oo,af as Ot,ag as In,ah as Uo,ai as Sn,aj as un,ak as cn,al as fn,am as Wn,an as No,ao as zo,ap as Ho,aq as Po,ar as jo,as as _i,at as Ii,au as Vo,av as Ut,aw as qo,ax as Wo,ay as Cn,az as Ko,aA as Qo,aB as Go,aC as Jo,aD as Yo,aE as Xo,aF as Zo,aG as ea,aH as ta}from"./index-N2_GDY3v.js";import{_ as ei,E as hn,a as mn}from"./MsgBody.vue_vue_type_script_setup_true_lang-D_70Txdf.js";function Pt(t){return t==null}function Si(t){return!Pt(t)}function Ci(t,f,D){return Object.defineProperty(t,f,{writable:!0,value:D,enumerable:!1})}function na(t){return Array.isArray(t)?t:Pt(t)?[]:[t]}function gn(t,f){return arguments.length===1?D=>gn(t,D):t in globalThis&&f instanceof globalThis[t]||Object.prototype.toString.call(f).slice(8,-1)===t}function Pi(t){return gn("ArrayBuffer",t)||gn("SharedArrayBuffer",t)}function ia(t){return Pi(t)||ArrayBuffer.isView(t)}var qt;(t=>{t.is=Pi,t.isSource=ia;function f(r){return ArrayBuffer.isView(r)?r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength):r}t.fromSource=f;function D(r){if(r=f(r),typeof Buffer<"u")return Buffer.from(r).toString("base64");let o="";const p=new Uint8Array(r);for(let x=0;x<p.byteLength;x++)o+=String.fromCharCode(p[x]);return btoa(o)}t.toBase64=D;function c(r){return typeof Buffer<"u"?f(Buffer.from(r,"base64")):Uint8Array.from(atob(r),o=>o.charCodeAt(0))}t.fromBase64=c;function e(r){return r=f(r),typeof Buffer<"u"?Buffer.from(r).toString("hex"):Array.from(new Uint8Array(r),o=>o.toString(16).padStart(2,"0")).join("")}t.toHex=e;function n(r){if(typeof Buffer<"u")return f(Buffer.from(r,"hex"));const o=r.length%2===0?r:r.slice(0,r.length-1),p=[];for(let x=0;x<o.length;x+=2)p.push(parseInt(`${o[x]}${o[x+1]}`,16));return Uint8Array.from(p).buffer}t.fromHex=n})(qt||(qt={}));qt.fromBase64;qt.toBase64;qt.fromHex;qt.toHex;function oa(t){return t.replace(/[_-][a-z]/g,f=>f.slice(1).toUpperCase())}function aa(t,f,D){const c=[];let e=0;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r>=65&&r<=90){if(e===1){const o=t.charCodeAt(n+1);o>=97&&o<=122&&c.push(D),c.push(r+32)}else e!==0&&c.push(D),c.push(r+32);e=1}else r>=97&&r<=122?(c.push(r),e=2):f.includes(r)?(e!==0&&c.push(D),e=0):c.push(r)}return String.fromCharCode(...c)}function sa(t){return aa(t,[45,95],45)}var ra=oa,la=sa,Mi;(t=>{t.millisecond=1,t.second=1e3,t.minute=t.second*60,t.hour=t.minute*60,t.day=t.hour*24,t.week=t.day*7;let f=new Date().getTimezoneOffset();function D(d){f=d}t.setTimezoneOffset=D;function c(){return f}t.getTimezoneOffset=c;function e(d=new Date,v){return typeof d=="number"&&(d=new Date(d)),v===void 0&&(v=f),Math.floor((d.valueOf()/t.minute-v)/1440)}t.getDateNumber=e;function n(d,v){const $=new Date(d*t.day);return v===void 0&&(v=f),new Date(+$+v*t.minute)}t.fromDateNumber=n;const r=/\d+(?:\.\d+)?/.source,o=new RegExp(`^${["w(?:eek(?:s)?)?","d(?:ay(?:s)?)?","h(?:our(?:s)?)?","m(?:in(?:ute)?(?:s)?)?","s(?:ec(?:ond)?(?:s)?)?"].map(d=>`(${r}${d})?`).join("")}$`);function p(d){const v=o.exec(d);return v?(parseFloat(v[1])*t.week||0)+(parseFloat(v[2])*t.day||0)+(parseFloat(v[3])*t.hour||0)+(parseFloat(v[4])*t.minute||0)+(parseFloat(v[5])*t.second||0):0}t.parseTime=p;function x(d){const v=p(d);return v?d=Date.now()+v:/^\d{1,2}(:\d{1,2}){1,2}$/.test(d)?d=`${new Date().toLocaleDateString()}-${d}`:/^\d{1,2}-\d{1,2}-\d{1,2}(:\d{1,2}){1,2}$/.test(d)&&(d=`${new Date().getFullYear()}-${d}`),d?new Date(d):new Date}t.parseDate=x;function i(d){const v=Math.abs(d);return v>=t.day-t.hour/2?Math.round(d/t.day)+"d":v>=t.hour-t.minute/2?Math.round(d/t.hour)+"h":v>=t.minute-t.second/2?Math.round(d/t.minute)+"m":v>=t.second?Math.round(d/t.second)+"s":d+"ms"}t.format=i;function s(d,v=2){return d.toString().padStart(v,"0")}t.toDigits=s;function a(d,v=new Date){return d.replace("yyyy",v.getFullYear().toString()).replace("yy",v.getFullYear().toString().slice(2)).replace("MM",s(v.getMonth()+1)).replace("dd",s(v.getDate())).replace("hh",s(v.getHours())).replace("mm",s(v.getMinutes())).replace("ss",s(v.getSeconds())).replace("SSS",s(v.getMilliseconds(),3))}t.template=a})(Mi||(Mi={}));var ua=Object.defineProperty,ca=Object.getOwnPropertyNames,Pe=(t,f)=>ua(t,"name",{value:f,configurable:!0}),fa=(t,f)=>function(){return f||(0,t[ca(t)[0]])((f={exports:{}}).exports,f),f.exports},da=fa({"src/index.ts"(t,f){var r;var D=Symbol.for("satori.element"),c=(r=class{get data(){return this.attrs}getTagName(){var p;return this.type==="component"?((p=this.attrs.is)==null?void 0:p.name)??"component":this.type}toAttrString(){return Object.entries(this.attrs).map(([p,x])=>Pt(x)?"":(p=la(p),x===!0?` ${p}`:x===!1?` no-${p}`:` ${p}="${e.escape(""+x,!0)}"`)).join("")}toString(p=!1){if(this.type==="text"&&"content"in this.attrs)return p?this.attrs.content:e.escape(this.attrs.content);const x=this.children.map(a=>a.toString(p)).join("");if(p)return x;const i=this.toAttrString(),s=this.getTagName();return this.children.length?`<${s}${i}>${x}</${s}>`:`<${s}${i}/>`}},Pe(r,"ElementConstructor"),r);Ci(c,"name","Element"),Ci(c.prototype,D,!0);function e(o,...p){const x=Object.create(c.prototype),i={},s=[];if(p[0]&&typeof p[0]=="object"&&!e.isElement(p[0])&&!Array.isArray(p[0])){const a=p.shift();for(const[d,v]of Object.entries(a))Pt(v)||(d==="children"?p.push(...na(v)):i[ra(d)]=v)}for(const a of p)s.push(...e.toElementArray(a));return typeof o=="function"&&(i.is=o,o="component"),Object.assign(x,{type:o,attrs:i,children:s})}Pe(e,"Element");var n=new Function("expr","context",`
|
|
3
|
+
try {
|
|
4
|
+
with (context) {
|
|
5
|
+
return eval(expr)
|
|
6
|
+
}
|
|
7
|
+
} catch {}
|
|
8
|
+
`);(o=>{o.jsx=o,o.jsxs=o,o.jsxDEV=o,o.Fragment="template";function p(u){return u&&typeof u=="object"&&u[D]}o.isElement=p,Pe(p,"isElement");function x(u){if(typeof u=="string"||typeof u=="number"||typeof u=="boolean"){if(u=""+u,u)return o("text",{content:u})}else{if(p(u))return u;if(!Pt(u))throw new TypeError(`Invalid content: ${u}`)}}o.toElement=x,Pe(x,"toElement");function i(u){return Array.isArray(u)?u.map(x).filter(Si):[x(u)].filter(Si)}o.toElementArray=i,Pe(i,"toElementArray");function s(u,I){return typeof u=="string"?b(u,I):i(u)}o.normalize=s,Pe(s,"normalize");function a(u,I=!1){const y=(u??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");return I?y.replace(/"/g,"""):y}o.escape=a,Pe(a,"escape");function d(u){return u.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/&#(\d+);/g,(I,y)=>y==="38"?I:String.fromCharCode(+y)).replace(/&#x([0-9a-f]+);/gi,(I,y)=>y==="26"?I:String.fromCharCode(parseInt(y,16))).replace(/&(amp|#38|#x26);/g,"&")}o.unescape=d,Pe(d,"unescape");function v(u,I={}){var E;const y=b(u);return I.caret?I.type&&((E=y[0])==null?void 0:E.type)!==I.type?void 0:y[0]:m(y,I.type||"*")[0]}o.from=v,Pe(v,"from");const $=/ *([ >+~]) */g;function z(u){return u.split(",").map(I=>{const y=[];I=I.trim();let E,j=" ";for(;E=$.exec(I);)y.push({type:I.slice(0,E.index),combinator:j}),j=E[1],I=I.slice(E.index+E[0].length);return y.push({type:I,combinator:j}),y})}o.parseSelector=z,Pe(z,"parseSelector");function m(u,I){if(!u||!I)return[];if(typeof u=="string"&&(u=b(u)),typeof I=="string"&&(I=z(I)),!I.length)return[];let y=[];const E=[];for(const[j,W]of u.entries()){const X=[],Q=[...I,...y];y=[];let P=!1;for(const ie of Q){const{type:fe,combinator:ye}=ie[0];(fe===W.type||fe==="*")&&(ie.length===1?P=!0:[" ",">"].includes(ie[1].combinator)?X.push(ie.slice(1)):ie[1].combinator==="+"?y.push(ie.slice(1)):I.push(ie.slice(1))),ye===" "&&X.push(ie)}P&&E.push(u[j]),E.push(...m(W.children,X))}return E}o.select=m,Pe(m,"select");function V(u,I){if(u=u.trim(),!/^[\w.]+$/.test(u))return n(u,I)??"";let y=I;for(const E of u.split("."))if(y=y[E],Pt(y))return"";return y??""}o.interpolate=V,Pe(V,"interpolate");const K=/(?<comment><!--[\s\S]*?-->)|(?<tag><(\/?)([^!\s>/]*)([^>]*?)\s*(\/?)>)/,N=/(?<comment><!--[\s\S]*?-->)|(?<tag><(\/?)([^!\s>/]*)([^>]*?)\s*(\/?)>)|(?<curly>\{(?<derivative>[@:/#][^\s}]*)?[\s\S]*?\})/,O=/([^\s=]+)(?:="(?<value1>[^"]*)"|='(?<value2>[^']*)')?/g,A=/([^\s=]+)(?:="(?<value1>[^"]*)"|='(?<value2>[^']*)'|=\{(?<curly>[^}]+)\})?/g;let H;(u=>{u[u.OPEN=0]="OPEN",u[u.CLOSE=1]="CLOSE",u[u.EMPTY=2]="EMPTY",u[u.CONTINUE=3]="CONTINUE"})(H||(H={}));function b(u,I){const y=[];function E(P){P&&y.push(P)}Pe(E,"pushText");const j=I?N:K;let W,X=!0;for(;W=j.exec(u);){const{curly:P,comment:ie,derivative:fe}=W.groups,ye=!P;Q(u.slice(0,W.index),X,ye),X=ye,u=u.slice(W.index+W[0].length);const[ve,,,we,Le,Be,Ge]=W;if(!ie){if(P){let Je="",pe=2;fe&&(Je=fe.slice(1),pe={"@":2,"#":0,"/":1,":":3}[fe[0]]),y.push({type:"curly",name:Je,position:pe,source:P,extra:P.slice(1+(fe??"").length,-1)});continue}y.push({type:"angle",source:ve,name:Le||o.Fragment,position:we?1:Ge?2:0,extra:Be})}}Q(u,X,!0);function Q(P,ie,fe){P=d(P),ie&&(P=P.replace(/^\s*\n\s*/,"")),fe&&(P=P.replace(/\s*\n\s*$/,"")),E(P)}return Pe(Q,"parseContent"),T(w(y),I)}o.parse=b,Pe(b,"parse");function w(u){const I=[[{type:"angle",name:o.Fragment,position:0,source:"",extra:"",children:{default:[]}},"default"]];function y(...E){const[j,W]=I[0];j.children[W].push(...E)}Pe(y,"pushToken");for(const E of u){if(typeof E=="string"){y(E);continue}const{name:j,position:W}=E;W===1?I[0][0].name===j&&I.shift():W===3?(I[0][0].children[j]=[],I[0][1]=j):W===0?(y(E),E.children={default:[]},I.unshift([E,"default"])):y(E)}return I[I.length-1][0].children.default}Pe(w,"foldTokens");function T(u,I){const y=[];for(const E of u)if(typeof E=="string")y.push(o("text",{content:E}));else if(E.type==="angle"){const j={},W=I?A:O;let X;for(;X=W.exec(E.extra);){const[,Q,P,ie=P,fe]=X;fe?j[Q]=V(fe,I):Pt(ie)?Q.startsWith("no-")?j[Q.slice(3)]=!1:j[Q]=!0:j[Q]=d(ie)}y.push(o(E.name,j,E.children&&T(E.children.default,I)))}else if(!E.name)y.push(...i(V(E.extra,I)));else if(E.name==="if")n(E.extra,I)?y.push(...T(E.children.default,I)):y.push(...T(E.children.else||[],I));else if(E.name==="each"){const[j,W]=E.extra.split(/\s+as\s+/),X=V(j,I);if(!X||!X[Symbol.iterator])continue;for(const Q of X)y.push(...T(E.children.default,{...I,[W]:Q}))}return y}Pe(T,"parseTokens");function C(u,I,y){const{type:E,attrs:j,children:W}=u;if(typeof I=="function")return I(u,y);{let X=I[typeof E=="string"?E:""]??I.default??!0;return typeof X=="function"&&(X=X(j,W,y)),X}}Pe(C,"visit");function M(u,I,y){const E=typeof u=="string"?b(u):u,j=[];return E.forEach(W=>{const{type:X,attrs:Q,children:P}=W,ie=C(W,I,y);ie===!0?j.push(o(X,Q,M(P,I,y))):ie!==!1&&j.push(...i(ie))}),typeof u=="string"?j.join(""):j}o.transform=M,Pe(M,"transform");async function R(u,I,y){const E=typeof u=="string"?b(u):u,j=(await Promise.all(E.map(async W=>{const{type:X,attrs:Q,children:P}=W,ie=await C(W,I,y);return ie===!0?[o(X,Q,await R(P,I,y))]:ie!==!1?i(ie):[]}))).flat(1);return typeof u=="string"?j.join(""):j}o.transformAsync=R,Pe(R,"transformAsync");function S(u,...I){return(...y)=>{const E=o(u);return I.forEach((j,W)=>{Pt(y[W])||(E.attrs[j]=y[W])}),y[I.length]&&Object.assign(E.attrs,y[I.length]),E}}Pe(S,"createFactory"),o.warn=Pe(()=>{},"warn");function L(u){return(I,...y)=>{let E="base64://";return typeof y[0]=="string"&&(E=`data:${y.shift()};base64,`),gn("Buffer",I)?I=E+I.toString("base64"):gn("ArrayBuffer",I)?I=E+qt.toBase64(I):ArrayBuffer.isView(I)&&(I=E+qt.toBase64(I.buffer)),I.startsWith("base64://")&&(0,o.warn)('protocol "base64:" is deprecated and will be removed in the future, please use "data:" instead'),o(u,{...y[0],src:I})}}Pe(L,"createAssetFactory"),o.text=S("text","content"),o.at=S("at","id"),o.sharp=S("sharp","id"),o.quote=S("quote","id"),o.emoji=S("emoji","id"),o.image=L("img"),o.img=L("img"),o.video=L("video"),o.audio=L("audio"),o.file=L("file");function g(u,I){return o("i18n",typeof u=="string"?{path:u}:u,I)}o.i18n=g,Pe(g,"i18n")})(e||(e={})),f.exports=e}});const Ht=da(),ha=/^[a-z][a-z0-9_:-]*$/i;function ma(t,f){const D=t.trim(),c=f.trim();if(!ha.test(D)||c.length===0)return null;const e=D.toLowerCase();return e==="text"?Ht.text(f):e==="img"||e==="image"?Ht.img(c):e==="file"?Ht.file(c):e==="video"?Ht.video(c):e==="audio"||e==="record"?Ht.audio(c):e==="json"||e==="xml"?Ht(e,{data:c}):Ht(e==="markdown"?"markdown":D,c)}function oi(t,f,D){if(!D)return f;const c=t==null?void 0:t[D];if(c==null)throw new Error(`Key is ${c} on item (keyField is '${D}')`);return c}function Mn(t,f){return t.map((D,c)=>oi(D,c,f))}function ga(t,f,D){const c=[],e=[];for(let n=0;n<t.length;n++){const r=t[n],o=oi(r,n,f),p=D(r,n,o);c.push(o),e.push(typeof p=="number"&&p>0?p:null)}return{keys:c,sizes:e}}function pa(t,f,D){if(!t||t.keys.length!==f.length||t.sizes.length!==f.length)return!1;for(let c=0;c<f.length;c++)if(t.keys[c]!==oi(f[c],c,D))return!1;return!0}function va(t,f,D){if(!pa(t,f,D))return{};const c={};for(let e=0;e<t.keys.length;e++){const n=t.sizes[e];typeof n=="number"&&n>0&&(c[t.keys[e]]=n)}return c}function ya(t,f){if(!t.length||f.length<=t.length)return 0;const D=t[0],c=f.indexOf(D);if(c<=0||c+t.length<f.length&&t.length>f.length-c)return 0;for(let e=0;e<t.length;e++)if(f[c+e]!==t[e])return 0;return c}function Ai(t,f,D,c,e,n=0){const r=e??"start";if(r==="nearest"){const o=D+c,p=t+f;return t>=D&&p<=o?null:t<D?t+n:p-c+n}return r==="end"?t+f-c+n:r==="center"?t+(f-c)/2+n:t+n}const wa={itemsLimit:1e3};function ji(t){return typeof window<"u"&&t===window}const ba=(()=>{if(typeof document>"u")return"negative";const t=document.createElement("div"),f=document.createElement("div");t.style.width="4px",t.style.height="1px",t.style.overflow="auto",t.style.direction="rtl",f.style.width="8px",f.style.height="1px",t.appendChild(f),document.body.appendChild(t),t.scrollLeft=-1;const D=t.scrollLeft<0;return document.body.removeChild(t),D?"negative":"default"})();function nn(t,f,D){return f!=="horizontal"||!D||ji(D)||getComputedStyle(D).direction!=="rtl"?t:ba==="negative"?-t:t}function ka(t,f,D){return nn(t,f,D)}function Kn(t,f,D,c){const e=ka(D,f,t),n=!!(c!=null&&c.smooth);if(ji(t)){f==="vertical"?t.scrollTo({top:e,behavior:n?"smooth":"auto"}):t.scrollTo({left:e,behavior:n?"smooth":"auto"});return}if(typeof t.scrollTo=="function"){t.scrollTo(f==="vertical"?{top:e,behavior:n?"smooth":"auto"}:{left:e,behavior:n?"smooth":"auto"});return}f==="vertical"?t.scrollTop=e:t.scrollLeft=e}function _a(t,f,D){return D?f==="vertical"?window.innerHeight:window.innerWidth:f==="vertical"?t.clientHeight:t.clientWidth}const Ia=/auto|scroll/;function Vi(t,f){return t.parentNode===null?f:Vi(t.parentNode,[...f,t])}function Qn(t,f){return getComputedStyle(t,null).getPropertyValue(f)}function Sa(t){return Qn(t,"overflow")+Qn(t,"overflow-y")+Qn(t,"overflow-x")}function Ca(t){return Ia.test(Sa(t))}function An(t){if(!(t instanceof HTMLElement||t instanceof SVGElement))return;const f=Vi(t.parentNode,[]);for(let D=0;D<f.length;D+=1)if(f[D]instanceof Element&&Ca(f[D]))return f[D];return document.scrollingElement||document.documentElement}let ti=!1;function Ma(){return ti}if(typeof window<"u"){ti=!1;try{const t=Object.defineProperty({},"passive",{get(){ti=!0}});window.addEventListener("test",null,t)}catch{}}let Aa=0;function Gn(t){const f=t;f._vs_styleStamp++}function xa(t,f,D){const c=t==null?void 0:t[D];if(c==null)throw new Error(`Key is ${c} on item (keyField is '${D}')`);return c}function Ea(t,f,D,c,e){const n=he([]),r=he(0),o=he(!1);let p=0,x=0;const i=new Map,s=new Map;let a=!1,d=0,v=0,$=!1,z=null,m=null,V=null,K=0,N=null,O=[],A=null,H=null,b=null,w=!1;const T=new Set,C=he({}),M=Vt(()=>{const q=Se(t);return q.items.length>0&&typeof q.items[0]!="object"}),R=Vt(()=>{const q=Se(t);if(q.itemSize===null){const J={[-1]:{accumulator:0}},ne=q.items,ae=q.sizeField??"size",re=q.minItemSize,le=C.value;let de=1e4,xe=0,rt;for(let ze=0,Xe=ne.length;ze<Xe;ze++){const We=M.value?ze:xa(ne[ze],ze,q.keyField);rt=le[We]||ne[ze][ae]||re,rt<de&&(de=rt),xe+=rt,J[ze]={accumulator:xe,size:rt}}return K=de,J}return[]}),S=Vt(()=>n.value.filter(q=>q.nr.used).sort((q,J)=>q.nr.index-J.nr.index)),L=Vt(()=>{const q=Se(t),J=M.value?null:q.keyField;return ga(q.items,J,(ne,ae,re)=>q.itemSize!=null?q.itemSize:C.value[re]||(ne==null?void 0:ne[q.sizeField??"size"])||void 0)});function g(q){const J=Se(t);return C.value=va(q,J.items,M.value?null:J.keyField),Object.keys(C.value).length>0}function u(q){let J=s.get(q);return J||(J=[],s.set(q,J)),J}function I(q,J,ne,ae,re){const le=dn({id:Aa++,index:J,used:!0,key:ae,type:re}),de=$o({item:ne,position:0,offset:0,nr:le,_vs_styleStamp:0});return q.push(de),de}function y(q){const J=u(q);if(J&&J.length){const ne=J.pop();return ne.nr.used=!0,Gn(ne),ne}}function E(q){const J=q.nr.type;u(J).push(q),q.nr.used=!1,q.position=-9999,Gn(q),i.delete(q.nr.key)}function j(){i.clear(),s.clear();for(let q=0,J=n.value.length;q<J;q++){const ne=n.value[q];ne&&E(ne)}}function W(q){let J=-1;return J=requestAnimationFrame(()=>{T.delete(J),q()}),T.add(J),J}function X(){for(const q of T)cancelAnimationFrame(q);T.clear()}function Q(){z&&(clearTimeout(z),z=null),m&&(clearTimeout(m),m=null),V&&(clearTimeout(V),V=null),H&&(clearTimeout(H),H=null),b&&(clearTimeout(b),b=null)}function P(){var q;(q=e==null?void 0:e.onResize)==null||q.call(e),o.value&&me(!1)}function ie(){A&&!w&&pe();const q=Se(t);if(!a){if(a=!0,z)return;const J=()=>W(()=>{a=!1;const{continuous:ne}=me(!1,!0);ne||(m&&clearTimeout(m),m=setTimeout(ie,q.updateInterval+100))});J(),q.updateInterval&&(z=setTimeout(()=>{z=null,a&&J()},q.updateInterval))}}function fe(q,J){var ne,ae;o.value&&(q||J.boundingClientRect.width!==0||J.boundingClientRect.height!==0?((ne=e==null?void 0:e.onVisible)==null||ne.call(e),W(()=>{me(!1)})):(ae=e==null?void 0:e.onHidden)==null||ae.call(e))}function ye(){const q=Se(f),J=q?An(q):void 0;return window.document&&(J===window.document.documentElement||J===window.document.body)?window:J||window}function ve(){const q=Se(D);return q?Se(t).direction==="vertical"?q.scrollHeight:q.scrollWidth:0}function we(){const q=Se(f);if(!q)return{start:0,end:0};const J=Se(t),ne=J.direction==="vertical";let ae;if(J.pageMode){const re=q.getBoundingClientRect(),le=ne?re.height:re.width;let de=-(ne?re.top:re.left),xe=ne?window.innerHeight:window.innerWidth;de<0&&(xe+=de,de=0),de+xe>le&&(xe=le-de),ae={start:de,end:de+xe}}else ne?ae={start:q.scrollTop,end:q.scrollTop+q.clientHeight}:ae={start:nn(q.scrollLeft,J.direction,q),end:nn(q.scrollLeft,J.direction,q)+q.clientWidth};return ae}function Le(){const q=Se(f);if(!q)return{start:0,end:0};if(Se(t).direction==="vertical"){const J=nn(q.scrollLeft,"horizontal",q);return{start:J,end:J+q.clientWidth}}return{start:q.scrollTop,end:q.scrollTop+q.clientHeight}}function Be(q){const J=Se(t);if(J.itemSize!=null)return J.itemSize;const ne=R.value[q];return(ne==null?void 0:ne.size)||Number(J.minItemSize)||0}function Ge(q){var J;const ne=Se(t),ae=ne.gridItems||1;return q<=0?0:ne.itemSize!=null?Math.floor(q/ae)*ne.itemSize:((J=R.value[q-1])==null?void 0:J.accumulator)||0}function Je(q){const J=Se(t),ne=J.items.length,ae=J.gridItems||1;if(!ne)return 0;if(J.itemSize!=null){const xe=Math.floor(q/J.itemSize)*ae;return Math.min(Math.max(xe,0),ne-1)}let re=0,le=ne-1,de=0;for(;re<=le;){const xe=Math.floor((re+le)/2);Ge(xe)<=q?(de=xe,re=xe+1):le=xe-1}return de}function pe(){H&&(clearTimeout(H),H=null),A=null}function Oe(){H&&clearTimeout(H),H=setTimeout(()=>{A=null,H=null},150)}function _e(q,J){if(!q.length){pe();return}const ne=Math.max(we().start-ve(),0),ae=Math.min(Je(ne),q.length-1),re=q[ae],le=J?re==null?void 0:re[J]:ae;if(le==null){pe();return}const de=ve()+Ge(ae);A={key:le,offset:we().start-de}}function be(q){if(!A)return!1;const J=Se(t),ne=q??J.items,ae=M.value?null:J.keyField,re=Mn(ne,ae).indexOf(A.key);if(re===-1)return pe(),!1;const le=ve()+Ge(re)+A.offset,de=we().start;return Math.abs(le-de)<.5?!1:(w=!0,kt(le),W(()=>{w=!1}),!0)}function je(){Se(t).pageMode?Re():Ne()}function Re(){N=ye(),N.addEventListener("scroll",ie,Ma()?{passive:!0}:!1),N.addEventListener("resize",P)}function Ne(){N&&(N.removeEventListener("scroll",ie),N.removeEventListener("resize",P),N=null)}function tt(q,J,ne,ae,re,le){const de=Math.ceil(q/J)*ne,xe=Math.max(0,Math.floor(re.start/ne)),rt=Math.min(Math.ceil(re.end/ne),Math.ceil(q/J)),ze=Math.max(0,Math.floor(le.start/ae)),Xe=Math.min(Math.ceil(le.end/ae),J),We=[];for(let lt=xe;lt<rt;lt++){const wt=lt*J;for(let nt=ze;nt<Xe;nt++){const it=wt+nt;if(it>=q)break;We.push(it)}}const Ie=We[0]??0,He=We.at(-1)??-1;return{renderedIndices:We,startIndex:Ie,endIndex:He+1,visibleStartIndex:Ie,visibleEndIndex:He,totalSize:de}}function Ve(){const q=Se(t);if(!q.gridItems||q.itemSize==null)return!1;const J=Se(f);if(!J)return!1;const ne=q.itemSecondarySize||q.itemSize,ae=q.direction==="vertical"?J.clientWidth:J.clientHeight;return ne*q.gridItems>ae}function me(q,J=!1){var ne,ae;const re=Se(t),le=re.itemSize,de=re.gridItems||1,xe=re.itemSecondarySize||le,rt=K,ze=re.typeField,Xe=M.value?null:re.keyField,We=re.items,Ie=We.length,He=R.value,lt=i,wt=n.value;let nt=null,it=null,ut,Ue,Et,_t,mt;if(!Ie)ut=Ue=_t=mt=Et=0;else if($)ut=_t=0,Ue=mt=Math.min(re.prerender,We.length),Et=0;else{const Me=we(),Ze=Le();if(J){let et=Me.start-d;et<0&&(et=-et);let Dt=Ze.start-v;Dt<0&&(Dt=-Dt);const Xt=le===null&&et>=rt||le!==null&&et>=le,gt=de>1&&le!=null&&Dt>=xe;if(!Xt&&!gt)return{continuous:!0}}d=Me.start,v=Ze.start;const Ft=re.buffer;Me.start-=Ft,Me.end+=Ft,Ze.start-=Ft,Ze.end+=Ft;let xt=0;const Yt=Se(D);Yt&&(xt=Yt.scrollHeight,Me.start-=xt);const vn=Se(c);if(vn){const et=vn.scrollHeight;Me.end+=et}if(le===null){let et,Dt=0,Xt=Ie-1,gt=~~(Ie/2),yn;do yn=gt,et=He[gt].accumulator,et<Me.start?Dt=gt:gt<Ie-1&&He[gt+1].accumulator>Me.start&&(Xt=gt),gt=~~((Dt+Xt)/2);while(gt!==yn);for(gt<0&&(gt=0),ut=gt,Et=He[Ie-1].accumulator,Ue=gt;Ue<Ie&&He[Ue].accumulator<Me.end;Ue++);for(Ue===-1?Ue=We.length-1:(Ue++,Ue>Ie&&(Ue=Ie)),_t=ut;_t<Ie&&xt+He[_t].accumulator<Me.start;_t++);for(mt=_t;mt<Ie&&xt+He[mt].accumulator<Me.end;mt++);}else if(de>1){const et=tt(Ie,de,le,xe,Me,Ze);nt=et.renderedIndices,it=new Set(nt),ut=et.startIndex,Ue=et.endIndex,_t=et.visibleStartIndex,mt=et.visibleEndIndex,Et=et.totalSize}else{ut=~~(Me.start/le*de);const et=ut%de;ut-=et,Ue=Math.ceil(Me.end/le*de),_t=Math.max(0,Math.floor((Me.start-xt)/le*de)),mt=Math.floor((Me.end-xt)/le*de),ut<0&&(ut=0),Ue>Ie&&(Ue=Ie),_t<0&&(_t=0),mt>Ie&&(mt=Ie),Et=Math.ceil(Ie/de)*le}}Ue-ut>wa.itemsLimit&&Ye(),r.value=Et;let Ce;const sn=ut<=x&&Ue>=p;if(!sn||q)j();else for(let Me=0,Ze=wt.length;Me<Ze;Me++){const Ft=wt[Me];if(Ft&&(Ce=Ft,Ce.nr.used)){const xt=it?it.has(Ce.nr.index):Ce.nr.index>=ut&&Ce.nr.index<Ue,Yt=le||He[Ce.nr.index]&&He[Ce.nr.index].size;(!xt||!Yt)&&E(Ce)}}let Rt,zt;const Hn=nt??Array.from({length:Math.max(0,Ue-ut)},(Me,Ze)=>ut+Ze);for(const Me of Hn){if(!(le||He[Me]&&He[Me].size))continue;Rt=We[Me];const Ze=Xe?Rt[Xe]:Me;if(Ze==null)throw new Error(`Key is ${Ze} on item (keyField is '${Xe}')`);if(Ce=lt.get(Ze),Ce)Ce.item!==Rt&&(Ce.item=Rt),Ce.nr.used||console.warn(`Expected existing view's used flag to be true, got ${Ce.nr.used}`);else{if(zt=Rt[ze],Ce=y(zt),Ce){const Ft=Ce.nr.index!==Me||Ce.nr.key!==Ze;Ce.item=Rt,Ce.nr.index=Me,Ce.nr.key=Ze,Ce.nr.type!==zt&&console.warn("Reused view's type does not match pool's type"),Ft&&Gn(Ce)}else Ce=I(wt,Me,Rt,Ze,zt);lt.set(Ze,Ce)}le===null?(Ce.position=((ne=He[Me-1])==null?void 0:ne.accumulator)||0,Ce.offset=0):(Ce.position=Math.floor(Me/de)*le,Ce.offset=Me%de*xe)}return p=ut,x=Ue,re.emitUpdate&&((ae=e==null?void 0:e.onUpdate)==null||ae.call(e,ut,Ue,_t,mt)),V&&clearTimeout(V),V=setTimeout(Lt,re.updateInterval+300),{continuous:sn}}function Ye(){throw b=setTimeout(()=>{b=null,console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",Se(f)),console.warn("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")}function At(){if(Ve())return!1;const q=n.value.filter(({nr:J})=>J.used);for(let J=1;J<q.length;J++)if(q[J].nr.index!==q[J-1].nr.index+1)return!0;return!1}function Lt(){n.value.sort((q,J)=>q.nr.index-J.nr.index),At()&&(me(!1),V&&clearTimeout(V))}function qe(q,J){const ne=Se(t),ae=Se(f);if(!ae)return;const re=Math.max(0,Math.min(q,ne.items.length-1)),le=we().start,de=_a(ae,ne.direction,ne.pageMode),xe=Ge(re),rt=Be(re),ze=Ai(xe,rt,le,de,J==null?void 0:J.align,(J==null?void 0:J.offset)??0);if(ze!=null&&(kt(ze,J),ne.gridItems&&ne.itemSize!=null)){const Xe=Se(f);if(!Xe)return;const We=ne.gridItems,Ie=ne.itemSecondarySize||ne.itemSize,He=re%We*Ie,lt=ne.direction==="vertical"?"horizontal":"vertical",wt=lt==="horizontal"?nn(Xe.scrollLeft,"horizontal",Xe):Xe.scrollTop,nt=lt==="horizontal"?Xe.clientWidth:Xe.clientHeight,it=Ai(He,Ie,wt,nt,J==null?void 0:J.align,(J==null?void 0:J.offset)??0);it!=null&&Kn(Xe,lt,it,J)}}function kt(q,J){const ne=Se(t),ae=Se(f);if(ae)if(ne.pageMode){const re=An(ae),le=re.getBoundingClientRect(),de=ae.getBoundingClientRect(),xe=ne.direction==="vertical"?"top":"left",rt=An(ae)===document.documentElement||An(ae)===document.body?ne.direction==="vertical"?window.scrollY:window.scrollX:nn(ne.direction==="vertical"?re.scrollTop:re.scrollLeft,ne.direction,re),ze=de[xe]-le[xe];Kn(re.tagName==="HTML"?window:re,ne.direction,q+rt+ze,J)}else Kn(ae,ne.direction,q,J)}const De=Se(t);return O=Mn(De.items,De.items.length>0&&typeof De.items[0]!="object"?null:De.keyField),De.cache&&g(De.cache),De.prerender&&($=!0,me(!1)),De.gridItems&&!De.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"),pn(()=>{je(),ht(()=>{$=!1,me(!0),o.value=!0})}),Fo(()=>{const q=d;typeof q=="number"&&ht(()=>{kt(q)})}),ni(()=>{Q(),X(),Ne()}),Ct(()=>Se(t).cache,q=>{g(q),me(!0)}),Ct(()=>Se(t).items,(q,J)=>{const ne=Se(t),ae=M.value?null:ne.keyField,re=Mn(q,ae);if(ne.shift){const le=J?Mn(J,ae):O;ya(le,re)>0?_e(J??[],ae):pe()}else pe();O=re,be(q),me(!0)}),Ct(()=>Se(t).pageMode,()=>{je(),me(!1)}),Ct(R,()=>{be()&&Oe(),me(!1)},{deep:!0}),Ct(()=>Se(t).gridItems,()=>{me(!0)}),Ct(()=>Se(t).itemSecondarySize,()=>{me(!0)}),{pool:n,visiblePool:S,totalSize:r,ready:o,sizes:R,simpleArray:M,scrollToItem:qe,scrollToPosition:kt,getScroll:we,findItemIndex:Je,getItemOffset:Ge,getItemSize:Be,cacheSnapshot:L,restoreCache:g,updateVisibleItems:me,handleScroll:ie,handleResize:P,handleVisibilityChange:fe,sortViews:Lt}}const ai=new WeakMap;function Fa(t){return typeof t=="function"?{callback:t,observer:null,intersection:void 0,visible:null}:{callback:t.callback,observer:null,intersection:t.intersection,visible:null}}function xi(t,f){qi(t);const D=Fa(f.value);if(ai.set(t,D),typeof IntersectionObserver>"u"){const c=t.getBoundingClientRect();D.visible=!0,D.callback(!0,{boundingClientRect:c});return}D.observer=new IntersectionObserver(c=>{const e=c[0],n=!!(e!=null&&e.isIntersecting);D.visible!==null&&D.visible===n||(D.visible=n,D.callback(n,e))},D.intersection),D.observer.observe(t)}function qi(t){const f=ai.get(t);f!=null&&f.observer&&(f.observer.disconnect(),f.observer=null)}const $a={mounted(t,f){xi(t,f)},updated(t,f){f.value!==f.oldValue&&xi(t,f)},unmounted(t){qi(t),ai.delete(t)}},Ta=Nt({__name:"ItemView",props:{view:{},itemTag:{}},setup(t){const f=t;return(D,c)=>(G(),$e($i(f.itemTag),{class:"vue-recycle-scroller__item-view"},{default:St(()=>[Gt(D.$slots,"default",{item:f.view.item,index:f.view.nr.index,active:f.view.nr.used})]),_:3}))}}),La=Nt({__name:"ResizeObserver",emits:["notify"],setup(t,{emit:f}){const D=f,c=he();let e=null,n=null;function r(){D("notify")}return pn(()=>{var o;const p=(o=c.value)==null?void 0:o.parentElement;if(p){if(typeof ResizeObserver<"u"){e=new ResizeObserver(()=>{r()}),e.observe(p);return}n=()=>r(),window.addEventListener("resize",n)}}),ni(()=>{e&&(e.disconnect(),e=null),n&&(window.removeEventListener("resize",n),n=null)}),(o,p)=>(G(),te("div",{ref_key:"el",ref:c,class:"vue-recycle-scroller__resize-observer","aria-hidden":"true"},null,512))}}),Ra=(t,f)=>{const D=t.__vccOpts||t;for(const[c,e]of f)D[c]=e;return D},Da=Ra(La,[["__scopeId","data-v-08cc04ab"]]),Ba=Nt({__name:"RecycleScroller",props:{items:{},keyField:{default:"id"},direction:{default:"vertical"},listTag:{default:"div"},itemTag:{default:"div"},itemSize:{default:null},gridItems:{default:void 0},itemSecondarySize:{default:void 0},minItemSize:{default:null},sizeField:{default:"size"},typeField:{default:"type"},buffer:{default:200},pageMode:{type:Boolean,default:!1},shift:{type:Boolean,default:!1},cache:{default:void 0},prerender:{default:0},emitUpdate:{type:Boolean,default:!1},disableTransform:{type:Boolean,default:!1},updateInterval:{default:0},skipHover:{type:Boolean,default:!1},listClass:{default:""},itemClass:{default:""}},emits:["resize","visible","hidden","update","scrollStart","scrollEnd"],setup(t,{expose:f,emit:D}){const c=t,e=D,n=$a,r=he(),o=he(),p=he(),x=he(null),i=Ea(c,r,o,p,{onResize:()=>e("resize"),onVisible:()=>e("visible"),onHidden:()=>e("hidden"),onUpdate:(S,L,g,u)=>{e("update",S,L,g,u),g<=0&&e("scrollStart"),u>=c.items.length-1&&e("scrollEnd")}}),{pool:s,visiblePool:a,totalSize:d,ready:v,scrollToItem:$,scrollToPosition:z,getScroll:m,findItemIndex:V,getItemOffset:K,getItemSize:N,cacheSnapshot:O,restoreCache:A,updateVisibleItems:H,handleScroll:b,handleResize:w,handleVisibilityChange:T}=i;function C(S){x.value=S}function M(){x.value=null}const R=Vt(()=>{const S={[c.direction==="vertical"?"minHeight":"minWidth"]:`${d.value}px`};if(c.gridItems&&c.itemSize!=null){const L=(c.itemSecondarySize||c.itemSize)*c.gridItems;S[c.direction==="vertical"?"minWidth":"minHeight"]=`${L}px`}return S});return f({el:r,visiblePool:a,scrollToItem:$,scrollToPosition:z,getScroll:m,findItemIndex:V,getItemOffset:K,getItemSize:N,cacheSnapshot:O,restoreCache:A,updateVisibleItems:H}),(S,L)=>Ae((G(),te("div",{ref_key:"el",ref:r,class:dt(["vue-recycle-scroller",{"grid-mode":c.gridItems,ready:B(v),"page-mode":c.pageMode,[`direction-${c.direction}`]:!0}]),onScrollPassive:L[0]||(L[0]=(...g)=>B(b)&&B(b)(...g))},[S.$slots.before?(G(),te("div",{key:0,ref_key:"before",ref:o,class:"vue-recycle-scroller__slot"},[Gt(S.$slots,"before")],512)):ge("",!0),(G(),$e($i(c.listTag),{style:xn(R.value),class:dt(["vue-recycle-scroller__item-wrapper",c.listClass])},{default:St(()=>[(G(!0),te(ke,null,yt(B(s),g=>(G(),$e(Ta,vi({key:g.nr.id,view:g,"item-tag":c.itemTag,style:B(v)?[c.disableTransform?{[c.direction==="vertical"?"top":"left"]:`${g.position}px`,willChange:"unset"}:{transform:`translate${c.direction==="vertical"?"Y":"X"}(${g.position}px) translate${c.direction==="vertical"?"X":"Y"}(${g.offset}px)`},{width:c.gridItems?`${c.direction==="vertical"&&c.itemSecondarySize||c.itemSize}px`:void 0,height:c.gridItems?`${c.direction==="horizontal"&&c.itemSecondarySize||c.itemSize}px`:void 0,visibility:g.nr.used?"visible":"hidden"}]:null,class:["vue-recycle-scroller__item-view",[c.itemClass,{hover:!c.skipHover&&x.value===g.nr.key}]]},Eo(c.skipHover?{}:{mouseenter:()=>{C(g.nr.key)},mouseleave:()=>{M()}})),{default:St(u=>[Gt(S.$slots,"default",vi({ref_for:!0},u))]),_:2},1040,["view","item-tag","style","class"]))),128)),c.items.length===0?Gt(S.$slots,"empty",{key:0}):ge("",!0)]),_:3},8,["style","class"])),S.$slots.after?(G(),te("div",{key:1,ref_key:"after",ref:p,class:"vue-recycle-scroller__slot"},[Gt(S.$slots,"after")],512)):ge("",!0),oe(Da,{onNotify:B(w)},null,8,["onNotify"])],34)),[[B(n),B(T)]])}}),Oa={key:0,class:"chat-info-pan"},Ua={class:"ss-card chat-info"},Na={key:0},za={key:1},Ha={class:"chat-info-base user"},Pa=["src"],ja={key:0},Va={class:"info-copy"},qa={class:"info-copy"},Wa={class:"info-copy"},Ka={style:{"word-break":"break-all"}},Qa={key:1},Ga=["innerHTML"],Ja={class:"tags"},Ya={key:2},Xa={class:"info-copy"},Za={class:"info-copy"},es={class:"info-copy"},ts={style:{"word-break":"break-all"}},ns={class:"info-copy"},is=["name"],os={class:"search-view"},as={for:"info-member-search",class:"sr-only"},ss=["placeholder"],rs={class:"member-item edit"},ls=["src"],us=["onClick"],cs=["onClick"],fs=["src"],ds={class:"opt-item"},hs={for:"info-member-card"},ms={key:0,class:"opt-item"},gs={for:"info-member-title"},ps={class:"opt-item"},vs={for:"info-member-ban-min"},ys=Nt({name:"ViewInfo",__name:"Info",props:{tags:{},chat:{}},emits:["close"],setup(t,{emit:f}){const D=Dn(),c=Ti(),e=Bn(),n=Li(),r=t,o=f,{t:p}=On.global;function x(I){const y=String(I??"");return!y||y==="/img/icons/icon.svg"||y.includes("/img/icons/icon.svg")}function i(){return String(r.chat.show.channel_id||r.chat.show.channelId||r.chat.info.user_info.channel_id||r.chat.info.user_info.channelId||String(r.chat.show.id))}function s(){return String(r.chat.show.channel_id||r.chat.show.channelId||r.chat.info.group_info.channel_id||r.chat.info.group_info.channelId||String(r.chat.show.id))}const a=he([]),d=he(""),v=he({}),$=he({});function z(I){return typeof I!="object"||I===null?{}:I}function m(I){return String(z(I).user_id??"")}function V(I){const y=z(I);return String(y.card||y.nickname||y.name||m(I))}function K(I){return String(z(I).avatar??"")}function N(I){return String(z(I).role??"")}const O=he({banMin:0});function A(I,y,E){const j={title:p("提醒"),html:`<span>${p("真的要将 {user} 移出群聊吗",{user:I})}</span>`,button:[{text:p("确定"),fun:()=>{st.send("set_group_kick",{group_id:y,user_id:E},"setGroupKick"),n.popBoxList.shift(),v.value={};const W={title:p("操作"),html:`<span>${p("正在确认操作……")}</span>`};n.popBoxList.push(W),yi(1e3).then(()=>(wi(String(e.chatInfo.show.id)),yi(1e3))).then(()=>{wi(String(e.chatInfo.show.id)),n.popBoxList.shift()})}},{text:p("取消"),master:!0,fun:()=>{n.popBoxList.shift()}}]};n.popBoxList.push(j)}function H(I){const y=new ct;an.config.globalProperties.$copyText(String(I)).then(()=>{y.add(Te.INFO,p("复制成功"),!0)},()=>{y.add(Te.ERR,p("复制失败"),!0)})}function b(I,y){const E=I.target.value;if(E!==""){const j=parseInt(E);if(j>0){const W={title:p("操作"),html:`<span>${p("确认禁言?")}</span>`,button:[{text:p("确认"),fun:()=>{var Q;const X=(Q=D.jsonMap.ban_mumber)==null?void 0:Q.name;X&&st.send(X,{group_id:e.chatInfo.show.id,user_id:y.user_id,duration:j*60},"banMumber"),n.popBoxList.shift(),R()}},{text:p("取消"),master:!0,fun:()=>{$.value=JSON.parse(JSON.stringify(y)),n.popBoxList.shift()}}]};n.popBoxList.push(W)}}}function w(I,y){const E=I.target.value;if(v.value.card!==E){const j={title:p("操作"),html:`<span>${p("确认修改昵称?")}</span>`,button:[{text:p("确认"),fun:()=>{var X;const W=(X=D.jsonMap.set_group_nickname)==null?void 0:X.name;W&&st.send(W,{group_id:e.chatInfo.show.id,user_id:y.user_id,card:E},"updateGroupMemberInfo"),n.popBoxList.shift(),R()}},{text:p("取消"),master:!0,fun:()=>{$.value=JSON.parse(JSON.stringify(y)),n.popBoxList.shift()}}]};n.popBoxList.push(j)}}function T(I,y){const E=I.target.value;if(v.value.card!==E){const j={title:p("操作"),html:`<span>${p("确认修改头衔?")}</span>`,button:[{text:p("确认"),fun:()=>{var X;const W=(X=D.jsonMap.set_group_title)==null?void 0:X.name;W&&st.send(W,{group_id:e.chatInfo.show.id,user_id:y.user_id,special_title:E},"updateGroupMemberInfo"),n.popBoxList.shift(),R()}},{text:p("取消"),master:!0,fun:()=>{$.value=JSON.parse(JSON.stringify(y)),n.popBoxList.shift()}}]};n.popBoxList.push(j)}}function C(I){I<1e10&&(I*=1e3);const y=new Date().getTime(),E=I-y;return E>0?Math.floor(E/1e3/60):0}function M(I){const y=I.target.value;if(y!==""){const E=parseInt(y);isNaN(E)?I.target.value="":E<0&&(I.target.value="0")}}function R(){v.value={},o("close")}function S(I){if(I.user_id!=D.loginInfo.uin){let y=c.userList.find(E=>E.user_id==I.user_id);y||(y={user_id:I.user_id,nickname:p("临时会话"),remark:I.user_id,group_id:I.group_id,group_name:""}),c.baseOnMsgList.set(String(I.user_id),y),ht(()=>{if(y){const E=document.getElementById("user-"+y.user_id);E&&E.click()}})}}function L(I){u(I.role)?(v.value=I,$.value=JSON.parse(JSON.stringify(I)),O.value.banMin=C(I.shut_up_timestamp)):H(I.user_id)}function g(I){I&&(d.value=I.target.value);const y=d.value.trim();if(!y){a.value=[];return}const E=y.toLowerCase(),j=Array.isArray(r.chat.info.group_members)?r.chat.info.group_members:[];a.value=Di(j).filter(W=>{const X=V(W).toLowerCase(),Q=m(W);return X.includes(E)||Q.includes(y)||Q.toLowerCase().includes(E)})}Ct(()=>r.chat.info.group_members,()=>{d.value.trim()&&g()},{deep:!0});function u(I){return r.chat.info.me_info.role==="owner"||r.chat.info.me_info.role==="admin"&&I!=="owner"}return(I,y)=>{const E=Un("font-awesome-icon");return t.tags.openChatInfo?(G(),te("div",Oa,[k("div",Ua,[k("header",null,[t.chat.show.type==="group"?(G(),te("span",Na,Y(B(p)("群资料")),1)):ge("",!0),t.chat.show.type==="user"?(G(),te("span",za,Y(B(p)("好友")),1)):ge("",!0),oe(E,{icon:["fas","xmark"],onClick:R})]),k("div",Ha,[k("div",null,[k("img",{"data-avatar":"",src:t.chat.show.avatar||"/img/icons/icon.svg",onError:y[0]||(y[0]=(...j)=>B(Fn)&&B(Fn)(...j))},null,40,Pa),k("div",null,[k("a",null,Y(t.chat.show.name),1),k("span",null,Y(t.chat.show.id),1)]),k("div",{style:{display:"flex","align-items":"center","justify-content":"center",cursor:"pointer"},onClick:y[1]||(y[1]=j=>H(t.chat.show.id))},[oe(E,{icon:["fas","copy"]})])]),t.chat.show.type==="group"?(G(),te("div",ja,[k("header",null,[k("span",null,Y(B(p)("群组 ID")),1)]),k("div",Va,[k("span",null,Y(t.chat.show.id),1),oe(E,{icon:["fas","copy"],onClick:y[2]||(y[2]=j=>H(t.chat.show.id))})]),k("header",null,[k("span",null,Y(B(p)("频道 ID")),1)]),k("div",qa,[k("span",null,Y(s()),1),oe(E,{icon:["fas","copy"],onClick:y[3]||(y[3]=j=>H(s()))})]),k("header",null,[k("span",null,Y(B(p)("群头像")),1)]),k("div",Wa,[k("span",Ka,Y(x(t.chat.show.avatar)?B(p)("无"):t.chat.show.avatar),1),x(t.chat.show.avatar)?ge("",!0):(G(),$e(E,{key:0,icon:["fas","copy"],onClick:y[4]||(y[4]=j=>H(t.chat.show.avatar))}))])])):ge("",!0),t.chat.show.type==="group"?Ae((G(),te("div",Qa,[k("header",null,[k("span",null,Y(B(p)("介绍")),1)]),k("span",{innerHTML:t.chat.info.group_info.gIntro===void 0||t.chat.info.group_info.gIntro===""?B(p)("群主很懒,还没有群介绍哦~"):t.chat.info.group_info.gIntro},null,8,Ga),k("div",Ja,[(G(!0),te(ke,null,yt(t.chat.info.group_info.tags,j=>(G(),te("div",{key:j.md},Y(j.tag),1))),128))])],512)),[[at,Object.keys(t.chat.info.group_info).length>0]]):t.chat.show.type==="user"?(G(),te("div",Ya,[k("header",null,[k("span",null,Y(B(p)("用户 ID")),1)]),k("div",Xa,[k("span",null,Y(t.chat.show.id),1),oe(E,{icon:["fas","copy"],onClick:y[5]||(y[5]=j=>H(t.chat.show.id))})]),k("header",null,[k("span",null,Y(B(p)("用户名称")),1)]),k("div",Za,[k("span",null,Y(t.chat.show.name),1),oe(E,{icon:["fas","copy"],onClick:y[6]||(y[6]=j=>H(t.chat.show.name))})]),k("header",null,[k("span",null,Y(B(p)("用户头像链接")),1)]),k("div",es,[k("span",ts,Y(x(t.chat.show.avatar)?B(p)("无"):t.chat.show.avatar),1),x(t.chat.show.avatar)?ge("",!0):(G(),$e(E,{key:0,icon:["fas","copy"],onClick:y[7]||(y[7]=j=>H(t.chat.show.avatar))}))]),k("header",null,[k("span",null,Y(B(p)("频道 ID")),1)]),k("div",ns,[k("span",null,Y(i()),1),oe(E,{icon:["fas","copy"],onClick:y[8]||(y[8]=j=>H(i()))})])])):ge("",!0)]),t.chat.show.type==="group"?(G(),$e(B(Ri),{key:0,class:"chat-info-tab"},{default:St(()=>[k("div",{name:B(p)("成员")},[k("div",os,[k("label",as,Y(B(p)("搜索成员")),1),k("input",{id:"info-member-search",placeholder:B(p)("搜索 ……"),onInput:y[9]||(y[9]=j=>g(j))},null,40,ss)]),oe(B(Ba),{class:"member-scroller",items:d.value.trim()?a.value:t.chat.info.group_members,"item-size":60,"key-field":"user_id"},{default:St(({item:j})=>[k("div",rs,[k("img",{alt:"nk",loading:"lazy","data-avatar":"",src:K(j)||"/img/icons/icon.svg"},null,8,ls),k("div",null,[k("a",{onClick:W=>S(j)},Y(V(j)),9,us),N(j)==="owner"?(G(),$e(E,{key:0,icon:["fas","crown"]})):ge("",!0),N(j)==="admin"?(G(),$e(E,{key:1,icon:["fas","star"]})):ge("",!0)]),k("span",{onClick:W=>L(j)},Y(m(j)),9,cs),u(N(j))?(G(),$e(E,{key:0,icon:["fas","wrench"],onClick:W=>L(j)},null,8,["onClick"])):(G(),$e(E,{key:1,icon:["fas","copy"],onClick:W=>H(m(j))},null,8,["onClick"]))])]),_:1},8,["items"])],8,is)]),_:1})):ge("",!0),k("div",{class:dt("ss-card user-config"+(Object.keys(v.value).length>0?" show":""))},[k("div",null,[k("img",{alt:"nk","data-avatar":"",src:v.value.avatar||"/img/icons/icon.svg"},null,8,fs),k("div",null,[k("a",null,Y(v.value.card!=""?v.value.card:v.value.nickname),1),k("span",null,Y(v.value.user_id),1)]),oe(E,{style:{"margin-right":"20px"},icon:["fas","copy"],onClick:y[10]||(y[10]=j=>H(v.value.user_id))}),oe(E,{icon:["fas","angle-down"],onClick:y[11]||(y[11]=j=>v.value={})})]),k("div",null,[k("header",null,Y(B(p)("成员信息")),1),k("div",ds,[oe(E,{icon:["fas","clipboard-list"]}),k("div",null,[k("label",hs,Y(B(p)("成员昵称")),1),k("span",null,Y(B(p)("啊吧啊吧……")),1)]),Ae(k("input",{id:"info-member-card","onUpdate:modelValue":y[12]||(y[12]=j=>$.value.card=j),style:{width:"50%"},class:"ss-input",type:"text",onChange:y[13]||(y[13]=j=>w(j,v.value))},null,544),[[jt,$.value.card]])]),t.chat.info.me_info.role==="owner"?(G(),te("div",ms,[oe(E,{icon:["fas","clipboard-list"]}),k("div",null,[k("label",gs,Y(B(p)("成员头衔")),1),k("span",null,Y(B(p)("猪咪猪咪")),1)]),Ae(k("input",{id:"info-member-title","onUpdate:modelValue":y[14]||(y[14]=j=>$.value.title=j),style:{width:"50%"},class:"ss-input",type:"text",onChange:y[15]||(y[15]=j=>T(j,v.value))},null,544),[[jt,$.value.title]])])):ge("",!0),t.chat.info.me_info.role==="owner"&&v.value.role!="owner"||t.chat.info.me_info.role==="admin"&&v.value.role==="member"?(G(),te(ke,{key:1},[k("header",null,Y(B(p)("操作")),1),k("div",ps,[oe(E,{icon:["fas","clipboard-list"]}),k("div",null,[k("label",vs,Y(B(p)("禁言成员")),1),k("span",null,Y(B(p)("要让小猫咪不许说话几分钟呢?")),1)]),Ae(k("input",{id:"info-member-ban-min","onUpdate:modelValue":y[16]||(y[16]=j=>O.value.banMin=j),style:{width:"50%"},class:"ss-input",type:"text",onInput:M,onChange:y[17]||(y[17]=j=>b(j,v.value))},null,544),[[jt,O.value.banMin]])]),k("button",{class:"ss-button",onClick:y[18]||(y[18]=j=>A(v.value.nickname,t.chat.show.id,v.value.user_id))},Y(B(p)("移出群聊")),1)],64)):ge("",!0)])],2)])])):ge("",!0)}}}),ws=Nn(ys,[["__scopeId","data-v-317c0ff8"]]),bs=["id"],ks={key:0,class:"note-recall note-base"},_s={key:1,class:"note-ban note-base"},Is={key:1},Ss={key:2,class:"note-recall note-base"},Cs=["innerHTML"],Ms={key:4,class:"note-time note-base"},Qt=Nt({name:"NoticeBody",__name:"NoticeBody",props:["data","id"],emits:["reedit"],setup(t){const f=On.global.t,D=Dn(),c=Bn(),e=t,n=Bi(),r=he(e.data);function o(i){return D.loginInfo.uin===i}function p(i){const s=c.chatInfo.info.group_members.filter(a=>a.user_id===i);return s.length===1?s[0].card===""||s[0].card==null?s[0].nickname:s[0].card:i}function x(i){const s=Math.floor(i/86400),a=Math.floor(i%86400/3600),d=Math.floor(i%3600/60),v=i%60;let $="";return s>0&&($+=`${s} ${f("天")} `),a>0&&($+=`${a} ${f("小时")} `),d>0&&($+=`${d} ${f("分钟")} `),v>0&&($+=`${v} ${f("秒")} `),$}return pn(async()=>{var s;let i=null;if(i=await bt.call(void 0,"win:getWindowInfo",!0),r.value.notice_type&&r.value.notice_type.indexOf("recall")>=0)if(c.chatInfo.show.type==="group"){const a=r.value.operator_id;if(c.chatInfo.info.group_members!==void 0){const d=c.chatInfo.info.group_members.filter(v=>v.user_id===Number(a));d.length===1?r.value.name=d[0].card===""||d[0].card==null?d[0].nickname:d[0].card:r.value.name=a}else r.value.name=a}else r.value.name=c.chatInfo.show.name;if(r.value.sub_type==="poke"&&r.value.pokeMe&&r.value==c.messageList[c.messageList.length-1]){let a=document.getElementById("app");bt.isDesktop()&&(a=(s=document.getElementById("notice-"+e.id))==null?void 0:s.getElementsByClassName("space")[0]),To(a,i)}}),(i,s)=>(G(),te("div",{id:"notice-"+t.id,class:"note"},[t.data.notice_type&&t.data.notice_type.indexOf("recall")>=0?(G(),te("div",ks,[k("a",null,Y(r.value.name),1),k("span",null,Y(B(f)("撤回了一条消息")),1),s[1]||(s[1]=k("div",null,null,-1)),t.data.originMsg?(G(),te("a",{key:0,onClick:s[0]||(s[0]=a=>i.$emit("reedit",t.data.originMsg))},Y(B(f)("重新编辑")),1)):ge("",!0)])):t.data.notice_type=="group_ban"?(G(),te("div",_s,[t.data.sub_type==="ban"?(G(),te(ke,{key:0},[o(t.data.user_id)?(G(),te(ke,{key:0},[k("span",null,Y(B(f)("成员类型_admin")),1),k("a",null," "+Y(p(t.data.operator_id))+" ",1),k("span",null,Y(B(f)("禁言了你")),1),k("span",null," "+Y(x(t.data.duration)),1)],64)):(G(),te(ke,{key:1},[k("span",null,Y(B(f)("管理员禁言了")),1),k("a",null," "+Y(p(t.data.user_id))+" ",1),k("span",null,Y(x(t.data.duration)),1)],64))],64)):(G(),te("span",Is,Y(B(f)("管理员解除了 {name} 的禁言",{name:o(t.data.user_id)?B(f)("你"):p(t.data.user_id)})),1))])):t.data.sub_type==="delete"?(G(),te("div",Ss,[k("span",null,Y(B(f)("这条消息迷失在虚空里了")),1),s[2]||(s[2]=k("div",null,null,-1))])):t.data.sub_type==="poke"?(G(),te("div",{key:3,class:"note-notify note-base",innerHTML:t.data.str+"<div class='space'</div>"},null,8,Cs)):t.data.sub_type==="time"&&t.data.time!=null?(G(),te("div",Ms,[k("a",null,Y(Intl.DateTimeFormat(B(n),B(Oi)(new Date(t.data.time*1e3))).format(new Date(t.data.time*1e3))),1)])):ge("",!0)],8,bs))}}),As=["src","alt"],xs=Nt({__name:"CustomFaceTooltip",props:{url:{}},setup(t){return(f,D)=>(G(),te("img",{src:t.url,alt:f.$t("预览图片加载失败"),class:"custom-face-tooltip"},null,8,As))}}),Es=Nn(xs,[["__scopeId","data-v-28512f0d"]]),Fs={class:"ss-card face-pan"},$s={icon:"fa-solid fa-face-laugh-squint"},Ts={class:"system-face-bar"},Ls={class:"title"},Rs={class:"face"},Ds={class:"title"},Bs={class:"face"},Os={icon:"fa-solid fa-heart"},Us={class:"title"},Ns={class:"face"},zs=["src","alt","onClick"],Hs={class:"title"},Ps={class:"face"},js={key:0,class:"ss-card"},Vs=["src","alt","onClick"],qs={key:0,icon:"fa-solid fa-folder-open"},Ws={class:"system-face-bar custom-face-bar"},Ks={class:"title"},Qs={class:"face"},Gs=["src","alt","onClick"],Js={class:"title"},Ys={class:"face"},Xs={key:0,class:"ss-card"},Zs={key:1,class:"ss-card"},er=["src","alt","onClick"],tr=Nt({__name:"FacePan",emits:["addSpecialMsg","sendMsg"],setup(t,{emit:f}){const{recordList:D,showList:c}=b("recent-emojis-id"),{recordList:e,showList:n}=b("recent-custom-faces-id"),{recordList:r,showList:o}=b("recent-local-faces-id"),p=Vt(()=>{const C=[];for(const M of o.value){const R=v.value.find(S=>S.path===M);R&&C.push(R)}return C}),x=new ct,i=Lo(),s=ii(),a=Dn(),d=bi(1),v=bi([]),$=f;i.stickerCache&&i.stickerCache.length==0&&a.jsonMap.roaming_stamp&&V(),bt.isDesktop()&&s.sysConfig.local_emoji_folder&&A();function z(C,M){$("addSpecialMsg",{addText:M,msgObj:C})}function m(C){w(D,C),C<5e3?z({type:"face",id:C},!0):z({type:"text",text:hn.get(C).value},!0)}function V(){i.stickerCache=void 0,a.jsonMap.roaming_stamp.pagerType=="full"?st.send(a.jsonMap.roaming_stamp.name,{count:48},"getRoamingStamp_48"):st.send(a.jsonMap.roaming_stamp.name,{},"getRoamingStamp")}function K(C){const M=C.target;if(M.scrollHeight-M.scrollTop<M.clientHeight+.5&&i.stickerCache&&a.jsonMap.roaming_stamp.pagerType=="full"&&i.stickerCache[i.stickerCache.length-1]!="end"){const R=48+48*d.value;st.send(a.jsonMap.roaming_stamp.name,{count:R},"getRoamingStamp_"+R),d.value++}}function N(C){w(e,C),z({type:"image",file:C,subType:1},!0),s.sysConfig.send_face==!0&&$("sendMsg")}async function O(){const{$t:C}=an.config.globalProperties;try{const M=await bt.call(void 0,"sys:selectFolder",!0);M&&(Ni.save("local_emoji_folder",M),x.add(Te.INFO,C("已设置本地表情文件夹")),A())}catch{x.add(Te.ERR,C("选择文件夹失败"))}}async function A(){try{const C=s.sysConfig.local_emoji_folder;if(!C){v.value=[];return}const M=await bt.call(void 0,"sys:getLocalEmojis",!0,C);if(M&&Array.isArray(M))if(bt.type==="tauri"){const{convertFileSrc:R}=await Ui(async()=>{const{convertFileSrc:S}=await import("./core-DhEqZVGG.js");return{convertFileSrc:S}},[],import.meta.url);v.value=M.map(S=>({name:S.name,path:S.path,url:R(S.path)}))}else v.value=M.map(R=>({name:R.name,path:R.path,url:R.url}));else v.value=[]}catch{v.value=[]}}async function H(C){try{const M=await bt.call(void 0,"sys:readFileAsBase64",!0,C.path);w(r,C.path),z({type:"image",file:"base64://"+M,subType:1},!0),s.sysConfig.send_face==!0&&$("sendMsg")}catch{const{$t:R}=an.config.globalProperties;x.add(Te.ERR,R("添加本地表情失败"))}}function b(C){const M=Ro(C,[]),R=Vt(()=>{if(s.sysConfig.record_recent_emoji==="none")return[];if(s.sysConfig.record_recent_emoji==="order")return M.value.slice(0,30);{const S=new Map;for(const L of M.value)S.set(L,(S.get(L)||0)+1);return Array.from(S.entries()).sort((L,g)=>g[1]-L[1]).map(L=>L[0]).slice(0,30)}});return{recordList:M,showList:R}}function w(C,M){if(s.sysConfig.record_recent_emoji==="none")return;let R;switch(s.sysConfig.record_recent_emoji){case"order":R=30;break;case"100times":R=100;break;case"500times":R=500;break;default:throw new Error("Invalid recent emoji record setting")}const S=C.value;if(s.sysConfig.record_recent_emoji==="order"){const L=S.indexOf(M);L!==-1&&S.splice(L,1)}S.unshift(M),S.length>R&&S.pop(),C.value=S}function T(C){return{comp:Es,model:void 0,props:{url:C}}}return(C,M)=>{const R=Un("font-awesome-icon");return G(),te("div",Fs,[oe(B(Ri),null,{default:St(()=>[k("div",$s,[k("div",Ts,[B(c).length>0?(G(),te(ke,{key:0},[k("div",Ls,[k("span",null,Y(C.$t("最近使用")),1)]),k("div",Rs,[(G(!0),te(ke,null,yt(B(c),S=>(G(),te("div",{key:S},[oe(ei,{emoji:B(hn).get(S),onClick:L=>m(S)},null,8,["emoji","onClick"])]))),128))])],64)):ge("",!0),k("div",Ds,[k("span",null,Y(C.$t("emoji 表情")),1)]),k("div",Bs,[(G(!0),te(ke,null,yt(B(hn).emojiList,S=>(G(),te("div",{key:S},[oe(ei,{emoji:B(hn).get(S),onClick:L=>m(S)},null,8,["emoji","onClick"])]))),128))])])]),k("div",Os,[k("div",{class:"system-face-bar custom-face-bar",onScroll:K},[B(n).length>0?(G(),te(ke,{key:0},[k("div",Us,[k("span",null,Y(C.$t("最近使用")),1)]),k("div",Ns,[(G(!0),te(ke,null,yt(B(n),(S,L)=>Ae((G(),te("span",{key:L},[k("img",{loading:"lazy",src:S,alt:"["+C.$t("动画表情")+"]",onClick:g=>N(S)},null,8,zs)])),[[B(kn),T(S)]])),128))])],64)):ge("",!0),k("div",Hs,[k("span",null,Y(C.$t("收藏的表情")),1),oe(R,{icon:["fas","fa-rotate-right"],onClick:V})]),k("div",Ps,[B(i).stickerCache&&B(i).stickerCache.length<=0?(G(),te("div",js,[oe(R,{icon:["fas","face-dizzy"]}),k("span",null,Y(C.$t("一无所有")),1)])):B(i).stickerCache&&B(i).stickerCache.length>0?(G(!0),te(ke,{key:1},yt(B(i).stickerCache,(S,L)=>(G(),te("span",{key:"stickers-"+L},[Ae(k("img",{loading:"lazy",src:S,alt:"["+C.$t("动画表情")+"]",onClick:g=>N(S)},null,8,Vs),[[at,S!="end"],[B(kn),T(S)]])]))),128)):ge("",!0)])],32)]),B(bt).isDesktop()?(G(),te("div",qs,[k("div",Ws,[p.value.length>0?(G(),te(ke,{key:0},[k("div",Ks,[k("span",null,Y(C.$t("最近使用")),1)]),k("div",Qs,[(G(!0),te(ke,null,yt(p.value,(S,L)=>(G(),te("span",{key:L},[Ae(k("img",{loading:"lazy",src:S.url,alt:"["+C.$t("动画表情")+"]",onClick:g=>H(S)},null,8,Gs),[[B(kn),T(S.url)]])]))),128))])],64)):ge("",!0),k("div",Js,[k("span",null,Y(C.$t("本地表情")),1),oe(R,{icon:["fas","fa-folder-plus"],title:C.$t("选择文件夹"),onClick:O},null,8,["title"]),B(s).sysConfig.local_emoji_folder?(G(),$e(R,{key:0,icon:["fas","fa-rotate-right"],title:C.$t("重新加载"),onClick:A},null,8,["title"])):ge("",!0)]),k("div",Ys,[B(s).sysConfig.local_emoji_folder?B(s).sysConfig.local_emoji_folder&&v.value.length<=0?(G(),te("div",Zs,[oe(R,{icon:["fas","face-dizzy"]}),k("span",null,Y(C.$t("暂无图片")),1)])):B(s).sysConfig.local_emoji_folder&&v.value.length>0?(G(!0),te(ke,{key:2},yt(v.value,(S,L)=>(G(),te("span",{key:L},[Ae(k("img",{loading:"lazy",src:S.url,alt:"["+C.$t("动画表情")+"]",onClick:g=>H(S)},null,8,er),[[B(kn),T(S.url)]])]))),128)):ge("",!0):(G(),te("div",Xs,[oe(R,{icon:["fas","folder-open"]}),k("span",null,Y(C.$t("选择文件夹")),1)]))])])])):ge("",!0)]),_:1})])}}}),nr={class:"ss-card"},ir={key:0},or=Nt({name:"MergePan",__name:"MergePan",setup(t,{expose:f}){const D=On.global.t,c=Bn(),e=ii(),n=c.mergeMsgStack,r=he(),o=Vt(()=>{var s;return Zn.fromList((((s=r.value)==null?void 0:s.imageList)??[]).map(a=>a.img_url))});function p(){n.length--}function x(){n.length=0}function i(){return n.length>0}return f({closeMergeMsg:x,isMergeOpen:i}),pn(()=>{Ct(()=>c.mergeMsgStack.length,()=>{n.length===0?c.mergeMessageImgList=void 0:r.value=n.at(-1)}),Ct(()=>{var s;return(s=r.value)==null?void 0:s.imageList},()=>{var s;c.mergeMsgStack.length===0||((s=r.value)==null?void 0:s.imageList)===void 0||(c.mergeMessageImgList=r.value.imageList)})}),(s,a)=>{const d=Un("font-awesome-icon");return G(),te("div",{class:dt("merge-pan"+(B(c).mergeMsgStack.length>0?" show":""))},[k("div",{onClick:x}),k("div",nr,[k("div",null,[oe(d,{style:{"margin-top":"5px"},icon:["fas","message"]}),k("span",null,Y(B(D)("合并消息")),1),B(n).length<=1?(G(),$e(d,{key:0,icon:["fas","xmark"],onClick:p})):(G(),$e(d,{key:1,icon:["fas","angles-left"],onClick:p}))]),r.value===void 0?(G(),te("div",ir)):(G(),$e(Xn,{key:1,name:B(e).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:St(()=>[(G(!0),te(ke,null,yt(r.value.messageList,(v,$)=>(G(),te(ke,{key:"merge-"+r.value.forwardMsg.message[0].id+"-"+$},[B(Yn)(r.value.messageList[$-1]?r.value.messageList[$-1].time:void 0,v.time,$==0)?(G(),$e(Qt,{id:B(zi)(),key:"notice-time-"+$,data:{sub_type:"time",time:v.time}},null,8,["id","data"])):B(Hi)(v)?(G(),$e(Qt,{key:"delete-"+v.message_id,data:{sub_type:"delete"}})):ge("",!0),oe(mn,{data:v,type:"merge","image-list-header":o.value},null,8,["data","image-list-header"])],64))),128))]),_:1},8,["name"]))])],2)}}}),ar=Nn(or,[["__scopeId","data-v-5a030688"]]);function sr(t,f){return f.forEach((function(D){D&&typeof D!="string"&&!Array.isArray(D)&&Object.keys(D).forEach((function(c){if(c!=="default"&&!(c in t)){var e=Object.getOwnPropertyDescriptor(D,c);Object.defineProperty(t,c,e.get?e:{enumerable:!0,get:function(){return D[c]}})}}))})),Object.freeze(t)}function Wi(t,f){return new Promise((function(D,c){let e;return rr(t).then((function(n){try{return e=n,D(new Blob([f.slice(0,2),e,f.slice(2)],{type:"image/jpeg"}))}catch(r){return c(r)}}),c)}))}const rr=t=>new Promise(((f,D)=>{const c=new FileReader;c.addEventListener("load",(({target:{result:e}})=>{const n=new DataView(e);let r=0;if(n.getUint16(r)!==65496)return D("not a valid JPEG");for(r+=2;;){const o=n.getUint16(r);if(o===65498)break;const p=n.getUint16(r+2);if(o===65505&&n.getUint32(r+4)===1165519206){const x=r+10;let i;switch(n.getUint16(x)){case 18761:i=!0;break;case 19789:i=!1;break;default:return D("TIFF header contains invalid endian")}if(n.getUint16(x+2,i)!==42)return D("TIFF header contains invalid version");const s=n.getUint32(x+4,i),a=x+s+2+12*n.getUint16(x+s,i);for(let d=x+s+2;d<a;d+=12)if(n.getUint16(d,i)==274){if(n.getUint16(d+2,i)!==3)return D("Orientation data type is invalid");if(n.getUint32(d+4,i)!==1)return D("Orientation data count is invalid");n.setUint16(d+8,1,i);break}return f(e.slice(r,r+2+p))}r+=2+p}return f(new Blob)})),c.readAsArrayBuffer(t)}));var $n={},lr={get exports(){return $n},set exports(t){$n=t}};(function(t){var f,D,c={};lr.exports=c,c.parse=function(e,n){for(var r=c.bin.readUshort,o=c.bin.readUint,p=0,x={},i=new Uint8Array(e),s=i.length-4;o(i,s)!=101010256;)s--;p=s,p+=4;var a=r(i,p+=4);r(i,p+=2);var d=o(i,p+=2),v=o(i,p+=4);p+=4,p=v;for(var $=0;$<a;$++){o(i,p),p+=4,p+=4,p+=4,o(i,p+=4),d=o(i,p+=4);var z=o(i,p+=4),m=r(i,p+=4),V=r(i,p+2),K=r(i,p+4);p+=6;var N=o(i,p+=8);p+=4,p+=m+V+K,c._readLocal(i,N,x,d,z,n)}return x},c._readLocal=function(e,n,r,o,p,x){var i=c.bin.readUshort,s=c.bin.readUint;s(e,n),i(e,n+=4),i(e,n+=2);var a=i(e,n+=2);s(e,n+=2),s(e,n+=4),n+=4;var d=i(e,n+=8),v=i(e,n+=2);n+=2;var $=c.bin.readUTF8(e,n,d);if(n+=d,n+=v,x)r[$]={size:p,csize:o};else{var z=new Uint8Array(e.buffer,n);if(a==0)r[$]=new Uint8Array(z.buffer.slice(n,n+o));else{if(a!=8)throw"unknown compression method: "+a;var m=new Uint8Array(p);c.inflateRaw(z,m),r[$]=m}}},c.inflateRaw=function(e,n){return c.F.inflate(e,n)},c.inflate=function(e,n){return e[0],e[1],c.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),n)},c.deflate=function(e,n){n==null&&(n={level:6});var r=0,o=new Uint8Array(50+Math.floor(1.1*e.length));o[r]=120,o[r+1]=156,r+=2,r=c.F.deflateRaw(e,o,r,n.level);var p=c.adler(e,0,e.length);return o[r+0]=p>>>24&255,o[r+1]=p>>>16&255,o[r+2]=p>>>8&255,o[r+3]=p>>>0&255,new Uint8Array(o.buffer,0,r+4)},c.deflateRaw=function(e,n){n==null&&(n={level:6});var r=new Uint8Array(50+Math.floor(1.1*e.length)),o=c.F.deflateRaw(e,r,o,n.level);return new Uint8Array(r.buffer,0,o)},c.encode=function(e,n){n==null&&(n=!1);var r=0,o=c.bin.writeUint,p=c.bin.writeUshort,x={};for(var i in e){var s=!c._noNeed(i)&&!n,a=e[i],d=c.crc.crc(a,0,a.length);x[i]={cpr:s,usize:a.length,crc:d,file:s?c.deflateRaw(a):a}}for(var i in x)r+=x[i].file.length+30+46+2*c.bin.sizeUTF8(i);r+=22;var v=new Uint8Array(r),$=0,z=[];for(var i in x){var m=x[i];z.push($),$=c._writeHeader(v,$,i,m,0)}var V=0,K=$;for(var i in x)m=x[i],z.push($),$=c._writeHeader(v,$,i,m,1,z[V++]);var N=$-K;return o(v,$,101010256),$+=4,p(v,$+=4,V),p(v,$+=2,V),o(v,$+=2,N),o(v,$+=4,K),$+=4,$+=2,v.buffer},c._noNeed=function(e){var n=e.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(n)!=-1},c._writeHeader=function(e,n,r,o,p,x){var i=c.bin.writeUint,s=c.bin.writeUshort,a=o.file;return i(e,n,p==0?67324752:33639248),n+=4,p==1&&(n+=2),s(e,n,20),s(e,n+=2,0),s(e,n+=2,o.cpr?8:0),i(e,n+=2,0),i(e,n+=4,o.crc),i(e,n+=4,a.length),i(e,n+=4,o.usize),s(e,n+=4,c.bin.sizeUTF8(r)),s(e,n+=2,0),n+=2,p==1&&(n+=2,n+=2,i(e,n+=6,x),n+=4),n+=c.bin.writeUTF8(e,n,r),p==0&&(e.set(a,n),n+=a.length),n},c.crc={table:(function(){for(var e=new Uint32Array(256),n=0;n<256;n++){for(var r=n,o=0;o<8;o++)1&r?r=3988292384^r>>>1:r>>>=1;e[n]=r}return e})(),update:function(e,n,r,o){for(var p=0;p<o;p++)e=c.crc.table[255&(e^n[r+p])]^e>>>8;return e},crc:function(e,n,r){return 4294967295^c.crc.update(4294967295,e,n,r)}},c.adler=function(e,n,r){for(var o=1,p=0,x=n,i=n+r;x<i;){for(var s=Math.min(x+5552,i);x<s;)p+=o+=e[x++];o%=65521,p%=65521}return p<<16|o},c.bin={readUshort:function(e,n){return e[n]|e[n+1]<<8},writeUshort:function(e,n,r){e[n]=255&r,e[n+1]=r>>8&255},readUint:function(e,n){return 16777216*e[n+3]+(e[n+2]<<16|e[n+1]<<8|e[n])},writeUint:function(e,n,r){e[n]=255&r,e[n+1]=r>>8&255,e[n+2]=r>>16&255,e[n+3]=r>>24&255},readASCII:function(e,n,r){for(var o="",p=0;p<r;p++)o+=String.fromCharCode(e[n+p]);return o},writeASCII:function(e,n,r){for(var o=0;o<r.length;o++)e[n+o]=r.charCodeAt(o)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,n,r){for(var o,p="",x=0;x<r;x++)p+="%"+c.bin.pad(e[n+x].toString(16));try{o=decodeURIComponent(p)}catch{return c.bin.readASCII(e,n,r)}return o},writeUTF8:function(e,n,r){for(var o=r.length,p=0,x=0;x<o;x++){var i=r.charCodeAt(x);if((4294967168&i)==0)e[n+p]=i,p++;else if((4294965248&i)==0)e[n+p]=192|i>>6,e[n+p+1]=128|i>>0&63,p+=2;else if((4294901760&i)==0)e[n+p]=224|i>>12,e[n+p+1]=128|i>>6&63,e[n+p+2]=128|i>>0&63,p+=3;else{if((4292870144&i)!=0)throw"e";e[n+p]=240|i>>18,e[n+p+1]=128|i>>12&63,e[n+p+2]=128|i>>6&63,e[n+p+3]=128|i>>0&63,p+=4}}return p},sizeUTF8:function(e){for(var n=e.length,r=0,o=0;o<n;o++){var p=e.charCodeAt(o);if((4294967168&p)==0)r++;else if((4294965248&p)==0)r+=2;else if((4294901760&p)==0)r+=3;else{if((4292870144&p)!=0)throw"e";r+=4}}return r}},c.F={},c.F.deflateRaw=function(e,n,r,o){var p=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][o],x=c.F.U,i=c.F._goodIndex;c.F._hash;var s=c.F._putsE,a=0,d=r<<3,v=0,$=e.length;if(o==0){for(;a<$;)s(n,d,a+(C=Math.min(65535,$-a))==$?1:0),d=c.F._copyExact(e,a,C,n,d+8),a+=C;return d>>>3}var z=x.lits,m=x.strt,V=x.prev,K=0,N=0,O=0,A=0,H=0,b=0;for($>2&&(m[b=c.F._hash(e,0)]=0),a=0;a<$;a++){if(H=b,a+1<$-2){b=c.F._hash(e,a+1);var w=a+1&32767;V[w]=m[b],m[b]=w}if(v<=a){(K>14e3||N>26697)&&$-a>100&&(v<a&&(z[K]=a-v,K+=2,v=a),d=c.F._writeBlock(a==$-1||v==$?1:0,z,K,A,e,O,a-O,n,d),K=N=A=0,O=a);var T=0;a<$-2&&(T=c.F._bestMatch(e,a,V,H,Math.min(p[2],$-a),p[3]));var C=T>>>16,M=65535&T;if(T!=0){M=65535&T;var R=i(C=T>>>16,x.of0);x.lhst[257+R]++;var S=i(M,x.df0);x.dhst[S]++,A+=x.exb[R]+x.dxb[S],z[K]=C<<23|a-v,z[K+1]=M<<16|R<<8|S,K+=2,v=a+C}else x.lhst[e[a]]++;N++}}for(O==a&&e.length!=0||(v<a&&(z[K]=a-v,K+=2,v=a),d=c.F._writeBlock(1,z,K,A,e,O,a-O,n,d),K=0,N=0,K=N=A=0,O=a);(7&d)!=0;)d++;return d>>>3},c.F._bestMatch=function(e,n,r,o,p,x){var i=32767&n,s=r[i],a=i-s+32768&32767;if(s==i||o!=c.F._hash(e,n-a))return 0;for(var d=0,v=0,$=Math.min(32767,n);a<=$&&--x!=0&&s!=i;){if(d==0||e[n+d]==e[n+d-a]){var z=c.F._howLong(e,n,a);if(z>d){if(v=a,(d=z)>=p)break;a+2<z&&(z=a+2);for(var m=0,V=0;V<z-2;V++){var K=n-a+V+32768&32767,N=K-r[K]+32768&32767;N>m&&(m=N,s=K)}}}a+=(i=s)-(s=r[i])+32768&32767}return d<<16|v},c.F._howLong=function(e,n,r){if(e[n]!=e[n-r]||e[n+1]!=e[n+1-r]||e[n+2]!=e[n+2-r])return 0;var o=n,p=Math.min(e.length,n+258);for(n+=3;n<p&&e[n]==e[n-r];)n++;return n-o},c.F._hash=function(e,n){return(e[n]<<8|e[n+1])+(e[n+2]<<4)&65535},c.saved=0,c.F._writeBlock=function(e,n,r,o,p,x,i,s,a){var d,v,$,z,m,V,K,N,O,A=c.F.U,H=c.F._putsF,b=c.F._putsE;A.lhst[256]++,v=(d=c.F.getTrees())[0],$=d[1],z=d[2],m=d[3],V=d[4],K=d[5],N=d[6],O=d[7];var w=32+((a+3&7)==0?0:8-(a+3&7))+(i<<3),T=o+c.F.contSize(A.fltree,A.lhst)+c.F.contSize(A.fdtree,A.dhst),C=o+c.F.contSize(A.ltree,A.lhst)+c.F.contSize(A.dtree,A.dhst);C+=14+3*K+c.F.contSize(A.itree,A.ihst)+(2*A.ihst[16]+3*A.ihst[17]+7*A.ihst[18]);for(var M=0;M<286;M++)A.lhst[M]=0;for(M=0;M<30;M++)A.dhst[M]=0;for(M=0;M<19;M++)A.ihst[M]=0;var R=w<T&&w<C?0:T<C?1:2;if(H(s,a,e),H(s,a+1,R),a+=3,R==0){for(;(7&a)!=0;)a++;a=c.F._copyExact(p,x,i,s,a)}else{var S,L;if(R==1&&(S=A.fltree,L=A.fdtree),R==2){c.F.makeCodes(A.ltree,v),c.F.revCodes(A.ltree,v),c.F.makeCodes(A.dtree,$),c.F.revCodes(A.dtree,$),c.F.makeCodes(A.itree,z),c.F.revCodes(A.itree,z),S=A.ltree,L=A.dtree,b(s,a,m-257),b(s,a+=5,V-1),b(s,a+=5,K-4),a+=4;for(var g=0;g<K;g++)b(s,a+3*g,A.itree[1+(A.ordr[g]<<1)]);a+=3*K,a=c.F._codeTiny(N,A.itree,s,a),a=c.F._codeTiny(O,A.itree,s,a)}for(var u=x,I=0;I<r;I+=2){for(var y=n[I],E=y>>>23,j=u+(8388607&y);u<j;)a=c.F._writeLit(p[u++],S,s,a);if(E!=0){var W=n[I+1],X=W>>16,Q=W>>8&255,P=255&W;b(s,a=c.F._writeLit(257+Q,S,s,a),E-A.of0[Q]),a+=A.exb[Q],H(s,a=c.F._writeLit(P,L,s,a),X-A.df0[P]),a+=A.dxb[P],u+=E}}a=c.F._writeLit(256,S,s,a)}return a},c.F._copyExact=function(e,n,r,o,p){var x=p>>>3;return o[x]=r,o[x+1]=r>>>8,o[x+2]=255-o[x],o[x+3]=255-o[x+1],x+=4,o.set(new Uint8Array(e.buffer,n,r),x),p+(r+4<<3)},c.F.getTrees=function(){for(var e=c.F.U,n=c.F._hufTree(e.lhst,e.ltree,15),r=c.F._hufTree(e.dhst,e.dtree,15),o=[],p=c.F._lenCodes(e.ltree,o),x=[],i=c.F._lenCodes(e.dtree,x),s=0;s<o.length;s+=2)e.ihst[o[s]]++;for(s=0;s<x.length;s+=2)e.ihst[x[s]]++;for(var a=c.F._hufTree(e.ihst,e.itree,7),d=19;d>4&&e.itree[1+(e.ordr[d-1]<<1)]==0;)d--;return[n,r,a,p,i,d,o,x]},c.F.getSecond=function(e){for(var n=[],r=0;r<e.length;r+=2)n.push(e[r+1]);return n},c.F.nonZero=function(e){for(var n="",r=0;r<e.length;r+=2)e[r+1]!=0&&(n+=(r>>1)+",");return n},c.F.contSize=function(e,n){for(var r=0,o=0;o<n.length;o++)r+=n[o]*e[1+(o<<1)];return r},c.F._codeTiny=function(e,n,r,o){for(var p=0;p<e.length;p+=2){var x=e[p],i=e[p+1];o=c.F._writeLit(x,n,r,o);var s=x==16?2:x==17?3:7;x>15&&(c.F._putsE(r,o,i,s),o+=s)}return o},c.F._lenCodes=function(e,n){for(var r=e.length;r!=2&&e[r-1]==0;)r-=2;for(var o=0;o<r;o+=2){var p=e[o+1],x=o+3<r?e[o+3]:-1,i=o+5<r?e[o+5]:-1,s=o==0?-1:e[o-1];if(p==0&&x==p&&i==p){for(var a=o+5;a+2<r&&e[a+2]==p;)a+=2;(d=Math.min(a+1-o>>>1,138))<11?n.push(17,d-3):n.push(18,d-11),o+=2*d-2}else if(p==s&&x==p&&i==p){for(a=o+5;a+2<r&&e[a+2]==p;)a+=2;var d=Math.min(a+1-o>>>1,6);n.push(16,d-3),o+=2*d-2}else n.push(p,0)}return r>>>1},c.F._hufTree=function(e,n,r){var o=[],p=e.length,x=n.length,i=0;for(i=0;i<x;i+=2)n[i]=0,n[i+1]=0;for(i=0;i<p;i++)e[i]!=0&&o.push({lit:i,f:e[i]});var s=o.length,a=o.slice(0);if(s==0)return 0;if(s==1){var d=o[0].lit;return a=d==0?1:0,n[1+(d<<1)]=1,n[1+(a<<1)]=1,1}o.sort((function(N,O){return N.f-O.f}));var v=o[0],$=o[1],z=0,m=1,V=2;for(o[0]={lit:-1,f:v.f+$.f,l:v,r:$,d:0};m!=s-1;)v=z!=m&&(V==s||o[z].f<o[V].f)?o[z++]:o[V++],$=z!=m&&(V==s||o[z].f<o[V].f)?o[z++]:o[V++],o[m++]={lit:-1,f:v.f+$.f,l:v,r:$};var K=c.F.setDepth(o[m-1],0);for(K>r&&(c.F.restrictDepth(a,r,K),K=r),i=0;i<s;i++)n[1+(a[i].lit<<1)]=a[i].d;return K},c.F.setDepth=function(e,n){return e.lit!=-1?(e.d=n,n):Math.max(c.F.setDepth(e.l,n+1),c.F.setDepth(e.r,n+1))},c.F.restrictDepth=function(e,n,r){var o=0,p=1<<r-n,x=0;for(e.sort((function(s,a){return a.d==s.d?s.f-a.f:a.d-s.d})),o=0;o<e.length&&e[o].d>n;o++){var i=e[o].d;e[o].d=n,x+=p-(1<<r-i)}for(x>>>=r-n;x>0;)(i=e[o].d)<n?(e[o].d++,x-=1<<n-i-1):o++;for(;o>=0;o--)e[o].d==n&&x<0&&(e[o].d--,x++);x!=0&&console.log("debt left")},c.F._goodIndex=function(e,n){var r=0;return n[16|r]<=e&&(r|=16),n[8|r]<=e&&(r|=8),n[4|r]<=e&&(r|=4),n[2|r]<=e&&(r|=2),n[1|r]<=e&&(r|=1),r},c.F._writeLit=function(e,n,r,o){return c.F._putsF(r,o,n[e<<1]),o+n[1+(e<<1)]},c.F.inflate=function(e,n){var r=Uint8Array;if(e[0]==3&&e[1]==0)return n||new r(0);var o=c.F,p=o._bitsF,x=o._bitsE,i=o._decodeTiny,s=o.makeCodes,a=o.codes2map,d=o._get17,v=o.U,$=n==null;$&&(n=new r(e.length>>>2<<3));for(var z,m,V=0,K=0,N=0,O=0,A=0,H=0,b=0,w=0,T=0;V==0;)if(V=p(e,T,1),K=p(e,T+1,2),T+=3,K!=0){if($&&(n=c.F._check(n,w+(1<<17))),K==1&&(z=v.flmap,m=v.fdmap,H=511,b=31),K==2){N=x(e,T,5)+257,O=x(e,T+5,5)+1,A=x(e,T+10,4)+4,T+=14;for(var C=0;C<38;C+=2)v.itree[C]=0,v.itree[C+1]=0;var M=1;for(C=0;C<A;C++){var R=x(e,T+3*C,3);v.itree[1+(v.ordr[C]<<1)]=R,R>M&&(M=R)}T+=3*A,s(v.itree,M),a(v.itree,M,v.imap),z=v.lmap,m=v.dmap,T=i(v.imap,(1<<M)-1,N+O,e,T,v.ttree);var S=o._copyOut(v.ttree,0,N,v.ltree);H=(1<<S)-1;var L=o._copyOut(v.ttree,N,O,v.dtree);b=(1<<L)-1,s(v.ltree,S),a(v.ltree,S,z),s(v.dtree,L),a(v.dtree,L,m)}for(;;){var g=z[d(e,T)&H];T+=15&g;var u=g>>>4;if(!(u>>>8))n[w++]=u;else{if(u==256)break;var I=w+u-254;if(u>264){var y=v.ldef[u-257];I=w+(y>>>3)+x(e,T,7&y),T+=7&y}var E=m[d(e,T)&b];T+=15&E;var j=E>>>4,W=v.ddef[j],X=(W>>>4)+p(e,T,15&W);for(T+=15&W,$&&(n=c.F._check(n,w+(1<<17)));w<I;)n[w]=n[w++-X],n[w]=n[w++-X],n[w]=n[w++-X],n[w]=n[w++-X];w=I}}}else{(7&T)!=0&&(T+=8-(7&T));var Q=4+(T>>>3),P=e[Q-4]|e[Q-3]<<8;$&&(n=c.F._check(n,w+P)),n.set(new r(e.buffer,e.byteOffset+Q,P),w),T=Q+P<<3,w+=P}return n.length==w?n:n.slice(0,w)},c.F._check=function(e,n){var r=e.length;if(n<=r)return e;var o=new Uint8Array(Math.max(r<<1,n));return o.set(e,0),o},c.F._decodeTiny=function(e,n,r,o,p,x){for(var i=c.F._bitsE,s=c.F._get17,a=0;a<r;){var d=e[s(o,p)&n];p+=15&d;var v=d>>>4;if(v<=15)x[a]=v,a++;else{var $=0,z=0;v==16?(z=3+i(o,p,2),p+=2,$=x[a-1]):v==17?(z=3+i(o,p,3),p+=3):v==18&&(z=11+i(o,p,7),p+=7);for(var m=a+z;a<m;)x[a]=$,a++}}return p},c.F._copyOut=function(e,n,r,o){for(var p=0,x=0,i=o.length>>>1;x<r;){var s=e[x+n];o[x<<1]=0,o[1+(x<<1)]=s,s>p&&(p=s),x++}for(;x<i;)o[x<<1]=0,o[1+(x<<1)]=0,x++;return p},c.F.makeCodes=function(e,n){for(var r,o,p,x,i=c.F.U,s=e.length,a=i.bl_count,d=0;d<=n;d++)a[d]=0;for(d=1;d<s;d+=2)a[e[d]]++;var v=i.next_code;for(r=0,a[0]=0,o=1;o<=n;o++)r=r+a[o-1]<<1,v[o]=r;for(p=0;p<s;p+=2)(x=e[p+1])!=0&&(e[p]=v[x],v[x]++)},c.F.codes2map=function(e,n,r){for(var o=e.length,p=c.F.U.rev15,x=0;x<o;x+=2)if(e[x+1]!=0)for(var i=x>>1,s=e[x+1],a=i<<4|s,d=n-s,v=e[x]<<d,$=v+(1<<d);v!=$;)r[p[v]>>>15-n]=a,v++},c.F.revCodes=function(e,n){for(var r=c.F.U.rev15,o=15-n,p=0;p<e.length;p+=2){var x=e[p]<<n-e[p+1];e[p]=r[x]>>>o}},c.F._putsE=function(e,n,r){r<<=7&n;var o=n>>>3;e[o]|=r,e[o+1]|=r>>>8},c.F._putsF=function(e,n,r){r<<=7&n;var o=n>>>3;e[o]|=r,e[o+1]|=r>>>8,e[o+2]|=r>>>16},c.F._bitsE=function(e,n,r){return(e[n>>>3]|e[1+(n>>>3)]<<8)>>>(7&n)&(1<<r)-1},c.F._bitsF=function(e,n,r){return(e[n>>>3]|e[1+(n>>>3)]<<8|e[2+(n>>>3)]<<16)>>>(7&n)&(1<<r)-1},c.F._get17=function(e,n){return(e[n>>>3]|e[1+(n>>>3)]<<8|e[2+(n>>>3)]<<16)>>>(7&n)},c.F._get25=function(e,n){return(e[n>>>3]|e[1+(n>>>3)]<<8|e[2+(n>>>3)]<<16|e[3+(n>>>3)]<<24)>>>(7&n)},c.F.U=(f=Uint16Array,D=Uint32Array,{next_code:new f(16),bl_count:new f(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new f(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new D(32),flmap:new f(512),fltree:[],fdmap:new f(32),fdtree:[],lmap:new f(32768),ltree:[],ttree:[],dmap:new f(32768),dtree:[],imap:new f(512),itree:[],rev15:new f(32768),lhst:new D(286),dhst:new D(30),ihst:new D(19),lits:new D(15e3),strt:new f(65536),prev:new f(32768)}),(function(){for(var e=c.F.U,n=0;n<32768;n++){var r=n;r=(4278255360&(r=(4042322160&(r=(3435973836&(r=(2863311530&r)>>>1|(1431655765&r)<<1))>>>2|(858993459&r)<<2))>>>4|(252645135&r)<<4))>>>8|(16711935&r)<<8,e.rev15[n]=(r>>>16|r<<16)>>>17}function o(p,x,i){for(;x--!=0;)p.push(0,i)}for(n=0;n<32;n++)e.ldef[n]=e.of0[n]<<3|e.exb[n],e.ddef[n]=e.df0[n]<<4|e.dxb[n];o(e.fltree,144,8),o(e.fltree,112,9),o(e.fltree,24,7),o(e.fltree,8,8),c.F.makeCodes(e.fltree,9),c.F.codes2map(e.fltree,9,e.flmap),c.F.revCodes(e.fltree,9),o(e.fdtree,32,5),c.F.makeCodes(e.fdtree,5),c.F.codes2map(e.fdtree,5,e.fdmap),c.F.revCodes(e.fdtree,5),o(e.itree,19,0),o(e.ltree,286,0),o(e.dtree,30,0),o(e.ttree,320,0)})()})();var ur=sr({__proto__:null,default:$n},[$n]);const $t=(function(){var t={nextZero(i,s){for(;i[s]!=0;)s++;return s},readUshort:(i,s)=>i[s]<<8|i[s+1],writeUshort(i,s,a){i[s]=a>>8&255,i[s+1]=255&a},readUint:(i,s)=>16777216*i[s]+(i[s+1]<<16|i[s+2]<<8|i[s+3]),writeUint(i,s,a){i[s]=a>>24&255,i[s+1]=a>>16&255,i[s+2]=a>>8&255,i[s+3]=255&a},readASCII(i,s,a){let d="";for(let v=0;v<a;v++)d+=String.fromCharCode(i[s+v]);return d},writeASCII(i,s,a){for(let d=0;d<a.length;d++)i[s+d]=a.charCodeAt(d)},readBytes(i,s,a){const d=[];for(let v=0;v<a;v++)d.push(i[s+v]);return d},pad:i=>i.length<2?`0${i}`:i,readUTF8(i,s,a){let d,v="";for(let $=0;$<a;$++)v+=`%${t.pad(i[s+$].toString(16))}`;try{d=decodeURIComponent(v)}catch{return t.readASCII(i,s,a)}return d}};function f(i,s,a,d){const v=s*a,$=n(d),z=Math.ceil(s*$/8),m=new Uint8Array(4*v),V=new Uint32Array(m.buffer),{ctype:K}=d,{depth:N}=d,O=t.readUshort;if(K==6){const y=v<<2;if(N==8)for(var A=0;A<y;A+=4)m[A]=i[A],m[A+1]=i[A+1],m[A+2]=i[A+2],m[A+3]=i[A+3];if(N==16)for(A=0;A<y;A++)m[A]=i[A<<1]}else if(K==2){const y=d.tabs.tRNS;if(y==null){if(N==8)for(A=0;A<v;A++){var H=3*A;V[A]=255<<24|i[H+2]<<16|i[H+1]<<8|i[H]}if(N==16)for(A=0;A<v;A++)H=6*A,V[A]=255<<24|i[H+4]<<16|i[H+2]<<8|i[H]}else{var b=y[0];const E=y[1],j=y[2];if(N==8)for(A=0;A<v;A++){var w=A<<2;H=3*A,V[A]=255<<24|i[H+2]<<16|i[H+1]<<8|i[H],i[H]==b&&i[H+1]==E&&i[H+2]==j&&(m[w+3]=0)}if(N==16)for(A=0;A<v;A++)w=A<<2,H=6*A,V[A]=255<<24|i[H+4]<<16|i[H+2]<<8|i[H],O(i,H)==b&&O(i,H+2)==E&&O(i,H+4)==j&&(m[w+3]=0)}}else if(K==3){const y=d.tabs.PLTE,E=d.tabs.tRNS,j=E?E.length:0;if(N==1)for(var T=0;T<a;T++){var C=T*z,M=T*s;for(A=0;A<s;A++){w=M+A<<2;var R=3*(S=i[C+(A>>3)]>>7-((7&A)<<0)&1);m[w]=y[R],m[w+1]=y[R+1],m[w+2]=y[R+2],m[w+3]=S<j?E[S]:255}}if(N==2)for(T=0;T<a;T++)for(C=T*z,M=T*s,A=0;A<s;A++)w=M+A<<2,R=3*(S=i[C+(A>>2)]>>6-((3&A)<<1)&3),m[w]=y[R],m[w+1]=y[R+1],m[w+2]=y[R+2],m[w+3]=S<j?E[S]:255;if(N==4)for(T=0;T<a;T++)for(C=T*z,M=T*s,A=0;A<s;A++)w=M+A<<2,R=3*(S=i[C+(A>>1)]>>4-((1&A)<<2)&15),m[w]=y[R],m[w+1]=y[R+1],m[w+2]=y[R+2],m[w+3]=S<j?E[S]:255;if(N==8)for(A=0;A<v;A++){var S;w=A<<2,R=3*(S=i[A]),m[w]=y[R],m[w+1]=y[R+1],m[w+2]=y[R+2],m[w+3]=S<j?E[S]:255}}else if(K==4){if(N==8)for(A=0;A<v;A++){w=A<<2;var L=i[g=A<<1];m[w]=L,m[w+1]=L,m[w+2]=L,m[w+3]=i[g+1]}if(N==16)for(A=0;A<v;A++){var g;w=A<<2,L=i[g=A<<2],m[w]=L,m[w+1]=L,m[w+2]=L,m[w+3]=i[g+2]}}else if(K==0)for(b=d.tabs.tRNS?d.tabs.tRNS:-1,T=0;T<a;T++){const y=T*z,E=T*s;if(N==1)for(var u=0;u<s;u++){var I=(L=255*(i[y+(u>>>3)]>>>7-(7&u)&1))==255*b?0:255;V[E+u]=I<<24|L<<16|L<<8|L}else if(N==2)for(u=0;u<s;u++)I=(L=85*(i[y+(u>>>2)]>>>6-((3&u)<<1)&3))==85*b?0:255,V[E+u]=I<<24|L<<16|L<<8|L;else if(N==4)for(u=0;u<s;u++)I=(L=17*(i[y+(u>>>1)]>>>4-((1&u)<<2)&15))==17*b?0:255,V[E+u]=I<<24|L<<16|L<<8|L;else if(N==8)for(u=0;u<s;u++)I=(L=i[y+u])==b?0:255,V[E+u]=I<<24|L<<16|L<<8|L;else if(N==16)for(u=0;u<s;u++)L=i[y+(u<<1)],I=O(i,y+(u<<1))==b?0:255,V[E+u]=I<<24|L<<16|L<<8|L}return m}function D(i,s,a,d){const v=n(i),$=Math.ceil(a*v/8),z=new Uint8Array(($+1+i.interlace)*d);return s=i.tabs.CgBI?e(s,z):c(s,z),i.interlace==0?s=r(s,i,0,a,d):i.interlace==1&&(s=(function(V,K){const N=K.width,O=K.height,A=n(K),H=A>>3,b=Math.ceil(N*A/8),w=new Uint8Array(O*b);let T=0;const C=[0,0,4,0,2,0,1],M=[0,4,0,2,0,1,0],R=[8,8,8,4,4,2,2],S=[8,8,4,4,2,2,1];let L=0;for(;L<7;){const u=R[L],I=S[L];let y=0,E=0,j=C[L];for(;j<O;)j+=u,E++;let W=M[L];for(;W<N;)W+=I,y++;const X=Math.ceil(y*A/8);r(V,K,T,y,E);let Q=0,P=C[L];for(;P<O;){let ie=M[L],fe=T+Q*X<<3;for(;ie<N;){var g;if(A==1&&(g=(g=V[fe>>3])>>7-(7&fe)&1,w[P*b+(ie>>3)]|=g<<7-((7&ie)<<0)),A==2&&(g=(g=V[fe>>3])>>6-(7&fe)&3,w[P*b+(ie>>2)]|=g<<6-((3&ie)<<1)),A==4&&(g=(g=V[fe>>3])>>4-(7&fe)&15,w[P*b+(ie>>1)]|=g<<4-((1&ie)<<2)),A>=8){const ye=P*b+ie*H;for(let ve=0;ve<H;ve++)w[ye+ve]=V[(fe>>3)+ve]}fe+=A,ie+=I}Q++,P+=u}y*E!=0&&(T+=E*(1+X)),L+=1}return w})(s,i)),s}function c(i,s){return e(new Uint8Array(i.buffer,2,i.length-6),s)}var e=(function(){const i={H:{}};return i.H.N=function(s,a){const d=Uint8Array;let v,$,z=0,m=0,V=0,K=0,N=0,O=0,A=0,H=0,b=0;if(s[0]==3&&s[1]==0)return a||new d(0);const w=i.H,T=w.b,C=w.e,M=w.R,R=w.n,S=w.A,L=w.Z,g=w.m,u=a==null;for(u&&(a=new d(s.length>>>2<<5));z==0;)if(z=T(s,b,1),m=T(s,b+1,2),b+=3,m!=0){if(u&&(a=i.H.W(a,H+(1<<17))),m==1&&(v=g.J,$=g.h,O=511,A=31),m==2){V=C(s,b,5)+257,K=C(s,b+5,5)+1,N=C(s,b+10,4)+4,b+=14;let y=1;for(var I=0;I<38;I+=2)g.Q[I]=0,g.Q[I+1]=0;for(I=0;I<N;I++){const W=C(s,b+3*I,3);g.Q[1+(g.X[I]<<1)]=W,W>y&&(y=W)}b+=3*N,R(g.Q,y),S(g.Q,y,g.u),v=g.w,$=g.d,b=M(g.u,(1<<y)-1,V+K,s,b,g.v);const E=w.V(g.v,0,V,g.C);O=(1<<E)-1;const j=w.V(g.v,V,K,g.D);A=(1<<j)-1,R(g.C,E),S(g.C,E,v),R(g.D,j),S(g.D,j,$)}for(;;){const y=v[L(s,b)&O];b+=15&y;const E=y>>>4;if(!(E>>>8))a[H++]=E;else{if(E==256)break;{let j=H+E-254;if(E>264){const ie=g.q[E-257];j=H+(ie>>>3)+C(s,b,7&ie),b+=7&ie}const W=$[L(s,b)&A];b+=15&W;const X=W>>>4,Q=g.c[X],P=(Q>>>4)+T(s,b,15&Q);for(b+=15&Q;H<j;)a[H]=a[H++-P],a[H]=a[H++-P],a[H]=a[H++-P],a[H]=a[H++-P];H=j}}}}else{(7&b)!=0&&(b+=8-(7&b));const y=4+(b>>>3),E=s[y-4]|s[y-3]<<8;u&&(a=i.H.W(a,H+E)),a.set(new d(s.buffer,s.byteOffset+y,E),H),b=y+E<<3,H+=E}return a.length==H?a:a.slice(0,H)},i.H.W=function(s,a){const d=s.length;if(a<=d)return s;const v=new Uint8Array(d<<1);return v.set(s,0),v},i.H.R=function(s,a,d,v,$,z){const m=i.H.e,V=i.H.Z;let K=0;for(;K<d;){const N=s[V(v,$)&a];$+=15&N;const O=N>>>4;if(O<=15)z[K]=O,K++;else{let A=0,H=0;O==16?(H=3+m(v,$,2),$+=2,A=z[K-1]):O==17?(H=3+m(v,$,3),$+=3):O==18&&(H=11+m(v,$,7),$+=7);const b=K+H;for(;K<b;)z[K]=A,K++}}return $},i.H.V=function(s,a,d,v){let $=0,z=0;const m=v.length>>>1;for(;z<d;){const V=s[z+a];v[z<<1]=0,v[1+(z<<1)]=V,V>$&&($=V),z++}for(;z<m;)v[z<<1]=0,v[1+(z<<1)]=0,z++;return $},i.H.n=function(s,a){const d=i.H.m,v=s.length;let $,z,m,V;const K=d.j;for(var N=0;N<=a;N++)K[N]=0;for(N=1;N<v;N+=2)K[s[N]]++;const O=d.K;for($=0,K[0]=0,z=1;z<=a;z++)$=$+K[z-1]<<1,O[z]=$;for(m=0;m<v;m+=2)V=s[m+1],V!=0&&(s[m]=O[V],O[V]++)},i.H.A=function(s,a,d){const v=s.length,$=i.H.m.r;for(let z=0;z<v;z+=2)if(s[z+1]!=0){const m=z>>1,V=s[z+1],K=m<<4|V,N=a-V;let O=s[z]<<N;const A=O+(1<<N);for(;O!=A;)d[$[O]>>>15-a]=K,O++}},i.H.l=function(s,a){const d=i.H.m.r,v=15-a;for(let $=0;$<s.length;$+=2){const z=s[$]<<a-s[$+1];s[$]=d[z]>>>v}},i.H.M=function(s,a,d){d<<=7&a;const v=a>>>3;s[v]|=d,s[v+1]|=d>>>8},i.H.I=function(s,a,d){d<<=7&a;const v=a>>>3;s[v]|=d,s[v+1]|=d>>>8,s[v+2]|=d>>>16},i.H.e=function(s,a,d){return(s[a>>>3]|s[1+(a>>>3)]<<8)>>>(7&a)&(1<<d)-1},i.H.b=function(s,a,d){return(s[a>>>3]|s[1+(a>>>3)]<<8|s[2+(a>>>3)]<<16)>>>(7&a)&(1<<d)-1},i.H.Z=function(s,a){return(s[a>>>3]|s[1+(a>>>3)]<<8|s[2+(a>>>3)]<<16)>>>(7&a)},i.H.i=function(s,a){return(s[a>>>3]|s[1+(a>>>3)]<<8|s[2+(a>>>3)]<<16|s[3+(a>>>3)]<<24)>>>(7&a)},i.H.m=(function(){const s=Uint16Array,a=Uint32Array;return{K:new s(16),j:new s(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new s(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new a(32),J:new s(512),_:[],h:new s(32),$:[],w:new s(32768),C:[],v:[],d:new s(32768),D:[],u:new s(512),Q:[],r:new s(32768),s:new a(286),Y:new a(30),a:new a(19),t:new a(15e3),k:new s(65536),g:new s(32768)}})(),(function(){const s=i.H.m;for(var a=0;a<32768;a++){let v=a;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,s.r[a]=(v>>>16|v<<16)>>>17}function d(v,$,z){for(;$--!=0;)v.push(0,z)}for(a=0;a<32;a++)s.q[a]=s.S[a]<<3|s.T[a],s.c[a]=s.p[a]<<4|s.z[a];d(s._,144,8),d(s._,112,9),d(s._,24,7),d(s._,8,8),i.H.n(s._,9),i.H.A(s._,9,s.J),i.H.l(s._,9),d(s.$,32,5),i.H.n(s.$,5),i.H.A(s.$,5,s.h),i.H.l(s.$,5),d(s.Q,19,0),d(s.C,286,0),d(s.D,30,0),d(s.v,320,0)})(),i.H.N})();function n(i){return[1,null,3,1,2,null,4][i.ctype]*i.depth}function r(i,s,a,d,v){let $=n(s);const z=Math.ceil(d*$/8);let m,V;$=Math.ceil($/8);let K=i[a],N=0;if(K>1&&(i[a]=[0,0,1][K-2]),K==3)for(N=$;N<z;N++)i[N+1]=i[N+1]+(i[N+1-$]>>>1)&255;for(let O=0;O<v;O++)if(m=a+O*z,V=m+O+1,K=i[V-1],N=0,K==0)for(;N<z;N++)i[m+N]=i[V+N];else if(K==1){for(;N<$;N++)i[m+N]=i[V+N];for(;N<z;N++)i[m+N]=i[V+N]+i[m+N-$]}else if(K==2)for(;N<z;N++)i[m+N]=i[V+N]+i[m+N-z];else if(K==3){for(;N<$;N++)i[m+N]=i[V+N]+(i[m+N-z]>>>1);for(;N<z;N++)i[m+N]=i[V+N]+(i[m+N-z]+i[m+N-$]>>>1)}else{for(;N<$;N++)i[m+N]=i[V+N]+o(0,i[m+N-z],0);for(;N<z;N++)i[m+N]=i[V+N]+o(i[m+N-$],i[m+N-z],i[m+N-$-z])}return i}function o(i,s,a){const d=i+s-a,v=d-i,$=d-s,z=d-a;return v*v<=$*$&&v*v<=z*z?i:$*$<=z*z?s:a}function p(i,s,a){a.width=t.readUint(i,s),s+=4,a.height=t.readUint(i,s),s+=4,a.depth=i[s],s++,a.ctype=i[s],s++,a.compress=i[s],s++,a.filter=i[s],s++,a.interlace=i[s],s++}function x(i,s,a,d,v,$,z,m,V){const K=Math.min(s,v),N=Math.min(a,$);let O=0,A=0;for(let L=0;L<N;L++)for(let g=0;g<K;g++)if(z>=0&&m>=0?(O=L*s+g<<2,A=(m+L)*v+z+g<<2):(O=(-m+L)*s-z+g<<2,A=L*v+g<<2),V==0)d[A]=i[O],d[A+1]=i[O+1],d[A+2]=i[O+2],d[A+3]=i[O+3];else if(V==1){var H=i[O+3]*.00392156862745098,b=i[O]*H,w=i[O+1]*H,T=i[O+2]*H,C=d[A+3]*(1/255),M=d[A]*C,R=d[A+1]*C,S=d[A+2]*C;const u=1-H,I=H+C*u,y=I==0?0:1/I;d[A+3]=255*I,d[A+0]=(b+M*u)*y,d[A+1]=(w+R*u)*y,d[A+2]=(T+S*u)*y}else if(V==2)H=i[O+3],b=i[O],w=i[O+1],T=i[O+2],C=d[A+3],M=d[A],R=d[A+1],S=d[A+2],H==C&&b==M&&w==R&&T==S?(d[A]=0,d[A+1]=0,d[A+2]=0,d[A+3]=0):(d[A]=b,d[A+1]=w,d[A+2]=T,d[A+3]=H);else if(V==3){if(H=i[O+3],b=i[O],w=i[O+1],T=i[O+2],C=d[A+3],M=d[A],R=d[A+1],S=d[A+2],H==C&&b==M&&w==R&&T==S)continue;if(H<220&&C>20)return!1}return!0}return{decode:function(s){const a=new Uint8Array(s);let d=8;const v=t,$=v.readUshort,z=v.readUint,m={tabs:{},frames:[]},V=new Uint8Array(a.length);let K,N=0,O=0;const A=[137,80,78,71,13,10,26,10];for(var H=0;H<8;H++)if(a[H]!=A[H])throw"The input is not a PNG file!";for(;d<a.length;){const L=v.readUint(a,d);d+=4;const g=v.readASCII(a,d,4);if(d+=4,g=="IHDR")p(a,d,m);else if(g=="iCCP"){for(var b=d;a[b]!=0;)b++;v.readASCII(a,d,b-d),a[b+1];const u=a.slice(b+2,d+L);let I=null;try{I=c(u)}catch{I=e(u)}m.tabs[g]=I}else if(g=="CgBI")m.tabs[g]=a.slice(d,d+4);else if(g=="IDAT"){for(H=0;H<L;H++)V[N+H]=a[d+H];N+=L}else if(g=="acTL")m.tabs[g]={num_frames:z(a,d),num_plays:z(a,d+4)},K=new Uint8Array(a.length);else if(g=="fcTL"){O!=0&&((S=m.frames[m.frames.length-1]).data=D(m,K.slice(0,O),S.rect.width,S.rect.height),O=0);const u={x:z(a,d+12),y:z(a,d+16),width:z(a,d+4),height:z(a,d+8)};let I=$(a,d+22);I=$(a,d+20)/(I==0?100:I);const y={rect:u,delay:Math.round(1e3*I),dispose:a[d+24],blend:a[d+25]};m.frames.push(y)}else if(g=="fdAT"){for(H=0;H<L-4;H++)K[O+H]=a[d+H+4];O+=L-4}else if(g=="pHYs")m.tabs[g]=[v.readUint(a,d),v.readUint(a,d+4),a[d+8]];else if(g=="cHRM")for(m.tabs[g]=[],H=0;H<8;H++)m.tabs[g].push(v.readUint(a,d+4*H));else if(g=="tEXt"||g=="zTXt"){m.tabs[g]==null&&(m.tabs[g]={});var w=v.nextZero(a,d),T=v.readASCII(a,d,w-d),C=d+L-w-1;if(g=="tEXt")R=v.readASCII(a,w+1,C);else{var M=c(a.slice(w+2,w+2+C));R=v.readUTF8(M,0,M.length)}m.tabs[g][T]=R}else if(g=="iTXt"){m.tabs[g]==null&&(m.tabs[g]={}),w=0,b=d,w=v.nextZero(a,b),T=v.readASCII(a,b,w-b);const u=a[b=w+1];var R;a[b+1],b+=2,w=v.nextZero(a,b),v.readASCII(a,b,w-b),b=w+1,w=v.nextZero(a,b),v.readUTF8(a,b,w-b),C=L-((b=w+1)-d),u==0?R=v.readUTF8(a,b,C):(M=c(a.slice(b,b+C)),R=v.readUTF8(M,0,M.length)),m.tabs[g][T]=R}else if(g=="PLTE")m.tabs[g]=v.readBytes(a,d,L);else if(g=="hIST"){const u=m.tabs.PLTE.length/3;for(m.tabs[g]=[],H=0;H<u;H++)m.tabs[g].push($(a,d+2*H))}else if(g=="tRNS")m.ctype==3?m.tabs[g]=v.readBytes(a,d,L):m.ctype==0?m.tabs[g]=$(a,d):m.ctype==2&&(m.tabs[g]=[$(a,d),$(a,d+2),$(a,d+4)]);else if(g=="gAMA")m.tabs[g]=v.readUint(a,d)/1e5;else if(g=="sRGB")m.tabs[g]=a[d];else if(g=="bKGD")m.ctype==0||m.ctype==4?m.tabs[g]=[$(a,d)]:m.ctype==2||m.ctype==6?m.tabs[g]=[$(a,d),$(a,d+2),$(a,d+4)]:m.ctype==3&&(m.tabs[g]=a[d]);else if(g=="IEND")break;d+=L,v.readUint(a,d),d+=4}var S;return O!=0&&((S=m.frames[m.frames.length-1]).data=D(m,K.slice(0,O),S.rect.width,S.rect.height)),m.data=D(m,V,m.width,m.height),delete m.compress,delete m.interlace,delete m.filter,m},toRGBA8:function(s){const a=s.width,d=s.height;if(s.tabs.acTL==null)return[f(s.data,a,d,s).buffer];const v=[];s.frames[0].data==null&&(s.frames[0].data=s.data);const $=a*d*4,z=new Uint8Array($),m=new Uint8Array($),V=new Uint8Array($);for(let N=0;N<s.frames.length;N++){const O=s.frames[N],A=O.rect.x,H=O.rect.y,b=O.rect.width,w=O.rect.height,T=f(O.data,b,w,s);if(N!=0)for(var K=0;K<$;K++)V[K]=z[K];if(O.blend==0?x(T,b,w,z,a,d,A,H,0):O.blend==1&&x(T,b,w,z,a,d,A,H,1),v.push(z.buffer.slice(0)),O.dispose!=0){if(O.dispose==1)x(m,b,w,z,a,d,A,H,0);else if(O.dispose==2)for(K=0;K<$;K++)z[K]=V[K]}}return v},_paeth:o,_copyTile:x,_bin:t}})();(function(){const{_copyTile:t}=$t,{_bin:f}=$t,D=$t._paeth;var c={table:(function(){const b=new Uint32Array(256);for(let w=0;w<256;w++){let T=w;for(let C=0;C<8;C++)1&T?T=3988292384^T>>>1:T>>>=1;b[w]=T}return b})(),update(b,w,T,C){for(let M=0;M<C;M++)b=c.table[255&(b^w[T+M])]^b>>>8;return b},crc:(b,w,T)=>4294967295^c.update(4294967295,b,w,T)};function e(b,w,T,C){w[T]+=b[0]*C>>4,w[T+1]+=b[1]*C>>4,w[T+2]+=b[2]*C>>4,w[T+3]+=b[3]*C>>4}function n(b){return Math.max(0,Math.min(255,b))}function r(b,w){const T=b[0]-w[0],C=b[1]-w[1],M=b[2]-w[2],R=b[3]-w[3];return T*T+C*C+M*M+R*R}function o(b,w,T,C,M,R,S){S==null&&(S=1);const L=C.length,g=[];for(var u=0;u<L;u++){const P=C[u];g.push([P>>>0&255,P>>>8&255,P>>>16&255,P>>>24&255])}for(u=0;u<L;u++){let P=4294967295;for(var I=0,y=0;y<L;y++){var E=r(g[u],g[y]);y!=u&&E<P&&(P=E,I=y)}}const j=new Uint32Array(M.buffer),W=new Int16Array(w*T*4),X=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(u=0;u<X.length;u++)X[u]=255*((X[u]+.5)/16-.5);for(let P=0;P<T;P++)for(let ie=0;ie<w;ie++){var Q;u=4*(P*w+ie),S!=2?Q=[n(b[u]+W[u]),n(b[u+1]+W[u+1]),n(b[u+2]+W[u+2]),n(b[u+3]+W[u+3])]:(E=X[4*(3&P)+(3&ie)],Q=[n(b[u]+E),n(b[u+1]+E),n(b[u+2]+E),n(b[u+3]+E)]),I=0;let fe=16777215;for(y=0;y<L;y++){const we=r(Q,g[y]);we<fe&&(fe=we,I=y)}const ye=g[I],ve=[Q[0]-ye[0],Q[1]-ye[1],Q[2]-ye[2],Q[3]-ye[3]];S==1&&(ie!=w-1&&e(ve,W,u+4,7),P!=T-1&&(ie!=0&&e(ve,W,u+4*w-4,3),e(ve,W,u+4*w,5),ie!=w-1&&e(ve,W,u+4*w+4,1))),R[u>>2]=I,j[u>>2]=C[I]}}function p(b,w,T,C,M){M==null&&(M={});const{crc:R}=c,S=f.writeUint,L=f.writeUshort,g=f.writeASCII;let u=8;const I=b.frames.length>1;let y,E=!1,j=33+(I?20:0);if(M.sRGB!=null&&(j+=13),M.pHYs!=null&&(j+=21),M.iCCP!=null&&(y=pako.deflate(M.iCCP),j+=21+y.length+4),b.ctype==3){for(var W=b.plte.length,X=0;X<W;X++)b.plte[X]>>>24!=255&&(E=!0);j+=8+3*W+4+(E?8+1*W+4:0)}for(var Q=0;Q<b.frames.length;Q++)I&&(j+=38),j+=(ye=b.frames[Q]).cimg.length+12,Q!=0&&(j+=4);j+=12;const P=new Uint8Array(j),ie=[137,80,78,71,13,10,26,10];for(X=0;X<8;X++)P[X]=ie[X];if(S(P,u,13),u+=4,g(P,u,"IHDR"),u+=4,S(P,u,w),u+=4,S(P,u,T),u+=4,P[u]=b.depth,u++,P[u]=b.ctype,u++,P[u]=0,u++,P[u]=0,u++,P[u]=0,u++,S(P,u,R(P,u-17,17)),u+=4,M.sRGB!=null&&(S(P,u,1),u+=4,g(P,u,"sRGB"),u+=4,P[u]=M.sRGB,u++,S(P,u,R(P,u-5,5)),u+=4),M.iCCP!=null){const ve=13+y.length;S(P,u,ve),u+=4,g(P,u,"iCCP"),u+=4,g(P,u,"ICC profile"),u+=11,u+=2,P.set(y,u),u+=y.length,S(P,u,R(P,u-(ve+4),ve+4)),u+=4}if(M.pHYs!=null&&(S(P,u,9),u+=4,g(P,u,"pHYs"),u+=4,S(P,u,M.pHYs[0]),u+=4,S(P,u,M.pHYs[1]),u+=4,P[u]=M.pHYs[2],u++,S(P,u,R(P,u-13,13)),u+=4),I&&(S(P,u,8),u+=4,g(P,u,"acTL"),u+=4,S(P,u,b.frames.length),u+=4,S(P,u,M.loop!=null?M.loop:0),u+=4,S(P,u,R(P,u-12,12)),u+=4),b.ctype==3){for(S(P,u,3*(W=b.plte.length)),u+=4,g(P,u,"PLTE"),u+=4,X=0;X<W;X++){const ve=3*X,we=b.plte[X],Le=255&we,Be=we>>>8&255,Ge=we>>>16&255;P[u+ve+0]=Le,P[u+ve+1]=Be,P[u+ve+2]=Ge}if(u+=3*W,S(P,u,R(P,u-3*W-4,3*W+4)),u+=4,E){for(S(P,u,W),u+=4,g(P,u,"tRNS"),u+=4,X=0;X<W;X++)P[u+X]=b.plte[X]>>>24&255;u+=W,S(P,u,R(P,u-W-4,W+4)),u+=4}}let fe=0;for(Q=0;Q<b.frames.length;Q++){var ye=b.frames[Q];I&&(S(P,u,26),u+=4,g(P,u,"fcTL"),u+=4,S(P,u,fe++),u+=4,S(P,u,ye.rect.width),u+=4,S(P,u,ye.rect.height),u+=4,S(P,u,ye.rect.x),u+=4,S(P,u,ye.rect.y),u+=4,L(P,u,C[Q]),u+=2,L(P,u,1e3),u+=2,P[u]=ye.dispose,u++,P[u]=ye.blend,u++,S(P,u,R(P,u-30,30)),u+=4);const ve=ye.cimg;S(P,u,(W=ve.length)+(Q==0?0:4)),u+=4;const we=u;g(P,u,Q==0?"IDAT":"fdAT"),u+=4,Q!=0&&(S(P,u,fe++),u+=4),P.set(ve,u),u+=W,S(P,u,R(P,we,u-we)),u+=4}return S(P,u,0),u+=4,g(P,u,"IEND"),u+=4,S(P,u,R(P,u-4,4)),u+=4,P.buffer}function x(b,w,T){for(let C=0;C<b.frames.length;C++){const M=b.frames[C];M.rect.width;const R=M.rect.height,S=new Uint8Array(R*M.bpl+R);M.cimg=d(M.img,R,M.bpp,M.bpl,S,w,T)}}function i(b,w,T,C,M){const R=M[0],S=M[1],L=M[2],g=M[3],u=M[4],I=M[5];let y=6,E=8,j=255;for(var W=0;W<b.length;W++){const Oe=new Uint8Array(b[W]);for(var X=Oe.length,Q=0;Q<X;Q+=4)j&=Oe[Q+3]}const P=j!=255,ie=(function(_e,be,je,Re,Ne,tt){const Ve=[];for(var me=0;me<_e.length;me++){const De=new Uint8Array(_e[me]),q=new Uint32Array(De.buffer);var Ye;let J=0,ne=0,ae=be,re=je,le=Re?1:0;if(me!=0){const de=tt||Re||me==1||Ve[me-2].dispose!=0?1:2;let xe=0,rt=1e9;for(let ze=0;ze<de;ze++){var At=new Uint8Array(_e[me-1-ze]);const Xe=new Uint32Array(_e[me-1-ze]);let We=be,Ie=je,He=-1,lt=-1;for(let nt=0;nt<je;nt++)for(let it=0;it<be;it++)q[qe=nt*be+it]!=Xe[qe]&&(it<We&&(We=it),it>He&&(He=it),nt<Ie&&(Ie=nt),nt>lt&&(lt=nt));He==-1&&(We=Ie=He=lt=0),Ne&&((1&We)==1&&We--,(1&Ie)==1&&Ie--);const wt=(He-We+1)*(lt-Ie+1);wt<rt&&(rt=wt,xe=ze,J=We,ne=Ie,ae=He-We+1,re=lt-Ie+1)}At=new Uint8Array(_e[me-1-xe]),xe==1&&(Ve[me-1].dispose=2),Ye=new Uint8Array(ae*re*4),t(At,be,je,Ye,ae,re,-J,-ne,0),le=t(De,be,je,Ye,ae,re,-J,-ne,3)?1:0,le==1?a(De,be,je,Ye,{x:J,y:ne,width:ae,height:re}):t(De,be,je,Ye,ae,re,-J,-ne,0)}else Ye=De.slice(0);Ve.push({rect:{x:J,y:ne,width:ae,height:re},img:Ye,blend:le,dispose:0})}if(Re)for(me=0;me<Ve.length;me++){if((kt=Ve[me]).blend==1)continue;const De=kt.rect,q=Ve[me-1].rect,J=Math.min(De.x,q.x),ne=Math.min(De.y,q.y),ae={x:J,y:ne,width:Math.max(De.x+De.width,q.x+q.width)-J,height:Math.max(De.y+De.height,q.y+q.height)-ne};Ve[me-1].dispose=1,me-1!=0&&s(_e,be,je,Ve,me-1,ae,Ne),s(_e,be,je,Ve,me,ae,Ne)}let Lt=0;if(_e.length!=1)for(var qe=0;qe<Ve.length;qe++){var kt;Lt+=(kt=Ve[qe]).rect.width*kt.rect.height}return Ve})(b,w,T,R,S,L),fe={},ye=[],ve=[];if(C!=0){const Oe=[];for(Q=0;Q<ie.length;Q++)Oe.push(ie[Q].img.buffer);const _e=(function(Ne){let tt=0;for(var Ve=0;Ve<Ne.length;Ve++)tt+=Ne[Ve].byteLength;const me=new Uint8Array(tt);let Ye=0;for(Ve=0;Ve<Ne.length;Ve++){const At=new Uint8Array(Ne[Ve]),Lt=At.length;for(let qe=0;qe<Lt;qe+=4){let kt=At[qe],De=At[qe+1],q=At[qe+2];const J=At[qe+3];J==0&&(kt=De=q=0),me[Ye+qe]=kt,me[Ye+qe+1]=De,me[Ye+qe+2]=q,me[Ye+qe+3]=J}Ye+=Lt}return me.buffer})(Oe),be=$(_e,C);for(Q=0;Q<be.plte.length;Q++)ye.push(be.plte[Q].est.rgba);let je=0;for(Q=0;Q<ie.length;Q++){const Re=(Le=ie[Q]).img.length;var we=new Uint8Array(be.inds.buffer,je>>2,Re>>2);ve.push(we);const Ne=new Uint8Array(be.abuf,je,Re);I&&o(Le.img,Le.rect.width,Le.rect.height,ye,Ne,we),Le.img.set(Ne),je+=Re}}else for(W=0;W<ie.length;W++){var Le=ie[W];const Oe=new Uint32Array(Le.img.buffer);var Be=Le.rect.width;for(X=Oe.length,we=new Uint8Array(X),ve.push(we),Q=0;Q<X;Q++){const _e=Oe[Q];if(Q!=0&&_e==Oe[Q-1])we[Q]=we[Q-1];else if(Q>Be&&_e==Oe[Q-Be])we[Q]=we[Q-Be];else{let be=fe[_e];if(be==null&&(fe[_e]=be=ye.length,ye.push(_e),ye.length>=300))break;we[Q]=be}}}const Ge=ye.length;for(Ge<=256&&u==0&&(E=Ge<=2?1:Ge<=4?2:Ge<=16?4:8,E=Math.max(E,g)),W=0;W<ie.length;W++){(Le=ie[W]).rect.x,Le.rect.y,Be=Le.rect.width;const Oe=Le.rect.height;let _e=Le.img;new Uint32Array(_e.buffer);let be=4*Be,je=4;if(Ge<=256&&u==0){be=Math.ceil(E*Be/8);var Je=new Uint8Array(be*Oe);const Re=ve[W];for(let Ne=0;Ne<Oe;Ne++){Q=Ne*be;const tt=Ne*Be;if(E==8)for(var pe=0;pe<Be;pe++)Je[Q+pe]=Re[tt+pe];else if(E==4)for(pe=0;pe<Be;pe++)Je[Q+(pe>>1)]|=Re[tt+pe]<<4-4*(1&pe);else if(E==2)for(pe=0;pe<Be;pe++)Je[Q+(pe>>2)]|=Re[tt+pe]<<6-2*(3&pe);else if(E==1)for(pe=0;pe<Be;pe++)Je[Q+(pe>>3)]|=Re[tt+pe]<<7-1*(7&pe)}_e=Je,y=3,je=1}else if(P==0&&ie.length==1){Je=new Uint8Array(Be*Oe*3);const Re=Be*Oe;for(Q=0;Q<Re;Q++){const Ne=3*Q,tt=4*Q;Je[Ne]=_e[tt],Je[Ne+1]=_e[tt+1],Je[Ne+2]=_e[tt+2]}_e=Je,y=2,je=3,be=3*Be}Le.img=_e,Le.bpl=be,Le.bpp=je}return{ctype:y,depth:E,plte:ye,frames:ie}}function s(b,w,T,C,M,R,S){const L=Uint8Array,g=Uint32Array,u=new L(b[M-1]),I=new g(b[M-1]),y=M+1<b.length?new L(b[M+1]):null,E=new L(b[M]),j=new g(E.buffer);let W=w,X=T,Q=-1,P=-1;for(let fe=0;fe<R.height;fe++)for(let ye=0;ye<R.width;ye++){const ve=R.x+ye,we=R.y+fe,Le=we*w+ve,Be=j[Le];Be==0||C[M-1].dispose==0&&I[Le]==Be&&(y==null||y[4*Le+3]!=0)||(ve<W&&(W=ve),ve>Q&&(Q=ve),we<X&&(X=we),we>P&&(P=we))}Q==-1&&(W=X=Q=P=0),S&&((1&W)==1&&W--,(1&X)==1&&X--),R={x:W,y:X,width:Q-W+1,height:P-X+1};const ie=C[M];ie.rect=R,ie.blend=1,ie.img=new Uint8Array(R.width*R.height*4),C[M-1].dispose==0?(t(u,w,T,ie.img,R.width,R.height,-R.x,-R.y,0),a(E,w,T,ie.img,R)):t(E,w,T,ie.img,R.width,R.height,-R.x,-R.y,0)}function a(b,w,T,C,M){t(b,w,T,C,M.width,M.height,-M.x,-M.y,2)}function d(b,w,T,C,M,R,S){const L=[];let g,u=[0,1,2,3,4];R!=-1?u=[R]:(w*C>5e5||T==1)&&(u=[0]),S&&(g={level:0});const I=ur;for(var y=0;y<u.length;y++){for(let W=0;W<w;W++)v(M,b,W,C,T,u[y]);L.push(I.deflate(M,g))}let E,j=1e9;for(y=0;y<L.length;y++)L[y].length<j&&(E=y,j=L[y].length);return L[E]}function v(b,w,T,C,M,R){const S=T*C;let L=S+T;if(b[L]=R,L++,R==0)if(C<500)for(var g=0;g<C;g++)b[L+g]=w[S+g];else b.set(new Uint8Array(w.buffer,S,C),L);else if(R==1){for(g=0;g<M;g++)b[L+g]=w[S+g];for(g=M;g<C;g++)b[L+g]=w[S+g]-w[S+g-M]+256&255}else if(T==0){for(g=0;g<M;g++)b[L+g]=w[S+g];if(R==2)for(g=M;g<C;g++)b[L+g]=w[S+g];if(R==3)for(g=M;g<C;g++)b[L+g]=w[S+g]-(w[S+g-M]>>1)+256&255;if(R==4)for(g=M;g<C;g++)b[L+g]=w[S+g]-D(w[S+g-M],0,0)+256&255}else{if(R==2)for(g=0;g<C;g++)b[L+g]=w[S+g]+256-w[S+g-C]&255;if(R==3){for(g=0;g<M;g++)b[L+g]=w[S+g]+256-(w[S+g-C]>>1)&255;for(g=M;g<C;g++)b[L+g]=w[S+g]+256-(w[S+g-C]+w[S+g-M]>>1)&255}if(R==4){for(g=0;g<M;g++)b[L+g]=w[S+g]+256-D(0,w[S+g-C],0)&255;for(g=M;g<C;g++)b[L+g]=w[S+g]+256-D(w[S+g-M],w[S+g-C],w[S+g-M-C])&255}}}function $(b,w){const T=new Uint8Array(b),C=T.slice(0),M=new Uint32Array(C.buffer),R=z(C,w),S=R[0],L=R[1],g=T.length,u=new Uint8Array(g>>2);let I;if(T.length<2e7)for(var y=0;y<g;y+=4)I=m(S,E=T[y]*(1/255),j=T[y+1]*(1/255),W=T[y+2]*(1/255),X=T[y+3]*(1/255)),u[y>>2]=I.ind,M[y>>2]=I.est.rgba;else for(y=0;y<g;y+=4){var E=T[y]*.00392156862745098,j=T[y+1]*(1/255),W=T[y+2]*(1/255),X=T[y+3]*(1/255);for(I=S;I.left;)I=V(I.est,E,j,W,X)<=0?I.left:I.right;u[y>>2]=I.ind,M[y>>2]=I.est.rgba}return{abuf:C.buffer,inds:u,plte:L}}function z(b,w,T){T==null&&(T=1e-4);const C=new Uint32Array(b.buffer),M={i0:0,i1:b.length,bst:null,est:null,tdst:0,left:null,right:null};M.bst=O(b,M.i0,M.i1),M.est=A(M.bst);const R=[M];for(;R.length<w;){let L=0,g=0;for(var S=0;S<R.length;S++)R[S].est.L>L&&(L=R[S].est.L,g=S);if(L<T)break;const u=R[g],I=K(b,C,u.i0,u.i1,u.est.e,u.est.eMq255);if(u.i0>=I||u.i1<=I){u.est.L=0;continue}const y={i0:u.i0,i1:I,bst:null,est:null,tdst:0,left:null,right:null};y.bst=O(b,y.i0,y.i1),y.est=A(y.bst);const E={i0:I,i1:u.i1,bst:null,est:null,tdst:0,left:null,right:null};for(E.bst={R:[],m:[],N:u.bst.N-y.bst.N},S=0;S<16;S++)E.bst.R[S]=u.bst.R[S]-y.bst.R[S];for(S=0;S<4;S++)E.bst.m[S]=u.bst.m[S]-y.bst.m[S];E.est=A(E.bst),u.left=y,u.right=E,R[g]=y,R.push(E)}for(R.sort(((L,g)=>g.bst.N-L.bst.N)),S=0;S<R.length;S++)R[S].ind=S;return[M,R]}function m(b,w,T,C,M){if(b.left==null)return b.tdst=(function(y,E,j,W,X){const Q=E-y[0],P=j-y[1],ie=W-y[2],fe=X-y[3];return Q*Q+P*P+ie*ie+fe*fe})(b.est.q,w,T,C,M),b;const R=V(b.est,w,T,C,M);let S=b.left,L=b.right;R>0&&(S=b.right,L=b.left);const g=m(S,w,T,C,M);if(g.tdst<=R*R)return g;const u=m(L,w,T,C,M);return u.tdst<g.tdst?u:g}function V(b,w,T,C,M){const{e:R}=b;return R[0]*w+R[1]*T+R[2]*C+R[3]*M-b.eMq}function K(b,w,T,C,M,R){for(C-=4;T<C;){for(;N(b,T,M)<=R;)T+=4;for(;N(b,C,M)>R;)C-=4;if(T>=C)break;const S=w[T>>2];w[T>>2]=w[C>>2],w[C>>2]=S,T+=4,C-=4}for(;N(b,T,M)>R;)T-=4;return T+4}function N(b,w,T){return b[w]*T[0]+b[w+1]*T[1]+b[w+2]*T[2]+b[w+3]*T[3]}function O(b,w,T){const C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=[0,0,0,0],R=T-w>>2;for(let S=w;S<T;S+=4){const L=b[S]*.00392156862745098,g=b[S+1]*(1/255),u=b[S+2]*(1/255),I=b[S+3]*(1/255);M[0]+=L,M[1]+=g,M[2]+=u,M[3]+=I,C[0]+=L*L,C[1]+=L*g,C[2]+=L*u,C[3]+=L*I,C[5]+=g*g,C[6]+=g*u,C[7]+=g*I,C[10]+=u*u,C[11]+=u*I,C[15]+=I*I}return C[4]=C[1],C[8]=C[2],C[9]=C[6],C[12]=C[3],C[13]=C[7],C[14]=C[11],{R:C,m:M,N:R}}function A(b){const{R:w}=b,{m:T}=b,{N:C}=b,M=T[0],R=T[1],S=T[2],L=T[3],g=C==0?0:1/C,u=[w[0]-M*M*g,w[1]-M*R*g,w[2]-M*S*g,w[3]-M*L*g,w[4]-R*M*g,w[5]-R*R*g,w[6]-R*S*g,w[7]-R*L*g,w[8]-S*M*g,w[9]-S*R*g,w[10]-S*S*g,w[11]-S*L*g,w[12]-L*M*g,w[13]-L*R*g,w[14]-L*S*g,w[15]-L*L*g],I=u,y=H;let E=[Math.random(),Math.random(),Math.random(),Math.random()],j=0,W=0;if(C!=0)for(let Q=0;Q<16&&(E=y.multVec(I,E),W=Math.sqrt(y.dot(E,E)),E=y.sml(1/W,E),!(Q!=0&&Math.abs(W-j)<1e-9));Q++)j=W;const X=[M*g,R*g,S*g,L*g];return{Cov:u,q:X,e:E,L:j,eMq255:y.dot(y.sml(255,X),E),eMq:y.dot(E,X),rgba:(Math.round(255*X[3])<<24|Math.round(255*X[2])<<16|Math.round(255*X[1])<<8|Math.round(255*X[0])<<0)>>>0}}var H={multVec:(b,w)=>[b[0]*w[0]+b[1]*w[1]+b[2]*w[2]+b[3]*w[3],b[4]*w[0]+b[5]*w[1]+b[6]*w[2]+b[7]*w[3],b[8]*w[0]+b[9]*w[1]+b[10]*w[2]+b[11]*w[3],b[12]*w[0]+b[13]*w[1]+b[14]*w[2]+b[15]*w[3]],dot:(b,w)=>b[0]*w[0]+b[1]*w[1]+b[2]*w[2]+b[3]*w[3],sml:(b,w)=>[b*w[0],b*w[1],b*w[2],b*w[3]]};$t.encode=function(w,T,C,M,R,S,L){M==null&&(M=0),L==null&&(L=!1);const g=i(w,T,C,M,[!1,!1,!1,0,L,!1]);return x(g,-1),p(g,T,C,R,S)},$t.encodeLL=function(w,T,C,M,R,S,L,g){const u={ctype:0+(M==1?0:2)+(R==0?0:4),depth:S,frames:[]},I=(M+R)*S,y=I*T;for(let E=0;E<w.length;E++)u.frames.push({rect:{x:0,y:0,width:T,height:C},img:new Uint8Array(w[E]),blend:0,dispose:1,bpp:Math.ceil(I/8),bpl:Math.ceil(y/8)});return x(u,0,!0),p(u,T,C,L,g)},$t.encode.compress=i,$t.encode.dither=o,$t.quantize=$,$t.quantize.getKDtree=z,$t.quantize.getNearest=m})();const Ki={toArrayBuffer(t,f){const D=t.width,c=t.height,e=D<<2,n=t.getContext("2d").getImageData(0,0,D,c),r=new Uint32Array(n.data.buffer),o=(32*D+31)/32<<2,p=o*c,x=122+p,i=new ArrayBuffer(x),s=new DataView(i),a=1<<20;let d,v,$,z,m=a,V=0,K=0,N=0;function O(b){s.setUint16(K,b,!0),K+=2}function A(b){s.setUint32(K,b,!0),K+=4}function H(b){K+=b}O(19778),A(x),H(4),A(122),A(108),A(D),A(-c>>>0),O(1),O(32),A(3),A(p),A(2835),A(2835),H(8),A(16711680),A(65280),A(255),A(4278190080),A(1466527264),(function b(){for(;V<c&&m>0;){for(z=122+V*o,d=0;d<e;)m--,v=r[N++],$=v>>>24,s.setUint32(z+d,v<<8|$),d+=4;V++}N<r.length?(m=a,setTimeout(b,Ki._dly)):f(i)})()},toBlob(t,f){this.toArrayBuffer(t,(D=>{f(new Blob([D],{type:"image/bmp"}))}))},_dly:9};var Mt={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},cr={[Mt.CHROME]:16384,[Mt.FIREFOX]:11180,[Mt.DESKTOP_SAFARI]:16384,[Mt.IE]:8192,[Mt.IOS]:4096,[Mt.ETC]:8192};const si=typeof window<"u",Qi=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Tn=si&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),fr=(si||Qi)&&(Tn&&Tn.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Gi=(si||Qi)&&(Tn&&Tn.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function ri(t,f,D=Date.now()){return new Promise((c=>{const e=t.split(","),n=e[0].match(/:(.*?);/)[1],r=globalThis.atob(e[1]);let o=r.length;const p=new Uint8Array(o);for(;o--;)p[o]=r.charCodeAt(o);const x=new Blob([p],{type:n});x.name=f,x.lastModified=D,c(x)}))}function Ji(t){return new Promise(((f,D)=>{const c=new Gi;c.onload=()=>f(c.result),c.onerror=e=>D(e),c.readAsDataURL(t)}))}function Yi(t){return new Promise(((f,D)=>{const c=new Image;c.onload=()=>f(c),c.onerror=e=>D(e),c.src=t}))}function Jt(){if(Jt.cachedResult!==void 0)return Jt.cachedResult;let t=Mt.ETC;const{userAgent:f}=navigator;return/Chrom(e|ium)/i.test(f)?t=Mt.CHROME:/iP(ad|od|hone)/i.test(f)&&/WebKit/i.test(f)?t=Mt.IOS:/Safari/i.test(f)?t=Mt.DESKTOP_SAFARI:/Firefox/i.test(f)?t=Mt.FIREFOX:(/MSIE/i.test(f)||document.documentMode)&&(t=Mt.IE),Jt.cachedResult=t,Jt.cachedResult}function Xi(t,f){const D=Jt(),c=cr[D];let e=t,n=f,r=e*n;const o=e>n?n/e:e/n;for(;r>c*c;){const p=(c+e)/2,x=(c+n)/2;p<x?(n=x,e=x*o):(n=p*o,e=p),r=e*n}return{width:e,height:n}}function zn(t,f){let D,c;try{if(D=new OffscreenCanvas(t,f),c=D.getContext("2d"),c===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{D=document.createElement("canvas"),c=D.getContext("2d")}return D.width=t,D.height=f,[D,c]}function Zi(t,f){const{width:D,height:c}=Xi(t.width,t.height),[e,n]=zn(D,c);return f&&/jpe?g/.test(f)&&(n.fillStyle="white",n.fillRect(0,0,e.width,e.height)),n.drawImage(t,0,0,e.width,e.height),e}function En(){return En.cachedResult!==void 0||(En.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),En.cachedResult}function Ln(t,f={}){return new Promise((function(D,c){let e,n;var r=function(){try{return n=Zi(e,f.fileType||t.type),D([e,n])}catch(p){return c(p)}},o=function(p){try{var x=function(i){try{throw i}catch(s){return c(s)}};try{let i;return Ji(t).then((function(s){try{return i=s,Yi(i).then((function(a){try{return e=a,(function(){try{return r()}catch(d){return c(d)}})()}catch(d){return x(d)}}),x)}catch(a){return x(a)}}),x)}catch(i){x(i)}}catch(i){return c(i)}};try{if(En()||[Mt.DESKTOP_SAFARI,Mt.MOBILE_SAFARI].includes(Jt()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(t).then((function(p){try{return e=p,r()}catch{return o()}}),o)}catch{o()}}))}function Rn(t,f,D,c,e=1){return new Promise((function(n,r){let o;if(f==="image/png"){let x,i,s;return x=t.getContext("2d"),{data:i}=x.getImageData(0,0,t.width,t.height),s=$t.encode([i.buffer],t.width,t.height,4096*e),o=new Blob([s],{type:f}),o.name=D,o.lastModified=c,p.call(this)}{let x=function(){return p.call(this)};if(f==="image/bmp")return new Promise((i=>Ki.toBlob(t,i))).then((function(i){try{return o=i,o.name=D,o.lastModified=c,x.call(this)}catch(s){return r(s)}}).bind(this),r);{let i=function(){return x.call(this)};if(typeof OffscreenCanvas=="function"&&t instanceof OffscreenCanvas)return t.convertToBlob({type:f,quality:e}).then((function(s){try{return o=s,o.name=D,o.lastModified=c,i.call(this)}catch(a){return r(a)}}).bind(this),r);{let s;return s=t.toDataURL(f,e),ri(s,D,c).then((function(a){try{return o=a,i.call(this)}catch(d){return r(d)}}).bind(this),r)}}}function p(){return n(o)}}))}function Tt(t){t.width=0,t.height=0}function on(){return new Promise((function(t,f){let D,c,e,n;return on.cachedResult!==void 0?t(on.cachedResult):ri("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(r){try{return D=r,Ln(D).then((function(o){try{return c=o[1],Rn(c,D.type,D.name,D.lastModified).then((function(p){try{return e=p,Tt(c),Ln(e).then((function(x){try{return n=x[0],on.cachedResult=n.width===1&&n.height===2,t(on.cachedResult)}catch(i){return f(i)}}),f)}catch(x){return f(x)}}),f)}catch(p){return f(p)}}),f)}catch(o){return f(o)}}),f)}))}function eo(t){return new Promise(((f,D)=>{const c=new Gi;c.onload=e=>{const n=new DataView(e.target.result);if(n.getUint16(0,!1)!=65496)return f(-2);const r=n.byteLength;let o=2;for(;o<r;){if(n.getUint16(o+2,!1)<=8)return f(-1);const p=n.getUint16(o,!1);if(o+=2,p==65505){if(n.getUint32(o+=2,!1)!=1165519206)return f(-1);const x=n.getUint16(o+=6,!1)==18761;o+=n.getUint32(o+4,x);const i=n.getUint16(o,x);o+=2;for(let s=0;s<i;s++)if(n.getUint16(o+12*s,x)==274)return f(n.getUint16(o+12*s+8,x))}else{if((65280&p)!=65280)break;o+=n.getUint16(o,!1)}}return f(-1)},c.onerror=e=>D(e),c.readAsArrayBuffer(t)}))}function to(t,f){const{width:D}=t,{height:c}=t,{maxWidthOrHeight:e}=f;let n,r=t;return isFinite(e)&&(D>e||c>e)&&([r,n]=zn(D,c),D>c?(r.width=e,r.height=c/D*e):(r.width=D/c*e,r.height=e),n.drawImage(t,0,0,r.width,r.height),Tt(t)),r}function no(t,f){const{width:D}=t,{height:c}=t,[e,n]=zn(D,c);switch(f>4&&f<9?(e.width=c,e.height=D):(e.width=D,e.height=c),f){case 2:n.transform(-1,0,0,1,D,0);break;case 3:n.transform(-1,0,0,-1,D,c);break;case 4:n.transform(1,0,0,-1,0,c);break;case 5:n.transform(0,1,1,0,0,0);break;case 6:n.transform(0,1,-1,0,c,0);break;case 7:n.transform(0,-1,-1,0,c,D);break;case 8:n.transform(0,-1,1,0,0,D)}return n.drawImage(t,0,0,D,c),Tt(t),e}function Ei(t,f,D=0){return new Promise((function(c,e){let n,r,o,p,x,i,s,a,d,v,$,z,m,V,K,N,O,A,H,b;function w(C=5){if(f.signal&&f.signal.aborted)throw f.signal.reason;n+=C,f.onProgress(Math.min(n,100))}function T(C){if(f.signal&&f.signal.aborted)throw f.signal.reason;n=Math.min(Math.max(C,n),100),f.onProgress(n)}return n=D,r=f.maxIteration||10,o=1024*f.maxSizeMB*1024,w(),Ln(t,f).then((function(C){try{return[,p]=C,w(),x=to(p,f),w(),new Promise((function(M,R){var S;if(!(S=f.exifOrientation))return eo(t).then((function(g){try{return S=g,L.call(this)}catch(u){return R(u)}}).bind(this),R);function L(){return M(S)}return L.call(this)})).then((function(M){try{return i=M,w(),on().then((function(R){try{return s=R?x:no(x,i),w(),a=f.initialQuality||1,d=f.fileType||t.type,Rn(s,d,t.name,t.lastModified,a).then((function(S){try{{let g=function(){if(r--&&(K>o||K>m)){let I,y;return I=b?.95*H.width:H.width,y=b?.95*H.height:H.height,[O,A]=zn(I,y),A.drawImage(H,0,0,I,y),a*=d==="image/png"?.85:.95,Rn(O,d,t.name,t.lastModified,a).then((function(E){try{return N=E,Tt(H),H=O,K=N.size,T(Math.min(99,Math.floor((V-K)/(V-o)*100))),g}catch(j){return e(j)}}),e)}return[1]},u=function(){return Tt(H),Tt(O),Tt(x),Tt(s),Tt(p),T(100),c(N)};if(v=S,w(),$=v.size>o,z=v.size>t.size,!$&&!z)return T(100),c(v);var L;return m=t.size,V=v.size,K=V,H=s,b=!f.alwaysKeepResolution&&$,(L=(function(I){for(;I;){if(I.then)return void I.then(L,e);try{if(I.pop){if(I.length)return I.pop()?u.call(this):I;I=g}else I=I.call(this)}catch(y){return e(y)}}}).bind(this))(g)}}catch(g){return e(g)}}).bind(this),e)}catch(S){return e(S)}}).bind(this),e)}catch(R){return e(R)}}).bind(this),e)}catch(M){return e(M)}}).bind(this),e)}))}const dr=`
|
|
9
|
+
let scriptImported = false
|
|
10
|
+
self.addEventListener('message', async (e) => {
|
|
11
|
+
const { file, id, imageCompressionLibUrl, options } = e.data
|
|
12
|
+
options.onProgress = (progress) => self.postMessage({ progress, id })
|
|
13
|
+
try {
|
|
14
|
+
if (!scriptImported) {
|
|
15
|
+
// console.log('[worker] importScripts', imageCompressionLibUrl)
|
|
16
|
+
self.importScripts(imageCompressionLibUrl)
|
|
17
|
+
scriptImported = true
|
|
18
|
+
}
|
|
19
|
+
// console.log('[worker] self', self)
|
|
20
|
+
const compressedFile = await imageCompression(file, options)
|
|
21
|
+
self.postMessage({ file: compressedFile, id })
|
|
22
|
+
} catch (e) {
|
|
23
|
+
// console.error('[worker] error', e)
|
|
24
|
+
self.postMessage({ error: e.message + '\\n' + e.stack, id })
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
`;let Jn;function hr(t,f){return new Promise(((D,c)=>{Jn||(Jn=(function(r){const o=[];return o.push(r),URL.createObjectURL(new Blob(o))})(dr));const e=new Worker(Jn);e.addEventListener("message",(function(r){if(f.signal&&f.signal.aborted)e.terminate();else if(r.data.progress===void 0){if(r.data.error)return c(new Error(r.data.error)),void e.terminate();D(r.data.file),e.terminate()}else f.onProgress(r.data.progress)})),e.addEventListener("error",c),f.signal&&f.signal.addEventListener("abort",(()=>{c(f.signal.reason),e.terminate()})),e.postMessage({file:t,imageCompressionLibUrl:f.libURL,options:{...f,onProgress:void 0,signal:void 0}})}))}function vt(t,f){return new Promise((function(D,c){let e,n,r,o,p,x;if(e={...f},r=0,{onProgress:o}=e,e.maxSizeMB=e.maxSizeMB||Number.POSITIVE_INFINITY,p=typeof e.useWebWorker!="boolean"||e.useWebWorker,delete e.useWebWorker,e.onProgress=d=>{r=d,typeof o=="function"&&o(r)},!(t instanceof Blob||t instanceof fr))return c(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return c(new Error("The file given is not an image"));if(x=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!p||typeof Worker!="function"||x)return Ei(t,e).then((function(d){try{return n=d,a.call(this)}catch(v){return c(v)}}).bind(this),c);var i=(function(){try{return a.call(this)}catch(d){return c(d)}}).bind(this),s=function(d){try{return Ei(t,e).then((function(v){try{return n=v,i()}catch($){return c($)}}),c)}catch(v){return c(v)}};try{return e.libURL=e.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",hr(t,e).then((function(d){try{return n=d,i()}catch{return s()}}),s)}catch{s()}function a(){try{n.name=t.name,n.lastModified=t.lastModified}catch{}try{e.preserveExif&&t.type==="image/jpeg"&&(!e.fileType||e.fileType&&e.fileType===t.type)&&(n=Wi(t,n))}catch{}return D(n)}}))}vt.getDataUrlFromFile=Ji,vt.getFilefromDataUrl=ri,vt.loadImage=Yi,vt.drawImageInCanvas=Zi,vt.drawFileInCanvas=Ln,vt.canvasToFile=Rn,vt.getExifOrientation=eo,vt.handleMaxWidthOrHeight=to,vt.followExifOrientation=no,vt.cleanupCanvasMemory=Tt,vt.isAutoOrientationInBrowser=on,vt.approximateBelowMaximumCanvasSizeOfBrowser=Xi,vt.copyExifWithoutOrientation=Wi,vt.getBrowserName=Jt,vt.version="2.0.2";const mr={class:"info"},gr=["src"],pr={class:"info"},vr={key:0},yr={key:1},wr={class:"more"},br={key:0,class:"note note-nomsg"},kr={key:1,class:"note note-nomsg"},_r={class:"ss-card"},Ir={key:0},Sr={class:"ss-card jin-pan"},Cr=["src"],Mr={class:"context"},Ar={key:0},xr=["src","onClick"],Er={class:"jin-pan-load"},Fr={class:"imgs"},$r={class:"img-btns"},Tr=["onClick"],Lr=["onClick"],Rr={class:"img"},Dr=["src"],Br=["onClick"],Or={key:0,class:"emp"},Ur=["title"],Nr={for:"choice-pic",class:"sr-only"},zr=["title"],Hr={for:"choice-file",class:"sr-only"},Pr=["title"],jr={for:"choice-video",class:"sr-only"},Vr={class:"voice-menu-wrap"},qr=["title"],Wr=["title"],Kr={class:"send-tool-buttons"},Qr=["title","aria-pressed"],Gr={for:"custom-element-type",class:"sr-only"},Jr=["disabled"],Yr={for:"main-input",class:"sr-only"},Xr=["disabled"],Zr={for:"main-input-ex",class:"sr-only"},el=["disabled"],tl={for:"main-input",class:"sr-only"},nl=["disabled","placeholder"],il={for:"main-input-ex",class:"sr-only"},ol=["disabled"],al={key:0,class:"forward-pan"},sl={class:"ss-card card"},rl={for:"chat-forward-search",class:"sr-only"},ll=["placeholder"],ul=["onClick"],cl=["title","src"],Fi=50,fl=100,dl=4,hl=Nt({name:"ViewChat",__name:"Chat",props:{chat:{},list:{},imgView:{}},setup(t){const f=On.global.t,{viewer:D}=Do("viewer",{viewer:null}),c=Bo(),e=Li(),n=ii(),r=Dn(),o=Bn(),p=Ti(),x=tn("mergePan"),i=tn("msgPan"),s=tn("chatPadding"),a=tn("sendMore"),d=tn("mainInput"),v=tn("customElementTypeInput"),$=he([]),z=he("single-message"),m=he({sendTag:"REFUSE",showBottomButton:!1,showMoreDetail:!1,showMsgMenu:!1,showForwardPan:!1,openChatInfo:!1,isReply:!1,isJinLoading:!1,onAtFind:!1,menuDisplay:{menuSelectedMsgId:null,jumpToMsg:!1,add:!0,relpy:!0,forward:!0,select:!0,copy:!0,copySelect:!1,copyImg:!1,downloadImg:!1,revoke:!1,reedit:!1,at:!0,poke:!1,remove:!1,respond:!1,showRespond:!0,config:!1},search:{userId:-1,list:_n(t.list)},msgTouch:{x:-1,y:-1,msgOnTouchDown:!1,onMove:"no"},checkNewLineFlag:!1}),V=he([{open:!1},{open:!1},{open:!1},{open:!1}]),K=he([]),N=he(0),O=he(""),A=he(!1),H=he(""),b=he(""),w=he(new Map),T=he(!1),C=he(null),M=he(!1),R=he(null);let S=[];const L=he([]),g=he(null),u=he(""),I=he(null),y=he(0),E=he(null),j=he(null),W=he(null),X=he(0),Q=he(p.userList),P=he(void 0),ie=Bi();function fe(){const l=o.chatInfo.show;return`${String(l.type??"")}:${String(l.id??"")}:${String(l.channel_id??"")}`}function ye(l){const h=Number((l==null?void 0:l.local_time)??(l==null?void 0:l.timestamp_ms)??(l==null?void 0:l.time_ms)??0);if(h)return h;const _=Number((l==null?void 0:l.time)??0);return Number.isFinite(_)&&_>0?_*1e3:0}async function ve(){const l=t.chat.show.id;if(!l||l===0||V.value[3].open||m.value.showForwardPan)return;const h=fe(),_=(t.chat.show.type==="group",String(t.chat.show.channel_id??l));let U=[];try{U=await _i({platform:String(r.loginInfo.platform??""),selfId:String(r.loginInfo.uin??""),channelId:_,limit:fl})}catch{return}if(!U.length||String(t.chat.show.id)!==String(l)||h!==fe())return;const F=new Set,Z=ue=>{const Ee=String((ue==null?void 0:ue.message_id)??""),ce=String((ue==null?void 0:ue.fake_message_id)??"");Ee&&F.add(Ee),ce&&F.add(ce)},ee=[...o.messageList];for(const ue of ee)Z(ue);let se=!1;for(const ue of U){const Ee=String(ue.message_id??""),ce=String(ue.fake_message_id??"");Ee&&F.has(Ee)||ce&&F.has(ce)||!Ee&&!ce||(Z(ue),ee.push(ue),se=!0)}se&&(ee.sort((ue,Ee)=>ye(ue)-ye(Ee)),o.messageList.splice(0,o.messageList.length,...ee))}function we(){t.chat.show.id&&ve()}const Le={beforeHook:l=>{const h=qn();if(!h)return;h.style.transition="all 0s";const _=document.getElementById("chat-pan");if(!_)return;const U=_.getElementsByClassName("chat")[0];U&&(U.style.overflowY="hidden")},moveHook:(l,h)=>{const _=qn();_&&(_.style.transform="translateX("+h+"px)")},endHook:l=>{const h=document.getElementById("chat-pan"),_=h==null?void 0:h.getElementsByClassName("chat")[0];_&&(_.style.overflowY="scroll");const U=qn();U&&(U.style.transition="transform 0.3s",U.style.transform="")},rightLimit:{value:100,type:"%"},speedCondition:{minMove:{value:.5*e.inch,type:"px"},minSpeed:5*e.inch},moveCondition:{minMove:{value:33,type:"%"}}};function Be(){N.value=0,A.value=!1,H.value="",m.value={sendTag:"REFUSE",showBottomButton:!1,showMoreDetail:!1,showMsgMenu:!1,showForwardPan:!1,openChatInfo:!1,isReply:!1,isJinLoading:!1,onAtFind:!1,menuDisplay:{menuSelectedMsgId:null,jumpToMsg:!1,add:!0,relpy:!0,forward:!0,select:!0,copy:!0,copySelect:!1,copyImg:!1,downloadImg:!1,revoke:!1,reedit:!1,at:!0,poke:!1,remove:!1,respond:!1,showRespond:!0,config:!1},search:{userId:-1,list:_n(t.list)},msgTouch:{x:-1,y:-1,msgOnTouchDown:!1,onMove:"no"},checkNewLineFlag:!1},K.value=[],be=!0}Ct(()=>t.chat,()=>{Be(),L.value=[],w.value.clear(),$.value=[],it(),ht(()=>{Re(),Ye(),qe()}),we();const l=ki(),h=t.chat.show.id,_=[...p.userList].find(U=>(U.user_id??U.group_id)===h);_&&l.add(_)}),Ct(()=>O.value,(l,h)=>{b.value=h,Re()}),pn(()=>{we();const l=ki(),h=t.chat.show.id,_=[...p.userList].find(U=>(U.user_id??U.group_id)===h);_&&l.add(_),mi(t.list.length,0),Ct(()=>t.list.map(U=>U.message_id+"_"+U.fake_msg),(U,F=[])=>{mi(U.length,F.length),U.length>0&&F.length===0&&ht(ae)}),Ct(()=>t.chat.info.jin_info.list.length,()=>{m.value.isJinLoading=!1}),bt.type=="capacitor"&&bt.platform==="android"&&bt.addListener("App","backButton",()=>{bn()}),Ct(()=>c.backTimes,()=>{bn()}),ht(()=>{Ve(),me(),Re(),Ye(),qe()})}),ni(()=>{if(Ge!==null&&(cancelAnimationFrame(Ge),Ge=null),Je!==null&&(cancelAnimationFrame(Je),Je=null),pe!==null&&(pe.disconnect(),pe=null),Oe!==null&&(Oe.disconnect(),Oe=null),_e!==null){const l=i.value;l==null||l.removeEventListener("load",_e,!0),l==null||l.removeEventListener("error",_e,!0),l==null||l.removeEventListener("loadedmetadata",_e,!0),l==null||l.removeEventListener("loadeddata",_e,!0),_e=null}});let Ge=null,Je=null,pe=null,Oe=null,_e=null,be=!0,je=[];function Re(l,h=!1){ht(()=>{Ge!==null&&cancelAnimationFrame(Ge),Ge=requestAnimationFrame(()=>{Ge=null,At(l??d.value),tt(h?()=>ae():void 0)})})}function Ne(){const l=a.value,h=s.value,_=i.value;if(!l||!h||!_)return;const U=Array.from(l.children).flatMap(ee=>Array.from(ee.children)).filter(ee=>ee instanceof HTMLElement&&ee.offsetHeight>0),F=U.length>0?U.reduce((ee,se)=>Math.min(ee,se.getBoundingClientRect().top),Number.POSITIVE_INFINITY):l.getBoundingClientRect().top,Z=_.getBoundingClientRect().bottom;h.style.height=Math.max(0,Z-F)+"px"}function tt(l){l&&je.push(l),Je===null&&(Je=requestAnimationFrame(()=>{Je=null,Ne();const h=je;je=[],h.forEach(_=>_())}))}function Ve(){if(pe!==null)return;const l=a.value;if(!l||typeof ResizeObserver>"u"){tt();return}pe=new ResizeObserver(()=>{tt()}),pe.observe(l),tt()}function me(){const l=i.value;if(!l||Oe!==null||_e!==null)return;const h=()=>{qe(),Ye()};_e=h,l.addEventListener("load",h,!0),l.addEventListener("error",h,!0),l.addEventListener("loadedmetadata",h,!0),l.addEventListener("loadeddata",h,!0),!(typeof ResizeObserver>"u")&&(Oe=new ResizeObserver(()=>{h()}),Oe.observe(l),l.firstElementChild&&Oe.observe(l.firstElementChild))}function Ye(){!be||!i.value||(ae(!1),requestAnimationFrame(()=>{!be||!i.value||(ae(!1),requestAnimationFrame(()=>{be&&i.value&&ae(!1)}))}))}function At(l){const h=l??d.value;if(!h)return;if(n.sysConfig.send_key==="none"){h.style.height="";return}if(!(h instanceof HTMLTextAreaElement)){h.style.height="";return}const _=getComputedStyle(h),U=Number.parseFloat(_.lineHeight),F=Number.parseFloat(_.fontSize),Z=Number.isFinite(U)?U:F,ee=Number.parseFloat(_.paddingTop)||0,se=Number.parseFloat(_.paddingBottom)||0,ue=Number.parseFloat(_.borderTopWidth)||0,Ee=Number.parseFloat(_.borderBottomWidth)||0;let ce=(Number.isFinite(Z)?Z:0)+ee+se+ue+Ee;if(ce<=0){const ft=h.offsetHeight||Number.parseFloat(_.height)||F;ft&&Number.isFinite(ft)&&(ce=ft)}h.dataset.baseHeight||(h.dataset.baseHeight=String(ce));const Ke=h.style.transition;h.style.transition="none";const ot=h.style.overflow,Fe=Number.parseFloat(h.dataset.baseHeight)||ce;if(h.value==="")h.style.height=Fe+"px";else{h.style.overflow="hidden",h.style.height="0px";const ft=Math.max(h.scrollHeight-dl,Fe);h.style.height=ft+"px",h.style.overflow=ot}h.getBoundingClientRect(),h.style.transition=Ke}function Lt(){gi(),ht(()=>{var l;g.value&&(un("chat-"+((l=g.value)==null?void 0:l.message_id),!0),pt())})}function qe(){const l=i.value;if(!l)return;const h=l.scrollHeight>l.clientHeight+1,_=l.scrollTop+l.clientHeight+10>=l.scrollHeight;m.value.showBottomButton=h&&!_}function kt(l,h){if(h)return;const _=l.target;_.scrollTop===0&&t.list.length>0&&De(),_.scrollTop+_.clientHeight+10>=_.scrollHeight?(be=!0,N.value=0,m.value.showBottomButton=!1):(be&&(be=!1),qe())}async function De(){if(!e.nowGetHistory&&e.canLoadHistory!==!1){const l=t.list[0],h=l.message_id,_=Number(l==null?void 0:l.time),U=fe(),F=()=>U!==fe(),Z=Number((l==null?void 0:l.local_time)??(l==null?void 0:l.timestamp_ms)??(l==null?void 0:l.time_ms)??0)||(Number.isFinite(_)?_*1e3:0),ee=n.sysConfig.enable_local_history&&n.sysConfig.mixed_load_messages!==!1;if(e.nowGetHistory=!0,ee&&Number.isFinite(_)?e.historyBeforeTime=_:e.historyBeforeTime=void 0,e.loadHistoryFail=!1,F()){e.nowGetHistory=!1;return}const se=String(o.chatInfo.show.channel_id??o.chatInfo.show.id??"");if(ee){let Ke=[];if(Number.isFinite(_)?Ke=await Po(r.loginInfo.uin,se,_,20):Ke=await jo(r.loginInfo.uin,se,h,20),F()){e.nowGetHistory=!1;return}if(Ke.length>0){const ot=new Set(o.messageList.map(It=>String(It.message_id??""))),Fe=Ke.filter(It=>{const Kt=String((It==null?void 0:It.message_id)??"");return Kt.length===0||!ot.has(Kt)});Fe.length>0&&o.messageList.splice(0,0,...Fe);const ft=t.list[Fe.length]??t.list[Fe.length-1],Qe=q([...Fe,ft]);Qe.length>0&&J(Qe)}}if(F()){e.nowGetHistory=!1;return}const ue=await _i({platform:String(r.loginInfo.platform??""),selfId:String(r.loginInfo.uin??""),channelId:se,limit:Fi,beforeTimeMs:Z>0?Z:void 0});if(F()){e.nowGetHistory=!1;return}const Ee=new Set(o.messageList.map(Ke=>String(Ke.message_id??""))),ce=ue.filter(Ke=>{const ot=String(Ke.message_id??"");return ot.length===0||!Ee.has(ot)});ce.length>0&&o.messageList.splice(0,0,...ce),ue.length<Fi&&(e.canLoadHistory=!1),e.nowGetHistory=!1}}function q(l){const h=[];for(let _=0;_<l.length-1;_++){const U=l[_].message_seq??l[_].seq??null,F=l[_+1].message_seq??l[_+1].seq??null;if(U==null||F==null)return[];F-U>1&&h.push(l[_+1].message_id)}return h}function J(l){var ee;const h=o.chatInfo.show.type,_=o.chatInfo.show.id,U=String(o.chatInfo.show.channel_id??_),F=String(o.chatInfo.show.guild_id??_);let Z;r.jsonMap.message_list&&h!="group"?Z=r.jsonMap.message_list.private_name:Z=(ee=r.jsonMap.message_list)==null?void 0:ee.name;for(const se of l)st.send(Z??"get_chat_history",{group_id:h=="group"?F||_:void 0,guild_id:h=="group"?F||_:void 0,channel_id:U,user_id:h!="group"?_:void 0,message_id:se,count:20},"getChatHistoryGapFill_"+se)}function ne(l,h=!0){const _=document.getElementById("msgPan");_!==null&&l&&(h===!1?_.style.scrollBehavior="unset":_.style.scrollBehavior="smooth",_.scrollTop=l,_.style.scrollBehavior="smooth")}function ae(l=!1){const h=document.getElementById("msgPan");h!==null&&ne(h.scrollHeight,l)}function re(l){un(l,!0)||new ct().add(Te.INFO,f("无法定位上下文"))}function le(l){const h=document.getElementById("msgPan");h&&(t.list.length<=20&&!m.value.showBottomButton?ae():ne(h.scrollTop+l,!1))}function de(l){if(xe(l)||m.value.onAtFind||l.key!=="Enter")return;let h=!1;switch(n.sysConfig.send_key){case"none":if(l.shiftKey||l.ctrlKey||l.altKey||l.metaKey)break;h=!0;break;case"shift":if(!l.shiftKey)break;h=!0;break;case"ctrl":if(!l.ctrlKey)break;h=!0;break;case"alt":if(!l.altKey)break;h=!0;break;case"meta":if(!l.metaKey)break;h=!0;break}h&&m.value.sendTag!="PASS"&&(m.value.sendTag="READY"),m.value.sendTag=="READY"&&O.value!==""?(l.preventDefault(),rn()):l.key==="Enter"&&(l.ctrlKey||l.metaKey||l.altKey)&&(O.value+=`
|
|
28
|
+
`),m.value.sendTag="REFUSE"}function xe(l){var h;if(!m.value.onAtFind)return!1;if(l.keyCode===38||l.keyCode===40){l.preventDefault();const _=l.keyCode===38?-1:1;return lt(_),E.value!==null||(E.value=setTimeout(()=>{j.value=setInterval(()=>{lt(_)},50)},300)),!0}if(l.keyCode===13){l.preventDefault();const _=(h=I.value)==null?void 0:h[y.value];return _&&Ie(_.user_id),!0}return l.keyCode===27?(l.preventDefault(),m.value.onAtFind=!1,I.value=null,y.value=0,!0):!1}function rt(){m.value.sendTag="REFUSE"}function ze(){m.value.sendTag="PASS",setTimeout(()=>{m.value.sendTag="REFUSE"},50)}function Xe(l){const h=new Ot;if(l.keyCode!==27&&((l.keyCode===38||l.keyCode===40)&&(E.value!==null&&(clearTimeout(E.value),E.value=null),j.value!==null&&(clearInterval(j.value),j.value=null)),m.value.checkNewLineFlag&&(m.value.checkNewLineFlag=!1,O.value==`
|
|
29
|
+
`&&(O.value="",Re())),!(m.value.onAtFind&&I.value&&I.value.length>0&&(l.keyCode===38||l.keyCode===40||l.keyCode===13||l.keyCode===27))&&l.keyCode!=13)){const _=O.value.substring(O.value.length-1);if(!m.value.onAtFind&&_=="@"&&o.chatInfo.info.group_members.length>0&&o.chatInfo.show.type=="group"&&(h.add(In.UI,"开始匹配群成员列表 ……"),m.value.onAtFind=!0,y.value=0),m.value.onAtFind)if(O.value.lastIndexOf("@")<0)h.add(In.UI,"匹配群成员列表被打断 ……"),m.value.onAtFind=!1,I.value=null,y.value=0;else{const U=O.value.substring(O.value.lastIndexOf("@")+1).toLowerCase();I.value=o.chatInfo.info.group_members.filter(F=>F.card!=""&&F.card!=null&&F.card.toLowerCase().indexOf(U)>=0||F.nickname.toLowerCase().indexOf(U)>=0||U==F.user_id.toString()),I.value.length==0&&(I.value=o.chatInfo.info.group_members),y.value=0}}}function We(l){l.preventDefault(),O.value!=""&&rn()}function Ie(l){l!=null&&(O.value=O.value.substring(0,O.value.lastIndexOf("@")),Wt({msgObj:{type:"at",qq:String(l)},addText:!0})),Zt(),m.value.onAtFind=!1,I.value=null,y.value=0}function He(){ht(()=>{const l=document.querySelector(".at-tag.show"),h=document.querySelector(".at-tag.show > div.selected");if(l&&h){const _=l.getBoundingClientRect(),U=h.getBoundingClientRect();U.top<_.top?h.scrollIntoView({block:"nearest",behavior:"smooth"}):U.bottom>_.bottom&&h.scrollIntoView({block:"nearest",behavior:"smooth"})}})}function lt(l){!I.value||I.value.length===0||(l===-1?y.value=y.value>0?y.value-1:I.value.length-1:y.value=y.value<I.value.length-1?y.value+1:0,He())}function wt(){const l=document.getElementById("main-input")??document.getElementById("main-input-ex");if(l!==null&&l.selectionStart===l.selectionEnd){let h=-1;typeof l.selectionStart=="number"&&(h=l.selectionStart);const _=Ii.getSQList(O.value);_!=null&&_.forEach(U=>{const F=O.value.indexOf(U),Z=F+U.length;F!==-1&&h>F&&h<Z&&ht(()=>{l.selectionStart=F,l.selectionEnd=Z})})}}function nt(l,h){var Z;if(g.value=h,m.value.menuDisplay.menuSelectedMsgId=h.message_id,Ni.get("log_level")==="debug"&&new Ot().debug("右击消息:"+h),$.value.length>0)return;const _=document.getElementById("msgMenu"),U=l.target;let F="member";if(o.chatInfo.show.type=="group"&&o.chatInfo.info.group_members&&o.chatInfo.info.group_members.forEach(ee=>{ee.user_id==h.sender.user_id&&(F=ee.role)}),_!==null&&h!==null){if(Vo("close_respond")==!0&&(m.value.menuDisplay.showRespond=!1),U.nodeName=="IMG"&&U.name=="avatar")Object.keys(m.value.menuDisplay).forEach(ce=>{m.value.menuDisplay[ce]=!1}),m.value.menuDisplay.showRespond=!1,m.value.menuDisplay.at=!0,m.value.menuDisplay.poke=!0,m.value.menuDisplay.remove=!0,(o.chatInfo.show.type!="group"||h.sender.user_id===r.loginInfo.uin||o.chatInfo.info.me_info.role==="member"||F=="owner"||F=="admin"&&o.chatInfo.info.me_info.role!="owner")&&(m.value.menuDisplay.remove=!1),h.sender.user_id===r.loginInfo.uin&&(m.value.menuDisplay.at=!1),o.chatInfo.show.type=="group"&&o.chatInfo.info.me_info.role!="member"&&(m.value.menuDisplay.config=!0);else{(h.sender.user_id===r.loginInfo.uin||o.chatInfo.info.me_info.role==="admin"||o.chatInfo.info.me_info.role==="owner")&&(m.value.menuDisplay.revoke=!0),m.value.menuDisplay.reedit=m.value.menuDisplay.revoke&&h.sender.user_id===r.loginInfo.uin,h.revoke===!0&&(m.value.menuDisplay.relpy=!1,m.value.menuDisplay.forward=!1,m.value.menuDisplay.revoke=!1,m.value.menuDisplay.select=!1),V.value[3].open&&(Object.keys(m.value.menuDisplay).forEach(Qe=>{m.value.menuDisplay[Qe]=!1}),m.value.menuDisplay.jumpToMsg=!0);const ce=document.getSelection(),Ke=(Z=ce==null?void 0:ce.anchorNode)==null?void 0:Z.parentElement;let ot=null,Fe=Ke;if(Fe)for(;Fe.className!="chat";){if(Fe.className.startsWith("message")&&Fe.className.indexOf("-")<0){ot=Fe;break}if(Fe=Fe.parentElement,!Fe)break}Ke&&Ke.className.indexOf("msg-text")>-1&&ce.focusNode==ce.anchorNode&&ot&&ot.id==h.message_id&&(u.value=ce.toString(),u.value.length>0&&(m.value.menuDisplay.copySelect=!0));const ft=["xml","json"];h.message.forEach(Qe=>{ft.indexOf(Qe.type)>0&&(m.value.menuDisplay.forward=!1,m.value.menuDisplay.add=!1)}),U.nodeName=="IMG"&&U.src.length>0&&(m.value.menuDisplay.downloadImg=U.src,bt.isDesktop()&&(m.value.menuDisplay.copyImg=!0))}const ee=l.x,se=l.y;_.style.marginLeft=ee+"px",_.style.marginTop=se+"px";let ue=_.clientWidth;m.value.menuDisplay.showRespond&&(ue=_.children[0].clientWidth);const Ee=window.innerWidth;ee+ue>Ee+27&&(_.style.marginLeft=Ee+7-ue+"px"),m.value.showMsgMenu=!0,ht(()=>{const ce=_.clientHeight,Ke=document.body.clientHeight;se+ce>Ke-20&&(_.classList.add("topOut"),_.style.marginTop=Ke-ce-10+"px")})}}function it(){m.value.menuDisplay={menuSelectedMsgId:null,jumpToMsg:!1,add:!0,relpy:!0,forward:!0,select:!0,copy:!0,copySelect:!1,downloadImg:!1,copyImg:!1,revoke:!1,reedit:!1,at:!1,poke:!1,remove:!1,respond:!1,showRespond:!0,config:!1}}function ut(l=!0){const h=g.value;h&&(Ue(h),l&&pt())}function Ue(l){const h=l.message_id;g.value=l,Wt({msgObj:{type:"reply",id:String(h)},addText:!1,addTop:!0}),m.value.isReply=!0,Zt()}function Et(){L.value=L.value.filter(l=>l.type!=="reply"),m.value.isReply=!1}function _t(){var h;if(!g.value)return;const l=((h=g.value)==null?void 0:h._rawSatori)??g.value;try{console.log(JSON.stringify(l,null,2))}catch{console.dir(l,{depth:null})}pt()}function mt(){Q.value=p.userList,m.value.showForwardPan=!1,z.value="single-message",pt()}function Ce(l,...h){const _=l;for(const U of h){const F=_[U],Z=typeof F=="string"||typeof F=="number"?String(F):"";if(Z&&Z!=="undefined")return Z}return""}function sn(l){if(l.group_id)return Ce(l,"group_name","name")||String(l.group_id);const h=Ce(l,"nickname","name","nick","username","remark")||String(l.user_id??""),_=String(l.user_id??"");return _?`${h}(${_})`:h}function Rt(l){const h=l.target.value;Q.value=p.userList.filter(_=>{const U=_.user_id?Ce(_,"nickname","name","nick","remark")||String(_.user_id):Ce(_,"group_name","name")||String(_.group_id||""),F=String(_.user_id??_.group_id??"");return U.toLowerCase().indexOf(h.toLowerCase())!==-1||F.length>0&&F===h})}function zt(l="single-message"){z.value=l,m.value.showForwardPan=!0,[...p.onMsgList].reverse().forEach(_=>{const U=Q.value.indexOf(_);U>-1&&(Q.value.splice(U,1),Q.value.unshift(_))}),pt()}function Hn(){if(g.value){const l=JSON.parse(JSON.stringify(g.value));Ut(t.chat.show.id,t.chat.show.type,l.message,!0)}pt()}function Me(){g.value&&$.value.push(g.value.message_id),pt()}function Ze(l){const h=Di(l);if(typeof structuredClone=="function")try{return structuredClone(h)}catch{return JSON.parse(JSON.stringify(h))}return JSON.parse(JSON.stringify(h))}function Ft(l){const h=z.value,_=g.value?Ze(g.value):null,U=l.group_id?l.group_id:l.user_id,F=String(U),Z=l.group_id?"group":"user",ee=String(l.channel_id??l.channelId??""),se=String(l.guild_id??l.guildId??""),ue=o.messageList.filter(ce=>$.value.includes(ce.message_id)),Ee=()=>String(t.chat.show.id)===F&&t.chat.show.type===Z;if(h!=="single-message"&&ue.length===0){mt();return}if(h==="individual-messages"){const ce={title:f("逐条转发"),html:f("将按顺序逐条转发 {count} 条消息,是否继续?",{count:ue.length}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:()=>{ue.forEach(Ke=>{Ut(F,Z,Ze(Ke.message),Ee(),"sendMsgBack",ee||void 0,se||void 0)}),$.value=[],e.popBoxList.shift(),xt(l,U)}}]};e.popBoxList.push(ce)}else if(h==="merged-messages"){const ce={app:"com.tencent.multimsg",meta:{detail:{source:f("合并转发消息"),news:[...ue.slice(0,3).map(Fe=>({text:(Fe.sender.card&&Fe.sender.card!=""?Fe.sender.card:Fe.sender.nickname)+": "+fn(Fe)}))],summary:f("查看 {count} 条转发消息",{count:ue.length}),resid:""}}},Ke={message:[{type:"json",data:JSON.stringify(ce),id:""}],sender:{user_id:r.loginInfo.uin,nickname:r.loginInfo.nickname,avatar:r.loginInfo.avatar}},ot={title:f("合并转发消息"),template:dn(mn),templateValue:dn({data:Ke,type:"forward"}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:async()=>{const Fe=ue.map(Qe=>{var It,Kt,ln;return{type:"node",id:Qe.message_id,user_id:String(((It=Qe.sender)==null?void 0:It.user_id)??""),nickname:String(((Kt=Qe.sender)==null?void 0:Kt.card)||((ln=Qe.sender)==null?void 0:ln.nickname)||""),time:Qe.time,content:Ze(Qe.message)}}),ft=await qo(String(r.loginInfo.platform??""),String(r.loginInfo.uin??""),Z,F,Fe,ee||void 0);if(!ft.ok)new ct().add(Te.ERR,f("合并转发发送失败"));else{const Qe=Date.now(),It={fake_msg:"pending",message_id:"forward-"+Qe,fake_message_id:"forward-"+Qe,message_type:Z,channel_type:Z==="group"?0:1,time:Math.floor(Qe/1e3),local_time:Qe,timestamp_ms:Qe,post_type:"message",sender:{user_id:String(r.loginInfo.uin??""),nickname:String(r.loginInfo.nickname??""),avatar:String(r.loginInfo.avatar??"")},message:[{type:"forward",id:"",content:Fe.map(Bt=>({message_id:String(Bt.id??""),time:Number(Bt.time??Math.floor(Qe/1e3)),sender:{user_id:String(Bt.user_id??""),nickname:String(Bt.nickname??"")},message:Bt.content??[]}))}],raw_message:`[${f("聊天记录")}]`};Ee()&&(o.messageList.push(It),ht(()=>{un("chat-"+It.message_id,!0)}));const Kt=ft.channelId||ee||F;ft.native&&!ft.messageId||await Wo({id:String(It.fake_message_id??""),platform:String(r.loginInfo.platform??""),selfId:String(r.loginInfo.uin??""),channelId:Kt,guildId:se||void 0,channelType:Z,messageId:ft.messageId,content:String(It.raw_message??""),message:It.message,forwardContent:Fe,source:"webui",sentAt:Qe,timestamp:Math.floor(Qe/1e3),timestampMs:Qe,kind:"forward"});const ln=ee||F,en=p.baseOnMsgList.get(Cn(ln));if(en){const Bt=`[${f("聊天记录")}]`;en.raw_msg_base=Bt,en.raw_msg=en.group_id?`${String(r.loginInfo.nickname??"")}: ${Bt}`:Bt,en.time=Math.floor(Qe/1e3),p.baseOnMsgList.set(Cn(ln),en),Ko()}}$.value=[],e.popBoxList.shift(),xt(l,U)}}]};e.popBoxList.push(ot)}else if(g.value&&_){const ce={title:f("转发消息"),template:dn(mn),templateValue:dn({data:_,type:"forward"}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:()=>{Ut(F,Z,Ze(_.message),Ee(),"sendMsgBack",ee||void 0,se||void 0),e.popBoxList.shift(),xt(l,U)}}]};e.popBoxList.push(ce)}}function xt(l,h){mt();const _=String(l.channel_id??l.channelId??h??"");p.baseOnMsgList.get(Cn(_))==null&&p.baseOnMsgList.set(Cn(_),l),ht(()=>{const U=document.getElementById("user-"+h);U&&U.click()})}function Yt(){const l=g.value;if(l!==null){l.raw_message||(l.raw_message=fn(l));const h=new ct;an.config.globalProperties.$copyText(l.raw_message).then(()=>{h.add(Te.INFO,f("复制成功"),!0)},()=>{h.add(Te.ERR,f("复制失败"),!0)})}pt()}function vn(){if(u.value!=""){const l=new ct;an.config.globalProperties.$copyText(u.value).then(()=>{l.add(Te.INFO,f("复制成功"),!0)},()=>{l.add(Te.ERR,f("复制失败"),!0)})}pt()}async function et(){const l=m.value.menuDisplay.downloadImg;if(!l)return;pt();const{blob:h,buffer:_}=await Qo(l),U=new ct;if(bt.type==="tauri")try{await(await Ui(()=>import("./index-Cg_esKB0.js"),__vite__mapDeps([0,1]),import.meta.url)).writeImage(_),U.add(Te.INFO,f("复制成功"))}catch(F){U.add(Te.ERR,f("复制失败")),new Ot().error(F,"复制图片失败")}else{const F=new ClipboardItem({[h.type]:h});try{await Go([F]),U.add(Te.INFO,f("复制成功"))}catch(Z){U.add(Te.ERR,f("复制失败")),new Ot().error(Z,"复制图片失败")}}}function Dt(){const l=m.value.menuDisplay.downloadImg;l!=!1&&Jo(l,`img_${new Date().getTime()}.png`,()=>{},()=>{}),pt()}async function Xt(){const l=g.value;if(pt(),!l){new ct().add(Te.ERR,f("获取选中消息失败"));return}const h=l.message_id,_=String(l.channel_id??l.channelId??o.chatInfo.show.channel_id??t.chat.show.id);try{await st.callApi("delete_msg",{channel_id:_,message_id:h})}catch{new ct().add(Te.ERR,f("撤回失败"));return}l.revoke=!0,l.revoked=!0,l.revokeTime=Date.now()/1e3}async function gt(){const l=g.value;if(pt(),!l){new ct().add(Te.ERR,f("获取选中消息失败"));return}const h=l.message_id,_=String(l.channel_id??l.channelId??o.chatInfo.show.channel_id??t.chat.show.id);await st.callApi("delete_msg",{channel_id:_,message_id:h}),Co(l)}function yn(){const l=g.value;if(l!==null){const h={title:f("提醒"),html:`<span>${f("真的要将 {user} 移出群聊吗",{user:l.sender.nickname})}</span>`,button:[{text:f("确定"),fun:()=>{l&&(st.send("set_group_kick",{group_id:o.chatInfo.show.id,user_id:l.sender.user_id},"setGroupKick"),pt(),e.popBoxList.shift())}},{text:f("取消"),master:!0,fun:()=>{e.popBoxList.shift()}}]};e.popBoxList.push(h)}}function pt(){m.value.showMsgMenu=!1,m.value.menuDisplay.menuSelectedMsgId=null,setTimeout(()=>{it()},300)}function Pn(){var l,h,_,U,F,Z,ee;if(m.value.openChatInfo=!m.value.openChatInfo,m.value.openChatInfo){if(t.chat.show.type==="group"&&((l=t.chat.info.group_info)==null?void 0:l.gc)!==t.chat.show.id){const ue=`https://qinfo.clt.qq.com/cgi-bin/qun_info/get_group_info_all?gc=${t.chat.show.id}&bkn=${r.loginInfo.bkn}`;st.send("http_proxy",{url:ue},"getMoreGroupInfo")}else if(t.chat.show.type==="user"&&((h=t.chat.info.user_info)==null?void 0:h.uin)!==t.chat.show.id){const ue=(U=(_=r.jsonMap)==null?void 0:_.friend_info)==null?void 0:U.name;ue!=null&&st.send(ue,{user_id:t.chat.show.id},"getMoreUserInfo")}const se=(Z=(F=r.jsonMap)==null?void 0:F.group_notices)==null?void 0:Z.name;if(t.chat.show.type==="group"&&(t.chat.info.group_notices===void 0||Object.keys(t.chat.info.group_notices??{}).length===0)&&se&&st.send(se,{group_id:t.chat.show.id},"getGroupNotices"),t.chat.show.type==="group"&&Object.keys(t.chat.info.group_files??{}).length===0){const ue=(ee=r.jsonMap.group_files)==null?void 0:ee.name;ue&&st.send(ue,{group_id:t.chat.show.id},"getGroupFiles")}}}function io(l,h,_){let U=-1;for(let F=0;F<_;F++)if(U=l.indexOf(h,U+1),U<0)return l;return U<0?l:l.slice(0,U)+l.slice(U+h.length)}function li(l){const h=L.value[l];if((h==null?void 0:h.type)==="image")return"[图片]";if((h==null?void 0:h.type)==="at"){const _=String(h.qq??h.id??""),U=o.chatInfo.info.group_members.find(Z=>String(Z.user_id)===_);return"[@"+String(h.text||(U==null?void 0:U.card)||(U==null?void 0:U.nickname)||_)+"]"}return"[SQ:"+l+"]"}function jn(l){var _;w.value.delete(l);const h=L.value[l];if((h==null?void 0:h.type)==="image"){let U=0;for(let F=0;F<=l;F++)((_=L.value[F])==null?void 0:_.type)==="image"&&U++;O.value=io(O.value,"[图片]",U)}else O.value=O.value.replace("[SQ:"+l+"]",""),O.value=O.value.replace("[SQ:"+l,"")}async function oo(l){const h=w.value.get(l);if(!h||!(D!=null&&D.value))return;const _=await D.value.edit(h);w.value.set(l,_)}function Wt(l){const h=document.getElementById("main-input")??document.getElementById("main-input-ex");if(l!==void 0){if(l.msgObj.type==="at"){const Z=String(l.msgObj.qq??l.msgObj.id??""),ee=o.chatInfo.info.group_members.find(se=>String(se.user_id)===Z);l.msgObj={...l.msgObj,qq:Z,text:String((ee==null?void 0:ee.card)||(ee==null?void 0:ee.nickname)||Z)}}const _=L.value.length;if(L.value.push(l.msgObj),!l.addText)return _;const U=li(_),F=l.msgObj.type==="at"?" ":"";if(l.addTop===!0)O.value=U+F+O.value;else{const Z=h==null?void 0:h.selectionStart,ee=(h==null?void 0:h.selectionEnd)??Z;if(Z!=null){const se=O.value.substring(0,Z),ue=O.value.substring(ee,O.value.length);O.value=se+U+F+ue,ht(()=>{const Ee=Z+U.length+F.length;h.selectionStart=Ee,h.selectionEnd=Ee})}else O.value+=U+F}return _}return-1}function ui(l){if(l.clipboardData&&l.clipboardData.items)for(let h=0,_=l.clipboardData.items.length;h<_;h++){const U=l.clipboardData.items[h];U.kind==="file"&&(Vn(U.getAsFile()),l.preventDefault())}}function ci(){const l=document.getElementById("choice-pic");l&&l.click()}function ao(l){m.value.showMoreDetail=!1;const h=l.target;h&&h.files&&Vn(h.files[0])}function fi(){const l=document.getElementById("choice-file");l&&l.click()}function so(){const l=document.getElementById("choice-video");l&&l.click()}function ro(l){m.value.showMoreDetail=!1;const h=l.target;if(h.files!=null){const _=h.files[0],U=_.name;if(_.size>500*1024*1024){const Z={title:f("提醒"),html:`<span>${f("文件大于 500MB。发送速度可能会非常缓慢;确认要发送吗?")}</span>`,button:[{text:f("发送"),fun:()=>{e.popBoxList.shift()}},{text:f("取消"),master:!0,fun:()=>{e.popBoxList.shift()}}]};e.popBoxList.push(Z)}else uo(_,U);h.value=""}}function lo(l){m.value.showMoreDetail=!1;const h=l.target;if(h.files!=null){const _=h.files[0],U=_.name;_.size>500*1024*1024?new ct().add(Te.ERR,f("视频文件不能超过 500MB")):co(_,U),h.value=""}}function di(l,h,_){const U=h??l.name??f("未知文件"),F=ea({fileName:U,fileSize:l.size,execute:Z=>{const ee=new FileReader;ee.onprogress=se=>{se.lengthComputable&&Z(se.loaded,se.total)},ee.readAsDataURL(l),ee.onloadend=()=>{let se=ee.result;se=se.substring(se.indexOf("base64,")+7,se.length),L.value=[],w.value.clear(),O.value="",Wt({addText:!0,msgObj:{type:_,file:"base64://"+se,name:U}}),rn("sendFileBack_"+F)},ee.onerror=()=>{ta(F,"文件读取失败")}}})}function uo(l,h){di(l,h,"file")}function co(l,h){di(l,h,"video")}async function fo(l){if(l.type==="image/gif"||/\.gif$/i.test(l.name||""))return!0;try{const h=await l.slice(0,6).arrayBuffer(),_=new Uint8Array(h);return _.length>=6&&_[0]===71&&_[1]===73&&_[2]===70&&_[3]===56&&(_[4]===55||_[4]===57)&&_[5]===97}catch{return!1}}async function Vn(l){const h=new ct;if(!l||!l.type.includes("image/")||l.size===0)return;const _=await fo(l);if(l.size>3145728&&!_){const ee={maxSizeMB:3,useWebWorker:!0};try{h.add(Te.INFO,f("正在压缩图片 ……"));const se=await vt(l,ee);new Ot().add(In.INFO,"图片压缩成功,原大小:"+l.size/1024/1024+" MB,压缩后大小:"+se.size/1024/1024+" MB"),Vn(se)}catch(se){new Ot().error(se,"图片压缩失败"),h.add(Te.INFO,f("压缩图片失败"))}return}const U=await hi(l),F=L.value.length,Z={type:"image",text:`[${f("图片")}]`};w.value.set(F,U),Wt({addText:!0,msgObj:Z})}async function hi(l){return new Promise((h,_)=>{const U=new FileReader;U.onload=function(F){F.target?h(F.target.result):_(new Error("读取文件失败"))},U.onerror=function(F){_(F)},U.readAsDataURL(l)})}function ho(l){return new Promise((h,_)=>{const U=new FileReader;U.onload=function(F){var se;const Z=String(((se=F.target)==null?void 0:se.result)??""),ee=Z.indexOf("base64,");h(ee>=0?Z.slice(ee+7):Z)},U.onerror=function(F){_(F)},U.readAsDataURL(l)})}function mo(){var l;if(T.value){(l=R.value)==null||l.stop(),M.value=!1;return}M.value=!M.value}async function go(){var l,h;if(M.value=!1,!T.value){if(!((l=navigator.mediaDevices)!=null&&l.getUserMedia)||typeof MediaRecorder>"u"){new ct().add(Te.ERR,f("当前浏览器不支持录音"));return}try{if((h=navigator.permissions)!=null&&h.query)try{if((await navigator.permissions.query({name:"microphone"})).state==="denied"){new ct().add(Te.ERR,f("麦克风权限被拒绝,请在浏览器设置中允许访问麦克风"));return}}catch{}const _=await navigator.mediaDevices.getUserMedia({audio:!0});S=[];const U=new MediaRecorder(_);R.value=U,T.value=!0,U.ondataavailable=F=>{F.data.size>0&&S.push(F.data)},U.onstop=async()=>{T.value=!1,R.value=null,_.getTracks().forEach(ue=>ue.stop());const F=new Blob(S,{type:U.mimeType||"audio/webm"}),Z=await ho(F),ee=U.mimeType.includes("mp4")?"voice.m4a":"voice.webm",se=U.mimeType.includes("mp4")?"audio/mp4":"audio/webm";S.length>0&&(C.value={type:"record",file:"base64://"+Z,url:`data:${se};base64,${Z}`,fileName:ee,name:f("语音")},O.value="",L.value=[],w.value.clear()),S=[]},U.start()}catch(_){T.value=!1,R.value=null,_ instanceof DOMException&&_.name==="NotAllowedError"&&new ct().add(Te.ERR,f("麦克风权限被拒绝,请在浏览器设置中允许访问麦克风")),new Ot().error(_,f("录音失败"))}}}function po(){C.value=null,M.value=!1,S=[],O.value="",Zt()}function vo(){M.value=!1;const l=document.getElementById("choice-audio");l==null||l.click()}async function yo(l){var F;const h=l.target,_=(F=h.files)==null?void 0:F[0];if(h.value="",!_)return;if(!_.type.startsWith("audio/")&&!/\.(mp3|wav|m4a|aac|ogg|webm|flac)$/i.test(_.name)){new ct().add(Te.ERR,f("请选择音频文件"));return}const U=await hi(_);C.value={type:"record",file:U,url:U,fileName:_.name,name:f("语音")},O.value="",L.value=[],w.value.clear(),S=[]}function Zt(){const l=document.getElementById("main-input")??document.getElementById("main-input-ex");l!==null&&l.focus()}function rn(l="sendMsgBack"){if(V.value[3].open)return;if(V.value.forEach(_=>{_.open=!1}),C.value){const _=C.value;C.value=null,M.value=!1,S=[],t.chat.show.temp?Ut(t.chat.show.id+"/"+t.chat.show.temp,t.chat.show.type,[_],!0,l):Ut(t.chat.show.id,t.chat.show.type,[_],!0,l),O.value="",L.value=[],w.value.clear();return}if(A.value){const _=ma(H.value,O.value);if(!_){new ct().add(Te.ERR,f("请输入元素类型和内容"));return}const U=_.toString();t.chat.show.temp?Ut(t.chat.show.id+"/"+t.chat.show.temp,t.chat.show.type,U,!0,l):Ut(t.chat.show.id,t.chat.show.type,U,!0,l),H.value="",O.value="",L.value=[],w.value.clear(),ae(),Et(),Re(void 0,!0),ht(()=>{var F;return(F=v.value)==null?void 0:F.focus()});return}for(const[_,U]of w.value)L.value[_]={type:"image",file:"base64://"+U.substring(U.indexOf("base64,")+7,U.length)};const h=Ii.parseMsg(O.value,L.value,[]);t.chat.show.temp?Ut(t.chat.show.id+"/"+t.chat.show.temp,t.chat.show.type,h,!0,l):Ut(t.chat.show.id,t.chat.show.type,h,!0,l),m.value.checkNewLineFlag=!0,O.value="",L.value=[],w.value.clear(),ae(),Et(),Re(void 0,!0)}function mi(l,h){var U,F;if(h==0&&l>0){const Z=((U=r.jsonMap.set_message_read)==null?void 0:U.name)??void 0;if(!Z)return;let ee=((F=r.jsonMap.set_message_read)==null?void 0:F.private_name)??Z;ee||(ee=Z),o.chatInfo.show.type=="group"?st.send(Z,{group_id:t.chat.show.id,message_id:t.list[t.list.length-1].message_id},"setMessageRead"):st.send(ee,{user_id:t.chat.show.id,message_id:t.list[t.list.length-1].message_id},"setMessageRead"),Oo()&&Zt()}m.value.showBottomButton&&!e.nowGetHistory&&h>0&&(N.value!==0?N.value=N.value+Math.abs(l-h):N.value=Math.abs(l-h));const _=document.getElementById("msgPan");if(_!==null){const Z=_.scrollHeight;ht(()=>{const ee=document.getElementById("msgPan");ee!==null&&(e.nowGetHistory&&ne(ee.scrollHeight-Z,!1),e.nowGetHistory||((be||h<=0)&&ne(ee.scrollHeight),h<=0&&(ne(ee.scrollHeight,!1),Ye()),qe()));const se=()=>{const ue=[];for(const Ee of t.list)if(Ee.message!==void 0)for(const ce of Ee.message)ce.type==="image"&&ce.file!="marketface"&&ue.push(ce.url||ce.file);return ue};P.value=Zn.fromList(se()),o.chatInfo.show&&o.chatInfo.show.jump&&(new Ot().debug("进入跳转至消息:"+o.chatInfo.show.jump),re("chat-"+o.chatInfo.show.jump),o.chatInfo.show.jump=void 0)})}}function wo(l,h){const _=h.message_id;$.value.length>0&&($.value.indexOf(_)>-1?$.value=$.value.filter(U=>U!=_):$.value.push(_))}function bo(){new ct().add(Te.INFO,f("欸嘿,这个按钮只是用来占位置的"))}function ko(){const l=t.list.filter(F=>$.value.indexOf(F.message_id)>-1);let h="",_="";l.forEach(F=>{const Z=new Date(Yo(F.time)),ee=Z.getFullYear()+"-"+(Z.getMonth()+1)+"-"+Z.getDate();ee!=_&&(h+=`
|
|
30
|
+
—— `+ee+` ——
|
|
31
|
+
`,_=ee),h+=F.sender.nickname+" "+Z.getHours()+":"+Z.getMinutes()+":"+Z.getSeconds()+`
|
|
32
|
+
`+fn(F)+`
|
|
33
|
+
|
|
34
|
+
`});const U=new ct;an.config.globalProperties.$copyText(h).then(()=>{U.add(Te.INFO,f("复制成功"),!0),$.value=[]},()=>{U.add(Te.ERR,f("复制失败"),!0)})}async function _o(){const l=t.list.filter(_=>$.value.includes(_.message_id)),h=[];for(const _ of l){const U=_.message_id,F=String(_.channel_id??_.channelId??o.chatInfo.show.channel_id??t.chat.show.id);h.push(st.callApi("delete_msg",{channel_id:F,message_id:U}))}$.value=[],await Promise.all(h)}async function wn(l){const h=l.target;Re(h);const _=Xo(O.value,b.value);let{end:U,str:F}={end:0,str:""};if(_.length>0&&({end:U,str:F}=_[0]),F.indexOf("]")>=0){const Z=b.value.substring(0,U),ee=Z.lastIndexOf("[图片]");if(ee>=0&&ee<U){let Ee=0,ce=-1;for(;(ce=Z.indexOf("[图片]",ce+1))>=0;)Ee++;const ot=L.value.map((Fe,ft)=>(Fe==null?void 0:Fe.type)==="image"?ft:-1).filter(Fe=>Fe>=0)[Ee-1];ot!==void 0&&w.value.has(ot)&&jn(ot)}const se=b.value.substring(0,U).lastIndexOf("[SQ:");if(se>=0&&se<U){const Ee=b.value.substring(se),Ke=b.value.slice(se,Ee.indexOf("]")+se+1).replace("[SQ:","").replace("]",""),ot=Number(Ke);!isNaN(ot)&&w.value.has(ot)&&jn(ot)}if(b.value.substring(0,U).match(/\[@[^\]]+\]$/)){const Ee=L.value.findIndex(ce=>(ce==null?void 0:ce.type)==="at");Ee>=0&&L.value.splice(Ee,1)}}if(V.value[3].open){W.value&&(clearTimeout(W.value),W.value=null);const Z=h.value;if(Z.length==0)X.value++,m.value.search.list=_n(t.list);else if(n.sysConfig.enable_local_history){const ee=++X.value;W.value=setTimeout(async()=>{const se=await Zo(r.loginInfo.uin,o.chatInfo.show.channel_id??o.chatInfo.show.id,Z);ee!==X.value||!V.value[3].open||(m.value.search.list=se)},180)}else X.value++,m.value.search.list=t.list.filter(ee=>fn(ee).indexOf(Z)!==-1)}}function Io(){V.value[3].open=!V.value[3].open,m.value.showMoreDetail=!m.value.showMoreDetail}function gi(){W.value&&(clearTimeout(W.value),W.value=null),X.value++,V.value[3].open=!V.value[3].open,O.value="",m.value.search.list=_n(t.list),Re()}function So(l){var h;if(r.jsonMap.poke){let _=(h=r.jsonMap.poke)==null?void 0:h.name;t.chat.show.type=="user"&&r.jsonMap.poke.private_name&&(_=r.jsonMap.poke.private_name),st.send(_,{user_id:l,group_id:t.chat.show.id},"sendPoke")}m.value.showMoreDetail=!1,m.value.menuDisplay.poke=!1}function Co(l){O.value="",L.value=[],w.value.clear(),Et();for(const h of l.message)if(h.type==="text")O.value+=h.text;else if(h.type==="reply"){const _=t.list.find(U=>U.message_id==h.id);if(!_)continue;Ue(_)}else h.type==="record"||h.type==="audio"?(C.value={...h,name:h.name||f("语音")},O.value="",L.value=[],w.value.clear()):(Wt({addText:!1,msgObj:h}),O.value+=li(L.value.length-1));Zt()}function Mo(l){var _,U;const h=l.target;if(h.scrollTop+h.clientHeight===h.scrollHeight&&!m.value.isJinLoading&&t.chat.info.jin_info.is_end==!1){m.value.isJinLoading=!0;const F=((U=(_=r.jsonMap)==null?void 0:_.group_essence)==null?void 0:U.name)??"get_essence_msg_list";st.send(F,{group_id:t.chat.show.id,pages:t.chat.info.jin_info.pages+1},"getJin")}}function Ao(l){D!=null&&D.value&&D.value.open(new Zn(l))}function xo(){C.value||(A.value=!A.value,V.value.forEach(l=>{l.open=!1}),m.value.showMoreDetail=!1,M.value=!1,m.value.onAtFind=!1,ht(()=>{const l=A.value?v.value:d.value;l==null||l.focus(),Re()}))}function pi(l="default"){let h=!1;if(V.value.forEach(_=>{_.open&&(h=!0),_.open=!1}),!h){if(m.value.showMoreDetail){m.value.showMoreDetail=!1;return}switch(l){case"default":m.value.showMoreDetail=!0;break;case"img":ci();break;case"file":fi();break;case"face":V.value[1].open=!V.value[1].open;break}}}function qn(){var h;const l=document.getElementById("chat-pan");if(l)return m.value.openChatInfo?l.getElementsByClassName("chat-info-pan")[0]:(h=x.value)!=null&&h.isMergeOpen()?l.getElementsByClassName("merge-pan")[0]:l}function bn(){var l,h;m.value.openChatInfo?Pn():(l=x.value)!=null&&l.isMergeOpen()?((h=x.value)==null||h.closeMergeMsg(),setTimeout(()=>{const U=document.getElementById("chat-pan").getElementsByClassName("merge-pan")[0];U&&(U.style.transform="")},500)):(o.chatInfo.show.id=0,e.openSideBar=!0,new Ot().add(In.UI,"右滑打开侧边栏触发完成"))}return(l,h)=>{var U;const _=Un("font-awesome-icon");return Ae((G(),te("div",{id:"chat-pan",class:dt("chat-pan"+(B(e).openSideBar?" open":"")+(["linux","win32"].includes(B(bt).platform??"")?" withBar":"")),style:xn({"background-image":B(Ho)(B(n).sysConfig.chat_more_blur?"":B(n).sysConfig.chat_background),"background-position":B(n).sysConfig.chat_background_align??"center","background-size":B(n).sysConfig.chat_background_fit??"cover"}),onVMoveRight:h[23]||(h[23]=Wn(F=>bn(),["prevent"]))},[Gt(l.$slots,"chat-extra",{},void 0,!0),k("div",mr,[oe(_,{class:"back",icon:["fas","angle-left"],onClick:bn}),k("img",{"data-avatar":"",src:t.chat.show.avatar||"/img/icons/icon.svg",onError:h[0]||(h[0]=(...F)=>B(Fn)&&B(Fn)(...F))},null,40,gr),k("div",pr,[k("p",null,[Sn(Y(t.chat.show.name)+" ",1),t.chat.show.type=="group"?(G(),te(ke,{key:0},[Sn(" ("+Y(t.chat.info.group_members.length)+") ",1)],64)):ge("",!0)]),t.chat.show.temp?(G(),te("span",vr,Y(B(f)("来自群聊:{group}",{group:t.chat.show.temp})),1)):(G(),te("span",yr,[t.chat.show.appendInfo?(G(),te(ke,{key:0},[Sn(Y(t.chat.show.appendInfo),1)],64)):(G(),te(ke,{key:1},[Sn(Y(t.list[t.list.length-1]?B(f)("上次消息 - {time}",{time:Intl.DateTimeFormat(B(ie),{hour:"numeric",minute:"numeric",second:"numeric"}).format(new Date(t.list[t.list.length-1].time*1e3))}):B(f)("暂无消息")),1)],64))]))]),h[24]||(h[24]=k("div",{class:"space"},null,-1)),k("div",wr,[oe(_,{icon:["fas","ellipsis-vertical"],onClick:Pn})])]),k("div",{class:dt("loading"+(B(e).nowGetHistory&&B(e).canLoadHistory?" show":""))},[oe(_,{icon:["fas","spinner"]}),k("span",null,Y(B(f)("加载中")),1)],2),k("div",{id:"msgPan",ref_key:"msgPan",ref:i,class:"chat",style:{"scroll-behavior":"smooth"},onScroll:h[1]||(h[1]=F=>kt(F,V.value[3].open))},[V.value[3].open?(G(),$e(Xn,{key:1,name:B(n).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:St(()=>[(G(!0),te(ke,null,yt(m.value.search.list,(F,Z)=>(G(),te(ke,null,[B(Yn)(t.list[Number(Z)-1]?t.list[Number(Z)-1].time:void 0,F.time)?(G(),$e(Qt,{key:"notice-time-"+Z,data:{sub_type:"time",time:F.time}},null,8,["data"])):ge("",!0),(F.post_type==="message"||F.post_type==="message_sent")&&F.message.length>0?(G(),$e(mn,{key:F.fake_message_id??F.message_id,selected:$.value.includes(F.message_id)||m.value.menuDisplay.menuSelectedMsgId==F.message_id,selecting:$.value.length>0,data:F,onScrollToMsg:B(un),onShowMenu:nt,onImageLoaded:le,onLeftMove:Ue,onContentRendered:Ye},null,8,["selected","selecting","data","onScrollToMsg"])):ge("",!0)],64))),256))]),_:1},8,["name"])):(G(),te(ke,{key:0},[B(e).canLoadHistory?ge("",!0):(G(),te("div",br,[h[25]||(h[25]=k("hr",null,null,-1)),k("a",null,Y(B(f)("没有更多消息了")),1)])),B(e).loadHistoryFail?(G(),te("div",kr,[h[26]||(h[26]=k("hr",null,null,-1)),k("a",null,Y(B(f)("获取历史记录失败")),1)])):ge("",!0),B(e).nowGetHistory&&t.list.length>0?(G(),$e(Qt,{key:2,data:{sub_type:"time",time:t.list[0].time}},null,8,["data"])):ge("",!0),oe(Xn,{name:B(n).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:St(()=>[(G(!0),te(ke,null,yt(t.list,(F,Z)=>(G(),te(ke,null,[B(Yn)(t.list[Number(Z)-1]?t.list[Number(Z)-1].time:void 0,F.time)?(G(),$e(Qt,{key:"notice-time-"+(F.time/240).toFixed(0),data:{sub_type:"time",time:F.time}},null,8,["data"])):ge("",!0),B(Hi)(F)?(G(),$e(Qt,{key:"delete-"+F.message_id,data:{sub_type:"delete"}})):(F.post_type==="message"||F.post_type==="message_sent")&&F.message.length>0?(G(),$e(mn,{key:F.fake_message_id??F.message_id,selected:$.value.includes(F.message_id)||m.value.menuDisplay.menuSelectedMsgId==F.message_id,selecting:$.value.length>0,data:F,"image-list-header":P.value,onClick:ee=>wo(ee,F),onShowMenu:nt,onScrollToMsg:B(un),onImageLoaded:le,onLeftMove:Ue,onSendPoke:So,onContentRendered:Ye},null,8,["selected","selecting","data","image-list-header","onClick","onScrollToMsg"])):F.post_type==="notice"?(G(),$e(Qt,{id:B(zi)(),key:"notice-"+Z,data:F},null,8,["id","data"])):ge("",!0)],64))),256))]),_:1},8,["name"])],64)),k("span",{ref_key:"chatPadding",ref:s,class:"chat-padding"}," ",512)],544),k("div",{class:"new-msg",style:xn({opacity:m.value.showBottomButton?1:0}),onClick:h[2]||(h[2]=F=>ae(!0))},[k("div",_r,[oe(_,{icon:["fas","angle-down"]}),N.value>0?(G(),te("span",Ir,Y(N.value),1)):ge("",!0)])],4),k("div",{id:"send-more",ref_key:"sendMore",ref:a,class:"more"},[k("div",null,[k("div",null,[oe(cn,{name:"pan"},{default:St(()=>[Ae(oe(tr,{onAddSpecialMsg:Wt,onSendMsg:rn},null,512),[[at,V.value[1].open]])]),_:1}),oe(cn,{name:"pan"},{default:St(()=>[Ae(k("div",Sr,[k("div",null,[oe(_,{icon:["fas","message"]}),k("span",null,Y(B(f)("精华消息")),1),oe(_,{icon:["fas","xmark"],onClick:h[3]||(h[3]=F=>V.value[2].open=!V.value[2].open)})]),k("div",{class:"jin-pan-body",onScroll:Mo},[(G(!0),te(ke,null,yt(t.chat.info.jin_info.list,(F,Z)=>(G(),te("div",{key:"jin-"+Z},[k("div",null,[k("img",{"data-avatar":"",src:F.sender_avatar||"/img/icons/icon.svg"},null,8,Cr),k("div",null,[k("a",null,Y(F.sender_nick),1),k("span",null,Y(F.sender_time?Intl.DateTimeFormat(B(ie),{hour:"numeric",minute:"numeric"}).format(new Date(F.sender_time*1e3)):"")+" "+Y(B(f)("发送")),1)]),k("span",null,Y(B(f)("{time},由 {name} 设置",{time:F.sender_time?Intl.DateTimeFormat(B(ie),{hour:"numeric",minute:"numeric"}).format(new Date(F.sender_time*1e3)):"",name:F.add_digest_nick})),1)]),k("div",Mr,[(G(!0),te(ke,null,yt(F.msg_content,(ee,se)=>(G(),te(ke,{key:"jinc-"+Z+"-"+se},[ee.type==="text"?(G(),te("span",Ar,Y(ee.data.text),1)):ge("",!0),ee.type==="face"?(G(),$e(ei,{key:1,emoji:B(hn).get(Number(ee.data.id))},null,8,["emoji"])):ge("",!0),ee.type==="image"?(G(),te("img",{key:2,src:ee.data.url,onClick:ue=>Ao(ee.data.url)},null,8,xr)):ge("",!0)],64))),128))])]))),128)),Ae(k("div",Er,[oe(_,{icon:["fas","spinner"]})],512),[[at,m.value.isJinLoading]])],32)],512),[[at,V.value[2].open&&t.chat.info.jin_info.list.length>0]])]),_:1})]),k("div",{class:dt($.value.length>0?"select-tag show":"select-tag")},[k("div",null,[oe(_,{icon:["fas","share-from-square"],onClick:h[4]||(h[4]=F=>zt("individual-messages"))}),k("span",null,Y(B(f)("逐条转发")),1)]),k("div",null,[oe(_,{icon:["fas","share"],onClick:h[5]||(h[5]=F=>zt("merged-messages"))}),k("span",null,Y(B(f)("合并转发")),1)]),k("div",null,[oe(_,{icon:["fas","scissors"]}),k("span",null,Y(B(f)("截图")),1)]),k("div",null,[oe(_,{icon:["fas","trash-can"],onClick:bo}),k("span",null,Y(B(f)("删除")),1)]),k("div",null,[oe(_,{icon:["fas","copy"],onClick:ko}),k("span",null,Y(B(f)("复制")),1)]),k("div",null,[oe(_,{icon:["fas","xmark"],onClick:_o}),k("span",null,Y(B(f)("撤回")),1)]),k("div",null,[k("span",{onClick:h[6]||(h[6]=F=>$.value=[])},Y($.value.length),1),k("span",null,Y(B(f)("取消")),1)])],2),oe(cn,{name:"img-pan"},{default:St(()=>[Ae(k("div",{class:dt({"img-pan":!0,"ss-card":!0}),onWheel:h[7]||(h[7]=F=>F.currentTarget.scrollLeft+=F.deltaY)},[k("div",Fr,[(G(!0),te(ke,null,yt(w.value,([F,Z])=>(G(),te("div",{key:"imgCache-"+F},[k("div",$r,[k("div",{onClick:ee=>oo(F)},[oe(_,{icon:["fas","pencil"]})],8,Tr),h[27]||(h[27]=k("hr",null,null,-1)),k("div",{onClick:ee=>jn(F)},[oe(_,{style:{color:"var(--color-red)"},icon:["fas","xmark"]})],8,Lr)]),k("div",Rr,[k("img",{src:Z,alt:"[图片]"},null,8,Dr)]),k("span",null,"#"+Y(F),1)]))),128))])],544),[[at,w.value.size>0]])]),_:1}),k("div",{class:dt(V.value[3].open?"search-tag show":"search-tag")},[oe(_,{icon:["fas","search"]}),k("span",null,Y(B(n).sysConfig.enable_local_history?B(f)("搜索已保存的消息"):B(f)("搜索已加载的消息")),1),k("div",{onClick:gi},[oe(_,{icon:["fas","xmark"]})])],2),k("div",{class:dt(m.value.isReply?"replay-tag show":"replay-tag")},[oe(_,{icon:["fas","reply"]}),k("span",null,Y(g.value===null?"":g.value.sender.nickname+": "+B(fn)(g.value)),1),k("div",{onClick:Et},[oe(_,{icon:["fas","xmark"]})])],2),k("div",{class:dt(I.value!=null?"at-tag show":"at-tag"),contenteditable:"true",onBlur:h[8]||(h[8]=F=>Ie(void 0))},[(G(!0),te(ke,null,yt(I.value!=null?I.value:[],(F,Z)=>(G(),te("div",{key:"atFind-"+F.user_id,class:dt({selected:Z===y.value}),onClick:ee=>Ie(F.user_id)},[h[28]||(h[28]=k("img",{src:"/img/icons/icon.svg"},null,-1)),k("span",null,Y(F.card!=""&&F.card!=null?F.card:F.nickname),1),k("a",null,Y(F.user_id),1)],10,Br))),128)),((U=I.value)==null?void 0:U.length)==0?(G(),te("div",Or,[k("span",null,Y(B(f)("没有找到匹配的群成员")),1)])):ge("",!0)],34),k("div",{class:dt((m.value.showMoreDetail?"more-detail show":"more-detail")+(M.value?" voice-menu-open":"")),onClick:h[10]||(h[10]=F=>M.value=!1)},[k("div",{title:B(f)("图片"),onClick:ci},[oe(_,{icon:["fas","image"]}),k("input",{id:"choice-pic",type:"file",accept:"image/*",style:{display:"none"},onChange:ao},null,32),k("label",Nr,Y(B(f)("选择图片")),1)],8,Ur),k("div",{title:B(f)("文件"),onClick:fi},[oe(_,{icon:["fas","folder"]}),k("input",{id:"choice-file",type:"file",style:{display:"none"},onChange:ro},null,32),k("label",Hr,Y(B(f)("选择文件")),1)],8,zr),k("div",{title:B(f)("视频"),onClick:so},[oe(_,{icon:["fas","video"]}),k("input",{id:"choice-video",type:"file",accept:"video/*",style:{display:"none"},onChange:lo},null,32),k("label",jr,Y(B(f)("选择视频")),1)],8,Pr),k("div",Vr,[k("div",{title:T.value?B(f)("停止录音"):B(f)("发送语音"),class:dt({active:T.value}),onClick:Wn(mo,["stop"])},[oe(_,{icon:["fas",T.value?"stop":"microphone"]},null,8,["icon"])],10,qr),M.value?(G(),te("div",{key:0,class:"voice-menu",onClick:h[9]||(h[9]=Wn(()=>{},["stop"]))},[k("div",{onClick:go},Y(B(f)("浏览器录音")),1),k("div",{onClick:vo},Y(B(f)("音频文件")),1)])):ge("",!0),k("input",{id:"choice-audio",type:"file",accept:"audio/*",style:{display:"none"},onChange:yo},null,32)]),h[29]||(h[29]=k("div",{class:"space"},null,-1)),k("div",{title:B(f)("搜索消息"),onClick:Io},[oe(_,{icon:["fas","search"]})],8,Wr)],2)]),k("div",null,[k("div",Kr,[Ae((G(),te("div",{class:"send-tool-button",onClick:h[11]||(h[11]=F=>pi(B(n).sysConfig.quick_send))},[m.value.showMoreDetail||V.value.find(F=>F.open)?(G(),$e(_,{key:0,icon:["fas","minus"]})):B(n).sysConfig.quick_send=="default"?(G(),$e(_,{key:1,icon:["fas","plus"]})):B(n).sysConfig.quick_send=="img"?(G(),$e(_,{key:2,icon:["fas","image"]})):B(n).sysConfig.quick_send=="file"?(G(),$e(_,{key:3,icon:["fas","folder"]})):ge("",!0)])),[[B(No),F=>pi(),void 0,{prevent:!0}]]),k("div",{class:dt(["send-tool-button custom-element-toggle",{active:A.value}]),title:B(f)("自定义元素"),"aria-pressed":A.value,role:"button",onClick:xo},[oe(_,{icon:["fas","code"]})],10,Qr)]),k("div",null,[k("form",{class:dt({"custom-element-form":A.value}),onSubmit:We},[C.value?(G(),te("div",{key:0,id:"voice-pending-input",class:"voice-pending",role:"button",onClick:po},[k("span",null,"["+Y(B(f)("语音"))+"]",1),oe(_,{icon:["fas","xmark"]})])):A.value?(G(),te(ke,{key:1},[k("label",Gr,Y(B(f)("元素类型")),1),Ae(k("input",{id:"custom-element-type",ref_key:"customElementTypeInput",ref:v,"onUpdate:modelValue":h[12]||(h[12]=F=>H.value=F),class:"custom-element-type-input",type:"text",autocomplete:"off",placeholder:"text / img / file",disabled:B(e).openSideBar||t.chat.info.me_info.shut_up_timestamp>0},null,8,Jr),[[jt,H.value]]),B(n).sysConfig.send_key==="none"?(G(),te(ke,{key:0},[k("label",Yr,Y(B(f)("消息输入框")),1),Ae(k("input",{id:"main-input",ref_key:"mainInput",ref:d,"onUpdate:modelValue":h[13]||(h[13]=F=>O.value=F),class:"custom-element-content-input",type:"text",autocomplete:"off",placeholder:"URL / content",disabled:B(e).openSideBar||t.chat.info.me_info.shut_up_timestamp>0,onKeydown:xe,onKeyup:Xe,onClick:wt,onInput:wn},null,40,Xr),[[jt,O.value]])],64)):(G(),te(ke,{key:1},[k("label",Zr,Y(B(f)("消息输入框")),1),Ae(k("textarea",{id:"main-input-ex",ref_key:"mainInput",ref:d,"onUpdate:modelValue":h[14]||(h[14]=F=>O.value=F),class:"custom-element-content-input",type:"text",placeholder:"URL / content",disabled:B(e).openSideBar,onKeydown:de,onKeyup:Xe,onClick:wt,onInput:wn,onCompositionstart:rt,onCompositionend:ze},null,40,el),[[jt,O.value]])],64))],64)):(G(),te(ke,{key:2},[B(n).sysConfig.send_key==="none"?(G(),te(ke,{key:0},[k("label",tl,Y(B(f)("消息输入框")),1),Ae(k("input",{id:"main-input",ref_key:"mainInput",ref:d,"onUpdate:modelValue":h[15]||(h[15]=F=>O.value=F),type:"text",autocomplete:"off",disabled:B(e).openSideBar||t.chat.info.me_info.shut_up_timestamp>0,placeholder:t.chat.info.me_info.shut_up_timestamp>0?B(f)("已被禁言至:{time}",{time:Intl.DateTimeFormat(B(ie),B(Oi)(new Date(t.chat.info.me_info.shut_up_timestamp*1e3))).format(new Date(t.chat.info.me_info.shut_up_timestamp*1e3))}):"",onPaste:ui,onKeydown:xe,onKeyup:Xe,onClick:wt,onInput:wn},null,40,nl),[[jt,O.value]])],64)):(G(),te(ke,{key:1},[k("label",il,Y(B(f)("消息输入框")),1),Ae(k("textarea",{id:"main-input-ex",ref_key:"mainInput",ref:d,"onUpdate:modelValue":h[16]||(h[16]=F=>O.value=F),type:"text",disabled:B(e).openSideBar,onPaste:ui,onKeydown:de,onKeyup:Xe,onClick:wt,onInput:wn,onCompositionstart:rt,onCompositionend:ze},null,40,ol),[[jt,O.value]])],64))],64))],34),Gt(l.$slots,"main-input-button",{},void 0,!0),k("div",{onClick:h[17]||(h[17]=F=>rn("sendMsgBack"))},[V.value[3].open?(G(),$e(_,{key:0,icon:["fas","search"]})):(G(),$e(_,{key:1,icon:["fas","angle-right"]}))])])]),h[30]||(h[30]=k("div",null,null,-1))],512),oe(ar,{ref_key:"mergePan",ref:x},null,512),(G(),$e(zo,{to:"body"},[k("div",{class:dt("msg-menu"+(["linux","win32"].includes(B(bt).platform??"")?" withBar":""))},[Ae(k("div",{class:"msg-menu-bg",onClick:pt},null,512),[[at,m.value.showMsgMenu]]),k("div",{id:"msgMenu",class:dt(m.value.showMsgMenu?"ss-card msg-menu-body show":"ss-card msg-menu-body")},[Ae(k("div",{onClick:h[18]||(h[18]=F=>Hn())},[k("div",null,[oe(_,{icon:["fas","plus"]})]),k("a",null,Y(B(f)("+ 1")),1)],512),[[at,m.value.menuDisplay.add]]),Ae(k("div",{onClick:h[19]||(h[19]=F=>ut(!0))},[k("div",null,[oe(_,{icon:["fas","message"]})]),k("a",null,Y(B(f)("回复")),1)],512),[[at,m.value.menuDisplay.relpy]]),Ae(k("div",{onClick:h[20]||(h[20]=F=>zt())},[k("div",null,[oe(_,{icon:["fas","share"]})]),k("a",null,Y(B(f)("转发")),1)],512),[[at,m.value.menuDisplay.forward]]),Ae(k("div",{onClick:h[21]||(h[21]=F=>Me())},[k("div",null,[oe(_,{icon:["fas","circle-check"]})]),k("a",null,Y(B(f)("多选")),1)],512),[[at,m.value.menuDisplay.select]]),Ae(k("div",{onClick:Yt},[k("div",null,[oe(_,{icon:["fas","clipboard"]})]),k("a",null,Y(B(f)("复制")),1)],512),[[at,m.value.menuDisplay.copy]]),Ae(k("div",{onClick:vn},[k("div",null,[oe(_,{icon:["fas","code"]})]),k("a",null,Y(B(f)("复制选中文本")),1)],512),[[at,m.value.menuDisplay.copySelect]]),Ae(k("div",{onClick:et},[k("div",null,[oe(_,{icon:["fas","object-ungroup"]})]),k("a",null,Y(B(f)("复制图片")),1)],512),[[at,m.value.menuDisplay.copyImg]]),Ae(k("div",{onClick:Dt},[k("div",null,[oe(_,{icon:["fas","floppy-disk"]})]),k("a",null,Y(B(f)("下载图片")),1)],512),[[at,m.value.menuDisplay.downloadImg!=!1]]),Ae(k("div",{onClick:Xt},[k("div",null,[oe(_,{icon:["fas","xmark"]})]),k("a",null,Y(B(f)("撤回")),1)],512),[[at,m.value.menuDisplay.revoke]]),Ae(k("div",{onClick:gt},[k("div",null,[oe(_,{icon:["fas","pencil"]})]),k("a",null,Y(B(f)("重新编辑")),1)],512),[[at,m.value.menuDisplay.reedit]]),Ae(k("div",{onClick:h[22]||(h[22]=F=>{g.value&&Wt({msgObj:{type:"at",qq:Number(g.value.sender.user_id)},addText:!0}),Zt(),pt()})},[k("div",null,[oe(_,{icon:["fas","at"]})]),k("a",null,Y(B(f)("提及")),1)],512),[[at,m.value.menuDisplay.at]]),Ae(k("div",{onClick:yn},[k("div",null,[oe(_,{icon:["fas","trash-can"]})]),k("a",null,Y(B(f)("移出群聊")),1)],512),[[at,m.value.menuDisplay.remove]]),Ae(k("div",{onClick:Lt},[k("div",null,[oe(_,{icon:["fas","arrow-up-right-from-square"]})]),k("a",null,Y(B(f)("跳转到消息")),1)],512),[[at,m.value.menuDisplay.jumpToMsg]]),k("div",{onClick:_t},[k("div",null,[oe(_,{icon:["fas","screwdriver-wrench"]})]),k("a",null,Y(B(f)("调试信息")),1)])],2)],2)])),oe(cn,{name:"chat-info-float",duration:{enter:300,leave:200}},{default:St(()=>[oe(ws,{ref:"infoRef",chat:t.chat,tags:m.value,onClose:Pn},null,8,["chat","tags"])]),_:1}),oe(cn,null,{default:St(()=>[m.value.showForwardPan?(G(),te("div",al,[k("div",sl,[k("header",null,[k("span",null,Y(B(f)("转发消息")),1),oe(_,{icon:["fas","xmark"],onClick:mt})]),k("label",rl,Y(B(f)("搜索转发对象")),1),k("input",{id:"chat-forward-search",placeholder:B(f)("搜索 ……"),onInput:Rt},null,40,ll),k("div",null,[(G(!0),te(ke,null,yt(Q.value,F=>(G(),te("div",{key:"forwardList-"+(F.user_id??F.group_id),onClick:Z=>Ft(F)},[k("img",{loading:"lazy",title:sn(F),src:F.avatar||"/img/icons/icon.svg"},null,8,cl),k("div",null,[k("p",null,Y(sn(F)),1),k("span",null,Y(F.group_id?B(f)("群组"):B(f)("好友")),1)])],8,ul))),128))])]),k("div",{class:"bg",onClick:mt})])):ge("",!0)]),_:1}),k("div",{class:"bg",style:xn({"backdrop-filter":`blur(${B(n).sysConfig.chat_more_blur?0:B(n).sysConfig.chat_background_blur}px)`})},null,4)],38)),[[B(Uo),Le]])}}}),pl=Nn(hl,[["__scopeId","data-v-7c0eef9c"]]);export{pl as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vue-recycle-scroller__resize-observer[data-v-08cc04ab]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;pointer-events:none;z-index:-1}.vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.grid-mode:not(.page-mode){overflow:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{position:absolute;top:0;left:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.search-view[data-v-317c0ff8]{background:transparent!important;padding:0 20px;margin-bottom:10px}.search-view>input[data-v-317c0ff8]{background:var(--color-card-1);border-radius:7px;padding:0 10px;height:35px;width:100%;border:0}div[name=成员][data-v-317c0ff8]{overflow:hidden}.member-scroller[data-v-317c0ff8]{flex:1;height:calc(100vh - 330px);min-height:210px}.member-item[data-v-317c0ff8]{transition:background .3s;margin:0 20px -10px;align-items:center;border-radius:7px;cursor:pointer;display:flex;padding:10px}.member-item[data-v-317c0ff8]:hover{background:var(--color-card-1)}.member-item>img[data-v-317c0ff8]{border-radius:100%;margin-right:10px;height:30px;width:30px}.member-item>div[data-v-317c0ff8]{overflow:hidden;align-items:center;display:flex;flex:1}.member-item>div>a[data-v-317c0ff8]{color:var(--color-font);white-space:nowrap;text-overflow:ellipsis;max-width:80%;overflow:hidden;cursor:pointer}.member-item>div>svg[data-v-317c0ff8]{color:var(--color-main);margin-left:5px;height:.8rem}.member-item>span[data-v-317c0ff8]{color:var(--color-font-2);transition:all .2s;opacity:1}.member-item.edit:hover>span[data-v-317c0ff8]{transform:translate(-10px);opacity:0}.member-item>svg[data-v-317c0ff8]{color:var(--color-font-2);transition:all .2s;margin-right:-25px;margin-left:10px;width:15px;opacity:0}.member-item>svg[data-v-317c0ff8]:hover{color:var(--color-main)}.member-item.edit:hover>svg[data-v-317c0ff8]{margin-right:5px;display:block;opacity:1}.info-copy[data-v-317c0ff8]{display:flex;align-items:center;gap:8px}.info-copy>span[data-v-317c0ff8]{flex:1;min-width:0}.info-copy>svg[data-v-317c0ff8]{color:var(--color-font-2);cursor:pointer}.info-copy>svg[data-v-317c0ff8]:hover{color:var(--color-main)}.tab-body{overflow:hidden!important;flex-direction:column;display:flex}.tab-body>div{overflow:scroll;flex:1}.tooltip-enter-active[data-v-28512f0d],.tooltip-leave-active[data-v-28512f0d]{transition:opacity .2s,transform .2s;transform-origin:bottom}.tooltip-enter-from[data-v-28512f0d],.tooltip-leave-to[data-v-28512f0d]{opacity:0;transform:translate(-50%,calc(-100% - .8rem)) scale(.5) scaleY(0)}.tooltip-enter-to[data-v-28512f0d],.tooltip-leave-from[data-v-28512f0d]{opacity:1;transform:translate(-50%,calc(-100% - .8rem)) scale(.5) scaleY(1)}.msglist-move[data-v-5a030688]{transition:all .3s}.msglist-enter-active[data-v-5a030688]{transition:all .4s}.msglist-leave-active[data-v-5a030688]{transition:all .2s}.msglist-enter-from[data-v-5a030688]{transform:translate(-50px);opacity:0}.msglist-leave-to[data-v-5a030688]{opacity:0}.msglist-move[data-v-
|
|
1
|
+
.vue-recycle-scroller__resize-observer[data-v-08cc04ab]{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;pointer-events:none;z-index:-1}.vue-recycle-scroller{position:relative}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.grid-mode:not(.page-mode){overflow:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;position:relative}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{position:absolute;top:0;left:0;will-change:transform}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.search-view[data-v-317c0ff8]{background:transparent!important;padding:0 20px;margin-bottom:10px}.search-view>input[data-v-317c0ff8]{background:var(--color-card-1);border-radius:7px;padding:0 10px;height:35px;width:100%;border:0}div[name=成员][data-v-317c0ff8]{overflow:hidden}.member-scroller[data-v-317c0ff8]{flex:1;height:calc(100vh - 330px);min-height:210px}.member-item[data-v-317c0ff8]{transition:background .3s;margin:0 20px -10px;align-items:center;border-radius:7px;cursor:pointer;display:flex;padding:10px}.member-item[data-v-317c0ff8]:hover{background:var(--color-card-1)}.member-item>img[data-v-317c0ff8]{border-radius:100%;margin-right:10px;height:30px;width:30px}.member-item>div[data-v-317c0ff8]{overflow:hidden;align-items:center;display:flex;flex:1}.member-item>div>a[data-v-317c0ff8]{color:var(--color-font);white-space:nowrap;text-overflow:ellipsis;max-width:80%;overflow:hidden;cursor:pointer}.member-item>div>svg[data-v-317c0ff8]{color:var(--color-main);margin-left:5px;height:.8rem}.member-item>span[data-v-317c0ff8]{color:var(--color-font-2);transition:all .2s;opacity:1}.member-item.edit:hover>span[data-v-317c0ff8]{transform:translate(-10px);opacity:0}.member-item>svg[data-v-317c0ff8]{color:var(--color-font-2);transition:all .2s;margin-right:-25px;margin-left:10px;width:15px;opacity:0}.member-item>svg[data-v-317c0ff8]:hover{color:var(--color-main)}.member-item.edit:hover>svg[data-v-317c0ff8]{margin-right:5px;display:block;opacity:1}.info-copy[data-v-317c0ff8]{display:flex;align-items:center;gap:8px}.info-copy>span[data-v-317c0ff8]{flex:1;min-width:0}.info-copy>svg[data-v-317c0ff8]{color:var(--color-font-2);cursor:pointer}.info-copy>svg[data-v-317c0ff8]:hover{color:var(--color-main)}.tab-body{overflow:hidden!important;flex-direction:column;display:flex}.tab-body>div{overflow:scroll;flex:1}.tooltip-enter-active[data-v-28512f0d],.tooltip-leave-active[data-v-28512f0d]{transition:opacity .2s,transform .2s;transform-origin:bottom}.tooltip-enter-from[data-v-28512f0d],.tooltip-leave-to[data-v-28512f0d]{opacity:0;transform:translate(-50%,calc(-100% - .8rem)) scale(.5) scaleY(0)}.tooltip-enter-to[data-v-28512f0d],.tooltip-leave-from[data-v-28512f0d]{opacity:1;transform:translate(-50%,calc(-100% - .8rem)) scale(.5) scaleY(1)}.msglist-move[data-v-5a030688]{transition:all .3s}.msglist-enter-active[data-v-5a030688]{transition:all .4s}.msglist-leave-active[data-v-5a030688]{transition:all .2s}.msglist-enter-from[data-v-5a030688]{transform:translate(-50px);opacity:0}.msglist-leave-to[data-v-5a030688]{opacity:0}.msglist-move[data-v-7c0eef9c]{transition:all .3s}.msglist-enter-active[data-v-7c0eef9c]{transition:all .4s}.msglist-leave-active[data-v-7c0eef9c]{transition:all .2s}.msglist-enter-from[data-v-7c0eef9c]{transform:translate(-20px);opacity:0}.msglist-leave-to[data-v-7c0eef9c]{opacity:0}.pan-enter-active[data-v-7c0eef9c],.pan-leave-active[data-v-7c0eef9c]{transition:opacity .3s}.pan-enter-from[data-v-7c0eef9c]{transform:translate(20px);opacity:0}.pan-leave-to[data-v-7c0eef9c]{opacity:0}.more-detail[data-v-7c0eef9c]{position:relative}.more-detail.voice-menu-open[data-v-7c0eef9c]{overflow:visible}.send-tool-button.custom-element-toggle.active[data-v-7c0eef9c]{background:var(--color-main)}.send-tool-button.custom-element-toggle.active>svg[data-v-7c0eef9c]{color:#fff}.voice-menu-wrap[data-v-7c0eef9c]{position:relative;width:50px;height:50px;margin:0 10px;cursor:pointer;border-radius:7px;background:var(--color-card-1)}.voice-menu-wrap>div[data-v-7c0eef9c]:first-child{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.voice-menu-wrap>div:first-child>svg[data-v-7c0eef9c]{color:var(--color-font-1);margin:15px;height:20px;width:20px}.voice-menu-wrap>div:first-child.active[data-v-7c0eef9c]{background:#f443361f}.voice-menu-wrap>div:first-child.active>svg[data-v-7c0eef9c]{color:#f44336}.voice-menu[data-v-7c0eef9c]{position:absolute;right:0;bottom:56px;z-index:20;min-width:120px;overflow:hidden;border-radius:8px;box-shadow:0 8px 24px #0000002e;background:var(--color-card, #fff)}.voice-menu>div[data-v-7c0eef9c]{padding:8px 14px;cursor:pointer;white-space:nowrap}.voice-menu>div[data-v-7c0eef9c]:hover{background:var(--color-hover-bg, rgba(0, 0, 0, .06))}.voice-pending[data-v-7c0eef9c]{display:flex;align-items:center;justify-content:space-between;height:36px;padding:0 12px;cursor:pointer;border-radius:6px;color:var(--color-main, #3b82f6);background:var(--color-active-bg, rgba(59, 130, 246, .08))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./MsgBody.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{a as m}from"./MsgBody.vue_vue_type_script_setup_true_lang-D_70Txdf.js";import"./index-N2_GDY3v.js";export{m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Qo=Object.defineProperty;var er=(e,t,n)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Me=(e,t,n)=>er(e,typeof t!="symbol"?t+"":t,n);import{aI as tr,af as ce,aJ as Ut,aK as Kt,V as ve,aL as Ne,d as de,G as Fe,o as h,b as Oe,c as v,I as w,C as Kn,u as l,H as y,F as $e,f as Qe,i as Q,aM as nr,av as or,_ as Ke,a as D,aN as Te,ai as ye,a9 as Xt,a8 as $t,p as Yt,v as Qt,aO as rr,aP as sr,q as zt,aQ as ir,S as Xn,x as en,aR as ar,j as q,r as Yn,aS as Qn,aT as cr,ao as ur,aU as vn,e as eo,n as ne,aV as to,h as lr,k as xe,ab as no,P as dr,M as Jt,aW as fr,am as Re,g as Rt,D as pr,A as mr,B as hr,Z as gr,E as _r,aX as vr,U as yr,w as Ue,an as yn,aY as bn,aZ as br,aD as qe,K as ut,a_ as wr,ah as kr,a7 as $r,al as wn,a$ as zr,b0 as Ir,b1 as kn,b2 as Sr,ag as Cr,b3 as Or,X as Zr,W as jr,Q as Lt,R as xt,b4 as Er}from"./index-
|
|
1
|
+
var Qo=Object.defineProperty;var er=(e,t,n)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Me=(e,t,n)=>er(e,typeof t!="symbol"?t+"":t,n);import{aI as tr,af as ce,aJ as Ut,aK as Kt,V as ve,aL as Ne,d as de,G as Fe,o as h,b as Oe,c as v,I as w,C as Kn,u as l,H as y,F as $e,f as Qe,i as Q,aM as nr,av as or,_ as Ke,a as D,aN as Te,ai as ye,a9 as Xt,a8 as $t,p as Yt,v as Qt,aO as rr,aP as sr,q as zt,aQ as ir,S as Xn,x as en,aR as ar,j as q,r as Yn,aS as Qn,aT as cr,ao as ur,aU as vn,e as eo,n as ne,aV as to,h as lr,k as xe,ab as no,P as dr,M as Jt,aW as fr,am as Re,g as Rt,D as pr,A as mr,B as hr,Z as gr,E as _r,aX as vr,U as yr,w as Ue,an as yn,aY as bn,aZ as br,aD as qe,K as ut,a_ as wr,ah as kr,a7 as $r,al as wn,a$ as zr,b0 as Ir,b1 as kn,b2 as Sr,ag as Cr,b3 as Or,X as Zr,W as jr,Q as Lt,R as xt,b4 as Er}from"./index-N2_GDY3v.js";class $n{static isMsgInline(t){switch(t){case"at":case"text":case"face":case"i18n":return!0;case"bface":case"image":case"record":case"video":case"file":case"json":case"xml":return!1}return!1}static parseText(t){return t=t.replaceAll(`\r
|
|
2
2
|
`,`
|
|
3
3
|
`).replaceAll("\r",`
|
|
4
4
|
`),t=t.replace(/&([^;]+);/g,"&$1;"),t=tr(t,{whiteList:{a:["href","target"]}}),t}}const Tr={async bilibili(e){const t=new ce,n=s=>{try{const i=Number(s);return i/1e4>=1?(i/1e4).toFixed(1)+" w":i/1e3>=1?(i/1e3).toFixed(1)+" k":i.toString()}catch{return s}},o="https://api.bilibili.com/x/web-interface/wbi/view?bvid=",r=e.match(/bilibili.com\/video\/(BV[0-9a-zA-Z]+)/);if(r){const s=r[1];t.info(`[linkView] 获取到 bilibili 链接:${s}`);const i=await Ut(o+s);if(i&&i.code===0){t.info(`[linkView] 预览 bilibili 链接成功:${i.data.title}`);const c=i.data.stat;return Object.keys(c).forEach(u=>{c[u]=n(c[u])}),{type:"bilibili",sub_type:"video",url:e,data:{title:i.data.title,desc:i.data.desc,pic:i.data.pic,public:i.data.pubdate,owner:i.data.owner,stat:c}}}}return null},async music163(e){const t=new ce,n=new URL(e),r=new URLSearchParams(n.search).get("id");if(r!=null){t.info(`[linkView] 获取获取网易云音乐歌曲 ID:${r}`);const s=void 0;try{const i=await Ut(s+"/song/detail?ids="+r),c=await Ut(s+"/song/url?id="+r),u={detail:i,url:c},a=await Kt(ve.proxyUrl(Ne.query(u.detail,"$..al.picUrl")[0]),.4),f={type:"music163",sub_type:"song",data:{id:r,play_link:Ne.query(u.url,"$..url")[0],cover:Ne.query(u.detail,"$..al.picUrl")[0],cover_light:a[1][1]=="light",info:{name:Ne.query(u.detail,"$..name")[0],author:Ne.query(u.detail,"$..ar[*].name"),time:Ne.query(u.detail,"$..dt")[0]/1e3,free:Ne.query(u.url,"$..freeTrialInfo")[0]!=null?{start:Ne.query(u.url,"$..freeTrialInfo")[0].start,end:Ne.query(u.url,"$..freeTrialInfo")[0].end}:null}}};return t.info("[linkView] 预览网易云音乐成功"),f}catch(i){t.error(i,"[linkView] 预览网易云音乐失败")}}return null}},Ee=class Ee{constructor(t,n,o,r){Me(this,"suffixId");this.id=t,this.type=n,this.hasSuper=o,this.superSuffix=r,r.length>0&&(this.suffixId=r[0])}static get(t){if(!(t<5e3))return new Ee(t,"emoji",!1,[])}static has(t){return t>=5e3}static get responseId(){return this.responseEmojiId}get description(){return Ee.descMap.get(this.id.toString())||"表情"}get value(){return String.fromCodePoint(this.id)}get superValue(){}};Me(Ee,"apngMap",new Map),Me(Ee,"descMap",new Map),Me(Ee,"allList",new Set),Me(Ee,"allSuperList",new Set),Me(Ee,"normalList",[]),Me(Ee,"emojiList",[128522,128524,128538,128531,128560,128541,128513,128540,9786,128525,128532,128516,128527,128530,128563,128536,128557,128561,128514,128170,128074,128077,128079,128078,128591,128076,128070,128064,127836,127847,127838,127866,127867,9749,127822,127827,127817,128684,127801,127881,128157,128163,10024,128168,128166,128293,128164,128169,128137,128235,128014,128103,128102,128053,128055,128046,128020,128056,128123,128027,128054,128051,128098,9728,10068,128299,128147,127978]),Me(Ee,"responseEmojiId",[128522,128524,128538,128531,128560,128541,128513,128540,9786,128532,128516,128527,128530,128563,128536,128557,128514,128170,128074,128077,128079,128076,127836,127847,127838,127866,127867,9749,127822,127827,127817,127801,127881,128157,10024,128168,128166,128293,128164,128235,128103,128102,128053,128046,128027,128051,9728,10068,128147]);let et=Ee;const Pr=["title"],Dt=de({__name:"EmojiFace",props:{emoji:{default:()=>{}}},setup(e){return(t,n)=>{const o=Fe("font-awesome-icon");return e.emoji===void 0?(h(),Oe(o,{key:0,icon:["fas","face-grin-wide"],title:t.$t("表情"),class:"emoji-face"},null,8,["title"])):(h(),v("span",{key:1,title:e.emoji.description,class:"emoji-face"},w(e.emoji.value),9,Pr))}}});var zn;function g(e,t,n){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:i,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const a=i.prototype,f=Object.keys(a);for(let m=0;m<f.length;m++){const k=f[m];k in c||(c[k]=a[k].bind(c))}}const r=(n==null?void 0:n.Parent)??Object;class s extends r{}Object.defineProperty(s,"name",{value:e});function i(c){var u;const a=n!=null&&n.Parent?new s:this;o(a,c),(u=a._zod).deferred??(u.deferred=[]);for(const f of a._zod.deferred)f();return a}return Object.defineProperty(i,"init",{value:o}),Object.defineProperty(i,Symbol.hasInstance,{value:c=>{var u,a;return n!=null&&n.Parent&&c instanceof n.Parent?!0:(a=(u=c==null?void 0:c._zod)==null?void 0:u.traits)==null?void 0:a.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class nt extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class oo extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(zn=globalThis).__zod_globalConfig??(zn.__zod_globalConfig={});const tn=globalThis.__zod_globalConfig;function He(e){return tn}function ro(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function Wt(e,t){return typeof t=="bigint"?t.toString():t}function nn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function on(e){return e==null}function rn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Ar(e,t){const n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o)<r?0:n-o}const In=Symbol("evaluating");function x(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==In)return o===void 0&&(o=In,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Xe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Be(...e){const t={};for(const n of e){const o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function Sn(e){return JSON.stringify(e)}function Mr(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const so="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function It(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Nr=nn(()=>{var e;if(tn.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function mt(e){if(It(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(It(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function io(e){return mt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Ur=new Set(["string","number","symbol"]);function ot(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ve(e,t,n){const o=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(o._zod.parent=e),o}function Z(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Rr(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Lr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function xr(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Be(e._zod.def,{get shape(){const i={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(i[c]=n.shape[c])}return Xe(this,"shape",i),i},checks:[]});return Ve(e,s)}function Dr(e,t){const n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Be(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete i[c]}return Xe(this,"shape",i),i},checks:[]});return Ve(e,s)}function Fr(e,t){if(!mt(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const i in t)if(Object.getOwnPropertyDescriptor(s,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=Be(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return Xe(this,"shape",s),s}});return Ve(e,r)}function Br(e,t){if(!mt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Be(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return Xe(this,"shape",o),o}});return Ve(e,n)}function Vr(e,t){var o;if((o=e._zod.def.checks)!=null&&o.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n=Be(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Xe(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ve(e,n)}function Jr(e,t,n){const r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const i=Be(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(n)for(const a in n){if(!(a in c))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(u[a]=e?new e({type:"optional",innerType:c[a]}):c[a])}else for(const a in c)u[a]=e?new e({type:"optional",innerType:c[a]}):c[a];return Xe(this,"shape",u),u},checks:[]});return Ve(t,i)}function Wr(e,t,n){const o=Be(t._zod.def,{get shape(){const r=t._zod.def.shape,s={...r};if(n)for(const i in n){if(!(i in s))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(s[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)s[i]=new e({type:"nonoptional",innerType:r[i]});return Xe(this,"shape",s),s}});return Ve(t,o)}function tt(e,t=0){var n;if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(((n=e.issues[o])==null?void 0:n.continue)!==!0)return!0;return!1}function qr(e,t=0){var n;if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(((n=e.issues[o])==null?void 0:n.continue)===!1)return!0;return!1}function ao(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function bt(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ge(e,t,n){var u,a,f,m,k,_;const o=e.message?e.message:bt((f=(a=(u=e.inst)==null?void 0:u._zod.def)==null?void 0:a.error)==null?void 0:f.call(a,e))??bt((m=t==null?void 0:t.error)==null?void 0:m.call(t,e))??bt((k=n.customError)==null?void 0:k.call(n,e))??bt((_=n.localeError)==null?void 0:_.call(n,e))??"Invalid input",{inst:r,continue:s,input:i,...c}=e;return c.path??(c.path=[]),c.message=o,t!=null&&t.reportInput&&(c.input=i),c}function sn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ht(...e){const[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}const co=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},uo=g("$ZodError",co),lo=g("$ZodError",co,{Parent:Error});function Hr(e,t=n=>n.message){const n={},o=[];for(const r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Gr(e,t=n=>n.message){const n={_errors:[]},o=(r,s=[])=>{for(const i of r.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>o({issues:c},[...s,...i.path]));else if(i.code==="invalid_key")o({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")o({issues:i.issues},[...s,...i.path]);else{const c=[...s,...i.path];if(c.length===0)n._errors.push(t(i));else{let u=n,a=0;for(;a<c.length;){const f=c[a];a===c.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(t(i))):u[f]=u[f]||{_errors:[]},u=u[f],a++}}}};return o(e),n}const an=e=>(t,n,o,r)=>{const s=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise)throw new nt;if(i.issues.length){const c=new((r==null?void 0:r.Err)??e)(i.issues.map(u=>Ge(u,s,He())));throw so(c,r==null?void 0:r.callee),c}return i.value},cn=e=>async(t,n,o,r)=>{const s=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:n,issues:[]},s);if(i instanceof Promise&&(i=await i),i.issues.length){const c=new((r==null?void 0:r.Err)??e)(i.issues.map(u=>Ge(u,s,He())));throw so(c,r==null?void 0:r.callee),c}return i.value},Zt=e=>(t,n,o)=>{const r=o?{...o,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},r);if(s instanceof Promise)throw new nt;return s.issues.length?{success:!1,error:new(e??uo)(s.issues.map(i=>Ge(i,r,He())))}:{success:!0,data:s.value}},Kr=Zt(lo),jt=e=>async(t,n,o)=>{const r=o?{...o,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},r);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(i=>Ge(i,r,He())))}:{success:!0,data:s.value}},Xr=jt(lo),Yr=e=>(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return an(e)(t,n,r)},Qr=e=>(t,n,o)=>an(e)(t,n,o),es=e=>async(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return cn(e)(t,n,r)},ts=e=>async(t,n,o)=>cn(e)(t,n,o),ns=e=>(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return Zt(e)(t,n,r)},os=e=>(t,n,o)=>Zt(e)(t,n,o),rs=e=>async(t,n,o)=>{const r=o?{...o,direction:"backward"}:{direction:"backward"};return jt(e)(t,n,r)},ss=e=>async(t,n,o)=>jt(e)(t,n,o),is=/^[cC][0-9a-z]{6,}$/,as=/^[0-9a-z]+$/,cs=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,us=/^[0-9a-vA-V]{20}$/,ls=/^[A-Za-z0-9]{27}$/,ds=/^[a-zA-Z0-9_-]{21}$/,fs=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ps=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Cn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ms=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,hs="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function gs(){return new RegExp(hs,"u")}const _s=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ys=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ws=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fo=/^[A-Za-z0-9_-]*$/,ks=/^https?$/,$s=/^\+[1-9]\d{6,14}$/,po="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zs=new RegExp(`^${po}$`);function mo(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Is(e){return new RegExp(`^${mo(e)}$`)}function Ss(e){const t=mo({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${po}T(?:${o})$`)}const Cs=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Os=/^-?\d+$/,Zs=/^-?\d+(?:\.\d+)?$/,js=/^[^A-Z]*$/,Es=/^[^a-z]*$/,ze=g("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ho={number:"number",bigint:"bigint",object:"date"},go=g("$ZodCheckLessThan",(e,t)=>{ze.init(e,t);const n=ho[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,s=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_o=g("$ZodCheckGreaterThan",(e,t)=>{ze.init(e,t);const n=ho[typeof t.value];e._zod.onattach.push(o=>{const r=o._zod.bag,s=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ts=g("$ZodCheckMultipleOf",(e,t)=>{ze.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Ar(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ps=g("$ZodCheckNumberFormat",(e,t)=>{var i;ze.init(e,t),t.format=t.format||"float64";const n=(i=t.format)==null?void 0:i.includes("int"),o=n?"int":"number",[r,s]=Lr[t.format];e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=r,u.maximum=s,n&&(u.pattern=Os)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!t.abort});return}}u<r&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),u>s&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),As=g("$ZodCheckMaxLength",(e,t)=>{var n;ze.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!on(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const r=o.value;if(r.length<=t.maximum)return;const i=sn(r);o.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ms=g("$ZodCheckMinLength",(e,t)=>{var n;ze.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!on(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const r=o.value;if(r.length>=t.minimum)return;const i=sn(r);o.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ns=g("$ZodCheckLengthEquals",(e,t)=>{var n;ze.init(e,t),(n=e._zod.def).when??(n.when=o=>{const r=o.value;return!on(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{const r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{const r=o.value,s=r.length;if(s===t.length)return;const i=sn(r),c=s>t.length;o.issues.push({origin:i,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Et=g("$ZodCheckStringFormat",(e,t)=>{var n,o;ze.init(e,t),e._zod.onattach.push(r=>{const s=r._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Us=g("$ZodCheckRegex",(e,t)=>{Et.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Rs=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=js),Et.init(e,t)}),Ls=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Es),Et.init(e,t)}),xs=g("$ZodCheckIncludes",(e,t)=>{ze.init(e,t);const n=ot(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{const s=r._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Ds=g("$ZodCheckStartsWith",(e,t)=>{ze.init(e,t);const n=new RegExp(`^${ot(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Fs=g("$ZodCheckEndsWith",(e,t)=>{ze.init(e,t);const n=new RegExp(`.*${ot(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{const r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Bs=g("$ZodCheckOverwrite",(e,t)=>{ze.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Vs{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const o=t.split(`
|