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.
@@ -1,28 +0,0 @@
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 Ut,w as xe,u as B,o as W,c as ee,r as qt,a as he,b as Ae,e as kt,F as _e,f as gt,m as ci,t as vo,n as mt,g as kn,h as ki,i as ie,j as ge,k as zt,l as we,p as un,q as pt,s as po,v as Gn,x as _t,y as an,z as yo,A as Tn,B as _i,C as En,D as Ii,E as xn,G as Fn,H as y,I as K,J as In,K as nt,T as Si,L as ln,M as it,N as fi,O as di,P as Yt,Q as dt,R as De,S as Ci,_ as Ln,U as Mi,V as yt,W as wo,X as Ai,Y as bo,Z as Kn,$ as Ti,a0 as ko,a1 as mn,a2 as hi,a3 as Ei,a4 as jn,a5 as xi,a6 as Fi,a7 as qn,a8 as Vn,a9 as _o,aa as Io,ab as en,ac as gn,ad as mi,ae as So,af as Ot,ag as vn,ah as Co,ai as pn,aj as tn,ak as nn,al as on,am as Un,an as Mo,ao as Ao,ap as To,aq as Eo,ar as xo,as as gi,at as vi,au as Fo,av as Pt,aw as Lo,ax as $o,ay as yn,az as Ro,aA as Do,aB as Bo,aC as Oo,aD as Uo,aE as zo,aF as No,aG as Ho,aH as Po}from"./index-DOJoilEy.js";import{_ as Wn,E as sn,a as rn}from"./MsgBody.vue_vue_type_script_setup_true_lang-CLmUjKws.js";function Jn(n,f,D){if(!D)return f;const r=n==null?void 0:n[D];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${D}')`);return r}function wn(n,f){return n.map((D,r)=>Jn(D,r,f))}function jo(n,f,D){const r=[],e=[];for(let t=0;t<n.length;t++){const l=n[t],u=Jn(l,t,f),w=D(l,t,u);r.push(u),e.push(typeof w=="number"&&w>0?w:null)}return{keys:r,sizes:e}}function qo(n,f,D){if(!n||n.keys.length!==f.length||n.sizes.length!==f.length)return!1;for(let r=0;r<f.length;r++)if(n.keys[r]!==Jn(f[r],r,D))return!1;return!0}function Vo(n,f,D){if(!qo(n,f,D))return{};const r={};for(let e=0;e<n.keys.length;e++){const t=n.sizes[e];typeof t=="number"&&t>0&&(r[n.keys[e]]=t)}return r}function Wo(n,f){if(!n.length||f.length<=n.length)return 0;const D=n[0],r=f.indexOf(D);if(r<=0||r+n.length<f.length&&n.length>f.length-r)return 0;for(let e=0;e<n.length;e++)if(f[r+e]!==n[e])return 0;return r}function pi(n,f,D,r,e,t=0){const l=e??"start";if(l==="nearest"){const u=D+r,w=n+f;return n>=D&&w<=u?null:n<D?n+t:w-r+t}return l==="end"?n+f-r+t:l==="center"?n+(f-r)/2+t:n+t}const Qo={itemsLimit:1e3};function Li(n){return typeof window<"u"&&n===window}const Go=(()=>{if(typeof document>"u")return"negative";const n=document.createElement("div"),f=document.createElement("div");n.style.width="4px",n.style.height="1px",n.style.overflow="auto",n.style.direction="rtl",f.style.width="8px",f.style.height="1px",n.appendChild(f),document.body.appendChild(n),n.scrollLeft=-1;const D=n.scrollLeft<0;return document.body.removeChild(n),D?"negative":"default"})();function Kt(n,f,D){return f!=="horizontal"||!D||Li(D)||getComputedStyle(D).direction!=="rtl"?n:Go==="negative"?-n:n}function Ko(n,f,D){return Kt(n,f,D)}function zn(n,f,D,r){const e=Ko(D,f,n),t=!!(r!=null&&r.smooth);if(Li(n)){f==="vertical"?n.scrollTo({top:e,behavior:t?"smooth":"auto"}):n.scrollTo({left:e,behavior:t?"smooth":"auto"});return}if(typeof n.scrollTo=="function"){n.scrollTo(f==="vertical"?{top:e,behavior:t?"smooth":"auto"}:{left:e,behavior:t?"smooth":"auto"});return}f==="vertical"?n.scrollTop=e:n.scrollLeft=e}function Jo(n,f,D){return D?f==="vertical"?window.innerHeight:window.innerWidth:f==="vertical"?n.clientHeight:n.clientWidth}const Yo=/auto|scroll/;function $i(n,f){return n.parentNode===null?f:$i(n.parentNode,[...f,n])}function Nn(n,f){return getComputedStyle(n,null).getPropertyValue(f)}function Xo(n){return Nn(n,"overflow")+Nn(n,"overflow-y")+Nn(n,"overflow-x")}function Zo(n){return Yo.test(Xo(n))}function bn(n){if(!(n instanceof HTMLElement||n instanceof SVGElement))return;const f=$i(n.parentNode,[]);for(let D=0;D<f.length;D+=1)if(f[D]instanceof Element&&Zo(f[D]))return f[D];return document.scrollingElement||document.documentElement}let Qn=!1;function ea(){return Qn}if(typeof window<"u"){Qn=!1;try{const n=Object.defineProperty({},"passive",{get(){Qn=!0}});window.addEventListener("test",null,n)}catch{}}let ta=0;function Hn(n){const f=n;f._vs_styleStamp++}function na(n,f,D){const r=n==null?void 0:n[D];if(r==null)throw new Error(`Key is ${r} on item (keyField is '${D}')`);return r}function ia(n,f,D,r,e){const t=ge([]),l=ge(0),u=ge(!1);let w=0,L=0;const i=new Map,a=new Map;let o=!1,d=0,g=0,R=!1,k=null,T=null,G=null,P=0,x=null,q=[],M=null,N=null,p=null,v=!1;const F=new Set,I=ge({}),S=zt(()=>{const H=we(n);return H.items.length>0&&typeof H.items[0]!="object"}),A=zt(()=>{const H=we(n);if(H.itemSize===null){const V={[-1]:{accumulator:0}},te=H.items,se=H.sizeField??"size",ae=H.minItemSize,le=I.value;let fe=1e4,Me=0,ut;for(let Be=0,at=te.length;Be<at;Be++){const He=S.value?Be:na(te[Be],Be,H.keyField);ut=le[He]||te[Be][se]||ae,ut<fe&&(fe=ut),Me+=ut,V[Be]={accumulator:Me,size:ut}}return P=fe,V}return[]}),_=zt(()=>t.value.filter(H=>H.nr.used).sort((H,V)=>H.nr.index-V.nr.index)),$=zt(()=>{const H=we(n),V=S.value?null:H.keyField;return jo(H.items,V,(te,se,ae)=>H.itemSize!=null?H.itemSize:I.value[ae]||(te==null?void 0:te[H.sizeField??"size"])||void 0)});function m(H){const V=we(n);return I.value=Vo(H,V.items,S.value?null:V.keyField),Object.keys(I.value).length>0}function h(H){let V=a.get(H);return V||(V=[],a.set(H,V)),V}function O(H,V,te,se,ae){const le=an({id:ta++,index:V,used:!0,key:se,type:ae}),fe=yo({item:te,position:0,offset:0,nr:le,_vs_styleStamp:0});return H.push(fe),fe}function C(H){const V=h(H);if(V&&V.length){const te=V.pop();return te.nr.used=!0,Hn(te),te}}function z(H){const V=H.nr.type;h(V).push(H),H.nr.used=!1,H.position=-9999,Hn(H),i.delete(H.nr.key)}function Q(){i.clear(),a.clear();for(let H=0,V=t.value.length;H<V;H++){const te=t.value[H];te&&z(te)}}function J(H){let V=-1;return V=requestAnimationFrame(()=>{F.delete(V),H()}),F.add(V),V}function ne(){for(const H of F)cancelAnimationFrame(H);F.clear()}function Y(){k&&(clearTimeout(k),k=null),T&&(clearTimeout(T),T=null),G&&(clearTimeout(G),G=null),N&&(clearTimeout(N),N=null),p&&(clearTimeout(p),p=null)}function j(){var H;(H=e==null?void 0:e.onResize)==null||H.call(e),u.value&&de(!1)}function re(){M&&!v&&ve();const H=we(n);if(!o){if(o=!0,k)return;const V=()=>J(()=>{o=!1;const{continuous:te}=de(!1,!0);te||(T&&clearTimeout(T),T=setTimeout(re,H.updateInterval+100))});V(),H.updateInterval&&(k=setTimeout(()=>{k=null,o&&V()},H.updateInterval))}}function $e(H,V){var te,se;u.value&&(H||V.boundingClientRect.width!==0||V.boundingClientRect.height!==0?((te=e==null?void 0:e.onVisible)==null||te.call(e),J(()=>{de(!1)})):(se=e==null?void 0:e.onHidden)==null||se.call(e))}function Te(){const H=we(f),V=H?bn(H):void 0;return window.document&&(V===window.document.documentElement||V===window.document.body)?window:V||window}function pe(){const H=we(D);return H?we(n).direction==="vertical"?H.scrollHeight:H.scrollWidth:0}function me(){const H=we(f);if(!H)return{start:0,end:0};const V=we(n),te=V.direction==="vertical";let se;if(V.pageMode){const ae=H.getBoundingClientRect(),le=te?ae.height:ae.width;let fe=-(te?ae.top:ae.left),Me=te?window.innerHeight:window.innerWidth;fe<0&&(Me+=fe,fe=0),fe+Me>le&&(Me=le-fe),se={start:fe,end:fe+Me}}else te?se={start:H.scrollTop,end:H.scrollTop+H.clientHeight}:se={start:Kt(H.scrollLeft,V.direction,H),end:Kt(H.scrollLeft,V.direction,H)+H.clientWidth};return se}function Fe(){const H=we(f);if(!H)return{start:0,end:0};if(we(n).direction==="vertical"){const V=Kt(H.scrollLeft,"horizontal",H);return{start:V,end:V+H.clientWidth}}return{start:H.scrollTop,end:H.scrollTop+H.clientHeight}}function Re(H){const V=we(n);if(V.itemSize!=null)return V.itemSize;const te=A.value[H];return(te==null?void 0:te.size)||Number(V.minItemSize)||0}function Ke(H){var V;const te=we(n),se=te.gridItems||1;return H<=0?0:te.itemSize!=null?Math.floor(H/se)*te.itemSize:((V=A.value[H-1])==null?void 0:V.accumulator)||0}function Ve(H){const V=we(n),te=V.items.length,se=V.gridItems||1;if(!te)return 0;if(V.itemSize!=null){const Me=Math.floor(H/V.itemSize)*se;return Math.min(Math.max(Me,0),te-1)}let ae=0,le=te-1,fe=0;for(;ae<=le;){const Me=Math.floor((ae+le)/2);Ke(Me)<=H?(fe=Me,ae=Me+1):le=Me-1}return fe}function ve(){N&&(clearTimeout(N),N=null),M=null}function We(){N&&clearTimeout(N),N=setTimeout(()=>{M=null,N=null},150)}function be(H,V){if(!H.length){ve();return}const te=Math.max(me().start-pe(),0),se=Math.min(Ve(te),H.length-1),ae=H[se],le=V?ae==null?void 0:ae[V]:se;if(le==null){ve();return}const fe=pe()+Ke(se);M={key:le,offset:me().start-fe}}function Le(H){if(!M)return!1;const V=we(n),te=H??V.items,se=S.value?null:V.keyField,ae=wn(te,se).indexOf(M.key);if(ae===-1)return ve(),!1;const le=pe()+Ke(ae)+M.offset,fe=me().start;return Math.abs(le-fe)<.5?!1:(v=!0,wt(le),J(()=>{v=!1}),!0)}function ze(){we(n).pageMode?ot():Ne()}function ot(){x=Te(),x.addEventListener("scroll",re,ea()?{passive:!0}:!1),x.addEventListener("resize",j)}function Ne(){x&&(x.removeEventListener("scroll",re),x.removeEventListener("resize",j),x=null)}function Qe(H,V,te,se,ae,le){const fe=Math.ceil(H/V)*te,Me=Math.max(0,Math.floor(ae.start/te)),ut=Math.min(Math.ceil(ae.end/te),Math.ceil(H/V)),Be=Math.max(0,Math.floor(le.start/se)),at=Math.min(Math.ceil(le.end/se),V),He=[];for(let st=Me;st<ut;st++){const Mt=st*V;for(let Ge=Be;Ge<at;Ge++){const Ye=Mt+Ge;if(Ye>=H)break;He.push(Ye)}}const ke=He[0]??0,Oe=He.at(-1)??-1;return{renderedIndices:He,startIndex:ke,endIndex:Oe+1,visibleStartIndex:ke,visibleEndIndex:Oe,totalSize:fe}}function Pe(){const H=we(n);if(!H.gridItems||H.itemSize==null)return!1;const V=we(f);if(!V)return!1;const te=H.itemSecondarySize||H.itemSize,se=H.direction==="vertical"?V.clientWidth:V.clientHeight;return te*H.gridItems>se}function de(H,V=!1){var te,se;const ae=we(n),le=ae.itemSize,fe=ae.gridItems||1,Me=ae.itemSecondarySize||le,ut=P,Be=ae.typeField,at=S.value?null:ae.keyField,He=ae.items,ke=He.length,Oe=A.value,st=i,Mt=t.value;let Ge=null,Ye=null,rt,Ue,At,vt,St;if(!ke)rt=Ue=vt=St=At=0;else if(R)rt=vt=0,Ue=St=Math.min(ae.prerender,He.length),At=0;else{const ye=me(),lt=Fe();if(V){let Xe=ye.start-d;Xe<0&&(Xe=-Xe);let Dt=lt.start-g;Dt<0&&(Dt=-Dt);const Ze=le===null&&Xe>=ut||le!==null&&Xe>=le,ct=fe>1&&le!=null&&Dt>=Me;if(!Ze&&!ct)return{continuous:!0}}d=ye.start,g=lt.start;const Tt=ae.buffer;ye.start-=Tt,ye.end+=Tt,lt.start-=Tt,lt.end+=Tt;let xt=0;const Wt=we(D);Wt&&(xt=Wt.scrollHeight,ye.start-=xt);const fn=we(r);if(fn){const Xe=fn.scrollHeight;ye.end+=Xe}if(le===null){let Xe,Dt=0,Ze=ke-1,ct=~~(ke/2),dn;do dn=ct,Xe=Oe[ct].accumulator,Xe<ye.start?Dt=ct:ct<ke-1&&Oe[ct+1].accumulator>ye.start&&(Ze=ct),ct=~~((Dt+Ze)/2);while(ct!==dn);for(ct<0&&(ct=0),rt=ct,At=Oe[ke-1].accumulator,Ue=ct;Ue<ke&&Oe[Ue].accumulator<ye.end;Ue++);for(Ue===-1?Ue=He.length-1:(Ue++,Ue>ke&&(Ue=ke)),vt=rt;vt<ke&&xt+Oe[vt].accumulator<ye.start;vt++);for(St=vt;St<ke&&xt+Oe[St].accumulator<ye.end;St++);}else if(fe>1){const Xe=Qe(ke,fe,le,Me,ye,lt);Ge=Xe.renderedIndices,Ye=new Set(Ge),rt=Xe.startIndex,Ue=Xe.endIndex,vt=Xe.visibleStartIndex,St=Xe.visibleEndIndex,At=Xe.totalSize}else{rt=~~(ye.start/le*fe);const Xe=rt%fe;rt-=Xe,Ue=Math.ceil(ye.end/le*fe),vt=Math.max(0,Math.floor((ye.start-xt)/le*fe)),St=Math.floor((ye.end-xt)/le*fe),rt<0&&(rt=0),Ue>ke&&(Ue=ke),vt<0&&(vt=0),St>ke&&(St=ke),At=Math.ceil(ke/fe)*le}}Ue-rt>Qo.itemsLimit&&Je(),l.value=At;let Ie;const cn=rt<=L&&Ue>=w;if(!cn||H)Q();else for(let ye=0,lt=Mt.length;ye<lt;ye++){const Tt=Mt[ye];if(Tt&&(Ie=Tt,Ie.nr.used)){const xt=Ye?Ye.has(Ie.nr.index):Ie.nr.index>=rt&&Ie.nr.index<Ue,Wt=le||Oe[Ie.nr.index]&&Oe[Ie.nr.index].size;(!xt||!Wt)&&z(Ie)}}let $t,Rt;const Rn=Ge??Array.from({length:Math.max(0,Ue-rt)},(ye,lt)=>rt+lt);for(const ye of Rn){if(!(le||Oe[ye]&&Oe[ye].size))continue;$t=He[ye];const lt=at?$t[at]:ye;if(lt==null)throw new Error(`Key is ${lt} on item (keyField is '${at}')`);if(Ie=st.get(lt),Ie)Ie.item!==$t&&(Ie.item=$t),Ie.nr.used||console.warn(`Expected existing view's used flag to be true, got ${Ie.nr.used}`);else{if(Rt=$t[Be],Ie=C(Rt),Ie){const Tt=Ie.nr.index!==ye||Ie.nr.key!==lt;Ie.item=$t,Ie.nr.index=ye,Ie.nr.key=lt,Ie.nr.type!==Rt&&console.warn("Reused view's type does not match pool's type"),Tt&&Hn(Ie)}else Ie=O(Mt,ye,$t,lt,Rt);st.set(lt,Ie)}le===null?(Ie.position=((te=Oe[ye-1])==null?void 0:te.accumulator)||0,Ie.offset=0):(Ie.position=Math.floor(ye/fe)*le,Ie.offset=ye%fe*Me)}return w=rt,L=Ue,ae.emitUpdate&&((se=e==null?void 0:e.onUpdate)==null||se.call(e,rt,Ue,vt,St)),G&&clearTimeout(G),G=setTimeout(Lt,ae.updateInterval+300),{continuous:cn}}function Je(){throw p=setTimeout(()=>{p=null,console.warn("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",we(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 Ct(){if(Pe())return!1;const H=t.value.filter(({nr:V})=>V.used);for(let V=1;V<H.length;V++)if(H[V].nr.index!==H[V-1].nr.index+1)return!0;return!1}function Lt(){t.value.sort((H,V)=>H.nr.index-V.nr.index),Ct()&&(de(!1),G&&clearTimeout(G))}function et(H,V){const te=we(n),se=we(f);if(!se)return;const ae=Math.max(0,Math.min(H,te.items.length-1)),le=me().start,fe=Jo(se,te.direction,te.pageMode),Me=Ke(ae),ut=Re(ae),Be=pi(Me,ut,le,fe,V==null?void 0:V.align,(V==null?void 0:V.offset)??0);if(Be!=null&&(wt(Be,V),te.gridItems&&te.itemSize!=null)){const at=we(f);if(!at)return;const He=te.gridItems,ke=te.itemSecondarySize||te.itemSize,Oe=ae%He*ke,st=te.direction==="vertical"?"horizontal":"vertical",Mt=st==="horizontal"?Kt(at.scrollLeft,"horizontal",at):at.scrollTop,Ge=st==="horizontal"?at.clientWidth:at.clientHeight,Ye=pi(Oe,ke,Mt,Ge,V==null?void 0:V.align,(V==null?void 0:V.offset)??0);Ye!=null&&zn(at,st,Ye,V)}}function wt(H,V){const te=we(n),se=we(f);if(se)if(te.pageMode){const ae=bn(se),le=ae.getBoundingClientRect(),fe=se.getBoundingClientRect(),Me=te.direction==="vertical"?"top":"left",ut=bn(se)===document.documentElement||bn(se)===document.body?te.direction==="vertical"?window.scrollY:window.scrollX:Kt(te.direction==="vertical"?ae.scrollTop:ae.scrollLeft,te.direction,ae),Be=fe[Me]-le[Me];zn(ae.tagName==="HTML"?window:ae,te.direction,H+ut+Be,V)}else zn(se,te.direction,H,V)}const Ee=we(n);return q=wn(Ee.items,Ee.items.length>0&&typeof Ee.items[0]!="object"?null:Ee.keyField),Ee.cache&&m(Ee.cache),Ee.prerender&&(R=!0,de(!1)),Ee.gridItems&&!Ee.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems"),un(()=>{ze(),pt(()=>{R=!1,de(!0),u.value=!0})}),po(()=>{const H=d;typeof H=="number"&&pt(()=>{wt(H)})}),Gn(()=>{Y(),ne(),Ne()}),_t(()=>we(n).cache,H=>{m(H),de(!0)}),_t(()=>we(n).items,(H,V)=>{const te=we(n),se=S.value?null:te.keyField,ae=wn(H,se);if(te.shift){const le=V?wn(V,se):q;Wo(le,ae)>0?be(V??[],se):ve()}else ve();q=ae,Le(H),de(!0)}),_t(()=>we(n).pageMode,()=>{ze(),de(!1)}),_t(A,()=>{Le()&&We(),de(!1)},{deep:!0}),_t(()=>we(n).gridItems,()=>{de(!0)}),_t(()=>we(n).itemSecondarySize,()=>{de(!0)}),{pool:t,visiblePool:_,totalSize:l,ready:u,sizes:A,simpleArray:S,scrollToItem:et,scrollToPosition:wt,getScroll:me,findItemIndex:Ve,getItemOffset:Ke,getItemSize:Re,cacheSnapshot:$,restoreCache:m,updateVisibleItems:de,handleScroll:re,handleResize:j,handleVisibilityChange:$e,sortViews:Lt}}const Yn=new WeakMap;function oa(n){return typeof n=="function"?{callback:n,observer:null,intersection:void 0,visible:null}:{callback:n.callback,observer:null,intersection:n.intersection,visible:null}}function yi(n,f){Ri(n);const D=oa(f.value);if(Yn.set(n,D),typeof IntersectionObserver>"u"){const r=n.getBoundingClientRect();D.visible=!0,D.callback(!0,{boundingClientRect:r});return}D.observer=new IntersectionObserver(r=>{const e=r[0],t=!!(e!=null&&e.isIntersecting);D.visible!==null&&D.visible===t||(D.visible=t,D.callback(t,e))},D.intersection),D.observer.observe(n)}function Ri(n){const f=Yn.get(n);f!=null&&f.observer&&(f.observer.disconnect(),f.observer=null)}const aa={mounted(n,f){yi(n,f)},updated(n,f){f.value!==f.oldValue&&yi(n,f)},unmounted(n){Ri(n),Yn.delete(n)}},sa=Ut({__name:"ItemView",props:{view:{},itemTag:{}},setup(n){const f=n;return(D,r)=>(W(),Ae(ki(f.itemTag),{class:"vue-recycle-scroller__item-view"},{default:kt(()=>[qt(D.$slots,"default",{item:f.view.item,index:f.view.nr.index,active:f.view.nr.used})]),_:3}))}}),ra=Ut({__name:"ResizeObserver",emits:["notify"],setup(n,{emit:f}){const D=f,r=ge();let e=null,t=null;function l(){D("notify")}return un(()=>{var u;const w=(u=r.value)==null?void 0:u.parentElement;if(w){if(typeof ResizeObserver<"u"){e=new ResizeObserver(()=>{l()}),e.observe(w);return}t=()=>l(),window.addEventListener("resize",t)}}),Gn(()=>{e&&(e.disconnect(),e=null),t&&(window.removeEventListener("resize",t),t=null)}),(u,w)=>(W(),ee("div",{ref_key:"el",ref:r,class:"vue-recycle-scroller__resize-observer","aria-hidden":"true"},null,512))}}),la=(n,f)=>{const D=n.__vccOpts||n;for(const[r,e]of f)D[r]=e;return D},ua=la(ra,[["__scopeId","data-v-08cc04ab"]]),ca=Ut({__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(n,{expose:f,emit:D}){const r=n,e=D,t=aa,l=ge(),u=ge(),w=ge(),L=ge(null),i=ia(r,l,u,w,{onResize:()=>e("resize"),onVisible:()=>e("visible"),onHidden:()=>e("hidden"),onUpdate:(_,$,m,h)=>{e("update",_,$,m,h),m<=0&&e("scrollStart"),h>=r.items.length-1&&e("scrollEnd")}}),{pool:a,visiblePool:o,totalSize:d,ready:g,scrollToItem:R,scrollToPosition:k,getScroll:T,findItemIndex:G,getItemOffset:P,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N,handleScroll:p,handleResize:v,handleVisibilityChange:F}=i;function I(_){L.value=_}function S(){L.value=null}const A=zt(()=>{const _={[r.direction==="vertical"?"minHeight":"minWidth"]:`${d.value}px`};if(r.gridItems&&r.itemSize!=null){const $=(r.itemSecondarySize||r.itemSize)*r.gridItems;_[r.direction==="vertical"?"minWidth":"minHeight"]=`${$}px`}return _});return f({el:l,visiblePool:o,scrollToItem:R,scrollToPosition:k,getScroll:T,findItemIndex:G,getItemOffset:P,getItemSize:x,cacheSnapshot:q,restoreCache:M,updateVisibleItems:N}),(_,$)=>xe((W(),ee("div",{ref_key:"el",ref:l,class:mt(["vue-recycle-scroller",{"grid-mode":r.gridItems,ready:B(g),"page-mode":r.pageMode,[`direction-${r.direction}`]:!0}]),onScrollPassive:$[0]||($[0]=(...m)=>B(p)&&B(p)(...m))},[_.$slots.before?(W(),ee("div",{key:0,ref_key:"before",ref:u,class:"vue-recycle-scroller__slot"},[qt(_.$slots,"before")],512)):he("",!0),(W(),Ae(ki(r.listTag),{style:kn(A.value),class:mt(["vue-recycle-scroller__item-wrapper",r.listClass])},{default:kt(()=>[(W(!0),ee(_e,null,gt(B(a),m=>(W(),Ae(sa,ci({key:m.nr.id,view:m,"item-tag":r.itemTag,style:B(g)?[r.disableTransform?{[r.direction==="vertical"?"top":"left"]:`${m.position}px`,willChange:"unset"}:{transform:`translate${r.direction==="vertical"?"Y":"X"}(${m.position}px) translate${r.direction==="vertical"?"X":"Y"}(${m.offset}px)`},{width:r.gridItems?`${r.direction==="vertical"&&r.itemSecondarySize||r.itemSize}px`:void 0,height:r.gridItems?`${r.direction==="horizontal"&&r.itemSecondarySize||r.itemSize}px`:void 0,visibility:m.nr.used?"visible":"hidden"}]:null,class:["vue-recycle-scroller__item-view",[r.itemClass,{hover:!r.skipHover&&L.value===m.nr.key}]]},vo(r.skipHover?{}:{mouseenter:()=>{I(m.nr.key)},mouseleave:()=>{S()}})),{default:kt(h=>[qt(_.$slots,"default",ci({ref_for:!0},h))]),_:2},1040,["view","item-tag","style","class"]))),128)),r.items.length===0?qt(_.$slots,"empty",{key:0}):he("",!0)]),_:3},8,["style","class"])),_.$slots.after?(W(),ee("div",{key:1,ref_key:"after",ref:w,class:"vue-recycle-scroller__slot"},[qt(_.$slots,"after")],512)):he("",!0),ie(ua,{onNotify:B(v)},null,8,["onNotify"])],34)),[[B(t),B(F)]])}}),fa={key:0,class:"chat-info-pan"},da={class:"ss-card chat-info"},ha={key:0},ma={key:1},ga={class:"chat-info-base user"},va=["src"],pa={key:0},ya={class:"info-copy"},wa={class:"info-copy"},ba={class:"info-copy"},ka={style:{"word-break":"break-all"}},_a={key:1},Ia=["innerHTML"],Sa={class:"tags"},Ca={key:2},Ma={class:"info-copy"},Aa={class:"info-copy"},Ta={class:"info-copy"},Ea={style:{"word-break":"break-all"}},xa={class:"info-copy"},Fa=["name"],La={class:"search-view"},$a={for:"info-member-search",class:"sr-only"},Ra=["placeholder"],Da={class:"member-item edit"},Ba=["src"],Oa=["onClick"],Ua=["onClick"],za=["src"],Na={class:"opt-item"},Ha={for:"info-member-card"},Pa={key:0,class:"opt-item"},ja={for:"info-member-title"},qa={class:"opt-item"},Va={for:"info-member-ban-min"},Wa=Ut({name:"ViewInfo",__name:"Info",props:{tags:{},chat:{}},emits:["close"],setup(n,{emit:f}){const D=Tn(),r=_i(),e=En(),t=Ii(),l=n,u=f,{t:w}=xn.global;function L(O){const C=String(O??"");return!C||C==="/img/icons/icon.svg"||C.includes("/img/icons/icon.svg")}function i(){return String(l.chat.show.channel_id||l.chat.show.channelId||l.chat.info.user_info.channel_id||l.chat.info.user_info.channelId||String(l.chat.show.id))}function a(){return String(l.chat.show.channel_id||l.chat.show.channelId||l.chat.info.group_info.channel_id||l.chat.info.group_info.channelId||String(l.chat.show.id))}const o=ge([]),d=ge(""),g=ge({}),R=ge({});function k(O){return typeof O!="object"||O===null?{}:O}function T(O){return String(k(O).user_id??"")}function G(O){const C=k(O);return String(C.card||C.nickname||C.name||T(O))}function P(O){return String(k(O).avatar??"")}function x(O){return String(k(O).role??"")}const q=ge({banMin:0});function M(O,C,z){const Q={title:w("提醒"),html:`<span>${w("真的要将 {user} 移出群聊吗",{user:O})}</span>`,button:[{text:w("确定"),fun:()=>{it.send("set_group_kick",{group_id:C,user_id:z},"setGroupKick"),t.popBoxList.shift(),g.value={};const J={title:w("操作"),html:`<span>${w("正在确认操作……")}</span>`};t.popBoxList.push(J),fi(1e3).then(()=>(di(String(e.chatInfo.show.id)),fi(1e3))).then(()=>{di(String(e.chatInfo.show.id)),t.popBoxList.shift()})}},{text:w("取消"),master:!0,fun:()=>{t.popBoxList.shift()}}]};t.popBoxList.push(Q)}function N(O){const C=new dt;Yt.config.globalProperties.$copyText(String(O)).then(()=>{C.add(De.INFO,w("复制成功"),!0)},()=>{C.add(De.ERR,w("复制失败"),!0)})}function p(O,C){const z=O.target.value;if(z!==""){const Q=parseInt(z);if(Q>0){const J={title:w("操作"),html:`<span>${w("确认禁言?")}</span>`,button:[{text:w("确认"),fun:()=>{var Y;const ne=(Y=D.jsonMap.ban_mumber)==null?void 0:Y.name;ne&&it.send(ne,{group_id:e.chatInfo.show.id,user_id:C.user_id,duration:Q*60},"banMumber"),t.popBoxList.shift(),A()}},{text:w("取消"),master:!0,fun:()=>{R.value=JSON.parse(JSON.stringify(C)),t.popBoxList.shift()}}]};t.popBoxList.push(J)}}}function v(O,C){const z=O.target.value;if(g.value.card!==z){const Q={title:w("操作"),html:`<span>${w("确认修改昵称?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const J=(ne=D.jsonMap.set_group_nickname)==null?void 0:ne.name;J&&it.send(J,{group_id:e.chatInfo.show.id,user_id:C.user_id,card:z},"updateGroupMemberInfo"),t.popBoxList.shift(),A()}},{text:w("取消"),master:!0,fun:()=>{R.value=JSON.parse(JSON.stringify(C)),t.popBoxList.shift()}}]};t.popBoxList.push(Q)}}function F(O,C){const z=O.target.value;if(g.value.card!==z){const Q={title:w("操作"),html:`<span>${w("确认修改头衔?")}</span>`,button:[{text:w("确认"),fun:()=>{var ne;const J=(ne=D.jsonMap.set_group_title)==null?void 0:ne.name;J&&it.send(J,{group_id:e.chatInfo.show.id,user_id:C.user_id,special_title:z},"updateGroupMemberInfo"),t.popBoxList.shift(),A()}},{text:w("取消"),master:!0,fun:()=>{R.value=JSON.parse(JSON.stringify(C)),t.popBoxList.shift()}}]};t.popBoxList.push(Q)}}function I(O){O<1e10&&(O*=1e3);const C=new Date().getTime(),z=O-C;return z>0?Math.floor(z/1e3/60):0}function S(O){const C=O.target.value;if(C!==""){const z=parseInt(C);isNaN(z)?O.target.value="":z<0&&(O.target.value="0")}}function A(){g.value={},u("close")}function _(O){if(O.user_id!=D.loginInfo.uin){let C=r.userList.find(z=>z.user_id==O.user_id);C||(C={user_id:O.user_id,nickname:w("临时会话"),remark:O.user_id,group_id:O.group_id,group_name:""}),r.baseOnMsgList.set(String(O.user_id),C),pt(()=>{if(C){const z=document.getElementById("user-"+C.user_id);z&&z.click()}})}}function $(O){h(O.role)?(g.value=O,R.value=JSON.parse(JSON.stringify(O)),q.value.banMin=I(O.shut_up_timestamp)):N(O.user_id)}function m(O){O&&(d.value=O.target.value);const C=d.value.trim();if(!C){o.value=[];return}const z=C.toLowerCase(),Q=Array.isArray(l.chat.info.group_members)?l.chat.info.group_members:[];o.value=Ci(Q).filter(J=>{const ne=G(J).toLowerCase(),Y=T(J);return ne.includes(z)||Y.includes(C)||Y.toLowerCase().includes(z)})}_t(()=>l.chat.info.group_members,()=>{d.value.trim()&&m()},{deep:!0});function h(O){return l.chat.info.me_info.role==="owner"||l.chat.info.me_info.role==="admin"&&O!=="owner"}return(O,C)=>{const z=Fn("font-awesome-icon");return n.tags.openChatInfo?(W(),ee("div",fa,[y("div",da,[y("header",null,[n.chat.show.type==="group"?(W(),ee("span",ha,K(B(w)("群资料")),1)):he("",!0),n.chat.show.type==="user"?(W(),ee("span",ma,K(B(w)("好友")),1)):he("",!0),ie(z,{icon:["fas","xmark"],onClick:A})]),y("div",ga,[y("div",null,[y("img",{"data-avatar":"",src:n.chat.show.avatar||"/img/icons/icon.svg",onError:C[0]||(C[0]=(...Q)=>B(In)&&B(In)(...Q))},null,40,va),y("div",null,[y("a",null,K(n.chat.show.name),1),y("span",null,K(n.chat.show.id),1)]),y("div",{style:{display:"flex","align-items":"center","justify-content":"center",cursor:"pointer"},onClick:C[1]||(C[1]=Q=>N(n.chat.show.id))},[ie(z,{icon:["fas","copy"]})])]),n.chat.show.type==="group"?(W(),ee("div",pa,[y("header",null,[y("span",null,K(B(w)("群组 ID")),1)]),y("div",ya,[y("span",null,K(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[2]||(C[2]=Q=>N(n.chat.show.id))})]),y("header",null,[y("span",null,K(B(w)("频道 ID")),1)]),y("div",wa,[y("span",null,K(a()),1),ie(z,{icon:["fas","copy"],onClick:C[3]||(C[3]=Q=>N(a()))})]),y("header",null,[y("span",null,K(B(w)("群头像")),1)]),y("div",ba,[y("span",ka,K(L(n.chat.show.avatar)?B(w)("无"):n.chat.show.avatar),1),L(n.chat.show.avatar)?he("",!0):(W(),Ae(z,{key:0,icon:["fas","copy"],onClick:C[4]||(C[4]=Q=>N(n.chat.show.avatar))}))])])):he("",!0),n.chat.show.type==="group"?xe((W(),ee("div",_a,[y("header",null,[y("span",null,K(B(w)("介绍")),1)]),y("span",{innerHTML:n.chat.info.group_info.gIntro===void 0||n.chat.info.group_info.gIntro===""?B(w)("群主很懒,还没有群介绍哦~"):n.chat.info.group_info.gIntro},null,8,Ia),y("div",Sa,[(W(!0),ee(_e,null,gt(n.chat.info.group_info.tags,Q=>(W(),ee("div",{key:Q.md},K(Q.tag),1))),128))])],512)),[[nt,Object.keys(n.chat.info.group_info).length>0]]):n.chat.show.type==="user"?(W(),ee("div",Ca,[y("header",null,[y("span",null,K(B(w)("用户 ID")),1)]),y("div",Ma,[y("span",null,K(n.chat.show.id),1),ie(z,{icon:["fas","copy"],onClick:C[5]||(C[5]=Q=>N(n.chat.show.id))})]),y("header",null,[y("span",null,K(B(w)("用户名称")),1)]),y("div",Aa,[y("span",null,K(n.chat.show.name),1),ie(z,{icon:["fas","copy"],onClick:C[6]||(C[6]=Q=>N(n.chat.show.name))})]),y("header",null,[y("span",null,K(B(w)("用户头像链接")),1)]),y("div",Ta,[y("span",Ea,K(L(n.chat.show.avatar)?B(w)("无"):n.chat.show.avatar),1),L(n.chat.show.avatar)?he("",!0):(W(),Ae(z,{key:0,icon:["fas","copy"],onClick:C[7]||(C[7]=Q=>N(n.chat.show.avatar))}))]),y("header",null,[y("span",null,K(B(w)("频道 ID")),1)]),y("div",xa,[y("span",null,K(i()),1),ie(z,{icon:["fas","copy"],onClick:C[8]||(C[8]=Q=>N(i()))})])])):he("",!0)]),n.chat.show.type==="group"?(W(),Ae(B(Si),{key:0,class:"chat-info-tab"},{default:kt(()=>[y("div",{name:B(w)("成员")},[y("div",La,[y("label",$a,K(B(w)("搜索成员")),1),y("input",{id:"info-member-search",placeholder:B(w)("搜索 ……"),onInput:C[9]||(C[9]=Q=>m(Q))},null,40,Ra)]),ie(B(ca),{class:"member-scroller",items:d.value.trim()?o.value:n.chat.info.group_members,"item-size":60,"key-field":"user_id"},{default:kt(({item:Q})=>[y("div",Da,[y("img",{alt:"nk",loading:"lazy","data-avatar":"",src:P(Q)||"/img/icons/icon.svg"},null,8,Ba),y("div",null,[y("a",{onClick:J=>_(Q)},K(G(Q)),9,Oa),x(Q)==="owner"?(W(),Ae(z,{key:0,icon:["fas","crown"]})):he("",!0),x(Q)==="admin"?(W(),Ae(z,{key:1,icon:["fas","star"]})):he("",!0)]),y("span",{onClick:J=>$(Q)},K(T(Q)),9,Ua),h(x(Q))?(W(),Ae(z,{key:0,icon:["fas","wrench"],onClick:J=>$(Q)},null,8,["onClick"])):(W(),Ae(z,{key:1,icon:["fas","copy"],onClick:J=>N(T(Q))},null,8,["onClick"]))])]),_:1},8,["items"])],8,Fa)]),_:1})):he("",!0),y("div",{class:mt("ss-card user-config"+(Object.keys(g.value).length>0?" show":""))},[y("div",null,[y("img",{alt:"nk","data-avatar":"",src:g.value.avatar||"/img/icons/icon.svg"},null,8,za),y("div",null,[y("a",null,K(g.value.card!=""?g.value.card:g.value.nickname),1),y("span",null,K(g.value.user_id),1)]),ie(z,{style:{"margin-right":"20px"},icon:["fas","copy"],onClick:C[10]||(C[10]=Q=>N(g.value.user_id))}),ie(z,{icon:["fas","angle-down"],onClick:C[11]||(C[11]=Q=>g.value={})})]),y("div",null,[y("header",null,K(B(w)("成员信息")),1),y("div",Na,[ie(z,{icon:["fas","clipboard-list"]}),y("div",null,[y("label",Ha,K(B(w)("成员昵称")),1),y("span",null,K(B(w)("啊吧啊吧……")),1)]),xe(y("input",{id:"info-member-card","onUpdate:modelValue":C[12]||(C[12]=Q=>R.value.card=Q),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[13]||(C[13]=Q=>v(Q,g.value))},null,544),[[ln,R.value.card]])]),n.chat.info.me_info.role==="owner"?(W(),ee("div",Pa,[ie(z,{icon:["fas","clipboard-list"]}),y("div",null,[y("label",ja,K(B(w)("成员头衔")),1),y("span",null,K(B(w)("猪咪猪咪")),1)]),xe(y("input",{id:"info-member-title","onUpdate:modelValue":C[14]||(C[14]=Q=>R.value.title=Q),style:{width:"50%"},class:"ss-input",type:"text",onChange:C[15]||(C[15]=Q=>F(Q,g.value))},null,544),[[ln,R.value.title]])])):he("",!0),n.chat.info.me_info.role==="owner"&&g.value.role!="owner"||n.chat.info.me_info.role==="admin"&&g.value.role==="member"?(W(),ee(_e,{key:1},[y("header",null,K(B(w)("操作")),1),y("div",qa,[ie(z,{icon:["fas","clipboard-list"]}),y("div",null,[y("label",Va,K(B(w)("禁言成员")),1),y("span",null,K(B(w)("要让小猫咪不许说话几分钟呢?")),1)]),xe(y("input",{id:"info-member-ban-min","onUpdate:modelValue":C[16]||(C[16]=Q=>q.value.banMin=Q),style:{width:"50%"},class:"ss-input",type:"text",onInput:S,onChange:C[17]||(C[17]=Q=>p(Q,g.value))},null,544),[[ln,q.value.banMin]])]),y("button",{class:"ss-button",onClick:C[18]||(C[18]=Q=>M(g.value.nickname,n.chat.show.id,g.value.user_id))},K(B(w)("移出群聊")),1)],64)):he("",!0)])],2)])])):he("",!0)}}}),Qa=Ln(Wa,[["__scopeId","data-v-317c0ff8"]]),Ga=["id"],Ka={key:0,class:"note-recall note-base"},Ja={key:1,class:"note-ban note-base"},Ya={key:1},Xa={key:2,class:"note-recall note-base"},Za=["innerHTML"],es={key:4,class:"note-time note-base"},jt=Ut({name:"NoticeBody",__name:"NoticeBody",props:["data","id"],emits:["reedit"],setup(n){const f=xn.global.t,D=Tn(),r=En(),e=n,t=Mi(),l=ge(e.data);function u(i){return D.loginInfo.uin===i}function w(i){const a=r.chatInfo.info.group_members.filter(o=>o.user_id===i);return a.length===1?a[0].card===""||a[0].card==null?a[0].nickname:a[0].card:i}function L(i){const a=Math.floor(i/86400),o=Math.floor(i%86400/3600),d=Math.floor(i%3600/60),g=i%60;let R="";return a>0&&(R+=`${a} ${f("天")} `),o>0&&(R+=`${o} ${f("小时")} `),d>0&&(R+=`${d} ${f("分钟")} `),g>0&&(R+=`${g} ${f("秒")} `),R}return un(async()=>{var a;let i=null;if(i=await yt.call(void 0,"win:getWindowInfo",!0),l.value.notice_type&&l.value.notice_type.indexOf("recall")>=0)if(r.chatInfo.show.type==="group"){const o=l.value.operator_id;if(r.chatInfo.info.group_members!==void 0){const d=r.chatInfo.info.group_members.filter(g=>g.user_id===Number(o));d.length===1?l.value.name=d[0].card===""||d[0].card==null?d[0].nickname:d[0].card:l.value.name=o}else l.value.name=o}else l.value.name=r.chatInfo.show.name;if(l.value.sub_type==="poke"&&l.value.pokeMe&&l.value==r.messageList[r.messageList.length-1]){let o=document.getElementById("app");yt.isDesktop()&&(o=(a=document.getElementById("notice-"+e.id))==null?void 0:a.getElementsByClassName("space")[0]),wo(o,i)}}),(i,a)=>(W(),ee("div",{id:"notice-"+n.id,class:"note"},[n.data.notice_type&&n.data.notice_type.indexOf("recall")>=0?(W(),ee("div",Ka,[y("a",null,K(l.value.name),1),y("span",null,K(B(f)("撤回了一条消息")),1),a[1]||(a[1]=y("div",null,null,-1)),n.data.originMsg?(W(),ee("a",{key:0,onClick:a[0]||(a[0]=o=>i.$emit("reedit",n.data.originMsg))},K(B(f)("重新编辑")),1)):he("",!0)])):n.data.notice_type=="group_ban"?(W(),ee("div",Ja,[n.data.sub_type==="ban"?(W(),ee(_e,{key:0},[u(n.data.user_id)?(W(),ee(_e,{key:0},[y("span",null,K(B(f)("成员类型_admin")),1),y("a",null," "+K(w(n.data.operator_id))+" ",1),y("span",null,K(B(f)("禁言了你")),1),y("span",null," "+K(L(n.data.duration)),1)],64)):(W(),ee(_e,{key:1},[y("span",null,K(B(f)("管理员禁言了")),1),y("a",null," "+K(w(n.data.user_id))+" ",1),y("span",null,K(L(n.data.duration)),1)],64))],64)):(W(),ee("span",Ya,K(B(f)("管理员解除了 {name} 的禁言",{name:u(n.data.user_id)?B(f)("你"):w(n.data.user_id)})),1))])):n.data.sub_type==="delete"?(W(),ee("div",Xa,[y("span",null,K(B(f)("这条消息迷失在虚空里了")),1),a[2]||(a[2]=y("div",null,null,-1))])):n.data.sub_type==="poke"?(W(),ee("div",{key:3,class:"note-notify note-base",innerHTML:n.data.str+"<div class='space'</div>"},null,8,Za)):n.data.sub_type==="time"&&n.data.time!=null?(W(),ee("div",es,[y("a",null,K(Intl.DateTimeFormat(B(t),B(Ai)(new Date(n.data.time*1e3))).format(new Date(n.data.time*1e3))),1)])):he("",!0)],8,Ga))}}),ts=["src","alt"],ns=Ut({__name:"CustomFaceTooltip",props:{url:{}},setup(n){return(f,D)=>(W(),ee("img",{src:n.url,alt:f.$t("预览图片加载失败"),class:"custom-face-tooltip"},null,8,ts))}}),is=Ln(ns,[["__scopeId","data-v-28512f0d"]]),os={class:"ss-card face-pan"},as={icon:"fa-solid fa-face-laugh-squint"},ss={class:"system-face-bar"},rs={class:"title"},ls={class:"face"},us={class:"title"},cs={class:"face"},fs={icon:"fa-solid fa-heart"},ds={class:"title"},hs={class:"face"},ms=["src","alt","onClick"],gs={class:"title"},vs={class:"face"},ps={key:0,class:"ss-card"},ys=["src","alt","onClick"],ws={key:0,icon:"fa-solid fa-folder-open"},bs={class:"system-face-bar custom-face-bar"},ks={class:"title"},_s={class:"face"},Is=["src","alt","onClick"],Ss={class:"title"},Cs={class:"face"},Ms={key:0,class:"ss-card"},As={key:1,class:"ss-card"},Ts=["src","alt","onClick"],Es=Ut({__name:"FacePan",emits:["addSpecialMsg","sendMsg"],setup(n,{emit:f}){const{recordList:D,showList:r}=p("recent-emojis-id"),{recordList:e,showList:t}=p("recent-custom-faces-id"),{recordList:l,showList:u}=p("recent-local-faces-id"),w=zt(()=>{const I=[];for(const S of u.value){const A=g.value.find(_=>_.path===S);A&&I.push(A)}return I}),L=new dt,i=bo(),a=Kn(),o=Tn(),d=hi(1),g=hi([]),R=f;i.stickerCache&&i.stickerCache.length==0&&o.jsonMap.roaming_stamp&&G(),yt.isDesktop()&&a.sysConfig.local_emoji_folder&&M();function k(I,S){R("addSpecialMsg",{addText:S,msgObj:I})}function T(I){v(D,I),I<5e3?k({type:"face",id:I},!0):k({type:"text",text:sn.get(I).value},!0)}function G(){i.stickerCache=void 0,o.jsonMap.roaming_stamp.pagerType=="full"?it.send(o.jsonMap.roaming_stamp.name,{count:48},"getRoamingStamp_48"):it.send(o.jsonMap.roaming_stamp.name,{},"getRoamingStamp")}function P(I){const S=I.target;if(S.scrollHeight-S.scrollTop<S.clientHeight+.5&&i.stickerCache&&o.jsonMap.roaming_stamp.pagerType=="full"&&i.stickerCache[i.stickerCache.length-1]!="end"){const A=48+48*d.value;it.send(o.jsonMap.roaming_stamp.name,{count:A},"getRoamingStamp_"+A),d.value++}}function x(I){v(e,I),k({type:"image",file:I,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}async function q(){const{$t:I}=Yt.config.globalProperties;try{const S=await yt.call(void 0,"sys:selectFolder",!0);S&&(Ei.save("local_emoji_folder",S),L.add(De.INFO,I("已设置本地表情文件夹")),M())}catch{L.add(De.ERR,I("选择文件夹失败"))}}async function M(){try{const I=a.sysConfig.local_emoji_folder;if(!I){g.value=[];return}const S=await yt.call(void 0,"sys:getLocalEmojis",!0,I);if(S&&Array.isArray(S))if(yt.type==="tauri"){const{convertFileSrc:A}=await Ti(async()=>{const{convertFileSrc:_}=await import("./core-DhEqZVGG.js");return{convertFileSrc:_}},[],import.meta.url);g.value=S.map(_=>({name:_.name,path:_.path,url:A(_.path)}))}else g.value=S.map(A=>({name:A.name,path:A.path,url:A.url}));else g.value=[]}catch{g.value=[]}}async function N(I){try{const S=await yt.call(void 0,"sys:readFileAsBase64",!0,I.path);v(l,I.path),k({type:"image",file:"base64://"+S,subType:1},!0),a.sysConfig.send_face==!0&&R("sendMsg")}catch{const{$t:A}=Yt.config.globalProperties;L.add(De.ERR,A("添加本地表情失败"))}}function p(I){const S=ko(I,[]),A=zt(()=>{if(a.sysConfig.record_recent_emoji==="none")return[];if(a.sysConfig.record_recent_emoji==="order")return S.value.slice(0,30);{const _=new Map;for(const $ of S.value)_.set($,(_.get($)||0)+1);return Array.from(_.entries()).sort(($,m)=>m[1]-$[1]).map($=>$[0]).slice(0,30)}});return{recordList:S,showList:A}}function v(I,S){if(a.sysConfig.record_recent_emoji==="none")return;let A;switch(a.sysConfig.record_recent_emoji){case"order":A=30;break;case"100times":A=100;break;case"500times":A=500;break;default:throw new Error("Invalid recent emoji record setting")}const _=I.value;if(a.sysConfig.record_recent_emoji==="order"){const $=_.indexOf(S);$!==-1&&_.splice($,1)}_.unshift(S),_.length>A&&_.pop(),I.value=_}function F(I){return{comp:is,model:void 0,props:{url:I}}}return(I,S)=>{const A=Fn("font-awesome-icon");return W(),ee("div",os,[ie(B(Si),null,{default:kt(()=>[y("div",as,[y("div",ss,[B(r).length>0?(W(),ee(_e,{key:0},[y("div",rs,[y("span",null,K(I.$t("最近使用")),1)]),y("div",ls,[(W(!0),ee(_e,null,gt(B(r),_=>(W(),ee("div",{key:_},[ie(Wn,{emoji:B(sn).get(_),onClick:$=>T(_)},null,8,["emoji","onClick"])]))),128))])],64)):he("",!0),y("div",us,[y("span",null,K(I.$t("emoji 表情")),1)]),y("div",cs,[(W(!0),ee(_e,null,gt(B(sn).emojiList,_=>(W(),ee("div",{key:_},[ie(Wn,{emoji:B(sn).get(_),onClick:$=>T(_)},null,8,["emoji","onClick"])]))),128))])])]),y("div",fs,[y("div",{class:"system-face-bar custom-face-bar",onScroll:P},[B(t).length>0?(W(),ee(_e,{key:0},[y("div",ds,[y("span",null,K(I.$t("最近使用")),1)]),y("div",hs,[(W(!0),ee(_e,null,gt(B(t),(_,$)=>xe((W(),ee("span",{key:$},[y("img",{loading:"lazy",src:_,alt:"["+I.$t("动画表情")+"]",onClick:m=>x(_)},null,8,ms)])),[[B(mn),F(_)]])),128))])],64)):he("",!0),y("div",gs,[y("span",null,K(I.$t("收藏的表情")),1),ie(A,{icon:["fas","fa-rotate-right"],onClick:G})]),y("div",vs,[B(i).stickerCache&&B(i).stickerCache.length<=0?(W(),ee("div",ps,[ie(A,{icon:["fas","face-dizzy"]}),y("span",null,K(I.$t("一无所有")),1)])):B(i).stickerCache&&B(i).stickerCache.length>0?(W(!0),ee(_e,{key:1},gt(B(i).stickerCache,(_,$)=>(W(),ee("span",{key:"stickers-"+$},[xe(y("img",{loading:"lazy",src:_,alt:"["+I.$t("动画表情")+"]",onClick:m=>x(_)},null,8,ys),[[nt,_!="end"],[B(mn),F(_)]])]))),128)):he("",!0)])],32)]),B(yt).isDesktop()?(W(),ee("div",ws,[y("div",bs,[w.value.length>0?(W(),ee(_e,{key:0},[y("div",ks,[y("span",null,K(I.$t("最近使用")),1)]),y("div",_s,[(W(!0),ee(_e,null,gt(w.value,(_,$)=>(W(),ee("span",{key:$},[xe(y("img",{loading:"lazy",src:_.url,alt:"["+I.$t("动画表情")+"]",onClick:m=>N(_)},null,8,Is),[[B(mn),F(_.url)]])]))),128))])],64)):he("",!0),y("div",Ss,[y("span",null,K(I.$t("本地表情")),1),ie(A,{icon:["fas","fa-folder-plus"],title:I.$t("选择文件夹"),onClick:q},null,8,["title"]),B(a).sysConfig.local_emoji_folder?(W(),Ae(A,{key:0,icon:["fas","fa-rotate-right"],title:I.$t("重新加载"),onClick:M},null,8,["title"])):he("",!0)]),y("div",Cs,[B(a).sysConfig.local_emoji_folder?B(a).sysConfig.local_emoji_folder&&g.value.length<=0?(W(),ee("div",As,[ie(A,{icon:["fas","face-dizzy"]}),y("span",null,K(I.$t("暂无图片")),1)])):B(a).sysConfig.local_emoji_folder&&g.value.length>0?(W(!0),ee(_e,{key:2},gt(g.value,(_,$)=>(W(),ee("span",{key:$},[xe(y("img",{loading:"lazy",src:_.url,alt:"["+I.$t("动画表情")+"]",onClick:m=>N(_)},null,8,Ts),[[B(mn),F(_.url)]])]))),128)):he("",!0):(W(),ee("div",Ms,[ie(A,{icon:["fas","folder-open"]}),y("span",null,K(I.$t("选择文件夹")),1)]))])])])):he("",!0)]),_:1})])}}}),xs={class:"ss-card"},Fs={key:0},Ls=Ut({name:"MergePan",__name:"MergePan",setup(n,{expose:f}){const D=xn.global.t,r=En(),e=Kn(),t=r.mergeMsgStack,l=ge(),u=zt(()=>{var a;return Vn.fromList((((a=l.value)==null?void 0:a.imageList)??[]).map(o=>o.img_url))});function w(){t.length--}function L(){t.length=0}function i(){return t.length>0}return f({closeMergeMsg:L,isMergeOpen:i}),un(()=>{_t(()=>r.mergeMsgStack.length,()=>{t.length===0?r.mergeMessageImgList=void 0:l.value=t.at(-1)}),_t(()=>{var a;return(a=l.value)==null?void 0:a.imageList},()=>{var a;r.mergeMsgStack.length===0||((a=l.value)==null?void 0:a.imageList)===void 0||(r.mergeMessageImgList=l.value.imageList)})}),(a,o)=>{const d=Fn("font-awesome-icon");return W(),ee("div",{class:mt("merge-pan"+(B(r).mergeMsgStack.length>0?" show":""))},[y("div",{onClick:L}),y("div",xs,[y("div",null,[ie(d,{style:{"margin-top":"5px"},icon:["fas","message"]}),y("span",null,K(B(D)("合并消息")),1),B(t).length<=1?(W(),Ae(d,{key:0,icon:["fas","xmark"],onClick:w})):(W(),Ae(d,{key:1,icon:["fas","angles-left"],onClick:w}))]),l.value===void 0?(W(),ee("div",Fs)):(W(),Ae(qn,{key:1,name:B(e).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:kt(()=>[(W(!0),ee(_e,null,gt(l.value.messageList,(g,R)=>(W(),ee(_e,{key:"merge-"+l.value.forwardMsg.message[0].id+"-"+R},[B(jn)(l.value.messageList[R-1]?l.value.messageList[R-1].time:void 0,g.time,R==0)?(W(),Ae(jt,{id:B(xi)(),key:"notice-time-"+R,data:{sub_type:"time",time:g.time}},null,8,["id","data"])):B(Fi)(g)?(W(),Ae(jt,{key:"delete-"+g.message_id,data:{sub_type:"delete"}})):he("",!0),ie(rn,{data:g,type:"merge","image-list-header":u.value},null,8,["data","image-list-header"])],64))),128))]),_:1},8,["name"]))])],2)}}}),$s=Ln(Ls,[["__scopeId","data-v-5a030688"]]);function Rs(n,f){return f.forEach((function(D){D&&typeof D!="string"&&!Array.isArray(D)&&Object.keys(D).forEach((function(r){if(r!=="default"&&!(r in n)){var e=Object.getOwnPropertyDescriptor(D,r);Object.defineProperty(n,r,e.get?e:{enumerable:!0,get:function(){return D[r]}})}}))})),Object.freeze(n)}function Di(n,f){return new Promise((function(D,r){let e;return Ds(n).then((function(t){try{return e=t,D(new Blob([f.slice(0,2),e,f.slice(2)],{type:"image/jpeg"}))}catch(l){return r(l)}}),r)}))}const Ds=n=>new Promise(((f,D)=>{const r=new FileReader;r.addEventListener("load",(({target:{result:e}})=>{const t=new DataView(e);let l=0;if(t.getUint16(l)!==65496)return D("not a valid JPEG");for(l+=2;;){const u=t.getUint16(l);if(u===65498)break;const w=t.getUint16(l+2);if(u===65505&&t.getUint32(l+4)===1165519206){const L=l+10;let i;switch(t.getUint16(L)){case 18761:i=!0;break;case 19789:i=!1;break;default:return D("TIFF header contains invalid endian")}if(t.getUint16(L+2,i)!==42)return D("TIFF header contains invalid version");const a=t.getUint32(L+4,i),o=L+a+2+12*t.getUint16(L+a,i);for(let d=L+a+2;d<o;d+=12)if(t.getUint16(d,i)==274){if(t.getUint16(d+2,i)!==3)return D("Orientation data type is invalid");if(t.getUint32(d+4,i)!==1)return D("Orientation data count is invalid");t.setUint16(d+8,1,i);break}return f(e.slice(l,l+2+w))}l+=2+w}return f(new Blob)})),r.readAsArrayBuffer(n)}));var Sn={},Bs={get exports(){return Sn},set exports(n){Sn=n}};(function(n){var f,D,r={};Bs.exports=r,r.parse=function(e,t){for(var l=r.bin.readUshort,u=r.bin.readUint,w=0,L={},i=new Uint8Array(e),a=i.length-4;u(i,a)!=101010256;)a--;w=a,w+=4;var o=l(i,w+=4);l(i,w+=2);var d=u(i,w+=2),g=u(i,w+=4);w+=4,w=g;for(var R=0;R<o;R++){u(i,w),w+=4,w+=4,w+=4,u(i,w+=4),d=u(i,w+=4);var k=u(i,w+=4),T=l(i,w+=4),G=l(i,w+2),P=l(i,w+4);w+=6;var x=u(i,w+=8);w+=4,w+=T+G+P,r._readLocal(i,x,L,d,k,t)}return L},r._readLocal=function(e,t,l,u,w,L){var i=r.bin.readUshort,a=r.bin.readUint;a(e,t),i(e,t+=4),i(e,t+=2);var o=i(e,t+=2);a(e,t+=2),a(e,t+=4),t+=4;var d=i(e,t+=8),g=i(e,t+=2);t+=2;var R=r.bin.readUTF8(e,t,d);if(t+=d,t+=g,L)l[R]={size:w,csize:u};else{var k=new Uint8Array(e.buffer,t);if(o==0)l[R]=new Uint8Array(k.buffer.slice(t,t+u));else{if(o!=8)throw"unknown compression method: "+o;var T=new Uint8Array(w);r.inflateRaw(k,T),l[R]=T}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){t==null&&(t={level:6});var l=0,u=new Uint8Array(50+Math.floor(1.1*e.length));u[l]=120,u[l+1]=156,l+=2,l=r.F.deflateRaw(e,u,l,t.level);var w=r.adler(e,0,e.length);return u[l+0]=w>>>24&255,u[l+1]=w>>>16&255,u[l+2]=w>>>8&255,u[l+3]=w>>>0&255,new Uint8Array(u.buffer,0,l+4)},r.deflateRaw=function(e,t){t==null&&(t={level:6});var l=new Uint8Array(50+Math.floor(1.1*e.length)),u=r.F.deflateRaw(e,l,u,t.level);return new Uint8Array(l.buffer,0,u)},r.encode=function(e,t){t==null&&(t=!1);var l=0,u=r.bin.writeUint,w=r.bin.writeUshort,L={};for(var i in e){var a=!r._noNeed(i)&&!t,o=e[i],d=r.crc.crc(o,0,o.length);L[i]={cpr:a,usize:o.length,crc:d,file:a?r.deflateRaw(o):o}}for(var i in L)l+=L[i].file.length+30+46+2*r.bin.sizeUTF8(i);l+=22;var g=new Uint8Array(l),R=0,k=[];for(var i in L){var T=L[i];k.push(R),R=r._writeHeader(g,R,i,T,0)}var G=0,P=R;for(var i in L)T=L[i],k.push(R),R=r._writeHeader(g,R,i,T,1,k[G++]);var x=R-P;return u(g,R,101010256),R+=4,w(g,R+=4,G),w(g,R+=2,G),u(g,R+=2,x),u(g,R+=4,P),R+=4,R+=2,g.buffer},r._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(t)!=-1},r._writeHeader=function(e,t,l,u,w,L){var i=r.bin.writeUint,a=r.bin.writeUshort,o=u.file;return i(e,t,w==0?67324752:33639248),t+=4,w==1&&(t+=2),a(e,t,20),a(e,t+=2,0),a(e,t+=2,u.cpr?8:0),i(e,t+=2,0),i(e,t+=4,u.crc),i(e,t+=4,o.length),i(e,t+=4,u.usize),a(e,t+=4,r.bin.sizeUTF8(l)),a(e,t+=2,0),t+=2,w==1&&(t+=2,t+=2,i(e,t+=6,L),t+=4),t+=r.bin.writeUTF8(e,t,l),w==0&&(e.set(o,t),t+=o.length),t},r.crc={table:(function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var l=t,u=0;u<8;u++)1&l?l=3988292384^l>>>1:l>>>=1;e[t]=l}return e})(),update:function(e,t,l,u){for(var w=0;w<u;w++)e=r.crc.table[255&(e^t[l+w])]^e>>>8;return e},crc:function(e,t,l){return 4294967295^r.crc.update(4294967295,e,t,l)}},r.adler=function(e,t,l){for(var u=1,w=0,L=t,i=t+l;L<i;){for(var a=Math.min(L+5552,i);L<a;)w+=u+=e[L++];u%=65521,w%=65521}return w<<16|u},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,l){e[t]=255&l,e[t+1]=l>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,l){e[t]=255&l,e[t+1]=l>>8&255,e[t+2]=l>>16&255,e[t+3]=l>>24&255},readASCII:function(e,t,l){for(var u="",w=0;w<l;w++)u+=String.fromCharCode(e[t+w]);return u},writeASCII:function(e,t,l){for(var u=0;u<l.length;u++)e[t+u]=l.charCodeAt(u)},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,l){for(var u,w="",L=0;L<l;L++)w+="%"+r.bin.pad(e[t+L].toString(16));try{u=decodeURIComponent(w)}catch{return r.bin.readASCII(e,t,l)}return u},writeUTF8:function(e,t,l){for(var u=l.length,w=0,L=0;L<u;L++){var i=l.charCodeAt(L);if((4294967168&i)==0)e[t+w]=i,w++;else if((4294965248&i)==0)e[t+w]=192|i>>6,e[t+w+1]=128|i>>0&63,w+=2;else if((4294901760&i)==0)e[t+w]=224|i>>12,e[t+w+1]=128|i>>6&63,e[t+w+2]=128|i>>0&63,w+=3;else{if((4292870144&i)!=0)throw"e";e[t+w]=240|i>>18,e[t+w+1]=128|i>>12&63,e[t+w+2]=128|i>>6&63,e[t+w+3]=128|i>>0&63,w+=4}}return w},sizeUTF8:function(e){for(var t=e.length,l=0,u=0;u<t;u++){var w=e.charCodeAt(u);if((4294967168&w)==0)l++;else if((4294965248&w)==0)l+=2;else if((4294901760&w)==0)l+=3;else{if((4292870144&w)!=0)throw"e";l+=4}}return l}},r.F={},r.F.deflateRaw=function(e,t,l,u){var w=[[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]][u],L=r.F.U,i=r.F._goodIndex;r.F._hash;var a=r.F._putsE,o=0,d=l<<3,g=0,R=e.length;if(u==0){for(;o<R;)a(t,d,o+(I=Math.min(65535,R-o))==R?1:0),d=r.F._copyExact(e,o,I,t,d+8),o+=I;return d>>>3}var k=L.lits,T=L.strt,G=L.prev,P=0,x=0,q=0,M=0,N=0,p=0;for(R>2&&(T[p=r.F._hash(e,0)]=0),o=0;o<R;o++){if(N=p,o+1<R-2){p=r.F._hash(e,o+1);var v=o+1&32767;G[v]=T[p],T[p]=v}if(g<=o){(P>14e3||x>26697)&&R-o>100&&(g<o&&(k[P]=o-g,P+=2,g=o),d=r.F._writeBlock(o==R-1||g==R?1:0,k,P,M,e,q,o-q,t,d),P=x=M=0,q=o);var F=0;o<R-2&&(F=r.F._bestMatch(e,o,G,N,Math.min(w[2],R-o),w[3]));var I=F>>>16,S=65535&F;if(F!=0){S=65535&F;var A=i(I=F>>>16,L.of0);L.lhst[257+A]++;var _=i(S,L.df0);L.dhst[_]++,M+=L.exb[A]+L.dxb[_],k[P]=I<<23|o-g,k[P+1]=S<<16|A<<8|_,P+=2,g=o+I}else L.lhst[e[o]]++;x++}}for(q==o&&e.length!=0||(g<o&&(k[P]=o-g,P+=2,g=o),d=r.F._writeBlock(1,k,P,M,e,q,o-q,t,d),P=0,x=0,P=x=M=0,q=o);(7&d)!=0;)d++;return d>>>3},r.F._bestMatch=function(e,t,l,u,w,L){var i=32767&t,a=l[i],o=i-a+32768&32767;if(a==i||u!=r.F._hash(e,t-o))return 0;for(var d=0,g=0,R=Math.min(32767,t);o<=R&&--L!=0&&a!=i;){if(d==0||e[t+d]==e[t+d-o]){var k=r.F._howLong(e,t,o);if(k>d){if(g=o,(d=k)>=w)break;o+2<k&&(k=o+2);for(var T=0,G=0;G<k-2;G++){var P=t-o+G+32768&32767,x=P-l[P]+32768&32767;x>T&&(T=x,a=P)}}}o+=(i=a)-(a=l[i])+32768&32767}return d<<16|g},r.F._howLong=function(e,t,l){if(e[t]!=e[t-l]||e[t+1]!=e[t+1-l]||e[t+2]!=e[t+2-l])return 0;var u=t,w=Math.min(e.length,t+258);for(t+=3;t<w&&e[t]==e[t-l];)t++;return t-u},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,l,u,w,L,i,a,o){var d,g,R,k,T,G,P,x,q,M=r.F.U,N=r.F._putsF,p=r.F._putsE;M.lhst[256]++,g=(d=r.F.getTrees())[0],R=d[1],k=d[2],T=d[3],G=d[4],P=d[5],x=d[6],q=d[7];var v=32+((o+3&7)==0?0:8-(o+3&7))+(i<<3),F=u+r.F.contSize(M.fltree,M.lhst)+r.F.contSize(M.fdtree,M.dhst),I=u+r.F.contSize(M.ltree,M.lhst)+r.F.contSize(M.dtree,M.dhst);I+=14+3*P+r.F.contSize(M.itree,M.ihst)+(2*M.ihst[16]+3*M.ihst[17]+7*M.ihst[18]);for(var S=0;S<286;S++)M.lhst[S]=0;for(S=0;S<30;S++)M.dhst[S]=0;for(S=0;S<19;S++)M.ihst[S]=0;var A=v<F&&v<I?0:F<I?1:2;if(N(a,o,e),N(a,o+1,A),o+=3,A==0){for(;(7&o)!=0;)o++;o=r.F._copyExact(w,L,i,a,o)}else{var _,$;if(A==1&&(_=M.fltree,$=M.fdtree),A==2){r.F.makeCodes(M.ltree,g),r.F.revCodes(M.ltree,g),r.F.makeCodes(M.dtree,R),r.F.revCodes(M.dtree,R),r.F.makeCodes(M.itree,k),r.F.revCodes(M.itree,k),_=M.ltree,$=M.dtree,p(a,o,T-257),p(a,o+=5,G-1),p(a,o+=5,P-4),o+=4;for(var m=0;m<P;m++)p(a,o+3*m,M.itree[1+(M.ordr[m]<<1)]);o+=3*P,o=r.F._codeTiny(x,M.itree,a,o),o=r.F._codeTiny(q,M.itree,a,o)}for(var h=L,O=0;O<l;O+=2){for(var C=t[O],z=C>>>23,Q=h+(8388607&C);h<Q;)o=r.F._writeLit(w[h++],_,a,o);if(z!=0){var J=t[O+1],ne=J>>16,Y=J>>8&255,j=255&J;p(a,o=r.F._writeLit(257+Y,_,a,o),z-M.of0[Y]),o+=M.exb[Y],N(a,o=r.F._writeLit(j,$,a,o),ne-M.df0[j]),o+=M.dxb[j],h+=z}}o=r.F._writeLit(256,_,a,o)}return o},r.F._copyExact=function(e,t,l,u,w){var L=w>>>3;return u[L]=l,u[L+1]=l>>>8,u[L+2]=255-u[L],u[L+3]=255-u[L+1],L+=4,u.set(new Uint8Array(e.buffer,t,l),L),w+(l+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),l=r.F._hufTree(e.dhst,e.dtree,15),u=[],w=r.F._lenCodes(e.ltree,u),L=[],i=r.F._lenCodes(e.dtree,L),a=0;a<u.length;a+=2)e.ihst[u[a]]++;for(a=0;a<L.length;a+=2)e.ihst[L[a]]++;for(var o=r.F._hufTree(e.ihst,e.itree,7),d=19;d>4&&e.itree[1+(e.ordr[d-1]<<1)]==0;)d--;return[t,l,o,w,i,d,u,L]},r.F.getSecond=function(e){for(var t=[],l=0;l<e.length;l+=2)t.push(e[l+1]);return t},r.F.nonZero=function(e){for(var t="",l=0;l<e.length;l+=2)e[l+1]!=0&&(t+=(l>>1)+",");return t},r.F.contSize=function(e,t){for(var l=0,u=0;u<t.length;u++)l+=t[u]*e[1+(u<<1)];return l},r.F._codeTiny=function(e,t,l,u){for(var w=0;w<e.length;w+=2){var L=e[w],i=e[w+1];u=r.F._writeLit(L,t,l,u);var a=L==16?2:L==17?3:7;L>15&&(r.F._putsE(l,u,i,a),u+=a)}return u},r.F._lenCodes=function(e,t){for(var l=e.length;l!=2&&e[l-1]==0;)l-=2;for(var u=0;u<l;u+=2){var w=e[u+1],L=u+3<l?e[u+3]:-1,i=u+5<l?e[u+5]:-1,a=u==0?-1:e[u-1];if(w==0&&L==w&&i==w){for(var o=u+5;o+2<l&&e[o+2]==w;)o+=2;(d=Math.min(o+1-u>>>1,138))<11?t.push(17,d-3):t.push(18,d-11),u+=2*d-2}else if(w==a&&L==w&&i==w){for(o=u+5;o+2<l&&e[o+2]==w;)o+=2;var d=Math.min(o+1-u>>>1,6);t.push(16,d-3),u+=2*d-2}else t.push(w,0)}return l>>>1},r.F._hufTree=function(e,t,l){var u=[],w=e.length,L=t.length,i=0;for(i=0;i<L;i+=2)t[i]=0,t[i+1]=0;for(i=0;i<w;i++)e[i]!=0&&u.push({lit:i,f:e[i]});var a=u.length,o=u.slice(0);if(a==0)return 0;if(a==1){var d=u[0].lit;return o=d==0?1:0,t[1+(d<<1)]=1,t[1+(o<<1)]=1,1}u.sort((function(x,q){return x.f-q.f}));var g=u[0],R=u[1],k=0,T=1,G=2;for(u[0]={lit:-1,f:g.f+R.f,l:g,r:R,d:0};T!=a-1;)g=k!=T&&(G==a||u[k].f<u[G].f)?u[k++]:u[G++],R=k!=T&&(G==a||u[k].f<u[G].f)?u[k++]:u[G++],u[T++]={lit:-1,f:g.f+R.f,l:g,r:R};var P=r.F.setDepth(u[T-1],0);for(P>l&&(r.F.restrictDepth(o,l,P),P=l),i=0;i<a;i++)t[1+(o[i].lit<<1)]=o[i].d;return P},r.F.setDepth=function(e,t){return e.lit!=-1?(e.d=t,t):Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1))},r.F.restrictDepth=function(e,t,l){var u=0,w=1<<l-t,L=0;for(e.sort((function(a,o){return o.d==a.d?a.f-o.f:o.d-a.d})),u=0;u<e.length&&e[u].d>t;u++){var i=e[u].d;e[u].d=t,L+=w-(1<<l-i)}for(L>>>=l-t;L>0;)(i=e[u].d)<t?(e[u].d++,L-=1<<t-i-1):u++;for(;u>=0;u--)e[u].d==t&&L<0&&(e[u].d--,L++);L!=0&&console.log("debt left")},r.F._goodIndex=function(e,t){var l=0;return t[16|l]<=e&&(l|=16),t[8|l]<=e&&(l|=8),t[4|l]<=e&&(l|=4),t[2|l]<=e&&(l|=2),t[1|l]<=e&&(l|=1),l},r.F._writeLit=function(e,t,l,u){return r.F._putsF(l,u,t[e<<1]),u+t[1+(e<<1)]},r.F.inflate=function(e,t){var l=Uint8Array;if(e[0]==3&&e[1]==0)return t||new l(0);var u=r.F,w=u._bitsF,L=u._bitsE,i=u._decodeTiny,a=u.makeCodes,o=u.codes2map,d=u._get17,g=u.U,R=t==null;R&&(t=new l(e.length>>>2<<3));for(var k,T,G=0,P=0,x=0,q=0,M=0,N=0,p=0,v=0,F=0;G==0;)if(G=w(e,F,1),P=w(e,F+1,2),F+=3,P!=0){if(R&&(t=r.F._check(t,v+(1<<17))),P==1&&(k=g.flmap,T=g.fdmap,N=511,p=31),P==2){x=L(e,F,5)+257,q=L(e,F+5,5)+1,M=L(e,F+10,4)+4,F+=14;for(var I=0;I<38;I+=2)g.itree[I]=0,g.itree[I+1]=0;var S=1;for(I=0;I<M;I++){var A=L(e,F+3*I,3);g.itree[1+(g.ordr[I]<<1)]=A,A>S&&(S=A)}F+=3*M,a(g.itree,S),o(g.itree,S,g.imap),k=g.lmap,T=g.dmap,F=i(g.imap,(1<<S)-1,x+q,e,F,g.ttree);var _=u._copyOut(g.ttree,0,x,g.ltree);N=(1<<_)-1;var $=u._copyOut(g.ttree,x,q,g.dtree);p=(1<<$)-1,a(g.ltree,_),o(g.ltree,_,k),a(g.dtree,$),o(g.dtree,$,T)}for(;;){var m=k[d(e,F)&N];F+=15&m;var h=m>>>4;if(!(h>>>8))t[v++]=h;else{if(h==256)break;var O=v+h-254;if(h>264){var C=g.ldef[h-257];O=v+(C>>>3)+L(e,F,7&C),F+=7&C}var z=T[d(e,F)&p];F+=15&z;var Q=z>>>4,J=g.ddef[Q],ne=(J>>>4)+w(e,F,15&J);for(F+=15&J,R&&(t=r.F._check(t,v+(1<<17)));v<O;)t[v]=t[v++-ne],t[v]=t[v++-ne],t[v]=t[v++-ne],t[v]=t[v++-ne];v=O}}}else{(7&F)!=0&&(F+=8-(7&F));var Y=4+(F>>>3),j=e[Y-4]|e[Y-3]<<8;R&&(t=r.F._check(t,v+j)),t.set(new l(e.buffer,e.byteOffset+Y,j),v),F=Y+j<<3,v+=j}return t.length==v?t:t.slice(0,v)},r.F._check=function(e,t){var l=e.length;if(t<=l)return e;var u=new Uint8Array(Math.max(l<<1,t));return u.set(e,0),u},r.F._decodeTiny=function(e,t,l,u,w,L){for(var i=r.F._bitsE,a=r.F._get17,o=0;o<l;){var d=e[a(u,w)&t];w+=15&d;var g=d>>>4;if(g<=15)L[o]=g,o++;else{var R=0,k=0;g==16?(k=3+i(u,w,2),w+=2,R=L[o-1]):g==17?(k=3+i(u,w,3),w+=3):g==18&&(k=11+i(u,w,7),w+=7);for(var T=o+k;o<T;)L[o]=R,o++}}return w},r.F._copyOut=function(e,t,l,u){for(var w=0,L=0,i=u.length>>>1;L<l;){var a=e[L+t];u[L<<1]=0,u[1+(L<<1)]=a,a>w&&(w=a),L++}for(;L<i;)u[L<<1]=0,u[1+(L<<1)]=0,L++;return w},r.F.makeCodes=function(e,t){for(var l,u,w,L,i=r.F.U,a=e.length,o=i.bl_count,d=0;d<=t;d++)o[d]=0;for(d=1;d<a;d+=2)o[e[d]]++;var g=i.next_code;for(l=0,o[0]=0,u=1;u<=t;u++)l=l+o[u-1]<<1,g[u]=l;for(w=0;w<a;w+=2)(L=e[w+1])!=0&&(e[w]=g[L],g[L]++)},r.F.codes2map=function(e,t,l){for(var u=e.length,w=r.F.U.rev15,L=0;L<u;L+=2)if(e[L+1]!=0)for(var i=L>>1,a=e[L+1],o=i<<4|a,d=t-a,g=e[L]<<d,R=g+(1<<d);g!=R;)l[w[g]>>>15-t]=o,g++},r.F.revCodes=function(e,t){for(var l=r.F.U.rev15,u=15-t,w=0;w<e.length;w+=2){var L=e[w]<<t-e[w+1];e[w]=l[L]>>>u}},r.F._putsE=function(e,t,l){l<<=7&t;var u=t>>>3;e[u]|=l,e[u+1]|=l>>>8},r.F._putsF=function(e,t,l){l<<=7&t;var u=t>>>3;e[u]|=l,e[u+1]|=l>>>8,e[u+2]|=l>>>16},r.F._bitsE=function(e,t,l){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<l)-1},r.F._bitsF=function(e,t,l){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<l)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.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=r.F.U,t=0;t<32768;t++){var l=t;l=(4278255360&(l=(4042322160&(l=(3435973836&(l=(2863311530&l)>>>1|(1431655765&l)<<1))>>>2|(858993459&l)<<2))>>>4|(252645135&l)<<4))>>>8|(16711935&l)<<8,e.rev15[t]=(l>>>16|l<<16)>>>17}function u(w,L,i){for(;L--!=0;)w.push(0,i)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];u(e.fltree,144,8),u(e.fltree,112,9),u(e.fltree,24,7),u(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),u(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),u(e.itree,19,0),u(e.ltree,286,0),u(e.dtree,30,0),u(e.ttree,320,0)})()})();var Os=Rs({__proto__:null,default:Sn},[Sn]);const Et=(function(){var n={nextZero(i,a){for(;i[a]!=0;)a++;return a},readUshort:(i,a)=>i[a]<<8|i[a+1],writeUshort(i,a,o){i[a]=o>>8&255,i[a+1]=255&o},readUint:(i,a)=>16777216*i[a]+(i[a+1]<<16|i[a+2]<<8|i[a+3]),writeUint(i,a,o){i[a]=o>>24&255,i[a+1]=o>>16&255,i[a+2]=o>>8&255,i[a+3]=255&o},readASCII(i,a,o){let d="";for(let g=0;g<o;g++)d+=String.fromCharCode(i[a+g]);return d},writeASCII(i,a,o){for(let d=0;d<o.length;d++)i[a+d]=o.charCodeAt(d)},readBytes(i,a,o){const d=[];for(let g=0;g<o;g++)d.push(i[a+g]);return d},pad:i=>i.length<2?`0${i}`:i,readUTF8(i,a,o){let d,g="";for(let R=0;R<o;R++)g+=`%${n.pad(i[a+R].toString(16))}`;try{d=decodeURIComponent(g)}catch{return n.readASCII(i,a,o)}return d}};function f(i,a,o,d){const g=a*o,R=t(d),k=Math.ceil(a*R/8),T=new Uint8Array(4*g),G=new Uint32Array(T.buffer),{ctype:P}=d,{depth:x}=d,q=n.readUshort;if(P==6){const C=g<<2;if(x==8)for(var M=0;M<C;M+=4)T[M]=i[M],T[M+1]=i[M+1],T[M+2]=i[M+2],T[M+3]=i[M+3];if(x==16)for(M=0;M<C;M++)T[M]=i[M<<1]}else if(P==2){const C=d.tabs.tRNS;if(C==null){if(x==8)for(M=0;M<g;M++){var N=3*M;G[M]=255<<24|i[N+2]<<16|i[N+1]<<8|i[N]}if(x==16)for(M=0;M<g;M++)N=6*M,G[M]=255<<24|i[N+4]<<16|i[N+2]<<8|i[N]}else{var p=C[0];const z=C[1],Q=C[2];if(x==8)for(M=0;M<g;M++){var v=M<<2;N=3*M,G[M]=255<<24|i[N+2]<<16|i[N+1]<<8|i[N],i[N]==p&&i[N+1]==z&&i[N+2]==Q&&(T[v+3]=0)}if(x==16)for(M=0;M<g;M++)v=M<<2,N=6*M,G[M]=255<<24|i[N+4]<<16|i[N+2]<<8|i[N],q(i,N)==p&&q(i,N+2)==z&&q(i,N+4)==Q&&(T[v+3]=0)}}else if(P==3){const C=d.tabs.PLTE,z=d.tabs.tRNS,Q=z?z.length:0;if(x==1)for(var F=0;F<o;F++){var I=F*k,S=F*a;for(M=0;M<a;M++){v=S+M<<2;var A=3*(_=i[I+(M>>3)]>>7-((7&M)<<0)&1);T[v]=C[A],T[v+1]=C[A+1],T[v+2]=C[A+2],T[v+3]=_<Q?z[_]:255}}if(x==2)for(F=0;F<o;F++)for(I=F*k,S=F*a,M=0;M<a;M++)v=S+M<<2,A=3*(_=i[I+(M>>2)]>>6-((3&M)<<1)&3),T[v]=C[A],T[v+1]=C[A+1],T[v+2]=C[A+2],T[v+3]=_<Q?z[_]:255;if(x==4)for(F=0;F<o;F++)for(I=F*k,S=F*a,M=0;M<a;M++)v=S+M<<2,A=3*(_=i[I+(M>>1)]>>4-((1&M)<<2)&15),T[v]=C[A],T[v+1]=C[A+1],T[v+2]=C[A+2],T[v+3]=_<Q?z[_]:255;if(x==8)for(M=0;M<g;M++){var _;v=M<<2,A=3*(_=i[M]),T[v]=C[A],T[v+1]=C[A+1],T[v+2]=C[A+2],T[v+3]=_<Q?z[_]:255}}else if(P==4){if(x==8)for(M=0;M<g;M++){v=M<<2;var $=i[m=M<<1];T[v]=$,T[v+1]=$,T[v+2]=$,T[v+3]=i[m+1]}if(x==16)for(M=0;M<g;M++){var m;v=M<<2,$=i[m=M<<2],T[v]=$,T[v+1]=$,T[v+2]=$,T[v+3]=i[m+2]}}else if(P==0)for(p=d.tabs.tRNS?d.tabs.tRNS:-1,F=0;F<o;F++){const C=F*k,z=F*a;if(x==1)for(var h=0;h<a;h++){var O=($=255*(i[C+(h>>>3)]>>>7-(7&h)&1))==255*p?0:255;G[z+h]=O<<24|$<<16|$<<8|$}else if(x==2)for(h=0;h<a;h++)O=($=85*(i[C+(h>>>2)]>>>6-((3&h)<<1)&3))==85*p?0:255,G[z+h]=O<<24|$<<16|$<<8|$;else if(x==4)for(h=0;h<a;h++)O=($=17*(i[C+(h>>>1)]>>>4-((1&h)<<2)&15))==17*p?0:255,G[z+h]=O<<24|$<<16|$<<8|$;else if(x==8)for(h=0;h<a;h++)O=($=i[C+h])==p?0:255,G[z+h]=O<<24|$<<16|$<<8|$;else if(x==16)for(h=0;h<a;h++)$=i[C+(h<<1)],O=q(i,C+(h<<1))==p?0:255,G[z+h]=O<<24|$<<16|$<<8|$}return T}function D(i,a,o,d){const g=t(i),R=Math.ceil(o*g/8),k=new Uint8Array((R+1+i.interlace)*d);return a=i.tabs.CgBI?e(a,k):r(a,k),i.interlace==0?a=l(a,i,0,o,d):i.interlace==1&&(a=(function(G,P){const x=P.width,q=P.height,M=t(P),N=M>>3,p=Math.ceil(x*M/8),v=new Uint8Array(q*p);let F=0;const I=[0,0,4,0,2,0,1],S=[0,4,0,2,0,1,0],A=[8,8,8,4,4,2,2],_=[8,8,4,4,2,2,1];let $=0;for(;$<7;){const h=A[$],O=_[$];let C=0,z=0,Q=I[$];for(;Q<q;)Q+=h,z++;let J=S[$];for(;J<x;)J+=O,C++;const ne=Math.ceil(C*M/8);l(G,P,F,C,z);let Y=0,j=I[$];for(;j<q;){let re=S[$],$e=F+Y*ne<<3;for(;re<x;){var m;if(M==1&&(m=(m=G[$e>>3])>>7-(7&$e)&1,v[j*p+(re>>3)]|=m<<7-((7&re)<<0)),M==2&&(m=(m=G[$e>>3])>>6-(7&$e)&3,v[j*p+(re>>2)]|=m<<6-((3&re)<<1)),M==4&&(m=(m=G[$e>>3])>>4-(7&$e)&15,v[j*p+(re>>1)]|=m<<4-((1&re)<<2)),M>=8){const Te=j*p+re*N;for(let pe=0;pe<N;pe++)v[Te+pe]=G[($e>>3)+pe]}$e+=M,re+=O}Y++,j+=h}C*z!=0&&(F+=z*(1+ne)),$+=1}return v})(a,i)),a}function r(i,a){return e(new Uint8Array(i.buffer,2,i.length-6),a)}var e=(function(){const i={H:{}};return i.H.N=function(a,o){const d=Uint8Array;let g,R,k=0,T=0,G=0,P=0,x=0,q=0,M=0,N=0,p=0;if(a[0]==3&&a[1]==0)return o||new d(0);const v=i.H,F=v.b,I=v.e,S=v.R,A=v.n,_=v.A,$=v.Z,m=v.m,h=o==null;for(h&&(o=new d(a.length>>>2<<5));k==0;)if(k=F(a,p,1),T=F(a,p+1,2),p+=3,T!=0){if(h&&(o=i.H.W(o,N+(1<<17))),T==1&&(g=m.J,R=m.h,q=511,M=31),T==2){G=I(a,p,5)+257,P=I(a,p+5,5)+1,x=I(a,p+10,4)+4,p+=14;let C=1;for(var O=0;O<38;O+=2)m.Q[O]=0,m.Q[O+1]=0;for(O=0;O<x;O++){const J=I(a,p+3*O,3);m.Q[1+(m.X[O]<<1)]=J,J>C&&(C=J)}p+=3*x,A(m.Q,C),_(m.Q,C,m.u),g=m.w,R=m.d,p=S(m.u,(1<<C)-1,G+P,a,p,m.v);const z=v.V(m.v,0,G,m.C);q=(1<<z)-1;const Q=v.V(m.v,G,P,m.D);M=(1<<Q)-1,A(m.C,z),_(m.C,z,g),A(m.D,Q),_(m.D,Q,R)}for(;;){const C=g[$(a,p)&q];p+=15&C;const z=C>>>4;if(!(z>>>8))o[N++]=z;else{if(z==256)break;{let Q=N+z-254;if(z>264){const re=m.q[z-257];Q=N+(re>>>3)+I(a,p,7&re),p+=7&re}const J=R[$(a,p)&M];p+=15&J;const ne=J>>>4,Y=m.c[ne],j=(Y>>>4)+F(a,p,15&Y);for(p+=15&Y;N<Q;)o[N]=o[N++-j],o[N]=o[N++-j],o[N]=o[N++-j],o[N]=o[N++-j];N=Q}}}}else{(7&p)!=0&&(p+=8-(7&p));const C=4+(p>>>3),z=a[C-4]|a[C-3]<<8;h&&(o=i.H.W(o,N+z)),o.set(new d(a.buffer,a.byteOffset+C,z),N),p=C+z<<3,N+=z}return o.length==N?o:o.slice(0,N)},i.H.W=function(a,o){const d=a.length;if(o<=d)return a;const g=new Uint8Array(d<<1);return g.set(a,0),g},i.H.R=function(a,o,d,g,R,k){const T=i.H.e,G=i.H.Z;let P=0;for(;P<d;){const x=a[G(g,R)&o];R+=15&x;const q=x>>>4;if(q<=15)k[P]=q,P++;else{let M=0,N=0;q==16?(N=3+T(g,R,2),R+=2,M=k[P-1]):q==17?(N=3+T(g,R,3),R+=3):q==18&&(N=11+T(g,R,7),R+=7);const p=P+N;for(;P<p;)k[P]=M,P++}}return R},i.H.V=function(a,o,d,g){let R=0,k=0;const T=g.length>>>1;for(;k<d;){const G=a[k+o];g[k<<1]=0,g[1+(k<<1)]=G,G>R&&(R=G),k++}for(;k<T;)g[k<<1]=0,g[1+(k<<1)]=0,k++;return R},i.H.n=function(a,o){const d=i.H.m,g=a.length;let R,k,T,G;const P=d.j;for(var x=0;x<=o;x++)P[x]=0;for(x=1;x<g;x+=2)P[a[x]]++;const q=d.K;for(R=0,P[0]=0,k=1;k<=o;k++)R=R+P[k-1]<<1,q[k]=R;for(T=0;T<g;T+=2)G=a[T+1],G!=0&&(a[T]=q[G],q[G]++)},i.H.A=function(a,o,d){const g=a.length,R=i.H.m.r;for(let k=0;k<g;k+=2)if(a[k+1]!=0){const T=k>>1,G=a[k+1],P=T<<4|G,x=o-G;let q=a[k]<<x;const M=q+(1<<x);for(;q!=M;)d[R[q]>>>15-o]=P,q++}},i.H.l=function(a,o){const d=i.H.m.r,g=15-o;for(let R=0;R<a.length;R+=2){const k=a[R]<<o-a[R+1];a[R]=d[k]>>>g}},i.H.M=function(a,o,d){d<<=7&o;const g=o>>>3;a[g]|=d,a[g+1]|=d>>>8},i.H.I=function(a,o,d){d<<=7&o;const g=o>>>3;a[g]|=d,a[g+1]|=d>>>8,a[g+2]|=d>>>16},i.H.e=function(a,o,d){return(a[o>>>3]|a[1+(o>>>3)]<<8)>>>(7&o)&(1<<d)-1},i.H.b=function(a,o,d){return(a[o>>>3]|a[1+(o>>>3)]<<8|a[2+(o>>>3)]<<16)>>>(7&o)&(1<<d)-1},i.H.Z=function(a,o){return(a[o>>>3]|a[1+(o>>>3)]<<8|a[2+(o>>>3)]<<16)>>>(7&o)},i.H.i=function(a,o){return(a[o>>>3]|a[1+(o>>>3)]<<8|a[2+(o>>>3)]<<16|a[3+(o>>>3)]<<24)>>>(7&o)},i.H.m=(function(){const a=Uint16Array,o=Uint32Array;return{K:new a(16),j:new a(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 a(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 o(32),J:new a(512),_:[],h:new a(32),$:[],w:new a(32768),C:[],v:[],d:new a(32768),D:[],u:new a(512),Q:[],r:new a(32768),s:new o(286),Y:new o(30),a:new o(19),t:new o(15e3),k:new a(65536),g:new a(32768)}})(),(function(){const a=i.H.m;for(var o=0;o<32768;o++){let g=o;g=(2863311530&g)>>>1|(1431655765&g)<<1,g=(3435973836&g)>>>2|(858993459&g)<<2,g=(4042322160&g)>>>4|(252645135&g)<<4,g=(4278255360&g)>>>8|(16711935&g)<<8,a.r[o]=(g>>>16|g<<16)>>>17}function d(g,R,k){for(;R--!=0;)g.push(0,k)}for(o=0;o<32;o++)a.q[o]=a.S[o]<<3|a.T[o],a.c[o]=a.p[o]<<4|a.z[o];d(a._,144,8),d(a._,112,9),d(a._,24,7),d(a._,8,8),i.H.n(a._,9),i.H.A(a._,9,a.J),i.H.l(a._,9),d(a.$,32,5),i.H.n(a.$,5),i.H.A(a.$,5,a.h),i.H.l(a.$,5),d(a.Q,19,0),d(a.C,286,0),d(a.D,30,0),d(a.v,320,0)})(),i.H.N})();function t(i){return[1,null,3,1,2,null,4][i.ctype]*i.depth}function l(i,a,o,d,g){let R=t(a);const k=Math.ceil(d*R/8);let T,G;R=Math.ceil(R/8);let P=i[o],x=0;if(P>1&&(i[o]=[0,0,1][P-2]),P==3)for(x=R;x<k;x++)i[x+1]=i[x+1]+(i[x+1-R]>>>1)&255;for(let q=0;q<g;q++)if(T=o+q*k,G=T+q+1,P=i[G-1],x=0,P==0)for(;x<k;x++)i[T+x]=i[G+x];else if(P==1){for(;x<R;x++)i[T+x]=i[G+x];for(;x<k;x++)i[T+x]=i[G+x]+i[T+x-R]}else if(P==2)for(;x<k;x++)i[T+x]=i[G+x]+i[T+x-k];else if(P==3){for(;x<R;x++)i[T+x]=i[G+x]+(i[T+x-k]>>>1);for(;x<k;x++)i[T+x]=i[G+x]+(i[T+x-k]+i[T+x-R]>>>1)}else{for(;x<R;x++)i[T+x]=i[G+x]+u(0,i[T+x-k],0);for(;x<k;x++)i[T+x]=i[G+x]+u(i[T+x-R],i[T+x-k],i[T+x-R-k])}return i}function u(i,a,o){const d=i+a-o,g=d-i,R=d-a,k=d-o;return g*g<=R*R&&g*g<=k*k?i:R*R<=k*k?a:o}function w(i,a,o){o.width=n.readUint(i,a),a+=4,o.height=n.readUint(i,a),a+=4,o.depth=i[a],a++,o.ctype=i[a],a++,o.compress=i[a],a++,o.filter=i[a],a++,o.interlace=i[a],a++}function L(i,a,o,d,g,R,k,T,G){const P=Math.min(a,g),x=Math.min(o,R);let q=0,M=0;for(let $=0;$<x;$++)for(let m=0;m<P;m++)if(k>=0&&T>=0?(q=$*a+m<<2,M=(T+$)*g+k+m<<2):(q=(-T+$)*a-k+m<<2,M=$*g+m<<2),G==0)d[M]=i[q],d[M+1]=i[q+1],d[M+2]=i[q+2],d[M+3]=i[q+3];else if(G==1){var N=i[q+3]*.00392156862745098,p=i[q]*N,v=i[q+1]*N,F=i[q+2]*N,I=d[M+3]*(1/255),S=d[M]*I,A=d[M+1]*I,_=d[M+2]*I;const h=1-N,O=N+I*h,C=O==0?0:1/O;d[M+3]=255*O,d[M+0]=(p+S*h)*C,d[M+1]=(v+A*h)*C,d[M+2]=(F+_*h)*C}else if(G==2)N=i[q+3],p=i[q],v=i[q+1],F=i[q+2],I=d[M+3],S=d[M],A=d[M+1],_=d[M+2],N==I&&p==S&&v==A&&F==_?(d[M]=0,d[M+1]=0,d[M+2]=0,d[M+3]=0):(d[M]=p,d[M+1]=v,d[M+2]=F,d[M+3]=N);else if(G==3){if(N=i[q+3],p=i[q],v=i[q+1],F=i[q+2],I=d[M+3],S=d[M],A=d[M+1],_=d[M+2],N==I&&p==S&&v==A&&F==_)continue;if(N<220&&I>20)return!1}return!0}return{decode:function(a){const o=new Uint8Array(a);let d=8;const g=n,R=g.readUshort,k=g.readUint,T={tabs:{},frames:[]},G=new Uint8Array(o.length);let P,x=0,q=0;const M=[137,80,78,71,13,10,26,10];for(var N=0;N<8;N++)if(o[N]!=M[N])throw"The input is not a PNG file!";for(;d<o.length;){const $=g.readUint(o,d);d+=4;const m=g.readASCII(o,d,4);if(d+=4,m=="IHDR")w(o,d,T);else if(m=="iCCP"){for(var p=d;o[p]!=0;)p++;g.readASCII(o,d,p-d),o[p+1];const h=o.slice(p+2,d+$);let O=null;try{O=r(h)}catch{O=e(h)}T.tabs[m]=O}else if(m=="CgBI")T.tabs[m]=o.slice(d,d+4);else if(m=="IDAT"){for(N=0;N<$;N++)G[x+N]=o[d+N];x+=$}else if(m=="acTL")T.tabs[m]={num_frames:k(o,d),num_plays:k(o,d+4)},P=new Uint8Array(o.length);else if(m=="fcTL"){q!=0&&((_=T.frames[T.frames.length-1]).data=D(T,P.slice(0,q),_.rect.width,_.rect.height),q=0);const h={x:k(o,d+12),y:k(o,d+16),width:k(o,d+4),height:k(o,d+8)};let O=R(o,d+22);O=R(o,d+20)/(O==0?100:O);const C={rect:h,delay:Math.round(1e3*O),dispose:o[d+24],blend:o[d+25]};T.frames.push(C)}else if(m=="fdAT"){for(N=0;N<$-4;N++)P[q+N]=o[d+N+4];q+=$-4}else if(m=="pHYs")T.tabs[m]=[g.readUint(o,d),g.readUint(o,d+4),o[d+8]];else if(m=="cHRM")for(T.tabs[m]=[],N=0;N<8;N++)T.tabs[m].push(g.readUint(o,d+4*N));else if(m=="tEXt"||m=="zTXt"){T.tabs[m]==null&&(T.tabs[m]={});var v=g.nextZero(o,d),F=g.readASCII(o,d,v-d),I=d+$-v-1;if(m=="tEXt")A=g.readASCII(o,v+1,I);else{var S=r(o.slice(v+2,v+2+I));A=g.readUTF8(S,0,S.length)}T.tabs[m][F]=A}else if(m=="iTXt"){T.tabs[m]==null&&(T.tabs[m]={}),v=0,p=d,v=g.nextZero(o,p),F=g.readASCII(o,p,v-p);const h=o[p=v+1];var A;o[p+1],p+=2,v=g.nextZero(o,p),g.readASCII(o,p,v-p),p=v+1,v=g.nextZero(o,p),g.readUTF8(o,p,v-p),I=$-((p=v+1)-d),h==0?A=g.readUTF8(o,p,I):(S=r(o.slice(p,p+I)),A=g.readUTF8(S,0,S.length)),T.tabs[m][F]=A}else if(m=="PLTE")T.tabs[m]=g.readBytes(o,d,$);else if(m=="hIST"){const h=T.tabs.PLTE.length/3;for(T.tabs[m]=[],N=0;N<h;N++)T.tabs[m].push(R(o,d+2*N))}else if(m=="tRNS")T.ctype==3?T.tabs[m]=g.readBytes(o,d,$):T.ctype==0?T.tabs[m]=R(o,d):T.ctype==2&&(T.tabs[m]=[R(o,d),R(o,d+2),R(o,d+4)]);else if(m=="gAMA")T.tabs[m]=g.readUint(o,d)/1e5;else if(m=="sRGB")T.tabs[m]=o[d];else if(m=="bKGD")T.ctype==0||T.ctype==4?T.tabs[m]=[R(o,d)]:T.ctype==2||T.ctype==6?T.tabs[m]=[R(o,d),R(o,d+2),R(o,d+4)]:T.ctype==3&&(T.tabs[m]=o[d]);else if(m=="IEND")break;d+=$,g.readUint(o,d),d+=4}var _;return q!=0&&((_=T.frames[T.frames.length-1]).data=D(T,P.slice(0,q),_.rect.width,_.rect.height)),T.data=D(T,G,T.width,T.height),delete T.compress,delete T.interlace,delete T.filter,T},toRGBA8:function(a){const o=a.width,d=a.height;if(a.tabs.acTL==null)return[f(a.data,o,d,a).buffer];const g=[];a.frames[0].data==null&&(a.frames[0].data=a.data);const R=o*d*4,k=new Uint8Array(R),T=new Uint8Array(R),G=new Uint8Array(R);for(let x=0;x<a.frames.length;x++){const q=a.frames[x],M=q.rect.x,N=q.rect.y,p=q.rect.width,v=q.rect.height,F=f(q.data,p,v,a);if(x!=0)for(var P=0;P<R;P++)G[P]=k[P];if(q.blend==0?L(F,p,v,k,o,d,M,N,0):q.blend==1&&L(F,p,v,k,o,d,M,N,1),g.push(k.buffer.slice(0)),q.dispose!=0){if(q.dispose==1)L(T,p,v,k,o,d,M,N,0);else if(q.dispose==2)for(P=0;P<R;P++)k[P]=G[P]}}return g},_paeth:u,_copyTile:L,_bin:n}})();(function(){const{_copyTile:n}=Et,{_bin:f}=Et,D=Et._paeth;var r={table:(function(){const p=new Uint32Array(256);for(let v=0;v<256;v++){let F=v;for(let I=0;I<8;I++)1&F?F=3988292384^F>>>1:F>>>=1;p[v]=F}return p})(),update(p,v,F,I){for(let S=0;S<I;S++)p=r.table[255&(p^v[F+S])]^p>>>8;return p},crc:(p,v,F)=>4294967295^r.update(4294967295,p,v,F)};function e(p,v,F,I){v[F]+=p[0]*I>>4,v[F+1]+=p[1]*I>>4,v[F+2]+=p[2]*I>>4,v[F+3]+=p[3]*I>>4}function t(p){return Math.max(0,Math.min(255,p))}function l(p,v){const F=p[0]-v[0],I=p[1]-v[1],S=p[2]-v[2],A=p[3]-v[3];return F*F+I*I+S*S+A*A}function u(p,v,F,I,S,A,_){_==null&&(_=1);const $=I.length,m=[];for(var h=0;h<$;h++){const j=I[h];m.push([j>>>0&255,j>>>8&255,j>>>16&255,j>>>24&255])}for(h=0;h<$;h++){let j=4294967295;for(var O=0,C=0;C<$;C++){var z=l(m[h],m[C]);C!=h&&z<j&&(j=z,O=C)}}const Q=new Uint32Array(S.buffer),J=new Int16Array(v*F*4),ne=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<ne.length;h++)ne[h]=255*((ne[h]+.5)/16-.5);for(let j=0;j<F;j++)for(let re=0;re<v;re++){var Y;h=4*(j*v+re),_!=2?Y=[t(p[h]+J[h]),t(p[h+1]+J[h+1]),t(p[h+2]+J[h+2]),t(p[h+3]+J[h+3])]:(z=ne[4*(3&j)+(3&re)],Y=[t(p[h]+z),t(p[h+1]+z),t(p[h+2]+z),t(p[h+3]+z)]),O=0;let $e=16777215;for(C=0;C<$;C++){const me=l(Y,m[C]);me<$e&&($e=me,O=C)}const Te=m[O],pe=[Y[0]-Te[0],Y[1]-Te[1],Y[2]-Te[2],Y[3]-Te[3]];_==1&&(re!=v-1&&e(pe,J,h+4,7),j!=F-1&&(re!=0&&e(pe,J,h+4*v-4,3),e(pe,J,h+4*v,5),re!=v-1&&e(pe,J,h+4*v+4,1))),A[h>>2]=O,Q[h>>2]=I[O]}}function w(p,v,F,I,S){S==null&&(S={});const{crc:A}=r,_=f.writeUint,$=f.writeUshort,m=f.writeASCII;let h=8;const O=p.frames.length>1;let C,z=!1,Q=33+(O?20:0);if(S.sRGB!=null&&(Q+=13),S.pHYs!=null&&(Q+=21),S.iCCP!=null&&(C=pako.deflate(S.iCCP),Q+=21+C.length+4),p.ctype==3){for(var J=p.plte.length,ne=0;ne<J;ne++)p.plte[ne]>>>24!=255&&(z=!0);Q+=8+3*J+4+(z?8+1*J+4:0)}for(var Y=0;Y<p.frames.length;Y++)O&&(Q+=38),Q+=(Te=p.frames[Y]).cimg.length+12,Y!=0&&(Q+=4);Q+=12;const j=new Uint8Array(Q),re=[137,80,78,71,13,10,26,10];for(ne=0;ne<8;ne++)j[ne]=re[ne];if(_(j,h,13),h+=4,m(j,h,"IHDR"),h+=4,_(j,h,v),h+=4,_(j,h,F),h+=4,j[h]=p.depth,h++,j[h]=p.ctype,h++,j[h]=0,h++,j[h]=0,h++,j[h]=0,h++,_(j,h,A(j,h-17,17)),h+=4,S.sRGB!=null&&(_(j,h,1),h+=4,m(j,h,"sRGB"),h+=4,j[h]=S.sRGB,h++,_(j,h,A(j,h-5,5)),h+=4),S.iCCP!=null){const pe=13+C.length;_(j,h,pe),h+=4,m(j,h,"iCCP"),h+=4,m(j,h,"ICC profile"),h+=11,h+=2,j.set(C,h),h+=C.length,_(j,h,A(j,h-(pe+4),pe+4)),h+=4}if(S.pHYs!=null&&(_(j,h,9),h+=4,m(j,h,"pHYs"),h+=4,_(j,h,S.pHYs[0]),h+=4,_(j,h,S.pHYs[1]),h+=4,j[h]=S.pHYs[2],h++,_(j,h,A(j,h-13,13)),h+=4),O&&(_(j,h,8),h+=4,m(j,h,"acTL"),h+=4,_(j,h,p.frames.length),h+=4,_(j,h,S.loop!=null?S.loop:0),h+=4,_(j,h,A(j,h-12,12)),h+=4),p.ctype==3){for(_(j,h,3*(J=p.plte.length)),h+=4,m(j,h,"PLTE"),h+=4,ne=0;ne<J;ne++){const pe=3*ne,me=p.plte[ne],Fe=255&me,Re=me>>>8&255,Ke=me>>>16&255;j[h+pe+0]=Fe,j[h+pe+1]=Re,j[h+pe+2]=Ke}if(h+=3*J,_(j,h,A(j,h-3*J-4,3*J+4)),h+=4,z){for(_(j,h,J),h+=4,m(j,h,"tRNS"),h+=4,ne=0;ne<J;ne++)j[h+ne]=p.plte[ne]>>>24&255;h+=J,_(j,h,A(j,h-J-4,J+4)),h+=4}}let $e=0;for(Y=0;Y<p.frames.length;Y++){var Te=p.frames[Y];O&&(_(j,h,26),h+=4,m(j,h,"fcTL"),h+=4,_(j,h,$e++),h+=4,_(j,h,Te.rect.width),h+=4,_(j,h,Te.rect.height),h+=4,_(j,h,Te.rect.x),h+=4,_(j,h,Te.rect.y),h+=4,$(j,h,I[Y]),h+=2,$(j,h,1e3),h+=2,j[h]=Te.dispose,h++,j[h]=Te.blend,h++,_(j,h,A(j,h-30,30)),h+=4);const pe=Te.cimg;_(j,h,(J=pe.length)+(Y==0?0:4)),h+=4;const me=h;m(j,h,Y==0?"IDAT":"fdAT"),h+=4,Y!=0&&(_(j,h,$e++),h+=4),j.set(pe,h),h+=J,_(j,h,A(j,me,h-me)),h+=4}return _(j,h,0),h+=4,m(j,h,"IEND"),h+=4,_(j,h,A(j,h-4,4)),h+=4,j.buffer}function L(p,v,F){for(let I=0;I<p.frames.length;I++){const S=p.frames[I];S.rect.width;const A=S.rect.height,_=new Uint8Array(A*S.bpl+A);S.cimg=d(S.img,A,S.bpp,S.bpl,_,v,F)}}function i(p,v,F,I,S){const A=S[0],_=S[1],$=S[2],m=S[3],h=S[4],O=S[5];let C=6,z=8,Q=255;for(var J=0;J<p.length;J++){const We=new Uint8Array(p[J]);for(var ne=We.length,Y=0;Y<ne;Y+=4)Q&=We[Y+3]}const j=Q!=255,re=(function(be,Le,ze,ot,Ne,Qe){const Pe=[];for(var de=0;de<be.length;de++){const Ee=new Uint8Array(be[de]),H=new Uint32Array(Ee.buffer);var Je;let V=0,te=0,se=Le,ae=ze,le=ot?1:0;if(de!=0){const fe=Qe||ot||de==1||Pe[de-2].dispose!=0?1:2;let Me=0,ut=1e9;for(let Be=0;Be<fe;Be++){var Ct=new Uint8Array(be[de-1-Be]);const at=new Uint32Array(be[de-1-Be]);let He=Le,ke=ze,Oe=-1,st=-1;for(let Ge=0;Ge<ze;Ge++)for(let Ye=0;Ye<Le;Ye++)H[et=Ge*Le+Ye]!=at[et]&&(Ye<He&&(He=Ye),Ye>Oe&&(Oe=Ye),Ge<ke&&(ke=Ge),Ge>st&&(st=Ge));Oe==-1&&(He=ke=Oe=st=0),Ne&&((1&He)==1&&He--,(1&ke)==1&&ke--);const Mt=(Oe-He+1)*(st-ke+1);Mt<ut&&(ut=Mt,Me=Be,V=He,te=ke,se=Oe-He+1,ae=st-ke+1)}Ct=new Uint8Array(be[de-1-Me]),Me==1&&(Pe[de-1].dispose=2),Je=new Uint8Array(se*ae*4),n(Ct,Le,ze,Je,se,ae,-V,-te,0),le=n(Ee,Le,ze,Je,se,ae,-V,-te,3)?1:0,le==1?o(Ee,Le,ze,Je,{x:V,y:te,width:se,height:ae}):n(Ee,Le,ze,Je,se,ae,-V,-te,0)}else Je=Ee.slice(0);Pe.push({rect:{x:V,y:te,width:se,height:ae},img:Je,blend:le,dispose:0})}if(ot)for(de=0;de<Pe.length;de++){if((wt=Pe[de]).blend==1)continue;const Ee=wt.rect,H=Pe[de-1].rect,V=Math.min(Ee.x,H.x),te=Math.min(Ee.y,H.y),se={x:V,y:te,width:Math.max(Ee.x+Ee.width,H.x+H.width)-V,height:Math.max(Ee.y+Ee.height,H.y+H.height)-te};Pe[de-1].dispose=1,de-1!=0&&a(be,Le,ze,Pe,de-1,se,Ne),a(be,Le,ze,Pe,de,se,Ne)}let Lt=0;if(be.length!=1)for(var et=0;et<Pe.length;et++){var wt;Lt+=(wt=Pe[et]).rect.width*wt.rect.height}return Pe})(p,v,F,A,_,$),$e={},Te=[],pe=[];if(I!=0){const We=[];for(Y=0;Y<re.length;Y++)We.push(re[Y].img.buffer);const be=(function(Ne){let Qe=0;for(var Pe=0;Pe<Ne.length;Pe++)Qe+=Ne[Pe].byteLength;const de=new Uint8Array(Qe);let Je=0;for(Pe=0;Pe<Ne.length;Pe++){const Ct=new Uint8Array(Ne[Pe]),Lt=Ct.length;for(let et=0;et<Lt;et+=4){let wt=Ct[et],Ee=Ct[et+1],H=Ct[et+2];const V=Ct[et+3];V==0&&(wt=Ee=H=0),de[Je+et]=wt,de[Je+et+1]=Ee,de[Je+et+2]=H,de[Je+et+3]=V}Je+=Lt}return de.buffer})(We),Le=R(be,I);for(Y=0;Y<Le.plte.length;Y++)Te.push(Le.plte[Y].est.rgba);let ze=0;for(Y=0;Y<re.length;Y++){const ot=(Fe=re[Y]).img.length;var me=new Uint8Array(Le.inds.buffer,ze>>2,ot>>2);pe.push(me);const Ne=new Uint8Array(Le.abuf,ze,ot);O&&u(Fe.img,Fe.rect.width,Fe.rect.height,Te,Ne,me),Fe.img.set(Ne),ze+=ot}}else for(J=0;J<re.length;J++){var Fe=re[J];const We=new Uint32Array(Fe.img.buffer);var Re=Fe.rect.width;for(ne=We.length,me=new Uint8Array(ne),pe.push(me),Y=0;Y<ne;Y++){const be=We[Y];if(Y!=0&&be==We[Y-1])me[Y]=me[Y-1];else if(Y>Re&&be==We[Y-Re])me[Y]=me[Y-Re];else{let Le=$e[be];if(Le==null&&($e[be]=Le=Te.length,Te.push(be),Te.length>=300))break;me[Y]=Le}}}const Ke=Te.length;for(Ke<=256&&h==0&&(z=Ke<=2?1:Ke<=4?2:Ke<=16?4:8,z=Math.max(z,m)),J=0;J<re.length;J++){(Fe=re[J]).rect.x,Fe.rect.y,Re=Fe.rect.width;const We=Fe.rect.height;let be=Fe.img;new Uint32Array(be.buffer);let Le=4*Re,ze=4;if(Ke<=256&&h==0){Le=Math.ceil(z*Re/8);var Ve=new Uint8Array(Le*We);const ot=pe[J];for(let Ne=0;Ne<We;Ne++){Y=Ne*Le;const Qe=Ne*Re;if(z==8)for(var ve=0;ve<Re;ve++)Ve[Y+ve]=ot[Qe+ve];else if(z==4)for(ve=0;ve<Re;ve++)Ve[Y+(ve>>1)]|=ot[Qe+ve]<<4-4*(1&ve);else if(z==2)for(ve=0;ve<Re;ve++)Ve[Y+(ve>>2)]|=ot[Qe+ve]<<6-2*(3&ve);else if(z==1)for(ve=0;ve<Re;ve++)Ve[Y+(ve>>3)]|=ot[Qe+ve]<<7-1*(7&ve)}be=Ve,C=3,ze=1}else if(j==0&&re.length==1){Ve=new Uint8Array(Re*We*3);const ot=Re*We;for(Y=0;Y<ot;Y++){const Ne=3*Y,Qe=4*Y;Ve[Ne]=be[Qe],Ve[Ne+1]=be[Qe+1],Ve[Ne+2]=be[Qe+2]}be=Ve,C=2,ze=3,Le=3*Re}Fe.img=be,Fe.bpl=Le,Fe.bpp=ze}return{ctype:C,depth:z,plte:Te,frames:re}}function a(p,v,F,I,S,A,_){const $=Uint8Array,m=Uint32Array,h=new $(p[S-1]),O=new m(p[S-1]),C=S+1<p.length?new $(p[S+1]):null,z=new $(p[S]),Q=new m(z.buffer);let J=v,ne=F,Y=-1,j=-1;for(let $e=0;$e<A.height;$e++)for(let Te=0;Te<A.width;Te++){const pe=A.x+Te,me=A.y+$e,Fe=me*v+pe,Re=Q[Fe];Re==0||I[S-1].dispose==0&&O[Fe]==Re&&(C==null||C[4*Fe+3]!=0)||(pe<J&&(J=pe),pe>Y&&(Y=pe),me<ne&&(ne=me),me>j&&(j=me))}Y==-1&&(J=ne=Y=j=0),_&&((1&J)==1&&J--,(1&ne)==1&&ne--),A={x:J,y:ne,width:Y-J+1,height:j-ne+1};const re=I[S];re.rect=A,re.blend=1,re.img=new Uint8Array(A.width*A.height*4),I[S-1].dispose==0?(n(h,v,F,re.img,A.width,A.height,-A.x,-A.y,0),o(z,v,F,re.img,A)):n(z,v,F,re.img,A.width,A.height,-A.x,-A.y,0)}function o(p,v,F,I,S){n(p,v,F,I,S.width,S.height,-S.x,-S.y,2)}function d(p,v,F,I,S,A,_){const $=[];let m,h=[0,1,2,3,4];A!=-1?h=[A]:(v*I>5e5||F==1)&&(h=[0]),_&&(m={level:0});const O=Os;for(var C=0;C<h.length;C++){for(let J=0;J<v;J++)g(S,p,J,I,F,h[C]);$.push(O.deflate(S,m))}let z,Q=1e9;for(C=0;C<$.length;C++)$[C].length<Q&&(z=C,Q=$[C].length);return $[z]}function g(p,v,F,I,S,A){const _=F*I;let $=_+F;if(p[$]=A,$++,A==0)if(I<500)for(var m=0;m<I;m++)p[$+m]=v[_+m];else p.set(new Uint8Array(v.buffer,_,I),$);else if(A==1){for(m=0;m<S;m++)p[$+m]=v[_+m];for(m=S;m<I;m++)p[$+m]=v[_+m]-v[_+m-S]+256&255}else if(F==0){for(m=0;m<S;m++)p[$+m]=v[_+m];if(A==2)for(m=S;m<I;m++)p[$+m]=v[_+m];if(A==3)for(m=S;m<I;m++)p[$+m]=v[_+m]-(v[_+m-S]>>1)+256&255;if(A==4)for(m=S;m<I;m++)p[$+m]=v[_+m]-D(v[_+m-S],0,0)+256&255}else{if(A==2)for(m=0;m<I;m++)p[$+m]=v[_+m]+256-v[_+m-I]&255;if(A==3){for(m=0;m<S;m++)p[$+m]=v[_+m]+256-(v[_+m-I]>>1)&255;for(m=S;m<I;m++)p[$+m]=v[_+m]+256-(v[_+m-I]+v[_+m-S]>>1)&255}if(A==4){for(m=0;m<S;m++)p[$+m]=v[_+m]+256-D(0,v[_+m-I],0)&255;for(m=S;m<I;m++)p[$+m]=v[_+m]+256-D(v[_+m-S],v[_+m-I],v[_+m-S-I])&255}}}function R(p,v){const F=new Uint8Array(p),I=F.slice(0),S=new Uint32Array(I.buffer),A=k(I,v),_=A[0],$=A[1],m=F.length,h=new Uint8Array(m>>2);let O;if(F.length<2e7)for(var C=0;C<m;C+=4)O=T(_,z=F[C]*(1/255),Q=F[C+1]*(1/255),J=F[C+2]*(1/255),ne=F[C+3]*(1/255)),h[C>>2]=O.ind,S[C>>2]=O.est.rgba;else for(C=0;C<m;C+=4){var z=F[C]*.00392156862745098,Q=F[C+1]*(1/255),J=F[C+2]*(1/255),ne=F[C+3]*(1/255);for(O=_;O.left;)O=G(O.est,z,Q,J,ne)<=0?O.left:O.right;h[C>>2]=O.ind,S[C>>2]=O.est.rgba}return{abuf:I.buffer,inds:h,plte:$}}function k(p,v,F){F==null&&(F=1e-4);const I=new Uint32Array(p.buffer),S={i0:0,i1:p.length,bst:null,est:null,tdst:0,left:null,right:null};S.bst=q(p,S.i0,S.i1),S.est=M(S.bst);const A=[S];for(;A.length<v;){let $=0,m=0;for(var _=0;_<A.length;_++)A[_].est.L>$&&($=A[_].est.L,m=_);if($<F)break;const h=A[m],O=P(p,I,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=O||h.i1<=O){h.est.L=0;continue}const C={i0:h.i0,i1:O,bst:null,est:null,tdst:0,left:null,right:null};C.bst=q(p,C.i0,C.i1),C.est=M(C.bst);const z={i0:O,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};for(z.bst={R:[],m:[],N:h.bst.N-C.bst.N},_=0;_<16;_++)z.bst.R[_]=h.bst.R[_]-C.bst.R[_];for(_=0;_<4;_++)z.bst.m[_]=h.bst.m[_]-C.bst.m[_];z.est=M(z.bst),h.left=C,h.right=z,A[m]=C,A.push(z)}for(A.sort((($,m)=>m.bst.N-$.bst.N)),_=0;_<A.length;_++)A[_].ind=_;return[S,A]}function T(p,v,F,I,S){if(p.left==null)return p.tdst=(function(C,z,Q,J,ne){const Y=z-C[0],j=Q-C[1],re=J-C[2],$e=ne-C[3];return Y*Y+j*j+re*re+$e*$e})(p.est.q,v,F,I,S),p;const A=G(p.est,v,F,I,S);let _=p.left,$=p.right;A>0&&(_=p.right,$=p.left);const m=T(_,v,F,I,S);if(m.tdst<=A*A)return m;const h=T($,v,F,I,S);return h.tdst<m.tdst?h:m}function G(p,v,F,I,S){const{e:A}=p;return A[0]*v+A[1]*F+A[2]*I+A[3]*S-p.eMq}function P(p,v,F,I,S,A){for(I-=4;F<I;){for(;x(p,F,S)<=A;)F+=4;for(;x(p,I,S)>A;)I-=4;if(F>=I)break;const _=v[F>>2];v[F>>2]=v[I>>2],v[I>>2]=_,F+=4,I-=4}for(;x(p,F,S)>A;)F-=4;return F+4}function x(p,v,F){return p[v]*F[0]+p[v+1]*F[1]+p[v+2]*F[2]+p[v+3]*F[3]}function q(p,v,F){const I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S=[0,0,0,0],A=F-v>>2;for(let _=v;_<F;_+=4){const $=p[_]*.00392156862745098,m=p[_+1]*(1/255),h=p[_+2]*(1/255),O=p[_+3]*(1/255);S[0]+=$,S[1]+=m,S[2]+=h,S[3]+=O,I[0]+=$*$,I[1]+=$*m,I[2]+=$*h,I[3]+=$*O,I[5]+=m*m,I[6]+=m*h,I[7]+=m*O,I[10]+=h*h,I[11]+=h*O,I[15]+=O*O}return I[4]=I[1],I[8]=I[2],I[9]=I[6],I[12]=I[3],I[13]=I[7],I[14]=I[11],{R:I,m:S,N:A}}function M(p){const{R:v}=p,{m:F}=p,{N:I}=p,S=F[0],A=F[1],_=F[2],$=F[3],m=I==0?0:1/I,h=[v[0]-S*S*m,v[1]-S*A*m,v[2]-S*_*m,v[3]-S*$*m,v[4]-A*S*m,v[5]-A*A*m,v[6]-A*_*m,v[7]-A*$*m,v[8]-_*S*m,v[9]-_*A*m,v[10]-_*_*m,v[11]-_*$*m,v[12]-$*S*m,v[13]-$*A*m,v[14]-$*_*m,v[15]-$*$*m],O=h,C=N;let z=[Math.random(),Math.random(),Math.random(),Math.random()],Q=0,J=0;if(I!=0)for(let Y=0;Y<16&&(z=C.multVec(O,z),J=Math.sqrt(C.dot(z,z)),z=C.sml(1/J,z),!(Y!=0&&Math.abs(J-Q)<1e-9));Y++)Q=J;const ne=[S*m,A*m,_*m,$*m];return{Cov:h,q:ne,e:z,L:Q,eMq255:C.dot(C.sml(255,ne),z),eMq:C.dot(z,ne),rgba:(Math.round(255*ne[3])<<24|Math.round(255*ne[2])<<16|Math.round(255*ne[1])<<8|Math.round(255*ne[0])<<0)>>>0}}var N={multVec:(p,v)=>[p[0]*v[0]+p[1]*v[1]+p[2]*v[2]+p[3]*v[3],p[4]*v[0]+p[5]*v[1]+p[6]*v[2]+p[7]*v[3],p[8]*v[0]+p[9]*v[1]+p[10]*v[2]+p[11]*v[3],p[12]*v[0]+p[13]*v[1]+p[14]*v[2]+p[15]*v[3]],dot:(p,v)=>p[0]*v[0]+p[1]*v[1]+p[2]*v[2]+p[3]*v[3],sml:(p,v)=>[p*v[0],p*v[1],p*v[2],p*v[3]]};Et.encode=function(v,F,I,S,A,_,$){S==null&&(S=0),$==null&&($=!1);const m=i(v,F,I,S,[!1,!1,!1,0,$,!1]);return L(m,-1),w(m,F,I,A,_)},Et.encodeLL=function(v,F,I,S,A,_,$,m){const h={ctype:0+(S==1?0:2)+(A==0?0:4),depth:_,frames:[]},O=(S+A)*_,C=O*F;for(let z=0;z<v.length;z++)h.frames.push({rect:{x:0,y:0,width:F,height:I},img:new Uint8Array(v[z]),blend:0,dispose:1,bpp:Math.ceil(O/8),bpl:Math.ceil(C/8)});return L(h,0,!0),w(h,F,I,$,m)},Et.encode.compress=i,Et.encode.dither=u,Et.quantize=R,Et.quantize.getKDtree=k,Et.quantize.getNearest=T})();const Bi={toArrayBuffer(n,f){const D=n.width,r=n.height,e=D<<2,t=n.getContext("2d").getImageData(0,0,D,r),l=new Uint32Array(t.data.buffer),u=(32*D+31)/32<<2,w=u*r,L=122+w,i=new ArrayBuffer(L),a=new DataView(i),o=1<<20;let d,g,R,k,T=o,G=0,P=0,x=0;function q(p){a.setUint16(P,p,!0),P+=2}function M(p){a.setUint32(P,p,!0),P+=4}function N(p){P+=p}q(19778),M(L),N(4),M(122),M(108),M(D),M(-r>>>0),q(1),q(32),M(3),M(w),M(2835),M(2835),N(8),M(16711680),M(65280),M(255),M(4278190080),M(1466527264),(function p(){for(;G<r&&T>0;){for(k=122+G*u,d=0;d<e;)T--,g=l[x++],R=g>>>24,a.setUint32(k+d,g<<8|R),d+=4;G++}x<l.length?(T=o,setTimeout(p,Bi._dly)):f(i)})()},toBlob(n,f){this.toArrayBuffer(n,(D=>{f(new Blob([D],{type:"image/bmp"}))}))},_dly:9};var It={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},Us={[It.CHROME]:16384,[It.FIREFOX]:11180,[It.DESKTOP_SAFARI]:16384,[It.IE]:8192,[It.IOS]:4096,[It.ETC]:8192};const Xn=typeof window<"u",Oi=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Cn=Xn&&window.cordova&&window.cordova.require&&window.cordova.require("cordova/modulemapper"),zs=(Xn||Oi)&&(Cn&&Cn.getOriginalSymbol(window,"File")||typeof File<"u"&&File),Ui=(Xn||Oi)&&(Cn&&Cn.getOriginalSymbol(window,"FileReader")||typeof FileReader<"u"&&FileReader);function Zn(n,f,D=Date.now()){return new Promise((r=>{const e=n.split(","),t=e[0].match(/:(.*?);/)[1],l=globalThis.atob(e[1]);let u=l.length;const w=new Uint8Array(u);for(;u--;)w[u]=l.charCodeAt(u);const L=new Blob([w],{type:t});L.name=f,L.lastModified=D,r(L)}))}function zi(n){return new Promise(((f,D)=>{const r=new Ui;r.onload=()=>f(r.result),r.onerror=e=>D(e),r.readAsDataURL(n)}))}function Ni(n){return new Promise(((f,D)=>{const r=new Image;r.onload=()=>f(r),r.onerror=e=>D(e),r.src=n}))}function Vt(){if(Vt.cachedResult!==void 0)return Vt.cachedResult;let n=It.ETC;const{userAgent:f}=navigator;return/Chrom(e|ium)/i.test(f)?n=It.CHROME:/iP(ad|od|hone)/i.test(f)&&/WebKit/i.test(f)?n=It.IOS:/Safari/i.test(f)?n=It.DESKTOP_SAFARI:/Firefox/i.test(f)?n=It.FIREFOX:(/MSIE/i.test(f)||document.documentMode)&&(n=It.IE),Vt.cachedResult=n,Vt.cachedResult}function Hi(n,f){const D=Vt(),r=Us[D];let e=n,t=f,l=e*t;const u=e>t?t/e:e/t;for(;l>r*r;){const w=(r+e)/2,L=(r+t)/2;w<L?(t=L,e=L*u):(t=w*u,e=w),l=e*t}return{width:e,height:t}}function $n(n,f){let D,r;try{if(D=new OffscreenCanvas(n,f),r=D.getContext("2d"),r===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{D=document.createElement("canvas"),r=D.getContext("2d")}return D.width=n,D.height=f,[D,r]}function Pi(n,f){const{width:D,height:r}=Hi(n.width,n.height),[e,t]=$n(D,r);return f&&/jpe?g/.test(f)&&(t.fillStyle="white",t.fillRect(0,0,e.width,e.height)),t.drawImage(n,0,0,e.width,e.height),e}function _n(){return _n.cachedResult!==void 0||(_n.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof document<"u"&&"ontouchend"in document),_n.cachedResult}function Mn(n,f={}){return new Promise((function(D,r){let e,t;var l=function(){try{return t=Pi(e,f.fileType||n.type),D([e,t])}catch(w){return r(w)}},u=function(w){try{var L=function(i){try{throw i}catch(a){return r(a)}};try{let i;return zi(n).then((function(a){try{return i=a,Ni(i).then((function(o){try{return e=o,(function(){try{return l()}catch(d){return r(d)}})()}catch(d){return L(d)}}),L)}catch(o){return L(o)}}),L)}catch(i){L(i)}}catch(i){return r(i)}};try{if(_n()||[It.DESKTOP_SAFARI,It.MOBILE_SAFARI].includes(Vt()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(n).then((function(w){try{return e=w,l()}catch{return u()}}),u)}catch{u()}}))}function An(n,f,D,r,e=1){return new Promise((function(t,l){let u;if(f==="image/png"){let L,i,a;return L=n.getContext("2d"),{data:i}=L.getImageData(0,0,n.width,n.height),a=Et.encode([i.buffer],n.width,n.height,4096*e),u=new Blob([a],{type:f}),u.name=D,u.lastModified=r,w.call(this)}{let L=function(){return w.call(this)};if(f==="image/bmp")return new Promise((i=>Bi.toBlob(n,i))).then((function(i){try{return u=i,u.name=D,u.lastModified=r,L.call(this)}catch(a){return l(a)}}).bind(this),l);{let i=function(){return L.call(this)};if(typeof OffscreenCanvas=="function"&&n instanceof OffscreenCanvas)return n.convertToBlob({type:f,quality:e}).then((function(a){try{return u=a,u.name=D,u.lastModified=r,i.call(this)}catch(o){return l(o)}}).bind(this),l);{let a;return a=n.toDataURL(f,e),Zn(a,D,r).then((function(o){try{return u=o,i.call(this)}catch(d){return l(d)}}).bind(this),l)}}}function w(){return t(u)}}))}function Ft(n){n.width=0,n.height=0}function Jt(){return new Promise((function(n,f){let D,r,e,t;return Jt.cachedResult!==void 0?n(Jt.cachedResult):Zn("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(l){try{return D=l,Mn(D).then((function(u){try{return r=u[1],An(r,D.type,D.name,D.lastModified).then((function(w){try{return e=w,Ft(r),Mn(e).then((function(L){try{return t=L[0],Jt.cachedResult=t.width===1&&t.height===2,n(Jt.cachedResult)}catch(i){return f(i)}}),f)}catch(L){return f(L)}}),f)}catch(w){return f(w)}}),f)}catch(u){return f(u)}}),f)}))}function ji(n){return new Promise(((f,D)=>{const r=new Ui;r.onload=e=>{const t=new DataView(e.target.result);if(t.getUint16(0,!1)!=65496)return f(-2);const l=t.byteLength;let u=2;for(;u<l;){if(t.getUint16(u+2,!1)<=8)return f(-1);const w=t.getUint16(u,!1);if(u+=2,w==65505){if(t.getUint32(u+=2,!1)!=1165519206)return f(-1);const L=t.getUint16(u+=6,!1)==18761;u+=t.getUint32(u+4,L);const i=t.getUint16(u,L);u+=2;for(let a=0;a<i;a++)if(t.getUint16(u+12*a,L)==274)return f(t.getUint16(u+12*a+8,L))}else{if((65280&w)!=65280)break;u+=t.getUint16(u,!1)}}return f(-1)},r.onerror=e=>D(e),r.readAsArrayBuffer(n)}))}function qi(n,f){const{width:D}=n,{height:r}=n,{maxWidthOrHeight:e}=f;let t,l=n;return isFinite(e)&&(D>e||r>e)&&([l,t]=$n(D,r),D>r?(l.width=e,l.height=r/D*e):(l.width=D/r*e,l.height=e),t.drawImage(n,0,0,l.width,l.height),Ft(n)),l}function Vi(n,f){const{width:D}=n,{height:r}=n,[e,t]=$n(D,r);switch(f>4&&f<9?(e.width=r,e.height=D):(e.width=D,e.height=r),f){case 2:t.transform(-1,0,0,1,D,0);break;case 3:t.transform(-1,0,0,-1,D,r);break;case 4:t.transform(1,0,0,-1,0,r);break;case 5:t.transform(0,1,1,0,0,0);break;case 6:t.transform(0,1,-1,0,r,0);break;case 7:t.transform(0,-1,-1,0,r,D);break;case 8:t.transform(0,-1,1,0,0,D)}return t.drawImage(n,0,0,D,r),Ft(n),e}function wi(n,f,D=0){return new Promise((function(r,e){let t,l,u,w,L,i,a,o,d,g,R,k,T,G,P,x,q,M,N,p;function v(I=5){if(f.signal&&f.signal.aborted)throw f.signal.reason;t+=I,f.onProgress(Math.min(t,100))}function F(I){if(f.signal&&f.signal.aborted)throw f.signal.reason;t=Math.min(Math.max(I,t),100),f.onProgress(t)}return t=D,l=f.maxIteration||10,u=1024*f.maxSizeMB*1024,v(),Mn(n,f).then((function(I){try{return[,w]=I,v(),L=qi(w,f),v(),new Promise((function(S,A){var _;if(!(_=f.exifOrientation))return ji(n).then((function(m){try{return _=m,$.call(this)}catch(h){return A(h)}}).bind(this),A);function $(){return S(_)}return $.call(this)})).then((function(S){try{return i=S,v(),Jt().then((function(A){try{return a=A?L:Vi(L,i),v(),o=f.initialQuality||1,d=f.fileType||n.type,An(a,d,n.name,n.lastModified,o).then((function(_){try{{let m=function(){if(l--&&(P>u||P>T)){let O,C;return O=p?.95*N.width:N.width,C=p?.95*N.height:N.height,[q,M]=$n(O,C),M.drawImage(N,0,0,O,C),o*=d==="image/png"?.85:.95,An(q,d,n.name,n.lastModified,o).then((function(z){try{return x=z,Ft(N),N=q,P=x.size,F(Math.min(99,Math.floor((G-P)/(G-u)*100))),m}catch(Q){return e(Q)}}),e)}return[1]},h=function(){return Ft(N),Ft(q),Ft(L),Ft(a),Ft(w),F(100),r(x)};if(g=_,v(),R=g.size>u,k=g.size>n.size,!R&&!k)return F(100),r(g);var $;return T=n.size,G=g.size,P=G,N=a,p=!f.alwaysKeepResolution&&R,($=(function(O){for(;O;){if(O.then)return void O.then($,e);try{if(O.pop){if(O.length)return O.pop()?h.call(this):O;O=m}else O=O.call(this)}catch(C){return e(C)}}}).bind(this))(m)}}catch(m){return e(m)}}).bind(this),e)}catch(_){return e(_)}}).bind(this),e)}catch(A){return e(A)}}).bind(this),e)}catch(S){return e(S)}}).bind(this),e)}))}const Ns=`
3
- let scriptImported = false
4
- self.addEventListener('message', async (e) => {
5
- const { file, id, imageCompressionLibUrl, options } = e.data
6
- options.onProgress = (progress) => self.postMessage({ progress, id })
7
- try {
8
- if (!scriptImported) {
9
- // console.log('[worker] importScripts', imageCompressionLibUrl)
10
- self.importScripts(imageCompressionLibUrl)
11
- scriptImported = true
12
- }
13
- // console.log('[worker] self', self)
14
- const compressedFile = await imageCompression(file, options)
15
- self.postMessage({ file: compressedFile, id })
16
- } catch (e) {
17
- // console.error('[worker] error', e)
18
- self.postMessage({ error: e.message + '\\n' + e.stack, id })
19
- }
20
- })
21
- `;let Pn;function Hs(n,f){return new Promise(((D,r)=>{Pn||(Pn=(function(l){const u=[];return u.push(l),URL.createObjectURL(new Blob(u))})(Ns));const e=new Worker(Pn);e.addEventListener("message",(function(l){if(f.signal&&f.signal.aborted)e.terminate();else if(l.data.progress===void 0){if(l.data.error)return r(new Error(l.data.error)),void e.terminate();D(l.data.file),e.terminate()}else f.onProgress(l.data.progress)})),e.addEventListener("error",r),f.signal&&f.signal.addEventListener("abort",(()=>{r(f.signal.reason),e.terminate()})),e.postMessage({file:n,imageCompressionLibUrl:f.libURL,options:{...f,onProgress:void 0,signal:void 0}})}))}function ht(n,f){return new Promise((function(D,r){let e,t,l,u,w,L;if(e={...f},l=0,{onProgress:u}=e,e.maxSizeMB=e.maxSizeMB||Number.POSITIVE_INFINITY,w=typeof e.useWebWorker!="boolean"||e.useWebWorker,delete e.useWebWorker,e.onProgress=d=>{l=d,typeof u=="function"&&u(l)},!(n instanceof Blob||n instanceof zs))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(n.type))return r(new Error("The file given is not an image"));if(L=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!w||typeof Worker!="function"||L)return wi(n,e).then((function(d){try{return t=d,o.call(this)}catch(g){return r(g)}}).bind(this),r);var i=(function(){try{return o.call(this)}catch(d){return r(d)}}).bind(this),a=function(d){try{return wi(n,e).then((function(g){try{return t=g,i()}catch(R){return r(R)}}),r)}catch(g){return r(g)}};try{return e.libURL=e.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Hs(n,e).then((function(d){try{return t=d,i()}catch{return a()}}),a)}catch{a()}function o(){try{t.name=n.name,t.lastModified=n.lastModified}catch{}try{e.preserveExif&&n.type==="image/jpeg"&&(!e.fileType||e.fileType&&e.fileType===n.type)&&(t=Di(n,t))}catch{}return D(t)}}))}ht.getDataUrlFromFile=zi,ht.getFilefromDataUrl=Zn,ht.loadImage=Ni,ht.drawImageInCanvas=Pi,ht.drawFileInCanvas=Mn,ht.canvasToFile=An,ht.getExifOrientation=ji,ht.handleMaxWidthOrHeight=qi,ht.followExifOrientation=Vi,ht.cleanupCanvasMemory=Ft,ht.isAutoOrientationInBrowser=Jt,ht.approximateBelowMaximumCanvasSizeOfBrowser=Hi,ht.copyExifWithoutOrientation=Di,ht.getBrowserName=Vt,ht.version="2.0.2";const Ps={class:"info"},js=["src"],qs={class:"info"},Vs={key:0},Ws={key:1},Qs={class:"more"},Gs={key:0,class:"note note-nomsg"},Ks={key:1,class:"note note-nomsg"},Js={class:"ss-card"},Ys={key:0},Xs={class:"ss-card jin-pan"},Zs=["src"],er={class:"context"},tr={key:0},nr=["src","onClick"],ir={class:"jin-pan-load"},or={class:"imgs"},ar={class:"img-btns"},sr=["onClick"],rr=["onClick"],lr={class:"img"},ur=["src"],cr=["onClick"],fr={key:0,class:"emp"},dr=["title"],hr={for:"choice-pic",class:"sr-only"},mr=["title"],gr={for:"choice-file",class:"sr-only"},vr=["title"],pr={for:"choice-video",class:"sr-only"},yr={class:"voice-menu-wrap"},wr=["title"],br=["title"],kr={for:"main-input",class:"sr-only"},_r=["disabled","placeholder"],Ir={for:"main-input-ex",class:"sr-only"},Sr=["disabled"],Cr={key:0,class:"forward-pan"},Mr={class:"ss-card card"},Ar={for:"chat-forward-search",class:"sr-only"},Tr=["placeholder"],Er=["onClick"],xr=["title","src"],bi=50,Fr=100,Lr=4,$r=Ut({name:"ViewChat",__name:"Chat",props:{chat:{},list:{},imgView:{}},setup(n){const f=xn.global.t,{viewer:D}=_o("viewer",{viewer:null}),r=Io(),e=Ii(),t=Kn(),l=Tn(),u=En(),w=_i(),L=en("mergePan"),i=en("msgPan"),a=en("chatPadding"),o=en("sendMore"),d=en("mainInput"),g=ge([]),R=ge("single-message"),k=ge({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:gn(n.list)},msgTouch:{x:-1,y:-1,msgOnTouchDown:!1,onMove:"no"},checkNewLineFlag:!1}),T=ge([{open:!1},{open:!1},{open:!1},{open:!1}]),G=ge([]),P=ge(0),x=ge(""),q=ge(""),M=ge(new Map),N=ge(!1),p=ge(null),v=ge(!1),F=ge(null);let I=[];const S=ge([]),A=ge(null),_=ge(""),$=ge(null),m=ge(0),h=ge(null),O=ge(null),C=ge(null),z=ge(0),Q=ge(w.userList),J=ge(void 0),ne=Mi();function Y(){const s=u.chatInfo.show;return`${String(s.type??"")}:${String(s.id??"")}:${String(s.channel_id??"")}`}function j(s){const c=Number((s==null?void 0:s.local_time)??(s==null?void 0:s.timestamp_ms)??(s==null?void 0:s.time_ms)??0);if(c)return c;const b=Number((s==null?void 0:s.time)??0);return Number.isFinite(b)&&b>0?b*1e3:0}async function re(){const s=n.chat.show.id;if(!s||s===0||T.value[3].open||k.value.showForwardPan)return;const c=Y(),b=(n.chat.show.type==="group",String(n.chat.show.channel_id??s));let U=[];try{U=await gi({platform:String(l.loginInfo.platform??""),selfId:String(l.loginInfo.uin??""),channelId:b,limit:Fr})}catch{return}if(!U.length||String(n.chat.show.id)!==String(s)||c!==Y())return;const E=new Set,X=ue=>{const Se=String((ue==null?void 0:ue.message_id)??""),ce=String((ue==null?void 0:ue.fake_message_id)??"");Se&&E.add(Se),ce&&E.add(ce)},Z=[...u.messageList];for(const ue of Z)X(ue);let oe=!1;for(const ue of U){const Se=String(ue.message_id??""),ce=String(ue.fake_message_id??"");Se&&E.has(Se)||ce&&E.has(ce)||!Se&&!ce||(X(ue),Z.push(ue),oe=!0)}oe&&(Z.sort((ue,Se)=>j(ue)-j(Se)),u.messageList.splice(0,u.messageList.length,...Z))}function $e(){n.chat.show.id&&re()}const Te={beforeHook:s=>{const c=On();if(!c)return;c.style.transition="all 0s";const b=document.getElementById("chat-pan");if(!b)return;const U=b.getElementsByClassName("chat")[0];U&&(U.style.overflowY="hidden")},moveHook:(s,c)=>{const b=On();b&&(b.style.transform="translateX("+c+"px)")},endHook:s=>{const c=document.getElementById("chat-pan"),b=c==null?void 0:c.getElementsByClassName("chat")[0];b&&(b.style.overflowY="scroll");const U=On();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 pe(){P.value=0,k.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:gn(n.list)},msgTouch:{x:-1,y:-1,msgOnTouchDown:!1,onMove:"no"},checkNewLineFlag:!1},G.value=[],ve=!0}_t(()=>n.chat,()=>{pe(),S.value=[],M.value.clear(),g.value=[],st(),pt(()=>{be(),Qe(),Je()}),$e();const s=mi(),c=n.chat.show.id,b=[...w.userList].find(U=>(U.user_id??U.group_id)===c);b&&s.add(b)}),_t(()=>x.value,(s,c)=>{q.value=c,be()}),un(()=>{$e();const s=mi(),c=n.chat.show.id,b=[...w.userList].find(U=>(U.user_id??U.group_id)===c);b&&s.add(b),si(n.list.length,0),_t(()=>n.list.map(U=>U.message_id+"_"+U.fake_msg),(U,E=[])=>{si(U.length,E.length),U.length>0&&E.length===0&&pt(H)}),_t(()=>n.chat.info.jin_info.list.length,()=>{k.value.isJinLoading=!1}),yt.type=="capacitor"&&yt.platform==="android"&&yt.addListener("App","backButton",()=>{hn()}),_t(()=>r.backTimes,()=>{hn()}),pt(()=>{ot(),Ne(),be(),Qe(),Je()})}),Gn(()=>{if(me!==null&&(cancelAnimationFrame(me),me=null),Fe!==null&&(cancelAnimationFrame(Fe),Fe=null),Re!==null&&(Re.disconnect(),Re=null),Ke!==null&&(Ke.disconnect(),Ke=null),Ve!==null){const s=i.value;s==null||s.removeEventListener("load",Ve,!0),s==null||s.removeEventListener("error",Ve,!0),s==null||s.removeEventListener("loadedmetadata",Ve,!0),s==null||s.removeEventListener("loadeddata",Ve,!0),Ve=null}});let me=null,Fe=null,Re=null,Ke=null,Ve=null,ve=!0,We=[];function be(s,c=!1){pt(()=>{me!==null&&cancelAnimationFrame(me),me=requestAnimationFrame(()=>{me=null,Pe(s??d.value),ze(c?()=>H():void 0)})})}function Le(){const s=o.value,c=a.value,b=i.value;if(!s||!c||!b)return;const U=Array.from(s.children).flatMap(Z=>Array.from(Z.children)).filter(Z=>Z instanceof HTMLElement&&Z.offsetHeight>0),E=U.length>0?U.reduce((Z,oe)=>Math.min(Z,oe.getBoundingClientRect().top),Number.POSITIVE_INFINITY):s.getBoundingClientRect().top,X=b.getBoundingClientRect().bottom;c.style.height=Math.max(0,X-E)+"px"}function ze(s){s&&We.push(s),Fe===null&&(Fe=requestAnimationFrame(()=>{Fe=null,Le();const c=We;We=[],c.forEach(b=>b())}))}function ot(){if(Re!==null)return;const s=o.value;if(!s||typeof ResizeObserver>"u"){ze();return}Re=new ResizeObserver(()=>{ze()}),Re.observe(s),ze()}function Ne(){const s=i.value;if(!s||Ke!==null||Ve!==null)return;const c=()=>{Je(),Qe()};Ve=c,s.addEventListener("load",c,!0),s.addEventListener("error",c,!0),s.addEventListener("loadedmetadata",c,!0),s.addEventListener("loadeddata",c,!0),!(typeof ResizeObserver>"u")&&(Ke=new ResizeObserver(()=>{c()}),Ke.observe(s),s.firstElementChild&&Ke.observe(s.firstElementChild))}function Qe(){!ve||!i.value||(H(!1),requestAnimationFrame(()=>{!ve||!i.value||(H(!1),requestAnimationFrame(()=>{ve&&i.value&&H(!1)}))}))}function Pe(s){const c=s??d.value;if(!c)return;if(t.sysConfig.send_key==="none"){c.style.height="";return}if(!(c instanceof HTMLTextAreaElement)){c.style.height="";return}const b=getComputedStyle(c),U=Number.parseFloat(b.lineHeight),E=Number.parseFloat(b.fontSize),X=Number.isFinite(U)?U:E,Z=Number.parseFloat(b.paddingTop)||0,oe=Number.parseFloat(b.paddingBottom)||0,ue=Number.parseFloat(b.borderTopWidth)||0,Se=Number.parseFloat(b.borderBottomWidth)||0;let ce=(Number.isFinite(X)?X:0)+Z+oe+ue+Se;if(ce<=0){const ft=c.offsetHeight||Number.parseFloat(b.height)||E;ft&&Number.isFinite(ft)&&(ce=ft)}c.dataset.baseHeight||(c.dataset.baseHeight=String(ce));const je=c.style.transition;c.style.transition="none";const tt=c.style.overflow,Ce=Number.parseFloat(c.dataset.baseHeight)||ce;if(c.value==="")c.style.height=Ce+"px";else{c.style.overflow="hidden",c.style.height="0px";const ft=Math.max(c.scrollHeight-Lr,Ce);c.style.height=ft+"px",c.style.overflow=tt}c.getBoundingClientRect(),c.style.transition=je}function de(){li(),pt(()=>{var s;A.value&&(tn("chat-"+((s=A.value)==null?void 0:s.message_id),!0),Ze())})}function Je(){const s=i.value;if(!s)return;const c=s.scrollHeight>s.clientHeight+1,b=s.scrollTop+s.clientHeight+10>=s.scrollHeight;k.value.showBottomButton=c&&!b}function Ct(s,c){if(c)return;const b=s.target;b.scrollTop===0&&n.list.length>0&&Lt(),b.scrollTop+b.clientHeight+10>=b.scrollHeight?(ve=!0,P.value=0,k.value.showBottomButton=!1):(ve&&(ve=!1),Je())}async function Lt(){if(!e.nowGetHistory&&e.canLoadHistory!==!1){const s=n.list[0],c=s.message_id,b=Number(s==null?void 0:s.time),U=Y(),E=()=>U!==Y(),X=Number((s==null?void 0:s.local_time)??(s==null?void 0:s.timestamp_ms)??(s==null?void 0:s.time_ms)??0)||(Number.isFinite(b)?b*1e3:0),Z=t.sysConfig.enable_local_history&&t.sysConfig.mixed_load_messages!==!1;if(e.nowGetHistory=!0,Z&&Number.isFinite(b)?e.historyBeforeTime=b:e.historyBeforeTime=void 0,e.loadHistoryFail=!1,E()){e.nowGetHistory=!1;return}const oe=String(u.chatInfo.show.channel_id??u.chatInfo.show.id??"");if(Z){let je=[];if(Number.isFinite(b)?je=await Eo(l.loginInfo.uin,oe,b,20):je=await xo(l.loginInfo.uin,oe,c,20),E()){e.nowGetHistory=!1;return}if(je.length>0){const tt=new Set(u.messageList.map(bt=>String(bt.message_id??""))),Ce=je.filter(bt=>{const Ht=String((bt==null?void 0:bt.message_id)??"");return Ht.length===0||!tt.has(Ht)});Ce.length>0&&u.messageList.splice(0,0,...Ce);const ft=n.list[Ce.length]??n.list[Ce.length-1],qe=et([...Ce,ft]);qe.length>0&&wt(qe)}}if(E()){e.nowGetHistory=!1;return}const ue=await gi({platform:String(l.loginInfo.platform??""),selfId:String(l.loginInfo.uin??""),channelId:oe,limit:bi,beforeTimeMs:X>0?X:void 0});if(E()){e.nowGetHistory=!1;return}const Se=new Set(u.messageList.map(je=>String(je.message_id??""))),ce=ue.filter(je=>{const tt=String(je.message_id??"");return tt.length===0||!Se.has(tt)});ce.length>0&&u.messageList.splice(0,0,...ce),ue.length<bi&&(e.canLoadHistory=!1),e.nowGetHistory=!1}}function et(s){const c=[];for(let b=0;b<s.length-1;b++){const U=s[b].message_seq??s[b].seq??null,E=s[b+1].message_seq??s[b+1].seq??null;if(U==null||E==null)return[];E-U>1&&c.push(s[b+1].message_id)}return c}function wt(s){var Z;const c=u.chatInfo.show.type,b=u.chatInfo.show.id,U=String(u.chatInfo.show.channel_id??b),E=String(u.chatInfo.show.guild_id??b);let X;l.jsonMap.message_list&&c!="group"?X=l.jsonMap.message_list.private_name:X=(Z=l.jsonMap.message_list)==null?void 0:Z.name;for(const oe of s)it.send(X??"get_chat_history",{group_id:c=="group"?E||b:void 0,guild_id:c=="group"?E||b:void 0,channel_id:U,user_id:c!="group"?b:void 0,message_id:oe,count:20},"getChatHistoryGapFill_"+oe)}function Ee(s,c=!0){const b=document.getElementById("msgPan");b!==null&&s&&(c===!1?b.style.scrollBehavior="unset":b.style.scrollBehavior="smooth",b.scrollTop=s,b.style.scrollBehavior="smooth")}function H(s=!1){const c=document.getElementById("msgPan");c!==null&&Ee(c.scrollHeight,s)}function V(s){tn(s,!0)||new dt().add(De.INFO,f("无法定位上下文"))}function te(s){const c=document.getElementById("msgPan");c&&(n.list.length<=20&&!k.value.showBottomButton?H():Ee(c.scrollTop+s,!1))}function se(s){if(ae(s)||k.value.onAtFind||s.key!=="Enter")return;let c=!1;switch(t.sysConfig.send_key){case"none":if(s.shiftKey||s.ctrlKey||s.altKey||s.metaKey)break;c=!0;break;case"shift":if(!s.shiftKey)break;c=!0;break;case"ctrl":if(!s.ctrlKey)break;c=!0;break;case"alt":if(!s.altKey)break;c=!0;break;case"meta":if(!s.metaKey)break;c=!0;break}c&&k.value.sendTag!="PASS"&&(k.value.sendTag="READY"),k.value.sendTag=="READY"&&x.value!==""?(s.preventDefault(),Xt()):s.key==="Enter"&&(s.ctrlKey||s.metaKey||s.altKey)&&(x.value+=`
22
- `),k.value.sendTag="REFUSE"}function ae(s){var c;if(!k.value.onAtFind)return!1;if(s.keyCode===38||s.keyCode===40){s.preventDefault();const b=s.keyCode===38?-1:1;return He(b),h.value!==null||(h.value=setTimeout(()=>{O.value=setInterval(()=>{He(b)},50)},300)),!0}if(s.keyCode===13){s.preventDefault();const b=(c=$.value)==null?void 0:c[m.value];return b&&Be(b.user_id),!0}return s.keyCode===27?(s.preventDefault(),k.value.onAtFind=!1,$.value=null,m.value=0,!0):!1}function le(){k.value.sendTag="REFUSE"}function fe(){k.value.sendTag="PASS",setTimeout(()=>{k.value.sendTag="REFUSE"},50)}function Me(s){const c=new Ot;if(s.keyCode!==27&&((s.keyCode===38||s.keyCode===40)&&(h.value!==null&&(clearTimeout(h.value),h.value=null),O.value!==null&&(clearInterval(O.value),O.value=null)),k.value.checkNewLineFlag&&(k.value.checkNewLineFlag=!1,x.value==`
23
- `&&(x.value="",be())),!(k.value.onAtFind&&$.value&&$.value.length>0&&(s.keyCode===38||s.keyCode===40||s.keyCode===13||s.keyCode===27))&&s.keyCode!=13)){const b=x.value.substring(x.value.length-1);if(!k.value.onAtFind&&b=="@"&&u.chatInfo.info.group_members.length>0&&u.chatInfo.show.type=="group"&&(c.add(vn.UI,"开始匹配群成员列表 ……"),k.value.onAtFind=!0,m.value=0),k.value.onAtFind)if(x.value.lastIndexOf("@")<0)c.add(vn.UI,"匹配群成员列表被打断 ……"),k.value.onAtFind=!1,$.value=null,m.value=0;else{const U=x.value.substring(x.value.lastIndexOf("@")+1).toLowerCase();$.value=u.chatInfo.info.group_members.filter(E=>E.card!=""&&E.card!=null&&E.card.toLowerCase().indexOf(U)>=0||E.nickname.toLowerCase().indexOf(U)>=0||U==E.user_id.toString()),$.value.length==0&&($.value=u.chatInfo.info.group_members),m.value=0}}}function ut(s){s.preventDefault(),x.value!=""&&Xt()}function Be(s){s!=null&&(x.value=x.value.substring(0,x.value.lastIndexOf("@")),Nt({msgObj:{type:"at",qq:String(s)},addText:!0})),Qt(),k.value.onAtFind=!1,$.value=null,m.value=0}function at(){pt(()=>{const s=document.querySelector(".at-tag.show"),c=document.querySelector(".at-tag.show > div.selected");if(s&&c){const b=s.getBoundingClientRect(),U=c.getBoundingClientRect();U.top<b.top?c.scrollIntoView({block:"nearest",behavior:"smooth"}):U.bottom>b.bottom&&c.scrollIntoView({block:"nearest",behavior:"smooth"})}})}function He(s){!$.value||$.value.length===0||(s===-1?m.value=m.value>0?m.value-1:$.value.length-1:m.value=m.value<$.value.length-1?m.value+1:0,at())}function ke(){const s=document.getElementById("main-input")??document.getElementById("main-input-ex");if(s!==null&&s.selectionStart===s.selectionEnd){let c=-1;typeof s.selectionStart=="number"&&(c=s.selectionStart);const b=vi.getSQList(x.value);b!=null&&b.forEach(U=>{const E=x.value.indexOf(U),X=E+U.length;E!==-1&&c>E&&c<X&&pt(()=>{s.selectionStart=E,s.selectionEnd=X})})}}function Oe(s,c){var X;if(A.value=c,k.value.menuDisplay.menuSelectedMsgId=c.message_id,Ei.get("log_level")==="debug"&&new Ot().debug("右击消息:"+c),g.value.length>0)return;const b=document.getElementById("msgMenu"),U=s.target;let E="member";if(u.chatInfo.show.type=="group"&&u.chatInfo.info.group_members&&u.chatInfo.info.group_members.forEach(Z=>{Z.user_id==c.sender.user_id&&(E=Z.role)}),b!==null&&c!==null){if(Fo("close_respond")==!0&&(k.value.menuDisplay.showRespond=!1),U.nodeName=="IMG"&&U.name=="avatar")Object.keys(k.value.menuDisplay).forEach(ce=>{k.value.menuDisplay[ce]=!1}),k.value.menuDisplay.showRespond=!1,k.value.menuDisplay.at=!0,k.value.menuDisplay.poke=!0,k.value.menuDisplay.remove=!0,(u.chatInfo.show.type!="group"||c.sender.user_id===l.loginInfo.uin||u.chatInfo.info.me_info.role==="member"||E=="owner"||E=="admin"&&u.chatInfo.info.me_info.role!="owner")&&(k.value.menuDisplay.remove=!1),c.sender.user_id===l.loginInfo.uin&&(k.value.menuDisplay.at=!1),u.chatInfo.show.type=="group"&&u.chatInfo.info.me_info.role!="member"&&(k.value.menuDisplay.config=!0);else{(c.sender.user_id===l.loginInfo.uin||u.chatInfo.info.me_info.role==="admin"||u.chatInfo.info.me_info.role==="owner")&&(k.value.menuDisplay.revoke=!0),k.value.menuDisplay.reedit=k.value.menuDisplay.revoke&&c.sender.user_id===l.loginInfo.uin,c.revoke===!0&&(k.value.menuDisplay.relpy=!1,k.value.menuDisplay.forward=!1,k.value.menuDisplay.revoke=!1,k.value.menuDisplay.select=!1),T.value[3].open&&(Object.keys(k.value.menuDisplay).forEach(qe=>{k.value.menuDisplay[qe]=!1}),k.value.menuDisplay.jumpToMsg=!0);const ce=document.getSelection(),je=(X=ce==null?void 0:ce.anchorNode)==null?void 0:X.parentElement;let tt=null,Ce=je;if(Ce)for(;Ce.className!="chat";){if(Ce.className.startsWith("message")&&Ce.className.indexOf("-")<0){tt=Ce;break}if(Ce=Ce.parentElement,!Ce)break}je&&je.className.indexOf("msg-text")>-1&&ce.focusNode==ce.anchorNode&&tt&&tt.id==c.message_id&&(_.value=ce.toString(),_.value.length>0&&(k.value.menuDisplay.copySelect=!0));const ft=["xml","json"];c.message.forEach(qe=>{ft.indexOf(qe.type)>0&&(k.value.menuDisplay.forward=!1,k.value.menuDisplay.add=!1)}),U.nodeName=="IMG"&&U.src.length>0&&(k.value.menuDisplay.downloadImg=U.src,yt.isDesktop()&&(k.value.menuDisplay.copyImg=!0))}const Z=s.x,oe=s.y;b.style.marginLeft=Z+"px",b.style.marginTop=oe+"px";let ue=b.clientWidth;k.value.menuDisplay.showRespond&&(ue=b.children[0].clientWidth);const Se=window.innerWidth;Z+ue>Se+27&&(b.style.marginLeft=Se+7-ue+"px"),k.value.showMsgMenu=!0,pt(()=>{const ce=b.clientHeight,je=document.body.clientHeight;oe+ce>je-20&&(b.classList.add("topOut"),b.style.marginTop=je-ce-10+"px")})}}function st(){k.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 Mt(s=!0){const c=A.value;c&&(Ge(c),s&&Ze())}function Ge(s){const c=s.message_id;A.value=s,Nt({msgObj:{type:"reply",id:String(c)},addText:!1,addTop:!0}),k.value.isReply=!0,Qt()}function Ye(){S.value=S.value.filter(s=>s.type!=="reply"),k.value.isReply=!1}function rt(){var c;if(!A.value)return;const s=((c=A.value)==null?void 0:c._rawSatori)??A.value;try{console.log(JSON.stringify(s,null,2))}catch{console.dir(s,{depth:null})}Ze()}function Ue(){Q.value=w.userList,k.value.showForwardPan=!1,R.value="single-message",Ze()}function At(s,...c){const b=s;for(const U of c){const E=b[U],X=typeof E=="string"||typeof E=="number"?String(E):"";if(X&&X!=="undefined")return X}return""}function vt(s){if(s.group_id)return At(s,"group_name","name")||String(s.group_id);const c=At(s,"nickname","name","nick","username","remark")||String(s.user_id??""),b=String(s.user_id??"");return b?`${c}(${b})`:c}function St(s){const c=s.target.value;Q.value=w.userList.filter(b=>{const U=b.user_id?At(b,"nickname","name","nick","remark")||String(b.user_id):At(b,"group_name","name")||String(b.group_id||""),E=String(b.user_id??b.group_id??"");return U.toLowerCase().indexOf(c.toLowerCase())!==-1||E.length>0&&E===c})}function Ie(s="single-message"){R.value=s,k.value.showForwardPan=!0,[...w.onMsgList].reverse().forEach(b=>{const U=Q.value.indexOf(b);U>-1&&(Q.value.splice(U,1),Q.value.unshift(b))}),Ze()}function cn(){if(A.value){const s=JSON.parse(JSON.stringify(A.value));Pt(n.chat.show.id,n.chat.show.type,s.message,!0)}Ze()}function $t(){A.value&&g.value.push(A.value.message_id),Ze()}function Rt(s){const c=Ci(s);if(typeof structuredClone=="function")try{return structuredClone(c)}catch{return JSON.parse(JSON.stringify(c))}return JSON.parse(JSON.stringify(c))}function Rn(s){const c=R.value,b=A.value?Rt(A.value):null,U=s.group_id?s.group_id:s.user_id,E=String(U),X=s.group_id?"group":"user",Z=String(s.channel_id??s.channelId??""),oe=String(s.guild_id??s.guildId??""),ue=u.messageList.filter(ce=>g.value.includes(ce.message_id)),Se=()=>String(n.chat.show.id)===E&&n.chat.show.type===X;if(c!=="single-message"&&ue.length===0){Ue();return}if(c==="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(je=>{Pt(E,X,Rt(je.message),Se(),"sendMsgBack",Z||void 0,oe||void 0)}),g.value=[],e.popBoxList.shift(),ye(s,U)}}]};e.popBoxList.push(ce)}else if(c==="merged-messages"){const ce={app:"com.tencent.multimsg",meta:{detail:{source:f("合并转发消息"),news:[...ue.slice(0,3).map(Ce=>({text:(Ce.sender.card&&Ce.sender.card!=""?Ce.sender.card:Ce.sender.nickname)+": "+on(Ce)}))],summary:f("查看 {count} 条转发消息",{count:ue.length}),resid:""}}},je={message:[{type:"json",data:JSON.stringify(ce),id:""}],sender:{user_id:l.loginInfo.uin,nickname:l.loginInfo.nickname,avatar:l.loginInfo.avatar}},tt={title:f("合并转发消息"),template:an(rn),templateValue:an({data:je,type:"forward"}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:async()=>{const Ce=ue.map(qe=>{var bt,Ht,Zt;return{type:"node",id:qe.message_id,user_id:String(((bt=qe.sender)==null?void 0:bt.user_id)??""),nickname:String(((Ht=qe.sender)==null?void 0:Ht.card)||((Zt=qe.sender)==null?void 0:Zt.nickname)||""),time:qe.time,content:Rt(qe.message)}}),ft=await Lo(String(l.loginInfo.platform??""),String(l.loginInfo.uin??""),X,E,Ce,Z||void 0);if(!ft.ok)new dt().add(De.ERR,f("合并转发发送失败"));else{const qe=Date.now(),bt={fake_msg:"pending",message_id:"forward-"+qe,fake_message_id:"forward-"+qe,message_type:X,channel_type:X==="group"?0:1,time:Math.floor(qe/1e3),local_time:qe,timestamp_ms:qe,post_type:"message",sender:{user_id:String(l.loginInfo.uin??""),nickname:String(l.loginInfo.nickname??""),avatar:String(l.loginInfo.avatar??"")},message:[{type:"forward",id:"",content:Ce.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("聊天记录")}]`};Se()&&(u.messageList.push(bt),pt(()=>{tn("chat-"+bt.message_id,!0)}));const Ht=ft.channelId||Z||E;ft.native&&!ft.messageId||await $o({id:String(bt.fake_message_id??""),platform:String(l.loginInfo.platform??""),selfId:String(l.loginInfo.uin??""),channelId:Ht,guildId:oe||void 0,channelType:X,messageId:ft.messageId,content:String(bt.raw_message??""),message:bt.message,forwardContent:Ce,source:"webui",sentAt:qe,timestamp:Math.floor(qe/1e3),timestampMs:qe,kind:"forward"});const Zt=Z||E,Gt=w.baseOnMsgList.get(yn(Zt));if(Gt){const Bt=`[${f("聊天记录")}]`;Gt.raw_msg_base=Bt,Gt.raw_msg=Gt.group_id?`${String(l.loginInfo.nickname??"")}: ${Bt}`:Bt,Gt.time=Math.floor(qe/1e3),w.baseOnMsgList.set(yn(Zt),Gt),Ro()}}g.value=[],e.popBoxList.shift(),ye(s,U)}}]};e.popBoxList.push(tt)}else if(A.value&&b){const ce={title:f("转发消息"),template:an(rn),templateValue:an({data:b,type:"forward"}),button:[{text:f("取消"),fun:()=>{e.popBoxList.shift()}},{text:f("确定"),master:!0,fun:()=>{Pt(E,X,Rt(b.message),Se(),"sendMsgBack",Z||void 0,oe||void 0),e.popBoxList.shift(),ye(s,U)}}]};e.popBoxList.push(ce)}}function ye(s,c){Ue();const b=String(s.channel_id??s.channelId??c??"");w.baseOnMsgList.get(yn(b))==null&&w.baseOnMsgList.set(yn(b),s),pt(()=>{const U=document.getElementById("user-"+c);U&&U.click()})}function lt(){const s=A.value;if(s!==null){s.raw_message||(s.raw_message=on(s));const c=new dt;Yt.config.globalProperties.$copyText(s.raw_message).then(()=>{c.add(De.INFO,f("复制成功"),!0)},()=>{c.add(De.ERR,f("复制失败"),!0)})}Ze()}function Tt(){if(_.value!=""){const s=new dt;Yt.config.globalProperties.$copyText(_.value).then(()=>{s.add(De.INFO,f("复制成功"),!0)},()=>{s.add(De.ERR,f("复制失败"),!0)})}Ze()}async function xt(){const s=k.value.menuDisplay.downloadImg;if(!s)return;Ze();const{blob:c,buffer:b}=await Do(s),U=new dt;if(yt.type==="tauri")try{await(await Ti(()=>import("./index-Cg_esKB0.js"),__vite__mapDeps([0,1]),import.meta.url)).writeImage(b),U.add(De.INFO,f("复制成功"))}catch(E){U.add(De.ERR,f("复制失败")),new Ot().error(E,"复制图片失败")}else{const E=new ClipboardItem({[c.type]:c});try{await Bo([E]),U.add(De.INFO,f("复制成功"))}catch(X){U.add(De.ERR,f("复制失败")),new Ot().error(X,"复制图片失败")}}}function Wt(){const s=k.value.menuDisplay.downloadImg;s!=!1&&Oo(s,`img_${new Date().getTime()}.png`,()=>{},()=>{}),Ze()}async function fn(){const s=A.value;if(Ze(),!s){new dt().add(De.ERR,f("获取选中消息失败"));return}const c=s.message_id,b=String(s.channel_id??s.channelId??u.chatInfo.show.channel_id??n.chat.show.id);try{await it.callApi("delete_msg",{channel_id:b,message_id:c})}catch{new dt().add(De.ERR,f("撤回失败"));return}s.revoke=!0,s.revoked=!0,s.revokeTime=Date.now()/1e3}async function Xe(){const s=A.value;if(Ze(),!s){new dt().add(De.ERR,f("获取选中消息失败"));return}const c=s.message_id,b=String(s.channel_id??s.channelId??u.chatInfo.show.channel_id??n.chat.show.id);await it.callApi("delete_msg",{channel_id:b,message_id:c}),ho(s)}function Dt(){const s=A.value;if(s!==null){const c={title:f("提醒"),html:`<span>${f("真的要将 {user} 移出群聊吗",{user:s.sender.nickname})}</span>`,button:[{text:f("确定"),fun:()=>{s&&(it.send("set_group_kick",{group_id:u.chatInfo.show.id,user_id:s.sender.user_id},"setGroupKick"),Ze(),e.popBoxList.shift())}},{text:f("取消"),master:!0,fun:()=>{e.popBoxList.shift()}}]};e.popBoxList.push(c)}}function Ze(){k.value.showMsgMenu=!1,k.value.menuDisplay.menuSelectedMsgId=null,setTimeout(()=>{st()},300)}function ct(){var s,c,b,U,E,X,Z;if(k.value.openChatInfo=!k.value.openChatInfo,k.value.openChatInfo){if(n.chat.show.type==="group"&&((s=n.chat.info.group_info)==null?void 0:s.gc)!==n.chat.show.id){const ue=`https://qinfo.clt.qq.com/cgi-bin/qun_info/get_group_info_all?gc=${n.chat.show.id}&bkn=${l.loginInfo.bkn}`;it.send("http_proxy",{url:ue},"getMoreGroupInfo")}else if(n.chat.show.type==="user"&&((c=n.chat.info.user_info)==null?void 0:c.uin)!==n.chat.show.id){const ue=(U=(b=l.jsonMap)==null?void 0:b.friend_info)==null?void 0:U.name;ue!=null&&it.send(ue,{user_id:n.chat.show.id},"getMoreUserInfo")}const oe=(X=(E=l.jsonMap)==null?void 0:E.group_notices)==null?void 0:X.name;if(n.chat.show.type==="group"&&(n.chat.info.group_notices===void 0||Object.keys(n.chat.info.group_notices??{}).length===0)&&oe&&it.send(oe,{group_id:n.chat.show.id},"getGroupNotices"),n.chat.show.type==="group"&&Object.keys(n.chat.info.group_files??{}).length===0){const ue=(Z=l.jsonMap.group_files)==null?void 0:Z.name;ue&&it.send(ue,{group_id:n.chat.show.id},"getGroupFiles")}}}function dn(s,c,b){let U=-1;for(let E=0;E<b;E++)if(U=s.indexOf(c,U+1),U<0)return s;return U<0?s:s.slice(0,U)+s.slice(U+c.length)}function ei(s){const c=S.value[s];if((c==null?void 0:c.type)==="image")return"[图片]";if((c==null?void 0:c.type)==="at"){const b=String(c.qq??c.id??""),U=u.chatInfo.info.group_members.find(X=>String(X.user_id)===b);return"[@"+String(c.text||(U==null?void 0:U.card)||(U==null?void 0:U.nickname)||b)+"]"}return"[SQ:"+s+"]"}function Dn(s){var b;M.value.delete(s);const c=S.value[s];if((c==null?void 0:c.type)==="image"){let U=0;for(let E=0;E<=s;E++)((b=S.value[E])==null?void 0:b.type)==="image"&&U++;x.value=dn(x.value,"[图片]",U)}else x.value=x.value.replace("[SQ:"+s+"]",""),x.value=x.value.replace("[SQ:"+s,"")}async function Wi(s){const c=M.value.get(s);if(!c||!(D!=null&&D.value))return;const b=await D.value.edit(c);M.value.set(s,b)}function Nt(s){const c=document.getElementById("main-input")??document.getElementById("main-input-ex");if(s!==void 0){if(s.msgObj.type==="at"){const X=String(s.msgObj.qq??s.msgObj.id??""),Z=u.chatInfo.info.group_members.find(oe=>String(oe.user_id)===X);s.msgObj={...s.msgObj,qq:X,text:String((Z==null?void 0:Z.card)||(Z==null?void 0:Z.nickname)||X)}}const b=S.value.length;if(S.value.push(s.msgObj),!s.addText)return b;const U=ei(b),E=s.msgObj.type==="at"?" ":"";if(s.addTop===!0)x.value=U+E+x.value;else{const X=c==null?void 0:c.selectionStart,Z=(c==null?void 0:c.selectionEnd)??X;if(X!=null){const oe=x.value.substring(0,X),ue=x.value.substring(Z,x.value.length);x.value=oe+U+E+ue,pt(()=>{const Se=X+U.length+E.length;c.selectionStart=Se,c.selectionEnd=Se})}else x.value+=U+E}return b}return-1}function ti(s){if(s.clipboardData&&s.clipboardData.items)for(let c=0,b=s.clipboardData.items.length;c<b;c++){const U=s.clipboardData.items[c];U.kind==="file"&&(Bn(U.getAsFile()),s.preventDefault())}}function ni(){const s=document.getElementById("choice-pic");s&&s.click()}function Qi(s){k.value.showMoreDetail=!1;const c=s.target;c&&c.files&&Bn(c.files[0])}function ii(){const s=document.getElementById("choice-file");s&&s.click()}function Gi(){const s=document.getElementById("choice-video");s&&s.click()}function Ki(s){k.value.showMoreDetail=!1;const c=s.target;if(c.files!=null){const b=c.files[0],U=b.name;if(b.size>500*1024*1024){const X={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(X)}else Yi(b,U);c.value=""}}function Ji(s){k.value.showMoreDetail=!1;const c=s.target;if(c.files!=null){const b=c.files[0],U=b.name;b.size>500*1024*1024?new dt().add(De.ERR,f("视频文件不能超过 500MB")):Xi(b,U),c.value=""}}function oi(s,c,b){const U=c??s.name??f("未知文件"),E=Ho({fileName:U,fileSize:s.size,execute:X=>{const Z=new FileReader;Z.onprogress=oe=>{oe.lengthComputable&&X(oe.loaded,oe.total)},Z.readAsDataURL(s),Z.onloadend=()=>{let oe=Z.result;oe=oe.substring(oe.indexOf("base64,")+7,oe.length),S.value=[],M.value.clear(),x.value="",Nt({addText:!0,msgObj:{type:b,file:"base64://"+oe,name:U}}),Xt("sendFileBack_"+E)},Z.onerror=()=>{Po(E,"文件读取失败")}}})}function Yi(s,c){oi(s,c,"file")}function Xi(s,c){oi(s,c,"video")}async function Zi(s){if(s.type==="image/gif"||/\.gif$/i.test(s.name||""))return!0;try{const c=await s.slice(0,6).arrayBuffer(),b=new Uint8Array(c);return b.length>=6&&b[0]===71&&b[1]===73&&b[2]===70&&b[3]===56&&(b[4]===55||b[4]===57)&&b[5]===97}catch{return!1}}async function Bn(s){const c=new dt;if(!s||!s.type.includes("image/")||s.size===0)return;const b=await Zi(s);if(s.size>3145728&&!b){const Z={maxSizeMB:3,useWebWorker:!0};try{c.add(De.INFO,f("正在压缩图片 ……"));const oe=await ht(s,Z);new Ot().add(vn.INFO,"图片压缩成功,原大小:"+s.size/1024/1024+" MB,压缩后大小:"+oe.size/1024/1024+" MB"),Bn(oe)}catch(oe){new Ot().error(oe,"图片压缩失败"),c.add(De.INFO,f("压缩图片失败"))}return}const U=await ai(s),E=S.value.length,X={type:"image",text:`[${f("图片")}]`};M.value.set(E,U),Nt({addText:!0,msgObj:X})}async function ai(s){return new Promise((c,b)=>{const U=new FileReader;U.onload=function(E){E.target?c(E.target.result):b(new Error("读取文件失败"))},U.onerror=function(E){b(E)},U.readAsDataURL(s)})}function eo(s){return new Promise((c,b)=>{const U=new FileReader;U.onload=function(E){var oe;const X=String(((oe=E.target)==null?void 0:oe.result)??""),Z=X.indexOf("base64,");c(Z>=0?X.slice(Z+7):X)},U.onerror=function(E){b(E)},U.readAsDataURL(s)})}function to(){var s;if(N.value){(s=F.value)==null||s.stop(),v.value=!1;return}v.value=!v.value}async function no(){var s,c;if(v.value=!1,!N.value){if(!((s=navigator.mediaDevices)!=null&&s.getUserMedia)||typeof MediaRecorder>"u"){new dt().add(De.ERR,f("当前浏览器不支持录音"));return}try{if((c=navigator.permissions)!=null&&c.query)try{if((await navigator.permissions.query({name:"microphone"})).state==="denied"){new dt().add(De.ERR,f("麦克风权限被拒绝,请在浏览器设置中允许访问麦克风"));return}}catch{}const b=await navigator.mediaDevices.getUserMedia({audio:!0});I=[];const U=new MediaRecorder(b);F.value=U,N.value=!0,U.ondataavailable=E=>{E.data.size>0&&I.push(E.data)},U.onstop=async()=>{N.value=!1,F.value=null,b.getTracks().forEach(ue=>ue.stop());const E=new Blob(I,{type:U.mimeType||"audio/webm"}),X=await eo(E),Z=U.mimeType.includes("mp4")?"voice.m4a":"voice.webm",oe=U.mimeType.includes("mp4")?"audio/mp4":"audio/webm";I.length>0&&(p.value={type:"record",file:"base64://"+X,url:`data:${oe};base64,${X}`,fileName:Z,name:f("语音")},x.value="",S.value=[],M.value.clear()),I=[]},U.start()}catch(b){N.value=!1,F.value=null,b instanceof DOMException&&b.name==="NotAllowedError"&&new dt().add(De.ERR,f("麦克风权限被拒绝,请在浏览器设置中允许访问麦克风")),new Ot().error(b,f("录音失败"))}}}function io(){p.value=null,v.value=!1,I=[],x.value="",Qt()}function oo(){v.value=!1;const s=document.getElementById("choice-audio");s==null||s.click()}async function ao(s){var E;const c=s.target,b=(E=c.files)==null?void 0:E[0];if(c.value="",!b)return;if(!b.type.startsWith("audio/")&&!/\.(mp3|wav|m4a|aac|ogg|webm|flac)$/i.test(b.name)){new dt().add(De.ERR,f("请选择音频文件"));return}const U=await ai(b);p.value={type:"record",file:U,url:U,fileName:b.name,name:f("语音")},x.value="",S.value=[],M.value.clear(),I=[]}function Qt(){const s=document.getElementById("main-input")??document.getElementById("main-input-ex");s!==null&&s.focus()}function Xt(s="sendMsgBack"){if(T.value[3].open)return;if(T.value.forEach(b=>{b.open=!1}),p.value){const b=p.value;p.value=null,v.value=!1,I=[],n.chat.show.temp?Pt(n.chat.show.id+"/"+n.chat.show.temp,n.chat.show.type,[b],!0,s):Pt(n.chat.show.id,n.chat.show.type,[b],!0,s),x.value="",S.value=[],M.value.clear();return}for(const[b,U]of M.value)S.value[b]={type:"image",file:"base64://"+U.substring(U.indexOf("base64,")+7,U.length)};const c=vi.parseMsg(x.value,S.value,[]);n.chat.show.temp?Pt(n.chat.show.id+"/"+n.chat.show.temp,n.chat.show.type,c,!0,s):Pt(n.chat.show.id,n.chat.show.type,c,!0,s),k.value.checkNewLineFlag=!0,x.value="",S.value=[],M.value.clear(),H(),Ye(),be(void 0,!0)}function si(s,c){var U,E;if(c==0&&s>0){const X=((U=l.jsonMap.set_message_read)==null?void 0:U.name)??void 0;if(!X)return;let Z=((E=l.jsonMap.set_message_read)==null?void 0:E.private_name)??X;Z||(Z=X),u.chatInfo.show.type=="group"?it.send(X,{group_id:n.chat.show.id,message_id:n.list[n.list.length-1].message_id},"setMessageRead"):it.send(Z,{user_id:n.chat.show.id,message_id:n.list[n.list.length-1].message_id},"setMessageRead"),So()&&Qt()}k.value.showBottomButton&&!e.nowGetHistory&&c>0&&(P.value!==0?P.value=P.value+Math.abs(s-c):P.value=Math.abs(s-c));const b=document.getElementById("msgPan");if(b!==null){const X=b.scrollHeight;pt(()=>{const Z=document.getElementById("msgPan");Z!==null&&(e.nowGetHistory&&Ee(Z.scrollHeight-X,!1),e.nowGetHistory||((ve||c<=0)&&Ee(Z.scrollHeight),c<=0&&(Ee(Z.scrollHeight,!1),Qe()),Je()));const oe=()=>{const ue=[];for(const Se of n.list)if(Se.message!==void 0)for(const ce of Se.message)ce.type==="image"&&ce.file!="marketface"&&ue.push(ce.url||ce.file);return ue};J.value=Vn.fromList(oe()),u.chatInfo.show&&u.chatInfo.show.jump&&(new Ot().debug("进入跳转至消息:"+u.chatInfo.show.jump),V("chat-"+u.chatInfo.show.jump),u.chatInfo.show.jump=void 0)})}}function so(s,c){const b=c.message_id;g.value.length>0&&(g.value.indexOf(b)>-1?g.value=g.value.filter(U=>U!=b):g.value.push(b))}function ro(){new dt().add(De.INFO,f("欸嘿,这个按钮只是用来占位置的"))}function lo(){const s=n.list.filter(E=>g.value.indexOf(E.message_id)>-1);let c="",b="";s.forEach(E=>{const X=new Date(Uo(E.time)),Z=X.getFullYear()+"-"+(X.getMonth()+1)+"-"+X.getDate();Z!=b&&(c+=`
24
- —— `+Z+` ——
25
- `,b=Z),c+=E.sender.nickname+" "+X.getHours()+":"+X.getMinutes()+":"+X.getSeconds()+`
26
- `+on(E)+`
27
-
28
- `});const U=new dt;Yt.config.globalProperties.$copyText(c).then(()=>{U.add(De.INFO,f("复制成功"),!0),g.value=[]},()=>{U.add(De.ERR,f("复制失败"),!0)})}async function uo(){const s=n.list.filter(b=>g.value.includes(b.message_id)),c=[];for(const b of s){const U=b.message_id,E=String(b.channel_id??b.channelId??u.chatInfo.show.channel_id??n.chat.show.id);c.push(it.callApi("delete_msg",{channel_id:E,message_id:U}))}g.value=[],await Promise.all(c)}async function ri(s){const c=s.target;be(c);const b=zo(x.value,q.value);let{end:U,str:E}={end:0,str:""};if(b.length>0&&({end:U,str:E}=b[0]),E.indexOf("]")>=0){const X=q.value.substring(0,U),Z=X.lastIndexOf("[图片]");if(Z>=0&&Z<U){let Se=0,ce=-1;for(;(ce=X.indexOf("[图片]",ce+1))>=0;)Se++;const tt=S.value.map((Ce,ft)=>(Ce==null?void 0:Ce.type)==="image"?ft:-1).filter(Ce=>Ce>=0)[Se-1];tt!==void 0&&M.value.has(tt)&&Dn(tt)}const oe=q.value.substring(0,U).lastIndexOf("[SQ:");if(oe>=0&&oe<U){const Se=q.value.substring(oe),je=q.value.slice(oe,Se.indexOf("]")+oe+1).replace("[SQ:","").replace("]",""),tt=Number(je);!isNaN(tt)&&M.value.has(tt)&&Dn(tt)}if(q.value.substring(0,U).match(/\[@[^\]]+\]$/)){const Se=S.value.findIndex(ce=>(ce==null?void 0:ce.type)==="at");Se>=0&&S.value.splice(Se,1)}}if(T.value[3].open){C.value&&(clearTimeout(C.value),C.value=null);const X=c.value;if(X.length==0)z.value++,k.value.search.list=gn(n.list);else if(t.sysConfig.enable_local_history){const Z=++z.value;C.value=setTimeout(async()=>{const oe=await No(l.loginInfo.uin,u.chatInfo.show.channel_id??u.chatInfo.show.id,X);Z!==z.value||!T.value[3].open||(k.value.search.list=oe)},180)}else z.value++,k.value.search.list=n.list.filter(Z=>on(Z).indexOf(X)!==-1)}}function co(){T.value[3].open=!T.value[3].open,k.value.showMoreDetail=!k.value.showMoreDetail}function li(){C.value&&(clearTimeout(C.value),C.value=null),z.value++,T.value[3].open=!T.value[3].open,x.value="",k.value.search.list=gn(n.list),be()}function fo(s){var c;if(l.jsonMap.poke){let b=(c=l.jsonMap.poke)==null?void 0:c.name;n.chat.show.type=="user"&&l.jsonMap.poke.private_name&&(b=l.jsonMap.poke.private_name),it.send(b,{user_id:s,group_id:n.chat.show.id},"sendPoke")}k.value.showMoreDetail=!1,k.value.menuDisplay.poke=!1}function ho(s){x.value="",S.value=[],M.value.clear(),Ye();for(const c of s.message)if(c.type==="text")x.value+=c.text;else if(c.type==="reply"){const b=n.list.find(U=>U.message_id==c.id);if(!b)continue;Ge(b)}else c.type==="record"||c.type==="audio"?(p.value={...c,name:c.name||f("语音")},x.value="",S.value=[],M.value.clear()):(Nt({addText:!1,msgObj:c}),x.value+=ei(S.value.length-1));Qt()}function mo(s){var b,U;const c=s.target;if(c.scrollTop+c.clientHeight===c.scrollHeight&&!k.value.isJinLoading&&n.chat.info.jin_info.is_end==!1){k.value.isJinLoading=!0;const E=((U=(b=l.jsonMap)==null?void 0:b.group_essence)==null?void 0:U.name)??"get_essence_msg_list";it.send(E,{group_id:n.chat.show.id,pages:n.chat.info.jin_info.pages+1},"getJin")}}function go(s){D!=null&&D.value&&D.value.open(new Vn(s))}function ui(s="default"){let c=!1;if(T.value.forEach(b=>{b.open&&(c=!0),b.open=!1}),!c){if(k.value.showMoreDetail){k.value.showMoreDetail=!1;return}switch(s){case"default":k.value.showMoreDetail=!0;break;case"img":ni();break;case"file":ii();break;case"face":T.value[1].open=!T.value[1].open;break}}}function On(){var c;const s=document.getElementById("chat-pan");if(s)return k.value.openChatInfo?s.getElementsByClassName("chat-info-pan")[0]:(c=L.value)!=null&&c.isMergeOpen()?s.getElementsByClassName("merge-pan")[0]:s}function hn(){var s,c;k.value.openChatInfo?ct():(s=L.value)!=null&&s.isMergeOpen()?((c=L.value)==null||c.closeMergeMsg(),setTimeout(()=>{const U=document.getElementById("chat-pan").getElementsByClassName("merge-pan")[0];U&&(U.style.transform="")},500)):(u.chatInfo.show.id=0,e.openSideBar=!0,new Ot().add(vn.UI,"右滑打开侧边栏触发完成"))}return(s,c)=>{var U;const b=Fn("font-awesome-icon");return xe((W(),ee("div",{id:"chat-pan",class:mt("chat-pan"+(B(e).openSideBar?" open":"")+(["linux","win32"].includes(B(yt).platform??"")?" withBar":"")),style:kn({"background-image":B(To)(B(t).sysConfig.chat_more_blur?"":B(t).sysConfig.chat_background),"background-position":B(t).sysConfig.chat_background_align??"center","background-size":B(t).sysConfig.chat_background_fit??"cover"}),onVMoveRight:c[20]||(c[20]=Un(E=>hn(),["prevent"]))},[qt(s.$slots,"chat-extra",{},void 0,!0),y("div",Ps,[ie(b,{class:"back",icon:["fas","angle-left"],onClick:hn}),y("img",{"data-avatar":"",src:n.chat.show.avatar||"/img/icons/icon.svg",onError:c[0]||(c[0]=(...E)=>B(In)&&B(In)(...E))},null,40,js),y("div",qs,[y("p",null,[pn(K(n.chat.show.name)+" ",1),n.chat.show.type=="group"?(W(),ee(_e,{key:0},[pn(" ("+K(n.chat.info.group_members.length)+") ",1)],64)):he("",!0)]),n.chat.show.temp?(W(),ee("span",Vs,K(B(f)("来自群聊:{group}",{group:n.chat.show.temp})),1)):(W(),ee("span",Ws,[n.chat.show.appendInfo?(W(),ee(_e,{key:0},[pn(K(n.chat.show.appendInfo),1)],64)):(W(),ee(_e,{key:1},[pn(K(n.list[n.list.length-1]?B(f)("上次消息 - {time}",{time:Intl.DateTimeFormat(B(ne),{hour:"numeric",minute:"numeric",second:"numeric"}).format(new Date(n.list[n.list.length-1].time*1e3))}):B(f)("暂无消息")),1)],64))]))]),c[21]||(c[21]=y("div",{class:"space"},null,-1)),y("div",Qs,[ie(b,{icon:["fas","ellipsis-vertical"],onClick:ct})])]),y("div",{class:mt("loading"+(B(e).nowGetHistory&&B(e).canLoadHistory?" show":""))},[ie(b,{icon:["fas","spinner"]}),y("span",null,K(B(f)("加载中")),1)],2),y("div",{id:"msgPan",ref_key:"msgPan",ref:i,class:"chat",style:{"scroll-behavior":"smooth"},onScroll:c[1]||(c[1]=E=>Ct(E,T.value[3].open))},[T.value[3].open?(W(),Ae(qn,{key:1,name:B(t).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:kt(()=>[(W(!0),ee(_e,null,gt(k.value.search.list,(E,X)=>(W(),ee(_e,null,[B(jn)(n.list[Number(X)-1]?n.list[Number(X)-1].time:void 0,E.time)?(W(),Ae(jt,{key:"notice-time-"+X,data:{sub_type:"time",time:E.time}},null,8,["data"])):he("",!0),(E.post_type==="message"||E.post_type==="message_sent")&&E.message.length>0?(W(),Ae(rn,{key:E.fake_message_id??E.message_id,selected:g.value.includes(E.message_id)||k.value.menuDisplay.menuSelectedMsgId==E.message_id,selecting:g.value.length>0,data:E,onScrollToMsg:B(tn),onShowMenu:Oe,onImageLoaded:te,onLeftMove:Ge,onContentRendered:Qe},null,8,["selected","selecting","data","onScrollToMsg"])):he("",!0)],64))),256))]),_:1},8,["name"])):(W(),ee(_e,{key:0},[B(e).canLoadHistory?he("",!0):(W(),ee("div",Gs,[c[22]||(c[22]=y("hr",null,null,-1)),y("a",null,K(B(f)("没有更多消息了")),1)])),B(e).loadHistoryFail?(W(),ee("div",Ks,[c[23]||(c[23]=y("hr",null,null,-1)),y("a",null,K(B(f)("获取历史记录失败")),1)])):he("",!0),B(e).nowGetHistory&&n.list.length>0?(W(),Ae(jt,{key:2,data:{sub_type:"time",time:n.list[0].time}},null,8,["data"])):he("",!0),ie(qn,{name:B(t).sysConfig.opt_fast_animation?"":"msglist",tag:"div"},{default:kt(()=>[(W(!0),ee(_e,null,gt(n.list,(E,X)=>(W(),ee(_e,null,[B(jn)(n.list[Number(X)-1]?n.list[Number(X)-1].time:void 0,E.time)?(W(),Ae(jt,{key:"notice-time-"+(E.time/240).toFixed(0),data:{sub_type:"time",time:E.time}},null,8,["data"])):he("",!0),B(Fi)(E)?(W(),Ae(jt,{key:"delete-"+E.message_id,data:{sub_type:"delete"}})):(E.post_type==="message"||E.post_type==="message_sent")&&E.message.length>0?(W(),Ae(rn,{key:E.fake_message_id??E.message_id,selected:g.value.includes(E.message_id)||k.value.menuDisplay.menuSelectedMsgId==E.message_id,selecting:g.value.length>0,data:E,"image-list-header":J.value,onClick:Z=>so(Z,E),onShowMenu:Oe,onScrollToMsg:B(tn),onImageLoaded:te,onLeftMove:Ge,onSendPoke:fo,onContentRendered:Qe},null,8,["selected","selecting","data","image-list-header","onClick","onScrollToMsg"])):E.post_type==="notice"?(W(),Ae(jt,{id:B(xi)(),key:"notice-"+X,data:E},null,8,["id","data"])):he("",!0)],64))),256))]),_:1},8,["name"])],64)),y("span",{ref_key:"chatPadding",ref:a,class:"chat-padding"}," ",512)],544),y("div",{class:"new-msg",style:kn({opacity:k.value.showBottomButton?1:0}),onClick:c[2]||(c[2]=E=>H(!0))},[y("div",Js,[ie(b,{icon:["fas","angle-down"]}),P.value>0?(W(),ee("span",Ys,K(P.value),1)):he("",!0)])],4),y("div",{id:"send-more",ref_key:"sendMore",ref:o,class:"more"},[y("div",null,[y("div",null,[ie(nn,{name:"pan"},{default:kt(()=>[xe(ie(Es,{onAddSpecialMsg:Nt,onSendMsg:Xt},null,512),[[nt,T.value[1].open]])]),_:1}),ie(nn,{name:"pan"},{default:kt(()=>[xe(y("div",Xs,[y("div",null,[ie(b,{icon:["fas","message"]}),y("span",null,K(B(f)("精华消息")),1),ie(b,{icon:["fas","xmark"],onClick:c[3]||(c[3]=E=>T.value[2].open=!T.value[2].open)})]),y("div",{class:"jin-pan-body",onScroll:mo},[(W(!0),ee(_e,null,gt(n.chat.info.jin_info.list,(E,X)=>(W(),ee("div",{key:"jin-"+X},[y("div",null,[y("img",{"data-avatar":"",src:E.sender_avatar||"/img/icons/icon.svg"},null,8,Zs),y("div",null,[y("a",null,K(E.sender_nick),1),y("span",null,K(E.sender_time?Intl.DateTimeFormat(B(ne),{hour:"numeric",minute:"numeric"}).format(new Date(E.sender_time*1e3)):"")+" "+K(B(f)("发送")),1)]),y("span",null,K(B(f)("{time},由 {name} 设置",{time:E.sender_time?Intl.DateTimeFormat(B(ne),{hour:"numeric",minute:"numeric"}).format(new Date(E.sender_time*1e3)):"",name:E.add_digest_nick})),1)]),y("div",er,[(W(!0),ee(_e,null,gt(E.msg_content,(Z,oe)=>(W(),ee(_e,{key:"jinc-"+X+"-"+oe},[Z.type==="text"?(W(),ee("span",tr,K(Z.data.text),1)):he("",!0),Z.type==="face"?(W(),Ae(Wn,{key:1,emoji:B(sn).get(Number(Z.data.id))},null,8,["emoji"])):he("",!0),Z.type==="image"?(W(),ee("img",{key:2,src:Z.data.url,onClick:ue=>go(Z.data.url)},null,8,nr)):he("",!0)],64))),128))])]))),128)),xe(y("div",ir,[ie(b,{icon:["fas","spinner"]})],512),[[nt,k.value.isJinLoading]])],32)],512),[[nt,T.value[2].open&&n.chat.info.jin_info.list.length>0]])]),_:1})]),y("div",{class:mt(g.value.length>0?"select-tag show":"select-tag")},[y("div",null,[ie(b,{icon:["fas","share-from-square"],onClick:c[4]||(c[4]=E=>Ie("individual-messages"))}),y("span",null,K(B(f)("逐条转发")),1)]),y("div",null,[ie(b,{icon:["fas","share"],onClick:c[5]||(c[5]=E=>Ie("merged-messages"))}),y("span",null,K(B(f)("合并转发")),1)]),y("div",null,[ie(b,{icon:["fas","scissors"]}),y("span",null,K(B(f)("截图")),1)]),y("div",null,[ie(b,{icon:["fas","trash-can"],onClick:ro}),y("span",null,K(B(f)("删除")),1)]),y("div",null,[ie(b,{icon:["fas","copy"],onClick:lo}),y("span",null,K(B(f)("复制")),1)]),y("div",null,[ie(b,{icon:["fas","xmark"],onClick:uo}),y("span",null,K(B(f)("撤回")),1)]),y("div",null,[y("span",{onClick:c[6]||(c[6]=E=>g.value=[])},K(g.value.length),1),y("span",null,K(B(f)("取消")),1)])],2),ie(nn,{name:"img-pan"},{default:kt(()=>[xe(y("div",{class:mt({"img-pan":!0,"ss-card":!0}),onWheel:c[7]||(c[7]=E=>E.currentTarget.scrollLeft+=E.deltaY)},[y("div",or,[(W(!0),ee(_e,null,gt(M.value,([E,X])=>(W(),ee("div",{key:"imgCache-"+E},[y("div",ar,[y("div",{onClick:Z=>Wi(E)},[ie(b,{icon:["fas","pencil"]})],8,sr),c[24]||(c[24]=y("hr",null,null,-1)),y("div",{onClick:Z=>Dn(E)},[ie(b,{style:{color:"var(--color-red)"},icon:["fas","xmark"]})],8,rr)]),y("div",lr,[y("img",{src:X,alt:"[图片]"},null,8,ur)]),y("span",null,"#"+K(E),1)]))),128))])],544),[[nt,M.value.size>0]])]),_:1}),y("div",{class:mt(T.value[3].open?"search-tag show":"search-tag")},[ie(b,{icon:["fas","search"]}),y("span",null,K(B(t).sysConfig.enable_local_history?B(f)("搜索已保存的消息"):B(f)("搜索已加载的消息")),1),y("div",{onClick:li},[ie(b,{icon:["fas","xmark"]})])],2),y("div",{class:mt(k.value.isReply?"replay-tag show":"replay-tag")},[ie(b,{icon:["fas","reply"]}),y("span",null,K(A.value===null?"":A.value.sender.nickname+": "+B(on)(A.value)),1),y("div",{onClick:Ye},[ie(b,{icon:["fas","xmark"]})])],2),y("div",{class:mt($.value!=null?"at-tag show":"at-tag"),contenteditable:"true",onBlur:c[8]||(c[8]=E=>Be(void 0))},[(W(!0),ee(_e,null,gt($.value!=null?$.value:[],(E,X)=>(W(),ee("div",{key:"atFind-"+E.user_id,class:mt({selected:X===m.value}),onClick:Z=>Be(E.user_id)},[c[25]||(c[25]=y("img",{src:"/img/icons/icon.svg"},null,-1)),y("span",null,K(E.card!=""&&E.card!=null?E.card:E.nickname),1),y("a",null,K(E.user_id),1)],10,cr))),128)),((U=$.value)==null?void 0:U.length)==0?(W(),ee("div",fr,[y("span",null,K(B(f)("没有找到匹配的群成员")),1)])):he("",!0)],34),y("div",{class:mt((k.value.showMoreDetail?"more-detail show":"more-detail")+(v.value?" voice-menu-open":"")),onClick:c[10]||(c[10]=E=>v.value=!1)},[y("div",{title:B(f)("图片"),onClick:ni},[ie(b,{icon:["fas","image"]}),y("input",{id:"choice-pic",type:"file",accept:"image/*",style:{display:"none"},onChange:Qi},null,32),y("label",hr,K(B(f)("选择图片")),1)],8,dr),y("div",{title:B(f)("文件"),onClick:ii},[ie(b,{icon:["fas","folder"]}),y("input",{id:"choice-file",type:"file",style:{display:"none"},onChange:Ki},null,32),y("label",gr,K(B(f)("选择文件")),1)],8,mr),y("div",{title:B(f)("视频"),onClick:Gi},[ie(b,{icon:["fas","video"]}),y("input",{id:"choice-video",type:"file",accept:"video/*",style:{display:"none"},onChange:Ji},null,32),y("label",pr,K(B(f)("选择视频")),1)],8,vr),y("div",yr,[y("div",{title:N.value?B(f)("停止录音"):B(f)("发送语音"),class:mt({active:N.value}),onClick:Un(to,["stop"])},[ie(b,{icon:["fas",N.value?"stop":"microphone"]},null,8,["icon"])],10,wr),v.value?(W(),ee("div",{key:0,class:"voice-menu",onClick:c[9]||(c[9]=Un(()=>{},["stop"]))},[y("div",{onClick:no},K(B(f)("浏览器录音")),1),y("div",{onClick:oo},K(B(f)("音频文件")),1)])):he("",!0),y("input",{id:"choice-audio",type:"file",accept:"audio/*",style:{display:"none"},onChange:ao},null,32)]),c[26]||(c[26]=y("div",{class:"space"},null,-1)),y("div",{title:B(f)("搜索消息"),onClick:co},[ie(b,{icon:["fas","search"]})],8,br)],2)]),y("div",null,[xe((W(),ee("div",{onClick:c[11]||(c[11]=E=>ui(B(t).sysConfig.quick_send))},[k.value.showMoreDetail||T.value.find(E=>E.open)?(W(),Ae(b,{key:0,icon:["fas","minus"]})):B(t).sysConfig.quick_send=="default"?(W(),Ae(b,{key:1,icon:["fas","plus"]})):B(t).sysConfig.quick_send=="img"?(W(),Ae(b,{key:2,icon:["fas","image"]})):B(t).sysConfig.quick_send=="file"?(W(),Ae(b,{key:3,icon:["fas","folder"]})):he("",!0)])),[[B(Mo),E=>ui(),void 0,{prevent:!0}]]),y("div",null,[y("form",{onSubmit:ut},[p.value?(W(),ee("div",{key:0,id:"voice-pending-input",class:"voice-pending",role:"button",onClick:io},[y("span",null,"["+K(B(f)("语音"))+"]",1),ie(b,{icon:["fas","xmark"]})])):(W(),ee(_e,{key:1},[B(t).sysConfig.send_key==="none"?(W(),ee(_e,{key:0},[y("label",kr,K(B(f)("消息输入框")),1),xe(y("input",{id:"main-input",ref_key:"mainInput",ref:d,"onUpdate:modelValue":c[12]||(c[12]=E=>x.value=E),type:"text",autocomplete:"off",disabled:B(e).openSideBar||n.chat.info.me_info.shut_up_timestamp>0,placeholder:n.chat.info.me_info.shut_up_timestamp>0?B(f)("已被禁言至:{time}",{time:Intl.DateTimeFormat(B(ne),B(Ai)(new Date(n.chat.info.me_info.shut_up_timestamp*1e3))).format(new Date(n.chat.info.me_info.shut_up_timestamp*1e3))}):"",onPaste:ti,onKeydown:ae,onKeyup:Me,onClick:ke,onInput:ri},null,40,_r),[[ln,x.value]])],64)):(W(),ee(_e,{key:1},[y("label",Ir,K(B(f)("消息输入框")),1),xe(y("textarea",{id:"main-input-ex",ref_key:"mainInput",ref:d,"onUpdate:modelValue":c[13]||(c[13]=E=>x.value=E),type:"text",disabled:B(e).openSideBar,onPaste:ti,onKeydown:se,onKeyup:Me,onClick:ke,onInput:ri,onCompositionstart:le,onCompositionend:fe},null,40,Sr),[[ln,x.value]])],64))],64))],32),qt(s.$slots,"main-input-button",{},void 0,!0),y("div",{onClick:c[14]||(c[14]=E=>Xt("sendMsgBack"))},[T.value[3].open?(W(),Ae(b,{key:0,icon:["fas","search"]})):(W(),Ae(b,{key:1,icon:["fas","angle-right"]}))])])]),c[27]||(c[27]=y("div",null,null,-1))],512),ie($s,{ref_key:"mergePan",ref:L},null,512),(W(),Ae(Ao,{to:"body"},[y("div",{class:mt("msg-menu"+(["linux","win32"].includes(B(yt).platform??"")?" withBar":""))},[xe(y("div",{class:"msg-menu-bg",onClick:Ze},null,512),[[nt,k.value.showMsgMenu]]),y("div",{id:"msgMenu",class:mt(k.value.showMsgMenu?"ss-card msg-menu-body show":"ss-card msg-menu-body")},[xe(y("div",{onClick:c[15]||(c[15]=E=>cn())},[y("div",null,[ie(b,{icon:["fas","plus"]})]),y("a",null,K(B(f)("+ 1")),1)],512),[[nt,k.value.menuDisplay.add]]),xe(y("div",{onClick:c[16]||(c[16]=E=>Mt(!0))},[y("div",null,[ie(b,{icon:["fas","message"]})]),y("a",null,K(B(f)("回复")),1)],512),[[nt,k.value.menuDisplay.relpy]]),xe(y("div",{onClick:c[17]||(c[17]=E=>Ie())},[y("div",null,[ie(b,{icon:["fas","share"]})]),y("a",null,K(B(f)("转发")),1)],512),[[nt,k.value.menuDisplay.forward]]),xe(y("div",{onClick:c[18]||(c[18]=E=>$t())},[y("div",null,[ie(b,{icon:["fas","circle-check"]})]),y("a",null,K(B(f)("多选")),1)],512),[[nt,k.value.menuDisplay.select]]),xe(y("div",{onClick:lt},[y("div",null,[ie(b,{icon:["fas","clipboard"]})]),y("a",null,K(B(f)("复制")),1)],512),[[nt,k.value.menuDisplay.copy]]),xe(y("div",{onClick:Tt},[y("div",null,[ie(b,{icon:["fas","code"]})]),y("a",null,K(B(f)("复制选中文本")),1)],512),[[nt,k.value.menuDisplay.copySelect]]),xe(y("div",{onClick:xt},[y("div",null,[ie(b,{icon:["fas","object-ungroup"]})]),y("a",null,K(B(f)("复制图片")),1)],512),[[nt,k.value.menuDisplay.copyImg]]),xe(y("div",{onClick:Wt},[y("div",null,[ie(b,{icon:["fas","floppy-disk"]})]),y("a",null,K(B(f)("下载图片")),1)],512),[[nt,k.value.menuDisplay.downloadImg!=!1]]),xe(y("div",{onClick:fn},[y("div",null,[ie(b,{icon:["fas","xmark"]})]),y("a",null,K(B(f)("撤回")),1)],512),[[nt,k.value.menuDisplay.revoke]]),xe(y("div",{onClick:Xe},[y("div",null,[ie(b,{icon:["fas","pencil"]})]),y("a",null,K(B(f)("重新编辑")),1)],512),[[nt,k.value.menuDisplay.reedit]]),xe(y("div",{onClick:c[19]||(c[19]=E=>{A.value&&Nt({msgObj:{type:"at",qq:Number(A.value.sender.user_id)},addText:!0}),Qt(),Ze()})},[y("div",null,[ie(b,{icon:["fas","at"]})]),y("a",null,K(B(f)("提及")),1)],512),[[nt,k.value.menuDisplay.at]]),xe(y("div",{onClick:Dt},[y("div",null,[ie(b,{icon:["fas","trash-can"]})]),y("a",null,K(B(f)("移出群聊")),1)],512),[[nt,k.value.menuDisplay.remove]]),xe(y("div",{onClick:de},[y("div",null,[ie(b,{icon:["fas","arrow-up-right-from-square"]})]),y("a",null,K(B(f)("跳转到消息")),1)],512),[[nt,k.value.menuDisplay.jumpToMsg]]),y("div",{onClick:rt},[y("div",null,[ie(b,{icon:["fas","screwdriver-wrench"]})]),y("a",null,K(B(f)("调试信息")),1)])],2)],2)])),ie(nn,{name:"chat-info-float",duration:{enter:300,leave:200}},{default:kt(()=>[ie(Qa,{ref:"infoRef",chat:n.chat,tags:k.value,onClose:ct},null,8,["chat","tags"])]),_:1}),ie(nn,null,{default:kt(()=>[k.value.showForwardPan?(W(),ee("div",Cr,[y("div",Mr,[y("header",null,[y("span",null,K(B(f)("转发消息")),1),ie(b,{icon:["fas","xmark"],onClick:Ue})]),y("label",Ar,K(B(f)("搜索转发对象")),1),y("input",{id:"chat-forward-search",placeholder:B(f)("搜索 ……"),onInput:St},null,40,Tr),y("div",null,[(W(!0),ee(_e,null,gt(Q.value,E=>(W(),ee("div",{key:"forwardList-"+(E.user_id??E.group_id),onClick:X=>Rn(E)},[y("img",{loading:"lazy",title:vt(E),src:E.avatar||"/img/icons/icon.svg"},null,8,xr),y("div",null,[y("p",null,K(vt(E)),1),y("span",null,K(E.group_id?B(f)("群组"):B(f)("好友")),1)])],8,Er))),128))])]),y("div",{class:"bg",onClick:Ue})])):he("",!0)]),_:1}),y("div",{class:"bg",style:kn({"backdrop-filter":`blur(${B(t).sysConfig.chat_more_blur?0:B(t).sysConfig.chat_background_blur}px)`})},null,4)],38)),[[B(Co),Te]])}}}),Br=Ln($r,[["__scopeId","data-v-00dccb22"]]);export{Br as default};