sd-webui-infinite-image-bro.../vue/dist/assets/fullScreenContextMenu-01c77...

4 lines
93 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{P as Ge,a as x,d as se,aZ as xt,u as lt,c as g,bf as Cr,_ as kt,a1 as de,U as z,bg as Xt,a8 as Kt,a6 as st,h as H,bh as Sr,b as ut,a7 as Bn,bi as Ar,an as en,bj as Fn,r as I,aW as Ye,ac as je,a3 as tn,ah as Or,ag as jn,bk as Qn,a4 as De,x as le,aA as Er,s as ve,bl as Me,bm as Rn,e as ht,a5 as nn,bn as Pr,R as ee,b5 as xr,bo as kr,bp as at,as as Ir,bq as $r,ad as It,aX as Be,br as Lr,bs as rn,bt as _r,$ as Ze,ar as zr,bu as Mr,bv as Nr,bw as Dr,bx as Vn,by as an,bz as Tr,bA as Br,bB as Fr,ao as jr,bC as Qr,bD as Rr,bE as Vr,W as yt,bF as Ur,bc as Hr,T as j,bG as $t,bH as Wr,v as Lt,bI as Un,b7 as ge,bJ as _t,bK as pe,aB as Hn,b2 as on,b3 as Gr,bL as Yr,b1 as zt,bM as Jr,bN as oe,A as Mt,bO as Wn,X as qr,V as ft,bP as Zr,bQ as Xr,bR as Kr,Y as Gn,Z as Yn,o as N,y as q,bS as ei,bT as ti,bU as ni,bV as ri,bW as ii,b9 as ai,l as Z,bX as Ke,J as be,m as M,C as Nt,bY as ln,bZ as oi,b_ as li,b$ as si,I as Je,B as R,t as D,n as F,q as ne,O as Jn,c0 as qn,M as Zn,Q as Xn,c1 as ui,z as ci}from"./index-703b9a2d.js";import{t as vt,l as Te}from"./index-3d320019.js";import{_ as di,e as fi,D as vi,E as mi,M as re,f as Ne,t as gi,h as Kn}from"./db-c7244e20.js";import{b as pi}from"./_baseIteratee-13f7736e.js";import{b as hi,B as qe,c as yi}from"./button-ae2b29f9.js";var er=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:Ge.any,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},align:{type:Object},getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:{type:Object,default:void 0},forceRender:{type:Boolean,default:void 0},mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:void 0},onVisibleChange:{type:Function},"onUpdate:visible":{type:Function}}},mt=hi(),bi=function(){return x(x({},er()),{},{type:mt.type,size:String,htmlType:mt.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:Ge.any,title:String,loading:mt.loading,onClick:{type:Function}})},wi=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],Ci=qe.Group;const ot=se({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:xt(bi(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(e,n){var r=n.slots,i=n.attrs,c=n.emit,u=function(h){c("update:visible",h),c("visibleChange",h)},C=lt("dropdown-button",e),p=C.prefixCls,v=C.direction,w=C.getPopupContainer;return function(){var y,h,f=x(x({},e),i),a=f.type,o=a===void 0?"default":a,l=f.disabled,d=f.loading,m=f.htmlType,b=f.class,s=b===void 0?"":b,A=f.overlay,k=A===void 0?(y=r.overlay)===null||y===void 0?void 0:y.call(r):A,O=f.trigger,S=f.align,P=f.visible;f.onVisibleChange;var E=f.placement,$=E===void 0?v.value==="rtl"?"bottomLeft":"bottomRight":E,L=f.href,_=f.title,Q=f.icon,Y=Q===void 0?((h=r.icon)===null||h===void 0?void 0:h.call(r))||g(Cr,null,null):Q,U=f.mouseEnterDelay,ie=f.mouseLeaveDelay,ue=f.overlayClassName,ce=f.overlayStyle,me=f.destroyPopupOnHide,B=f.onClick;f["onUpdate:visible"];var W=kt(f,wi),X={align:S,disabled:l,trigger:l?[]:O,placement:$,getPopupContainer:w.value,onVisibleChange:u,mouseEnterDelay:U,mouseLeaveDelay:ie,visible:P,overlayClassName:ue,overlayStyle:ce,destroyPopupOnHide:me},K=g(qe,{type:o,disabled:l,loading:d,onClick:B,htmlType:m,href:L,title:_},{default:r.default}),J=g(qe,{type:o,icon:Y},null);return g(Ci,x(x({},W),{},{class:de(p.value,s)}),{default:function(){return[r.leftButton?r.leftButton({button:K}):K,g(Pe,X,{default:function(){return[r.rightButton?r.rightButton({button:J}):J]},overlay:function(){return k}})]}})}}});var tr=se({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:xt(er(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(e,n){var r=n.slots,i=n.attrs,c=n.emit,u=lt("dropdown",e),C=u.prefixCls,p=u.rootPrefixCls,v=u.direction,w=u.getPopupContainer,y=z(function(){var o=e.placement,l=o===void 0?"":o,d=e.transitionName;return d!==void 0?d:l.indexOf("top")>=0?"".concat(p.value,"-slide-down"):"".concat(p.value,"-slide-up")}),h=function(){var l,d,m,b=e.overlay||((l=r.overlay)===null||l===void 0?void 0:l.call(r)),s=Array.isArray(b)?b[0]:b;if(!s)return null;var A=s.props||{};Xt(!A.mode||A.mode==="vertical","Dropdown",'mode="'.concat(A.mode,`" is not supported for Dropdown's Menu.`));var k=A.selectable,O=k===void 0?!1:k,S=A.expandIcon,P=S===void 0?(d=s.children)===null||d===void 0||(m=d.expandIcon)===null||m===void 0?void 0:m.call(d):S,E=typeof P<"u"&&en(P)?P:g("span",{class:"".concat(C.value,"-menu-submenu-arrow")},[g(Fn,{class:"".concat(C.value,"-menu-submenu-arrow-icon")},null)]),$=en(s)?Kt(s,{mode:"vertical",selectable:O,expandIcon:function(){return E}}):s;return $},f=z(function(){var o=e.placement;if(!o)return v.value==="rtl"?"bottomRight":"bottomLeft";if(o.includes("Center")){var l=o.slice(0,o.indexOf("Center"));return Xt(!o.includes("Center"),"Dropdown","You are using '".concat(o,"' placement in Dropdown, which is deprecated. Try to use '").concat(l,"' instead.")),l}return o}),a=function(l){c("update:visible",l),c("visibleChange",l)};return function(){var o,l,d=e.arrow,m=e.trigger,b=e.disabled,s=e.overlayClassName,A=(o=r.default)===null||o===void 0?void 0:o.call(r)[0],k=Kt(A,st({class:de(A==null||(l=A.props)===null||l===void 0?void 0:l.class,H({},"".concat(C.value,"-rtl"),v.value==="rtl"),"".concat(C.value,"-trigger"))},b?{disabled:b}:{})),O=de(s,H({},"".concat(C.value,"-rtl"),v.value==="rtl")),S=b?[]:m,P;S&&S.indexOf("contextmenu")!==-1&&(P=!0);var E=Sr({arrowPointAtCenter:ut(d)==="object"&&d.pointAtCenter,autoAdjustOverflow:!0}),$=Bn(x(x(x({},e),i),{},{builtinPlacements:E,overlayClassName:O,arrow:d,alignPoint:P,prefixCls:C.value,getPopupContainer:w.value,transitionName:y.value,trigger:S,onVisibleChange:a,placement:f.value}),["overlay","onUpdate:visible"]);return g(Ar,$,{default:function(){return[k]},overlay:h})}}});tr.Button=ot;const Pe=tr;Pe.Button=ot;Pe.install=function(t){return t.component(Pe.name,Pe),t.component(ot.name,ot),t};function Si(){var t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function nr(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function Ai(t){var e=I(null),n=Ye(x({},t)),r=I([]),i=function(u){e.value===null&&(r.value=[],e.value=tn(function(){var C;r.value.forEach(function(p){C=x(x({},C),p)}),st(n,C),e.value=null})),r.value.push(u)};return je(function(){e.value&&tn.cancel(e.value)}),[n,i]}function sn(t,e,n,r){var i=e+n,c=(n-r)/2;if(n>r){if(e>0)return H({},t,c);if(e<0&&i<r)return H({},t,-c)}else if(e<0||i>r)return H({},t,e<0?c:-c);return{}}function Oi(t,e,n,r){var i=Si(),c=i.width,u=i.height,C=null;return t<=c&&e<=u?C={x:0,y:0}:(t>c||e>u)&&(C=x(x({},sn("x",n,t,c)),sn("y",r,e,u))),C}var un=Symbol("previewGroupContext"),Dt={provide:function(e){Or(un,e)},inject:function(){return jn(un,{isPreviewGroup:I(!1),previewUrls:z(function(){return new Map}),setPreviewUrls:function(){},current:I(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},Ei=se({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:function(){return{}}}},setup:function(e,n){var r=n.slots,i=z(function(){var S={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return ut(e.preview)==="object"?or(e.preview,S):S}),c=Ye(new Map),u=I(),C=z(function(){return i.value.visible}),p=z(function(){return i.value.getContainer}),v=function(P,E){var $,L;($=(L=i.value).onVisibleChange)===null||$===void 0||$.call(L,P,E)},w=Qn(!!C.value,{value:C,onChange:v}),y=De(w,2),h=y[0],f=y[1],a=I(null),o=z(function(){return C.value!==void 0}),l=z(function(){return Array.from(c.keys())}),d=z(function(){return l.value[i.value.current]}),m=z(function(){return new Map(Array.from(c).filter(function(S){var P=De(S,2),E=P[1].canPreview;return!!E}).map(function(S){var P=De(S,2),E=P[0],$=P[1].url;return[E,$]}))}),b=function(P,E){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;c.set(P,{url:E,canPreview:$})},s=function(P){u.value=P},A=function(P){a.value=P},k=function(P,E){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=function(){c.delete(P)};return c.set(P,{url:E,canPreview:$}),L},O=function(P){P==null||P.stopPropagation(),f(!1),A(null)};return le(d,function(S){s(S)},{immediate:!0,flush:"post"}),Er(function(){h.value&&o.value&&s(d.value)},{flush:"post"}),Dt.provide({isPreviewGroup:I(!0),previewUrls:m,setPreviewUrls:b,current:u,setCurrent:s,setShowPreview:f,setMousePosition:A,registerImage:k}),function(){var S=st({},(di(i.value),i.value));return g(ve,null,[r.default&&r.default(),g(ir,x(x({},S),{},{"ria-hidden":!h.value,visible:h.value,prefixCls:e.previewPrefixCls,onClose:O,mousePosition:a.value,src:m.value.get(u.value),icons:e.icons,getContainer:p.value}),null)])}}});const rr=Ei;var Oe={x:0,y:0},Pi=x(x({},fi()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),xi=se({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:Pi,emits:["close","afterClose"],setup:function(e,n){var r=n.emit,i=n.attrs,c=Ye(e.icons),u=c.rotateLeft,C=c.rotateRight,p=c.zoomIn,v=c.zoomOut,w=c.close,y=c.left,h=c.right,f=I(1),a=I(0),o=Ai(Oe),l=De(o,2),d=l[0],m=l[1],b=function(){return r("close")},s=I(),A=Ye({originX:0,originY:0,deltaX:0,deltaY:0}),k=I(!1),O=Dt.inject(),S=O.previewUrls,P=O.current,E=O.isPreviewGroup,$=O.setCurrent,L=z(function(){return S.value.size}),_=z(function(){return Array.from(S.value.keys())}),Q=z(function(){return _.value.indexOf(P.value)}),Y=z(function(){return E.value?S.value.get(P.value):e.src}),U=z(function(){return E.value&&L.value>1}),ie=I({wheelDirection:0}),ue=function(){f.value=1,a.value=0,m(Oe),r("afterClose")},ce=function(){f.value++,m(Oe)},me=function(){f.value>1&&f.value--,m(Oe)},B=function(){a.value+=90},W=function(){a.value-=90},X=function(T){T.preventDefault(),T.stopPropagation(),Q.value>0&&$(_.value[Q.value-1])},K=function(T){T.preventDefault(),T.stopPropagation(),Q.value<L.value-1&&$(_.value[Q.value+1])},J=de(H({},"".concat(e.prefixCls,"-moving"),k.value)),te="".concat(e.prefixCls,"-operations-operation"),he="".concat(e.prefixCls,"-operations-icon"),Qe=[{icon:w,onClick:b,type:"close"},{icon:p,onClick:ce,type:"zoomIn"},{icon:v,onClick:me,type:"zoomOut",disabled:z(function(){return f.value===1})},{icon:C,onClick:B,type:"rotateRight"},{icon:u,onClick:W,type:"rotateLeft"}],Ce=function(){if(e.visible&&k.value){var T=s.value.offsetWidth*f.value,ae=s.value.offsetHeight*f.value,Se=nr(s.value),fe=Se.left,Ae=Se.top,ye=a.value%180!==0;k.value=!1;var _e=Oi(ye?ae:T,ye?T:ae,fe,Ae);_e&&m(x({},_e))}},xe=function(T){T.button===0&&(T.preventDefault(),T.stopPropagation(),A.deltaX=T.pageX-d.x,A.deltaY=T.pageY-d.y,A.originX=d.x,A.originY=d.y,k.value=!0)},ke=function(T){e.visible&&k.value&&m({x:T.pageX-A.deltaX,y:T.pageY-A.deltaY})},Ie=function(T){if(e.visible){T.preventDefault();var ae=T.deltaY;ie.value={wheelDirection:ae}}},$e=function(T){!e.visible||!U.value||(T.preventDefault(),T.keyCode===nn.LEFT?Q.value>0&&$(_.value[Q.value-1]):T.keyCode===nn.RIGHT&&Q.value<L.value-1&&$(_.value[Q.value+1]))},Le=function(){e.visible&&(f.value!==1&&(f.value=1),(d.x!==Oe.x||d.y!==Oe.y)&&m(Oe))},Re=function(){};return je(function(){le([function(){return e.visible},k],function(){Re();var V,T,ae=Me(window,"mouseup",Ce,!1),Se=Me(window,"mousemove",ke,!1),fe=Me(window,"wheel",Ie,{passive:!1}),Ae=Me(window,"keydown",$e,!1);try{window.top!==window.self&&(V=Me(window.top,"mouseup",Ce,!1),T=Me(window.top,"mousemove",ke,!1))}catch{}Re=function(){ae.remove(),Se.remove(),fe.remove(),Ae.remove(),V&&V.remove(),T&&T.remove()}},{flush:"post",immediate:!0}),le([ie],function(){var V=ie.value.wheelDirection;V>0?me():V<0&&ce()})}),Rn(function(){Re()}),function(){var V=e.visible,T=e.prefixCls,ae=e.rootClassName;return g(vi,x(x({},i),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:T,onClose:b,afterClose:ue,visible:V,wrapClassName:J,rootClassName:ae,getContainer:e.getContainer}),{default:function(){return[g("ul",{class:"".concat(e.prefixCls,"-operations")},[Qe.map(function(fe){var Ae=fe.icon,ye=fe.onClick,_e=fe.type,ze=fe.disabled;return g("li",{class:de(te,H({},"".concat(e.prefixCls,"-operations-operation-disabled"),ze&&(ze==null?void 0:ze.value))),onClick:ye,key:_e},[ht(Ae,{class:he})])})]),g("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(d.x,"px, ").concat(d.y,"px, 0)")}},[g("img",{onMousedown:xe,onDblclick:Le,ref:s,class:"".concat(e.prefixCls,"-img"),src:Y.value,alt:e.alt,style:{transform:"scale3d(".concat(f.value,", ").concat(f.value,", 1) rotate(").concat(a.value,"deg)")}},null)]),U.value&&g("div",{class:de("".concat(e.prefixCls,"-switch-left"),H({},"".concat(e.prefixCls,"-switch-left-disabled"),Q.value<=0)),onClick:X},[y]),U.value&&g("div",{class:de("".concat(e.prefixCls,"-switch-right"),H({},"".concat(e.prefixCls,"-switch-right-disabled"),Q.value>=L.value-1)),onClick:K},[h])]}})}}});const ir=xi;var ki=["icons","maskClassName"],ar=function(){return{src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,previewMask:{type:[Boolean,Function],default:void 0},placeholder:Ge.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},or=function(e,n){var r=x({},e);return Object.keys(n).forEach(function(i){e[i]===void 0&&(r[i]=n[i])}),r},Ii=0,lr=se({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:ar(),emits:["click","error"],setup:function(e,n){var r=n.attrs,i=n.slots,c=n.emit,u=z(function(){return e.prefixCls}),C=z(function(){return"".concat(u.value,"-preview")}),p=z(function(){var B={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return ut(e.preview)==="object"?or(e.preview,B):B}),v=z(function(){var B;return(B=p.value.src)!==null&&B!==void 0?B:e.src}),w=z(function(){return e.placeholder&&e.placeholder!==!0||i.placeholder}),y=z(function(){return p.value.visible}),h=z(function(){return p.value.getContainer}),f=z(function(){return y.value!==void 0}),a=function(W,X){var K,J;(K=(J=p.value).onVisibleChange)===null||K===void 0||K.call(J,W,X)},o=Qn(!!y.value,{value:y,onChange:a}),l=De(o,2),d=l[0],m=l[1];le(d,function(B,W){a(B,W)});var b=I(w.value?"loading":"normal");le(function(){return e.src},function(){b.value=w.value?"loading":"normal"});var s=I(null),A=z(function(){return b.value==="error"}),k=Dt.inject(),O=k.isPreviewGroup,S=k.setCurrent,P=k.setShowPreview,E=k.setMousePosition,$=k.registerImage,L=I(Ii++),_=z(function(){return e.preview&&!A.value}),Q=function(){b.value="normal"},Y=function(W){b.value="error",c("error",W)},U=function(W){if(!f.value){var X=nr(W.target),K=X.left,J=X.top;O.value?(S(L.value),E({x:K,y:J})):s.value={x:K,y:J}}O.value?P(!0):m(!0),c("click",W)},ie=function(){m(!1),f.value||(s.value=null)},ue=I(null);le(function(){return ue},function(){b.value==="loading"&&ue.value.complete&&(ue.value.naturalWidth||ue.value.naturalHeight)&&Q()});var ce=function(){};je(function(){le([v,_],function(){if(ce(),!O.value)return function(){};ce=$(L.value,v.value,_.value),_.value||ce()},{flush:"post",immediate:!0})}),Rn(function(){ce()});var me=function(W){return Pr(W)?W+"px":W};return function(){var B=e.prefixCls,W=e.wrapperClassName,X=e.fallback,K=e.src,J=e.placeholder,te=e.wrapperStyle,he=e.rootClassName,Qe=r.width,Ce=r.height,xe=r.crossorigin,ke=r.decoding,Ie=r.alt,$e=r.sizes,Le=r.srcset,Re=r.usemap,V=r.class,T=r.style,ae=p.value,Se=ae.icons,fe=ae.maskClassName,Ae=kt(ae,ki),ye=de(B,W,he,H({},"".concat(B,"-error"),A.value)),_e=A.value&&X?X:v.value,ze={crossorigin:xe,decoding:ke,alt:Ie,sizes:$e,srcset:Le,usemap:Re,class:de("".concat(B,"-img"),H({},"".concat(B,"-img-placeholder"),J===!0),V),style:x({height:Ce},T)};return g(ve,null,[g("div",{class:ye,onClick:_.value?U:function(wr){c("click",wr)},style:x({width:me(Qe),height:me(Ce)},te)},[g("img",x(x(x({},ze),A.value&&X?{src:X}:{onLoad:Q,onError:Y,src:K}),{},{ref:ue}),null),b.value==="loading"&&g("div",{"aria-hidden":"true",class:"".concat(B,"-placeholder")},[J||i.placeholder&&i.placeholder()]),i.previewMask&&_.value&&g("div",{class:["".concat(B,"-mask"),fe]},[i.previewMask()])]),!O.value&&_.value&&g(ir,x(x({},Ae),{},{"aria-hidden":!d.value,visible:d.value,prefixCls:C.value,onClose:ie,mousePosition:s.value,src:_e,alt:Ie,getContainer:h.value,icons:Se,rootClassName:he}),null)])}}});lr.PreviewGroup=rr;const $i=lr;var Li={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const _i=Li;function cn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){zi(t,i,n[i])})}return t}function zi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Tt=function(e,n){var r=cn({},e,n.attrs);return g(ee,cn({},r,{icon:_i}),null)};Tt.displayName="RotateLeftOutlined";Tt.inheritAttrs=!1;const Mi=Tt;var Ni={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"};const Di=Ni;function dn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Ti(t,i,n[i])})}return t}function Ti(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bt=function(e,n){var r=dn({},e,n.attrs);return g(ee,dn({},r,{icon:Di}),null)};Bt.displayName="RotateRightOutlined";Bt.inheritAttrs=!1;const Bi=Bt;var Fi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"};const ji=Fi;function fn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Qi(t,i,n[i])})}return t}function Qi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ft=function(e,n){var r=fn({},e,n.attrs);return g(ee,fn({},r,{icon:ji}),null)};Ft.displayName="ZoomInOutlined";Ft.inheritAttrs=!1;const Ri=Ft;var Vi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"};const Ui=Vi;function vn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Hi(t,i,n[i])})}return t}function Hi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jt=function(e,n){var r=vn({},e,n.attrs);return g(ee,vn({},r,{icon:Ui}),null)};jt.displayName="ZoomOutOutlined";jt.inheritAttrs=!1;const Wi=jt;var sr={rotateLeft:g(Mi,null,null),rotateRight:g(Bi,null,null),zoomIn:g(Ri,null,null),zoomOut:g(Wi,null,null),close:g(xr,null,null),left:g(kr,null,null),right:g(Fn,null,null)},Gi=se({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String},setup:function(e,n){var r=n.attrs,i=n.slots,c=lt("image",e),u=c.getPrefixCls,C=z(function(){return u("image-preview",e.previewPrefixCls)});return function(){return g(rr,x(x({},x(x({},r),e)),{},{icons:sr,previewPrefixCls:C.value}),i)}}});const Yi=Gi;var Ee=se({name:"AImage",inheritAttrs:!1,props:ar(),setup:function(e,n){var r=n.slots,i=n.attrs,c=lt("image",e),u=c.prefixCls,C=c.rootPrefixCls,p=c.configProvider,v=z(function(){var w=e.preview;if(w===!1)return w;var y=ut(w)==="object"?w:{};return x(x({icons:sr},y),{},{transitionName:at(C.value,"zoom",y.transitionName),maskTransitionName:at(C.value,"fade",y.maskTransitionName)})});return function(){var w,y=((w=p.locale)===null||w===void 0?void 0:w.Image)||Ir.Image,h=function(){return g("div",{class:"".concat(u.value,"-mask-info")},[g(mi,null,null),y==null?void 0:y.preview])},f=e.previewMask,a=f===void 0?r.previewMask||h:f;return g($i,x(x({},x(x(x({},i),e),{},{prefixCls:u.value})),{},{preview:v.value}),x(x({},r),{},{previewMask:typeof a=="function"?a:null}))}}});Ee.PreviewGroup=Yi;Ee.install=function(t){return t.component(Ee.name,Ee),t.component(Ee.PreviewGroup.name,Ee.PreviewGroup),t};const Ji=Ee;var qi=["class","style"],Zi=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:Ge.any,delay:Number,indicator:Ge.any}},tt=null;function Xi(t,e){return!!t&&!!e&&!isNaN(Number(e))}function il(t){var e=t.indicator;tt=typeof e=="function"?e:function(){return g(e,null,null)}}const al=se({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:xt(Zi(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:jn("configProvider",$r)}},data:function(){var e=this.spinning,n=this.delay,r=Xi(e,n);return{sSpinning:e&&!r}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;It(function(){e.debouncifyUpdateSpinning(),e.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var n=e||this.$props,r=n.delay;r&&(this.cancelExistingSpin(),this.updateSpinning=Be(this.originalUpdateSpinning,r))},updateSpinning:function(){var e=this.spinning,n=this.sSpinning;n!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var n="".concat(e,"-dot"),r=Lr(this,"indicator");return r===null?null:(Array.isArray(r)&&(r=r.length===1?r[0]:r),rn(r)?ht(r,{class:n}):tt&&rn(tt())?ht(tt(),{class:n}):g("span",{class:"".concat(n," ").concat(e,"-dot-spin")},[g("i",{class:"".concat(e,"-dot-item")},null),g("i",{class:"".concat(e,"-dot-item")},null),g("i",{class:"".concat(e,"-dot-item")},null),g("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,n,r,i=this.$props,c=i.size,u=i.prefixCls,C=i.tip,p=C===void 0?(e=(n=this.$slots).tip)===null||e===void 0?void 0:e.call(n):C,v=i.wrapperClassName,w=this.$attrs,y=w.class,h=w.style,f=kt(w,qi),a=this.configProvider,o=a.getPrefixCls,l=a.direction,d=o("spin",u),m=this.sSpinning,b=(r={},H(r,d,!0),H(r,"".concat(d,"-sm"),c==="small"),H(r,"".concat(d,"-lg"),c==="large"),H(r,"".concat(d,"-spinning"),m),H(r,"".concat(d,"-show-text"),!!p),H(r,"".concat(d,"-rtl"),l==="rtl"),H(r,y,!!y),r),s=g("div",x(x({},f),{},{style:h,class:b}),[this.renderIndicator(d),p?g("div",{class:"".concat(d,"-text")},[p]):null]),A=_r(this);if(A&&A.length){var k,O=(k={},H(k,"".concat(d,"-container"),!0),H(k,"".concat(d,"-blur"),m),k);return g("div",{class:["".concat(d,"-nested-loading"),v]},[m&&g("div",{key:"loading"},[s]),g("div",{class:O,key:"container"},[A])])}return s}});var Ki=function(){var e=I(!1);return Ze(function(){e.value=!0}),e};const ea=Ki;var ta={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:Object,emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function mn(t){return!!(t&&t.then)}const gn=se({compatConfig:{MODE:3},name:"ActionButton",props:ta,setup:function(e,n){var r=n.slots,i=I(!1),c=I(),u=I(!1),C,p=ea();je(function(){e.autofocus&&(C=setTimeout(function(){var y;return(y=c.value.$el)===null||y===void 0?void 0:y.focus()}))}),Ze(function(){clearTimeout(C)});var v=function(h){var f=e.close;mn(h)&&(u.value=!0,h.then(function(){p.value||(u.value=!1),f.apply(void 0,arguments),i.value=!1},function(a){console.error(a),p.value||(u.value=!1),i.value=!1}))},w=function(h){var f=e.actionFn,a=e.close,o=a===void 0?function(){}:a;if(!i.value){if(i.value=!0,!f){o();return}var l;if(e.emitEvent){if(l=f(h),e.quitOnNullishReturnValue&&!mn(l)){i.value=!1,o(h);return}}else if(f.length)l=f(o),i.value=!1;else if(l=f(),!l){o();return}v(l)}};return function(){var y=e.type,h=e.prefixCls,f=e.buttonProps;return g(qe,x(x(x({},yi(y)),{},{onClick:w,loading:u.value,prefixCls:h},f),{},{ref:c}),r)}}});function Ve(t){return typeof t=="function"?t():t}const na=se({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName"],setup:function(e,n){var r=n.attrs,i=zr("Modal"),c=De(i,1),u=c[0];return function(){var C=e.icon,p=e.onCancel,v=e.onOk,w=e.close,y=e.closable,h=y===void 0?!1:y,f=e.zIndex,a=e.afterClose,o=e.visible,l=e.keyboard,d=e.centered,m=e.getContainer,b=e.maskStyle,s=e.okButtonProps,A=e.cancelButtonProps,k=e.okCancel,O=k===void 0?!0:k,S=e.width,P=S===void 0?416:S,E=e.mask,$=E===void 0?!0:E,L=e.maskClosable,_=L===void 0?!1:L,Q=e.type,Y=e.title,U=e.content,ie=e.direction,ue=e.closeIcon,ce=e.modalRender,me=e.focusTriggerAfterClose,B=e.rootPrefixCls,W=e.bodyStyle,X=e.wrapClassName,K=e.okType||"primary",J=e.prefixCls||"ant-modal",te="".concat(J,"-confirm"),he=r.style||{},Qe=Ve(e.okText)||(O?u.value.okText:u.value.justOkText),Ce=Ve(e.cancelText)||u.value.cancelText,xe=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",ke=de(te,"".concat(te,"-").concat(Q),"".concat(J,"-").concat(Q),H({},"".concat(te,"-rtl"),ie==="rtl"),r.class),Ie=O&&g(gn,{actionFn:p,close:w,autofocus:xe==="cancel",buttonProps:A,prefixCls:"".concat(B,"-btn")},{default:function(){return[Ce]}});return g(re,{prefixCls:J,class:ke,wrapClassName:de(H({},"".concat(te,"-centered"),!!d),X),onCancel:function(Le){return w({triggerCancel:!0},Le)},visible:o,title:"",footer:"",transitionName:at(B,"zoom",e.transitionName),maskTransitionName:at(B,"fade",e.maskTransitionName),mask:$,maskClosable:_,maskStyle:b,style:he,bodyStyle:W,width:P,zIndex:f,afterClose:a,keyboard:l,centered:d,getContainer:m,closable:h,closeIcon:ue,modalRender:ce,focusTriggerAfterClose:me},{default:function(){return[g("div",{class:"".concat(te,"-body-wrapper")},[g("div",{class:"".concat(te,"-body")},[Ve(C),Y===void 0?null:g("span",{class:"".concat(te,"-title")},[Ve(Y)]),g("div",{class:"".concat(te,"-content")},[Ve(U)])]),g("div",{class:"".concat(te,"-btns")},[Ie,g(gn,{type:K,actionFn:v,close:w,autofocus:xe==="ok",buttonProps:s,prefixCls:"".concat(B,"-btn")},{default:function(){return[Qe]}})])])]}})}}});var ra=function(e){var n=document.createDocumentFragment(),r=x(x({},Bn(e,["parentContext","appContext"])),{},{close:u,visible:!0}),i=null;function c(){i&&(an(null,n),i.component.update(),i=null);for(var w=arguments.length,y=new Array(w),h=0;h<w;h++)y[h]=arguments[h];var f=y.some(function(l){return l&&l.triggerCancel});e.onCancel&&f&&e.onCancel.apply(e,y);for(var a=0;a<Ne.length;a++){var o=Ne[a];if(o===u){Ne.splice(a,1);break}}}function u(){for(var w=this,y=arguments.length,h=new Array(y),f=0;f<y;f++)h[f]=arguments[f];r=x(x({},r),{},{visible:!1,afterClose:function(){typeof e.afterClose=="function"&&e.afterClose(),c.apply(w,h)}}),C(r)}function C(w){typeof w=="function"?r=w(r):r=x(x({},r),w),i&&(st(i.component.props,r),i.component.update())}var p=function(y){var h=Br,f=h.prefixCls,a=y.prefixCls||"".concat(f,"-modal");return g(Tr,x(x({},h),{},{notUpdateGlobalConfig:!0,prefixCls:f}),{default:function(){return[g(na,x(x({},y),{},{rootPrefixCls:f,prefixCls:a}),null)]}})};function v(w){var y=g(p,x({},w));return y.appContext=e.parentContext||e.appContext||y.appContext,an(y,n),y}return i=v(r),Ne.push(u),{destroy:u,update:C}};const Xe=ra;function ia(t){return x(x({icon:function(){return g(Vn,null,null)},okCancel:!1},t),{},{type:"warning"})}function aa(t){return x(x({icon:function(){return g(Mr,null,null)},okCancel:!1},t),{},{type:"info"})}function oa(t){return x(x({icon:function(){return g(Nr,null,null)},okCancel:!1},t),{},{type:"success"})}function la(t){return x(x({icon:function(){return g(Dr,null,null)},okCancel:!1},t),{},{type:"error"})}function sa(t){return x(x({icon:function(){return g(Vn,null,null)},okCancel:!0},t),{},{type:"confirm"})}function ur(t){return Xe(ia(t))}re.info=function(e){return Xe(aa(e))};re.success=function(e){return Xe(oa(e))};re.error=function(e){return Xe(la(e))};re.warning=ur;re.warn=ur;re.confirm=function(e){return Xe(sa(e))};re.destroyAll=function(){for(;Ne.length;){var e=Ne.pop();e&&e()}};re.install=function(t){return t.component(re.name,re),t};var ua={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};const ca=ua;function pn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){da(t,i,n[i])})}return t}function da(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Qt=function(e,n){var r=pn({},e,n.attrs);return g(ee,pn({},r,{icon:ca}),null)};Qt.displayName="StarFilled";Qt.inheritAttrs=!1;const cr=Qt;var fa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const va=fa;function hn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ma(t,i,n[i])})}return t}function ma(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rt=function(e,n){var r=hn({},e,n.attrs);return g(ee,hn({},r,{icon:va}),null)};Rt.displayName="FileOutlined";Rt.inheritAttrs=!1;const yn=Rt;var ga={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const pa=ga;function bn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){ha(t,i,n[i])})}return t}function ha(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Vt=function(e,n){var r=bn({},e,n.attrs);return g(ee,bn({},r,{icon:pa}),null)};Vt.displayName="FolderOpenOutlined";Vt.inheritAttrs=!1;const wn=Vt;function ya(t,e,n){if(!Fr(n))return!1;var r=typeof e;return(r=="number"?jr(n)&&Qr(e,n.length):r=="string"&&e in n)?Rr(n[e],t):!1}var ba=Math.ceil,wa=Math.max;function Ca(t,e,n,r){for(var i=-1,c=wa(ba((e-t)/(n||1)),0),u=Array(c);c--;)u[r?c:++i]=t,t+=n;return u}function Sa(t){return function(e,n,r){return r&&typeof r!="number"&&ya(e,n,r)&&(n=r=void 0),e=vt(e),n===void 0?(n=e,e=0):n=vt(n),r=r===void 0?e<n?1:-1:vt(r),Ca(e,n,r,t)}}var Aa=Sa();const Oa=Aa;function Ea(t,e){return t&&t.length?Vr(t,pi(e)):[]}const bt=(...t)=>{document.addEventListener(...t),Ze(()=>document.removeEventListener(...t))},Pa="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",et=new WeakMap;function xa(t,e){return{useHookShareState:r=>{const i=Hr();yt(i),et.has(i)||(et.set(i,Ye(t(i,r??(e==null?void 0:e())))),Ze(()=>{et.delete(i)}));const c=et.get(i);return yt(c),{state:c,toRefs(){return Ur(c)}}}}}var ka={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const Ia=ka;function Cn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){$a(t,i,n[i])})}return t}function $a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ut=function(e,n){var r=Cn({},e,n.attrs);return g(ee,Cn({},r,{icon:Ia}),null)};Ut.displayName="ArrowsAltOutlined";Ut.inheritAttrs=!1;const La=Ut;var _a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const za=_a;function Sn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Ma(t,i,n[i])})}return t}function Ma(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ht=function(e,n){var r=Sn({},e,n.attrs);return g(ee,Sn({},r,{icon:za}),null)};Ht.displayName="DatabaseOutlined";Ht.inheritAttrs=!1;const Na=Ht;var Da={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"};const Ta=Da;function An(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Ba(t,i,n[i])})}return t}function Ba(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wt=function(e,n){var r=An({},e,n.attrs);return g(ee,An({},r,{icon:Ta}),null)};Wt.displayName="DragOutlined";Wt.inheritAttrs=!1;const Fa=Wt;var ja={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const Qa=ja;function On(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Ra(t,i,n[i])})}return t}function Ra(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gt=function(e,n){var r=On({},e,n.attrs);return g(ee,On({},r,{icon:Qa}),null)};Gt.displayName="FullscreenExitOutlined";Gt.inheritAttrs=!1;const Va=Gt;var Ua={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const Ha=Ua;function En(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Wa(t,i,n[i])})}return t}function Wa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yt=function(e,n){var r=En({},e,n.attrs);return g(ee,En({},r,{icon:Ha}),null)};Yt.displayName="FullscreenOutlined";Yt.inheritAttrs=!1;const Ga=Yt;var Ya={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M603.3 327.5l-246 178a7.95 7.95 0 000 12.9l246 178c5.3 3.8 12.7 0 12.7-6.5V643c0-10.2-4.9-19.9-13.2-25.9L457.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"left-circle",theme:"outlined"};const Ja=Ya;function Pn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){qa(t,i,n[i])})}return t}function qa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jt=function(e,n){var r=Pn({},e,n.attrs);return g(ee,Pn({},r,{icon:Ja}),null)};Jt.displayName="LeftCircleOutlined";Jt.inheritAttrs=!1;const ol=Jt;var Za={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M666.7 505.5l-246-178A8 8 0 00408 334v46.9c0 10.2 4.9 19.9 13.2 25.9L566.6 512 421.2 617.2c-8.3 6-13.2 15.6-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.5l246-178c4.4-3.2 4.4-9.8 0-13z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"right-circle",theme:"outlined"};const Xa=Za;function xn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){Ka(t,i,n[i])})}return t}function Ka(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qt=function(e,n){var r=xn({},e,n.attrs);return g(ee,xn({},r,{icon:Xa}),null)};qt.displayName="RightCircleOutlined";qt.inheritAttrs=!1;const ll=qt;var eo={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"};const to=eo;function kn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){no(t,i,n[i])})}return t}function no(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zt=function(e,n){var r=kn({},e,n.attrs);return g(ee,kn({},r,{icon:to}),null)};Zt.displayName="StarOutlined";Zt.inheritAttrs=!1;const dr=Zt,ro={"date-asc":j("sortByDateAscending"),"date-desc":j("sortByDateDescending"),"name-asc":j("sortByNameAscending"),"name-desc":j("sortByNameDescending"),"size-asc":j("sortBySizeAscending"),"size-desc":j("sortBySizeDescending"),"created-time-asc":j("sortByCreatedDateAscending"),"created-time-desc":j("sortByCreatedDateDescending")};var fr=(t=>(t.DATE_ASC="date-asc",t.DATE_DESC="date-desc",t.NAME_ASC="name-asc",t.NAME_DESC="name-desc",t.SIZE_ASC="size-asc",t.SIZE_DESC="size-desc",t.CREATED_TIME_ASC="created-time-asc",t.CREATED_TIME_DESC="created-time-desc",t))(fr||{});const io=(t,e)=>{const n=t.type==="dir"?1:0;return(e.type==="dir"?1:0)-n},In=(t,e)=>{const n=Date.parse(t.date),r=Date.parse(e.date);return n-r},$n=(t,e)=>{const n=Date.parse(t.created_time),r=Date.parse(e.created_time);return n-r},Ln=(t,e)=>{const n=t.name.toLowerCase(),r=e.name.toLowerCase();return n.localeCompare(r)},_n=(t,e)=>t.bytes-e.bytes,He=(t,e)=>{const n=(r,i)=>{switch(e){case"date-asc":return In(r,i);case"date-desc":return In(i,r);case"created-time-asc":return $n(r,i);case"created-time-desc":return $n(i,r);case"name-asc":return Ln(r,i);case"name-desc":return Ln(i,r);case"size-asc":return _n(r,i);case"size-desc":return _n(i,r);default:throw new Error(`Invalid sort method: ${e}`)}};return t.slice().sort((r,i)=>io(r,i)||n(r,i))},Ue=async t=>(await $t.get("/files",{params:{folder_path:t}})).data,ao=async t=>(await $t.post("/delete_files",{file_paths:t})).data,vr=async(t,e)=>(await $t.post("/move_files",{file_paths:t,dest:e})).data;function mr(t){return!!/^(?:\/|[a-z]:\/)/i.test(Fe(t))}function Fe(t){t=t.replace(/\\/g,"/"),t=t.replace(/\/+/g,"/");const e=t.split("/"),n=[];for(let c=0;c<e.length;c++){const u=e[c];u===".."?n.pop():u!==""&&u!=="."&&n.push(u)}const r=n.join("/");return t.startsWith("/")?"/"+r:r}function ct(...t){if(!t.length)return"";let e=t.join("/");return e=Fe(e),t[t.length-1].endsWith("/")&&!e.endsWith("/")?e+"/":e}const oo=(t,e)=>{const n=mr(t)?t:Fe(ct(e,t));return Fe(n)},zn=t=>{t=Fe(t);const e=t.split("/").filter(n=>n);return e[0].endsWith(":")&&(e[0]=e[0]+"/"),e};var wt={},lo={get exports(){return wt},set exports(t){wt=t}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */(function(t,e){(function(n,r){t.exports=r})(Wr,function(){var n={};n.version="0.3.5";var r=n.settings={minimum:.08,easing:"linear",positionUsing:"",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(a){var o,l;for(o in a)l=a[o],l!==void 0&&a.hasOwnProperty(o)&&(r[o]=l);return this},n.status=null,n.set=function(a){var o=n.isStarted();a=i(a,r.minimum,1),n.status=a===1?null:a;var l=n.render(!o),d=l.querySelector(r.barSelector),m=r.speed,b=r.easing;return l.offsetWidth,C(function(s){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),p(d,u(a,m,b)),a===1?(p(l,{transition:"none",opacity:1}),l.offsetWidth,setTimeout(function(){p(l,{transition:"all "+m+"ms linear",opacity:0}),setTimeout(function(){n.remove(),s()},m)},m)):setTimeout(s,m)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var a=function(){setTimeout(function(){n.status&&(n.trickle(),a())},r.trickleSpeed)};return r.trickle&&a(),this},n.done=function(a){return!a&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(a){var o=n.status;return o?o>1?void 0:(typeof a!="number"&&(o>=0&&o<.2?a=.1:o>=.2&&o<.5?a=.04:o>=.5&&o<.8?a=.02:o>=.8&&o<.99?a=.005:a=0),o=i(o+a,0,.994),n.set(o)):n.start()},n.trickle=function(){return n.inc()},function(){var a=0,o=0;n.promise=function(l){return!l||l.state()==="resolved"?this:(o===0&&n.start(),a++,o++,l.always(function(){o--,o===0?(a=0,n.done()):n.set((a-o)/a)}),this)}}(),n.getElement=function(){var a=n.getParent();if(a){var o=Array.prototype.slice.call(a.querySelectorAll(".nprogress")).filter(function(l){return l.parentElement===a});if(o.length>0)return o[0]}return null},n.getParent=function(){if(r.parent instanceof HTMLElement)return r.parent;if(typeof r.parent=="string")return document.querySelector(r.parent)},n.render=function(a){if(n.isRendered())return n.getElement();w(document.documentElement,"nprogress-busy");var o=document.createElement("div");o.id="nprogress",o.className="nprogress",o.innerHTML=r.template;var l=o.querySelector(r.barSelector),d=a?"-100":c(n.status||0),m=n.getParent(),b;return p(l,{transition:"all 0 linear",transform:"translate3d("+d+"%,0,0)"}),r.showSpinner||(b=o.querySelector(r.spinnerSelector),b&&f(b)),m!=document.body&&w(m,"nprogress-custom-parent"),m.appendChild(o),o},n.remove=function(){n.status=null,y(document.documentElement,"nprogress-busy"),y(n.getParent(),"nprogress-custom-parent");var a=n.getElement();a&&f(a)},n.isRendered=function(){return!!n.getElement()},n.getPositioningCSS=function(){var a=document.body.style,o="WebkitTransform"in a?"Webkit":"MozTransform"in a?"Moz":"msTransform"in a?"ms":"OTransform"in a?"O":"";return o+"Perspective"in a?"translate3d":o+"Transform"in a?"translate":"margin"};function i(a,o,l){return a<o?o:a>l?l:a}function c(a){return(-1+a)*100}function u(a,o,l){var d;return r.positionUsing==="translate3d"?d={transform:"translate3d("+c(a)+"%,0,0)"}:r.positionUsing==="translate"?d={transform:"translate("+c(a)+"%,0)"}:d={"margin-left":c(a)+"%"},d.transition="all "+o+"ms "+l,d}var C=function(){var a=[];function o(){var l=a.shift();l&&l(o)}return function(l){a.push(l),a.length==1&&o()}}(),p=function(){var a=["Webkit","O","Moz","ms"],o={};function l(s){return s.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(A,k){return k.toUpperCase()})}function d(s){var A=document.body.style;if(s in A)return s;for(var k=a.length,O=s.charAt(0).toUpperCase()+s.slice(1),S;k--;)if(S=a[k]+O,S in A)return S;return s}function m(s){return s=l(s),o[s]||(o[s]=d(s))}function b(s,A,k){A=m(A),s.style[A]=k}return function(s,A){var k=arguments,O,S;if(k.length==2)for(O in A)S=A[O],S!==void 0&&A.hasOwnProperty(O)&&b(s,O,S);else b(s,k[1],k[2])}}();function v(a,o){var l=typeof a=="string"?a:h(a);return l.indexOf(" "+o+" ")>=0}function w(a,o){var l=h(a),d=l+o;v(l,o)||(a.className=d.substring(1))}function y(a,o){var l=h(a),d;v(a,o)&&(d=l.replace(" "+o+" "," "),a.className=d.substring(1,d.length-1))}function h(a){return(" "+(a&&a.className||"")+" ").replace(/\s+/gi," ")}function f(a){a&&a.parentNode&&a.parentNode.removeChild(a)}return n})})(lo);const so=wt,gt=new Map,G=Lt(),Mn=new BroadcastChannel("iib-image-transfer-bus"),We=encodeURIComponent,Ct=(t,e=!1)=>`/infinite_image_browsing/file?filename=${We(t.fullpath)}&created_time=${We(t.created_time)}${e?`&disposition=${We(t.name)}`:""}`,uo=(t,e)=>`/infinite_image_browsing/image-thumbnail?path=${We(t.fullpath)}&size=${e}&created_time=${We(t.created_time)}`,{eventEmitter:nt,useEventListen:St}=Un(),{useHookShareState:we}=xa(()=>{const t=I({tabIdx:-1,paneIdx:-1}),e=z(()=>Te(n.value)),n=I([]),r=z(()=>{var h;return n.value.map(f=>f.curr).slice((h=G.conf)!=null&&h.is_win?1:0)}),i=z(()=>ct(...r.value)),c=I(fr.CREATED_TIME_DESC),u=z(()=>{var l;if(!e.value)return[];const h=((l=e.value)==null?void 0:l.files)??[],f=c.value,{walkFiles:a}=e.value,o=d=>G.onlyFoldersAndImages?d.filter(m=>m.type==="dir"||oe(m.name)):d;return t.value.walkMode&&a?a.map(d=>He(o(d),f)).flat():He(o(h),f)}),C=I([]),p=I(-1),v=I(!0),w=I();return{spinning:I(!1),canLoadNext:v,multiSelectedIdxs:C,previewIdx:p,basePath:r,currLocation:i,currPage:e,stack:n,sortMethod:c,sortedFiles:u,scroller:I(),stackViewEl:I(),walkModePath:w,props:t,...Un()}});function sl(t,e){const{previewIdx:n,eventEmitter:r,canLoadNext:i}=we().toRefs(),{state:c}=we(),u=z(()=>(e==null?void 0:e.files.value)??c.sortedFiles),C=z(()=>(e==null?void 0:e.scroller.value)??c.scroller),p=I(!1);let v=null;const w=(a,o)=>{var l;p.value=a,v!=null&&!a&&o&&((l=C.value)==null||l.scrollToItem(v),v=null)},y=()=>{t.walkMode&&!f("next")&&i&&(ge.info(j("loadingNextFolder")),r.value.emit("loadNextDir"))};bt("keydown",a=>{var o;if(p.value){let l=n.value;if(["ArrowDown","ArrowRight"].includes(a.key))for(l++;u.value[l]&&!oe(u.value[l].name);)l++;else if(["ArrowUp","ArrowLeft"].includes(a.key))for(l--;u.value[l]&&!oe(u.value[l].name);)l--;if(oe((o=u.value[l])==null?void 0:o.name)??""){n.value=l;const d=C.value;d&&!(l>=d.$_startIndex&&l<=d.$_endIndex)&&(v=l)}y()}});const h=a=>{var l;let o=n.value;if(a==="next")for(o++;u.value[o]&&!oe(u.value[o].name);)o++;else if(a==="prev")for(o--;u.value[o]&&!oe(u.value[o].name);)o--;if(oe((l=u.value[o])==null?void 0:l.name)??""){n.value=o;const d=C.value;d&&!(o>=d.$_startIndex&&o<=d.$_endIndex)&&(v=o)}y()},f=a=>{var l;let o=n.value;if(a==="next")for(o++;u.value[o]&&!oe(u.value[o].name);)o++;else if(a==="prev")for(o--;u.value[o]&&!oe(u.value[o].name);)o--;return oe((l=u.value[o])==null?void 0:l.name)??""};return St("removeFiles",async()=>{var a;p.value&&!c.sortedFiles[n.value]&&(ge.info(j("manualExitFullScreen"),5),await _t(500),(a=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||a.click(),n.value=-1)}),{previewIdx:n,onPreviewVisibleChange:w,previewing:p,previewImgMove:h,canPreview:f}}function ul(t){const e=I(),{scroller:n,stackViewEl:r,stack:i,currPage:c,currLocation:u,sortMethod:C,useEventListen:p,walkModePath:v,eventEmitter:w}=we().toRefs();le(()=>i.value.length,Be((b,s)=>{var A;b!==s&&((A=n.value)==null||A.scrollToItem(0))},300));const y=async b=>{if(await l(b),t.walkMode){await _t();const[s]=He(c.value.files,C.value).filter(A=>A.type==="dir");s&&await l(s.fullpath),await w.value.emit("loadNextDir")}};je(async()=>{var b;if(!i.value.length){const s=await Ue("/");i.value.push({files:s.files,curr:"/"})}e.value=new so,e.value.configure({parent:r.value}),t.path&&t.path!=="/"?await y(t.path):(b=G.conf)!=null&&b.home&&l(G.conf.home)}),le(u,Be(b=>{const s=G.tabList[t.tabIdx].panes[t.paneIdx];s.path=b;const A=s.path.split("/").pop(),k=()=>{var O;return t.walkMode?"Walk: "+(((O=G.autoCompletedDirList.find(S=>S.dir===v.value))==null?void 0:O.zh)??A):A};s.name=pe("div",{style:"display:flex;align-items:center"},[pe(Na),pe("span",{class:"line-clamp-1",style:"max-width: 256px"},k())]),G.recent=G.recent.filter(O=>O.key!==s.key),G.recent.unshift({path:b,key:s.key}),G.recent.length>20&&(G.recent=G.recent.slice(0,20))},300));const h=()=>Mt(u.value),f=async b=>{var s,A;if(b.type==="dir")try{(s=e.value)==null||s.start();const{files:k}=await Ue(b.fullpath);i.value.push({files:k,curr:b.name})}finally{(A=e.value)==null||A.done()}},a=b=>{for(;b<i.value.length-1;)i.value.pop()},o=(b,s)=>(yt(G.conf,"global.conf load failed"),G.conf.is_win?b.toLowerCase()==s.toLowerCase():b==s),l=async b=>{var A,k;const s=i.value.slice();try{mr(b)||(b=ct(((A=G.conf)==null?void 0:A.sd_cwd)??"/",b));const O=zn(b),S=i.value.map(P=>P.curr);for(S.shift();S[0]&&O[0]&&o(S[0],O[0]);)S.shift(),O.shift();for(let P=0;P<S.length;P++)i.value.pop();if(!O.length)return d();for(const P of O){const E=(k=c.value)==null?void 0:k.files.find($=>o($.name,P));if(!E)throw console.error({frags:O,frag:P,stack:Hn(i.value)}),new Error(`${P} not found`);await f(E)}}catch(O){throw ge.error(j("moveFailedCheckPath")+(O instanceof Error?O.message:"")),console.error(b,zn(b),c.value),i.value=s,O}},d=on(async()=>{var b,s,A;try{if((b=e.value)==null||b.start(),v.value)a(0),await y(v.value);else{const{files:k}=await Ue(i.value.length===1?"/":u.value);Te(i.value).files=k}(s=n.value)==null||s.scrollToItem(0),ge.success(j("refreshCompleted"))}finally{(A=e.value)==null||A.done()}});return Gr("return-to-iib",on(async()=>{var b,s;if(!t.walkMode)try{(b=e.value)==null||b.start();const{files:A}=await Ue(i.value.length===1?"/":u.value);Te(i.value).files.map(O=>O.date).join()!==A.map(O=>O.date).join()&&(Te(i.value).files=A,ge.success(j("autoUpdate")))}finally{(s=e.value)==null||s.done()}})),p.value("refresh",d),{refresh:d,copyLocation:h,back:a,openNext:f,currPage:c,currLocation:u,to:l,stack:i,scroller:n,quickMoveTo:b=>{t.walkMode&&(v.value=b),y(b)}}}function cl(t){const{scroller:e,sortedFiles:n,stack:r,sortMethod:i,currLocation:c,currPage:u,stackViewEl:C,canLoadNext:p}=we().toRefs(),{state:v}=we(),w=I(!1),y=I("grid"),h={line:j("detailList"),grid:j("previewGrid"),"large-size-grid":j("largePreviewGrid")},f={value:S=>S,text:S=>j("sortBy")+" "+ro[S].toLocaleLowerCase()},a=272,o=64,l=a*2,{width:d}=Yr(C),m=z(()=>{const S=d.value;if(!(y.value==="line"||!S))return~~(S/(y.value==="grid"?a:l))}),b=z(()=>{const S=y.value;if(S==="line")return{first:80,second:void 0};const P=S==="grid"?a:l;return{first:P+o,second:P}}),s=I(!1),A=async()=>{var S;if(!(s.value||!t.walkMode||!p.value))try{s.value=!0;const P=r.value[r.value.length-2],E=He(P.files,i.value),$=E.findIndex(L=>{var _;return L.name===((_=u.value)==null?void 0:_.curr)});if($!==-1){const L=E[$+1],_=ct(c.value,"../",L.name),Q=await Ue(_),Y=u.value;Y.curr=L.name,Y.walkFiles||(Y.walkFiles=[Y.files]),Y.walkFiles.push(Q.files),console.log("curr page files length",(S=u.value)==null?void 0:S.files.length)}}catch(P){console.error("loadNextDir",P),p.value=!1}finally{s.value=!1}},k=async()=>{const S=e.value;for(;!n.value.length||S&&S.$_endIndex>n.value.length-20&&p.value;)await _t(100),await A()};v.useEventListen("loadNextDir",k);const O=Be(k,300);return{gridItems:m,sortedFiles:n,sortMethodConv:f,viewModeMap:h,moreActionsDropdownShow:w,viewMode:y,gridSize:a,sortMethod:i,largeGridSize:l,onScroll:O,loadNextDir:A,loadNextDirLoading:s,canLoadNext:p,itemSize:b}}function dl(){const{currLocation:t,sortedFiles:e,currPage:n,multiSelectedIdxs:r,eventEmitter:i}=we().toRefs(),c=()=>{r.value=[]};return bt("click",c),bt("blur",c),le(n,c),{onFileDragStart:(p,v)=>{const w=Hn(e.value[v]);console.log("onFileDragStart set drag file ",p,v,w);const y=[w];let h=w.type==="dir";if(r.value.includes(v)){const f=r.value.map(a=>e.value[a]);y.push(...f),h=f.some(a=>a.type==="dir")}p.dataTransfer.setData("text/plain",JSON.stringify({includeDir:h,loc:t.value,path:Ea(y,"fullpath").map(f=>f.fullpath)}))},onDrop:async p=>{var w;const v=JSON.parse(((w=p.dataTransfer)==null?void 0:w.getData("text"))||"{}");if(console.log(v),v.path&&typeof v.includeDir<"u"&&v.loc){const y=t.value;if(v.loc===y)return;const h=pe("div",[pe("div",`${j("moveSelectedFilesTo")}${y}`),pe("ol",v.path.map(f=>f.split(/[/\\]/).pop()).map(f=>pe("li",f)))]);re.confirm({title:j("confirm"),content:h,maskClosable:!0,async onOk(){await vr(v.path,y),nt.emit("removeFiles",{paths:v.path,loc:v.loc}),await i.value.emit("refresh")}})}},multiSelectedIdxs:r}}function fl(t,{openNext:e}){const n=I(!1),r=I(""),{sortedFiles:i,previewIdx:c,multiSelectedIdxs:u,stack:C,currLocation:p,spinning:v}=we().toRefs(),w=Fe;St("removeFiles",({paths:a,loc:o})=>{if(w(o)!==w(p.value))return;const l=Te(C.value);l&&(l.files=l.files.filter(d=>!a.includes(d.fullpath)),l.walkFiles&&(l.walkFiles=l.walkFiles.map(d=>d.filter(m=>!a.includes(m.fullpath)))))}),St("addFiles",({files:a,loc:o})=>{if(w(o)!==w(p.value))return;const l=Te(C.value);l&&l.files.unshift(...a)});const y=zt();return{onFileItemClick:async(a,o,l)=>{c.value=l;const d=u.value.indexOf(l);if(a.shiftKey){if(d!==-1)u.value.splice(d,1);else{u.value.push(l),u.value.sort((s,A)=>s-A);const m=u.value[0],b=u.value[u.value.length-1];u.value=Oa(m,b+1)}a.stopPropagation()}else a.ctrlKey||a.metaKey?(d!==-1?u.value.splice(d,1):u.value.push(l),a.stopPropagation()):await e(o)},onContextMenuClick:async(a,o,l)=>{var A,k;console.log(a,o);const d=Ct(o),m=p.value,b=()=>{let O=[];return u.value.includes(l)?O=u.value.map(S=>i.value[S]):O.push(o),O},s=async O=>{if(!v.value)try{v.value=!0,await Zr(o.fullpath),Mn.postMessage("iib_hidden_img_update_trigger");const S=setTimeout(()=>Xr.warn({message:j("long_loading"),duration:20}),5e3);await Kr(),clearTimeout(S),Mn.postMessage(`iib_hidden_tab_${O}`)}catch(S){console.error(S),ge.error("发送图像失败请携带console的错误消息找开发者")}finally{v.value=!1}};switch(a.key){case"previewInNewWindow":return window.open(d);case"download":return window.open(Ct(o,!0));case"copyPreviewUrl":return Mt(parent.document.location.origin+d);case"send2txt2img":return s("txt2img");case"send2img2img":return s("img2img");case"send2inpaint":return s("inpaint");case"send2extras":return s("extras");case"send2savedDir":{const O=G.autoCompletedDirList.find(E=>E.key==="outdir_save");if(!O)return ge.error(j("unknownSavedDir"));const S=oo(O.dir,(A=G.conf)==null?void 0:A.sd_cwd),P=b();await vr(P.map(E=>E.fullpath),S),nt.emit("removeFiles",{paths:P.map(E=>E.fullpath),loc:p.value}),nt.emit("addFiles",{files:P,loc:S});break}case"openWithWalkMode":{gt.set(m,C.value);const O=G.tabList[t.tabIdx],S={type:"local",key:ft(),path:o.fullpath,name:j("local"),stackKey:m,walkMode:!0};O.panes.push(S),O.key=S.key;break}case"openInNewTab":{gt.set(m,C.value);const O=G.tabList[t.tabIdx],S={type:"local",key:ft(),path:o.fullpath,name:j("local"),stackKey:m};O.panes.push(S),O.key=S.key;break}case"openOnTheRight":{gt.set(m,C.value);let O=G.tabList[t.tabIdx+1];O||(O=qr({panes:[],key:""}),G.tabList[t.tabIdx+1]=O);const S={type:"local",key:ft(),path:o.fullpath,name:j("local"),stackKey:m};O.panes.push(S),O.key=S.key;break}case"viewGenInfo":{n.value=!0,r.value=await y.pushAction(()=>Wn(o.fullpath)).res;break}case"deleteFiles":{const O=b();await new Promise(S=>{re.confirm({title:j("confirmDelete"),maskClosable:!0,content:pe("ol",{style:"max-height:50vh;overflow:auto;"},O.map(P=>P.fullpath.split(/[/\\]/).pop()).map(P=>pe("li",P))),async onOk(){const P=O.map(E=>E.fullpath);await ao(P),ge.success(j("deleteSuccess")),nt.emit("removeFiles",{paths:P,loc:p.value}),S()}})});break}}if(((k=a.keyPath)==null?void 0:k[0])==="toggle-tag"){const{is_remove:O}=await gi({tag_id:a.key,img_path:o.fullpath});ge.success(O?j("removedTagFromImage"):j("addedTagToImage"))}return{}},showGenInfo:n,imageGenInfo:r,q:y}}const vl=()=>{const{stackViewEl:t}=we().toRefs(),e=I(-1);return Jr(t,n=>{var i;let r=n.target;for(;r.parentElement;)if(r=r.parentElement,r.tagName.toLowerCase()==="li"&&r.classList.contains("file-item-trigger")){const c=(i=r.dataset)==null?void 0:i.idx;c&&Number.isSafeInteger(+c)&&(e.value=+c);return}}),{showMenuIdx:e}};function co(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let rt;function At(){At.init||(At.init=!0,rt=co()!==-1)}var dt={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){At(),It(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",rt&&this.$el.appendChild(t),t.data="about:blank",rt||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!rt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const fo=ei();Gn("data-v-b329ee4c");const vo={class:"resize-observer",tabindex:"-1"};Yn();const mo=fo((t,e,n,r,i,c)=>(N(),q("div",vo)));dt.render=mo;dt.__scopeId="data-v-b329ee4c";dt.__file="src/components/ResizeObserver.vue";function it(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?it=function(e){return typeof e}:it=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},it(t)}function go(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function po(t,e,n){return e&&Nn(t.prototype,e),n&&Nn(t,n),t}function Dn(t){return ho(t)||yo(t)||bo(t)||wo()}function ho(t){if(Array.isArray(t))return Ot(t)}function yo(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function bo(t,e){if(t){if(typeof t=="string")return Ot(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ot(t,e)}}function Ot(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Co(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function So(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,c,u=function(p){for(var v=arguments.length,w=new Array(v>1?v-1:0),y=1;y<v;y++)w[y-1]=arguments[y];if(c=w,!(r&&p===i)){var h=n.leading;typeof h=="function"&&(h=h(p,i)),(!r||p!==i)&&h&&t.apply(void 0,[p].concat(Dn(c))),i=p,clearTimeout(r),r=setTimeout(function(){t.apply(void 0,[p].concat(Dn(c))),r=0},e)}};return u._clear=function(){clearTimeout(r),r=null},u}function gr(t,e){if(t===e)return!0;if(it(t)==="object"){for(var n in t)if(!gr(t[n],e[n]))return!1;return!0}return!1}var Ao=function(){function t(e,n,r){go(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return po(t,[{key:"createObserver",value:function(n,r){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Co(n),this.callback=function(C,p){i.options.callback(C,p),C&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var c=this.options.throttleOptions||{},u=c.leading;this.callback=So(this.callback,this.options.throttle,{leading:function(p){return u==="both"||u==="visible"&&p||u==="hidden"&&!p}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(C){var p=C[0];if(C.length>1){var v=C.find(function(y){return y.isIntersecting});v&&(p=v)}if(i.callback){var w=p.isIntersecting&&p.intersectionRatio>=i.threshold;if(w===i.oldResult)return;i.oldResult=w,i.callback(w,p)}},this.options.intersection),It(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function pr(t,e,n){var r=e.value;if(r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new Ao(t,r,n);t._vue_visibilityState=i}}function Oo(t,e,n){var r=e.value,i=e.oldValue;if(!gr(r,i)){var c=t._vue_visibilityState;if(!r){hr(t);return}c?c.createObserver(r,n):pr(t,{value:r},n)}}function hr(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var Eo={beforeMount:pr,updated:Oo,unmounted:hr},Po={itemsLimit:1e3},xo=/(auto|scroll)/;function yr(t,e){return t.parentNode===null?e:yr(t.parentNode,e.concat([t]))}var pt=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},ko=function(e){return pt(e,"overflow")+pt(e,"overflow-y")+pt(e,"overflow-x")},Io=function(e){return xo.test(ko(e))};function Tn(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=yr(t.parentNode,[]),n=0;n<e.length;n+=1)if(Io(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function Et(t){return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(t)}var $o={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Lo(){return this.items.length&&Et(this.items[0])!=="object"}var Pt=!1;if(typeof window<"u"){Pt=!1;try{var _o=Object.defineProperty({},"passive",{get:function(){Pt=!0}});window.addEventListener("test",null,_o)}catch{}}let zo=0;var br={name:"RecycleScroller",components:{ResizeObserver:dt},directives:{ObserveVisibility:Eo},props:{...$o,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,r=this.minItemSize;let i=1e4,c=0,u;for(let C=0,p=e.length;C<p;C++)u=e[C][n]||r,u<i&&(i=u),c+=u,t[C]={accumulator:c,size:u};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Lo,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let r=0,i=e.length;r<i;r++)n[e[r][t]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,r,i){const c=ti({id:zo++,index:e,used:!0,key:r,type:i}),u=ni({item:n,position:0,nr:c});return t.push(u),u},unuseView(t,e=!1){const n=this.$_unusedViews,r=t.nr.type;let i=n.get(r);i||(i=[],n.set(r,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,c=this.$_computedMinItemSize,u=this.typeField,C=this.simpleArray?null:this.keyField,p=this.items,v=p.length,w=this.sizes,y=this.$_views,h=this.$_unusedViews,f=this.pool,a=this.itemIndexByKey;let o,l,d,m,b;if(!v)o=l=m=b=d=0;else if(this.$_prerender)o=m=0,l=b=Math.min(this.prerender,p.length),d=null;else{const E=this.getScroll();if(e){let _=E.start-this.$_lastUpdateScrollPosition;if(_<0&&(_=-_),n===null&&_<c||_<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=E.start;const $=this.buffer;E.start-=$,E.end+=$;let L=0;if(this.$refs.before&&(L=this.$refs.before.scrollHeight,E.start-=L),this.$refs.after){const _=this.$refs.after.scrollHeight;E.end+=_}if(n===null){let _,Q=0,Y=v-1,U=~~(v/2),ie;do ie=U,_=w[U].accumulator,_<E.start?Q=U:U<v-1&&w[U+1].accumulator>E.start&&(Y=U),U=~~((Q+Y)/2);while(U!==ie);for(U<0&&(U=0),o=U,d=w[v-1].accumulator,l=U;l<v&&w[l].accumulator<E.end;l++);for(l===-1?l=p.length-1:(l++,l>v&&(l=v)),m=o;m<v&&L+w[m].accumulator<E.start;m++);for(b=m;b<v&&L+w[b].accumulator<E.end;b++);}else{o=~~(E.start/n*r);const _=o%r;o-=_,l=Math.ceil(E.end/n*r),m=Math.max(0,Math.floor((E.start-L)/n*r)),b=Math.floor((E.end-L)/n*r),o<0&&(o=0),l>v&&(l=v),m<0&&(m=0),b>v&&(b=v),d=Math.ceil(v/r)*n}}l-o>Po.itemsLimit&&this.itemsLimitError(),this.totalSize=d;let s;const A=o<=this.$_endIndex&&l>=this.$_startIndex;if(A)for(let E=0,$=f.length;E<$;E++)s=f[E],s.nr.used&&(t&&(s.nr.index=a[s.item[C]]),(s.nr.index==null||s.nr.index<o||s.nr.index>=l)&&this.unuseView(s));const k=A?null:new Map;let O,S,P;for(let E=o;E<l;E++){O=p[E];const $=C?O[C]:O;if($==null)throw new Error(`Key is ${$} on item (keyField is '${C}')`);if(s=y.get($),!n&&!w[E].size){s&&this.unuseView(s);continue}S=O[u];let L=h.get(S),_=!1;if(!s)A?L&&L.length?s=L.pop():s=this.addView(f,E,O,$,S):(P=k.get(S)||0,(!L||P>=L.length)&&(s=this.addView(f,E,O,$,S),this.unuseView(s,!0),L=h.get(S)),s=L[P],k.set(S,P+1)),y.delete(s.nr.key),s.nr.used=!0,s.nr.index=E,s.nr.key=$,s.nr.type=S,y.set($,s),_=!0;else if(!s.nr.used&&(s.nr.used=!0,s.nr.index=E,_=!0,L)){const Q=L.indexOf(s);Q!==-1&&L.splice(Q,1)}s.item=O,_&&(E===p.length-1&&this.$emit("scroll-end"),E===0&&this.$emit("scroll-start")),n===null?(s.position=w[E-1].accumulator,s.offset=0):(s.position=Math.floor(E/r)*n,s.offset=E%r*i)}return this.$_startIndex=o,this.$_endIndex=l,this.emitUpdate&&this.$emit("update",o,l,m,b),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:A}},getListenerTarget(){let t=Tn(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let r;if(this.pageMode){const i=t.getBoundingClientRect(),c=n?i.height:i.width;let u=-(n?i.top:i.left),C=n?window.innerHeight:window.innerWidth;u<0&&(C+=u,u=0),u+C>c&&(C=c-u),r={start:u,end:u+C}}else n?r={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:r={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Pt?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,i;if(this.pageMode){const c=Tn(this.$el),u=c.tagName==="HTML"?0:c[e.scroll],C=c.getBoundingClientRect(),v=this.$el.getBoundingClientRect()[e.start]-C[e.start];n=c,r=e.scroll,i=t+u+v}else n=this.$el,r=e.scroll,i=t;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("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")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const Mo={key:0,ref:"before",class:"vue-recycle-scroller__slot"},No={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Do(t,e,n,r,i,c){const u=ri("ResizeObserver"),C=ii("observe-visibility");return ai((N(),Z("div",{class:Je(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...p)=>c.handleScroll&&c.handleScroll(...p))},[t.$slots.before?(N(),Z("div",Mo,[Ke(t.$slots,"before")],512)):be("v-if",!0),(N(),q(ln(n.listTag),{ref:"wrapper",style:si({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:Je(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:M(()=>[(N(!0),Z(ve,null,Nt(i.pool,p=>(N(),q(ln(n.itemTag),oi({key:p.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${p.position}px) translate${t.direction==="vertical"?"X":"Y"}(${p.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===p.nr.key}]]},li(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=p.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:M(()=>[Ke(t.$slots,"default",{item:p.item,index:p.nr.index,active:p.nr.used})]),_:2},1040,["style","class"]))),128)),Ke(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(N(),Z("div",No,[Ke(t.$slots,"after")],512)):be("v-if",!0),g(u,{onNotify:c.handleResize},null,8,["onNotify"])],34)),[[C,c.handleVisibilityChange]])}br.render=Do;br.__file="src/components/RecycleScroller.vue";const To=["data-idx"],Bo={key:0},Fo={key:1,class:"preview-icon-wrap"},jo={class:"profile"},Qo={class:"name line-clamp-1"},Ro={class:"basic-info"},Vo={class:"name line-clamp-1"},Uo={class:"basic-info"},Ho=se({__name:"FileItem",props:{file:null,idx:null,selected:{type:Boolean,default:!1},showMenuIdx:null,viewMode:{default:"grid"},fullScreenPreviewImageUrl:null},emits:["update:showMenuIdx","fileItemClick","dragstart","previewVisibleChange","contextMenuClick"],setup(t,{emit:e}){const n=t,r=Lt(),i=I([]),c=z(()=>{var v;return(((v=r.conf)==null?void 0:v.all_custom_tags)??[]).reduce((w,y)=>[...w,{...y,selected:!!i.value.find(h=>h.id===y.id)}],[])}),u=()=>{var v;((v=n==null?void 0:n.file)==null?void 0:v.type)==="file"&&C.pushAction(()=>Kn(n.file.fullpath)).res.then(w=>{i.value=w})},C=zt(),p=z(()=>n.viewMode==="grid"?[r.gridThumbnailSize,r.gridThumbnailSize].join():[r.largeGridThumbnailSize,r.largeGridThumbnailSize].join());return(v,w)=>{const y=Ji,h=Jn,f=qn,a=Zn,o=Pe;return N(),q(o,{trigger:["contextmenu"],visible:F(r).longPressOpenContextMenu?typeof t.idx=="number"&&t.showMenuIdx===t.idx:void 0,"onUpdate:visible":w[3]||(w[3]=l=>typeof t.idx=="number"&&e("update:showMenuIdx",l?t.idx:-1))},{overlay:M(()=>[g(a,{onClick:w[2]||(w[2]=l=>e("contextMenuClick",l,t.file,t.idx))},{default:M(()=>[g(h,{key:"deleteFiles"},{default:M(()=>[R(D(v.$t("deleteSelected")),1)]),_:1}),t.file.type==="dir"?(N(),Z(ve,{key:0},[g(h,{key:"openInNewTab"},{default:M(()=>[R(D(v.$t("openInNewTab")),1)]),_:1}),g(h,{key:"openOnTheRight"},{default:M(()=>[R(D(v.$t("openOnTheRight")),1)]),_:1}),g(h,{key:"openWithWalkMode"},{default:M(()=>[R(D(v.$t("openWithWalkMode")),1)]),_:1})],64)):be("",!0),t.file.type==="file"?(N(),Z(ve,{key:1},[g(h,{key:"previewInNewWindow"},{default:M(()=>[R(D(v.$t("previewInNewWindow")),1)]),_:1}),g(h,{key:"download"},{default:M(()=>[R(D(v.$t("downloadDirectly")),1)]),_:1}),g(h,{key:"copyPreviewUrl"},{default:M(()=>[R(D(v.$t("copySourceFilePreviewLink")),1)]),_:1}),F(oe)(t.file.name)?(N(),Z(ve,{key:0},[g(h,{key:"viewGenInfo"},{default:M(()=>[R(D(v.$t("viewGenerationInfo")),1)]),_:1}),g(h,{key:"send2txt2img"},{default:M(()=>[R(D(v.$t("sendToTxt2img")),1)]),_:1}),g(h,{key:"send2img2img"},{default:M(()=>[R(D(v.$t("sendToImg2img")),1)]),_:1}),g(h,{key:"send2inpaint"},{default:M(()=>[R(D(v.$t("sendToInpaint")),1)]),_:1}),g(h,{key:"send2extras"},{default:M(()=>[R(D(v.$t("sendToExtraFeatures")),1)]),_:1}),g(h,{key:"send2savedDir"},{default:M(()=>[R(D(v.$t("send2savedDir")),1)]),_:1}),g(f,{key:"toggle-tag",title:v.$t("toggleTag")},{default:M(()=>[(N(!0),Z(ve,null,Nt(F(c),l=>(N(),q(h,{key:l.id},{default:M(()=>[R(D(l.name)+" ",1),l.selected?(N(),q(F(cr),{key:0})):(N(),q(F(dr),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])],64)):be("",!0)],64)):be("",!0)]),_:1})]),default:M(()=>[(N(),Z("li",{class:Je(["file file-item-trigger",{clickable:t.file.type==="dir",selected:t.selected,grid:t.viewMode==="grid"||t.viewMode==="large-size-grid","large-grid":t.viewMode==="large-size-grid"}]),"data-idx":t.idx,key:t.file.name,draggable:"true",onDragstart:w[0]||(w[0]=l=>e("dragstart",l,t.idx)),onContextmenu:u,onClickCapture:w[1]||(w[1]=l=>e("fileItemClick",l,t.file,t.idx))},[t.viewMode!=="line"?(N(),Z("div",Bo,[F(oe)(t.file.name)?(N(),q(y,{key:t.file.fullpath,class:Je(`idx-${t.idx}`),src:F(r).enableThumbnail?F(uo)(t.file,F(p)):F(Ct)(t.file),fallback:F(Pa),preview:{src:t.fullScreenPreviewImageUrl,onVisibleChange:(l,d)=>e("previewVisibleChange",l,d)}},null,8,["class","src","fallback","preview"])):(N(),Z("div",Fo,[t.file.type==="file"?(N(),q(F(yn),{key:0,class:"icon center"})):(N(),q(F(wn),{key:1,class:"icon center"}))])),ne("div",jo,[ne("div",Qo,D(t.file.name),1),ne("div",Ro,[ne("div",null,D(t.file.size),1),ne("div",null,D(t.file.date),1)])])])):(N(),Z(ve,{key:1},[t.file.type==="file"?(N(),q(F(yn),{key:0,class:"icon"})):(N(),q(F(wn),{key:1,class:"icon"})),ne("div",Vo,D(t.file.name),1),ne("div",Uo,[ne("div",null,D(t.file.size),1),ne("div",null,D(t.file.date),1)])],64))],42,To))]),_:1},8,["visible"])}}});const ml=Xn(Ho,[["__scopeId","data-v-e4cdd699"]]);function Wo(t,e,n,r){const i={x:0,y:0};let c=0,u=0,C=typeof(r==null?void 0:r.width)=="number"?r.width:0,p=typeof(r==null?void 0:r.height)=="number"?r.height:0,v=typeof(r==null?void 0:r.left)=="number"?r.left:0,w=typeof(r==null?void 0:r.top)=="number"?r.top:0,y=!1;const h=m=>{m.stopPropagation(),m.preventDefault(),!(!t.value||!e.value)&&(c=m instanceof MouseEvent?m.clientX:m.touches[0].clientX,u=m instanceof MouseEvent?m.clientY:m.touches[0].clientY,C=t.value.offsetWidth,p=t.value.offsetHeight,i.x=e.value.offsetLeft,i.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",f),document.documentElement.addEventListener("touchmove",f),document.documentElement.addEventListener("mouseup",a),document.documentElement.addEventListener("touchend",a))},f=m=>{if(!t.value||!e.value)return;const b=C+((m instanceof MouseEvent?m.clientX:m.touches[0].clientX)-c),s=p+((m instanceof MouseEvent?m.clientY:m.touches[0].clientY)-u),A=i.x+((m instanceof MouseEvent?m.clientX:m.touches[0].clientX)-c),k=i.y+((m instanceof MouseEvent?m.clientY:m.touches[0].clientY)-u);t.value.style.width=`${b}px`,t.value.style.height=`${s}px`,e.value.style.left=`${A}px`,e.value.style.top=`${k}px`,r!=null&&r.onResize&&r.onResize(b,s)},a=()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("touchmove",f),document.documentElement.removeEventListener("mouseup",a),document.documentElement.removeEventListener("touchend",a)},o=m=>{m.stopPropagation(),m.preventDefault(),!(!t.value||!n.value)&&(y=!0,v=t.value.offsetLeft,w=t.value.offsetTop,c=m instanceof MouseEvent?m.clientX:m.touches[0].clientX,u=m instanceof MouseEvent?m.clientY:m.touches[0].clientY,document.documentElement.addEventListener("mousemove",l),document.documentElement.addEventListener("touchmove",l),document.documentElement.addEventListener("mouseup",d),document.documentElement.addEventListener("touchend",d))},l=m=>{if(!t.value||!n.value||!y)return;const b=v+((m instanceof MouseEvent?m.clientX:m.touches[0].clientX)-c),s=w+((m instanceof MouseEvent?m.clientY:m.touches[0].clientY)-u);t.value.style.left=`${b}px`,t.value.style.top=`${s}px`,r!=null&&r.onDrag&&r.onDrag(b,s)},d=()=>{y=!1,document.documentElement.removeEventListener("mousemove",l),document.documentElement.removeEventListener("touchmove",l),document.documentElement.removeEventListener("mouseup",d),document.documentElement.removeEventListener("touchend",d)};return je(()=>{!t.value||!r||(typeof r.width=="number"&&(t.value.style.width=`${r.width}px`),typeof r.height=="number"&&(t.value.style.height=`${r.height}px`),typeof r.left=="number"&&(t.value.style.left=`${r.left}px`),typeof r.top=="number"&&(t.value.style.top=`${r.top}px`))}),Ze(()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("touchmove",f),document.documentElement.removeEventListener("mouseup",a),document.documentElement.removeEventListener("touchend",a),document.documentElement.removeEventListener("mousemove",l),document.documentElement.removeEventListener("touchmove",l),document.documentElement.removeEventListener("mouseup",d),document.documentElement.removeEventListener("touchend",d)}),le(()=>[t.value,e.value,n.value],([m,b,s])=>{m&&b&&s&&(b.addEventListener("mousedown",h),b.addEventListener("touchstart",h),s.addEventListener("mousedown",o),s.addEventListener("touchstart",o))}),{handleResizeMouseDown:h,handleDragMouseDown:o}}const Go=t=>(Gn("data-v-79840bcf"),t=t(),Yn(),t),Yo={class:"container"},Jo={class:"actoion-bar"},qo=Go(()=>ne("div",{"flex-placeholder":""},null,-1)),Zo={key:0,class:"gen-info"},Xo=se({__name:"fullScreenContextMenu",props:{file:null,idx:null},emits:["contextMenuClick"],setup(t,{emit:e}){const n=t,r=Lt(),i=I(),c=I([]),u=z(()=>{var a;return(((a=r.conf)==null?void 0:a.all_custom_tags)??[]).reduce((o,l)=>[...o,{...l,selected:!!c.value.find(d=>d.id===l.id)}],[])}),C=zt(),p=I("");le(()=>{var a;return(a=n==null?void 0:n.file)==null?void 0:a.fullpath},async a=>{a&&(C.tasks.forEach(o=>o.cancel()),C.pushAction(()=>Wn(a)).res.then(o=>{p.value=o}))},{immediate:!0});const v=a=>{a&&C.pushAction(()=>Kn(n.file.fullpath)).res.then(o=>{c.value=o})},w=I(),y=I(),h=ui("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});Wo(i,w,y,{...h.value,onDrag:Be(function(a,o){h.value={...h.value,left:a,top:o}},300),onResize:Be(function(a,o){h.value={...h.value,width:a,height:o}},300)});function f(a){return a.parentNode}return(a,o)=>{const l=qe,d=Jn,m=qn,b=Zn,s=Pe;return N(),Z("div",{ref_key:"el",ref:i,class:Je(["full-screen-menu",{"unset-size":!F(h).expanded}]),onWheelCapture:o[3]||(o[3]=ci(()=>{},["stop"]))},[ne("div",Yo,[ne("div",Jo,[ne("div",{ref_key:"dragHandle",ref:y,class:"icon",style:{cursor:"grab"}},[g(F(Fa))],512),ne("div",{class:"icon",style:{cursor:"pointer"},onClick:o[0]||(o[0]=A=>F(h).expanded=!F(h).expanded)},[F(h).expanded?(N(),q(F(Va),{key:0})):(N(),q(F(Ga),{key:1}))]),F(h).expanded?(N(),Z(ve,{key:0},[qo,g(s,{trigger:["hover"],style:{"z-index":"99999"},"get-popup-container":A=>f(A),onVisibleChange:v},{overlay:M(()=>[g(b,{onClick:o[1]||(o[1]=A=>e("contextMenuClick",A,t.file,t.idx)),style:{"z-index":"99999"}},{default:M(()=>[g(d,{key:"previewInNewWindow"},{default:M(()=>[R(D(a.$t("previewInNewWindow")),1)]),_:1}),g(d,{key:"download"},{default:M(()=>[R(D(a.$t("downloadDirectly")),1)]),_:1}),g(d,{key:"copyPreviewUrl"},{default:M(()=>[R(D(a.$t("copySourceFilePreviewLink")),1)]),_:1}),g(d,{key:"deleteFiles"},{default:M(()=>[R(D(a.$t("deleteSelected")),1)]),_:1}),g(d,{key:"send2txt2img"},{default:M(()=>[R(D(a.$t("sendToTxt2img")),1)]),_:1}),g(d,{key:"send2img2img"},{default:M(()=>[R(D(a.$t("sendToImg2img")),1)]),_:1}),g(d,{key:"send2inpaint"},{default:M(()=>[R(D(a.$t("sendToInpaint")),1)]),_:1}),g(d,{key:"send2extras"},{default:M(()=>[R(D(a.$t("sendToExtraFeatures")),1)]),_:1}),g(d,{key:"send2savedDir"},{default:M(()=>[R(D(a.$t("send2savedDir")),1)]),_:1}),g(m,{key:"toggle-tag",title:a.$t("toggleTag")},{default:M(()=>[(N(!0),Z(ve,null,Nt(F(u),A=>(N(),q(d,{key:A.id},{default:M(()=>[R(D(A.name)+" ",1),A.selected?(N(),q(F(cr),{key:0})):(N(),q(F(dr),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])]),_:1})]),default:M(()=>[g(l,null,{default:M(()=>[R(D(F(j)("openContextMenu")),1)]),_:1})]),_:1},8,["get-popup-container"]),g(l,{onClick:o[2]||(o[2]=A=>F(Mt)(p.value))},{default:M(()=>[R(D(a.$t("copyPrompt")),1)]),_:1})],64)):be("",!0)]),F(h).expanded?(N(),Z("div",Zo,D(p.value),1)):be("",!0)]),F(h).expanded?(N(),Z("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:w},[g(F(La))],512)):be("",!0)],34)}}});const gl=Xn(Xo,[["__scopeId","data-v-79840bcf"]]);export{Pe as D,ol as L,ll as R,al as S,ul as a,cl as b,dl as c,fl as d,sl as e,vl as f,gt as g,ro as h,br as i,ml as j,gl as k,il as s,Ct as t,we as u};