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