5 lines
79 KiB
JavaScript
5 lines
79 KiB
JavaScript
import{P as he,bU as bn,a as ne,d as le,bq as tt,u as Ne,c as h,bV as nt,_ 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 it,aC as ue,b$ as Mn,c0 as We,e as kt,bz as Tn,ag as ie,c1 as Nn,aR as zn,c2 as Bn,c3 as Fn,aM as rt,am as Re,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,cb as Ct,k as Be,ah as Wn,cc as qt,ar as te,cd as at,l as me,aw as Kt,ap as De,ce as Rn,cf as _t,an as Gt,bQ as Ot,bP as Jn,cg as Ie,ch as Yn,aD as qn,bO as lt,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 Je,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 mi,cE as gi,p as G,cF as yi,X as tn,cG as bi,q as wi}from"./index-23e5bc7c.js";import{t as Qe,l as pe,g as Si}from"./shortcut-98354a10.js";import{f as Ai,h as Ei,a as ki,t as Ci}from"./db-52d8ead8.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}}},je=bn(),_i=function(){return ne(ne({},nn()),{},{type:je.type,size:String,htmlType:je.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:he.any,title:String,loading:je.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:tt(_i(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(t,n){var i=n.slots,r=n.attrs,o=n.emit,f=function(S){o("update:visible",S),o("visibleChange",S)},u=Ne("dropdown-button",t),p=u.prefixCls,w=u.direction,A=u.getPopupContainer;return function(){var E,S,v=ne(ne({},t),r),l=v.type,s=l===void 0?"default":l,a=v.disabled,m=v.loading,g=v.htmlType,d=v.class,c=d===void 0?"":d,y=v.overlay,_=y===void 0?(E=i.overlay)===null||E===void 0?void 0:E.call(i):y,P=v.trigger,b=v.align,M=v.visible;v.onVisibleChange;var O=v.placement,B=O===void 0?w.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(nt,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:b,disabled:a,trigger:a?[]:P,placement:B,getPopupContainer:A.value,onVisibleChange:f,mouseEnterDelay:$,mouseLeaveDelay:F,visible:M,overlayClassName:X,overlayStyle:W,destroyPopupOnHide:Z},bt=h(se,{type:s,disabled:a,loading:m,onClick:Y,htmlType:g,href:k,title:x},{default:i.default}),wt=h(se,{type:s,icon:C},null);return h(Ii,ne(ne({},ce),{},{class:Se(p.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:tt(nn(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(t,n){var i=n.slots,r=n.attrs,o=n.emit,f=Ne("dropdown",t),u=f.prefixCls,p=f.rootPrefixCls,w=f.direction,A=f.getPopupContainer,E=H(function(){var s=t.placement,a=s===void 0?"":s,m=t.transitionName;return m!==void 0?m:a.indexOf("top")>=0?"".concat(p.value,"-slide-down"):"".concat(p.value,"-slide-up")}),S=function(){var a,m,g,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 y=c.props||{};St(!y.mode||y.mode==="vertical","Dropdown",'mode="'.concat(y.mode,`" is not supported for Dropdown's Menu.`));var _=y.selectable,P=_===void 0?!1:_,b=y.expandIcon,M=b===void 0?(m=c.children)===null||m===void 0||(g=m.expandIcon)===null||g===void 0?void 0:g.call(m):b,O=typeof M<"u"&&Et(M)?M:h("span",{class:"".concat(u.value,"-menu-submenu-arrow")},[h(Cn,{class:"".concat(u.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 w.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){o("update:visible",a),o("visibleChange",a)};return function(){var s,a,m=t.arrow,g=t.trigger,d=t.disabled,c=t.overlayClassName,y=(s=i.default)===null||s===void 0?void 0:s.call(i)[0],_=At(y,wn({class:Se(y==null||(a=y.props)===null||a===void 0?void 0:a.class,R({},"".concat(u.value,"-rtl"),w.value==="rtl"),"".concat(u.value,"-trigger"))},d?{disabled:d}:{})),P=Se(c,R({},"".concat(u.value,"-rtl"),w.value==="rtl")),b=d?[]:g,M;b&&b.indexOf("contextmenu")!==-1&&(M=!0);var O=Sn({arrowPointAtCenter:An(m)==="object"&&m.pointAtCenter,autoAdjustOverflow:!0}),B=En(ne(ne(ne({},t),r),{},{builtinPlacements:O,overlayClassName:P,arrow:m,alignPoint:M,prefixCls:u.value,getPopupContainer:A.value,transitionName:E.value,trigger:b,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,o=Ne("tag",t),f=o.prefixCls,u=function(A){var E=t.checked;r("update:checked",!E),r("change",!E),r("click",A)},p=H(function(){var w;return Se(f.value,(w={},R(w,"".concat(f.value,"-checkable"),!0),R(w,"".concat(f.value,"-checkable-checked"),t.checked),w))});return function(){var w;return h("span",{class:p.value,onClick:u},[(w=i.default)===null||w===void 0?void 0:w.call(i)])}}});const Ye=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,o=n.attrs,f=Ne("tag",t),u=f.prefixCls,p=f.direction,w=U(!0);In(function(){t.visible!==void 0&&(w.value=t.visible)});var A=function(l){l.stopPropagation(),r("update:visible",!1),r("close",l),!l.defaultPrevented&&t.visible===void 0&&(w.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(u.value,(v={},R(v,"".concat(u.value,"-").concat(t.color),E.value),R(v,"".concat(u.value,"-has-color"),t.color&&!E.value),R(v,"".concat(u.value,"-hidden"),!w.value),R(v,"".concat(u.value,"-rtl"),p.value==="rtl"),v))});return function(){var v,l,s,a=t.icon,m=a===void 0?(v=i.icon)===null||v===void 0?void 0:v.call(i):a,g=t.color,d=t.closeIcon,c=d===void 0?(l=i.closeIcon)===null||l===void 0?void 0:l.call(i):d,y=t.closable,_=y===void 0?!1:y,P=function(){return _?c?h("span",{class:"".concat(u.value,"-close-icon"),onClick:A},[c]):h(xn,{class:"".concat(u.value,"-close-icon"),onClick:A},null):null},b={backgroundColor:g&&!E.value?g:void 0},M=m||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 o,x=h("span",{class:S.value,style:b},[B,P()]);return k?h(Pn,null,{default:function(){return[x]}}):x}}});we.CheckableTag=Ye;we.install=function(e){return e.component(we.name,we),e.component(Ye.name,Ye),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:tt(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;it(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),We(i)?kt(i,{class:n}):Pe&&We(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,o=r.size,f=r.prefixCls,u=r.tip,p=u===void 0?(t=(n=this.$slots).tip)===null||t===void 0?void 0:t.call(n):u,w=r.wrapperClassName,A=this.$attrs,E=A.class,S=A.style,v=Jt(A,Ti),l=this.configProvider,s=l.getPrefixCls,a=l.direction,m=s("spin",f),g=this.sSpinning,d=(i={},R(i,m,!0),R(i,"".concat(m,"-sm"),o==="small"),R(i,"".concat(m,"-lg"),o==="large"),R(i,"".concat(m,"-spinning"),g),R(i,"".concat(m,"-show-text"),!!p),R(i,"".concat(m,"-rtl"),a==="rtl"),R(i,E,!!E),i),c=h("div",ne(ne({},v),{},{style:S,class:d}),[this.renderIndicator(m),p?h("div",{class:"".concat(m,"-text")},[p]):null]),y=Tn(this);if(y&&y.length){var _,P=(_={},R(_,"".concat(m,"-container"),!0),R(_,"".concat(m,"-blur"),g),_);return h("div",{class:["".concat(m,"-nested-loading"),w]},[g&&h("div",{key:"loading"},[c]),h("div",{class:P,key:"container"},[y])])}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,o=Ki(qi((t-e)/(n||1)),0),f=Array(o);o--;)f[i?o:++r]=e,e+=n;return f}function Xi(e){return function(t,n,i){return i&&typeof i!="number"&&Yi(t,n,i)&&(n=i=void 0),t=Qe(t),n===void 0?(n=t,t=0):n=Qe(n),i=i===void 0?t<n?1:-1:Qe(i),Gi(t,n,i,e)}}var Zi=Xi();const sn=Zi,ge=(...e)=>{document.addEventListener(...e),rt(()=>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();Re(r),_e.has(r)||(_e.set(r,Yt(e(r,i??(t==null?void 0:t())))),rt(()=>{_e.delete(r)}));const o=_e.get(r);return Re(o),{state:o,toRefs(){return Dn(o)}}}}}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){mr(e,r,n[r])})}return e}function mr(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 gr=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 mt=function(t,n){var i=Qt({},t,n.attrs);return h(ie,Qt({},i,{icon:_r}),null)};mt.displayName="RightCircleOutlined";mt.inheritAttrs=!1;const za=mt;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 gt=function(t,n){var i=jt({},t,n.attrs);return h(ie,jt({},i,{icon:Pr}),null)};gt.displayName="StarOutlined";gt.inheritAttrs=!1;const on=gt;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),m=a.querySelector(i.barSelector),g=i.speed,d=i.easing;return a.offsetWidth,u(function(c){i.positionUsing===""&&(i.positionUsing=n.getPositioningCSS()),p(m,f(l,g,d)),l===1?(p(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout(function(){p(a,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){n.remove(),c()},g)},g)):setTimeout(c,g)}),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),m=l?"-100":o(n.status||0),g=n.getParent(),d;return p(a,{transition:"all 0 linear",transform:"translate3d("+m+"%,0,0)"}),i.showSpinner||(d=s.querySelector(i.spinnerSelector),d&&v(d)),g!=document.body&&A(g,"nprogress-custom-parent"),g.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 o(l){return(-1+l)*100}function f(l,s,a){var m;return i.positionUsing==="translate3d"?m={transform:"translate3d("+o(l)+"%,0,0)"}:i.positionUsing==="translate"?m={transform:"translate("+o(l)+"%,0)"}:m={"margin-left":o(l)+"%"},m.transition="all "+s+"ms "+a,m}var u=function(){var l=[];function s(){var a=l.shift();a&&a(s)}return function(a){l.push(a),l.length==1&&s()}}(),p=function(){var l=["Webkit","O","Moz","ms"],s={};function a(c){return c.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(y,_){return _.toUpperCase()})}function m(c){var y=document.body.style;if(c in y)return c;for(var _=l.length,P=c.charAt(0).toUpperCase()+c.slice(1),b;_--;)if(b=l[_]+P,b in y)return b;return c}function g(c){return c=a(c),s[c]||(s[c]=m(c))}function d(c,y,_){y=g(y),c.style[y]=_}return function(c,y){var _=arguments,P,b;if(_.length==2)for(P in y)b=y[P],b!==void 0&&y.hasOwnProperty(P)&&d(c,P,b);else d(c,_[1],_[2])}}();function w(l,s){var a=typeof l=="string"?l:S(l);return a.indexOf(" "+s+" ")>=0}function A(l,s){var a=S(l),m=a+s;w(a,s)||(l.className=m.substring(1))}function E(l,s){var a=S(l),m;w(l,s)&&(m=a.replace(" "+s+" "," "),l.className=m.substring(1,m.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","geekblue","volcano"],yt=Hn("useTagStore",()=>{const e=Yt(new Map),t=async o=>{if(o=o.filter(f=>!e.has(f)),!!o.length)try{o.forEach(u=>e.set(u,[]));const f=await Ai(o);for(const u in f)e.set(u,f[u])}catch{o.forEach(f=>e.delete(f))}},n=new Map;return{tagMap:e,getColor:o=>{let f=n.get(o);if(!f){const u=Ct.hash.sha256.hash(o),p=parseInt(Ct.codec.hex.fromBits(u),16)%Vt.length;f=Vt[p],n.set(o,f)}return f},fetchImageTags:t,refreshTags:async o=>{o.forEach(f=>e.delete(f)),await t(o)}}});function Ve(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!We(e)}const Ue=new Map,D=Be(),fn=yt(),Ut=Wn(),Oe=new BroadcastChannel("iib-image-transfer-bus"),{eventEmitter:xe,useEventListen:qe}=qt(),{useHookShareState:ae}=tr((e,{images:t})=>{const n=U({tabIdx:-1,paneIdx:-1}),i=H(()=>pe(r.value)),r=U([]),o=H(()=>{var s;return r.value.map(a=>a.curr).slice((s=D.conf)!=null&&s.is_win?1:0)}),f=H(()=>ze(...o.value)),u=U(D.defaultSortingMethod),p=H(()=>{var d;if(t.value)return t.value;if(!i.value)return[];const s=((d=i.value)==null?void 0:d.files)??[],a=u.value,{walkFiles:m}=i.value,g=c=>D.onlyFoldersAndImages?c.filter(y=>y.type==="dir"||K(y.name)):c;return n.value.walkModePath?m?m.map(c=>be(g(c),a)).flat():be(g(s),a):be(g(s),a)}),w=U([]),A=U(-1),E=U(!0),S=U(!1),v=U(!1),l=()=>{var s,a,m;return(m=(a=(s=D.tabList)==null?void 0:s[n.value.tabIdx])==null?void 0:a.panes)==null?void 0:m[n.value.paneIdx]};return{previewing:v,spinning:S,canLoadNext:E,multiSelectedIdxs:w,previewIdx:A,basePath:o,currLocation:f,currPage:i,stack:r,sortMethod:u,sortedFiles:p,scroller:U(),stackViewEl:U(),props:n,getPane:l,...qt()}},()=>({images:U()}));function Ba(e){const{previewIdx:t,eventEmitter:n,canLoadNext:i,previewing:r,sortedFiles:o,scroller:f}=ae().toRefs(),{state:u}=ae();let p=null;const w=(v,l)=>{var s;r.value=v,p!=null&&!v&&l&&((s=f.value)==null||s.scrollToItem(p),p=null)},A=()=>{e.walkModePath&&!S("next")&&i&&(te.info(j("loadingNextFolder")),n.value.emit("loadNextDir",!0))};ge("keydown",v=>{var l;if(r.value){let s=t.value;if(["ArrowDown","ArrowRight"].includes(v.key))for(s++;o.value[s]&&!K(o.value[s].name);)s++;else if(["ArrowUp","ArrowLeft"].includes(v.key))for(s--;o.value[s]&&!K(o.value[s].name);)s--;if(K((l=o.value[s])==null?void 0:l.name)??""){t.value=s;const a=f.value;a&&!(s>=a.$_startIndex&&s<=a.$_endIndex)&&(p=s)}A()}});const E=v=>{var s;let l=t.value;if(v==="next")for(l++;o.value[l]&&!K(o.value[l].name);)l++;else if(v==="prev")for(l--;o.value[l]&&!K(o.value[l].name);)l--;if(K((s=o.value[l])==null?void 0:s.name)??""){t.value=l;const a=f.value;a&&!(l>=a.$_startIndex&&l<=a.$_endIndex)&&(p=l)}A()},S=v=>{var s;let l=t.value;if(v==="next")for(l++;o.value[l]&&!K(o.value[l].name);)l++;else if(v==="prev")for(l--;o.value[l]&&!K(o.value[l].name);)l--;return K((s=o.value[l])==null?void 0:s.name)??""};return qe("removeFiles",async()=>{var v;r.value&&!u.sortedFiles[t.value]&&(te.info(j("manualExitFullScreen"),5),await at(500),(v=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||v.click(),t.value=-1)}),{previewIdx:t,onPreviewVisibleChange:w,previewing:r,previewImgMove:E,canPreview:S}}function Fa(e){const t=U(),{scroller:n,stackViewEl:i,stack:r,currPage:o,currLocation:f,sortMethod:u,useEventListen:p,eventEmitter:w,getPane:A,multiSelectedIdxs:E,sortedFiles:S}=ae().toRefs();me(()=>r.value.length,ue((C,$)=>{var F;C!==$&&((F=n.value)==null||F.scrollToItem(0))},300));const v=async C=>{if(await g(C),e.walkModePath){await at();const[$]=be(o.value.files,u.value).filter(F=>F.type==="dir");$&&await g($.fullpath),await w.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&&g(D.conf.home)}),me(f,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=De("div",{style:"display:flex;align-items:center"},[De(ur),De("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(f.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()},m=(C,$)=>(Re(D.conf,"global.conf load failed"),D.conf.is_win?C.toLowerCase()==$.toLowerCase():C==$),g=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]&&m(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=o.value)==null?void 0:X.files.find(de=>m(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),o.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?"/":f.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?"/":f.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()}})),p.value("refresh",d);const c=C=>{e.walkModePath&&(A.value().walkModePath=C),v(C)},y=H(()=>D.quickMovePaths.map(C=>({...C,path:Ie(C.dir)}))),_=H(()=>{const C=Ie(f.value);return y.value.find(F=>F.path===C)}),P=async()=>{const C=_.value;if(C){if(!C.can_delete)return;await Ei(f.value),te.success(j("removeComplete"))}else await ki(f.value),te.success(j("addComplete"));It.emit("searchIndexExpired"),It.emit("updateGlobalSetting")},b=U(!1),M=U(f.value),O=()=>{b.value=!0,M.value=f.value},B=async()=>{await g(M.value),b.value=!1};ge("click",()=>{b.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",f.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 p.value("selectAll",x),{locInputValue:M,isLocationEditing:b,onLocEditEnter:B,onEditBtnClick:O,addToSearchScanPathAndQuickMove:P,searchPathInfo:_,refresh:d,copyLocation:l,back:a,openNext:s,currPage:o,currLocation:f,to:g,stack:r,scroller:n,share:k,selectAll:x,quickMoveTo:c,onCreateFloderBtnClick:async()=>{await zr(f.value),await d()}}}function Da(e){const{scroller:t,sortedFiles:n,stack:i,sortMethod:r,currLocation:o,currPage:f,stackViewEl:u,canLoadNext:p,previewIdx:w}=ae().toRefs(),{state:A}=ae(),E=U(!1),S=U(D.defaultGridCellWidth),v=H(()=>S.value+16),l=44,{width:s}=Yn(u),a=H(()=>~~(s.value/v.value)),m=H(()=>{const P=v.value;return{first:P+(S.value<=160?0:l),second:P}}),g=U(!1),d=async()=>{var P;if(!(g.value||!e.walkModePath||!p.value))try{g.value=!0;const b=i.value[i.value.length-2],M=be(b.files,r.value),O=M.findIndex(B=>{var k;return B.name===((k=f.value)==null?void 0:k.curr)});if(O!==-1){const B=M[O+1],k=ze(o.value,"../",B.name),x=await ye(k),Q=f.value;Q.curr=B.name,Q.walkFiles||(Q.walkFiles=[Q.files]),Q.walkFiles.push(x.files),console.log("curr page files length",(P=f.value)==null?void 0:P.files.length)}}catch(b){console.error("loadNextDir",b),p.value=!1}finally{g.value=!1}},c=async(P=!1)=>{const b=t.value,M=()=>P?w.value:(b==null?void 0:b.$_endIndex)??0;for(;!n.value.length||M()>n.value.length-20&&p.value;)await at(100),await d()};A.useEventListen("loadNextDir",c);const y=()=>{const P=t.value;if(P){const b=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(b)}};me(o,ue(y,150));const _=ue(()=>{c(),y()},300);return{gridItems:a,sortedFiles:n,sortMethodConv:qn,moreActionsDropdownShow:E,gridSize:v,sortMethod:r,onScroll:_,loadNextDir:d,loadNextDirLoading:g,canLoadNext:p,itemSize:m,cellWidth:S,onViewedImagesChange:y}}function Qa(){const{currLocation:e,sortedFiles:t,currPage:n,multiSelectedIdxs:i,eventEmitter:r}=ae().toRefs(),o=()=>{i.value=[]};return ge("click",o),ge("blur",o),me(n,o),{onFileDragStart:(w,A)=>{const E=Gt(t.value[A]);Ut.fileDragging=!0,console.log("onFileDragStart set drag file ",w,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"};w.dataTransfer.setData("text/plain",JSON.stringify(l))},onDrop:async w=>{const A=Xn(w);if(!A)return;const E=e.value;if(A.loc===E)return;const S=lt(),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,m;return h("div",null,[h("div",null,[`${j("moveSelectedFilesTo")} ${E}`,h("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[A.path.map(g=>h("li",null,[g.split(/[/\\]/).pop()]))])]),h(dn,null,null),h("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},class:"actions"},[h(se,{onClick:fe.destroyAll},Ve(s=j("cancel"))?s:{default:()=>[s]}),h(se,{type:"primary",loading:!S.isIdle,onClick:v},Ve(a=j("copy"))?a:{default:()=>[a]}),h(se,{type:"primary",loading:!S.isIdle,onClick:l},Ve(m=j("move"))?m:{default:()=>[m]})])])},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:o,multiSelectedIdxs:f,stack:u,currLocation:p,spinning:w,previewing:A,stackViewEl:E,eventEmitter:S}=ae().toRefs(),v=Ie;qe("removeFiles",({paths:g,loc:d})=>{if(v(d)!==v(p.value))return;const c=pe(u.value);c&&(c.files=c.files.filter(y=>!g.includes(y.fullpath)),c.walkFiles&&(c.walkFiles=c.walkFiles.map(y=>y.filter(_=>!g.includes(_.fullpath)))))}),qe("addFiles",({files:g,loc:d})=>{if(v(d)!==v(p.value))return;const c=pe(u.value);c&&c.files.unshift(...g)});const l=lt(),s=async(g,d,c)=>{o.value=c,D.fullscreenPreviewInitialUrl=re(d);const y=f.value.indexOf(c);if(g.shiftKey){if(y!==-1)f.value.splice(y,1);else{f.value.push(c),f.value.sort((b,M)=>b-M);const _=f.value[0],P=f.value[f.value.length-1];f.value=sn(_,P+1)}g.stopPropagation()}else g.ctrlKey||g.metaKey?(y!==-1?f.value.splice(y,1):f.value.push(c),g.stopPropagation()):await t(d)},a=async(g,d,c)=>{var M,O,B;const y=re(d),_=p.value,P=()=>{let k=[];return f.value.includes(c)?k=f.value.map(x=>r.value[x]):k.push(d),k},b=async k=>{if(!w.value)try{w.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{w.value=!1}};if(`${g.key}`.startsWith("toggle-tag-")){const k=+`${g.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(g.key){case"previewInNewWindow":return window.open(y);case"download":return window.open(re(d,!0));case"copyPreviewUrl":return Me(parent.document.location.origin+y);case"send2txt2img":return b("txt2img");case"send2img2img":return b("img2img");case"send2inpaint":return b("inpaint");case"send2extras":return b("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:p.value}),xe.emit("addFiles",{files:Q,loc:x});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const k=g.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(()=>Je(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":{Ue.set(_,u.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":{Ue.set(_,u.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":{Ue.set(_,u.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(()=>Je(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:p.value}),x()}})});break}}return{}},{isOutside:m}=Kn(E);return ge("keydown",g=>{var c,y,_;const d=Si(g);if(A.value){const P=(c=Object.entries(D.shortcut).find(b=>b[1]===d&&b[1]))==null?void 0:c[0];if(P){g.stopPropagation(),g.preventDefault();const b=o.value,M=r.value[b];switch(P){case"delete":return re(M)===D.fullscreenPreviewInitialUrl?te.warn(j("fullscreenRestriction")):a({key:"deleteFiles"},M,b);default:{const O=(y=/^toggle_tag_(.*)$/.exec(P))==null?void 0:y[1],B=(_=D.conf)==null?void 0:_.all_custom_tags.find(k=>k.name===O);return B?a({key:`toggle-tag-${B.id}`},M,b):void 0}}}}else!m.value&&["Ctrl + KeyA","Cmd + KeyA"].includes(d)&&(g.preventDefault(),g.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 o=(r=i.dataset)==null?void 0:r.idx;o&&Number.isSafeInteger(+o)&&(t.value=+o);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 Ke(){Ke.init||(Ke.init=!0,$e=Br()!==-1)}var Fe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ke(),it(()=>{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,o)=>(L(),J("div",Dr)));Fe.render=Qr;Fe.__scopeId="data-v-b329ee4c";Fe.__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 Ge(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 Ge(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 Ge(e,t)}}function Ge(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,o,f=function(p){for(var w=arguments.length,A=new Array(w>1?w-1:0),E=1;E<w;E++)A[E-1]=arguments[E];if(o=A,!(i&&p===r)){var S=n.leading;typeof S=="function"&&(S=S(p,r)),(!i||p!==r)&&S&&e.apply(void 0,[p].concat(Wt(o))),r=p,clearTimeout(i),i=setTimeout(function(){e.apply(void 0,[p].concat(Wt(o))),i=0},t)}};return f._clear=function(){clearTimeout(i),i=null},f}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(u,p){r.options.callback(u,p),u&&r.options.once&&(r.frozen=!0,r.destroyObserver())},this.callback&&this.options.throttle){var o=this.options.throttleOptions||{},f=o.leading;this.callback=Yr(this.callback,this.options.throttle,{leading:function(p){return f==="both"||f==="visible"&&p||f==="hidden"&&!p}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(u){var p=u[0];if(u.length>1){var w=u.find(function(E){return E.isIntersecting});w&&(p=w)}if(r.callback){var A=p.isIntersecting&&p.intersectionRatio>=r.threshold;if(A===r.oldResult)return;r.oldResult=A,r.callback(A,p)}},this.options.intersection),it(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 o=e._vue_visibilityState;if(!i){hn(e);return}o?o.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 mn(e,t){return e.parentNode===null?t:mn(e.parentNode,t.concat([e]))}var He=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},ea=function(t){return He(t,"overflow")+He(t,"overflow-y")+He(t,"overflow-x")},ta=function(t){return Zr.test(ea(t))};function Rt(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=mn(e.parentNode,[]),n=0;n<t.length;n+=1)if(ta(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function Xe(e){"@babel/helpers - typeof";return Xe=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},Xe(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&&Xe(this.items[0])!=="object"}var Ze=!1;if(typeof window<"u"){Ze=!1;try{var ra=Object.defineProperty({},"passive",{get:function(){Ze=!0}});window.addEventListener("test",null,ra)}catch{}}let aa=0;var gn={name:"RecycleScroller",components:{ResizeObserver:Fe},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,o=0,f;for(let u=0,p=t.length;u<p;u++)f=t[u][n]||i,f<r&&(r=f),o+=f,e[u]={accumulator:o,size:f};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 o=si({id:aa++,index:t,used:!0,key:i,type:r}),f=oi({item:n,position:0,nr:o});return e.push(f),f},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,o=this.$_computedMinItemSize,f=this.typeField,u=this.simpleArray?null:this.keyField,p=this.items,w=p.length,A=this.sizes,E=this.$_views,S=this.$_unusedViews,v=this.pool,l=this.itemIndexByKey;let s,a,m,g,d;if(!w)s=a=g=d=m=0;else if(this.$_prerender)s=g=0,a=d=Math.min(this.prerender,p.length),m=null;else{const O=this.getScroll();if(t){let x=O.start-this.$_lastUpdateScrollPosition;if(x<0&&(x=-x),n===null&&x<o||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=w-1,$=~~(w/2),F;do F=$,x=A[$].accumulator,x<O.start?Q=$:$<w-1&&A[$+1].accumulator>O.start&&(C=$),$=~~((Q+C)/2);while($!==F);for($<0&&($=0),s=$,m=A[w-1].accumulator,a=$;a<w&&A[a].accumulator<O.end;a++);for(a===-1?a=p.length-1:(a++,a>w&&(a=w)),g=s;g<w&&k+A[g].accumulator<O.start;g++);for(d=g;d<w&&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),g=Math.max(0,Math.floor((O.start-k)/n*i)),d=Math.floor((O.end-k)/n*i),s<0&&(s=0),a>w&&(a=w),g<0&&(g=0),d>w&&(d=w),m=Math.ceil(w/i)*n}}a-s>Xr.itemsLimit&&this.itemsLimitError(),this.totalSize=m;let c;const y=s<=this.$_endIndex&&a>=this.$_startIndex;if(y)for(let O=0,B=v.length;O<B;O++)c=v[O],c.nr.used&&(e&&(c.nr.index=l[c.item[u]]),(c.nr.index==null||c.nr.index<s||c.nr.index>=a)&&this.unuseView(c));const _=y?null:new Map;let P,b,M;for(let O=s;O<a;O++){P=p[O];const B=u?P[u]:P;if(B==null)throw new Error(`Key is ${B} on item (keyField is '${u}')`);if(c=E.get(B),!n&&!A[O].size){c&&this.unuseView(c);continue}b=P[f];let k=S.get(b),x=!1;if(!c)y?k&&k.length?c=k.pop():c=this.addView(v,O,P,B,b):(M=_.get(b)||0,(!k||M>=k.length)&&(c=this.addView(v,O,P,B,b),this.unuseView(c,!0),k=S.get(b)),c=k[M],_.set(b,M+1)),E.delete(c.nr.key),c.nr.used=!0,c.nr.index=O,c.nr.key=B,c.nr.type=b,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===p.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,g,d),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:y}},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(),o=n?r.height:r.width;let f=-(n?r.top:r.left),u=n?window.innerHeight:window.innerWidth;f<0&&(u+=f,f=0),f+u>o&&(u=o-f),i={start:f,end:f+u}}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,Ze?{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 o=Rt(this.$el),f=o.tagName==="HTML"?0:o[t.scroll],u=o.getBoundingClientRect(),w=this.$el.getBoundingClientRect()[t.start]-u[t.start];n=o,i=t.scroll,r=e+f+w}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,o){const f=ui("ResizeObserver"),u=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]=(...p)=>o.handleScroll&&o.handleScroll(...p))},[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,p=>(L(),J(xt(n.itemTag),fi({key:p.nr.id,style:r.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${p.position}px) translate${e.direction==="vertical"?"X":"Y"}(${p.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===p.nr.key}]]},vi(n.skipHover?{}:{mouseenter:()=>{r.hoverKey=p.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:I(()=>[Ce(e.$slots,"default",{item:p.item,index:p.nr.index,active:p.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(f,{onNotify:o.handleResize},null,8,["onNotify"])],34)),[[u,o.handleVisibilityChange]])}gn.render=oa;gn.__file="src/components/RecycleScroller.vue";const et=le({__name:"ContextMenu",props:{file:{},idx:{},selectedTag:{},disableDelete:{type:Boolean}},emits:["contextMenuClick"],setup(e,{emit:t}){const n=e,i=Be(),r=H(()=>{var o;return(((o=i.conf)==null?void 0:o.all_custom_tags)??[]).reduce((f,u)=>[...f,{...u,selected:!!n.selectedTag.find(p=>p.id===u.id)}],[])});return(o,f)=>{const u=Xt,p=hi,w=Zt,A=en;return L(),J(A,{onClick:f[0]||(f[0]=E=>t("contextMenuClick",E,o.file,o.idx))},{default:I(()=>{var E;return[h(u,{key:"deleteFiles",disabled:o.disableDelete},{default:I(()=>[N(T(o.$t("deleteSelected")),1)]),_:1},8,["disabled"]),o.file.type==="dir"?(L(),V(ee,{key:0},[h(u,{key:"openInNewTab"},{default:I(()=>[N(T(o.$t("openInNewTab")),1)]),_:1}),h(u,{key:"openOnTheRight"},{default:I(()=>[N(T(o.$t("openOnTheRight")),1)]),_:1}),h(u,{key:"openWithWalkMode"},{default:I(()=>[N(T(o.$t("openWithWalkMode")),1)]),_:1})],64)):q("",!0),o.file.type==="file"?(L(),V(ee,{key:1},[z(K)(o.file.name)?(L(),V(ee,{key:0},[h(u,{key:"viewGenInfo"},{default:I(()=>[N(T(o.$t("viewGenerationInfo")),1)]),_:1}),h(p),((E=z(i).conf)==null?void 0:E.launch_mode)!=="server"?(L(),V(ee,{key:0},[h(u,{key:"send2txt2img"},{default:I(()=>[N(T(o.$t("sendToTxt2img")),1)]),_:1}),h(u,{key:"send2img2img"},{default:I(()=>[N(T(o.$t("sendToImg2img")),1)]),_:1}),h(u,{key:"send2inpaint"},{default:I(()=>[N(T(o.$t("sendToInpaint")),1)]),_:1}),h(u,{key:"send2extras"},{default:I(()=>[N(T(o.$t("sendToExtraFeatures")),1)]),_:1}),h(w,{key:"sendToThirdPartyExtension",title:o.$t("sendToThirdPartyExtension")},{default:I(()=>[h(u,{key:"send2controlnet-txt2img"},{default:I(()=>[N("ControlNet - "+T(o.$t("t2i")),1)]),_:1}),h(u,{key:"send2controlnet-img2img"},{default:I(()=>[N("ControlNet - "+T(o.$t("i2i")),1)]),_:1}),h(u,{key:"send2outpaint"},{default:I(()=>[N("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):q("",!0),h(u,{key:"send2savedDir"},{default:I(()=>[N(T(o.$t("send2savedDir")),1)]),_:1}),h(p),h(w,{key:"toggle-tag",title:o.$t("toggleTag")},{default:I(()=>[(L(!0),V(ee,null,ve(r.value,S=>(L(),J(u,{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(u,{key:"openWithLocalFileBrowser"},{default:I(()=>[N(T(o.$t("openWithLocalFileBrowser")),1)]),_:1})],64)):q("",!0),h(u,{key:"previewInNewWindow"},{default:I(()=>[N(T(o.$t("previewInNewWindow")),1)]),_:1}),h(u,{key:"download"},{default:I(()=>[N(T(o.$t("download")),1)]),_:1}),h(u,{key:"copyPreviewUrl"},{default:I(()=>[N(T(o.$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"},ma=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;mi(u=>({"61e8af1c":u.$props.cellWidth+"px"}));const i=Be(),r=yt(),o=H(()=>r.tagMap.get(n.file.fullpath)??[]),f=H(()=>{const u=i.gridThumbnailResolution;return i.enableThumbnail?gi(n.file,[u,u].join("x")):re(n.file)});return(u,p)=>{const w=oe,A=yi,E=an;return L(),J(w,{trigger:["contextmenu"],visible:z(i).longPressOpenContextMenu?typeof u.idx=="number"&&u.showMenuIdx===u.idx:void 0,"onUpdate:visible":p[5]||(p[5]=S=>typeof u.idx=="number"&&t("update:showMenuIdx",S?u.idx:-1))},{overlay:I(()=>[h(et,{file:u.file,idx:u.idx,"selected-tag":o.value,onContextMenuClick:p[4]||(p[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:u.file.type==="dir",selected:u.selected}]),"data-idx":u.idx,key:u.file.name,draggable:"true",onDragstart:p[1]||(p[1]=S=>t("dragstart",S,u.idx)),onDragend:p[2]||(p[2]=S=>t("dragend",S,u.idx)),onClickCapture:p[3]||(p[3]=S=>t("fileItemClick",S,u.file,u.idx))},[G("div",null,[h(w,null,{overlay:I(()=>[h(et,{file:u.file,idx:u.idx,"selected-tag":o.value,onContextMenuClick:p[0]||(p[0]=(S,v,l)=>t("contextMenuClick",S,v,l))},null,8,["file","idx","selected-tag"])]),default:I(()=>[G("div",ca,[h(z(nt))])]),_:1}),z(K)(u.file.name)?(L(),V("div",{style:{position:"relative"},key:u.file.fullpath,class:Ae(`idx-${u.idx}`)},[h(A,{src:f.value,fallback:z(er),preview:{src:u.fullScreenPreviewImageUrl,onVisibleChange:(S,v)=>t("previewVisibleChange",S,v)}},null,8,["src","fallback","preview"]),o.value&&u.cellWidth>128?(L(),V("div",da,[(L(!0),V(ee,null,ve(o.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,[u.file.type==="file"?(L(),J(z(Ui),{key:0,class:"icon center"})):(L(),J(z(Ji),{key:1,class:"icon center"}))])),u.cellWidth>128?(L(),V("div",va,[G("div",pa,T(u.file.name),1),G("div",ha,[G("div",null,T(u.file.size),1),G("div",null,T(u.file.date),1)])])):q("",!0)])],42,ua))]),_:1},8,["visible"])}}});const Ua=tn(ma,[["__scopeId","data-v-5219c1d4"]]);function ga(e,t,n,i){const r={x:0,y:0};let o=0,f=0,u=typeof(i==null?void 0:i.width)=="number"?i.width:0,p=typeof(i==null?void 0:i.height)=="number"?i.height:0,w=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)&&(o=d instanceof MouseEvent?d.clientX:d.touches[0].clientX,f=d instanceof MouseEvent?d.clientY:d.touches[0].clientY,u=e.value.offsetWidth,p=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=u+((d instanceof MouseEvent?d.clientX:d.touches[0].clientX)-o),y=p+((d instanceof MouseEvent?d.clientY:d.touches[0].clientY)-f),_=r.x+((d instanceof MouseEvent?d.clientX:d.touches[0].clientX)-o),P=r.y+((d instanceof MouseEvent?d.clientY:d.touches[0].clientY)-f);_+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+y>window.innerHeight&&(y=window.innerHeight-e.value.offsetTop),e.value.style.width=`${c}px`,e.value.style.height=`${y}px`,t.value.style.left=`${_}px`,t.value.style.top=`${P}px`,i!=null&&i.onResize&&i.onResize(c,y)},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,w=e.value.offsetLeft,A=e.value.offsetTop,o=d instanceof MouseEvent?d.clientX:d.touches[0].clientX,f=d instanceof MouseEvent?d.clientY:d.touches[0].clientY,document.documentElement.addEventListener("mousemove",a),document.documentElement.addEventListener("touchmove",a),document.documentElement.addEventListener("mouseup",m),document.documentElement.addEventListener("touchend",m))},a=d=>{if(!e.value||!n.value||!E)return;const c=w+((d instanceof MouseEvent?d.clientX:d.touches[0].clientX)-o),y=A+((d instanceof MouseEvent?d.clientY:d.touches[0].clientY)-f);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`,y<0?e.value.style.top="0px":y+e.value.offsetHeight>window.innerHeight?e.value.style.top=`${window.innerHeight-e.value.offsetHeight}px`:e.value.style.top=`${y}px`,i!=null&&i.onDrag&&i.onDrag(c,y)},m=()=>{E=!1,document.documentElement.removeEventListener("mousemove",a),document.documentElement.removeEventListener("touchmove",a),document.documentElement.removeEventListener("mouseup",m),document.documentElement.removeEventListener("touchend",m)},g=()=>{if(!e.value||!t.value)return;let d=e.value.offsetLeft,c=e.value.offsetTop,y=e.value.offsetWidth,_=e.value.offsetHeight;d+y>window.innerWidth&&(d=window.innerWidth-y,d<0&&(d=0,y=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=`${y}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`),g(),window.addEventListener("resize",g))}),rt(()=>{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",m),document.documentElement.removeEventListener("touchend",m),window.removeEventListener("resize",g)}),me(()=>[e.value,t.value,n.value],([d,c,y])=>{d&&c&&(c.addEventListener("mousedown",S),c.addEventListener("touchstart",S)),d&&y&&(y.addEventListener("mousedown",s),y.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=Be(),r=yt(),o=U(),f=H(()=>r.tagMap.get(n.file.fullpath)??[]),u=H(()=>{var a;return(((a=i.conf)==null?void 0:a.all_custom_tags)??[]).reduce((m,g)=>[...m,{...g,selected:!!f.value.find(d=>d.id===g.id)}],[])}),p=U(""),w=lt(),A=U("");me(()=>{var a;return(a=n==null?void 0:n.file)==null?void 0:a.fullpath},async a=>{a&&(w.tasks.forEach(m=>m.cancel()),w.pushAction(()=>Je(a)).res.then(m=>{A.value=m}))},{immediate:!0});const E=U(),S=U(),v=bi("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});ga(o,E,S,{...v.value,onDrag:ue(function(a,m){v.value={...v.value,left:a,top:m}},300),onResize:ue(function(a,m){v.value={...v.value,width:a,height:m}},300)});function l(a){return a.parentNode}ge("load",a=>{const m=a.target;m.className==="ant-image-preview-img"&&(p.value=`${m.naturalWidth} x ${m.naturalHeight}`)},{capture:!0});const s=H(()=>{const a=[{name:j("fileName"),val:n.file.name},{name:j("fileSize"),val:n.file.size}];return p.value&&a.push({name:j("resolution"),val:p.value}),a});return(a,m)=>{const g=oe,d=se,c=Xt,y=en,_=Zt,P=an;return L(),V("div",{ref_key:"el",ref:o,class:Ae(["full-screen-menu",{"unset-size":!z(v).expanded}]),onWheelCapture:m[5]||(m[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:m[0]||(m[0]=b=>z(v).expanded=!z(v).expanded)},[z(v).expanded?(L(),J(z(gr),{key:0})):(L(),J(z(Sr),{key:1}))]),h(g,{"get-popup-container":l},{overlay:I(()=>[h(et,{file:a.file,idx:a.idx,"selected-tag":f.value,"disable-delete":z(re)(a.file)===z(i).fullscreenPreviewInitialUrl,onContextMenuClick:m[1]||(m[1]=(b,M,O)=>t("contextMenuClick",b,M,O))},null,8,["file","idx","selected-tag","disable-delete"])]),default:I(()=>[z(v).expanded?q("",!0):(L(),V("div",wa,[h(z(nt))]))]),_:1}),z(v).expanded?(L(),V("div",Sa)):q("",!0),z(v).expanded?(L(),V("div",Aa,[h(g,{trigger:["hover"],"get-popup-container":l},{overlay:I(()=>[h(y,{onClick:m[2]||(m[2]=b=>t("contextMenuClick",b,a.file,a.idx))},{default:I(()=>[(L(!0),V(ee,null,ve(u.value,b=>(L(),J(c,{key:`toggle-tag-${b.id}`},{default:I(()=>[N(T(b.name)+" ",1),b.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(g,{trigger:["hover"],"get-popup-container":l},{overlay:I(()=>[h(y,{onClick:m[3]||(m[3]=b=>t("contextMenuClick",b,a.file,a.idx))},{default:I(()=>{var b;return[((b=z(i).conf)==null?void 0:b.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("openOutpaint")]),_: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:m[4]||(m[4]=b=>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,b=>(L(),V("span",{class:"tag",key:b.name},[G("span",Ca,T(b.name),1),G("span",_a,T(b.val),1)]))),128))]),f.value?(L(),V("div",Oa,[(L(!0),V(ee,null,ve(f.value,b=>(L(),J(P,{key:b.id,color:z(r).getColor(b.name)},{default:I(()=>[N(T(b.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-bf92ce18"]]);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,Ue as g,gn as h,Ua as i,Ha as j,yt as k,qe as l,Ma as s,ae as u};
|