import{P as Ue,a as k,d as se,aU as Pt,u as ot,c as g,aX as gr,_ as xt,a0 as de,T as _,aY as Jt,a7 as Yt,a5 as st,h as H,aZ as hr,b as ut,a6 as Ln,a_ as yr,am as qt,a$ as _n,r as I,aR as He,ab as Fe,a2 as Zt,ag as br,af as Mn,b0 as Nn,a3 as De,x as oe,az as wr,s as ve,b1 as Me,b2 as Dn,e as gt,a4 as Kt,b3 as Cr,Q as ne,b4 as Sr,b5 as Ar,b6 as it,ar as Or,b7 as Pr,ac as kt,aS as Te,b8 as xr,b9 as Xt,ba as kr,Z as Ye,aq as Er,bb as Ir,bc as $r,bd as zr,be as Tn,bf as en,bg as Lr,bh as _r,bi as Mr,an as Nr,bj as Dr,bk as Tr,bl as Br,bm as ye,V as ht,bn as Fr,bo as Qr,R as j,bp as Et,bq as Rr,v as It,br as Bn,bs as jr,aW as $t,bt as Vr,bu as le,bv as Fn,bw as pe,bx as Qn,W as Ur,U as dt,by as Hr,bz as tn,bA as Wr,X as Rn,Y as jn,o as M,y as q,bB as Gr,bC as Jr,bD as Yr,bE as qr,bF as Zr,bG as Kr,l as Z,bH as Ze,I as be,m as D,B as zt,bI as nn,bJ as Xr,bK as ei,bL as ti,H as We,A as U,t as F,n as B,q as te,N as Vn,bM as Un,M as Hn,O as Wn,bN as ni,z as ri}from"./index-9cc5a0e4.js";import{t as ft,c as Gn,l as at}from"./index-235fc08e.js";import{_ as ii,d as ai,D as li,E as oi,M as re,a as Ne,t as si,b as Jn}from"./db-81af9a8b.js";import{b as ui}from"./_baseIteratee-2a992630.js";import{b as ci,B as Ge,c as di}from"./button-8e78b0cf.js";var Yn=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:Ue.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}}},vt=ci(),fi=function(){return k(k({},Yn()),{},{type:vt.type,size:String,htmlType:vt.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:Ue.any,title:String,loading:vt.loading,onClick:{type:Function}})},vi=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],mi=Ge.Group;const lt=se({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Pt(fi(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(e,n){var r=n.slots,i=n.attrs,u=n.emit,s=function(m){u("update:visible",m),u("visibleChange",m)},b=ot("dropdown-button",e),p=b.prefixCls,v=b.direction,h=b.getPopupContainer;return function(){var y,m,f=k(k({},e),i),l=f.type,a=l===void 0?"default":l,o=f.disabled,d=f.loading,S=f.htmlType,C=f.class,c=C===void 0?"":C,A=f.overlay,E=A===void 0?(y=r.overlay)===null||y===void 0?void 0:y.call(r):A,O=f.trigger,w=f.align,x=f.visible;f.onVisibleChange;var P=f.placement,$=P===void 0?v.value==="rtl"?"bottomLeft":"bottomRight":P,z=f.href,L=f.title,Q=f.icon,J=Q===void 0?((m=r.icon)===null||m===void 0?void 0:m.call(r))||g(gr,null,null):Q,V=f.mouseEnterDelay,ie=f.mouseLeaveDelay,ue=f.overlayClassName,ce=f.overlayStyle,me=f.destroyPopupOnHide,T=f.onClick;f["onUpdate:visible"];var W=xt(f,vi),K={align:w,disabled:o,trigger:o?[]:O,placement:$,getPopupContainer:h.value,onVisibleChange:s,mouseEnterDelay:V,mouseLeaveDelay:ie,visible:x,overlayClassName:ue,overlayStyle:ce,destroyPopupOnHide:me},X=g(Ge,{type:a,disabled:o,loading:d,onClick:T,htmlType:S,href:z,title:L},{default:r.default}),Y=g(Ge,{type:a,icon:J},null);return g(mi,k(k({},W),{},{class:de(p.value,c)}),{default:function(){return[r.leftButton?r.leftButton({button:X}):X,g(xe,K,{default:function(){return[r.rightButton?r.rightButton({button:Y}):Y]},overlay:function(){return E}})]}})}}});var qn=se({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Pt(Yn(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(e,n){var r=n.slots,i=n.attrs,u=n.emit,s=ot("dropdown",e),b=s.prefixCls,p=s.rootPrefixCls,v=s.direction,h=s.getPopupContainer,y=_(function(){var a=e.placement,o=a===void 0?"":a,d=e.transitionName;return d!==void 0?d:o.indexOf("top")>=0?"".concat(p.value,"-slide-down"):"".concat(p.value,"-slide-up")}),m=function(){var o,d,S,C=e.overlay||((o=r.overlay)===null||o===void 0?void 0:o.call(r)),c=Array.isArray(C)?C[0]:C;if(!c)return null;var A=c.props||{};Jt(!A.mode||A.mode==="vertical","Dropdown",'mode="'.concat(A.mode,`" is not supported for Dropdown's Menu.`));var E=A.selectable,O=E===void 0?!1:E,w=A.expandIcon,x=w===void 0?(d=c.children)===null||d===void 0||(S=d.expandIcon)===null||S===void 0?void 0:S.call(d):w,P=typeof x<"u"&&qt(x)?x:g("span",{class:"".concat(b.value,"-menu-submenu-arrow")},[g(_n,{class:"".concat(b.value,"-menu-submenu-arrow-icon")},null)]),$=qt(c)?Yt(c,{mode:"vertical",selectable:O,expandIcon:function(){return P}}):c;return $},f=_(function(){var a=e.placement;if(!a)return v.value==="rtl"?"bottomRight":"bottomLeft";if(a.includes("Center")){var o=a.slice(0,a.indexOf("Center"));return Jt(!a.includes("Center"),"Dropdown","You are using '".concat(a,"' placement in Dropdown, which is deprecated. Try to use '").concat(o,"' instead.")),o}return a}),l=function(o){u("update:visible",o),u("visibleChange",o)};return function(){var a,o,d=e.arrow,S=e.trigger,C=e.disabled,c=e.overlayClassName,A=(a=r.default)===null||a===void 0?void 0:a.call(r)[0],E=Yt(A,st({class:de(A==null||(o=A.props)===null||o===void 0?void 0:o.class,H({},"".concat(b.value,"-rtl"),v.value==="rtl"),"".concat(b.value,"-trigger"))},C?{disabled:C}:{})),O=de(c,H({},"".concat(b.value,"-rtl"),v.value==="rtl")),w=C?[]:S,x;w&&w.indexOf("contextmenu")!==-1&&(x=!0);var P=hr({arrowPointAtCenter:ut(d)==="object"&&d.pointAtCenter,autoAdjustOverflow:!0}),$=Ln(k(k(k({},e),i),{},{builtinPlacements:P,overlayClassName:O,arrow:d,alignPoint:x,prefixCls:b.value,getPopupContainer:h.value,transitionName:y.value,trigger:w,onVisibleChange:l,placement:f.value}),["overlay","onUpdate:visible"]);return g(yr,$,{default:function(){return[E]},overlay:m})}}});qn.Button=lt;const xe=qn;xe.Button=lt;xe.install=function(t){return t.component(xe.name,xe),t.component(lt.name,lt),t};function pi(){var t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function Zn(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 gi(t){var e=I(null),n=He(k({},t)),r=I([]),i=function(s){e.value===null&&(r.value=[],e.value=Zt(function(){var b;r.value.forEach(function(p){b=k(k({},b),p)}),st(n,b),e.value=null})),r.value.push(s)};return Fe(function(){e.value&&Zt.cancel(e.value)}),[n,i]}function rn(t,e,n,r){var i=e+n,u=(n-r)/2;if(n>r){if(e>0)return H({},t,u);if(e<0&&ir)return H({},t,e<0?u:-u);return{}}function hi(t,e,n,r){var i=pi(),u=i.width,s=i.height,b=null;return t<=u&&e<=s?b={x:0,y:0}:(t>u||e>s)&&(b=k(k({},rn("x",n,t,u)),rn("y",r,e,s))),b}var an=Symbol("previewGroupContext"),Lt={provide:function(e){br(an,e)},inject:function(){return Mn(an,{isPreviewGroup:I(!1),previewUrls:_(function(){return new Map}),setPreviewUrls:function(){},current:I(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},yi=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=_(function(){var w={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return ut(e.preview)==="object"?tr(e.preview,w):w}),u=He(new Map),s=I(),b=_(function(){return i.value.visible}),p=_(function(){return i.value.getContainer}),v=function(x,P){var $,z;($=(z=i.value).onVisibleChange)===null||$===void 0||$.call(z,x,P)},h=Nn(!!b.value,{value:b,onChange:v}),y=De(h,2),m=y[0],f=y[1],l=I(null),a=_(function(){return b.value!==void 0}),o=_(function(){return Array.from(u.keys())}),d=_(function(){return o.value[i.value.current]}),S=_(function(){return new Map(Array.from(u).filter(function(w){var x=De(w,2),P=x[1].canPreview;return!!P}).map(function(w){var x=De(w,2),P=x[0],$=x[1].url;return[P,$]}))}),C=function(x,P){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;u.set(x,{url:P,canPreview:$})},c=function(x){s.value=x},A=function(x){l.value=x},E=function(x,P){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,z=function(){u.delete(x)};return u.set(x,{url:P,canPreview:$}),z},O=function(x){x==null||x.stopPropagation(),f(!1),A(null)};return oe(d,function(w){c(w)},{immediate:!0,flush:"post"}),wr(function(){m.value&&a.value&&c(d.value)},{flush:"post"}),Lt.provide({isPreviewGroup:I(!0),previewUrls:S,setPreviewUrls:C,current:s,setCurrent:c,setShowPreview:f,setMousePosition:A,registerImage:E}),function(){var w=st({},(ii(i.value),i.value));return g(ve,null,[r.default&&r.default(),g(Xn,k(k({},w),{},{"ria-hidden":!m.value,visible:m.value,prefixCls:e.previewPrefixCls,onClose:O,mousePosition:l.value,src:S.value.get(s.value),icons:e.icons,getContainer:p.value}),null)])}}});const Kn=yi;var Oe={x:0,y:0},bi=k(k({},ai()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),wi=se({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:bi,emits:["close","afterClose"],setup:function(e,n){var r=n.emit,i=n.attrs,u=He(e.icons),s=u.rotateLeft,b=u.rotateRight,p=u.zoomIn,v=u.zoomOut,h=u.close,y=u.left,m=u.right,f=I(1),l=I(0),a=gi(Oe),o=De(a,2),d=o[0],S=o[1],C=function(){return r("close")},c=I(),A=He({originX:0,originY:0,deltaX:0,deltaY:0}),E=I(!1),O=Lt.inject(),w=O.previewUrls,x=O.current,P=O.isPreviewGroup,$=O.setCurrent,z=_(function(){return w.value.size}),L=_(function(){return Array.from(w.value.keys())}),Q=_(function(){return L.value.indexOf(x.value)}),J=_(function(){return P.value?w.value.get(x.value):e.src}),V=_(function(){return P.value&&z.value>1}),ie=I({wheelDirection:0}),ue=function(){f.value=1,l.value=0,S(Oe),r("afterClose")},ce=function(){f.value++,S(Oe)},me=function(){f.value>1&&f.value--,S(Oe)},T=function(){l.value+=90},W=function(){l.value-=90},K=function(N){N.preventDefault(),N.stopPropagation(),Q.value>0&&$(L.value[Q.value-1])},X=function(N){N.preventDefault(),N.stopPropagation(),Q.value0&&$(L.value[Q.value-1]):N.keyCode===Kt.RIGHT&&Q.value0?me():R<0&&ce()})}),Dn(function(){Re()}),function(){var R=e.visible,N=e.prefixCls,ae=e.rootClassName;return g(li,k(k({},i),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:N,onClose:C,afterClose:ue,visible:R,wrapClassName:Y,rootClassName:ae,getContainer:e.getContainer}),{default:function(){return[g("ul",{class:"".concat(e.prefixCls,"-operations")},[Qe.map(function(fe){var Ae=fe.icon,he=fe.onClick,Le=fe.type,_e=fe.disabled;return g("li",{class:de(ee,H({},"".concat(e.prefixCls,"-operations-operation-disabled"),_e&&(_e==null?void 0:_e.value))),onClick:he,key:Le},[gt(Ae,{class:ge})])})]),g("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(d.x,"px, ").concat(d.y,"px, 0)")}},[g("img",{onMousedown:ke,onDblclick:ze,ref:c,class:"".concat(e.prefixCls,"-img"),src:J.value,alt:e.alt,style:{transform:"scale3d(".concat(f.value,", ").concat(f.value,", 1) rotate(").concat(l.value,"deg)")}},null)]),V.value&&g("div",{class:de("".concat(e.prefixCls,"-switch-left"),H({},"".concat(e.prefixCls,"-switch-left-disabled"),Q.value<=0)),onClick:K},[y]),V.value&&g("div",{class:de("".concat(e.prefixCls,"-switch-right"),H({},"".concat(e.prefixCls,"-switch-right-disabled"),Q.value>=z.value-1)),onClick:X},[m])]}})}}});const Xn=wi;var Ci=["icons","maskClassName"],er=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:Ue.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},tr=function(e,n){var r=k({},e);return Object.keys(n).forEach(function(i){e[i]===void 0&&(r[i]=n[i])}),r},Si=0,nr=se({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:er(),emits:["click","error"],setup:function(e,n){var r=n.attrs,i=n.slots,u=n.emit,s=_(function(){return e.prefixCls}),b=_(function(){return"".concat(s.value,"-preview")}),p=_(function(){var T={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return ut(e.preview)==="object"?tr(e.preview,T):T}),v=_(function(){var T;return(T=p.value.src)!==null&&T!==void 0?T:e.src}),h=_(function(){return e.placeholder&&e.placeholder!==!0||i.placeholder}),y=_(function(){return p.value.visible}),m=_(function(){return p.value.getContainer}),f=_(function(){return y.value!==void 0}),l=function(W,K){var X,Y;(X=(Y=p.value).onVisibleChange)===null||X===void 0||X.call(Y,W,K)},a=Nn(!!y.value,{value:y,onChange:l}),o=De(a,2),d=o[0],S=o[1];oe(d,function(T,W){l(T,W)});var C=I(h.value?"loading":"normal");oe(function(){return e.src},function(){C.value=h.value?"loading":"normal"});var c=I(null),A=_(function(){return C.value==="error"}),E=Lt.inject(),O=E.isPreviewGroup,w=E.setCurrent,x=E.setShowPreview,P=E.setMousePosition,$=E.registerImage,z=I(Si++),L=_(function(){return e.preview&&!A.value}),Q=function(){C.value="normal"},J=function(W){C.value="error",u("error",W)},V=function(W){if(!f.value){var K=Zn(W.target),X=K.left,Y=K.top;O.value?(w(z.value),P({x:X,y:Y})):c.value={x:X,y:Y}}O.value?x(!0):S(!0),u("click",W)},ie=function(){S(!1),f.value||(c.value=null)},ue=I(null);oe(function(){return ue},function(){C.value==="loading"&&ue.value.complete&&(ue.value.naturalWidth||ue.value.naturalHeight)&&Q()});var ce=function(){};Fe(function(){oe([v,L],function(){if(ce(),!O.value)return function(){};ce=$(z.value,v.value,L.value),L.value||ce()},{flush:"post",immediate:!0})}),Dn(function(){ce()});var me=function(W){return Cr(W)?W+"px":W};return function(){var T=e.prefixCls,W=e.wrapperClassName,K=e.fallback,X=e.src,Y=e.placeholder,ee=e.wrapperStyle,ge=e.rootClassName,Qe=r.width,Ce=r.height,ke=r.crossorigin,Ee=r.decoding,Ie=r.alt,$e=r.sizes,ze=r.srcset,Re=r.usemap,R=r.class,N=r.style,ae=p.value,Se=ae.icons,fe=ae.maskClassName,Ae=xt(ae,Ci),he=de(T,W,ge,H({},"".concat(T,"-error"),A.value)),Le=A.value&&K?K:v.value,_e={crossorigin:ke,decoding:Ee,alt:Ie,sizes:$e,srcset:ze,usemap:Re,class:de("".concat(T,"-img"),H({},"".concat(T,"-img-placeholder"),Y===!0),R),style:k({height:Ce},N)};return g(ve,null,[g("div",{class:he,onClick:L.value?V:function(pr){u("click",pr)},style:k({width:me(Qe),height:me(Ce)},ee)},[g("img",k(k(k({},_e),A.value&&K?{src:K}:{onLoad:Q,onError:J,src:X}),{},{ref:ue}),null),C.value==="loading"&&g("div",{"aria-hidden":"true",class:"".concat(T,"-placeholder")},[Y||i.placeholder&&i.placeholder()]),i.previewMask&&L.value&&g("div",{class:["".concat(T,"-mask"),fe]},[i.previewMask()])]),!O.value&&L.value&&g(Xn,k(k({},Ae),{},{"aria-hidden":!d.value,visible:d.value,prefixCls:b.value,onClose:ie,mousePosition:c.value,src:Le,alt:Ie,getContainer:m.value,icons:Se,rootClassName:ge}),null)])}}});nr.PreviewGroup=Kn;const Ai=nr;var Oi={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 Pi=Oi;function ln(t){for(var e=1;e{document.addEventListener(...t),Ye(()=>document.removeEventListener(...t))},ba="data:image/png;base64,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",Qt=(t,e)=>(ye.success({content:e??`已复制内容 "${t}" 到粘贴板`}),navigator.clipboard.writeText(t)),Ke=new WeakMap,wa=t=>({useHookShareState:()=>{const n=Qr();ht(n),Ke.has(n)||(Ke.set(n,He(t(n))),Ye(()=>{Ke.delete(n)}));const r=Ke.get(n);return ht(r),{state:r,toRefs(){return Fr(r)}}}});var Ca={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 Sa=Ca;function hn(t){for(var e=1;e(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))(or||{});const Ga=(t,e)=>{const n=t.type==="dir"?1:0;return(e.type==="dir"?1:0)-n},On=(t,e)=>{const n=Date.parse(t.date),r=Date.parse(e.date);return n-r},Pn=(t,e)=>{const n=t.name.toLowerCase(),r=e.name.toLowerCase();return n.localeCompare(r)},xn=(t,e)=>t.bytes-e.bytes,Ve=(t,e)=>{const n=(r,i)=>{switch(e){case"date-asc":return On(r,i);case"date-desc":return On(i,r);case"name-asc":return Pn(r,i);case"name-desc":return Pn(i,r);case"size-asc":return xn(r,i);case"size-desc":return xn(i,r);default:throw new Error(`Invalid sort method: ${e}`)}};return t.slice().sort((r,i)=>Ga(r,i)||n(r,i))},et=async(t,e)=>(await Et.get(`/files/${t}`,{params:{folder_path:e}})).data,Ja=async(t,e)=>(await Et.post(`/delete_files/${t}`,{file_paths:e})).data,sr=async(t,e,n)=>(await Et.post(`/move_files/${t}`,{file_paths:e,dest:n})).data;function ur(t){return!!/^(?:\/|[a-z]:\/)/i.test(Be(t))}function Be(t){t=t.replace(/\\/g,"/"),t=t.replace(/\/+/g,"/");const e=t.split("/"),n=[];for(let u=0;u{const n=ur(t)?t:Be(Je(e,t));return Be(n)},kn=t=>{t=Be(t);const e=t.split("/").filter(n=>n);return e[0].endsWith(":")&&(e[0]=e[0]+"/"),e};var bt={},qa={get exports(){return bt},set exports(t){bt=t}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */(function(t,e){(function(n,r){t.exports=r})(Rr,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:'
'};n.configure=function(l){var a,o;for(a in l)o=l[a],o!==void 0&&l.hasOwnProperty(a)&&(r[a]=o);return this},n.status=null,n.set=function(l){var a=n.isStarted();l=i(l,r.minimum,1),n.status=l===1?null:l;var o=n.render(!a),d=o.querySelector(r.barSelector),S=r.speed,C=r.easing;return o.offsetWidth,b(function(c){r.positionUsing===""&&(r.positionUsing=n.getPositioningCSS()),p(d,s(l,S,C)),l===1?(p(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){p(o,{transition:"all "+S+"ms linear",opacity:0}),setTimeout(function(){n.remove(),c()},S)},S)):setTimeout(c,S)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var l=function(){setTimeout(function(){n.status&&(n.trickle(),l())},r.trickleSpeed)};return r.trickle&&l(),this},n.done=function(l){return!l&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(l){var a=n.status;return a?a>1?void 0:(typeof l!="number"&&(a>=0&&a<.2?l=.1:a>=.2&&a<.5?l=.04:a>=.5&&a<.8?l=.02:a>=.8&&a<.99?l=.005:l=0),a=i(a+l,0,.994),n.set(a)):n.start()},n.trickle=function(){return n.inc()},function(){var l=0,a=0;n.promise=function(o){return!o||o.state()==="resolved"?this:(a===0&&n.start(),l++,a++,o.always(function(){a--,a===0?(l=0,n.done()):n.set((l-a)/l)}),this)}}(),n.getElement=function(){var l=n.getParent();if(l){var a=Array.prototype.slice.call(l.querySelectorAll(".nprogress")).filter(function(o){return o.parentElement===l});if(a.length>0)return a[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(l){if(n.isRendered())return n.getElement();h(document.documentElement,"nprogress-busy");var a=document.createElement("div");a.id="nprogress",a.className="nprogress",a.innerHTML=r.template;var o=a.querySelector(r.barSelector),d=l?"-100":u(n.status||0),S=n.getParent(),C;return p(o,{transition:"all 0 linear",transform:"translate3d("+d+"%,0,0)"}),r.showSpinner||(C=a.querySelector(r.spinnerSelector),C&&f(C)),S!=document.body&&h(S,"nprogress-custom-parent"),S.appendChild(a),a},n.remove=function(){n.status=null,y(document.documentElement,"nprogress-busy"),y(n.getParent(),"nprogress-custom-parent");var l=n.getElement();l&&f(l)},n.isRendered=function(){return!!n.getElement()},n.getPositioningCSS=function(){var l=document.body.style,a="WebkitTransform"in l?"Webkit":"MozTransform"in l?"Moz":"msTransform"in l?"ms":"OTransform"in l?"O":"";return a+"Perspective"in l?"translate3d":a+"Transform"in l?"translate":"margin"};function i(l,a,o){return lo?o:l}function u(l){return(-1+l)*100}function s(l,a,o){var d;return r.positionUsing==="translate3d"?d={transform:"translate3d("+u(l)+"%,0,0)"}:r.positionUsing==="translate"?d={transform:"translate("+u(l)+"%,0)"}:d={"margin-left":u(l)+"%"},d.transition="all "+a+"ms "+o,d}var b=function(){var l=[];function a(){var o=l.shift();o&&o(a)}return function(o){l.push(o),l.length==1&&a()}}(),p=function(){var l=["Webkit","O","Moz","ms"],a={};function o(c){return c.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(A,E){return E.toUpperCase()})}function d(c){var A=document.body.style;if(c in A)return c;for(var E=l.length,O=c.charAt(0).toUpperCase()+c.slice(1),w;E--;)if(w=l[E]+O,w in A)return w;return c}function S(c){return c=o(c),a[c]||(a[c]=d(c))}function C(c,A,E){A=S(A),c.style[A]=E}return function(c,A){var E=arguments,O,w;if(E.length==2)for(O in A)w=A[O],w!==void 0&&A.hasOwnProperty(O)&&C(c,O,w);else C(c,E[1],E[2])}}();function v(l,a){var o=typeof l=="string"?l:m(l);return o.indexOf(" "+a+" ")>=0}function h(l,a){var o=m(l),d=o+a;v(o,a)||(l.className=d.substring(1))}function y(l,a){var o=m(l),d;v(l,a)&&(d=o.replace(" "+a+" "," "),l.className=d.substring(1,d.length-1))}function m(l){return(" "+(l&&l.className||"")+" ").replace(/\s+/gi," ")}function f(l){l&&l.parentNode&&l.parentNode.removeChild(l)}return n})})(qa);const Za=bt,mt=new Map,G=It(),wt=(t,e=!1)=>`/infinite_image_browsing/file?filename=${encodeURIComponent(t.fullpath)}${e?`&disposition=${encodeURIComponent(t.name)}`:""}`,Ka=(t,e)=>`/infinite_image_browsing/image-thumbnail?path=${encodeURIComponent(t.fullpath)}&size=${e}`,{eventEmitter:tt,useEventListen:En}=Bn(),{useHookShareState:we}=wa(()=>{const t=I({tabIdx:-1,paneIdx:-1}),e=_(()=>at(n.value)),n=I([]),r=_(()=>{var m;return n.value.map(f=>f.curr).slice((m=G.conf)!=null&&m.is_win?1:0)}),i=_(()=>Je(...r.value)),u=I(or.DATE_DESC),s=_(()=>{var o;if(!e.value)return[];const m=((o=e.value)==null?void 0:o.files)??[],f=u.value,{walkFiles:l}=e.value,a=d=>G.onlyFoldersAndImages?d.filter(S=>S.type==="dir"||le(S.name)):d;return t.value.walkMode&&l?l.map(d=>Ve(a(d),f)).flat():Ve(a(m),f)}),b=I([]),p=I(-1),v=I(!0),h=I();return{spinning:I(!1),canLoadNext:v,multiSelectedIdxs:b,previewIdx:p,basePath:r,currLocation:i,currPage:e,stack:n,sortMethod:u,sortedFiles:s,scroller:I(),stackViewEl:I(),walkModePath:h,props:t,...Bn()}});function ql(t,e){const{previewIdx:n,eventEmitter:r,canLoadNext:i}=we().toRefs(),{state:u}=we(),s=_(()=>(e==null?void 0:e.files.value)??u.sortedFiles),b=_(()=>(e==null?void 0:e.scroller.value)??u.scroller),p=I(!1);let v=null;const h=(l,a)=>{var o;p.value=l,v!=null&&!l&&a&&((o=b.value)==null||o.scrollToItem(v),v=null)},y=()=>{t.walkMode&&!f("next")&&i&&(ye.info(j("loadingNextFolder")),r.value.emit("loadNextDir"))};yt("keydown",l=>{var a;if(p.value){let o=n.value;if(["ArrowDown","ArrowRight"].includes(l.key))for(o++;s.value[o]&&!le(s.value[o].name);)o++;else if(["ArrowUp","ArrowLeft"].includes(l.key))for(o--;s.value[o]&&!le(s.value[o].name);)o--;if(le((a=s.value[o])==null?void 0:a.name)??""){n.value=o;const d=b.value;d&&!(o>=d.$_startIndex&&o<=d.$_endIndex)&&(v=o)}y()}});const m=l=>{var o;let a=n.value;if(l==="next")for(a++;s.value[a]&&!le(s.value[a].name);)a++;else if(l==="prev")for(a--;s.value[a]&&!le(s.value[a].name);)a--;if(le((o=s.value[a])==null?void 0:o.name)??""){n.value=a;const d=b.value;d&&!(a>=d.$_startIndex&&a<=d.$_endIndex)&&(v=a)}y()},f=l=>{var o;let a=n.value;if(l==="next")for(a++;s.value[a]&&!le(s.value[a].name);)a++;else if(l==="prev")for(a--;s.value[a]&&!le(s.value[a].name);)a--;return le((o=s.value[a])==null?void 0:o.name)??""};return{previewIdx:n,onPreviewVisibleChange:h,previewing:p,previewImgMove:m,canPreview:f}}function Zl(t){const e=I(),{scroller:n,stackViewEl:r,stack:i,currPage:u,currLocation:s,basePath:b,sortMethod:p,useEventListen:v,walkModePath:h,eventEmitter:y}=we().toRefs();oe(()=>i.value.length,Te((C,c)=>{var A;C!==c&&((A=n.value)==null||A.scrollToItem(0))},300));const m=async C=>{if(await o(C),t.walkMode){await Fn();const[c]=Ve(u.value.files,p.value).filter(A=>A.type==="dir");c&&await o(c.fullpath),await y.value.emit("loadNextDir")}};Fe(async()=>{var C;if(!i.value.length){const c=await et("local","/");i.value.push({files:c.files,curr:"/"})}e.value=new Za,e.value.configure({parent:r.value}),t.path&&t.path!=="/"?await m(t.path):(C=G.conf)!=null&&C.home&&o(G.conf.home)}),oe(s,Te(C=>{const c=G.tabList[t.tabIdx].panes[t.paneIdx];c.path=C;const A=c.path.split("/").pop(),E=()=>{var O;return t.walkMode?"Walk: "+(((O=G.autoCompletedDirList.find(w=>w.dir===h.value))==null?void 0:O.zh)??A):A};c.name=pe("div",{style:"display:flex;align-items:center"},[pe(Oa),pe("span",{class:"line-clamp-1",style:"max-width: 256px"},E())]),G.recent=G.recent.filter(O=>O.key!==c.key),G.recent.unshift({path:C,key:c.key}),G.recent.length>20&&(G.recent=G.recent.slice(0,20))},300));const f=()=>Qt(s.value),l=async C=>{var c,A;if(C.type==="dir")try{(c=e.value)==null||c.start();const E=b.value,{files:O}=await et("local",Je(...E,C.name));i.value.push({files:O,curr:C.name})}finally{(A=e.value)==null||A.done()}},a=C=>{for(;C{var A,E;const c=i.value.slice();try{ur(C)||(C=Je(((A=G.conf)==null?void 0:A.sd_cwd)??"/",C));const O=kn(C),w=i.value.map(x=>x.curr);for(w.shift();w[0]&&O[0]&&w[0]===O[0];)w.shift(),O.shift();for(let x=0;x$.name===x);if(!P)throw console.error({frags:O,frag:x,stack:Gn(i.value)}),new Error(`${x} not found`);await l(P)}}catch(O){throw ye.error(j("moveFailedCheckPath")),console.error(C,kn(C),u.value),i.value=c,O}},d=async()=>{var C,c,A;try{if((C=e.value)==null||C.start(),h.value)a(0),await m(h.value);else{const{files:E}=await et("local",i.value.length===1?"/":s.value);at(i.value).files=E}(c=n.value)==null||c.scrollToItem(0),ye.success(j("refreshCompleted"))}finally{(A=e.value)==null||A.done()}};return v.value("refresh",d),{refresh:d,copyLocation:f,back:a,openNext:l,currPage:u,currLocation:s,to:o,stack:i,scroller:n,quickMoveTo:C=>{t.walkMode&&(h.value=C),m(C)}}}function Kl(t){const{scroller:e,sortedFiles:n,stack:r,sortMethod:i,currLocation:u,currPage:s,stackViewEl:b,canLoadNext:p}=we().toRefs(),{state:v}=we(),h=I(!1),y=I("grid"),m={line:j("detailList"),grid:j("previewGrid"),"large-size-grid":j("largePreviewGrid")},f={value:w=>w,text:w=>j("sortBy")+" "+Wa[w].toLocaleLowerCase()},l=272,a=64,o=l*2,{width:d}=jr(b),S=_(()=>{const w=d.value;if(!(y.value==="line"||!w))return~~(w/(y.value==="grid"?l:o))}),C=_(()=>{const w=y.value;if(w==="line")return{first:80,second:void 0};const x=w==="grid"?l:o;return{first:x+a,second:x}}),c=I(!1),A=async()=>{var w;if(!(c.value||!t.walkMode||!p.value))try{c.value=!0;const x=r.value[r.value.length-2],P=Ve(x.files,i.value),$=P.findIndex(z=>{var L;return z.name===((L=s.value)==null?void 0:L.curr)});if($!==-1){const z=P[$+1],L=Je(u.value,"../",z.name),Q=await et("local",L),J=s.value;J.curr=z.name,J.walkFiles||(J.walkFiles=[J.files]),J.walkFiles.push(Q.files),console.log("curr page files length",(w=s.value)==null?void 0:w.files.length)}}catch{p.value=!1}finally{c.value=!1}},E=async()=>{const w=e.value;for(;!n.value.length||w&&w.$_endIndex>n.value.length-20&&p.value;)await Fn(100),await A()};v.useEventListen("loadNextDir",E);const O=Te(E,300);return{gridItems:S,sortedFiles:n,sortMethodConv:f,viewModeMap:m,moreActionsDropdownShow:h,viewMode:y,gridSize:l,sortMethod:i,largeGridSize:o,onScroll:O,loadNextDir:A,loadNextDirLoading:c,canLoadNext:p,itemSize:C}}function Xl(){const{currLocation:t,sortedFiles:e,currPage:n,multiSelectedIdxs:r,eventEmitter:i}=we().toRefs(),u=()=>{r.value=[]};return yt("click",u),yt("blur",u),oe(n,u),{onFileDragStart:(p,v)=>{const h=Gn(e.value[v]);console.log("onFileDragStart set drag file ",p,v,h);const y=[h];let m=h.type==="dir";if(r.value.includes(v)){const f=r.value.map(l=>e.value[l]);y.push(...f),m=f.some(l=>l.type==="dir")}p.dataTransfer.setData("text/plain",JSON.stringify({includeDir:m,loc:t.value,path:ya(y,"fullpath").map(f=>f.fullpath)}))},onDrop:async p=>{var h;const v=JSON.parse(((h=p.dataTransfer)==null?void 0:h.getData("text"))||"{}");if(console.log(v),v.path&&typeof v.includeDir<"u"&&v.loc){const y=t.value;if(v.loc===y)return;const m=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:m,maskClosable:!0,async onOk(){await sr("local",v.path,y),tt.emit("removeFiles",{paths:v.path,loc:v.loc}),await i.value.emit("refresh")}})}},multiSelectedIdxs:r}}function eo(t,{openNext:e}){const n=I(!1),r=I(""),{sortedFiles:i,previewIdx:u,multiSelectedIdxs:s,stack:b,currLocation:p,spinning:v}=we().toRefs(),h=Be;En("removeFiles",({paths:l,loc:a})=>{if(h(a)!==h(p.value))return;const o=at(b.value);o&&(o.files=o.files.filter(d=>!l.includes(d.fullpath)),o.walkFiles&&(o.walkFiles=o.walkFiles.map(d=>d.filter(S=>!l.includes(S.fullpath)))))}),En("addFiles",({files:l,loc:a})=>{if(h(a)!==h(p.value))return;const o=at(b.value);o&&o.files.unshift(...l)});const y=$t();return{onFileItemClick:async(l,a,o)=>{u.value=o;const d=s.value.indexOf(o);if(l.shiftKey){if(d!==-1)s.value.splice(d,1);else{s.value.push(o),s.value.sort((c,A)=>c-A);const S=s.value[0],C=s.value[s.value.length-1];s.value=ha(S,C+1)}l.stopPropagation()}else l.ctrlKey||l.metaKey?(d!==-1?s.value.splice(d,1):s.value.push(o),l.stopPropagation()):await e(a)},onContextMenuClick:async(l,a,o)=>{var A,E;console.log(l,a);const d=wt(a),S=p.value,C=()=>{let O=[];return s.value.includes(o)?O=s.value.map(w=>i.value[w]):O.push(a),O},c=async O=>{if(!v.value)try{v.value=!0,await Hr(a.fullpath),tn().querySelector("#iib_hidden_img_update_trigger").click(),ht(await Wr(),"genInfoCompleted timeout"),tn().querySelector(`#iib_hidden_tab_${O}`).click()}catch(w){console.error(w),ye.error("发送图像失败,请携带console的错误消息找开发者")}finally{v.value=!1}};switch(l.key){case"previewInNewWindow":return window.open(d);case"download":return window.open(wt(a,!0));case"copyPreviewUrl":return Qt(location.host+d);case"send2txt2img":return c("txt2img");case"send2img2img":return c("img2img");case"send2inpaint":return c("inpaint");case"send2extras":return c("extras");case"send2savedDir":{const O=G.autoCompletedDirList.find(P=>P.key==="outdir_save");if(!O)return ye.error(j("unknownSavedDir"));const w=Ya(O.dir,(A=G.conf)==null?void 0:A.cwd),x=C();await sr("local",x.map(P=>P.fullpath),w),tt.emit("removeFiles",{paths:x.map(P=>P.fullpath),loc:p.value}),tt.emit("addFiles",{files:x,loc:w});break}case"openWithWalkMode":{mt.set(S,b.value);const O=G.tabList[t.tabIdx],w={type:"local",key:dt(),path:a.fullpath,name:j("local"),stackKey:S,walkMode:!0};O.panes.push(w),O.key=w.key;break}case"openInNewTab":{mt.set(S,b.value);const O=G.tabList[t.tabIdx],w={type:"local",key:dt(),path:a.fullpath,name:j("local"),stackKey:S};O.panes.push(w),O.key=w.key;break}case"openOnTheRight":{mt.set(S,b.value);let O=G.tabList[t.tabIdx+1];O||(O=Ur({panes:[],key:""}),G.tabList[t.tabIdx+1]=O);const w={type:"local",key:dt(),path:a.fullpath,name:j("local"),stackKey:S};O.panes.push(w),O.key=w.key;break}case"viewGenInfo":{n.value=!0,r.value=await y.pushAction(()=>Qn(a.fullpath)).res;break}case"deleteFiles":{const O=C();await new Promise(w=>{re.confirm({title:j("confirmDelete"),maskClosable:!0,content:pe("ol",{style:"max-height:50vh;overflow:auto;"},O.map(x=>x.fullpath.split(/[/\\]/).pop()).map(x=>pe("li",x))),async onOk(){const x=O.map(P=>P.fullpath);await Ja("local",x),ye.success(j("deleteSuccess")),tt.emit("removeFiles",{paths:x,loc:p.value}),w()}})});break}}if(((E=l.keyPath)==null?void 0:E[0])==="toggle-tag"){const{is_remove:O}=await si({tag_id:l.key,img_path:a.fullpath});ye.success(O?j("removedTagFromImage"):j("addedTagToImage"))}return{}},showGenInfo:n,imageGenInfo:r,q:y}}const to=()=>{const{stackViewEl:t}=we().toRefs(),e=I(-1);return Vr(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 u=(i=r.dataset)==null?void 0:i.idx;u&&Number.isSafeInteger(+u)&&(e.value=+u);return}}),{showMenuIdx:e}};function Xa(){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 nt;function Ct(){Ct.init||(Ct.init=!0,nt=Xa()!==-1)}var ct={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ct(),kt(()=>{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",nt&&this.$el.appendChild(t),t.data="about:blank",nt||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&&(!nt&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const el=Gr();Rn("data-v-b329ee4c");const tl={class:"resize-observer",tabindex:"-1"};jn();const nl=el((t,e,n,r,i,u)=>(M(),q("div",tl)));ct.render=nl;ct.__scopeId="data-v-b329ee4c";ct.__file="src/components/ResizeObserver.vue";function rt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?rt=function(e){return typeof e}:rt=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(t)}function rl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function In(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&arguments[2]!==void 0?arguments[2]:{},r,i,u,s=function(p){for(var v=arguments.length,h=new Array(v>1?v-1:0),y=1;y1){var v=b.find(function(y){return y.isIntersecting});v&&(p=v)}if(i.callback){var h=p.isIntersecting&&p.intersectionRatio>=i.threshold;if(h===i.oldResult)return;i.oldResult=h,i.callback(h,p)}},this.options.intersection),kt(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 dr(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 dl(t,r,n);t._vue_visibilityState=i}}function fl(t,e,n){var r=e.value,i=e.oldValue;if(!cr(r,i)){var u=t._vue_visibilityState;if(!r){fr(t);return}u?u.createObserver(r,n):dr(t,{value:r},n)}}function fr(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var vl={beforeMount:dr,updated:fl,unmounted:fr},ml={itemsLimit:1e3},pl=/(auto|scroll)/;function vr(t,e){return t.parentNode===null?e:vr(t.parentNode,e.concat([t]))}var pt=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},gl=function(e){return pt(e,"overflow")+pt(e,"overflow-y")+pt(e,"overflow-x")},hl=function(e){return pl.test(gl(e))};function zn(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=vr(t.parentNode,[]),n=0;n{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 u=Jr({id:Cl++,index:e,used:!0,key:r,type:i}),s=Yr({item:n,position:0,nr:u});return t.push(s),s},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,u=this.$_computedMinItemSize,s=this.typeField,b=this.simpleArray?null:this.keyField,p=this.items,v=p.length,h=this.sizes,y=this.$_views,m=this.$_unusedViews,f=this.pool,l=this.itemIndexByKey;let a,o,d,S,C;if(!v)a=o=S=C=d=0;else if(this.$_prerender)a=S=0,o=C=Math.min(this.prerender,p.length),d=null;else{const P=this.getScroll();if(e){let L=P.start-this.$_lastUpdateScrollPosition;if(L<0&&(L=-L),n===null&&LP.start&&(J=V),V=~~((Q+J)/2);while(V!==ie);for(V<0&&(V=0),a=V,d=h[v-1].accumulator,o=V;ov&&(o=v)),S=a;Sv&&(o=v),S<0&&(S=0),C>v&&(C=v),d=Math.ceil(v/r)*n}}o-a>ml.itemsLimit&&this.itemsLimitError(),this.totalSize=d;let c;const A=a<=this.$_endIndex&&o>=this.$_startIndex;if(A)for(let P=0,$=f.length;P<$;P++)c=f[P],c.nr.used&&(t&&(c.nr.index=l[c.item[b]]),(c.nr.index==null||c.nr.index=o)&&this.unuseView(c));const E=A?null:new Map;let O,w,x;for(let P=a;P=z.length)&&(c=this.addView(f,P,O,$,w),this.unuseView(c,!0),z=m.get(w)),c=z[x],E.set(w,x+1)),y.delete(c.nr.key),c.nr.used=!0,c.nr.index=P,c.nr.key=$,c.nr.type=w,y.set($,c),L=!0;else if(!c.nr.used&&(c.nr.used=!0,L=!0,z)){const Q=z.indexOf(c);Q!==-1&&z.splice(Q,1)}c.item=O,L&&(P===p.length-1&&this.$emit("scroll-end"),P===0&&this.$emit("scroll-start")),n===null?(c.position=h[P-1].accumulator,c.offset=0):(c.position=Math.floor(P/r)*n,c.offset=P%r*i)}return this.$_startIndex=a,this.$_endIndex=o,this.emitUpdate&&this.$emit("update",a,o,S,C),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:A}},getListenerTarget(){let t=zn(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(),u=n?i.height:i.width;let s=-(n?i.top:i.left),b=n?window.innerHeight:window.innerWidth;s<0&&(b+=s,s=0),s+b>u&&(b=u-s),r={start:s,end:s+b}}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,Ot?{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 u=zn(this.$el),s=u.tagName==="HTML"?0:u[e.scroll],b=u.getBoundingClientRect(),v=this.$el.getBoundingClientRect()[e.start]-b[e.start];n=u,r=e.scroll,i=t+s+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 Sl={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Al={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Ol(t,e,n,r,i,u){const s=qr("ResizeObserver"),b=Zr("observe-visibility");return Kr((M(),Z("div",{class:We(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...p)=>u.handleScroll&&u.handleScroll(...p))},[t.$slots.before?(M(),Z("div",Sl,[Ze(t.$slots,"before")],512)):be("v-if",!0),(M(),q(nn(n.listTag),{ref:"wrapper",style:ti({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:We(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:D(()=>[(M(!0),Z(ve,null,zt(i.pool,p=>(M(),q(nn(n.itemTag),Xr({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}]]},ei(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=p.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:D(()=>[Ze(t.$slots,"default",{item:p.item,index:p.nr.index,active:p.nr.used})]),_:2},1040,["style","class"]))),128)),Ze(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(M(),Z("div",Al,[Ze(t.$slots,"after")],512)):be("v-if",!0),g(s,{onNotify:u.handleResize},null,8,["onNotify"])],34)),[[b,u.handleVisibilityChange]])}mr.render=Ol;mr.__file="src/components/RecycleScroller.vue";const Pl=["data-idx"],xl={key:0},kl={key:1,class:"preview-icon-wrap"},El={class:"profile"},Il={class:"name line-clamp-1"},$l={class:"basic-info"},zl={class:"name line-clamp-1"},Ll={class:"basic-info"},_l=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=It(),i=I([]),u=_(()=>{var v;return(((v=r.conf)==null?void 0:v.all_custom_tags)??[]).reduce((h,y)=>[...h,{...y,selected:!!i.value.find(m=>m.id===y.id)}],[])}),s=()=>{b.pushAction(()=>Jn(n.file.fullpath)).res.then(v=>{i.value=v})},b=$t(),p=_(()=>n.viewMode==="grid"?[r.gridThumbnailSize,r.gridThumbnailSize].join():[r.largeGridThumbnailSize,r.largeGridThumbnailSize].join());return(v,h)=>{const y=ji,m=Vn,f=Un,l=Hn,a=xe;return M(),q(a,{trigger:["contextmenu"],visible:B(r).longPressOpenContextMenu?typeof t.idx=="number"&&t.showMenuIdx===t.idx:void 0,"onUpdate:visible":h[3]||(h[3]=o=>typeof t.idx=="number"&&e("update:showMenuIdx",o?t.idx:-1))},{overlay:D(()=>[g(l,{onClick:h[2]||(h[2]=o=>e("contextMenuClick",o,t.file,t.idx))},{default:D(()=>[g(m,{key:"deleteFiles"},{default:D(()=>[U(F(v.$t("deleteSelected")),1)]),_:1}),t.file.type==="dir"?(M(),Z(ve,{key:0},[g(m,{key:"openInNewTab"},{default:D(()=>[U(F(v.$t("openInNewTab")),1)]),_:1}),g(m,{key:"openOnTheRight"},{default:D(()=>[U(F(v.$t("openOnTheRight")),1)]),_:1}),g(m,{key:"openWithWalkMode"},{default:D(()=>[U(F(v.$t("openWithWalkMode")),1)]),_:1})],64)):be("",!0),t.file.type==="file"?(M(),Z(ve,{key:1},[g(m,{key:"previewInNewWindow"},{default:D(()=>[U(F(v.$t("previewInNewWindow")),1)]),_:1}),g(m,{key:"download"},{default:D(()=>[U(F(v.$t("downloadDirectly")),1)]),_:1}),g(m,{key:"copyPreviewUrl"},{default:D(()=>[U(F(v.$t("copySourceFilePreviewLink")),1)]),_:1}),B(le)(t.file.name)?(M(),Z(ve,{key:0},[g(m,{key:"viewGenInfo"},{default:D(()=>[U(F(v.$t("viewGenerationInfo")),1)]),_:1}),g(m,{key:"send2txt2img"},{default:D(()=>[U(F(v.$t("sendToTxt2img")),1)]),_:1}),g(m,{key:"send2img2img"},{default:D(()=>[U(F(v.$t("sendToImg2img")),1)]),_:1}),g(m,{key:"send2inpaint"},{default:D(()=>[U(F(v.$t("sendToInpaint")),1)]),_:1}),g(m,{key:"send2extras"},{default:D(()=>[U(F(v.$t("sendToExtraFeatures")),1)]),_:1}),g(m,{key:"send2savedDir"},{default:D(()=>[U(F(v.$t("send2savedDir")),1)]),_:1}),g(f,{key:"toggle-tag",title:v.$t("toggleTag")},{default:D(()=>[(M(!0),Z(ve,null,zt(B(u),o=>(M(),q(m,{key:o.id},{default:D(()=>[U(F(o.name)+" ",1),o.selected?(M(),q(B(ar),{key:0})):(M(),q(B(lr),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])],64)):be("",!0)],64)):be("",!0)]),_:1})]),default:D(()=>[(M(),Z("li",{class:We(["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:h[0]||(h[0]=o=>e("dragstart",o,t.idx)),onContextmenu:s,onClickCapture:h[1]||(h[1]=o=>e("fileItemClick",o,t.file,t.idx))},[t.viewMode!=="line"?(M(),Z("div",xl,[B(le)(t.file.name)?(M(),q(y,{key:t.file.fullpath,class:We(`idx-${t.idx}`),src:B(r).enableThumbnail?B(Ka)(t.file,B(p)):B(wt)(t.file),fallback:B(ba),preview:{src:t.fullScreenPreviewImageUrl,onVisibleChange:(o,d)=>e("previewVisibleChange",o,d)}},null,8,["class","src","fallback","preview"])):(M(),Z("div",kl,[t.file.type==="file"?(M(),q(B(mn),{key:0,class:"icon center"})):(M(),q(B(gn),{key:1,class:"icon center"}))])),te("div",El,[te("div",Il,F(t.file.name),1),te("div",$l,[te("div",null,F(t.file.size),1),te("div",null,F(t.file.date),1)])])])):(M(),Z(ve,{key:1},[t.file.type==="file"?(M(),q(B(mn),{key:0,class:"icon"})):(M(),q(B(gn),{key:1,class:"icon"})),te("div",zl,F(t.file.name),1),te("div",Ll,[te("div",null,F(t.file.size),1),te("div",null,F(t.file.date),1)])],64))],42,Pl))]),_:1},8,["visible"])}}});const no=Wn(_l,[["__scopeId","data-v-27049f42"]]);function Ml(t,e,n,r){const i={x:0,y:0};let u=0,s=0,b=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,h=typeof(r==null?void 0:r.top)=="number"?r.top:0,y=!1;const m=S=>{S.stopPropagation(),S.preventDefault(),!(!t.value||!e.value)&&(u=S.clientX,s=S.clientY,b=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("mouseup",l))},f=S=>{if(!t.value||!e.value)return;const C=b+S.clientX-u,c=p+S.clientY-s,A=i.x+S.clientX-u,E=i.y+S.clientY-s;t.value.style.width=`${C}px`,t.value.style.height=`${c}px`,e.value.style.left=`${A}px`,e.value.style.top=`${E}px`,r!=null&&r.onResize&&r.onResize(C,c)},l=()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("mouseup",l)},a=S=>{S.stopPropagation(),S.preventDefault(),!(!t.value||!n.value)&&(y=!0,v=t.value.offsetLeft,h=t.value.offsetTop,u=S.clientX,s=S.clientY,document.documentElement.addEventListener("mousemove",o),document.documentElement.addEventListener("mouseup",d))},o=S=>{if(!t.value||!n.value||!y)return;const C=v+S.clientX-u,c=h+S.clientY-s;t.value.style.left=`${C}px`,t.value.style.top=`${c}px`,r!=null&&r.onDrag&&r.onDrag(C,c)},d=()=>{y=!1,document.documentElement.removeEventListener("mousemove",o),document.documentElement.removeEventListener("mouseup",d)};return Fe(()=>{!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`))}),Ye(()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("mouseup",l),document.documentElement.removeEventListener("mousemove",o),document.documentElement.removeEventListener("mouseup",d)}),oe(()=>[t.value,e.value,n.value],([S,C,c])=>{S&&C&&c&&(C.addEventListener("mousedown",m),c.addEventListener("mousedown",a))}),{handleResizeMouseDown:m,handleDragMouseDown:a}}const Nl=t=>(Rn("data-v-1c71d760"),t=t(),jn(),t),Dl={class:"container"},Tl={class:"actoion-bar"},Bl=Nl(()=>te("div",{"flex-placeholder":""},null,-1)),Fl={key:0,class:"gen-info"},Ql=se({__name:"fullScreenContextMenu",props:{file:null,idx:null},emits:["contextMenuClick"],setup(t,{emit:e}){const n=t,r=It(),i=I(),u=I([]),s=_(()=>{var l;return(((l=r.conf)==null?void 0:l.all_custom_tags)??[]).reduce((a,o)=>[...a,{...o,selected:!!u.value.find(d=>d.id===o.id)}],[])}),b=$t(),p=I("");oe(()=>n.file.fullpath,async l=>{b.tasks.forEach(a=>a.cancel()),b.pushAction(()=>Qn(l)).res.then(a=>{p.value=a})},{immediate:!0});const v=l=>{l&&b.pushAction(()=>Jn(n.file.fullpath)).res.then(a=>{u.value=a})},h=I(),y=I(),m=ni("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});Ml(i,h,y,{...m.value,onDrag:Te(function(l,a){m.value={...m.value,left:l,top:a}},300),onResize:Te(function(l,a){m.value={...m.value,width:l,height:a}},300)});function f(l){return l.parentNode}return(l,a)=>{const o=Ge,d=Vn,S=Un,C=Hn,c=xe;return M(),Z("div",{ref_key:"el",ref:i,class:We(["full-screen-menu",{"unset-size":!B(m).expanded}]),onWheelCapture:a[3]||(a[3]=ri(()=>{},["stop"]))},[te("div",Dl,[te("div",Tl,[te("div",{ref_key:"dragHandle",ref:y,class:"icon",style:{cursor:"grab"}},[g(B(Ea))],512),te("div",{class:"icon",style:{cursor:"pointer"},onClick:a[0]||(a[0]=A=>B(m).expanded=!B(m).expanded)},[B(m).expanded?(M(),q(B(La),{key:0})):(M(),q(B(Da),{key:1}))]),B(m).expanded?(M(),Z(ve,{key:0},[Bl,g(c,{trigger:["hover"],style:{"z-index":"99999"},"get-popup-container":A=>f(A),onVisibleChange:v},{overlay:D(()=>[g(C,{onClick:a[1]||(a[1]=A=>e("contextMenuClick",A,t.file,t.idx)),style:{"z-index":"99999"}},{default:D(()=>[g(d,{key:"send2txt2img"},{default:D(()=>[U(F(l.$t("sendToTxt2img")),1)]),_:1}),g(d,{key:"send2img2img"},{default:D(()=>[U(F(l.$t("sendToImg2img")),1)]),_:1}),g(d,{key:"send2inpaint"},{default:D(()=>[U(F(l.$t("sendToInpaint")),1)]),_:1}),g(d,{key:"send2extras"},{default:D(()=>[U(F(l.$t("sendToExtraFeatures")),1)]),_:1}),g(d,{key:"send2savedDir"},{default:D(()=>[U(F(l.$t("send2savedDir")),1)]),_:1}),g(S,{key:"toggle-tag",title:l.$t("toggleTag")},{default:D(()=>[(M(!0),Z(ve,null,zt(B(s),A=>(M(),q(d,{key:A.id},{default:D(()=>[U(F(A.name)+" ",1),A.selected?(M(),q(B(ar),{key:0})):(M(),q(B(lr),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])]),_:1})]),default:D(()=>[g(o,null,{default:D(()=>[U(F(B(j)("openContextMenu")),1)]),_:1})]),_:1},8,["get-popup-container"]),g(o,{onClick:a[2]||(a[2]=A=>B(Qt)(p.value,"copied"))},{default:D(()=>[U(F(l.$t("copyPrompt")),1)]),_:1})],64)):be("",!0)]),B(m).expanded?(M(),Z("div",Fl,F(p.value),1)):be("",!0)]),B(m).expanded?(M(),Z("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:h},null,512)):be("",!0)],34)}}});const ro=Wn(Ql,[["__scopeId","data-v-1c71d760"]]);export{xe as D,Jl as L,Yl as R,Gl as S,Zl as a,Kl as b,Xl as c,eo as d,ql as e,to as f,mt as g,Qt as h,Wa as i,mr as j,no as k,ro as l,Wl as s,wt as t,we as u};