sd-webui-infinite-image-bro.../vue/dist/assets/fullScreenContextMenu-8736e...

5 lines
79 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

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

import{P as he,bU as bn,a as ne,d as le,bq as nt,u as Ne,c as h,bV as it,_ as Jt,V as se,a0 as Se,aj as H,bL as St,a3 as At,bo as wn,h as R,bW as Sn,b as An,ay as En,bX as kn,a2 as Et,bK as Cn,bY as _n,bZ as On,$ as U,b0 as In,z as ee,aA as Pn,a1 as xn,aI as $n,b_ as Ln,ax as rt,aC as ue,b$ as Mn,c0 as Re,e as kt,bz as Tn,ag as ie,c1 as Nn,aR as zn,c2 as Bn,c3 as Fn,aM as at,am as Je,bn as Yt,c4 as Dn,c5 as Qn,c6 as Ee,c7 as jn,c8 as Vn,R as fe,ai as j,U as Un,c9 as ze,x as N,ca as Hn,bO as Be,cb as Ct,k as Fe,ah as Wn,cc as qt,ar as te,cd as lt,l as ge,aw as Kt,ap as Qe,ce as Rn,cf as _t,an as Gt,bQ as Ot,bP as Jn,cg as Ie,ch as Yn,aD as qn,ci as Kn,cj as Gn,ck as K,cl as be,t as Me,as as It,cm as Pt,cn as Xn,L as re,J as Zn,co as Ye,al as ke,cp as ei,cq as ti,cr as ni,cs as ii,at as ri,au as ai,o as L,m as J,ct as li,cu as si,cv as oi,cw as ui,cx as ci,a5 as di,y as V,cy as Ce,E as q,n as I,A as ve,cz as xt,bG as fi,cA as vi,B as pi,N as Ae,v as T,r as z,W as Xt,cB as hi,cC as Zt,M as en,cD as gi,cE as mi,p as G,cF as yi,X as tn,cG as bi,q as wi}from"./index-cb943354.js";import{t as je,l as pe,g as Si}from"./shortcut-1308f2ef.js";import{f as Ai,h as Ei,a as ki,t as Ci}from"./db-34982abd.js";var nn=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:he.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}}},Ve=bn(),_i=function(){return ne(ne({},nn()),{},{type:Ve.type,size:String,htmlType:Ve.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:he.any,title:String,loading:Ve.loading,onClick:{type:Function}})},Oi=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],Ii=se.Group;const Te=le({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:nt(_i(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(t,n){var i=n.slots,r=n.attrs,u=n.emit,p=function(S){u("update:visible",S),u("visibleChange",S)},o=Ne("dropdown-button",t),f=o.prefixCls,y=o.direction,A=o.getPopupContainer;return function(){var E,S,v=ne(ne({},t),r),l=v.type,s=l===void 0?"default":l,a=v.disabled,g=v.loading,m=v.htmlType,d=v.class,c=d===void 0?"":d,b=v.overlay,_=b===void 0?(E=i.overlay)===null||E===void 0?void 0:E.call(i):b,P=v.trigger,w=v.align,M=v.visible;v.onVisibleChange;var O=v.placement,B=O===void 0?y.value==="rtl"?"bottomLeft":"bottomRight":O,k=v.href,x=v.title,Q=v.icon,C=Q===void 0?((S=i.icon)===null||S===void 0?void 0:S.call(i))||h(it,null,null):Q,$=v.mouseEnterDelay,F=v.mouseLeaveDelay,X=v.overlayClassName,W=v.overlayStyle,Z=v.destroyPopupOnHide,Y=v.onClick;v["onUpdate:visible"];var ce=Jt(v,Oi),de={align:w,disabled:a,trigger:a?[]:P,placement:B,getPopupContainer:A.value,onVisibleChange:p,mouseEnterDelay:$,mouseLeaveDelay:F,visible:M,overlayClassName:X,overlayStyle:W,destroyPopupOnHide:Z},bt=h(se,{type:s,disabled:a,loading:g,onClick:Y,htmlType:m,href:k,title:x},{default:i.default}),wt=h(se,{type:s,icon:C},null);return h(Ii,ne(ne({},ce),{},{class:Se(f.value,c)}),{default:function(){return[i.leftButton?i.leftButton({button:bt}):bt,h(oe,de,{default:function(){return[i.rightButton?i.rightButton({button:wt}):wt]},overlay:function(){return _}})]}})}}});var rn=le({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:nt(nn(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(t,n){var i=n.slots,r=n.attrs,u=n.emit,p=Ne("dropdown",t),o=p.prefixCls,f=p.rootPrefixCls,y=p.direction,A=p.getPopupContainer,E=H(function(){var s=t.placement,a=s===void 0?"":s,g=t.transitionName;return g!==void 0?g:a.indexOf("top")>=0?"".concat(f.value,"-slide-down"):"".concat(f.value,"-slide-up")}),S=function(){var a,g,m,d=t.overlay||((a=i.overlay)===null||a===void 0?void 0:a.call(i)),c=Array.isArray(d)?d[0]:d;if(!c)return null;var b=c.props||{};St(!b.mode||b.mode==="vertical","Dropdown",'mode="'.concat(b.mode,`" is not supported for Dropdown's Menu.`));var _=b.selectable,P=_===void 0?!1:_,w=b.expandIcon,M=w===void 0?(g=c.children)===null||g===void 0||(m=g.expandIcon)===null||m===void 0?void 0:m.call(g):w,O=typeof M<"u"&&Et(M)?M:h("span",{class:"".concat(o.value,"-menu-submenu-arrow")},[h(Cn,{class:"".concat(o.value,"-menu-submenu-arrow-icon")},null)]),B=Et(c)?At(c,{mode:"vertical",selectable:P,expandIcon:function(){return O}}):c;return B},v=H(function(){var s=t.placement;if(!s)return y.value==="rtl"?"bottomRight":"bottomLeft";if(s.includes("Center")){var a=s.slice(0,s.indexOf("Center"));return St(!s.includes("Center"),"Dropdown","You are using '".concat(s,"' placement in Dropdown, which is deprecated. Try to use '").concat(a,"' instead.")),a}return s}),l=function(a){u("update:visible",a),u("visibleChange",a)};return function(){var s,a,g=t.arrow,m=t.trigger,d=t.disabled,c=t.overlayClassName,b=(s=i.default)===null||s===void 0?void 0:s.call(i)[0],_=At(b,wn({class:Se(b==null||(a=b.props)===null||a===void 0?void 0:a.class,R({},"".concat(o.value,"-rtl"),y.value==="rtl"),"".concat(o.value,"-trigger"))},d?{disabled:d}:{})),P=Se(c,R({},"".concat(o.value,"-rtl"),y.value==="rtl")),w=d?[]:m,M;w&&w.indexOf("contextmenu")!==-1&&(M=!0);var O=Sn({arrowPointAtCenter:An(g)==="object"&&g.pointAtCenter,autoAdjustOverflow:!0}),B=En(ne(ne(ne({},t),r),{},{builtinPlacements:O,overlayClassName:P,arrow:g,alignPoint:M,prefixCls:o.value,getPopupContainer:A.value,transitionName:E.value,trigger:w,onVisibleChange:l,placement:v.value}),["overlay","onUpdate:visible"]);return h(kn,B,{default:function(){return[_]},overlay:S})}}});rn.Button=Te;const oe=rn;var Pi=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},xi=le({compatConfig:{MODE:3},name:"ACheckableTag",props:Pi(),setup:function(t,n){var i=n.slots,r=n.emit,u=Ne("tag",t),p=u.prefixCls,o=function(A){var E=t.checked;r("update:checked",!E),r("change",!E),r("click",A)},f=H(function(){var y;return Se(p.value,(y={},R(y,"".concat(p.value,"-checkable"),!0),R(y,"".concat(p.value,"-checkable-checked"),t.checked),y))});return function(){var y;return h("span",{class:f.value,onClick:o},[(y=i.default)===null||y===void 0?void 0:y.call(i)])}}});const qe=xi;var $i=new RegExp("^(".concat(_n.join("|"),")(-inverse)?$")),Li=new RegExp("^(".concat(On.join("|"),")$")),Mi=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:he.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:he.any}},we=le({compatConfig:{MODE:3},name:"ATag",props:Mi(),slots:["closeIcon","icon"],setup:function(t,n){var i=n.slots,r=n.emit,u=n.attrs,p=Ne("tag",t),o=p.prefixCls,f=p.direction,y=U(!0);In(function(){t.visible!==void 0&&(y.value=t.visible)});var A=function(l){l.stopPropagation(),r("update:visible",!1),r("close",l),!l.defaultPrevented&&t.visible===void 0&&(y.value=!1)},E=H(function(){var v=t.color;return v?$i.test(v)||Li.test(v):!1}),S=H(function(){var v;return Se(o.value,(v={},R(v,"".concat(o.value,"-").concat(t.color),E.value),R(v,"".concat(o.value,"-has-color"),t.color&&!E.value),R(v,"".concat(o.value,"-hidden"),!y.value),R(v,"".concat(o.value,"-rtl"),f.value==="rtl"),v))});return function(){var v,l,s,a=t.icon,g=a===void 0?(v=i.icon)===null||v===void 0?void 0:v.call(i):a,m=t.color,d=t.closeIcon,c=d===void 0?(l=i.closeIcon)===null||l===void 0?void 0:l.call(i):d,b=t.closable,_=b===void 0?!1:b,P=function(){return _?c?h("span",{class:"".concat(o.value,"-close-icon"),onClick:A},[c]):h(xn,{class:"".concat(o.value,"-close-icon"),onClick:A},null):null},w={backgroundColor:m&&!E.value?m:void 0},M=g||null,O=(s=i.default)===null||s===void 0?void 0:s.call(i),B=M?h(ee,null,[M,h("span",null,[O])]):O,k="onClick"in u,x=h("span",{class:S.value,style:w},[B,P()]);return k?h(Pn,null,{default:function(){return[x]}}):x}}});we.CheckableTag=qe;we.install=function(e){return e.component(we.name,we),e.component(qe.name,qe),e};const an=we;oe.Button=Te;oe.install=function(e){return e.component(oe.name,oe),e.component(Te.name,Te),e};var Ti=["class","style"],Ni=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:he.any,delay:Number,indicator:he.any}},Pe=null;function zi(e,t){return!!e&&!!t&&!isNaN(Number(t))}function Ma(e){var t=e.indicator;Pe=typeof t=="function"?t:function(){return h(t,null,null)}}const Ta=le({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:nt(Ni(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:$n("configProvider",Ln)}},data:function(){var t=this.spinning,n=this.delay,i=zi(t,n);return{sSpinning:t&&!i}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var t=this;rt(function(){t.debouncifyUpdateSpinning(),t.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(t){var n=t||this.$props,i=n.delay;i&&(this.cancelExistingSpin(),this.updateSpinning=ue(this.originalUpdateSpinning,i))},updateSpinning:function(){var t=this.spinning,n=this.sSpinning;n!==t&&(this.sSpinning=t)},cancelExistingSpin:function(){var t=this.updateSpinning;t&&t.cancel&&t.cancel()},renderIndicator:function(t){var n="".concat(t,"-dot"),i=Mn(this,"indicator");return i===null?null:(Array.isArray(i)&&(i=i.length===1?i[0]:i),Re(i)?kt(i,{class:n}):Pe&&Re(Pe())?kt(Pe(),{class:n}):h("span",{class:"".concat(n," ").concat(t,"-dot-spin")},[h("i",{class:"".concat(t,"-dot-item")},null),h("i",{class:"".concat(t,"-dot-item")},null),h("i",{class:"".concat(t,"-dot-item")},null),h("i",{class:"".concat(t,"-dot-item")},null)]))}},render:function(){var t,n,i,r=this.$props,u=r.size,p=r.prefixCls,o=r.tip,f=o===void 0?(t=(n=this.$slots).tip)===null||t===void 0?void 0:t.call(n):o,y=r.wrapperClassName,A=this.$attrs,E=A.class,S=A.style,v=Jt(A,Ti),l=this.configProvider,s=l.getPrefixCls,a=l.direction,g=s("spin",p),m=this.sSpinning,d=(i={},R(i,g,!0),R(i,"".concat(g,"-sm"),u==="small"),R(i,"".concat(g,"-lg"),u==="large"),R(i,"".concat(g,"-spinning"),m),R(i,"".concat(g,"-show-text"),!!f),R(i,"".concat(g,"-rtl"),a==="rtl"),R(i,E,!!E),i),c=h("div",ne(ne({},v),{},{style:S,class:d}),[this.renderIndicator(g),f?h("div",{class:"".concat(g,"-text")},[f]):null]),b=Tn(this);if(b&&b.length){var _,P=(_={},R(_,"".concat(g,"-container"),!0),R(_,"".concat(g,"-blur"),m),_);return h("div",{class:["".concat(g,"-nested-loading"),y]},[m&&h("div",{key:"loading"},[c]),h("div",{class:P,key:"container"},[b])])}return c}});var Bi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};const Fi=Bi;function $t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Di(e,r,n[r])})}return e}function Di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var st=function(t,n){var i=$t({},t,n.attrs);return h(ie,$t({},i,{icon:Fi}),null)};st.displayName="StarFilled";st.inheritAttrs=!1;const ln=st;var Qi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const ji=Qi;function Lt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Vi(e,r,n[r])})}return e}function Vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ot=function(t,n){var i=Lt({},t,n.attrs);return h(ie,Lt({},i,{icon:ji}),null)};ot.displayName="FileOutlined";ot.inheritAttrs=!1;const Ui=ot;var Hi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const Wi=Hi;function Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Ri(e,r,n[r])})}return e}function Ri(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ut=function(t,n){var i=Mt({},t,n.attrs);return h(ie,Mt({},i,{icon:Wi}),null)};ut.displayName="FolderOpenOutlined";ut.inheritAttrs=!1;const Ji=ut;function Yi(e,t,n){if(!Nn(n))return!1;var i=typeof t;return(i=="number"?zn(n)&&Bn(t,n.length):i=="string"&&t in n)?Fn(n[t],e):!1}var qi=Math.ceil,Ki=Math.max;function Gi(e,t,n,i){for(var r=-1,u=Ki(qi((t-e)/(n||1)),0),p=Array(u);u--;)p[i?u:++r]=e,e+=n;return p}function Xi(e){return function(t,n,i){return i&&typeof i!="number"&&Yi(t,n,i)&&(n=i=void 0),t=je(t),n===void 0?(n=t,t=0):n=je(n),i=i===void 0?t<n?1:-1:je(i),Gi(t,n,i,e)}}var Zi=Xi();const sn=Zi,me=(...e)=>{document.addEventListener(...e),at(()=>document.removeEventListener(...e))},er="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",_e=new WeakMap;function tr(e,t){return{useHookShareState:i=>{const r=Qn();Je(r),_e.has(r)||(_e.set(r,Yt(e(r,i??(t==null?void 0:t())))),at(()=>{_e.delete(r)}));const u=_e.get(r);return Je(u),{state:u,toRefs(){return Dn(u)}}}}}var nr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const ir=nr;function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){rr(e,r,n[r])})}return e}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ct=function(t,n){var i=Tt({},t,n.attrs);return h(ie,Tt({},i,{icon:ir}),null)};ct.displayName="ArrowsAltOutlined";ct.inheritAttrs=!1;const ar=ct;var lr={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 sr=lr;function Nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){or(e,r,n[r])})}return e}function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dt=function(t,n){var i=Nt({},t,n.attrs);return h(ie,Nt({},i,{icon:sr}),null)};dt.displayName="DatabaseOutlined";dt.inheritAttrs=!1;const ur=dt;var cr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"};const dr=cr;function zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){fr(e,r,n[r])})}return e}function fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ft=function(t,n){var i=zt({},t,n.attrs);return h(ie,zt({},i,{icon:dr}),null)};ft.displayName="DragOutlined";ft.inheritAttrs=!1;const vr=ft;var pr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const hr=pr;function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){gr(e,r,n[r])})}return e}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vt=function(t,n){var i=Bt({},t,n.attrs);return h(ie,Bt({},i,{icon:hr}),null)};vt.displayName="FullscreenExitOutlined";vt.inheritAttrs=!1;const mr=vt;var yr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const br=yr;function Ft(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){wr(e,r,n[r])})}return e}function wr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pt=function(t,n){var i=Ft({},t,n.attrs);return h(ie,Ft({},i,{icon:br}),null)};pt.displayName="FullscreenOutlined";pt.inheritAttrs=!1;const Sr=pt;var Ar={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M603.3 327.5l-246 178a7.95 7.95 0 000 12.9l246 178c5.3 3.8 12.7 0 12.7-6.5V643c0-10.2-4.9-19.9-13.2-25.9L457.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"left-circle",theme:"outlined"};const Er=Ar;function Dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){kr(e,r,n[r])})}return e}function kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ht=function(t,n){var i=Dt({},t,n.attrs);return h(ie,Dt({},i,{icon:Er}),null)};ht.displayName="LeftCircleOutlined";ht.inheritAttrs=!1;const Na=ht;var Cr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M666.7 505.5l-246-178A8 8 0 00408 334v46.9c0 10.2 4.9 19.9 13.2 25.9L566.6 512 421.2 617.2c-8.3 6-13.2 15.6-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.5l246-178c4.4-3.2 4.4-9.8 0-13z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"right-circle",theme:"outlined"};const _r=Cr;function Qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){Or(e,r,n[r])})}return e}function Or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gt=function(t,n){var i=Qt({},t,n.attrs);return h(ie,Qt({},i,{icon:_r}),null)};gt.displayName="RightCircleOutlined";gt.inheritAttrs=!1;const za=gt;var Ir={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"};const Pr=Ir;function jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},i=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),i.forEach(function(r){xr(e,r,n[r])})}return e}function xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mt=function(t,n){var i=jt({},t,n.attrs);return h(ie,jt({},i,{icon:Pr}),null)};mt.displayName="StarOutlined";mt.inheritAttrs=!1;const on=mt;const ye=async e=>(await Ee.value.get("/files",{params:{folder_path:e}})).data,$r=async e=>(await Ee.value.post("/delete_files",{file_paths:e})).data,un=async(e,t,n)=>(await Ee.value.post("/move_files",{file_paths:e,dest:t,create_dest_folder:n})).data,Lr=async(e,t,n)=>(await Ee.value.post("/copy_files",{file_paths:e,dest:t,create_dest_folder:n})).data,Mr=async e=>{await Ee.value.post("/mkdirs",{dest_folder:e})};var cn={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */(function(e,t){(function(n,i){e.exports=i})(jn,function(){var n={};n.version="0.3.5";var i=n.settings={minimum:.08,easing:"linear",positionUsing:"",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(l){var s,a;for(s in l)a=l[s],a!==void 0&&l.hasOwnProperty(s)&&(i[s]=a);return this},n.status=null,n.set=function(l){var s=n.isStarted();l=r(l,i.minimum,1),n.status=l===1?null:l;var a=n.render(!s),g=a.querySelector(i.barSelector),m=i.speed,d=i.easing;return a.offsetWidth,o(function(c){i.positionUsing===""&&(i.positionUsing=n.getPositioningCSS()),f(g,p(l,m,d)),l===1?(f(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout(function(){f(a,{transition:"all "+m+"ms linear",opacity:0}),setTimeout(function(){n.remove(),c()},m)},m)):setTimeout(c,m)}),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())},i.trickleSpeed)};return i.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 s=n.status;return s?s>1?void 0:(typeof l!="number"&&(s>=0&&s<.2?l=.1:s>=.2&&s<.5?l=.04:s>=.5&&s<.8?l=.02:s>=.8&&s<.99?l=.005:l=0),s=r(s+l,0,.994),n.set(s)):n.start()},n.trickle=function(){return n.inc()},function(){var l=0,s=0;n.promise=function(a){return!a||a.state()==="resolved"?this:(s===0&&n.start(),l++,s++,a.always(function(){s--,s===0?(l=0,n.done()):n.set((l-s)/l)}),this)}}(),n.getElement=function(){var l=n.getParent();if(l){var s=Array.prototype.slice.call(l.querySelectorAll(".nprogress")).filter(function(a){return a.parentElement===l});if(s.length>0)return s[0]}return null},n.getParent=function(){if(i.parent instanceof HTMLElement)return i.parent;if(typeof i.parent=="string")return document.querySelector(i.parent)},n.render=function(l){if(n.isRendered())return n.getElement();A(document.documentElement,"nprogress-busy");var s=document.createElement("div");s.id="nprogress",s.className="nprogress",s.innerHTML=i.template;var a=s.querySelector(i.barSelector),g=l?"-100":u(n.status||0),m=n.getParent(),d;return f(a,{transition:"all 0 linear",transform:"translate3d("+g+"%,0,0)"}),i.showSpinner||(d=s.querySelector(i.spinnerSelector),d&&v(d)),m!=document.body&&A(m,"nprogress-custom-parent"),m.appendChild(s),s},n.remove=function(){n.status=null,E(document.documentElement,"nprogress-busy"),E(n.getParent(),"nprogress-custom-parent");var l=n.getElement();l&&v(l)},n.isRendered=function(){return!!n.getElement()},n.getPositioningCSS=function(){var l=document.body.style,s="WebkitTransform"in l?"Webkit":"MozTransform"in l?"Moz":"msTransform"in l?"ms":"OTransform"in l?"O":"";return s+"Perspective"in l?"translate3d":s+"Transform"in l?"translate":"margin"};function r(l,s,a){return l<s?s:l>a?a:l}function u(l){return(-1+l)*100}function p(l,s,a){var g;return i.positionUsing==="translate3d"?g={transform:"translate3d("+u(l)+"%,0,0)"}:i.positionUsing==="translate"?g={transform:"translate("+u(l)+"%,0)"}:g={"margin-left":u(l)+"%"},g.transition="all "+s+"ms "+a,g}var o=function(){var l=[];function s(){var a=l.shift();a&&a(s)}return function(a){l.push(a),l.length==1&&s()}}(),f=function(){var l=["Webkit","O","Moz","ms"],s={};function a(c){return c.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(b,_){return _.toUpperCase()})}function g(c){var b=document.body.style;if(c in b)return c;for(var _=l.length,P=c.charAt(0).toUpperCase()+c.slice(1),w;_--;)if(w=l[_]+P,w in b)return w;return c}function m(c){return c=a(c),s[c]||(s[c]=g(c))}function d(c,b,_){b=m(b),c.style[b]=_}return function(c,b){var _=arguments,P,w;if(_.length==2)for(P in b)w=b[P],w!==void 0&&b.hasOwnProperty(P)&&d(c,P,w);else d(c,_[1],_[2])}}();function y(l,s){var a=typeof l=="string"?l:S(l);return a.indexOf(" "+s+" ")>=0}function A(l,s){var a=S(l),g=a+s;y(a,s)||(l.className=g.substring(1))}function E(l,s){var a=S(l),g;y(l,s)&&(g=a.replace(" "+s+" "," "),l.className=g.substring(1,g.length-1))}function S(l){return(" "+(l&&l.className||"")+" ").replace(/\s+/gi," ")}function v(l){l&&l.parentNode&&l.parentNode.removeChild(l)}return n})})(cn);var Tr=cn.exports;const Nr=Vn(Tr),zr=e=>{const t=U("");return new Promise(n=>{fe.confirm({title:j("inputFolderName"),content:()=>h(Un,{value:t.value,"onUpdate:value":i=>t.value=i},null),async onOk(){if(!t.value)return;const i=ze(e,t.value);await Mr(i),n()}})})},dn=()=>h("p",{style:{background:"var(--zp-secondary-background)",padding:"8px",borderLeft:"4px solid var(--primary-color)"}},[N("Tips: "),j("multiSelectTips")]),Vt=["blue","cyan","gold","green","lime","magenta","orange","pink","purple","red","yellow","error","success","warning","processing","geekblue","volcano"],yt=Hn("useTagStore",()=>{const e=Be(),t=new Set,n=Yt(new Map),i=async o=>{if(o=o.filter(f=>!t.has(f)&&!n.has(f)),!!o.length)try{o.forEach(y=>n.set(y,[]));const f=await Ai(o);for(const y in f)n.set(y,f[y])}finally{o.forEach(f=>t.delete(f))}},r=new Map;return{tagMap:n,q:e,getColor:o=>{let f=r.get(o);if(!f){const y=Ct.hash.sha256.hash(o),A=parseInt(Ct.codec.hex.fromBits(y),16)%Vt.length;f=Vt[A],r.set(o,f)}return f},fetchImageTags:i,refreshTags:async o=>{o.forEach(f=>n.delete(f)),await i(o)}}});function Ue(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Re(e)}const He=new Map,D=Fe(),fn=yt(),Ut=Wn(),Oe=new BroadcastChannel("iib-image-transfer-bus"),{eventEmitter:xe,useEventListen:Ke}=qt(),{useHookShareState:ae}=tr((e,{images:t})=>{const n=U({tabIdx:-1,paneIdx:-1}),i=H(()=>pe(r.value)),r=U([]),u=H(()=>{var s;return r.value.map(a=>a.curr).slice((s=D.conf)!=null&&s.is_win?1:0)}),p=H(()=>ze(...u.value)),o=U(D.defaultSortingMethod),f=H(()=>{var d;if(t.value)return t.value;if(!i.value)return[];const s=((d=i.value)==null?void 0:d.files)??[],a=o.value,{walkFiles:g}=i.value,m=c=>D.onlyFoldersAndImages?c.filter(b=>b.type==="dir"||K(b.name)):c;return n.value.walkModePath?g?g.map(c=>be(m(c),a)).flat():be(m(s),a):be(m(s),a)}),y=U([]),A=U(-1),E=U(!0),S=U(!1),v=U(!1),l=()=>{var s,a,g;return(g=(a=(s=D.tabList)==null?void 0:s[n.value.tabIdx])==null?void 0:a.panes)==null?void 0:g[n.value.paneIdx]};return{previewing:v,spinning:S,canLoadNext:E,multiSelectedIdxs:y,previewIdx:A,basePath:u,currLocation:p,currPage:i,stack:r,sortMethod:o,sortedFiles:f,scroller:U(),stackViewEl:U(),props:n,getPane:l,...qt()}},()=>({images:U()}));function Ba(e){const{previewIdx:t,eventEmitter:n,canLoadNext:i,previewing:r,sortedFiles:u,scroller:p}=ae().toRefs(),{state:o}=ae();let f=null;const y=(v,l)=>{var s;r.value=v,f!=null&&!v&&l&&((s=p.value)==null||s.scrollToItem(f),f=null)},A=()=>{e.walkModePath&&!S("next")&&i&&(te.info(j("loadingNextFolder")),n.value.emit("loadNextDir",!0))};me("keydown",v=>{var l;if(r.value){let s=t.value;if(["ArrowDown","ArrowRight"].includes(v.key))for(s++;u.value[s]&&!K(u.value[s].name);)s++;else if(["ArrowUp","ArrowLeft"].includes(v.key))for(s--;u.value[s]&&!K(u.value[s].name);)s--;if(K((l=u.value[s])==null?void 0:l.name)??""){t.value=s;const a=p.value;a&&!(s>=a.$_startIndex&&s<=a.$_endIndex)&&(f=s)}A()}});const E=v=>{var s;let l=t.value;if(v==="next")for(l++;u.value[l]&&!K(u.value[l].name);)l++;else if(v==="prev")for(l--;u.value[l]&&!K(u.value[l].name);)l--;if(K((s=u.value[l])==null?void 0:s.name)??""){t.value=l;const a=p.value;a&&!(l>=a.$_startIndex&&l<=a.$_endIndex)&&(f=l)}A()},S=v=>{var s;let l=t.value;if(v==="next")for(l++;u.value[l]&&!K(u.value[l].name);)l++;else if(v==="prev")for(l--;u.value[l]&&!K(u.value[l].name);)l--;return K((s=u.value[l])==null?void 0:s.name)??""};return Ke("removeFiles",async()=>{var v;r.value&&!o.sortedFiles[t.value]&&(te.info(j("manualExitFullScreen"),5),await lt(500),(v=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||v.click(),t.value=-1)}),{previewIdx:t,onPreviewVisibleChange:y,previewing:r,previewImgMove:E,canPreview:S}}function Fa(e){const t=U(),{scroller:n,stackViewEl:i,stack:r,currPage:u,currLocation:p,sortMethod:o,useEventListen:f,eventEmitter:y,getPane:A,multiSelectedIdxs:E,sortedFiles:S}=ae().toRefs();ge(()=>r.value.length,ue((C,$)=>{var F;C!==$&&((F=n.value)==null||F.scrollToItem(0))},300));const v=async C=>{if(await m(C),e.walkModePath){await lt();const[$]=be(u.value.files,o.value).filter(F=>F.type==="dir");$&&await m($.fullpath),await y.value.emit("loadNextDir")}};Kt(async()=>{var C;if(!r.value.length){const $=await ye("/");r.value.push({files:$.files,curr:"/"})}t.value=new Nr,t.value.configure({parent:i.value}),e.path&&e.path!=="/"?await v(e.walkModePath??e.path):(C=D.conf)!=null&&C.home&&m(D.conf.home)}),ge(p,ue(C=>{const $=A.value();if(!$)return;$.path=C;const F=$.path.split("/").pop(),W=(()=>{var Z;if(!e.walkModePath){const Y=Ie(C);for(const[ce,de]of Object.entries(D.pathAliasMap))if(Y.startsWith(de))return Y.replace(de,ce);return F}return"Walk: "+(((Z=D.quickMovePaths.find(Y=>Y.dir===$.walkModePath))==null?void 0:Z.zh)??F)})();$.name=Qe("div",{style:"display:flex;align-items:center"},[Qe(ur),Qe("span",{class:"line-clamp-1",style:"max-width: 256px"},W)]),$.nameFallbackStr=W,D.recent=D.recent.filter(Z=>Z.key!==$.key),D.recent.unshift({path:C,key:$.key}),D.recent.length>20&&(D.recent=D.recent.slice(0,20))},300));const l=()=>Me(p.value),s=async C=>{var $,F;if(C.type==="dir")try{($=t.value)==null||$.start();const{files:X}=await ye(C.fullpath);r.value.push({files:X,curr:C.name})}finally{(F=t.value)==null||F.done()}},a=C=>{for(;C<r.value.length-1;)r.value.pop()},g=(C,$)=>(Je(D.conf,"global.conf load failed"),D.conf.is_win?C.toLowerCase()==$.toLowerCase():C==$),m=async C=>{var F,X;const $=r.value.slice();try{Rn(C)||(C=ze(((F=D.conf)==null?void 0:F.sd_cwd)??"/",C));const W=_t(C),Z=r.value.map(Y=>Y.curr);for(Z.shift();Z[0]&&W[0]&&g(Z[0],W[0]);)Z.shift(),W.shift();for(let Y=0;Y<Z.length;Y++)r.value.pop();if(!W.length)return d();for(const Y of W){const ce=(X=u.value)==null?void 0:X.files.find(de=>g(de.name,Y));if(!ce)throw console.error({frags:W,frag:Y,stack:Gt(r.value)}),new Error(`${Y} not found`);await s(ce)}}catch(W){throw te.error(j("moveFailedCheckPath")+(W instanceof Error?W.message:"")),console.error(C,_t(C),u.value),r.value=$,W}},d=Ot(async()=>{var C,$,F;try{if((C=t.value)==null||C.start(),e.walkModePath)a(0),await v(e.walkModePath);else{const{files:X}=await ye(r.value.length===1?"/":p.value);pe(r.value).files=X}($=n.value)==null||$.scrollToItem(0),te.success(j("refreshCompleted"))}finally{(F=t.value)==null||F.done()}});Jn("returnToIIB",Ot(async()=>{var C,$;if(!e.walkModePath)try{(C=t.value)==null||C.start();const{files:F}=await ye(r.value.length===1?"/":p.value);pe(r.value).files.map(W=>W.date).join()!==F.map(W=>W.date).join()&&(pe(r.value).files=F,te.success(j("autoUpdate")))}finally{($=t.value)==null||$.done()}})),f.value("refresh",d);const c=C=>{e.walkModePath&&(A.value().walkModePath=C),v(C)},b=H(()=>D.quickMovePaths.map(C=>({...C,path:Ie(C.dir)}))),_=H(()=>{const C=Ie(p.value);return b.value.find(F=>F.path===C)}),P=async()=>{const C=_.value;if(C){if(!C.can_delete)return;await Ei(p.value),te.success(j("removeComplete"))}else await ki(p.value),te.success(j("addComplete"));It.emit("searchIndexExpired"),It.emit("updateGlobalSetting")},w=U(!1),M=U(p.value),O=()=>{w.value=!0,M.value=p.value},B=async()=>{await m(M.value),w.value=!1};me("click",()=>{w.value=!1});const k=()=>{const C=parent.location,$=C.href.substring(0,C.href.length-C.search.length),F=new URLSearchParams(C.search);F.set("action","open"),F.set("path",p.value);const X=`${$}?${F.toString()}`;Me(X,j("copyLocationUrlSuccessMsg"))},x=()=>{console.log(`select all 0 -> ${S.value.length}`),E.value=sn(0,S.value.length)};return f.value("selectAll",x),{locInputValue:M,isLocationEditing:w,onLocEditEnter:B,onEditBtnClick:O,addToSearchScanPathAndQuickMove:P,searchPathInfo:_,refresh:d,copyLocation:l,back:a,openNext:s,currPage:u,currLocation:p,to:m,stack:r,scroller:n,share:k,selectAll:x,quickMoveTo:c,onCreateFloderBtnClick:async()=>{await zr(p.value),await d()}}}function Da(e){const{scroller:t,sortedFiles:n,stack:i,sortMethod:r,currLocation:u,currPage:p,stackViewEl:o,canLoadNext:f,previewIdx:y}=ae().toRefs(),{state:A}=ae(),E=U(!1),S=U(D.defaultGridCellWidth),v=H(()=>S.value+16),l=44,{width:s}=Yn(o),a=H(()=>~~(s.value/v.value)),g=H(()=>{const P=v.value;return{first:P+(S.value<=160?0:l),second:P}}),m=U(!1),d=async()=>{var P;if(!(m.value||!e.walkModePath||!f.value))try{m.value=!0;const w=i.value[i.value.length-2],M=be(w.files,r.value),O=M.findIndex(B=>{var k;return B.name===((k=p.value)==null?void 0:k.curr)});if(O!==-1){const B=M[O+1],k=ze(u.value,"../",B.name),x=await ye(k),Q=p.value;Q.curr=B.name,Q.walkFiles||(Q.walkFiles=[Q.files]),Q.walkFiles.push(x.files),console.log("curr page files length",(P=p.value)==null?void 0:P.files.length)}}catch(w){console.error("loadNextDir",w),f.value=!1}finally{m.value=!1}},c=async(P=!1)=>{const w=t.value,M=()=>P?y.value:(w==null?void 0:w.$_endIndex)??0;for(;!n.value.length||M()>n.value.length-20&&f.value;)await lt(100),await d()};A.useEventListen("loadNextDir",c);const b=()=>{const P=t.value;if(P){const w=n.value.slice(Math.max(P.$_startIndex-10,0),P.$_endIndex+10).filter(M=>M.is_under_scanned_path&&K(M.name)).map(M=>M.fullpath);fn.fetchImageTags(w)}};ge(u,ue(b,150));const _=ue(()=>{c(),b()},300);return{gridItems:a,sortedFiles:n,sortMethodConv:qn,moreActionsDropdownShow:E,gridSize:v,sortMethod:r,onScroll:_,loadNextDir:d,loadNextDirLoading:m,canLoadNext:f,itemSize:g,cellWidth:S,onViewedImagesChange:b}}function Qa(){const{currLocation:e,sortedFiles:t,currPage:n,multiSelectedIdxs:i,eventEmitter:r}=ae().toRefs(),u=()=>{i.value=[]};return me("click",u),me("blur",u),ge(n,u),{onFileDragStart:(y,A)=>{const E=Gt(t.value[A]);Ut.fileDragging=!0,console.log("onFileDragStart set drag file ",y,A,E);const S=[E];let v=E.type==="dir";if(i.value.includes(A)){const s=i.value.map(a=>t.value[a]);S.push(...s),v=s.some(a=>a.type==="dir")}const l={includeDir:v,loc:e.value||"search-result",path:Pt(S,"fullpath").map(s=>s.fullpath),nodes:Pt(S,"fullpath"),__id:"FileTransferData"};y.dataTransfer.setData("text/plain",JSON.stringify(l))},onDrop:async y=>{const A=Xn(y);if(!A)return;const E=e.value;if(A.loc===E)return;const S=Be(),v=async()=>S.pushAction(async()=>{await Lr(A.path,E),r.value.emit("refresh"),fe.destroyAll()}),l=()=>S.pushAction(async()=>{await un(A.path,E),xe.emit("removeFiles",{paths:A.path,loc:A.loc}),r.value.emit("refresh"),fe.destroyAll()});fe.confirm({title:j("confirm")+"?",width:"60vw",content:()=>{let s,a,g;return h("div",null,[h("div",null,[`${j("moveSelectedFilesTo")} ${E}`,h("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[A.path.map(m=>h("li",null,[m.split(/[/\\]/).pop()]))])]),h(dn,null,null),h("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},class:"actions"},[h(se,{onClick:fe.destroyAll},Ue(s=j("cancel"))?s:{default:()=>[s]}),h(se,{type:"primary",loading:!S.isIdle,onClick:v},Ue(a=j("copy"))?a:{default:()=>[a]}),h(se,{type:"primary",loading:!S.isIdle,onClick:l},Ue(g=j("move"))?g:{default:()=>[g]})])])},maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})},multiSelectedIdxs:i,onFileDragEnd:()=>{Ut.fileDragging=!1}}}function ja(e,{openNext:t}){const n=U(!1),i=U(""),{sortedFiles:r,previewIdx:u,multiSelectedIdxs:p,stack:o,currLocation:f,spinning:y,previewing:A,stackViewEl:E,eventEmitter:S}=ae().toRefs(),v=Ie;Ke("removeFiles",({paths:m,loc:d})=>{if(v(d)!==v(f.value))return;const c=pe(o.value);c&&(c.files=c.files.filter(b=>!m.includes(b.fullpath)),c.walkFiles&&(c.walkFiles=c.walkFiles.map(b=>b.filter(_=>!m.includes(_.fullpath)))))}),Ke("addFiles",({files:m,loc:d})=>{if(v(d)!==v(f.value))return;const c=pe(o.value);c&&c.files.unshift(...m)});const l=Be(),s=async(m,d,c)=>{u.value=c,D.fullscreenPreviewInitialUrl=re(d);const b=p.value.indexOf(c);if(m.shiftKey){if(b!==-1)p.value.splice(b,1);else{p.value.push(c),p.value.sort((w,M)=>w-M);const _=p.value[0],P=p.value[p.value.length-1];p.value=sn(_,P+1)}m.stopPropagation()}else m.ctrlKey||m.metaKey?(b!==-1?p.value.splice(b,1):p.value.push(c),m.stopPropagation()):await t(d)},a=async(m,d,c)=>{var M,O,B;const b=re(d),_=f.value,P=()=>{let k=[];return p.value.includes(c)?k=p.value.map(x=>r.value[x]):k.push(d),k},w=async k=>{if(!y.value)try{y.value=!0,await ti(d.fullpath),Oe.postMessage(JSON.stringify({event:"click_hidden_button",btnEleId:"iib_hidden_img_update_trigger"}));const x=setTimeout(()=>ni.warn({message:j("long_loading"),duration:20}),5e3);await ii(),clearTimeout(x),Oe.postMessage(JSON.stringify({event:"click_hidden_button",btnEleId:`iib_hidden_tab_${k}`}))}catch(x){console.error(x),te.error("发送图像失败请携带console的错误消息找开发者")}finally{y.value=!1}};if(`${m.key}`.startsWith("toggle-tag-")){const k=+`${m.key}`.split("toggle-tag-")[1],{is_remove:x}=await Ci({tag_id:k,img_path:d.fullpath}),Q=(O=(M=D.conf)==null?void 0:M.all_custom_tags.find(C=>C.id===k))==null?void 0:O.name;fn.refreshTags([d.fullpath]),te.success(j(x?"removedTagFromImage":"addedTagToImage",{tag:Q}));return}switch(m.key){case"previewInNewWindow":return window.open(b);case"download":return window.open(re(d,!0));case"copyPreviewUrl":return Me(parent.document.location.origin+b);case"send2txt2img":return w("txt2img");case"send2img2img":return w("img2img");case"send2inpaint":return w("inpaint");case"send2extras":return w("extras");case"send2savedDir":{const k=D.quickMovePaths.find(C=>C.key==="outdir_save");if(!k)return te.error(j("unknownSavedDir"));const x=ei(k.dir,(B=D.conf)==null?void 0:B.sd_cwd),Q=P();await un(Q.map(C=>C.fullpath),x,!0),xe.emit("removeFiles",{paths:Q.map(C=>C.fullpath),loc:f.value}),xe.emit("addFiles",{files:Q,loc:x});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const k=m.key.split("-")[1];Oe.postMessage(JSON.stringify({event:"send_to_control_net",type:k,url:re(d)}));break}case"send2outpaint":{i.value=await l.pushAction(()=>Ye(d.fullpath)).res;const[k,x]=(i.value||"").split(`
`);Oe.postMessage(JSON.stringify({event:"send_to_outpaint",url:re(d),prompt:k,negPrompt:x.slice(17)}));break}case"openWithWalkMode":{He.set(_,o.value);const k=D.tabList[e.tabIdx],x={type:"local",key:ke(),path:d.fullpath,name:j("local"),stackKey:_,walkModePath:d.fullpath};k.panes.push(x),k.key=x.key;break}case"openInNewTab":{He.set(_,o.value);const k=D.tabList[e.tabIdx],x={type:"local",key:ke(),path:d.fullpath,name:j("local"),stackKey:_};k.panes.push(x),k.key=x.key;break}case"openOnTheRight":{He.set(_,o.value);let k=D.tabList[e.tabIdx+1];k||(k={panes:[],key:"",id:ke()},D.tabList[e.tabIdx+1]=k);const x={type:"local",key:ke(),path:d.fullpath,name:j("local"),stackKey:_};k.panes.push(x),k.key=x.key;break}case"viewGenInfo":{n.value=!0,i.value=await l.pushAction(()=>Ye(d.fullpath)).res;break}case"openWithLocalFileBrowser":{await Zn(d.fullpath);break}case"deleteFiles":{const k=P();await new Promise(x=>{fe.confirm({title:j("confirmDelete"),maskClosable:!0,width:"60vw",content:h("div",null,[h("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[k.map(Q=>h("li",null,[Q.fullpath.split(/[/\\]/).pop()]))]),h(dn,null,null)]),async onOk(){const Q=k.map(C=>C.fullpath);await $r(Q),te.success(j("deleteSuccess")),xe.emit("removeFiles",{paths:Q,loc:f.value}),x()}})});break}}return{}},{isOutside:g}=Kn(E);return me("keydown",m=>{var c,b,_;const d=Si(m);if(A.value){const P=(c=Object.entries(D.shortcut).find(w=>w[1]===d&&w[1]))==null?void 0:c[0];if(P){m.stopPropagation(),m.preventDefault();const w=u.value,M=r.value[w];switch(P){case"delete":return re(M)===D.fullscreenPreviewInitialUrl?te.warn(j("fullscreenRestriction")):a({key:"deleteFiles"},M,w);default:{const O=(b=/^toggle_tag_(.*)$/.exec(P))==null?void 0:b[1],B=(_=D.conf)==null?void 0:_.all_custom_tags.find(k=>k.name===O);return B?a({key:`toggle-tag-${B.id}`},M,w):void 0}}}}else!g.value&&["Ctrl + KeyA","Cmd + KeyA"].includes(d)&&(m.preventDefault(),m.stopPropagation(),S.value.emit("selectAll"))}),{onFileItemClick:s,onContextMenuClick:a,showGenInfo:n,imageGenInfo:i,q:l}}const Va=()=>{const{stackViewEl:e}=ae().toRefs(),t=U(-1);return Gn(e,n=>{var r;let i=n.target;for(;i.parentElement;)if(i=i.parentElement,i.tagName.toLowerCase()==="li"&&i.classList.contains("file-item-trigger")){const u=(r=i.dataset)==null?void 0:r.idx;u&&Number.isSafeInteger(+u)&&(t.value=+u);return}}),{showMenuIdx:t}};function Br(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var r=e.indexOf("Edge/");return r>0?parseInt(e.substring(r+5,e.indexOf(".",r)),10):-1}let $e;function Ge(){Ge.init||(Ge.init=!0,$e=Br()!==-1)}var De={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ge(),rt(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",$e&&this.$el.appendChild(e),e.data="about:blank",$e||this.$el.appendChild(e)},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&&(!$e&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Fr=li();ri("data-v-b329ee4c");const Dr={class:"resize-observer",tabindex:"-1"};ai();const Qr=Fr((e,t,n,i,r,u)=>(L(),J("div",Dr)));De.render=Qr;De.__scopeId="data-v-b329ee4c";De.__file="src/components/ResizeObserver.vue";function Le(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Le=function(t){return typeof t}:Le=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Le(e)}function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ht(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Vr(e,t,n){return t&&Ht(e.prototype,t),n&&Ht(e,n),e}function Wt(e){return Ur(e)||Hr(e)||Wr(e)||Rr()}function Ur(e){if(Array.isArray(e))return Xe(e)}function Hr(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Wr(e,t){if(e){if(typeof e=="string")return Xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xe(e,t)}}function Xe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Rr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jr(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function Yr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,u,p=function(f){for(var y=arguments.length,A=new Array(y>1?y-1:0),E=1;E<y;E++)A[E-1]=arguments[E];if(u=A,!(i&&f===r)){var S=n.leading;typeof S=="function"&&(S=S(f,r)),(!i||f!==r)&&S&&e.apply(void 0,[f].concat(Wt(u))),r=f,clearTimeout(i),i=setTimeout(function(){e.apply(void 0,[f].concat(Wt(u))),i=0},t)}};return p._clear=function(){clearTimeout(i),i=null},p}function vn(e,t){if(e===t)return!0;if(Le(e)==="object"){for(var n in e)if(!vn(e[n],t[n]))return!1;return!0}return!1}var qr=function(){function e(t,n,i){jr(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,i)}return Vr(e,[{key:"createObserver",value:function(n,i){var r=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Jr(n),this.callback=function(o,f){r.options.callback(o,f),o&&r.options.once&&(r.frozen=!0,r.destroyObserver())},this.callback&&this.options.throttle){var u=this.options.throttleOptions||{},p=u.leading;this.callback=Yr(this.callback,this.options.throttle,{leading:function(f){return p==="both"||p==="visible"&&f||p==="hidden"&&!f}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(o){var f=o[0];if(o.length>1){var y=o.find(function(E){return E.isIntersecting});y&&(f=y)}if(r.callback){var A=f.isIntersecting&&f.intersectionRatio>=r.threshold;if(A===r.oldResult)return;r.oldResult=A,r.callback(A,f)}},this.options.intersection),rt(function(){r.observer&&r.observer.observe(r.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}}]),e}();function pn(e,t,n){var i=t.value;if(i)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 r=new qr(e,i,n);e._vue_visibilityState=r}}function Kr(e,t,n){var i=t.value,r=t.oldValue;if(!vn(i,r)){var u=e._vue_visibilityState;if(!i){hn(e);return}u?u.createObserver(i,n):pn(e,{value:i},n)}}function hn(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Gr={beforeMount:pn,updated:Kr,unmounted:hn},Xr={itemsLimit:1e3},Zr=/(auto|scroll)/;function gn(e,t){return e.parentNode===null?t:gn(e.parentNode,t.concat([e]))}var We=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},ea=function(t){return We(t,"overflow")+We(t,"overflow-y")+We(t,"overflow-x")},ta=function(t){return Zr.test(ea(t))};function Rt(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=gn(e.parentNode,[]),n=0;n<t.length;n+=1)if(ta(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function Ze(e){"@babel/helpers - typeof";return Ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(e)}var na={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function ia(){return this.items.length&&Ze(this.items[0])!=="object"}var et=!1;if(typeof window<"u"){et=!1;try{var ra=Object.defineProperty({},"passive",{get:function(){et=!0}});window.addEventListener("test",null,ra)}catch{}}let aa=0;var mn={name:"RecycleScroller",components:{ResizeObserver:De},directives:{ObserveVisibility:Gr},props:{...na,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,i=this.minItemSize;let r=1e4,u=0,p;for(let o=0,f=t.length;o<f;o++)p=t[o][n]||i,p<r&&(r=p),u+=p,e[o]={accumulator:u,size:p};return this.$_computedMinItemSize=r,e}return[]},simpleArray:ia,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let i=0,r=t.length;i<r;i++)n[t[i][e]]=i;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,i,r){const u=si({id:aa++,index:t,used:!0,key:i,type:r}),p=oi({item:n,position:0,nr:u});return e.push(p),p},unuseView(e,t=!1){const n=this.$_unusedViews,i=e.nr.type;let r=n.get(i);r||(r=[],n.set(i,r)),r.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,i=this.gridItems||1,r=this.itemSecondarySize||n,u=this.$_computedMinItemSize,p=this.typeField,o=this.simpleArray?null:this.keyField,f=this.items,y=f.length,A=this.sizes,E=this.$_views,S=this.$_unusedViews,v=this.pool,l=this.itemIndexByKey;let s,a,g,m,d;if(!y)s=a=m=d=g=0;else if(this.$_prerender)s=m=0,a=d=Math.min(this.prerender,f.length),g=null;else{const O=this.getScroll();if(t){let x=O.start-this.$_lastUpdateScrollPosition;if(x<0&&(x=-x),n===null&&x<u||x<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=O.start;const B=this.buffer;O.start-=B,O.end+=B;let k=0;if(this.$refs.before&&(k=this.$refs.before.scrollHeight,O.start-=k),this.$refs.after){const x=this.$refs.after.scrollHeight;O.end+=x}if(n===null){let x,Q=0,C=y-1,$=~~(y/2),F;do F=$,x=A[$].accumulator,x<O.start?Q=$:$<y-1&&A[$+1].accumulator>O.start&&(C=$),$=~~((Q+C)/2);while($!==F);for($<0&&($=0),s=$,g=A[y-1].accumulator,a=$;a<y&&A[a].accumulator<O.end;a++);for(a===-1?a=f.length-1:(a++,a>y&&(a=y)),m=s;m<y&&k+A[m].accumulator<O.start;m++);for(d=m;d<y&&k+A[d].accumulator<O.end;d++);}else{s=~~(O.start/n*i);const x=s%i;s-=x,a=Math.ceil(O.end/n*i),m=Math.max(0,Math.floor((O.start-k)/n*i)),d=Math.floor((O.end-k)/n*i),s<0&&(s=0),a>y&&(a=y),m<0&&(m=0),d>y&&(d=y),g=Math.ceil(y/i)*n}}a-s>Xr.itemsLimit&&this.itemsLimitError(),this.totalSize=g;let c;const b=s<=this.$_endIndex&&a>=this.$_startIndex;if(b)for(let O=0,B=v.length;O<B;O++)c=v[O],c.nr.used&&(e&&(c.nr.index=l[c.item[o]]),(c.nr.index==null||c.nr.index<s||c.nr.index>=a)&&this.unuseView(c));const _=b?null:new Map;let P,w,M;for(let O=s;O<a;O++){P=f[O];const B=o?P[o]:P;if(B==null)throw new Error(`Key is ${B} on item (keyField is '${o}')`);if(c=E.get(B),!n&&!A[O].size){c&&this.unuseView(c);continue}w=P[p];let k=S.get(w),x=!1;if(!c)b?k&&k.length?c=k.pop():c=this.addView(v,O,P,B,w):(M=_.get(w)||0,(!k||M>=k.length)&&(c=this.addView(v,O,P,B,w),this.unuseView(c,!0),k=S.get(w)),c=k[M],_.set(w,M+1)),E.delete(c.nr.key),c.nr.used=!0,c.nr.index=O,c.nr.key=B,c.nr.type=w,E.set(B,c),x=!0;else if(!c.nr.used&&(c.nr.used=!0,c.nr.index=O,x=!0,k)){const Q=k.indexOf(c);Q!==-1&&k.splice(Q,1)}c.item=P,x&&(O===f.length-1&&this.$emit("scroll-end"),O===0&&this.$emit("scroll-start")),n===null?(c.position=A[O-1].accumulator,c.offset=0):(c.position=Math.floor(O/i)*n,c.offset=O%i*r)}return this.$_startIndex=s,this.$_endIndex=a,this.emitUpdate&&this.$emit("update",s,a,m,d),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:b}},getListenerTarget(){let e=Rt(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let i;if(this.pageMode){const r=e.getBoundingClientRect(),u=n?r.height:r.width;let p=-(n?r.top:r.left),o=n?window.innerHeight:window.innerWidth;p<0&&(o+=p,p=0),p+o>u&&(o=u-p),i={start:p,end:p+o}}else n?i={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:i={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,et?{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(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,r;if(this.pageMode){const u=Rt(this.$el),p=u.tagName==="HTML"?0:u[t.scroll],o=u.getBoundingClientRect(),y=this.$el.getBoundingClientRect()[t.start]-o[t.start];n=u,i=t.scroll,r=e+p+y}else n=this.$el,i=t.scroll,r=e;n[i]=r},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((e,t)=>e.nr.index-t.nr.index)}}};const la={key:0,ref:"before",class:"vue-recycle-scroller__slot"},sa={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function oa(e,t,n,i,r,u){const p=ui("ResizeObserver"),o=ci("observe-visibility");return di((L(),V("div",{class:Ae(["vue-recycle-scroller",{ready:r.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...f)=>u.handleScroll&&u.handleScroll(...f))},[e.$slots.before?(L(),V("div",la,[Ce(e.$slots,"before")],512)):q("v-if",!0),(L(),J(xt(n.listTag),{ref:"wrapper",style:pi({[e.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:Ae(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:I(()=>[(L(!0),V(ee,null,ve(r.pool,f=>(L(),J(xt(n.itemTag),fi({key:f.nr.id,style:r.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${f.position}px) translate${e.direction==="vertical"?"X":"Y"}(${f.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&r.hoverKey===f.nr.key}]]},vi(n.skipHover?{}:{mouseenter:()=>{r.hoverKey=f.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:I(()=>[Ce(e.$slots,"default",{item:f.item,index:f.nr.index,active:f.nr.used})]),_:2},1040,["style","class"]))),128)),Ce(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(L(),V("div",sa,[Ce(e.$slots,"after")],512)):q("v-if",!0),h(p,{onNotify:u.handleResize},null,8,["onNotify"])],34)),[[o,u.handleVisibilityChange]])}mn.render=oa;mn.__file="src/components/RecycleScroller.vue";const tt=le({__name:"ContextMenu",props:{file:{},idx:{},selectedTag:{},disableDelete:{type:Boolean}},emits:["contextMenuClick"],setup(e,{emit:t}){const n=e,i=Fe(),r=H(()=>{var u;return(((u=i.conf)==null?void 0:u.all_custom_tags)??[]).reduce((p,o)=>[...p,{...o,selected:!!n.selectedTag.find(f=>f.id===o.id)}],[])});return(u,p)=>{const o=Xt,f=hi,y=Zt,A=en;return L(),J(A,{onClick:p[0]||(p[0]=E=>t("contextMenuClick",E,u.file,u.idx))},{default:I(()=>{var E;return[h(o,{key:"deleteFiles",disabled:u.disableDelete},{default:I(()=>[N(T(u.$t("deleteSelected")),1)]),_:1},8,["disabled"]),u.file.type==="dir"?(L(),V(ee,{key:0},[h(o,{key:"openInNewTab"},{default:I(()=>[N(T(u.$t("openInNewTab")),1)]),_:1}),h(o,{key:"openOnTheRight"},{default:I(()=>[N(T(u.$t("openOnTheRight")),1)]),_:1}),h(o,{key:"openWithWalkMode"},{default:I(()=>[N(T(u.$t("openWithWalkMode")),1)]),_:1})],64)):q("",!0),u.file.type==="file"?(L(),V(ee,{key:1},[z(K)(u.file.name)?(L(),V(ee,{key:0},[h(o,{key:"viewGenInfo"},{default:I(()=>[N(T(u.$t("viewGenerationInfo")),1)]),_:1}),h(f),((E=z(i).conf)==null?void 0:E.launch_mode)!=="server"?(L(),V(ee,{key:0},[h(o,{key:"send2txt2img"},{default:I(()=>[N(T(u.$t("sendToTxt2img")),1)]),_:1}),h(o,{key:"send2img2img"},{default:I(()=>[N(T(u.$t("sendToImg2img")),1)]),_:1}),h(o,{key:"send2inpaint"},{default:I(()=>[N(T(u.$t("sendToInpaint")),1)]),_:1}),h(o,{key:"send2extras"},{default:I(()=>[N(T(u.$t("sendToExtraFeatures")),1)]),_:1}),h(y,{key:"sendToThirdPartyExtension",title:u.$t("sendToThirdPartyExtension")},{default:I(()=>[h(o,{key:"send2controlnet-txt2img"},{default:I(()=>[N("ControlNet - "+T(u.$t("t2i")),1)]),_:1}),h(o,{key:"send2controlnet-img2img"},{default:I(()=>[N("ControlNet - "+T(u.$t("i2i")),1)]),_:1}),h(o,{key:"send2outpaint"},{default:I(()=>[N("Outpaint")]),_:1})]),_:1},8,["title"])],64)):q("",!0),h(o,{key:"send2savedDir"},{default:I(()=>[N(T(u.$t("send2savedDir")),1)]),_:1}),h(f),h(y,{key:"toggle-tag",title:u.$t("toggleTag")},{default:I(()=>[(L(!0),V(ee,null,ve(r.value,S=>(L(),J(o,{key:`toggle-tag-${S.id}`},{default:I(()=>[N(T(S.name)+" ",1),S.selected?(L(),J(z(ln),{key:0})):(L(),J(z(on),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"]),h(o,{key:"openWithLocalFileBrowser"},{default:I(()=>[N(T(u.$t("openWithLocalFileBrowser")),1)]),_:1})],64)):q("",!0),h(o,{key:"previewInNewWindow"},{default:I(()=>[N(T(u.$t("previewInNewWindow")),1)]),_:1}),h(o,{key:"download"},{default:I(()=>[N(T(u.$t("download")),1)]),_:1}),h(o,{key:"copyPreviewUrl"},{default:I(()=>[N(T(u.$t("copySourceFilePreviewLink")),1)]),_:1})],64)):q("",!0)]}),_:1})}}}),ua=["data-idx"],ca={class:"more"},da={key:0,class:"tags-container"},fa={key:1,class:"preview-icon-wrap"},va={key:2,class:"profile"},pa={class:"name line-clamp-1"},ha={class:"basic-info"},ga=le({__name:"FileItem",props:{file:{},idx:{},selected:{type:Boolean,default:!1},showMenuIdx:{},cellWidth:{},fullScreenPreviewImageUrl:{}},emits:["update:showMenuIdx","fileItemClick","dragstart","dragend","previewVisibleChange","contextMenuClick"],setup(e,{emit:t}){const n=e;gi(o=>({"22f86fa4":o.$props.cellWidth+"px"}));const i=Fe(),r=yt(),u=H(()=>r.tagMap.get(n.file.fullpath)??[]),p=H(()=>{const o=i.gridThumbnailResolution;return i.enableThumbnail?mi(n.file,[o,o].join("x")):re(n.file)});return(o,f)=>{const y=oe,A=yi,E=an;return L(),J(y,{trigger:["contextmenu"],visible:z(i).longPressOpenContextMenu?typeof o.idx=="number"&&o.showMenuIdx===o.idx:void 0,"onUpdate:visible":f[5]||(f[5]=S=>typeof o.idx=="number"&&t("update:showMenuIdx",S?o.idx:-1))},{overlay:I(()=>[h(tt,{file:o.file,idx:o.idx,"selected-tag":u.value,onContextMenuClick:f[4]||(f[4]=(S,v,l)=>t("contextMenuClick",S,v,l))},null,8,["file","idx","selected-tag"])]),default:I(()=>[(L(),V("li",{class:Ae(["file file-item-trigger grid",{clickable:o.file.type==="dir",selected:o.selected}]),"data-idx":o.idx,key:o.file.name,draggable:"true",onDragstart:f[1]||(f[1]=S=>t("dragstart",S,o.idx)),onDragend:f[2]||(f[2]=S=>t("dragend",S,o.idx)),onClickCapture:f[3]||(f[3]=S=>t("fileItemClick",S,o.file,o.idx))},[G("div",null,[h(y,null,{overlay:I(()=>[h(tt,{file:o.file,idx:o.idx,"selected-tag":u.value,onContextMenuClick:f[0]||(f[0]=(S,v,l)=>t("contextMenuClick",S,v,l))},null,8,["file","idx","selected-tag"])]),default:I(()=>[G("div",ca,[h(z(it))])]),_:1}),z(K)(o.file.name)?(L(),V("div",{style:{position:"relative"},key:o.file.fullpath,class:Ae(`idx-${o.idx}`)},[h(A,{src:p.value,fallback:z(er),preview:{src:o.fullScreenPreviewImageUrl,onVisibleChange:(S,v)=>t("previewVisibleChange",S,v)}},null,8,["src","fallback","preview"]),u.value&&o.cellWidth>128?(L(),V("div",da,[(L(!0),V(ee,null,ve(u.value,S=>(L(),J(E,{key:S.id,color:z(r).getColor(S.name)},{default:I(()=>[N(T(S.name),1)]),_:2},1032,["color"]))),128))])):q("",!0)],2)):(L(),V("div",fa,[o.file.type==="file"?(L(),J(z(Ui),{key:0,class:"icon center"})):(L(),J(z(Ji),{key:1,class:"icon center"}))])),o.cellWidth>128?(L(),V("div",va,[G("div",pa,T(o.file.name),1),G("div",ha,[G("div",null,T(o.file.size),1),G("div",null,T(o.file.date),1)])])):q("",!0)])],42,ua))]),_:1},8,["visible"])}}});const Ua=tn(ga,[["__scopeId","data-v-fb2cd509"]]);function ma(e,t,n,i){const r={x:0,y:0};let u=0,p=0,o=typeof(i==null?void 0:i.width)=="number"?i.width:0,f=typeof(i==null?void 0:i.height)=="number"?i.height:0,y=typeof(i==null?void 0:i.left)=="number"?i.left:0,A=typeof(i==null?void 0:i.top)=="number"?i.top:0,E=!1;const S=d=>{d.stopPropagation(),d.preventDefault(),!(!e.value||!t.value)&&(u=d instanceof MouseEvent?d.clientX:d.touches[0].clientX,p=d instanceof MouseEvent?d.clientY:d.touches[0].clientY,o=e.value.offsetWidth,f=e.value.offsetHeight,r.x=t.value.offsetLeft,r.y=t.value.offsetTop,document.documentElement.addEventListener("mousemove",v),document.documentElement.addEventListener("touchmove",v),document.documentElement.addEventListener("mouseup",l),document.documentElement.addEventListener("touchend",l))},v=d=>{if(!e.value||!t.value)return;let c=o+((d instanceof MouseEvent?d.clientX:d.touches[0].clientX)-u),b=f+((d instanceof MouseEvent?d.clientY:d.touches[0].clientY)-p),_=r.x+((d instanceof MouseEvent?d.clientX:d.touches[0].clientX)-u),P=r.y+((d instanceof MouseEvent?d.clientY:d.touches[0].clientY)-p);_+t.value.offsetWidth>window.innerWidth&&(_=window.innerWidth-t.value.offsetWidth),e.value.offsetLeft+c>window.innerWidth&&(c=window.innerWidth-e.value.offsetLeft),P+t.value.offsetHeight>window.innerHeight&&(P=window.innerHeight-t.value.offsetHeight),e.value.offsetTop+b>window.innerHeight&&(b=window.innerHeight-e.value.offsetTop),e.value.style.width=`${c}px`,e.value.style.height=`${b}px`,t.value.style.left=`${_}px`,t.value.style.top=`${P}px`,i!=null&&i.onResize&&i.onResize(c,b)},l=()=>{document.documentElement.removeEventListener("mousemove",v),document.documentElement.removeEventListener("touchmove",v),document.documentElement.removeEventListener("mouseup",l),document.documentElement.removeEventListener("touchend",l)},s=d=>{d.stopPropagation(),d.preventDefault(),!(!e.value||!n.value)&&(E=!0,y=e.value.offsetLeft,A=e.value.offsetTop,u=d instanceof MouseEvent?d.clientX:d.touches[0].clientX,p=d instanceof MouseEvent?d.clientY:d.touches[0].clientY,document.documentElement.addEventListener("mousemove",a),document.documentElement.addEventListener("touchmove",a),document.documentElement.addEventListener("mouseup",g),document.documentElement.addEventListener("touchend",g))},a=d=>{if(!e.value||!n.value||!E)return;const c=y+((d instanceof MouseEvent?d.clientX:d.touches[0].clientX)-u),b=A+((d instanceof MouseEvent?d.clientY:d.touches[0].clientY)-p);c<0?e.value.style.left="0px":c+e.value.offsetWidth>window.innerWidth?e.value.style.left=`${window.innerWidth-e.value.offsetWidth}px`:e.value.style.left=`${c}px`,b<0?e.value.style.top="0px":b+e.value.offsetHeight>window.innerHeight?e.value.style.top=`${window.innerHeight-e.value.offsetHeight}px`:e.value.style.top=`${b}px`,i!=null&&i.onDrag&&i.onDrag(c,b)},g=()=>{E=!1,document.documentElement.removeEventListener("mousemove",a),document.documentElement.removeEventListener("touchmove",a),document.documentElement.removeEventListener("mouseup",g),document.documentElement.removeEventListener("touchend",g)},m=()=>{if(!e.value||!t.value)return;let d=e.value.offsetLeft,c=e.value.offsetTop,b=e.value.offsetWidth,_=e.value.offsetHeight;d+b>window.innerWidth&&(d=window.innerWidth-b,d<0&&(d=0,b=window.innerWidth)),c+_>window.innerHeight&&(c=window.innerHeight-_,c<0&&(c=0,_=window.innerHeight)),e.value.style.left=`${d}px`,e.value.style.top=`${c}px`,e.value.style.width=`${b}px`,e.value.style.height=`${_}px`};return Kt(()=>{!e.value||!i||(typeof i.width=="number"&&(e.value.style.width=`${i.width}px`),typeof i.height=="number"&&(e.value.style.height=`${i.height}px`),typeof i.left=="number"&&(e.value.style.left=`${i.left}px`),typeof i.top=="number"&&(e.value.style.top=`${i.top}px`),m(),window.addEventListener("resize",m))}),at(()=>{document.documentElement.removeEventListener("mousemove",v),document.documentElement.removeEventListener("touchmove",v),document.documentElement.removeEventListener("mouseup",l),document.documentElement.removeEventListener("touchend",l),document.documentElement.removeEventListener("mousemove",a),document.documentElement.removeEventListener("touchmove",a),document.documentElement.removeEventListener("mouseup",g),document.documentElement.removeEventListener("touchend",g),window.removeEventListener("resize",m)}),ge(()=>[e.value,t.value,n.value],([d,c,b])=>{d&&c&&(c.addEventListener("mousedown",S),c.addEventListener("touchstart",S)),d&&b&&(b.addEventListener("mousedown",s),b.addEventListener("touchstart",s))}),{handleResizeMouseDown:S,handleDragMouseDown:s}}const ya={class:"container"},ba={class:"action-bar"},wa={key:0,class:"icon",style:{cursor:"pointer"}},Sa={key:0,"flex-placeholder":""},Aa={key:1,class:"action-bar"},Ea={key:0,class:"gen-info"},ka={class:"tags"},Ca={class:"name"},_a={class:"value"},Oa={key:0,class:"tags-container"},Ia=le({__name:"fullScreenContextMenu",props:{file:{},idx:{}},emits:["contextMenuClick"],setup(e,{emit:t}){const n=e,i=Fe(),r=yt(),u=U(),p=H(()=>r.tagMap.get(n.file.fullpath)??[]),o=H(()=>{var a;return(((a=i.conf)==null?void 0:a.all_custom_tags)??[]).reduce((g,m)=>[...g,{...m,selected:!!p.value.find(d=>d.id===m.id)}],[])}),f=U(""),y=Be(),A=U("");ge(()=>{var a;return(a=n==null?void 0:n.file)==null?void 0:a.fullpath},async a=>{a&&(y.tasks.forEach(g=>g.cancel()),y.pushAction(()=>Ye(a)).res.then(g=>{A.value=g}))},{immediate:!0});const E=U(),S=U(),v=bi("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});ma(u,E,S,{...v.value,onDrag:ue(function(a,g){v.value={...v.value,left:a,top:g}},300),onResize:ue(function(a,g){v.value={...v.value,width:a,height:g}},300)});function l(a){return a.parentNode}me("load",a=>{const g=a.target;g.className==="ant-image-preview-img"&&(f.value=`${g.naturalWidth} x ${g.naturalHeight}`)},{capture:!0});const s=H(()=>{const a=[{name:j("fileName"),val:n.file.name},{name:j("fileSize"),val:n.file.size}];return f.value&&a.push({name:j("resolution"),val:f.value}),a});return(a,g)=>{const m=oe,d=se,c=Xt,b=en,_=Zt,P=an;return L(),V("div",{ref_key:"el",ref:u,class:Ae(["full-screen-menu",{"unset-size":!z(v).expanded}]),onWheelCapture:g[5]||(g[5]=wi(()=>{},["stop"]))},[G("div",ya,[G("div",ba,[G("div",{ref_key:"dragHandle",ref:S,class:"icon",style:{cursor:"grab"}},[h(z(vr))],512),G("div",{class:"icon",style:{cursor:"pointer"},onClick:g[0]||(g[0]=w=>z(v).expanded=!z(v).expanded)},[z(v).expanded?(L(),J(z(mr),{key:0})):(L(),J(z(Sr),{key:1}))]),h(m,{"get-popup-container":l},{overlay:I(()=>[h(tt,{file:a.file,idx:a.idx,"selected-tag":p.value,"disable-delete":z(re)(a.file)===z(i).fullscreenPreviewInitialUrl,onContextMenuClick:g[1]||(g[1]=(w,M,O)=>t("contextMenuClick",w,M,O))},null,8,["file","idx","selected-tag","disable-delete"])]),default:I(()=>[z(v).expanded?q("",!0):(L(),V("div",wa,[h(z(it))]))]),_:1}),z(v).expanded?(L(),V("div",Sa)):q("",!0),z(v).expanded?(L(),V("div",Aa,[h(m,{trigger:["hover"],"get-popup-container":l},{overlay:I(()=>[h(b,{onClick:g[2]||(g[2]=w=>t("contextMenuClick",w,a.file,a.idx))},{default:I(()=>[(L(!0),V(ee,null,ve(o.value,w=>(L(),J(c,{key:`toggle-tag-${w.id}`},{default:I(()=>[N(T(w.name)+" ",1),w.selected?(L(),J(z(ln),{key:0})):(L(),J(z(on),{key:1}))]),_:2},1024))),128))]),_:1})]),default:I(()=>[h(d,null,{default:I(()=>[N(T(a.$t("toggleTag")),1)]),_:1})]),_:1}),h(m,{trigger:["hover"],"get-popup-container":l},{overlay:I(()=>[h(b,{onClick:g[3]||(g[3]=w=>t("contextMenuClick",w,a.file,a.idx))},{default:I(()=>{var w;return[((w=z(i).conf)==null?void 0:w.launch_mode)!=="server"?(L(),V(ee,{key:0},[h(c,{key:"send2txt2img"},{default:I(()=>[N(T(a.$t("sendToTxt2img")),1)]),_:1}),h(c,{key:"send2img2img"},{default:I(()=>[N(T(a.$t("sendToImg2img")),1)]),_:1}),h(c,{key:"send2inpaint"},{default:I(()=>[N(T(a.$t("sendToInpaint")),1)]),_:1}),h(c,{key:"send2extras"},{default:I(()=>[N(T(a.$t("sendToExtraFeatures")),1)]),_:1}),h(_,{key:"sendToThirdPartyExtension",title:a.$t("sendToThirdPartyExtension")},{default:I(()=>[h(c,{key:"send2controlnet-txt2img"},{default:I(()=>[N("ControlNet - "+T(a.$t("t2i")),1)]),_:1}),h(c,{key:"send2controlnet-img2img"},{default:I(()=>[N("ControlNet - "+T(a.$t("i2i")),1)]),_:1}),h(c,{key:"send2outpaint"},{default:I(()=>[N("Outpaint")]),_:1})]),_:1},8,["title"])],64)):q("",!0),h(c,{key:"send2savedDir"},{default:I(()=>[N(T(a.$t("send2savedDir")),1)]),_:1}),h(c,{key:"deleteFiles",disabled:z(re)(a.file)===z(i).fullscreenPreviewInitialUrl},{default:I(()=>[N(T(a.$t("deleteSelected")),1)]),_:1},8,["disabled"]),h(c,{key:"previewInNewWindow"},{default:I(()=>[N(T(a.$t("previewInNewWindow")),1)]),_:1}),h(c,{key:"download"},{default:I(()=>[N(T(a.$t("download")),1)]),_:1}),h(c,{key:"copyPreviewUrl"},{default:I(()=>[N(T(a.$t("copySourceFilePreviewLink")),1)]),_:1})]}),_:1})]),default:I(()=>[h(d,null,{default:I(()=>[N(T(z(j)("openContextMenu")),1)]),_:1})]),_:1}),h(d,{onClick:g[4]||(g[4]=w=>z(Me)(A.value))},{default:I(()=>[N(T(a.$t("copyPrompt")),1)]),_:1})])):q("",!0)]),z(v).expanded?(L(),V("div",Ea,[G("div",ka,[(L(!0),V(ee,null,ve(s.value,w=>(L(),V("span",{class:"tag",key:w.name},[G("span",Ca,T(w.name),1),G("span",_a,T(w.val),1)]))),128))]),p.value?(L(),V("div",Oa,[(L(!0),V(ee,null,ve(p.value,w=>(L(),J(P,{key:w.id,color:z(r).getColor(w.name)},{default:I(()=>[N(T(w.name),1)]),_:2},1032,["color"]))),128))])):q("",!0),N(" "+T(A.value),1)])):q("",!0)]),z(v).expanded?(L(),V("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:E},[h(z(ar))],512)):q("",!0)],34)}}});const Ha=tn(Ia,[["__scopeId","data-v-914c5f17"]]);export{oe as D,Na as L,za as R,Ta as S,Fa as a,Da as b,Qa as c,ja as d,Ba as e,Va as f,He as g,mn as h,Ua as i,Ha as j,yt as k,Ke as l,Ma as s,ae as u};