diff --git a/javascript/index.js b/javascript/index.js index 2c102e3..1d1e6e2 100644 --- a/javascript/index.js +++ b/javascript/index.js @@ -12,7 +12,7 @@ Promise.resolve().then(async () => { Infinite Image Browsing - + diff --git a/vue/dist/assets/FileItem-51205eb2.js b/vue/dist/assets/FileItem-a96f33a2.js similarity index 99% rename from vue/dist/assets/FileItem-51205eb2.js rename to vue/dist/assets/FileItem-a96f33a2.js index f214fb5..9b52f1b 100644 --- a/vue/dist/assets/FileItem-51205eb2.js +++ b/vue/dist/assets/FileItem-a96f33a2.js @@ -1,4 +1,4 @@ -var ln=Object.defineProperty;var sn=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qe=(e,t,n)=>(sn(e,typeof t!="symbol"?t+"":t,n),n);import{P as Te,c5 as on,a as ne,d as he,bq as Bt,u as ze,c as A,b$ as Mt,_ as cn,V as de,a0 as we,ao as V,bL as ot,a3 as ct,bo as un,h as ie,c6 as dn,b as fn,ay as vn,c7 as pn,a2 as ut,bK as hn,c8 as mn,c9 as gn,$ as H,b0 as yn,z as te,aA as bn,a1 as wn,ag as ce,ca as An,aR as kn,cb as Sn,cc as Cn,aM as $t,ar as Be,bn as Ye,cd as In,ce as En,c4 as ke,cf as _n,cg as On,R as ue,ai as L,U as Pn,ch as Ze,x as R,ci as Nt,cj as dt,ck as xn,cl as Tn,cm as zt,cn as Y,k as Xe,an as Bn,co as Ft,al as ee,cp as et,l as pe,aC as Me,aw as Mn,aj as De,cq as $n,cr as ft,as as Qt,bQ as vt,bP as Nn,cs as Ee,ct as zn,aD as Fn,bO as Dt,cu as Qn,cv as Dn,t as Ve,am as pt,aq as me,cw as ht,c3 as Ln,L as oe,J as Rn,bZ as mt,cx as jn,cy as Hn,bY as Vn,cz as Un,cA as Jn,at as Wn,au as Kn,ax as Lt,o as T,m as J,cB as qn,cC as Gn,cD as Yn,cE as Zn,cF as Xn,a5 as ei,y as W,cG as Se,C as Z,n as N,A as $e,cH as gt,bG as ti,cI as ni,B as ii,N as ye,v as j,r as K,W as Rt,cJ as ai,c0 as ri,M as jt,cK as li,cL as si,p as se,ae as oi,cM as ci,X as ui}from"./index-342b69b7.js";import{h as di,r as fi,a as vi,t as pi}from"./db-4c0a2bd4.js";import{t as Le,l as fe,C as hi,g as mi}from"./shortcut-42287857.js";var Ht=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:Te.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}}},Re=on(),gi=function(){return ne(ne({},Ht()),{},{type:Re.type,size:String,htmlType:Re.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:Te.any,title:String,loading:Re.loading,onClick:{type:Function}})},yi=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],bi=de.Group;const Ne=he({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Bt(gi(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(t,n){var i=n.slots,a=n.attrs,r=n.emit,f=function(k){r("update:visible",k),r("visibleChange",k)},c=ze("dropdown-button",t),h=c.prefixCls,b=c.direction,d=c.getPopupContainer;return function(){var m,k,v=ne(ne({},t),a),l=v.type,s=l===void 0?"default":l,o=v.disabled,p=v.loading,w=v.htmlType,g=v.class,u=g===void 0?"":g,C=v.overlay,_=C===void 0?(m=i.overlay)===null||m===void 0?void 0:m.call(i):C,I=v.trigger,E=v.align,P=v.visible;v.onVisibleChange;var S=v.placement,B=S===void 0?b.value==="rtl"?"bottomLeft":"bottomRight":S,z=v.href,Q=v.title,O=v.icon,F=O===void 0?((k=i.icon)===null||k===void 0?void 0:k.call(i))||A(Mt,null,null):O,D=v.mouseEnterDelay,y=v.mouseLeaveDelay,x=v.overlayClassName,M=v.overlayStyle,q=v.destroyPopupOnHide,U=v.onClick;v["onUpdate:visible"];var X=cn(v,yi),G={align:E,disabled:o,trigger:o?[]:I,placement:B,getPopupContainer:d.value,onVisibleChange:f,mouseEnterDelay:D,mouseLeaveDelay:y,visible:P,overlayClassName:x,overlayStyle:M,destroyPopupOnHide:q},re=A(de,{type:s,disabled:o,loading:p,onClick:U,htmlType:w,href:z,title:Q},{default:i.default}),le=A(de,{type:s,icon:F},null);return A(bi,ne(ne({},X),{},{class:we(h.value,u)}),{default:function(){return[i.leftButton?i.leftButton({button:re}):re,A(ve,G,{default:function(){return[i.rightButton?i.rightButton({button:le}):le]},overlay:function(){return _}})]}})}}});var Vt=he({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Bt(Ht(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(t,n){var i=n.slots,a=n.attrs,r=n.emit,f=ze("dropdown",t),c=f.prefixCls,h=f.rootPrefixCls,b=f.direction,d=f.getPopupContainer,m=V(function(){var s=t.placement,o=s===void 0?"":s,p=t.transitionName;return p!==void 0?p:o.indexOf("top")>=0?"".concat(h.value,"-slide-down"):"".concat(h.value,"-slide-up")}),k=function(){var o,p,w,g=t.overlay||((o=i.overlay)===null||o===void 0?void 0:o.call(i)),u=Array.isArray(g)?g[0]:g;if(!u)return null;var C=u.props||{};ot(!C.mode||C.mode==="vertical","Dropdown",'mode="'.concat(C.mode,`" is not supported for Dropdown's Menu.`));var _=C.selectable,I=_===void 0?!1:_,E=C.expandIcon,P=E===void 0?(p=u.children)===null||p===void 0||(w=p.expandIcon)===null||w===void 0?void 0:w.call(p):E,S=typeof P<"u"&&ut(P)?P:A("span",{class:"".concat(c.value,"-menu-submenu-arrow")},[A(hn,{class:"".concat(c.value,"-menu-submenu-arrow-icon")},null)]),B=ut(u)?ct(u,{mode:"vertical",selectable:I,expandIcon:function(){return S}}):u;return B},v=V(function(){var s=t.placement;if(!s)return b.value==="rtl"?"bottomRight":"bottomLeft";if(s.includes("Center")){var o=s.slice(0,s.indexOf("Center"));return ot(!s.includes("Center"),"Dropdown","You are using '".concat(s,"' placement in Dropdown, which is deprecated. Try to use '").concat(o,"' instead.")),o}return s}),l=function(o){r("update:visible",o),r("visibleChange",o)};return function(){var s,o,p=t.arrow,w=t.trigger,g=t.disabled,u=t.overlayClassName,C=(s=i.default)===null||s===void 0?void 0:s.call(i)[0],_=ct(C,un({class:we(C==null||(o=C.props)===null||o===void 0?void 0:o.class,ie({},"".concat(c.value,"-rtl"),b.value==="rtl"),"".concat(c.value,"-trigger"))},g?{disabled:g}:{})),I=we(u,ie({},"".concat(c.value,"-rtl"),b.value==="rtl")),E=g?[]:w,P;E&&E.indexOf("contextmenu")!==-1&&(P=!0);var S=dn({arrowPointAtCenter:fn(p)==="object"&&p.pointAtCenter,autoAdjustOverflow:!0}),B=vn(ne(ne(ne({},t),a),{},{builtinPlacements:S,overlayClassName:I,arrow:p,alignPoint:P,prefixCls:c.value,getPopupContainer:d.value,transitionName:m.value,trigger:E,onVisibleChange:l,placement:v.value}),["overlay","onUpdate:visible"]);return A(pn,B,{default:function(){return[_]},overlay:k})}}});Vt.Button=Ne;const ve=Vt;var wi=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},Ai=he({compatConfig:{MODE:3},name:"ACheckableTag",props:wi(),setup:function(t,n){var i=n.slots,a=n.emit,r=ze("tag",t),f=r.prefixCls,c=function(d){var m=t.checked;a("update:checked",!m),a("change",!m),a("click",d)},h=V(function(){var b;return we(f.value,(b={},ie(b,"".concat(f.value,"-checkable"),!0),ie(b,"".concat(f.value,"-checkable-checked"),t.checked),b))});return function(){var b;return A("span",{class:h.value,onClick:c},[(b=i.default)===null||b===void 0?void 0:b.call(i)])}}});const Ue=Ai;var ki=new RegExp("^(".concat(mn.join("|"),")(-inverse)?$")),Si=new RegExp("^(".concat(gn.join("|"),")$")),Ci=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:Te.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:Te.any}},be=he({compatConfig:{MODE:3},name:"ATag",props:Ci(),slots:["closeIcon","icon"],setup:function(t,n){var i=n.slots,a=n.emit,r=n.attrs,f=ze("tag",t),c=f.prefixCls,h=f.direction,b=H(!0);yn(function(){t.visible!==void 0&&(b.value=t.visible)});var d=function(l){l.stopPropagation(),a("update:visible",!1),a("close",l),!l.defaultPrevented&&t.visible===void 0&&(b.value=!1)},m=V(function(){var v=t.color;return v?ki.test(v)||Si.test(v):!1}),k=V(function(){var v;return we(c.value,(v={},ie(v,"".concat(c.value,"-").concat(t.color),m.value),ie(v,"".concat(c.value,"-has-color"),t.color&&!m.value),ie(v,"".concat(c.value,"-hidden"),!b.value),ie(v,"".concat(c.value,"-rtl"),h.value==="rtl"),v))});return function(){var v,l,s,o=t.icon,p=o===void 0?(v=i.icon)===null||v===void 0?void 0:v.call(i):o,w=t.color,g=t.closeIcon,u=g===void 0?(l=i.closeIcon)===null||l===void 0?void 0:l.call(i):g,C=t.closable,_=C===void 0?!1:C,I=function(){return _?u?A("span",{class:"".concat(c.value,"-close-icon"),onClick:d},[u]):A(wn,{class:"".concat(c.value,"-close-icon"),onClick:d},null):null},E={backgroundColor:w&&!m.value?w:void 0},P=p||null,S=(s=i.default)===null||s===void 0?void 0:s.call(i),B=P?A(te,null,[P,A("span",null,[S])]):S,z="onClick"in r,Q=A("span",{class:k.value,style:E},[B,I()]);return z?A(bn,null,{default:function(){return[Q]}}):Q}}});be.CheckableTag=Ue;be.install=function(e){return e.component(be.name,be),e.component(Ue.name,Ue),e};const Ii=be;ve.Button=Ne;ve.install=function(e){return e.component(ve.name,ve),e.component(Ne.name,Ne),e};var Ei={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 _i=Ei;function yt(e){for(var t=1;t{document.addEventListener(...e),$t(()=>document.removeEventListener(...e))},Vi="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==",Ce=new WeakMap;function Ui(e,t){return{useHookShareState:i=>{const a=En();Be(a),Ce.has(a)||(Ce.set(a,Ye(e(a,i??(t==null?void 0:t())))),$t(()=>{Ce.delete(a)}));const r=Ce.get(a);return Be(r),{state:r,toRefs(){return In(r)}}}}}var Ji={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 Wi=Ji;function At(e){for(var t=1;t(await ke.value.get("/files",{params:{folder_path:e}})).data,sa=async e=>(await ke.value.post("/delete_files",{file_paths:e})).data,Kt=async(e,t,n)=>(await ke.value.post("/move_files",{file_paths:e,dest:t,create_dest_folder:n})).data,oa=async(e,t,n)=>(await ke.value.post("/copy_files",{file_paths:e,dest:t,create_dest_folder:n})).data,ca=async e=>{await ke.value.post("/mkdirs",{dest_folder:e})};var qt={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress +var ln=Object.defineProperty;var sn=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qe=(e,t,n)=>(sn(e,typeof t!="symbol"?t+"":t,n),n);import{P as Te,c5 as on,a as ne,d as he,bq as Bt,u as ze,c as A,b$ as Mt,_ as cn,V as de,a0 as we,ao as V,bL as ot,a3 as ct,bo as un,h as ie,c6 as dn,b as fn,ay as vn,c7 as pn,a2 as ut,bK as hn,c8 as mn,c9 as gn,$ as H,b0 as yn,z as te,aA as bn,a1 as wn,ag as ce,ca as An,aR as kn,cb as Sn,cc as Cn,aM as $t,ar as Be,bn as Ye,cd as In,ce as En,c4 as ke,cf as _n,cg as On,R as ue,ai as L,U as Pn,ch as Ze,x as R,ci as Nt,cj as dt,ck as xn,cl as Tn,cm as zt,cn as Y,k as Xe,an as Bn,co as Ft,al as ee,cp as et,l as pe,aC as Me,aw as Mn,aj as De,cq as $n,cr as ft,as as Qt,bQ as vt,bP as Nn,cs as Ee,ct as zn,aD as Fn,bO as Dt,cu as Qn,cv as Dn,t as Ve,am as pt,aq as me,cw as ht,c3 as Ln,L as oe,J as Rn,bZ as mt,cx as jn,cy as Hn,bY as Vn,cz as Un,cA as Jn,at as Wn,au as Kn,ax as Lt,o as T,m as J,cB as qn,cC as Gn,cD as Yn,cE as Zn,cF as Xn,a5 as ei,y as W,cG as Se,C as Z,n as N,A as $e,cH as gt,bG as ti,cI as ni,B as ii,N as ye,v as j,r as K,W as Rt,cJ as ai,c0 as ri,M as jt,cK as li,cL as si,p as se,ae as oi,cM as ci,X as ui}from"./index-066a7869.js";import{h as di,r as fi,a as vi,t as pi}from"./db-7a344507.js";import{t as Le,l as fe,C as hi,g as mi}from"./shortcut-16098eef.js";var Ht=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:Te.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}}},Re=on(),gi=function(){return ne(ne({},Ht()),{},{type:Re.type,size:String,htmlType:Re.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:Te.any,title:String,loading:Re.loading,onClick:{type:Function}})},yi=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],bi=de.Group;const Ne=he({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Bt(gi(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(t,n){var i=n.slots,a=n.attrs,r=n.emit,f=function(k){r("update:visible",k),r("visibleChange",k)},c=ze("dropdown-button",t),h=c.prefixCls,b=c.direction,d=c.getPopupContainer;return function(){var m,k,v=ne(ne({},t),a),l=v.type,s=l===void 0?"default":l,o=v.disabled,p=v.loading,w=v.htmlType,g=v.class,u=g===void 0?"":g,C=v.overlay,_=C===void 0?(m=i.overlay)===null||m===void 0?void 0:m.call(i):C,I=v.trigger,E=v.align,P=v.visible;v.onVisibleChange;var S=v.placement,B=S===void 0?b.value==="rtl"?"bottomLeft":"bottomRight":S,z=v.href,Q=v.title,O=v.icon,F=O===void 0?((k=i.icon)===null||k===void 0?void 0:k.call(i))||A(Mt,null,null):O,D=v.mouseEnterDelay,y=v.mouseLeaveDelay,x=v.overlayClassName,M=v.overlayStyle,q=v.destroyPopupOnHide,U=v.onClick;v["onUpdate:visible"];var X=cn(v,yi),G={align:E,disabled:o,trigger:o?[]:I,placement:B,getPopupContainer:d.value,onVisibleChange:f,mouseEnterDelay:D,mouseLeaveDelay:y,visible:P,overlayClassName:x,overlayStyle:M,destroyPopupOnHide:q},re=A(de,{type:s,disabled:o,loading:p,onClick:U,htmlType:w,href:z,title:Q},{default:i.default}),le=A(de,{type:s,icon:F},null);return A(bi,ne(ne({},X),{},{class:we(h.value,u)}),{default:function(){return[i.leftButton?i.leftButton({button:re}):re,A(ve,G,{default:function(){return[i.rightButton?i.rightButton({button:le}):le]},overlay:function(){return _}})]}})}}});var Vt=he({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Bt(Ht(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(t,n){var i=n.slots,a=n.attrs,r=n.emit,f=ze("dropdown",t),c=f.prefixCls,h=f.rootPrefixCls,b=f.direction,d=f.getPopupContainer,m=V(function(){var s=t.placement,o=s===void 0?"":s,p=t.transitionName;return p!==void 0?p:o.indexOf("top")>=0?"".concat(h.value,"-slide-down"):"".concat(h.value,"-slide-up")}),k=function(){var o,p,w,g=t.overlay||((o=i.overlay)===null||o===void 0?void 0:o.call(i)),u=Array.isArray(g)?g[0]:g;if(!u)return null;var C=u.props||{};ot(!C.mode||C.mode==="vertical","Dropdown",'mode="'.concat(C.mode,`" is not supported for Dropdown's Menu.`));var _=C.selectable,I=_===void 0?!1:_,E=C.expandIcon,P=E===void 0?(p=u.children)===null||p===void 0||(w=p.expandIcon)===null||w===void 0?void 0:w.call(p):E,S=typeof P<"u"&&ut(P)?P:A("span",{class:"".concat(c.value,"-menu-submenu-arrow")},[A(hn,{class:"".concat(c.value,"-menu-submenu-arrow-icon")},null)]),B=ut(u)?ct(u,{mode:"vertical",selectable:I,expandIcon:function(){return S}}):u;return B},v=V(function(){var s=t.placement;if(!s)return b.value==="rtl"?"bottomRight":"bottomLeft";if(s.includes("Center")){var o=s.slice(0,s.indexOf("Center"));return ot(!s.includes("Center"),"Dropdown","You are using '".concat(s,"' placement in Dropdown, which is deprecated. Try to use '").concat(o,"' instead.")),o}return s}),l=function(o){r("update:visible",o),r("visibleChange",o)};return function(){var s,o,p=t.arrow,w=t.trigger,g=t.disabled,u=t.overlayClassName,C=(s=i.default)===null||s===void 0?void 0:s.call(i)[0],_=ct(C,un({class:we(C==null||(o=C.props)===null||o===void 0?void 0:o.class,ie({},"".concat(c.value,"-rtl"),b.value==="rtl"),"".concat(c.value,"-trigger"))},g?{disabled:g}:{})),I=we(u,ie({},"".concat(c.value,"-rtl"),b.value==="rtl")),E=g?[]:w,P;E&&E.indexOf("contextmenu")!==-1&&(P=!0);var S=dn({arrowPointAtCenter:fn(p)==="object"&&p.pointAtCenter,autoAdjustOverflow:!0}),B=vn(ne(ne(ne({},t),a),{},{builtinPlacements:S,overlayClassName:I,arrow:p,alignPoint:P,prefixCls:c.value,getPopupContainer:d.value,transitionName:m.value,trigger:E,onVisibleChange:l,placement:v.value}),["overlay","onUpdate:visible"]);return A(pn,B,{default:function(){return[_]},overlay:k})}}});Vt.Button=Ne;const ve=Vt;var wi=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},Ai=he({compatConfig:{MODE:3},name:"ACheckableTag",props:wi(),setup:function(t,n){var i=n.slots,a=n.emit,r=ze("tag",t),f=r.prefixCls,c=function(d){var m=t.checked;a("update:checked",!m),a("change",!m),a("click",d)},h=V(function(){var b;return we(f.value,(b={},ie(b,"".concat(f.value,"-checkable"),!0),ie(b,"".concat(f.value,"-checkable-checked"),t.checked),b))});return function(){var b;return A("span",{class:h.value,onClick:c},[(b=i.default)===null||b===void 0?void 0:b.call(i)])}}});const Ue=Ai;var ki=new RegExp("^(".concat(mn.join("|"),")(-inverse)?$")),Si=new RegExp("^(".concat(gn.join("|"),")$")),Ci=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:Te.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:Te.any}},be=he({compatConfig:{MODE:3},name:"ATag",props:Ci(),slots:["closeIcon","icon"],setup:function(t,n){var i=n.slots,a=n.emit,r=n.attrs,f=ze("tag",t),c=f.prefixCls,h=f.direction,b=H(!0);yn(function(){t.visible!==void 0&&(b.value=t.visible)});var d=function(l){l.stopPropagation(),a("update:visible",!1),a("close",l),!l.defaultPrevented&&t.visible===void 0&&(b.value=!1)},m=V(function(){var v=t.color;return v?ki.test(v)||Si.test(v):!1}),k=V(function(){var v;return we(c.value,(v={},ie(v,"".concat(c.value,"-").concat(t.color),m.value),ie(v,"".concat(c.value,"-has-color"),t.color&&!m.value),ie(v,"".concat(c.value,"-hidden"),!b.value),ie(v,"".concat(c.value,"-rtl"),h.value==="rtl"),v))});return function(){var v,l,s,o=t.icon,p=o===void 0?(v=i.icon)===null||v===void 0?void 0:v.call(i):o,w=t.color,g=t.closeIcon,u=g===void 0?(l=i.closeIcon)===null||l===void 0?void 0:l.call(i):g,C=t.closable,_=C===void 0?!1:C,I=function(){return _?u?A("span",{class:"".concat(c.value,"-close-icon"),onClick:d},[u]):A(wn,{class:"".concat(c.value,"-close-icon"),onClick:d},null):null},E={backgroundColor:w&&!m.value?w:void 0},P=p||null,S=(s=i.default)===null||s===void 0?void 0:s.call(i),B=P?A(te,null,[P,A("span",null,[S])]):S,z="onClick"in r,Q=A("span",{class:k.value,style:E},[B,I()]);return z?A(bn,null,{default:function(){return[Q]}}):Q}}});be.CheckableTag=Ue;be.install=function(e){return e.component(be.name,be),e.component(Ue.name,Ue),e};const Ii=be;ve.Button=Ne;ve.install=function(e){return e.component(ve.name,ve),e.component(Ne.name,Ne),e};var Ei={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 _i=Ei;function yt(e){for(var t=1;t{document.addEventListener(...e),$t(()=>document.removeEventListener(...e))},Vi="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==",Ce=new WeakMap;function Ui(e,t){return{useHookShareState:i=>{const a=En();Be(a),Ce.has(a)||(Ce.set(a,Ye(e(a,i??(t==null?void 0:t())))),$t(()=>{Ce.delete(a)}));const r=Ce.get(a);return Be(r),{state:r,toRefs(){return In(r)}}}}}var Ji={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 Wi=Ji;function At(e){for(var t=1;t(await ke.value.get("/files",{params:{folder_path:e}})).data,sa=async e=>(await ke.value.post("/delete_files",{file_paths:e})).data,Kt=async(e,t,n)=>(await ke.value.post("/move_files",{file_paths:e,dest:t,create_dest_folder:n})).data,oa=async(e,t,n)=>(await ke.value.post("/copy_files",{file_paths:e,dest:t,create_dest_folder:n})).data,ca=async e=>{await ke.value.post("/mkdirs",{dest_folder:e})};var qt={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */(function(e,t){(function(n,i){e.exports=i})(_n,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:'
'};n.configure=function(l){var s,o;for(s in l)o=l[s],o!==void 0&&l.hasOwnProperty(s)&&(i[s]=o);return this},n.status=null,n.set=function(l){var s=n.isStarted();l=a(l,i.minimum,1),n.status=l===1?null:l;var o=n.render(!s),p=o.querySelector(i.barSelector),w=i.speed,g=i.easing;return o.offsetWidth,c(function(u){i.positionUsing===""&&(i.positionUsing=n.getPositioningCSS()),h(p,f(l,w,g)),l===1?(h(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){h(o,{transition:"all "+w+"ms linear",opacity:0}),setTimeout(function(){n.remove(),u()},w)},w)):setTimeout(u,w)}),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=a(s+l,0,.994),n.set(s)):n.start()},n.trickle=function(){return n.inc()},function(){var l=0,s=0;n.promise=function(o){return!o||o.state()==="resolved"?this:(s===0&&n.start(),l++,s++,o.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(o){return o.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();d(document.documentElement,"nprogress-busy");var s=document.createElement("div");s.id="nprogress",s.className="nprogress",s.innerHTML=i.template;var o=s.querySelector(i.barSelector),p=l?"-100":r(n.status||0),w=n.getParent(),g;return h(o,{transition:"all 0 linear",transform:"translate3d("+p+"%,0,0)"}),i.showSpinner||(g=s.querySelector(i.spinnerSelector),g&&v(g)),w!=document.body&&d(w,"nprogress-custom-parent"),w.appendChild(s),s},n.remove=function(){n.status=null,m(document.documentElement,"nprogress-busy"),m(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 a(l,s,o){return lo?o:l}function r(l){return(-1+l)*100}function f(l,s,o){var p;return i.positionUsing==="translate3d"?p={transform:"translate3d("+r(l)+"%,0,0)"}:i.positionUsing==="translate"?p={transform:"translate("+r(l)+"%,0)"}:p={"margin-left":r(l)+"%"},p.transition="all "+s+"ms "+o,p}var c=function(){var l=[];function s(){var o=l.shift();o&&o(s)}return function(o){l.push(o),l.length==1&&s()}}(),h=function(){var l=["Webkit","O","Moz","ms"],s={};function o(u){return u.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(C,_){return _.toUpperCase()})}function p(u){var C=document.body.style;if(u in C)return u;for(var _=l.length,I=u.charAt(0).toUpperCase()+u.slice(1),E;_--;)if(E=l[_]+I,E in C)return E;return u}function w(u){return u=o(u),s[u]||(s[u]=p(u))}function g(u,C,_){C=w(C),u.style[C]=_}return function(u,C){var _=arguments,I,E;if(_.length==2)for(I in C)E=C[I],E!==void 0&&C.hasOwnProperty(I)&&g(u,I,E);else g(u,_[1],_[2])}}();function b(l,s){var o=typeof l=="string"?l:k(l);return o.indexOf(" "+s+" ")>=0}function d(l,s){var o=k(l),p=o+s;b(o,s)||(l.className=p.substring(1))}function m(l,s){var o=k(l),p;b(l,s)&&(p=o.replace(" "+s+" "," "),l.className=p.substring(1,p.length-1))}function k(l){return(" "+(l&&l.className||"")+" ").replace(/\s+/gi," ")}function v(l){l&&l.parentNode&&l.parentNode.removeChild(l)}return n})})(qt);var ua=qt.exports;const da=On(ua),fa=e=>{const t=H("");return new Promise(n=>{ue.confirm({title:L("inputFolderName"),content:()=>A(Pn,{value:t.value,"onUpdate:value":i=>t.value=i},null),async onOk(){if(!t.value)return;const i=Ze(e,t.value);await ca(i),n()}})})},Gt=()=>A("p",{style:{background:"var(--zp-secondary-background)",padding:"8px",borderLeft:"4px solid var(--primary-color)"}},[R("Tips: "),L("multiSelectTips")]);function va(){const e=[];for(let a=0;a<72;a++){const f=`hsl(${a*7.2}, 90%, 35%)`;e.push(f)}return e}const It=va(),Yt=Nt("useTagStore",()=>{const e=Ye(new Map),t=async r=>{if(r=r.filter(f=>!e.has(f)),!!r.length)try{r.forEach(c=>e.set(c,[]));const f=await di(r);for(const c in f)e.set(c,f[c])}catch{r.forEach(f=>e.delete(f))}},n=new Map;return{tagMap:e,getColor:r=>{let f=n.get(r);if(!f){const c=dt.hash.sha256.hash(r),h=parseInt(dt.codec.hex.fromBits(c),16)%It.length;f=It[h],n.set(r,f)}return f},fetchImageTags:t,refreshTags:async r=>{r.forEach(f=>e.delete(f)),await t(r)}}}),pa=Nt("useBatchDownloadStore",()=>{const e=H([]);return{selectdFiles:e,addFiles:n=>{e.value=xn([...e.value,...n])}}});class Et{constructor(t,n=Tn.CREATED_TIME_DESC){Qe(this,"root");Qe(this,"execQueue",[]);this.sortMethod=n,this.root={children:[],info:{name:t,size:"-",bytes:0,created_time:"",is_under_scanned_path:!0,date:"",type:"dir",fullpath:t}},this.fetchChildren(this.root)}reset(){return this.root.children=[],this.fetchChildren(this.root)}get images(){const t=n=>n.children.map(i=>{if(i.info.type==="dir")return t(i);if(Y(i.info.name))return i.info}).filter(i=>i).flat(1);return t(this.root)}get isCompleted(){return this.execQueue.length===0}async fetchChildren(t){const{files:n}=await ge(t.info.fullpath);return t.children=zt(n,this.sortMethod).map(i=>({info:i,children:[]})),this.execQueue.shift(),this.execQueue.unshift(...t.children.filter(i=>i.info.type==="dir").map(i=>({fn:()=>this.fetchChildren(i),...i}))),t}async next(){const t=Qi(this.execQueue);if(!t)return null;const n=await t.fn();return this.execQueue=this.execQueue.slice(),this.root={...this.root},n}}function je(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vn(e)}const _e=new Map,$=Xe(),ha=pa(),Zt=Yt(),_t=Bn(),Ie=new BroadcastChannel("iib-image-transfer-bus"),{eventEmitter:Oe,useEventListen:Je}=Ft(),{useHookShareState:ae}=Ui((e,{images:t})=>{const n=H({tabIdx:-1,paneIdx:-1}),i=V(()=>fe(a.value)),a=H([]),r=V(()=>{var w;return a.value.map(g=>g.curr).slice((w=$.conf)!=null&&w.is_win?1:0)}),f=V(()=>Ze(...r.value)),c=H($.defaultSortingMethod),h=H(n.value.walkModePath?new Et(n.value.walkModePath,c.value):void 0);pe([()=>n.value.walkModePath,c],()=>{h.value=n.value.walkModePath?new Et(n.value.walkModePath,c.value):void 0});const b=Ye(new Set);pe(i,()=>b.clear());const d=V(()=>{var C;if(t.value)return t.value;if(h.value)return h.value.images.filter(_=>!b.has(_.fullpath));if(!i.value)return[];const w=((C=i.value)==null?void 0:C.files)??[],g=c.value;return zt((_=>$.onlyFoldersAndImages?_.filter(I=>I.type==="dir"||Y(I.name)):_)(w),g).filter(_=>!b.has(_.fullpath))}),m=H([]),k=H(-1),v=V(()=>h.value?!h.value.isCompleted:!1),l=H(!1),s=H(!1),o=()=>{var w,g,u;return(u=(g=(w=$.tabList)==null?void 0:w[n.value.tabIdx])==null?void 0:g.panes)==null?void 0:u[n.value.paneIdx]},p=Ft();return p.useEventListen("selectAll",()=>{console.log(`select all 0 -> ${d.value.length}`),m.value=Jt(0,d.value.length)}),{previewing:s,spinning:l,canLoadNext:v,multiSelectedIdxs:m,previewIdx:k,basePath:r,currLocation:f,currPage:i,stack:a,sortMethod:c,sortedFiles:d,scroller:H(),stackViewEl:H(),props:n,getPane:o,walker:h,deletedFiles:b,...p}},()=>({images:H()}));function nr(){const{previewIdx:e,eventEmitter:t,canLoadNext:n,previewing:i,sortedFiles:a,scroller:r,props:f}=ae().toRefs(),{state:c}=ae();let h=null;const b=(v,l)=>{var s;i.value=v,h!=null&&!v&&l&&((s=r.value)==null||s.scrollToItem(h),h=null)},d=()=>{f.value.walkModePath&&!k("next")&&n&&(ee.info(L("loadingNextFolder")),t.value.emit("loadNextDir",!0))};Ae("keydown",v=>{var l;if(i.value){let s=e.value;if(["ArrowDown","ArrowRight"].includes(v.key))for(s++;a.value[s]&&!Y(a.value[s].name);)s++;else if(["ArrowUp","ArrowLeft"].includes(v.key))for(s--;a.value[s]&&!Y(a.value[s].name);)s--;if(Y((l=a.value[s])==null?void 0:l.name)??""){e.value=s;const o=r.value;o&&!(s>=o.$_startIndex&&s<=o.$_endIndex)&&(h=s)}d()}});const m=v=>{var s;let l=e.value;if(v==="next")for(l++;a.value[l]&&!Y(a.value[l].name);)l++;else if(v==="prev")for(l--;a.value[l]&&!Y(a.value[l].name);)l--;if(Y((s=a.value[l])==null?void 0:s.name)??""){e.value=l;const o=r.value;o&&!(l>=o.$_startIndex&&l<=o.$_endIndex)&&(h=l)}d()},k=v=>{var s;let l=e.value;if(v==="next")for(l++;a.value[l]&&!Y(a.value[l].name);)l++;else if(v==="prev")for(l--;a.value[l]&&!Y(a.value[l].name);)l--;return Y((s=a.value[l])==null?void 0:s.name)??""};return Je("removeFiles",async()=>{var v;i.value&&!c.sortedFiles[e.value]&&(ee.info(L("manualExitFullScreen"),5),await et(500),(v=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||v.click(),e.value=-1)}),{previewIdx:e,onPreviewVisibleChange:b,previewing:i,previewImgMove:m,canPreview:k}}function ir(){const e=H(),{scroller:t,stackViewEl:n,stack:i,currPage:a,currLocation:r,useEventListen:f,eventEmitter:c,getPane:h,props:b,deletedFiles:d,walker:m,sortedFiles:k}=ae().toRefs();pe(()=>i.value.length,Me((y,x)=>{var M;y!==x&&((M=t.value)==null||M.scrollToItem(0))},300));const v=async y=>{var x;await w(y),b.value.walkModePath&&(await et(),await((x=m.value)==null?void 0:x.reset()),c.value.emit("loadNextDir"))};Mn(async()=>{var y;if(!i.value.length){const x=await ge("/");i.value.push({files:x.files,curr:"/"})}e.value=new da,e.value.configure({parent:n.value}),b.value.path&&b.value.path!=="/"?await v(b.value.walkModePath??b.value.path):(y=$.conf)!=null&&y.home&&w($.conf.home)}),pe(r,Me(y=>{const x=h.value();if(!x)return;x.path=y;const M=x.path.split("/").pop(),U=(()=>{var X;if(!b.value.walkModePath){const G=Ee(y);for(const[re,le]of Object.entries($.pathAliasMap))if(G.startsWith(le))return G.replace(le,re);return M}return"Walk: "+(((X=$.quickMovePaths.find(G=>G.dir===x.walkModePath))==null?void 0:X.zh)??M)})();x.name=De("div",{style:"display:flex;align-items:center"},[De(qi),De("span",{class:"line-clamp-1",style:"max-width: 256px"},U)]),x.nameFallbackStr=U,$.recent=$.recent.filter(X=>X.key!==x.key),$.recent.unshift({path:y,key:x.key}),$.recent.length>20&&($.recent=$.recent.slice(0,20))},300));const l=()=>Ve(r.value),s=async y=>{var x,M;if(y.type==="dir")try{(x=e.value)==null||x.start();const{files:q}=await ge(y.fullpath);i.value.push({files:q,curr:y.name})}finally{(M=e.value)==null||M.done()}},o=y=>{for(;y(Be($.conf,"global.conf load failed"),$.conf.is_win?y.toLowerCase()==x.toLowerCase():y==x),w=async y=>{var M,q;const x=i.value.slice();try{$n(y)||(y=Ze(((M=$.conf)==null?void 0:M.sd_cwd)??"/",y));const U=ft(y),X=i.value.map(G=>G.curr);for(X.shift();X[0]&&U[0]&&p(X[0],U[0]);)X.shift(),U.shift();for(let G=0;Gp(le.name,G));if(!re)throw console.error({frags:U,frag:G,stack:Qt(i.value)}),new Error(`${G} not found`);await s(re)}}catch(U){throw ee.error(L("moveFailedCheckPath")+(U instanceof Error?U.message:"")),console.error(y,ft(y),a.value),i.value=x,U}},g=vt(async()=>{var y,x,M;try{if((y=e.value)==null||y.start(),m.value)await m.value.reset(),c.value.emit("loadNextDir");else{const{files:q}=await ge(i.value.length===1?"/":r.value);fe(i.value).files=q}d.value.clear(),(x=t.value)==null||x.scrollToItem(0),ee.success(L("refreshCompleted"))}finally{(M=e.value)==null||M.done()}});Nn("returnToIIB",vt(async()=>{var y,x;if(!b.value.walkModePath)try{(y=e.value)==null||y.start();const{files:M}=await ge(i.value.length===1?"/":r.value);fe(i.value).files.map(U=>U.date).join()!==M.map(U=>U.date).join()&&(fe(i.value).files=M,ee.success(L("autoUpdate")))}finally{(x=e.value)==null||x.done()}})),f.value("refresh",g);const u=y=>{b.value.walkModePath&&(h.value().walkModePath=y),v(y)},C=V(()=>$.quickMovePaths.map(y=>({...y,path:Ee(y.dir)}))),_=V(()=>{const y=Ee(r.value);return C.value.find(M=>M.path===y)}),I=async()=>{const y=_.value;if(y){if(!y.can_delete)return;await fi({path:r.value,type:"scanned"}),ee.success(L("removeCompleted"))}else await vi({path:r.value,type:"scanned"}),ee.success(L("addCompleted"));pt.emit("searchIndexExpired"),pt.emit("updateGlobalSetting")},E=H(!1),P=H(r.value),S=()=>{E.value=!0,P.value=r.value},B=async()=>{await w(P.value),E.value=!1};Ae("click",y=>{var x,M,q;(q=(M=(x=y.target)==null?void 0:x.className)==null?void 0:M.includes)!=null&&q.call(M,"ant-input")||(E.value=!1)});const z=()=>{const y=parent.location,x=y.href.substring(0,y.href.length-y.search.length),M=new URLSearchParams(y.search);M.set("action","open"),m.value&&M.set("walk","1"),M.set("path",r.value);const q=`${x}?${M.toString()}`;Ve(q,L("copyLocationUrlSuccessMsg"))},Q=()=>c.value.emit("selectAll"),O=async()=>{await fa(r.value),await g()},F=()=>{const y=r.value;_e.set(y,i.value);const x=$.tabList[b.value.tabIdx],M={type:"local",key:me(),path:y,name:L("local"),stackKey:y,walkModePath:y};x.panes.push(M),x.key=M.key},D=V(()=>!m.value&&k.value.some(y=>y.type==="dir"));return{locInputValue:P,isLocationEditing:E,onLocEditEnter:B,onEditBtnClick:S,addToSearchScanPathAndQuickMove:I,searchPathInfo:_,refresh:g,copyLocation:l,back:o,openNext:s,currPage:a,currLocation:r,to:w,stack:i,scroller:t,share:z,selectAll:Q,quickMoveTo:u,onCreateFloderBtnClick:O,onWalkBtnClick:F,showWalkButton:D}}function ar({fetchNext:e}={}){const{scroller:t,sortedFiles:n,sortMethod:i,currLocation:a,stackViewEl:r,canLoadNext:f,previewIdx:c,props:h,walker:b}=ae().toRefs(),{state:d}=ae(),m=H(!1),k=H($.defaultGridCellWidth),v=V(()=>k.value+16),l=44,{width:s}=zn(r),o=V(()=>~~(s.value/v.value)),p=V(()=>{const I=v.value;return{first:I+(k.value<=160?0:l),second:I}}),w=H(!1),g=async()=>{var I;if(!(w.value||!h.value.walkModePath||!f.value))try{w.value=!0,await((I=b.value)==null?void 0:I.next())}finally{w.value=!1}},u=async(I=!1)=>{const E=t.value,P=()=>I?c.value:(E==null?void 0:E.$_endIndex)??0,S=()=>{const B=n.value.length;return B?e?P()>B-20:P()>B-20&&f.value:!0};for(;S();){await et(30);const B=await(e??g)();if(typeof B=="boolean"&&!B)return}};d.useEventListen("loadNextDir",u);const C=()=>{const I=t.value;if(I){const E=n.value.slice(Math.max(I.$_startIndex-10,0),I.$_endIndex+10).filter(P=>P.is_under_scanned_path&&Y(P.name)).map(P=>P.fullpath);Zt.fetchImageTags(E)}};pe(a,Me(C,150));const _=Me(async()=>{await u(),C()},150);return{gridItems:o,sortedFiles:n,sortMethodConv:Fn,moreActionsDropdownShow:m,gridSize:v,sortMethod:i,onScroll:_,loadNextDir:g,loadNextDirLoading:w,canLoadNext:f,itemSize:p,cellWidth:k}}function rr(){const{currLocation:e,sortedFiles:t,currPage:n,multiSelectedIdxs:i,eventEmitter:a,walker:r}=ae().toRefs(),f=()=>{i.value=[]};return Ae("click",f),Ae("blur",f),pe(n,f),{onFileDragStart:(d,m)=>{const k=Qt(t.value[m]);_t.fileDragging=!0,console.log("onFileDragStart set drag file ",d,m,k);const v=[k];let l=k.type==="dir";if(i.value.includes(m)){const o=i.value.map(p=>t.value[p]);v.push(...o),l=o.some(p=>p.type==="dir")}const s={includeDir:l,loc:e.value||"search-result",path:ht(v,"fullpath").map(o=>o.fullpath),nodes:ht(v,"fullpath"),__id:"FileTransferData"};d.dataTransfer.setData("text/plain",JSON.stringify(s))},onDrop:async d=>{if(r.value)return;const m=Ln(d);if(!m)return;const k=e.value;if(m.loc===k)return;const v=Dt(),l=async()=>v.pushAction(async()=>{await oa(m.path,k),a.value.emit("refresh"),ue.destroyAll()}),s=()=>v.pushAction(async()=>{await Kt(m.path,k),Oe.emit("removeFiles",{paths:m.path,loc:m.loc}),a.value.emit("refresh"),ue.destroyAll()});ue.confirm({title:L("confirm")+"?",width:"60vw",content:()=>{let o,p,w;return A("div",null,[A("div",null,[`${L("moveSelectedFilesTo")} ${k}`,A("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[m.path.map(g=>A("li",null,[g.split(/[/\\]/).pop()]))])]),A(Gt,null,null),A("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},class:"actions"},[A(de,{onClick:ue.destroyAll},je(o=L("cancel"))?o:{default:()=>[o]}),A(de,{type:"primary",loading:!v.isIdle,onClick:l},je(p=L("copy"))?p:{default:()=>[p]}),A(de,{type:"primary",loading:!v.isIdle,onClick:s},je(w=L("move"))?w:{default:()=>[w]})])])},maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})},multiSelectedIdxs:i,onFileDragEnd:()=>{_t.fileDragging=!1}}}function lr({openNext:e}){const t=H(!1),n=H(""),{sortedFiles:i,previewIdx:a,multiSelectedIdxs:r,stack:f,currLocation:c,spinning:h,previewing:b,stackViewEl:d,eventEmitter:m,props:k,deletedFiles:v}=ae().toRefs(),l=Ee;Je("removeFiles",({paths:g,loc:u})=>{l(u)!==l(c.value)||!fe(f.value)||(g.forEach(_=>v.value.add(_)),g.filter(Y).forEach(_=>v.value.add(_.replace(/\.\w+$/,".txt"))))}),Je("addFiles",({files:g,loc:u})=>{if(l(u)!==l(c.value))return;const C=fe(f.value);C&&C.files.unshift(...g)});const s=Dt(),o=async(g,u,C)=>{a.value=C,$.fullscreenPreviewInitialUrl=oe(u);const _=r.value.indexOf(C);if(g.shiftKey){if(_!==-1)r.value.splice(_,1);else{r.value.push(C),r.value.sort((P,S)=>P-S);const I=r.value[0],E=r.value[r.value.length-1];r.value=Jt(I,E+1)}g.stopPropagation()}else g.ctrlKey||g.metaKey?(_!==-1?r.value.splice(_,1):r.value.push(C),g.stopPropagation()):await e(u)},p=async(g,u,C)=>{var B,z,Q;const _=oe(u),I=c.value,E={IIB_container_id:parent.IIB_container_id},P=()=>{let O=[];return r.value.includes(C)?O=r.value.map(F=>i.value[F]):O.push(u),O},S=async O=>{if(!h.value)try{h.value=!0,await Un(u.fullpath),Ie.postMessage({...E,event:"click_hidden_button",btnEleId:"iib_hidden_img_update_trigger"}),await Jn(),Ie.postMessage({...E,event:"click_hidden_button",btnEleId:`iib_hidden_tab_${O}`})}catch(F){console.error(F),ee.error("发送图像失败,请携带console的错误消息找开发者")}finally{h.value=!1}};if(`${g.key}`.startsWith("toggle-tag-")){const O=+`${g.key}`.split("toggle-tag-")[1],{is_remove:F}=await pi({tag_id:O,img_path:u.fullpath}),D=(z=(B=$.conf)==null?void 0:B.all_custom_tags.find(y=>y.id===O))==null?void 0:z.name;Zt.refreshTags([u.fullpath]),ee.success(L(F?"removedTagFromImage":"addedTagToImage",{tag:D}));return}switch(g.key){case"previewInNewWindow":return window.open(_);case"download":{const O=P();Hn(O.map(F=>oe(F,!0)));break}case"copyPreviewUrl":return Ve(parent.document.location.origin+_);case"send2txt2img":return S("txt2img");case"send2img2img":return S("img2img");case"send2inpaint":return S("inpaint");case"send2extras":return S("extras");case"send2savedDir":{const O=$.quickMovePaths.find(y=>y.key==="outdir_save");if(!O)return ee.error(L("unknownSavedDir"));const F=jn(O.dir,(Q=$.conf)==null?void 0:Q.sd_cwd),D=P();await Kt(D.map(y=>y.fullpath),F,!0),Oe.emit("removeFiles",{paths:D.map(y=>y.fullpath),loc:c.value}),Oe.emit("addFiles",{files:D,loc:F});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const O=g.key.split("-")[1];Ie.postMessage({...E,event:"send_to_control_net",type:O,url:oe(u)});break}case"send2outpaint":{n.value=await s.pushAction(()=>mt(u.fullpath)).res;const[O,F]=(n.value||"").split(` `);Ie.postMessage({...E,event:"send_to_outpaint",url:oe(u),prompt:O,negPrompt:F.slice(17)});break}case"openWithWalkMode":{_e.set(I,f.value);const O=$.tabList[k.value.tabIdx],F={type:"local",key:me(),path:u.fullpath,name:L("local"),stackKey:I,walkModePath:u.fullpath};O.panes.push(F),O.key=F.key;break}case"openInNewTab":{_e.set(I,f.value);const O=$.tabList[k.value.tabIdx],F={type:"local",key:me(),path:u.fullpath,name:L("local"),stackKey:I};O.panes.push(F),O.key=F.key;break}case"openOnTheRight":{_e.set(I,f.value);let O=$.tabList[k.value.tabIdx+1];O||(O={panes:[],key:"",id:me()},$.tabList[k.value.tabIdx+1]=O);const F={type:"local",key:me(),path:u.fullpath,name:L("local"),stackKey:I};O.panes.push(F),O.key=F.key;break}case"send2BatchDownload":{ha.addFiles(P());break}case"viewGenInfo":{t.value=!0,n.value=await s.pushAction(()=>mt(u.fullpath)).res;break}case"openWithLocalFileBrowser":{await Rn(u.fullpath);break}case"deleteFiles":{const O=P(),F=async()=>{const D=O.map(y=>y.fullpath);await sa(D),ee.success(L("deleteSuccess")),Oe.emit("removeFiles",{paths:D,loc:c.value})};if(O.length===1&&$.ignoredConfirmActions.deleteOneOnly)return F();await new Promise(D=>{ue.confirm({title:L("confirmDelete"),maskClosable:!0,width:"60vw",content:()=>A("div",null,[A("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[O.map(y=>A("li",null,[y.fullpath.split(/[/\\]/).pop()]))]),A(Gt,null,null),A(hi,{checked:$.ignoredConfirmActions.deleteOneOnly,"onUpdate:checked":y=>$.ignoredConfirmActions.deleteOneOnly=y},{default:()=>[L("deleteOneOnlySkipConfirm"),R(" ("),L("resetOnGlobalSettingsPage"),R(")")]})]),async onOk(){await F(),D()}})});break}}return{}},{isOutside:w}=Qn(d);return Ae("keydown",g=>{var C,_,I;const u=mi(g);if(b.value){const E=(C=Object.entries($.shortcut).find(P=>P[1]===u&&P[1]))==null?void 0:C[0];if(E){g.stopPropagation(),g.preventDefault();const P=a.value,S=i.value[P];switch(E){case"delete":return oe(S)===$.fullscreenPreviewInitialUrl?ee.warn(L("fullscreenRestriction")):p({key:"deleteFiles"},S,P);default:{const B=(_=/^toggle_tag_(.*)$/.exec(E))==null?void 0:_[1],z=(I=$.conf)==null?void 0:I.all_custom_tags.find(Q=>Q.name===B);return z?p({key:`toggle-tag-${z.id}`},S,P):void 0}}}}else!w.value&&["Ctrl + KeyA","Cmd + KeyA"].includes(u)&&(g.preventDefault(),g.stopPropagation(),m.value.emit("selectAll"))}),{onFileItemClick:o,onContextMenuClick:p,showGenInfo:t,imageGenInfo:n,q:s}}const sr=()=>{const{stackViewEl:e}=ae().toRefs(),t=H(-1);return Dn(e,n=>{var a;let i=n.target;for(;i.parentElement;)if(i=i.parentElement,i.tagName.toLowerCase()==="li"&&i.classList.contains("file-item-trigger")){const r=(a=i.dataset)==null?void 0:a.idx;r&&Number.isSafeInteger(+r)&&(t.value=+r);return}}),{showMenuIdx:t}};function ma(){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 a=e.indexOf("Edge/");return a>0?parseInt(e.substring(a+5,e.indexOf(".",a)),10):-1}let Pe;function We(){We.init||(We.init=!0,Pe=ma()!==-1)}var Fe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){We(),Lt(()=>{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",Pe&&this.$el.appendChild(e),e.data="about:blank",Pe||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&&(!Pe&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const ga=qn();Wn("data-v-b329ee4c");const ya={class:"resize-observer",tabindex:"-1"};Kn();const ba=ga((e,t,n,i,a,r)=>(T(),J("div",ya)));Fe.render=ba;Fe.__scopeId="data-v-b329ee4c";Fe.__file="src/components/ResizeObserver.vue";function xe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xe=function(t){return typeof t}:xe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(e)}function wa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ot(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,i=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{},i,a,r,f=function(h){for(var b=arguments.length,d=new Array(b>1?b-1:0),m=1;m1){var b=c.find(function(m){return m.isIntersecting});b&&(h=b)}if(a.callback){var d=h.isIntersecting&&h.intersectionRatio>=a.threshold;if(d===a.oldResult)return;a.oldResult=d,a.callback(d,h)}},this.options.intersection),Lt(function(){a.observer&&a.observer.observe(a.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 en(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 a=new Oa(e,i,n);e._vue_visibilityState=a}}function Pa(e,t,n){var i=t.value,a=t.oldValue;if(!Xt(i,a)){var r=e._vue_visibilityState;if(!i){tn(e);return}r?r.createObserver(i,n):en(e,{value:i},n)}}function tn(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var xa={beforeMount:en,updated:Pa,unmounted:tn},Ta={itemsLimit:1e3},Ba=/(auto|scroll)/;function nn(e,t){return e.parentNode===null?t:nn(e.parentNode,t.concat([e]))}var He=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},Ma=function(t){return He(t,"overflow")+He(t,"overflow-y")+He(t,"overflow-x")},$a=function(t){return Ba.test(Ma(t))};function xt(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=nn(e.parentNode,[]),n=0;n{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,a){const r=Gn({id:Qa++,index:t,used:!0,key:i,type:a}),f=Yn({item:n,position:0,nr:r});return e.push(f),f},unuseView(e,t=!1){const n=this.$_unusedViews,i=e.nr.type;let a=n.get(i);a||(a=[],n.set(i,a)),a.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,a=this.itemSecondarySize||n,r=this.$_computedMinItemSize,f=this.typeField,c=this.simpleArray?null:this.keyField,h=this.items,b=h.length,d=this.sizes,m=this.$_views,k=this.$_unusedViews,v=this.pool,l=this.itemIndexByKey;let s,o,p,w,g;if(!b)s=o=w=g=p=0;else if(this.$_prerender)s=w=0,o=g=Math.min(this.prerender,h.length),p=null;else{const S=this.getScroll();if(t){let Q=S.start-this.$_lastUpdateScrollPosition;if(Q<0&&(Q=-Q),n===null&&QS.start&&(F=D),D=~~((O+F)/2);while(D!==y);for(D<0&&(D=0),s=D,p=d[b-1].accumulator,o=D;ob&&(o=b)),w=s;wb&&(o=b),w<0&&(w=0),g>b&&(g=b),p=Math.ceil(b/i)*n}}o-s>Ta.itemsLimit&&this.itemsLimitError(),this.totalSize=p;let u;const C=s<=this.$_endIndex&&o>=this.$_startIndex;if(C)for(let S=0,B=v.length;S=o)&&this.unuseView(u));const _=C?null:new Map;let I,E,P;for(let S=s;S=z.length)&&(u=this.addView(v,S,I,B,E),this.unuseView(u,!0),z=k.get(E)),u=z[P],_.set(E,P+1)),m.delete(u.nr.key),u.nr.used=!0,u.nr.index=S,u.nr.key=B,u.nr.type=E,m.set(B,u),Q=!0;else if(!u.nr.used&&(u.nr.used=!0,u.nr.index=S,Q=!0,z)){const O=z.indexOf(u);O!==-1&&z.splice(O,1)}u.item=I,Q&&(S===h.length-1&&this.$emit("scroll-end"),S===0&&this.$emit("scroll-start")),n===null?(u.position=d[S-1].accumulator,u.offset=0):(u.position=Math.floor(S/i)*n,u.offset=S%i*a)}return this.$_startIndex=s,this.$_endIndex=o,this.emitUpdate&&this.$emit("update",s,o,w,g),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:C}},getListenerTarget(){let e=xt(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 a=e.getBoundingClientRect(),r=n?a.height:a.width;let f=-(n?a.top:a.left),c=n?window.innerHeight:window.innerWidth;f<0&&(c+=f,f=0),f+c>r&&(c=r-f),i={start:f,end:f+c}}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,Ge?{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,a;if(this.pageMode){const r=xt(this.$el),f=r.tagName==="HTML"?0:r[t.scroll],c=r.getBoundingClientRect(),b=this.$el.getBoundingClientRect()[t.start]-c[t.start];n=r,i=t.scroll,a=e+f+b}else n=this.$el,i=t.scroll,a=e;n[i]=a},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 Da={key:0,ref:"before",class:"vue-recycle-scroller__slot"},La={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Ra(e,t,n,i,a,r){const f=Zn("ResizeObserver"),c=Xn("observe-visibility");return ei((T(),W("div",{class:ye(["vue-recycle-scroller",{ready:a.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...h)=>r.handleScroll&&r.handleScroll(...h))},[e.$slots.before?(T(),W("div",Da,[Se(e.$slots,"before")],512)):Z("v-if",!0),(T(),J(gt(n.listTag),{ref:"wrapper",style:ii({[e.direction==="vertical"?"minHeight":"minWidth"]:a.totalSize+"px"}),class:ye(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:N(()=>[(T(!0),W(te,null,$e(a.pool,h=>(T(),J(gt(n.itemTag),ti({key:h.nr.id,style:a.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${h.position}px) translate${e.direction==="vertical"?"X":"Y"}(${h.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&&a.hoverKey===h.nr.key}]]},ni(n.skipHover?{}:{mouseenter:()=>{a.hoverKey=h.nr.key},mouseleave:()=>{a.hoverKey=null}})),{default:N(()=>[Se(e.$slots,"default",{item:h.item,index:h.nr.index,active:h.nr.used})]),_:2},1040,["style","class"]))),128)),Se(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(T(),W("div",La,[Se(e.$slots,"after")],512)):Z("v-if",!0),A(f,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[c,r.handleVisibilityChange]])}an.render=Ra;an.__file="src/components/RecycleScroller.vue";const Tt=he({__name:"ContextMenu",props:{file:{},idx:{},selectedTag:{},disableDelete:{type:Boolean}},emits:["contextMenuClick"],setup(e,{emit:t}){const n=e,i=Xe(),a=V(()=>{var r;return(((r=i.conf)==null?void 0:r.all_custom_tags)??[]).reduce((f,c)=>[...f,{...c,selected:!!n.selectedTag.find(h=>h.id===c.id)}],[])});return(r,f)=>{const c=Rt,h=ai,b=ri,d=jt;return T(),J(d,{onClick:f[0]||(f[0]=m=>t("contextMenuClick",m,r.file,r.idx))},{default:N(()=>{var m;return[A(c,{key:"deleteFiles",disabled:r.disableDelete},{default:N(()=>[R(j(r.$t("deleteSelected")),1)]),_:1},8,["disabled"]),r.file.type==="dir"?(T(),W(te,{key:0},[A(c,{key:"openInNewTab"},{default:N(()=>[R(j(r.$t("openInNewTab")),1)]),_:1}),A(c,{key:"openOnTheRight"},{default:N(()=>[R(j(r.$t("openOnTheRight")),1)]),_:1}),A(c,{key:"openWithWalkMode"},{default:N(()=>[R(j(r.$t("openWithWalkMode")),1)]),_:1})],64)):Z("",!0),r.file.type==="file"?(T(),W(te,{key:1},[K(Y)(r.file.name)?(T(),W(te,{key:0},[A(c,{key:"viewGenInfo"},{default:N(()=>[R(j(r.$t("viewGenerationInfo")),1)]),_:1}),A(h),((m=K(i).conf)==null?void 0:m.launch_mode)!=="server"?(T(),W(te,{key:0},[A(c,{key:"send2txt2img"},{default:N(()=>[R(j(r.$t("sendToTxt2img")),1)]),_:1}),A(c,{key:"send2img2img"},{default:N(()=>[R(j(r.$t("sendToImg2img")),1)]),_:1}),A(c,{key:"send2inpaint"},{default:N(()=>[R(j(r.$t("sendToInpaint")),1)]),_:1}),A(c,{key:"send2extras"},{default:N(()=>[R(j(r.$t("sendToExtraFeatures")),1)]),_:1}),A(b,{key:"sendToThirdPartyExtension",title:r.$t("sendToThirdPartyExtension")},{default:N(()=>[A(c,{key:"send2controlnet-txt2img"},{default:N(()=>[R("ControlNet - "+j(r.$t("t2i")),1)]),_:1}),A(c,{key:"send2controlnet-img2img"},{default:N(()=>[R("ControlNet - "+j(r.$t("i2i")),1)]),_:1}),A(c,{key:"send2outpaint"},{default:N(()=>[R("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):Z("",!0),A(c,{key:"send2BatchDownload"},{default:N(()=>[R(j(r.$t("sendToBatchDownload")),1)]),_:1}),A(c,{key:"send2savedDir"},{default:N(()=>[R(j(r.$t("send2savedDir")),1)]),_:1}),A(h),A(b,{key:"toggle-tag",title:r.$t("toggleTag")},{default:N(()=>[(T(!0),W(te,null,$e(a.value,k=>(T(),J(c,{key:`toggle-tag-${k.id}`},{default:N(()=>[R(j(k.name)+" ",1),k.selected?(T(),J(K(Ut),{key:0})):(T(),J(K(Wt),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"]),A(c,{key:"openWithLocalFileBrowser"},{default:N(()=>[R(j(r.$t("openWithLocalFileBrowser")),1)]),_:1})],64)):Z("",!0),A(c,{key:"previewInNewWindow"},{default:N(()=>[R(j(r.$t("previewInNewWindow")),1)]),_:1}),A(c,{key:"download"},{default:N(()=>[R(j(r.$t("download")),1)]),_:1}),A(c,{key:"copyPreviewUrl"},{default:N(()=>[R(j(r.$t("copySourceFilePreviewLink")),1)]),_:1})],64)):Z("",!0)]}),_:1})}}}),ja=["data-idx"],Ha={key:1,class:"more"},Va={class:"float-btn-wrap"},Ua={key:0,class:"tags-container"},Ja={key:3,class:"preview-icon-wrap"},Wa={key:4,class:"profile"},Ka={class:"name line-clamp-1"},qa={class:"basic-info"},Ga=he({__name:"FileItem",props:{file:{},idx:{},selected:{type:Boolean,default:!1},showMenuIdx:{},cellWidth:{},fullScreenPreviewImageUrl:{},enableRightClickMenu:{type:Boolean,default:!0},enableCloseIcon:{type:Boolean,default:!1}},emits:["update:showMenuIdx","fileItemClick","dragstart","dragend","previewVisibleChange","contextMenuClick","close-icon-click"],setup(e,{emit:t}){const n=e;li(d=>({"7f7f3650":d.$props.cellWidth+"px"}));const i=Xe(),a=Yt(),r=V(()=>a.tagMap.get(n.file.fullpath)??[]),f=V(()=>{const d=i.gridThumbnailResolution;return i.enableThumbnail?si(n.file,[d,d].join("x")):oe(n.file)}),c=V(()=>{var d;return(((d=i.conf)==null?void 0:d.all_custom_tags)??[]).reduce((m,k)=>[...m,{...k,selected:!!r.value.find(v=>v.id===k.id)}],[])}),h=V(()=>c.value.find(d=>d.type==="custom"&&d.name==="like")),b=()=>{Be(h.value),t("contextMenuClick",{key:`toggle-tag-${h.value.id}`},n.file,n.idx)};return(d,m)=>{const k=ve,v=Rt,l=jt,s=ci,o=Ii;return T(),J(k,{trigger:["contextmenu"],visible:K(i).longPressOpenContextMenu?typeof d.idx=="number"&&d.showMenuIdx===d.idx:void 0,"onUpdate:visible":m[7]||(m[7]=p=>typeof d.idx=="number"&&t("update:showMenuIdx",p?d.idx:-1))},{overlay:N(()=>[d.enableRightClickMenu?(T(),J(Tt,{key:0,file:d.file,idx:d.idx,"selected-tag":r.value,onContextMenuClick:m[6]||(m[6]=(p,w,g)=>t("contextMenuClick",p,w,g))},null,8,["file","idx","selected-tag"])):Z("",!0)]),default:N(()=>[(T(),W("li",{class:ye(["file file-item-trigger grid",{clickable:d.file.type==="dir",selected:d.selected}]),"data-idx":d.idx,key:d.file.name,draggable:"true",onDragstart:m[3]||(m[3]=p=>t("dragstart",p,d.idx)),onDragend:m[4]||(m[4]=p=>t("dragend",p,d.idx)),onClickCapture:m[5]||(m[5]=p=>t("fileItemClick",p,d.file,d.idx))},[se("div",null,[d.enableCloseIcon?(T(),W("div",{key:0,class:"close-icon",onClick:m[0]||(m[0]=p=>t("close-icon-click"))},[A(K(oi))])):Z("",!0),d.enableRightClickMenu?(T(),W("div",Ha,[A(k,null,{overlay:N(()=>[A(Tt,{file:d.file,idx:d.idx,"selected-tag":r.value,onContextMenuClick:m[1]||(m[1]=(p,w,g)=>t("contextMenuClick",p,w,g))},null,8,["file","idx","selected-tag"])]),default:N(()=>[se("div",Va,[A(K(Mt))])]),_:1}),d.file.type==="file"?(T(),J(k,{key:0},{overlay:N(()=>[c.value.length>1?(T(),J(l,{key:0,onClick:m[2]||(m[2]=p=>t("contextMenuClick",p,d.file,d.idx))},{default:N(()=>[(T(!0),W(te,null,$e(c.value,p=>(T(),J(v,{key:`toggle-tag-${p.id}`},{default:N(()=>[R(j(p.name)+" ",1),p.selected?(T(),J(K(Ut),{key:0})):(T(),J(K(Wt),{key:1}))]),_:2},1024))),128))]),_:1})):Z("",!0)]),default:N(()=>{var p,w;return[se("div",{class:ye(["float-btn-wrap",{"like-selected":(p=h.value)==null?void 0:p.selected}]),onClick:b},[(w=h.value)!=null&&w.selected?(T(),J(K(Xi),{key:0})):(T(),J(K(ia),{key:1}))],2)]}),_:1})):Z("",!0)])):Z("",!0),K(Y)(d.file.name)?(T(),W("div",{style:{position:"relative"},key:d.file.fullpath,class:ye(`idx-${d.idx}`)},[A(s,{src:f.value,fallback:K(Vi),preview:{src:d.fullScreenPreviewImageUrl,onVisibleChange:(p,w)=>t("previewVisibleChange",p,w)}},null,8,["src","fallback","preview"]),r.value&&d.cellWidth>128?(T(),W("div",Ua,[(T(!0),W(te,null,$e(r.value,p=>(T(),J(o,{key:p.id,color:K(a).getColor(p.name)},{default:N(()=>[R(j(p.name),1)]),_:2},1032,["color"]))),128))])):Z("",!0)],2)):(T(),W("div",Ja,[d.file.type==="file"?(T(),J(K(Bi),{key:0,class:"icon center"})):(T(),J(K(zi),{key:1,class:"icon center"}))])),d.cellWidth>128?(T(),W("div",Wa,[se("div",Ka,j(d.file.name),1),se("div",qa,[se("div",null,j(d.file.size),1),se("div",null,j(d.file.date),1)])])):Z("",!0)])],42,ja))]),_:1},8,["visible"])}}});const or=ui(Ga,[["__scopeId","data-v-8b1ae0bb"]]);export{ve as D,or as F,Tt as _,ir as a,ar as b,rr as c,lr as d,nr as e,sr as f,an as g,Je as h,Yt as i,Ae as j,pa as k,_e as s,ae as u}; diff --git a/vue/dist/assets/ImgSliPagePane-935db780.js b/vue/dist/assets/ImgSliPagePane-6f28af0c.js similarity index 74% rename from vue/dist/assets/ImgSliPagePane-935db780.js rename to vue/dist/assets/ImgSliPagePane-6f28af0c.js index 7893731..6a745ba 100644 --- a/vue/dist/assets/ImgSliPagePane-935db780.js +++ b/vue/dist/assets/ImgSliPagePane-6f28af0c.js @@ -1 +1 @@ -import{d as t,o as a,m as r,c1 as n}from"./index-342b69b7.js";const p=t({__name:"ImgSliPagePane",props:{paneIdx:{},tabIdx:{},left:{},right:{}},setup(o){return(e,s)=>(a(),r(n,{left:e.left,right:e.right},null,8,["left","right"]))}});export{p as default}; +import{d as t,o as a,m as r,c1 as n}from"./index-066a7869.js";const p=t({__name:"ImgSliPagePane",props:{paneIdx:{},tabIdx:{},left:{},right:{}},setup(o){return(e,s)=>(a(),r(n,{left:e.left,right:e.right},null,8,["left","right"]))}});export{p as default}; diff --git a/vue/dist/assets/MatchedImageGrid-804e84a4.js b/vue/dist/assets/MatchedImageGrid-1992d1ff.js similarity index 89% rename from vue/dist/assets/MatchedImageGrid-804e84a4.js rename to vue/dist/assets/MatchedImageGrid-1992d1ff.js index e2b88e8..6854cbb 100644 --- a/vue/dist/assets/MatchedImageGrid-804e84a4.js +++ b/vue/dist/assets/MatchedImageGrid-1992d1ff.js @@ -1 +1 @@ -import{d as q,l as Q,ax as W,o as r,y as h,c as l,n as a,r as e,s as y,p as b,t as X,v as S,x as j,m as M,L as H,C as m,N as T,Q as J,R as K,X as Y}from"./index-342b69b7.js";import{L as Z,R as ee,f as te,S as ie}from"./fullScreenContextMenu-ce458082.js";import{g as se,F as le}from"./FileItem-51205eb2.js";import{g as ne}from"./db-4c0a2bd4.js";import{c as ae,u as oe}from"./hook-7463589c.js";import"./shortcut-42287857.js";const re={class:"hint"},de={key:1,class:"preview-switch"},ce=q({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(V){const u=V,p=ae(c=>ne(u.selectedTagIds,c)),{queue:D,images:i,onContextMenuClickU:g,stackViewEl:F,previewIdx:n,previewing:f,onPreviewVisibleChange:z,previewImgMove:v,canPreview:I,itemSize:w,gridItems:$,showGenInfo:o,imageGenInfo:k,q:B,multiSelectedIdxs:G,onFileItemClick:N,scroller:x,showMenuIdx:d,onFileDragStart:R,onFileDragEnd:E,cellWidth:P,onScroll:C}=oe(p);return Q(()=>u.selectedTagIds,async()=>{await p.reset(),await W(),x.value.scrollToItem(0),C()},{immediate:!0}),(c,t)=>{const U=J,A=K,L=ie;return r(),h("div",{class:"container",ref_key:"stackViewEl",ref:F},[l(L,{size:"large",spinning:!e(D).isIdle},{default:a(()=>[l(A,{visible:e(o),"onUpdate:visible":t[1]||(t[1]=s=>y(o)?o.value=s:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=s=>o.value=!1)},{cancelText:a(()=>[]),default:a(()=>[l(U,{active:"",loading:!e(B).isIdle},{default:a(()=>[b("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[0]||(t[0]=s=>e(X)(e(k)))},[b("div",re,S(c.$t("doubleClickToCopy")),1),j(" "+S(e(k)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(i)?(r(),M(e(se),{key:0,ref_key:"scroller",ref:x,class:"file-list",items:e(i),"item-size":e(w).first,"key-field":"fullpath","item-secondary-size":e(w).second,gridItems:e($),onScroll:e(C)},{default:a(({item:s,index:_})=>[l(le,{idx:_,file:s,"cell-width":e(P),"show-menu-idx":e(d),"onUpdate:showMenuIdx":t[3]||(t[3]=O=>y(d)?d.value=O:null),onDragstart:e(R),onDragend:e(E),onFileItemClick:e(N),"full-screen-preview-image-url":e(i)[e(n)]?e(H)(e(i)[e(n)]):"",selected:e(G).includes(_),onContextMenuClick:e(g),onPreviewVisibleChange:e(z)},null,8,["idx","file","cell-width","show-menu-idx","onDragstart","onDragend","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):m("",!0),e(f)?(r(),h("div",de,[l(e(Z),{onClick:t[4]||(t[4]=s=>e(v)("prev")),class:T({disable:!e(I)("prev")})},null,8,["class"]),l(e(ee),{onClick:t[5]||(t[5]=s=>e(v)("next")),class:T({disable:!e(I)("next")})},null,8,["class"])])):m("",!0)]),_:1},8,["spinning"]),e(f)&&e(i)&&e(i)[e(n)]?(r(),M(te,{key:0,file:e(i)[e(n)],idx:e(n),onContextMenuClick:e(g)},null,8,["file","idx","onContextMenuClick"])):m("",!0)],512)}}});const Ie=Y(ce,[["__scopeId","data-v-6cc08968"]]);export{Ie as default}; +import{d as q,l as Q,ax as W,o as r,y as h,c as l,n as a,r as e,s as y,p as b,t as X,v as S,x as j,m as M,L as H,C as m,N as T,Q as J,R as K,X as Y}from"./index-066a7869.js";import{L as Z,R as ee,f as te,S as ie}from"./fullScreenContextMenu-2de1a5a3.js";import{g as se,F as le}from"./FileItem-a96f33a2.js";import{g as ne}from"./db-7a344507.js";import{c as ae,u as oe}from"./hook-6c156191.js";import"./shortcut-16098eef.js";const re={class:"hint"},de={key:1,class:"preview-switch"},ce=q({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(V){const u=V,p=ae(c=>ne(u.selectedTagIds,c)),{queue:D,images:i,onContextMenuClickU:g,stackViewEl:F,previewIdx:n,previewing:f,onPreviewVisibleChange:z,previewImgMove:v,canPreview:I,itemSize:w,gridItems:$,showGenInfo:o,imageGenInfo:k,q:B,multiSelectedIdxs:G,onFileItemClick:N,scroller:x,showMenuIdx:d,onFileDragStart:R,onFileDragEnd:E,cellWidth:P,onScroll:C}=oe(p);return Q(()=>u.selectedTagIds,async()=>{await p.reset(),await W(),x.value.scrollToItem(0),C()},{immediate:!0}),(c,t)=>{const U=J,A=K,L=ie;return r(),h("div",{class:"container",ref_key:"stackViewEl",ref:F},[l(L,{size:"large",spinning:!e(D).isIdle},{default:a(()=>[l(A,{visible:e(o),"onUpdate:visible":t[1]||(t[1]=s=>y(o)?o.value=s:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=s=>o.value=!1)},{cancelText:a(()=>[]),default:a(()=>[l(U,{active:"",loading:!e(B).isIdle},{default:a(()=>[b("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[0]||(t[0]=s=>e(X)(e(k)))},[b("div",re,S(c.$t("doubleClickToCopy")),1),j(" "+S(e(k)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(i)?(r(),M(e(se),{key:0,ref_key:"scroller",ref:x,class:"file-list",items:e(i),"item-size":e(w).first,"key-field":"fullpath","item-secondary-size":e(w).second,gridItems:e($),onScroll:e(C)},{default:a(({item:s,index:_})=>[l(le,{idx:_,file:s,"cell-width":e(P),"show-menu-idx":e(d),"onUpdate:showMenuIdx":t[3]||(t[3]=O=>y(d)?d.value=O:null),onDragstart:e(R),onDragend:e(E),onFileItemClick:e(N),"full-screen-preview-image-url":e(i)[e(n)]?e(H)(e(i)[e(n)]):"",selected:e(G).includes(_),onContextMenuClick:e(g),onPreviewVisibleChange:e(z)},null,8,["idx","file","cell-width","show-menu-idx","onDragstart","onDragend","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):m("",!0),e(f)?(r(),h("div",de,[l(e(Z),{onClick:t[4]||(t[4]=s=>e(v)("prev")),class:T({disable:!e(I)("prev")})},null,8,["class"]),l(e(ee),{onClick:t[5]||(t[5]=s=>e(v)("next")),class:T({disable:!e(I)("next")})},null,8,["class"])])):m("",!0)]),_:1},8,["spinning"]),e(f)&&e(i)&&e(i)[e(n)]?(r(),M(te,{key:0,file:e(i)[e(n)],idx:e(n),onContextMenuClick:e(g)},null,8,["file","idx","onContextMenuClick"])):m("",!0)],512)}}});const Ie=Y(ce,[["__scopeId","data-v-6cc08968"]]);export{Ie as default}; diff --git a/vue/dist/assets/SubstrSearch-37367b93.js b/vue/dist/assets/SubstrSearch-d4c86bbb.js similarity index 92% rename from vue/dist/assets/SubstrSearch-37367b93.js rename to vue/dist/assets/SubstrSearch-d4c86bbb.js index db6b34a..1708023 100644 --- a/vue/dist/assets/SubstrSearch-37367b93.js +++ b/vue/dist/assets/SubstrSearch-d4c86bbb.js @@ -1 +1 @@ -import{d as Y,$ as V,aw as Z,bQ as ee,bP as F,o as i,y as w,c as o,r as e,bT as ae,m,n as r,x as k,v,C as f,s as U,p as A,t as te,L as ne,N as E,ax as le,al as se,ai as ie,U as oe,V as re,Q as de,R as ue,X as ce}from"./index-342b69b7.js";import{L as pe,R as me,f as ve,S as fe}from"./fullScreenContextMenu-ce458082.js";/* empty css */import{g as ge,F as we}from"./FileItem-51205eb2.js";import{b as T,c as ke,f as Ie,u as ye}from"./db-4c0a2bd4.js";import{c as xe,u as Ce}from"./hook-7463589c.js";import"./shortcut-42287857.js";const be={key:0,class:"search-bar"},he={class:"hint"},_e={key:1,class:"preview-switch"},Se=Y({__name:"SubstrSearch",setup(Me){const c=V(""),I=xe(n=>Ie(c.value,n)),{queue:d,images:s,onContextMenuClickU:y,stackViewEl:R,previewIdx:u,previewing:x,onPreviewVisibleChange:N,previewImgMove:C,canPreview:b,itemSize:h,gridItems:P,showGenInfo:p,imageGenInfo:_,q:L,multiSelectedIdxs:q,onFileItemClick:G,scroller:S,showMenuIdx:g,onFileDragStart:K,onFileDragEnd:O,cellWidth:Q,onScroll:M}=Ce(I),t=V();Z(async()=>{t.value=await T(),t.value.img_count&&t.value.expired&&z()});const z=ee(()=>d.pushAction(async()=>(await ye(),t.value=await T(),t.value)).res),D=async()=>{await I.reset({refetch:!0}),await le(),M(),S.value.scrollToItem(0),s.value.length||se.info(ie("fuzzy-search-noResults"))};return F("returnToIIB",async()=>{const n=await d.pushAction(ke).res;t.value.expired=n.expired}),F("searchIndexExpired",()=>t.value&&(t.value.expired=!0)),(n,a)=>{const H=oe,$=re,W=de,X=ue,j=fe;return i(),w("div",{class:"container",ref_key:"stackViewEl",ref:R},[t.value?(i(),w("div",be,[o(H,{value:c.value,"onUpdate:value":a[0]||(a[0]=l=>c.value=l),placeholder:n.$t("fuzzy-search-placeholder"),disabled:!e(d).isIdle,onKeydown:ae(D,["enter"]),"allow-clear":""},null,8,["value","placeholder","disabled","onKeydown"]),t.value.expired||!t.value.img_count?(i(),m($,{key:0,onClick:e(z),loading:!e(d).isIdle,type:"primary"},{default:r(()=>[k(v(t.value.img_count===0?n.$t("generateIndexHint"):n.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(i(),m($,{key:1,type:"primary",onClick:D,loading:!e(d).isIdle,disabled:!c.value},{default:r(()=>[k(v(n.$t("search")),1)]),_:1},8,["loading","disabled"]))])):f("",!0),o(j,{size:"large",spinning:!e(d).isIdle},{default:r(()=>[o(X,{visible:e(p),"onUpdate:visible":a[2]||(a[2]=l=>U(p)?p.value=l:null),width:"70vw","mask-closable":"",onOk:a[3]||(a[3]=l=>p.value=!1)},{cancelText:r(()=>[]),default:r(()=>[o(W,{active:"",loading:!e(L).isIdle},{default:r(()=>[A("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:a[1]||(a[1]=l=>e(te)(e(_)))},[A("div",he,v(n.$t("doubleClickToCopy")),1),k(" "+v(e(_)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(s)?(i(),m(e(ge),{key:0,ref_key:"scroller",ref:S,class:"file-list",items:e(s),"item-size":e(h).first,"key-field":"fullpath","item-secondary-size":e(h).second,gridItems:e(P),onScroll:e(M)},{default:r(({item:l,index:B})=>[o(we,{idx:B,file:l,"show-menu-idx":e(g),"onUpdate:showMenuIdx":a[4]||(a[4]=J=>U(g)?g.value=J:null),onFileItemClick:e(G),"full-screen-preview-image-url":e(s)[e(u)]?e(ne)(e(s)[e(u)]):"","cell-width":e(Q),selected:e(q).includes(B),onContextMenuClick:e(y),onDragstart:e(K),onDragend:e(O),onPreviewVisibleChange:e(N)},null,8,["idx","file","show-menu-idx","onFileItemClick","full-screen-preview-image-url","cell-width","selected","onContextMenuClick","onDragstart","onDragend","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):f("",!0),e(x)?(i(),w("div",_e,[o(e(pe),{onClick:a[5]||(a[5]=l=>e(C)("prev")),class:E({disable:!e(b)("prev")})},null,8,["class"]),o(e(me),{onClick:a[6]||(a[6]=l=>e(C)("next")),class:E({disable:!e(b)("next")})},null,8,["class"])])):f("",!0)]),_:1},8,["spinning"]),e(x)&&e(s)&&e(s)[e(u)]?(i(),m(ve,{key:1,file:e(s)[e(u)],idx:e(u),onContextMenuClick:e(y)},null,8,["file","idx","onContextMenuClick"])):f("",!0)],512)}}});const Ae=ce(Se,[["__scopeId","data-v-ea1c4eca"]]);export{Ae as default}; +import{d as Y,$ as V,aw as Z,bQ as ee,bP as F,o as i,y as w,c as o,r as e,bT as ae,m,n as r,x as k,v,C as f,s as U,p as A,t as te,L as ne,N as E,ax as le,al as se,ai as ie,U as oe,V as re,Q as de,R as ue,X as ce}from"./index-066a7869.js";import{L as pe,R as me,f as ve,S as fe}from"./fullScreenContextMenu-2de1a5a3.js";/* empty css */import{g as ge,F as we}from"./FileItem-a96f33a2.js";import{b as T,c as ke,f as Ie,u as ye}from"./db-7a344507.js";import{c as xe,u as Ce}from"./hook-6c156191.js";import"./shortcut-16098eef.js";const be={key:0,class:"search-bar"},he={class:"hint"},_e={key:1,class:"preview-switch"},Se=Y({__name:"SubstrSearch",setup(Me){const c=V(""),I=xe(n=>Ie(c.value,n)),{queue:d,images:s,onContextMenuClickU:y,stackViewEl:R,previewIdx:u,previewing:x,onPreviewVisibleChange:N,previewImgMove:C,canPreview:b,itemSize:h,gridItems:P,showGenInfo:p,imageGenInfo:_,q:L,multiSelectedIdxs:q,onFileItemClick:G,scroller:S,showMenuIdx:g,onFileDragStart:K,onFileDragEnd:O,cellWidth:Q,onScroll:M}=Ce(I),t=V();Z(async()=>{t.value=await T(),t.value.img_count&&t.value.expired&&z()});const z=ee(()=>d.pushAction(async()=>(await ye(),t.value=await T(),t.value)).res),D=async()=>{await I.reset({refetch:!0}),await le(),M(),S.value.scrollToItem(0),s.value.length||se.info(ie("fuzzy-search-noResults"))};return F("returnToIIB",async()=>{const n=await d.pushAction(ke).res;t.value.expired=n.expired}),F("searchIndexExpired",()=>t.value&&(t.value.expired=!0)),(n,a)=>{const H=oe,$=re,W=de,X=ue,j=fe;return i(),w("div",{class:"container",ref_key:"stackViewEl",ref:R},[t.value?(i(),w("div",be,[o(H,{value:c.value,"onUpdate:value":a[0]||(a[0]=l=>c.value=l),placeholder:n.$t("fuzzy-search-placeholder"),disabled:!e(d).isIdle,onKeydown:ae(D,["enter"]),"allow-clear":""},null,8,["value","placeholder","disabled","onKeydown"]),t.value.expired||!t.value.img_count?(i(),m($,{key:0,onClick:e(z),loading:!e(d).isIdle,type:"primary"},{default:r(()=>[k(v(t.value.img_count===0?n.$t("generateIndexHint"):n.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(i(),m($,{key:1,type:"primary",onClick:D,loading:!e(d).isIdle,disabled:!c.value},{default:r(()=>[k(v(n.$t("search")),1)]),_:1},8,["loading","disabled"]))])):f("",!0),o(j,{size:"large",spinning:!e(d).isIdle},{default:r(()=>[o(X,{visible:e(p),"onUpdate:visible":a[2]||(a[2]=l=>U(p)?p.value=l:null),width:"70vw","mask-closable":"",onOk:a[3]||(a[3]=l=>p.value=!1)},{cancelText:r(()=>[]),default:r(()=>[o(W,{active:"",loading:!e(L).isIdle},{default:r(()=>[A("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:a[1]||(a[1]=l=>e(te)(e(_)))},[A("div",he,v(n.$t("doubleClickToCopy")),1),k(" "+v(e(_)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(s)?(i(),m(e(ge),{key:0,ref_key:"scroller",ref:S,class:"file-list",items:e(s),"item-size":e(h).first,"key-field":"fullpath","item-secondary-size":e(h).second,gridItems:e(P),onScroll:e(M)},{default:r(({item:l,index:B})=>[o(we,{idx:B,file:l,"show-menu-idx":e(g),"onUpdate:showMenuIdx":a[4]||(a[4]=J=>U(g)?g.value=J:null),onFileItemClick:e(G),"full-screen-preview-image-url":e(s)[e(u)]?e(ne)(e(s)[e(u)]):"","cell-width":e(Q),selected:e(q).includes(B),onContextMenuClick:e(y),onDragstart:e(K),onDragend:e(O),onPreviewVisibleChange:e(N)},null,8,["idx","file","show-menu-idx","onFileItemClick","full-screen-preview-image-url","cell-width","selected","onContextMenuClick","onDragstart","onDragend","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems","onScroll"])):f("",!0),e(x)?(i(),w("div",_e,[o(e(pe),{onClick:a[5]||(a[5]=l=>e(C)("prev")),class:E({disable:!e(b)("prev")})},null,8,["class"]),o(e(me),{onClick:a[6]||(a[6]=l=>e(C)("next")),class:E({disable:!e(b)("next")})},null,8,["class"])])):f("",!0)]),_:1},8,["spinning"]),e(x)&&e(s)&&e(s)[e(u)]?(i(),m(ve,{key:1,file:e(s)[e(u)],idx:e(u),onContextMenuClick:e(y)},null,8,["file","idx","onContextMenuClick"])):f("",!0)],512)}}});const Ae=ce(Se,[["__scopeId","data-v-ea1c4eca"]]);export{Ae as default}; diff --git a/vue/dist/assets/TagSearch-7cc1cee3.js b/vue/dist/assets/TagSearch-a21af1d8.js similarity index 99% rename from vue/dist/assets/TagSearch-7cc1cee3.js rename to vue/dist/assets/TagSearch-a21af1d8.js index f80d09d..366abe1 100644 --- a/vue/dist/assets/TagSearch-7cc1cee3.js +++ b/vue/dist/assets/TagSearch-a21af1d8.js @@ -1 +1 @@ -import{P as j,Z as _e,d as ae,bq as ge,aY as be,$ as F,bH as Ce,l as xe,u as he,ao as J,a0 as Z,h as x,c as v,a as W,bI as Ie,b as Ae,f as we,bJ as ke,a3 as se,bK as Pe,a2 as $e,i as Oe,b0 as Se,bL as Be,a5 as Ke,a6 as Te,a7 as Ee,ag as Ne,aT as Re,aR as Me,bM as De,aS as je,bN as Fe,k as Ue,bO as Ve,aq as Le,aw as qe,bP as oe,bQ as ze,o as C,y as S,C as q,z as Y,p as M,v as B,r as K,S as te,m as Q,n as V,x as z,A as ie,N as re,bR as Ge,q as ce,a1 as He,ap as Qe,al as de,ai as ne,R as Je,V as ue,U as We,bS as Xe,X as Ye}from"./index-342b69b7.js";/* empty css *//* empty css */import{b as ve,c as Ze,d as ea,e as aa,u as ta}from"./db-4c0a2bd4.js";var na=function(){return{prefixCls:String,activeKey:{type:[Array,Number,String]},defaultActiveKey:{type:[Array,Number,String]},accordion:{type:Boolean,default:void 0},destroyInactivePanel:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},expandIcon:Function,openAnimation:j.object,expandIconPosition:j.oneOf(_e("left","right")),collapsible:{type:String},ghost:{type:Boolean,default:void 0},onChange:Function,"onUpdate:activeKey":Function}},me=function(){return{openAnimation:j.object,prefixCls:String,header:j.any,headerClass:String,showArrow:{type:Boolean,default:void 0},isActive:{type:Boolean,default:void 0},destroyInactivePanel:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},accordion:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},expandIcon:Function,extra:j.any,panelKey:j.oneOfType([j.string,j.number]),collapsible:{type:String},role:String,onItemClick:{type:Function}}};function fe(l){var e=l;if(!Array.isArray(e)){var t=Ae(e);e=t==="number"||t==="string"?[e]:[]}return e.map(function(s){return String(s)})}const X=ae({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:ge(na(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,openAnimation:be("ant-motion-collapse",!1),expandIconPosition:"left"}),slots:["expandIcon"],setup:function(e,t){var s=t.attrs,c=t.slots,n=t.emit,o=F(fe(Ce([e.activeKey,e.defaultActiveKey])));xe(function(){return e.activeKey},function(){o.value=fe(e.activeKey)},{deep:!0});var f=he("collapse",e),g=f.prefixCls,P=f.direction,T=J(function(){var d=e.expandIconPosition;return d!==void 0?d:P.value==="rtl"?"right":"left"}),h=function(r){var u=e.expandIcon,y=u===void 0?c.expandIcon:u,_=y?y(r):v(Pe,{rotate:r.isActive?90:void 0},null);return v("div",null,[$e(Array.isArray(y)?_[0]:_)?se(_,{class:"".concat(g.value,"-arrow")},!1):_])},E=function(r){e.activeKey===void 0&&(o.value=r);var u=e.accordion?r[0]:r;n("update:activeKey",u),n("change",u)},$=function(r){var u=o.value;if(e.accordion)u=u[0]===r?[]:[r];else{u=Oe(u);var y=u.indexOf(r),_=y>-1;_?u.splice(y,1):u.push(r)}E(u)},D=function(r,u){var y,_,R;if(!ke(r)){var a=o.value,i=e.accordion,b=e.destroyInactivePanel,k=e.collapsible,O=e.openAnimation,I=String((y=r.key)!==null&&y!==void 0?y:u),w=r.props||{},A=w.header,p=A===void 0?(_=r.children)===null||_===void 0||(R=_.header)===null||R===void 0?void 0:R.call(_):A,G=w.headerClass,m=w.collapsible,L=w.disabled,U=!1;i?U=a[0]===I:U=a.indexOf(I)>-1;var H=m??k;(L||L==="")&&(H="disabled");var ye={key:I,panelKey:I,header:p,headerClass:G,isActive:U,prefixCls:g.value,destroyInactivePanel:b,openAnimation:O,accordion:i,onItemClick:H==="disabled"?null:$,expandIcon:h,collapsible:H};return se(r,ye)}},N=function(){var r;return we((r=c.default)===null||r===void 0?void 0:r.call(c)).map(D)};return function(){var d,r=e.accordion,u=e.bordered,y=e.ghost,_=Z((d={},x(d,g.value,!0),x(d,"".concat(g.value,"-borderless"),!u),x(d,"".concat(g.value,"-icon-position-").concat(T.value),!0),x(d,"".concat(g.value,"-rtl"),P.value==="rtl"),x(d,"".concat(g.value,"-ghost"),!!y),x(d,s.class,!!s.class),d));return v("div",W(W({class:_},Ie(s)),{},{style:s.style,role:r?"tablist":null}),[N()])}}}),la=ae({compatConfig:{MODE:3},name:"PanelContent",props:me(),setup:function(e,t){var s=t.slots,c=F(!1);return Se(function(){(e.isActive||e.forceRender)&&(c.value=!0)}),function(){var n,o;if(!c.value)return null;var f=e.prefixCls,g=e.isActive,P=e.role;return v("div",{ref:F,class:Z("".concat(f,"-content"),(n={},x(n,"".concat(f,"-content-active"),g),x(n,"".concat(f,"-content-inactive"),!g),n)),role:P},[v("div",{class:"".concat(f,"-content-box")},[(o=s.default)===null||o===void 0?void 0:o.call(s)])])}}}),ee=ae({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:ge(me(),{showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1}),slots:["expandIcon","extra","header"],setup:function(e,t){var s=t.slots,c=t.emit,n=t.attrs;Be(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');var o=he("collapse",e),f=o.prefixCls,g=function(){c("itemClick",e.panelKey)},P=function(h){(h.key==="Enter"||h.keyCode===13||h.which===13)&&g()};return function(){var T,h,E,$,D=e.header,N=D===void 0?(T=s.header)===null||T===void 0?void 0:T.call(s):D,d=e.headerClass,r=e.isActive,u=e.showArrow,y=e.destroyInactivePanel,_=e.accordion,R=e.forceRender,a=e.openAnimation,i=e.expandIcon,b=i===void 0?s.expandIcon:i,k=e.extra,O=k===void 0?(h=s.extra)===null||h===void 0?void 0:h.call(s):k,I=e.collapsible,w=I==="disabled",A=f.value,p=Z("".concat(A,"-header"),(E={},x(E,d,d),x(E,"".concat(A,"-header-collapsible-only"),I==="header"),E)),G=Z(($={},x($,"".concat(A,"-item"),!0),x($,"".concat(A,"-item-active"),r),x($,"".concat(A,"-item-disabled"),w),x($,"".concat(A,"-no-arrow"),!u),x($,"".concat(n.class),!!n.class),$)),m=v("i",{class:"arrow"},null);u&&typeof b=="function"&&(m=b(e));var L=Ke(v(la,{prefixCls:A,isActive:r,forceRender:R,role:_?"tabpanel":null},{default:s.default}),[[Te,r]]),U=W({appear:!1,css:!1},a);return v("div",W(W({},n),{},{class:G}),[v("div",{class:p,onClick:function(){return I!=="header"&&g()},role:_?"tab":"button",tabindex:w?-1:0,"aria-expanded":r,onKeypress:P},[u&&m,I==="header"?v("span",{onClick:g,class:"".concat(A,"-header-text")},[N]):N,O&&v("div",{class:"".concat(A,"-extra")},[O])]),v(Ee,U,{default:function(){return[!y||r?L:null]}})])}}});X.Panel=ee;X.install=function(l){return l.component(X.name,X),l.component(ee.name,ee),l};var sa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const oa=sa;function pe(l){for(var e=1;e!s.isIdle),n=F(),o=F({and_tags:[],or_tags:[],not_tags:[]}),f=J(()=>n.value?n.value.tags.slice().sort((a,i)=>i.count-a.count):[]),g=["custom","Model","lora","lyco","pos","size","Postprocess upscaler","Postprocess upscale by","Sampler"].reduce((a,i,b)=>(a[i]=b,a),{}),P=J(()=>Object.entries(xa(f.value,a=>a.type)).sort((a,i)=>g[a[0]]-g[i[0]])),T=Le(),h=F(P.value.map(a=>a[0]));qe(async()=>{n.value=await ve(),h.value=P.value.map(a=>a[0]),n.value.img_count&&n.value.expired&&E()}),oe("searchIndexExpired",()=>n.value&&(n.value.expired=!0));const E=ze(()=>s.pushAction(async()=>(await ta(),n.value=await ve(),h.value=P.value.map(a=>a[0]),n.value)).res),$=()=>{t.openTagSearchMatchedImageGridInRight(e.tabIdx,T,o.value)};oe("returnToIIB",async()=>{const a=await s.pushAction(Ze).res;n.value.expired=a.expired});const D=(a,i=!1)=>(i?`[${a.type}] `:"")+(a.display_name?`${a.display_name} : ${a.name}`:a.name),N=F(!1),d=F(""),r=async()=>{var i,b,k;if(!d.value){N.value=!1;return}const a=await s.pushAction(()=>ea({tag_name:d.value})).res;a.type!=="custom"&&de.error(ne("existInOtherType")),(i=n.value)!=null&&i.tags.find(O=>O.id===a.id)?de.error(ne("alreadyExists")):((b=n.value)==null||b.tags.push(a),(k=t.conf)==null||k.all_custom_tags.push(a)),d.value="",N.value=!1},u=a=>{Je.confirm({title:ne("confirmDelete"),async onOk(){var b,k,O,I;await aa({tag_id:a});const i=((b=n.value)==null?void 0:b.tags.findIndex(w=>w.id===a))??-1;(k=n.value)==null||k.tags.splice(i,1),(I=t.conf)==null||I.all_custom_tags.splice((O=t.conf)==null?void 0:O.all_custom_tags.findIndex(w=>w.id===a),1)}})},y=J(()=>new Set([o.value.and_tags,o.value.or_tags,o.value.not_tags].flat())),_=a=>{y.value.has(a.id)?(o.value.and_tags=o.value.and_tags.filter(i=>i!==a.id),o.value.or_tags=o.value.or_tags.filter(i=>i!==a.id),o.value.not_tags=o.value.not_tags.filter(i=>i!==a.id)):o.value.and_tags.push(a.id)},R={value:a=>a.id,text:D,optionText:a=>D(a,!0)};return(a,i)=>{const b=ue,k=We,O=ue,I=Xe,w=ee,A=X;return C(),S("div",Ia,[q("",!0),n.value?(C(),S(Y,{key:1},[M("div",null,[M("div",Aa,[M("div",wa,B(a.$t("exactMatch")),1),v(K(te),{conv:R,mode:"multiple",style:{width:"100%"},options:f.value,value:o.value.and_tags,"onUpdate:value":i[0]||(i[0]=p=>o.value.and_tags=p),disabled:!f.value.length,placeholder:a.$t("selectExactMatchTag")},null,8,["options","value","disabled","placeholder"]),n.value.expired||!n.value.img_count?(C(),Q(b,{key:0,onClick:K(E),loading:!K(s).isIdle,type:"primary"},{default:V(()=>[z(B(n.value.img_count===0?a.$t("generateIndexHint"):a.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(C(),Q(b,{key:1,type:"primary",onClick:$,loading:!K(s).isIdle,disabled:!o.value.and_tags.length},{default:V(()=>[z(B(a.$t("search")),1)]),_:1},8,["loading","disabled"]))]),M("div",ka,[M("div",Pa,B(a.$t("anyMatch")),1),v(K(te),{conv:R,mode:"multiple",style:{width:"100%"},options:f.value,value:o.value.or_tags,"onUpdate:value":i[1]||(i[1]=p=>o.value.or_tags=p),disabled:!f.value.length,placeholder:a.$t("selectAnyMatchTag")},null,8,["options","value","disabled","placeholder"])]),M("div",$a,[M("div",Oa,B(a.$t("exclude")),1),v(K(te),{conv:R,mode:"multiple",style:{width:"100%"},options:f.value,value:o.value.not_tags,"onUpdate:value":i[2]||(i[2]=p=>o.value.not_tags=p),disabled:!f.value.length,placeholder:a.$t("selectExcludeTag")},null,8,["options","value","disabled","placeholder"])])]),f.value.filter(p=>p.type!=="custom").length?q("",!0):(C(),S("p",Sa,B(a.$t("needGenerateIdx")),1)),M("div",Ba,[(C(!0),S(Y,null,ie(P.value,([p,G])=>(C(),S("ul",{class:"tag-list",key:p},[M("h3",{class:"cat-name",onClick:m=>h.value.includes(p)?h.value.splice(h.value.indexOf(p),1):h.value.push(p)},[v(K(ra),{class:re(["arrow",{down:h.value.includes(p)}])},null,8,["class"]),z(" "+B(a.$t(p)),1)],8,Ka),v(A,{ghost:"",activeKey:h.value,"onUpdate:activeKey":i[5]||(i[5]=m=>h.value=m)},{expandIcon:V(()=>[]),default:V(()=>[(C(),Q(w,{key:p},{default:V(()=>[(C(!0),S(Y,null,ie(G,(m,L)=>(C(),S("li",{key:m.id,class:re(["tag",{selected:y.value.has(m.id)}]),onClick:U=>_(m)},[y.value.has(m.id)?(C(),Q(K(Ge),{key:0})):q("",!0),z(" "+B(D(m))+" ",1),p==="custom"&&L!==0?(C(),S("span",{key:1,class:"remove",onClickCapture:ce(U=>u(m.id),["stop"])},[v(K(He))],40,Ea)):q("",!0)],10,Ta))),128)),p==="custom"?(C(),S("li",{key:0,class:"tag",onClick:i[4]||(i[4]=m=>N.value=!0)},[N.value?(C(),Q(I,{key:0,compact:""},{default:V(()=>[v(k,{value:d.value,"onUpdate:value":i[3]||(i[3]=m=>d.value=m),style:{width:"128px"},loading:c.value,"allow-clear":"",size:"small"},null,8,["value","loading"]),v(O,{size:"small",type:"primary",onClickCapture:ce(r,["stop"]),loading:c.value},{default:V(()=>[z(B(d.value?a.$t("submit"):a.$t("cancel")),1)]),_:1},8,["onClickCapture","loading"])]),_:1})):(C(),S(Y,{key:1},[v(K(Qe)),z(" "+B(a.$t("add")),1)],64))])):q("",!0)]),_:2},1024))]),_:2},1032,["activeKey"])]))),128))])],64)):q("",!0)])}}});const Fa=Ye(Na,[["__scopeId","data-v-d3d0aa40"]]);export{Fa as default}; +import{P as j,Z as _e,d as ae,bq as ge,aY as be,$ as F,bH as Ce,l as xe,u as he,ao as J,a0 as Z,h as x,c as v,a as W,bI as Ie,b as Ae,f as we,bJ as ke,a3 as se,bK as Pe,a2 as $e,i as Oe,b0 as Se,bL as Be,a5 as Ke,a6 as Te,a7 as Ee,ag as Ne,aT as Re,aR as Me,bM as De,aS as je,bN as Fe,k as Ue,bO as Ve,aq as Le,aw as qe,bP as oe,bQ as ze,o as C,y as S,C as q,z as Y,p as M,v as B,r as K,S as te,m as Q,n as V,x as z,A as ie,N as re,bR as Ge,q as ce,a1 as He,ap as Qe,al as de,ai as ne,R as Je,V as ue,U as We,bS as Xe,X as Ye}from"./index-066a7869.js";/* empty css *//* empty css */import{b as ve,c as Ze,d as ea,e as aa,u as ta}from"./db-7a344507.js";var na=function(){return{prefixCls:String,activeKey:{type:[Array,Number,String]},defaultActiveKey:{type:[Array,Number,String]},accordion:{type:Boolean,default:void 0},destroyInactivePanel:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},expandIcon:Function,openAnimation:j.object,expandIconPosition:j.oneOf(_e("left","right")),collapsible:{type:String},ghost:{type:Boolean,default:void 0},onChange:Function,"onUpdate:activeKey":Function}},me=function(){return{openAnimation:j.object,prefixCls:String,header:j.any,headerClass:String,showArrow:{type:Boolean,default:void 0},isActive:{type:Boolean,default:void 0},destroyInactivePanel:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},accordion:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},expandIcon:Function,extra:j.any,panelKey:j.oneOfType([j.string,j.number]),collapsible:{type:String},role:String,onItemClick:{type:Function}}};function fe(l){var e=l;if(!Array.isArray(e)){var t=Ae(e);e=t==="number"||t==="string"?[e]:[]}return e.map(function(s){return String(s)})}const X=ae({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:ge(na(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,openAnimation:be("ant-motion-collapse",!1),expandIconPosition:"left"}),slots:["expandIcon"],setup:function(e,t){var s=t.attrs,c=t.slots,n=t.emit,o=F(fe(Ce([e.activeKey,e.defaultActiveKey])));xe(function(){return e.activeKey},function(){o.value=fe(e.activeKey)},{deep:!0});var f=he("collapse",e),g=f.prefixCls,P=f.direction,T=J(function(){var d=e.expandIconPosition;return d!==void 0?d:P.value==="rtl"?"right":"left"}),h=function(r){var u=e.expandIcon,y=u===void 0?c.expandIcon:u,_=y?y(r):v(Pe,{rotate:r.isActive?90:void 0},null);return v("div",null,[$e(Array.isArray(y)?_[0]:_)?se(_,{class:"".concat(g.value,"-arrow")},!1):_])},E=function(r){e.activeKey===void 0&&(o.value=r);var u=e.accordion?r[0]:r;n("update:activeKey",u),n("change",u)},$=function(r){var u=o.value;if(e.accordion)u=u[0]===r?[]:[r];else{u=Oe(u);var y=u.indexOf(r),_=y>-1;_?u.splice(y,1):u.push(r)}E(u)},D=function(r,u){var y,_,R;if(!ke(r)){var a=o.value,i=e.accordion,b=e.destroyInactivePanel,k=e.collapsible,O=e.openAnimation,I=String((y=r.key)!==null&&y!==void 0?y:u),w=r.props||{},A=w.header,p=A===void 0?(_=r.children)===null||_===void 0||(R=_.header)===null||R===void 0?void 0:R.call(_):A,G=w.headerClass,m=w.collapsible,L=w.disabled,U=!1;i?U=a[0]===I:U=a.indexOf(I)>-1;var H=m??k;(L||L==="")&&(H="disabled");var ye={key:I,panelKey:I,header:p,headerClass:G,isActive:U,prefixCls:g.value,destroyInactivePanel:b,openAnimation:O,accordion:i,onItemClick:H==="disabled"?null:$,expandIcon:h,collapsible:H};return se(r,ye)}},N=function(){var r;return we((r=c.default)===null||r===void 0?void 0:r.call(c)).map(D)};return function(){var d,r=e.accordion,u=e.bordered,y=e.ghost,_=Z((d={},x(d,g.value,!0),x(d,"".concat(g.value,"-borderless"),!u),x(d,"".concat(g.value,"-icon-position-").concat(T.value),!0),x(d,"".concat(g.value,"-rtl"),P.value==="rtl"),x(d,"".concat(g.value,"-ghost"),!!y),x(d,s.class,!!s.class),d));return v("div",W(W({class:_},Ie(s)),{},{style:s.style,role:r?"tablist":null}),[N()])}}}),la=ae({compatConfig:{MODE:3},name:"PanelContent",props:me(),setup:function(e,t){var s=t.slots,c=F(!1);return Se(function(){(e.isActive||e.forceRender)&&(c.value=!0)}),function(){var n,o;if(!c.value)return null;var f=e.prefixCls,g=e.isActive,P=e.role;return v("div",{ref:F,class:Z("".concat(f,"-content"),(n={},x(n,"".concat(f,"-content-active"),g),x(n,"".concat(f,"-content-inactive"),!g),n)),role:P},[v("div",{class:"".concat(f,"-content-box")},[(o=s.default)===null||o===void 0?void 0:o.call(s)])])}}}),ee=ae({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:ge(me(),{showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1}),slots:["expandIcon","extra","header"],setup:function(e,t){var s=t.slots,c=t.emit,n=t.attrs;Be(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');var o=he("collapse",e),f=o.prefixCls,g=function(){c("itemClick",e.panelKey)},P=function(h){(h.key==="Enter"||h.keyCode===13||h.which===13)&&g()};return function(){var T,h,E,$,D=e.header,N=D===void 0?(T=s.header)===null||T===void 0?void 0:T.call(s):D,d=e.headerClass,r=e.isActive,u=e.showArrow,y=e.destroyInactivePanel,_=e.accordion,R=e.forceRender,a=e.openAnimation,i=e.expandIcon,b=i===void 0?s.expandIcon:i,k=e.extra,O=k===void 0?(h=s.extra)===null||h===void 0?void 0:h.call(s):k,I=e.collapsible,w=I==="disabled",A=f.value,p=Z("".concat(A,"-header"),(E={},x(E,d,d),x(E,"".concat(A,"-header-collapsible-only"),I==="header"),E)),G=Z(($={},x($,"".concat(A,"-item"),!0),x($,"".concat(A,"-item-active"),r),x($,"".concat(A,"-item-disabled"),w),x($,"".concat(A,"-no-arrow"),!u),x($,"".concat(n.class),!!n.class),$)),m=v("i",{class:"arrow"},null);u&&typeof b=="function"&&(m=b(e));var L=Ke(v(la,{prefixCls:A,isActive:r,forceRender:R,role:_?"tabpanel":null},{default:s.default}),[[Te,r]]),U=W({appear:!1,css:!1},a);return v("div",W(W({},n),{},{class:G}),[v("div",{class:p,onClick:function(){return I!=="header"&&g()},role:_?"tab":"button",tabindex:w?-1:0,"aria-expanded":r,onKeypress:P},[u&&m,I==="header"?v("span",{onClick:g,class:"".concat(A,"-header-text")},[N]):N,O&&v("div",{class:"".concat(A,"-extra")},[O])]),v(Ee,U,{default:function(){return[!y||r?L:null]}})])}}});X.Panel=ee;X.install=function(l){return l.component(X.name,X),l.component(ee.name,ee),l};var sa={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"};const oa=sa;function pe(l){for(var e=1;e!s.isIdle),n=F(),o=F({and_tags:[],or_tags:[],not_tags:[]}),f=J(()=>n.value?n.value.tags.slice().sort((a,i)=>i.count-a.count):[]),g=["custom","Model","lora","lyco","pos","size","Postprocess upscaler","Postprocess upscale by","Sampler"].reduce((a,i,b)=>(a[i]=b,a),{}),P=J(()=>Object.entries(xa(f.value,a=>a.type)).sort((a,i)=>g[a[0]]-g[i[0]])),T=Le(),h=F(P.value.map(a=>a[0]));qe(async()=>{n.value=await ve(),h.value=P.value.map(a=>a[0]),n.value.img_count&&n.value.expired&&E()}),oe("searchIndexExpired",()=>n.value&&(n.value.expired=!0));const E=ze(()=>s.pushAction(async()=>(await ta(),n.value=await ve(),h.value=P.value.map(a=>a[0]),n.value)).res),$=()=>{t.openTagSearchMatchedImageGridInRight(e.tabIdx,T,o.value)};oe("returnToIIB",async()=>{const a=await s.pushAction(Ze).res;n.value.expired=a.expired});const D=(a,i=!1)=>(i?`[${a.type}] `:"")+(a.display_name?`${a.display_name} : ${a.name}`:a.name),N=F(!1),d=F(""),r=async()=>{var i,b,k;if(!d.value){N.value=!1;return}const a=await s.pushAction(()=>ea({tag_name:d.value})).res;a.type!=="custom"&&de.error(ne("existInOtherType")),(i=n.value)!=null&&i.tags.find(O=>O.id===a.id)?de.error(ne("alreadyExists")):((b=n.value)==null||b.tags.push(a),(k=t.conf)==null||k.all_custom_tags.push(a)),d.value="",N.value=!1},u=a=>{Je.confirm({title:ne("confirmDelete"),async onOk(){var b,k,O,I;await aa({tag_id:a});const i=((b=n.value)==null?void 0:b.tags.findIndex(w=>w.id===a))??-1;(k=n.value)==null||k.tags.splice(i,1),(I=t.conf)==null||I.all_custom_tags.splice((O=t.conf)==null?void 0:O.all_custom_tags.findIndex(w=>w.id===a),1)}})},y=J(()=>new Set([o.value.and_tags,o.value.or_tags,o.value.not_tags].flat())),_=a=>{y.value.has(a.id)?(o.value.and_tags=o.value.and_tags.filter(i=>i!==a.id),o.value.or_tags=o.value.or_tags.filter(i=>i!==a.id),o.value.not_tags=o.value.not_tags.filter(i=>i!==a.id)):o.value.and_tags.push(a.id)},R={value:a=>a.id,text:D,optionText:a=>D(a,!0)};return(a,i)=>{const b=ue,k=We,O=ue,I=Xe,w=ee,A=X;return C(),S("div",Ia,[q("",!0),n.value?(C(),S(Y,{key:1},[M("div",null,[M("div",Aa,[M("div",wa,B(a.$t("exactMatch")),1),v(K(te),{conv:R,mode:"multiple",style:{width:"100%"},options:f.value,value:o.value.and_tags,"onUpdate:value":i[0]||(i[0]=p=>o.value.and_tags=p),disabled:!f.value.length,placeholder:a.$t("selectExactMatchTag")},null,8,["options","value","disabled","placeholder"]),n.value.expired||!n.value.img_count?(C(),Q(b,{key:0,onClick:K(E),loading:!K(s).isIdle,type:"primary"},{default:V(()=>[z(B(n.value.img_count===0?a.$t("generateIndexHint"):a.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(C(),Q(b,{key:1,type:"primary",onClick:$,loading:!K(s).isIdle,disabled:!o.value.and_tags.length},{default:V(()=>[z(B(a.$t("search")),1)]),_:1},8,["loading","disabled"]))]),M("div",ka,[M("div",Pa,B(a.$t("anyMatch")),1),v(K(te),{conv:R,mode:"multiple",style:{width:"100%"},options:f.value,value:o.value.or_tags,"onUpdate:value":i[1]||(i[1]=p=>o.value.or_tags=p),disabled:!f.value.length,placeholder:a.$t("selectAnyMatchTag")},null,8,["options","value","disabled","placeholder"])]),M("div",$a,[M("div",Oa,B(a.$t("exclude")),1),v(K(te),{conv:R,mode:"multiple",style:{width:"100%"},options:f.value,value:o.value.not_tags,"onUpdate:value":i[2]||(i[2]=p=>o.value.not_tags=p),disabled:!f.value.length,placeholder:a.$t("selectExcludeTag")},null,8,["options","value","disabled","placeholder"])])]),f.value.filter(p=>p.type!=="custom").length?q("",!0):(C(),S("p",Sa,B(a.$t("needGenerateIdx")),1)),M("div",Ba,[(C(!0),S(Y,null,ie(P.value,([p,G])=>(C(),S("ul",{class:"tag-list",key:p},[M("h3",{class:"cat-name",onClick:m=>h.value.includes(p)?h.value.splice(h.value.indexOf(p),1):h.value.push(p)},[v(K(ra),{class:re(["arrow",{down:h.value.includes(p)}])},null,8,["class"]),z(" "+B(a.$t(p)),1)],8,Ka),v(A,{ghost:"",activeKey:h.value,"onUpdate:activeKey":i[5]||(i[5]=m=>h.value=m)},{expandIcon:V(()=>[]),default:V(()=>[(C(),Q(w,{key:p},{default:V(()=>[(C(!0),S(Y,null,ie(G,(m,L)=>(C(),S("li",{key:m.id,class:re(["tag",{selected:y.value.has(m.id)}]),onClick:U=>_(m)},[y.value.has(m.id)?(C(),Q(K(Ge),{key:0})):q("",!0),z(" "+B(D(m))+" ",1),p==="custom"&&L!==0?(C(),S("span",{key:1,class:"remove",onClickCapture:ce(U=>u(m.id),["stop"])},[v(K(He))],40,Ea)):q("",!0)],10,Ta))),128)),p==="custom"?(C(),S("li",{key:0,class:"tag",onClick:i[4]||(i[4]=m=>N.value=!0)},[N.value?(C(),Q(I,{key:0,compact:""},{default:V(()=>[v(k,{value:d.value,"onUpdate:value":i[3]||(i[3]=m=>d.value=m),style:{width:"128px"},loading:c.value,"allow-clear":"",size:"small"},null,8,["value","loading"]),v(O,{size:"small",type:"primary",onClickCapture:ce(r,["stop"]),loading:c.value},{default:V(()=>[z(B(d.value?a.$t("submit"):a.$t("cancel")),1)]),_:1},8,["onClickCapture","loading"])]),_:1})):(C(),S(Y,{key:1},[v(K(Qe)),z(" "+B(a.$t("add")),1)],64))])):q("",!0)]),_:2},1024))]),_:2},1032,["activeKey"])]))),128))])],64)):q("",!0)])}}});const Fa=Ye(Na,[["__scopeId","data-v-d3d0aa40"]]);export{Fa as default}; diff --git a/vue/dist/assets/batchDownload-a9902fb1.js b/vue/dist/assets/batchDownload-3b20e739.js similarity index 90% rename from vue/dist/assets/batchDownload-a9902fb1.js rename to vue/dist/assets/batchDownload-3b20e739.js index 7ef9f10..c92c46b 100644 --- a/vue/dist/assets/batchDownload-a9902fb1.js +++ b/vue/dist/assets/batchDownload-3b20e739.js @@ -1 +1 @@ -import{d as v,c2 as C,bO as I,o as i,y as _,p as f,c,n as r,x as h,v as d,r as e,m as F,L as x,c3 as z,c4 as B,V as $,X as R}from"./index-342b69b7.js";import{u as S,b as V,k as E,F as A,g as L}from"./FileItem-51205eb2.js";import"./db-4c0a2bd4.js";import"./shortcut-42287857.js";const T={class:"actions-panel actions"},N={key:0,class:"file-list"},U={class:"hint"},H=v({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(O){const{stackViewEl:w}=S().toRefs(),{itemSize:p,gridItems:k,cellWidth:b}=V(),l=E(),{selectdFiles:n}=C(l),u=I(),y=async t=>{const s=z(t);s&&l.addFiles(s.nodes)},D=async()=>{u.pushAction(async()=>{const t=await B.value.post("/zip",{paths:n.value.map(o=>o.fullpath)},{responseType:"blob"}),s=window.URL.createObjectURL(new Blob([t.data])),a=document.createElement("a");a.href=s,a.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(a),a.click()})},g=t=>{n.value.splice(t,1)};return(t,s)=>{const a=$;return i(),_("div",{class:"container",ref_key:"stackViewEl",ref:w,onDrop:y},[f("div",T,[c(a,{onClick:s[0]||(s[0]=o=>e(l).selectdFiles=[])},{default:r(()=>[h(d(t.$t("clear")),1)]),_:1}),c(a,{onClick:D,type:"primary",loading:!e(u).isIdle},{default:r(()=>[h(d(t.$t("zipDownload")),1)]),_:1},8,["loading"])]),e(n).length?(i(),F(e(L),{key:1,ref:"scroller",class:"file-list",items:e(n).slice(),"item-size":e(p).first,"key-field":"fullpath","item-secondary-size":e(p).second,gridItems:e(k)},{default:r(({item:o,index:m})=>[c(A,{idx:m,file:o,"cell-width":e(b),"enable-close-icon":"",onCloseIconClick:j=>g(m),"full-screen-preview-image-url":e(x)(o),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(i(),_("div",N,[f("p",U,d(t.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const G=R(H,[["__scopeId","data-v-aab31da2"]]);export{G as default}; +import{d as v,c2 as C,bO as I,o as i,y as _,p as f,c,n as r,x as h,v as d,r as e,m as F,L as x,c3 as z,c4 as B,V as $,X as R}from"./index-066a7869.js";import{u as S,b as V,k as E,F as A,g as L}from"./FileItem-a96f33a2.js";import"./db-7a344507.js";import"./shortcut-16098eef.js";const T={class:"actions-panel actions"},N={key:0,class:"file-list"},U={class:"hint"},H=v({__name:"batchDownload",props:{tabIdx:{},paneIdx:{},id:{}},setup(O){const{stackViewEl:w}=S().toRefs(),{itemSize:p,gridItems:k,cellWidth:b}=V(),l=E(),{selectdFiles:n}=C(l),u=I(),y=async t=>{const s=z(t);s&&l.addFiles(s.nodes)},D=async()=>{u.pushAction(async()=>{const t=await B.value.post("/zip",{paths:n.value.map(o=>o.fullpath)},{responseType:"blob"}),s=window.URL.createObjectURL(new Blob([t.data])),a=document.createElement("a");a.href=s,a.setAttribute("download",`iib_${new Date().toLocaleString()}.zip`),document.body.appendChild(a),a.click()})},g=t=>{n.value.splice(t,1)};return(t,s)=>{const a=$;return i(),_("div",{class:"container",ref_key:"stackViewEl",ref:w,onDrop:y},[f("div",T,[c(a,{onClick:s[0]||(s[0]=o=>e(l).selectdFiles=[])},{default:r(()=>[h(d(t.$t("clear")),1)]),_:1}),c(a,{onClick:D,type:"primary",loading:!e(u).isIdle},{default:r(()=>[h(d(t.$t("zipDownload")),1)]),_:1},8,["loading"])]),e(n).length?(i(),F(e(L),{key:1,ref:"scroller",class:"file-list",items:e(n).slice(),"item-size":e(p).first,"key-field":"fullpath","item-secondary-size":e(p).second,gridItems:e(k)},{default:r(({item:o,index:m})=>[c(A,{idx:m,file:o,"cell-width":e(b),"enable-close-icon":"",onCloseIconClick:j=>g(m),"full-screen-preview-image-url":e(x)(o),"enable-right-click-menu":!1},null,8,["idx","file","cell-width","onCloseIconClick","full-screen-preview-image-url"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):(i(),_("div",N,[f("p",U,d(t.$t("batchDownloaDDragAndDropHint")),1)]))],544)}}});const G=R(H,[["__scopeId","data-v-aab31da2"]]);export{G as default}; diff --git a/vue/dist/assets/db-4c0a2bd4.js b/vue/dist/assets/db-7a344507.js similarity index 92% rename from vue/dist/assets/db-4c0a2bd4.js rename to vue/dist/assets/db-7a344507.js index 13af095..97c05d2 100644 --- a/vue/dist/assets/db-4c0a2bd4.js +++ b/vue/dist/assets/db-7a344507.js @@ -1 +1 @@ -import{c4 as t}from"./index-342b69b7.js";const n=async()=>(await t.value.get("/db/basic_info")).data,c=async()=>(await t.value.get("/db/expired_dirs")).data,d=async()=>{await t.value.post("/db/update_image_data",{},{timeout:1/0})},g=async(a,s)=>(await t.value.post("/db/match_images_by_tags",{...a,cursor:s})).data,u=async a=>(await t.value.post("/db/add_custom_tag",a)).data,p=async a=>(await t.value.post("/db/toggle_custom_tag_to_img",a)).data,i=async a=>{await t.value.post("/db/remove_custom_tag",a)},m=async(a,s)=>(await t.value.get("/db/search_by_substr",{params:{substr:a,cursor:s}})).data,e="/db/extra_paths",_=async a=>{await t.value.post(e,a)},b=async a=>{await t.value.delete(e,{data:a})},y=async a=>(await t.value.post("/db/get_image_tags",{paths:a})).data;export{_ as a,n as b,c,u as d,i as e,m as f,g,y as h,b as r,p as t,d as u}; +import{c4 as t}from"./index-066a7869.js";const n=async()=>(await t.value.get("/db/basic_info")).data,c=async()=>(await t.value.get("/db/expired_dirs")).data,d=async()=>{await t.value.post("/db/update_image_data",{},{timeout:1/0})},g=async(a,s)=>(await t.value.post("/db/match_images_by_tags",{...a,cursor:s})).data,u=async a=>(await t.value.post("/db/add_custom_tag",a)).data,p=async a=>(await t.value.post("/db/toggle_custom_tag_to_img",a)).data,i=async a=>{await t.value.post("/db/remove_custom_tag",a)},m=async(a,s)=>(await t.value.get("/db/search_by_substr",{params:{substr:a,cursor:s}})).data,e="/db/extra_paths",_=async a=>{await t.value.post(e,a)},b=async a=>{await t.value.delete(e,{data:a})},y=async a=>(await t.value.post("/db/get_image_tags",{paths:a})).data;export{_ as a,n as b,c,u as d,i as e,m as f,g,y as h,b as r,p as t,d as u}; diff --git a/vue/dist/assets/emptyStartup-a333b1c3.js b/vue/dist/assets/emptyStartup-56f578ff.js similarity index 98% rename from vue/dist/assets/emptyStartup-a333b1c3.js rename to vue/dist/assets/emptyStartup-56f578ff.js index 73bdf8f..2fbedf9 100644 --- a/vue/dist/assets/emptyStartup-a333b1c3.js +++ b/vue/dist/assets/emptyStartup-56f578ff.js @@ -1 +1 @@ -import{Y as ge,Z as _e,d as ue,u as be,$ as D,g as N,a0 as ye,h as x,c as m,a1 as ke,a2 as we,a3 as Ce,a4 as Oe,a5 as xe,a6 as $e,a as te,a7 as Ie,P as I,a8 as Se,a9 as Pe,aa as ze,ab as Ae,ac as Ee,ad as Me,ae as De,af as Te,ag as de,ah as Fe,R as Q,ai as f,aj as Le,U as Ne,ak as He,al as X,am as V,k as je,an as Be,ao as ne,o as p,y as h,p as n,v as i,r as c,C as _,m as H,n as S,q as w,ap as ae,x as M,z as j,A as B,aq as se,ar as Ve,as as Re,V as qe,at as Ge,au as Ue,X as We}from"./index-342b69b7.js";import{a as Qe,r as Xe}from"./db-4c0a2bd4.js";var Ye={success:Se,info:Pe,error:ze,warning:Ae},Ze={success:Ee,info:Me,error:De,warning:Te},Je=_e("success","info","warning","error"),Ke=function(){return{type:I.oneOf(Je),closable:{type:Boolean,default:void 0},closeText:I.any,message:I.any,description:I.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:I.any,closeIcon:I.any,onClose:Function}},et=ue({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:Ke(),setup:function(t,e){var l=e.slots,r=e.emit,b=e.attrs,P=e.expose,z=be("alert",t),q=z.prefixCls,G=z.direction,C=D(!1),a=D(!1),u=D(),$=function(d){d.preventDefault();var s=u.value;s.style.height="".concat(s.offsetHeight,"px"),s.style.height="".concat(s.offsetHeight,"px"),C.value=!0,r("close",d)},g=function(){var d;C.value=!1,a.value=!0,(d=t.afterClose)===null||d===void 0||d.call(t)};P({animationEnd:g});var O=D({});return function(){var y,d,s=t.banner,k=t.closeIcon,J=k===void 0?(y=l.closeIcon)===null||y===void 0?void 0:y.call(l):k,U=t.closable,A=t.type,E=t.showIcon,W=N(l,t,"closeText"),T=N(l,t,"description"),K=N(l,t,"message"),F=N(l,t,"icon");E=s&&E===void 0?!0:E,A=s&&A===void 0?"warning":A||"info";var pe=(T?Ze:Ye)[A]||null;W&&(U=!0);var v=q.value,me=ye(v,(d={},x(d,"".concat(v,"-").concat(A),!0),x(d,"".concat(v,"-closing"),C.value),x(d,"".concat(v,"-with-description"),!!T),x(d,"".concat(v,"-no-icon"),!E),x(d,"".concat(v,"-banner"),!!s),x(d,"".concat(v,"-closable"),U),x(d,"".concat(v,"-rtl"),G.value==="rtl"),d)),ve=U?m("button",{type:"button",onClick:$,class:"".concat(v,"-close-icon"),tabindex:0},[W?m("span",{class:"".concat(v,"-close-text")},[W]):J===void 0?m(ke,null,null):J]):null,he=F&&(we(F)?Ce(F,{class:"".concat(v,"-icon")}):m("span",{class:"".concat(v,"-icon")},[F]))||m(pe,{class:"".concat(v,"-icon")},null),fe=Oe("".concat(v,"-motion"),{appear:!1,css:!0,onAfterLeave:g,onBeforeLeave:function(L){L.style.maxHeight="".concat(L.offsetHeight,"px")},onLeave:function(L){L.style.maxHeight="0px"}});return a.value?null:m(Ie,fe,{default:function(){return[xe(m("div",te(te({role:"alert"},b),{},{style:[b.style,O.value],class:[b.class,me],"data-show":!C.value,ref:u}),[E?he:null,m("div",{class:"".concat(v,"-content")},[K?m("div",{class:"".concat(v,"-message")},[K]):null,T?m("div",{class:"".concat(v,"-description")},[T]):null]),ve]),[[$e,!C.value]])]}})}}});const tt=ge(et);var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm376 116c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216zm107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5zM761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9a7.92 7.92 0 00-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3.1-12.7-6.4-12.7zM440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"file-done",theme:"outlined"};const at=nt;function oe(o){for(var t=1;t{let t;if({}.TAURI_ARCH){const e=await Fe({directory:!0});if(typeof e=="string")t=e;else return}else t=await new Promise(e=>{const l=D("");Q.confirm({title:f("inputTargetFolderPath"),content:()=>Le(Ne,{value:l.value,"onUpdate:value":r=>l.value=r}),async onOk(){const r=l.value;(await He([r]))[r]?e(l.value):X.error(f("pathDoesNotExist"))}})});Q.confirm({content:f("confirmToAddToExtraPath"),async onOk(){await Qe({type:o,path:t}),X.success(f("addCompleted")),V.emit("searchIndexExpired"),V.emit("updateGlobalSetting")}})},re=(o,t)=>{Q.confirm({content:f("confirmDelete"),closable:!0,async onOk(){await Xe({type:t,path:o}),X.success(f("removeCompleted")),V.emit("searchIndexExpired"),V.emit("updateGlobalSetting")}})},R=o=>(Ge("data-v-7cef9bff"),o=o(),Ue(),o),rt={class:"container"},ut={class:"header"},dt={key:0,style:{"margin-left":"16px","font-size":"1.5em"}},pt=R(()=>n("div",{"flex-placeholder":""},null,-1)),mt=R(()=>n("a",{href:"https://github.com/zanllp/sd-webui-infinite-image-browsing",target:"_blank",class:"last-record"},"Github",-1)),vt={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/blob/main/.env.example",target:"_blank",class:"last-record"},ht={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/wiki/Change-log",target:"_blank",class:"last-record"},ft={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90",target:"_blank",class:"last-record"},gt={class:"access-mode-message"},_t=R(()=>n("div",{"flex-placeholder":""},null,-1)),bt={class:"access-mode-message"},yt=R(()=>n("div",{"flex-placeholder":""},null,-1)),kt={class:"content"},wt={key:0,class:"feature-item"},Ct={class:"text line-clamp-1"},Ot=["onClick"],xt={class:"text line-clamp-2"},$t={key:1,class:"feature-item"},It={class:"text line-clamp-1"},St=["onClick"],Pt={class:"text line-clamp-2"},zt={class:"feature-item"},At=["onClick"],Et={class:"text line-clamp-1"},Mt={class:"text line-clamp-1"},Dt={class:"text line-clamp-1"},Tt={class:"text line-clamp-1"},Ft={key:2,class:"feature-item recent"},Lt={class:"title"},Nt=["onClick"],Ht={class:"text line-clamp-1"},jt=ue({__name:"emptyStartup",props:{tabIdx:{},paneIdx:{}},setup(o){const t=o,e=je(),l=Be(),r={local:f("local"),"tag-search":f("imgSearch"),"fuzzy-search":f("fuzzy-search"),"global-setting":f("globalSettings"),"batch-download":f("batchDownload")+" / "+f("archive")},b=(a,u,$=!1)=>{let g;switch(a){case"tag-search-matched-image-grid":case"img-sli":return;case"global-setting":case"tag-search":case"batch-download":case"fuzzy-search":case"empty":g={type:a,name:r[a],key:Date.now()+se()};break;case"local":g={type:a,name:r[a],key:Date.now()+se(),path:u,walkModePath:$?u:void 0}}const O=e.tabList[t.tabIdx];O.panes.splice(t.paneIdx,1,g),O.key=g.key},P=ne(()=>{var a;return(a=e.tabListHistoryRecord)==null?void 0:a[1]}),z=ne(()=>e.quickMovePaths.filter(({key:a,type:u})=>a==="outdir_txt2img_samples"||a==="outdir_img2img_samples"||a==="outdir_txt2img_grids"||a==="outdir_img2img_grids"||u==="walk")),q=window.parent!==window,G=()=>window.parent.open("/infinite_image_browsing"+(window.parent.location.href.includes("theme=dark")?"?__theme=dark":"")),C=()=>{Ve(P.value),e.tabList=Re(P.value.tabs)};return(a,u)=>{var O,y,d;const $=tt,g=qe;return p(),h("div",rt,[n("div",ut,[n("h1",null,i(a.$t("welcome")),1),(O=c(e).conf)!=null&&O.enable_access_control&&c(e).dontShowAgain?(p(),h("div",dt,[m(c(ie),{title:"Access Control mode",style:{"vertical-align":"text-bottom"}})])):_("",!0),pt,mt,n("a",vt,i(a.$t("privacyAndSecurity")),1),n("a",ht,i(a.$t("changlog")),1),n("a",ft,i(a.$t("faq")),1)]),(y=c(e).conf)!=null&&y.enable_access_control&&!c(e).dontShowAgain?(p(),H($,{key:0,"show-icon":""},{message:S(()=>[n("div",gt,[n("div",null,i(a.$t("accessControlModeTips")),1),_t,n("a",{onClick:u[0]||(u[0]=w(s=>c(e).dontShowAgain=!0,["prevent"]))},i(a.$t("dontShowAgain")),1)])]),icon:S(()=>[m(c(ie))]),_:1})):_("",!0),c(e).dontShowAgainNewImgOpts?_("",!0):(p(),H($,{key:1,"show-icon":""},{message:S(()=>[n("div",bt,[n("div",null,i(a.$t("majorUpdateCustomCellSizeTips")),1),yt,n("a",{onClick:u[1]||(u[1]=w(s=>c(e).dontShowAgainNewImgOpts=!0,["prevent"]))},i(a.$t("dontShowAgain")),1)])]),_:1})),n("div",kt,[z.value.length?(p(),h("div",wt,[n("h2",null,i(a.$t("walkMode")),1),n("ul",null,[n("li",{onClick:u[2]||(u[2]=s=>c(ce)("walk")),class:"item",style:{"text-align":""}},[n("span",Ct,[m(c(ae)),M(" "+i(a.$t("add")),1)])]),(p(!0),h(j,null,B(z.value,s=>(p(),h("li",{key:s.key,class:"item rem",onClick:w(k=>b("local",s.dir,!0),["prevent"])},[n("span",xt,i(s.zh),1),s.can_delete?(p(),H(g,{key:0,type:"link",onClick:w(k=>c(re)(s.dir,"walk"),["stop"])},{default:S(()=>[M(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):_("",!0)],8,Ot))),128))])])):_("",!0),c(e).quickMovePaths.length?(p(),h("div",$t,[n("h2",null,i(a.$t("launchFromQuickMove")),1),n("ul",null,[n("li",{onClick:u[3]||(u[3]=s=>c(ce)("scanned")),class:"item",style:{"text-align":""}},[n("span",It,[m(c(ae)),M(" "+i(a.$t("add")),1)])]),(p(!0),h(j,null,B(c(e).quickMovePaths.filter(s=>s.type!=="walk"),s=>(p(),h("li",{key:s.key,class:"item rem",onClick:w(k=>b("local",s.dir),["prevent"])},[n("span",Pt,i(s.zh),1),s.can_delete&&s.type=="scanned"?(p(),H(g,{key:0,type:"link",onClick:w(k=>c(re)(s.dir,"scanned"),["stop"])},{default:S(()=>[M(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):_("",!0)],8,St))),128))])])):_("",!0),n("div",zt,[n("h2",null,i(a.$t("launch")),1),n("ul",null,[(p(!0),h(j,null,B(Object.keys(r),s=>(p(),h("li",{key:s,class:"item",onClick:w(k=>b(s),["prevent"])},[n("span",Et,i(r[s]),1)],8,At))),128)),n("li",{class:"item",onClick:u[4]||(u[4]=s=>c(l).opened=!0)},[n("span",Mt,i(a.$t("imgCompare")),1)]),q?(p(),h("li",{key:0,class:"item",onClick:G},[n("span",Dt,i(a.$t("openInNewWindow")),1)])):_("",!0),(d=P.value)!=null&&d.tabs.length?(p(),h("li",{key:1,class:"item",onClick:C},[n("span",Tt,i(a.$t("restoreLastRecord")),1)])):_("",!0)])]),c(e).recent.length?(p(),h("div",Ft,[n("div",Lt,[n("h2",null,i(a.$t("recent")),1),m(g,{onClick:u[5]||(u[5]=s=>c(e).recent=[]),type:"link"},{default:S(()=>[M(i(a.$t("clear")),1)]),_:1})]),n("ul",null,[(p(!0),h(j,null,B(c(e).recent,s=>(p(),h("li",{key:s.key,class:"item",onClick:w(k=>b("local",s.path),["prevent"])},[m(c(ot),{class:"icon"}),n("span",Ht,i(s.path),1)],8,Nt))),128))])])):_("",!0)])])}}});const Rt=We(jt,[["__scopeId","data-v-7cef9bff"]]);export{Rt as default}; +import{Y as ge,Z as _e,d as ue,u as be,$ as D,g as N,a0 as ye,h as x,c as m,a1 as ke,a2 as we,a3 as Ce,a4 as Oe,a5 as xe,a6 as $e,a as te,a7 as Ie,P as I,a8 as Se,a9 as Pe,aa as ze,ab as Ae,ac as Ee,ad as Me,ae as De,af as Te,ag as de,ah as Fe,R as Q,ai as f,aj as Le,U as Ne,ak as He,al as X,am as V,k as je,an as Be,ao as ne,o as p,y as h,p as n,v as i,r as c,C as _,m as H,n as S,q as w,ap as ae,x as M,z as j,A as B,aq as se,ar as Ve,as as Re,V as qe,at as Ge,au as Ue,X as We}from"./index-066a7869.js";import{a as Qe,r as Xe}from"./db-7a344507.js";var Ye={success:Se,info:Pe,error:ze,warning:Ae},Ze={success:Ee,info:Me,error:De,warning:Te},Je=_e("success","info","warning","error"),Ke=function(){return{type:I.oneOf(Je),closable:{type:Boolean,default:void 0},closeText:I.any,message:I.any,description:I.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:I.any,closeIcon:I.any,onClose:Function}},et=ue({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:Ke(),setup:function(t,e){var l=e.slots,r=e.emit,b=e.attrs,P=e.expose,z=be("alert",t),q=z.prefixCls,G=z.direction,C=D(!1),a=D(!1),u=D(),$=function(d){d.preventDefault();var s=u.value;s.style.height="".concat(s.offsetHeight,"px"),s.style.height="".concat(s.offsetHeight,"px"),C.value=!0,r("close",d)},g=function(){var d;C.value=!1,a.value=!0,(d=t.afterClose)===null||d===void 0||d.call(t)};P({animationEnd:g});var O=D({});return function(){var y,d,s=t.banner,k=t.closeIcon,J=k===void 0?(y=l.closeIcon)===null||y===void 0?void 0:y.call(l):k,U=t.closable,A=t.type,E=t.showIcon,W=N(l,t,"closeText"),T=N(l,t,"description"),K=N(l,t,"message"),F=N(l,t,"icon");E=s&&E===void 0?!0:E,A=s&&A===void 0?"warning":A||"info";var pe=(T?Ze:Ye)[A]||null;W&&(U=!0);var v=q.value,me=ye(v,(d={},x(d,"".concat(v,"-").concat(A),!0),x(d,"".concat(v,"-closing"),C.value),x(d,"".concat(v,"-with-description"),!!T),x(d,"".concat(v,"-no-icon"),!E),x(d,"".concat(v,"-banner"),!!s),x(d,"".concat(v,"-closable"),U),x(d,"".concat(v,"-rtl"),G.value==="rtl"),d)),ve=U?m("button",{type:"button",onClick:$,class:"".concat(v,"-close-icon"),tabindex:0},[W?m("span",{class:"".concat(v,"-close-text")},[W]):J===void 0?m(ke,null,null):J]):null,he=F&&(we(F)?Ce(F,{class:"".concat(v,"-icon")}):m("span",{class:"".concat(v,"-icon")},[F]))||m(pe,{class:"".concat(v,"-icon")},null),fe=Oe("".concat(v,"-motion"),{appear:!1,css:!0,onAfterLeave:g,onBeforeLeave:function(L){L.style.maxHeight="".concat(L.offsetHeight,"px")},onLeave:function(L){L.style.maxHeight="0px"}});return a.value?null:m(Ie,fe,{default:function(){return[xe(m("div",te(te({role:"alert"},b),{},{style:[b.style,O.value],class:[b.class,me],"data-show":!C.value,ref:u}),[E?he:null,m("div",{class:"".concat(v,"-content")},[K?m("div",{class:"".concat(v,"-message")},[K]):null,T?m("div",{class:"".concat(v,"-description")},[T]):null]),ve]),[[$e,!C.value]])]}})}}});const tt=ge(et);var nt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 312v-48c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8zm-392 88c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H296zm376 116c-119.3 0-216 96.7-216 216s96.7 216 216 216 216-96.7 216-216-96.7-216-216-216zm107.5 323.5C750.8 868.2 712.6 884 672 884s-78.8-15.8-107.5-44.5C535.8 810.8 520 772.6 520 732s15.8-78.8 44.5-107.5C593.2 595.8 631.4 580 672 580s78.8 15.8 107.5 44.5C808.2 653.2 824 691.4 824 732s-15.8 78.8-44.5 107.5zM761 656h-44.3c-2.6 0-5 1.2-6.5 3.3l-63.5 87.8-23.1-31.9a7.92 7.92 0 00-6.5-3.3H573c-6.5 0-10.3 7.4-6.5 12.7l73.8 102.1c3.2 4.4 9.7 4.4 12.9 0l114.2-158c3.9-5.3.1-12.7-6.4-12.7zM440 852H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h272c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"file-done",theme:"outlined"};const at=nt;function oe(o){for(var t=1;t{let t;if({}.TAURI_ARCH){const e=await Fe({directory:!0});if(typeof e=="string")t=e;else return}else t=await new Promise(e=>{const l=D("");Q.confirm({title:f("inputTargetFolderPath"),content:()=>Le(Ne,{value:l.value,"onUpdate:value":r=>l.value=r}),async onOk(){const r=l.value;(await He([r]))[r]?e(l.value):X.error(f("pathDoesNotExist"))}})});Q.confirm({content:f("confirmToAddToExtraPath"),async onOk(){await Qe({type:o,path:t}),X.success(f("addCompleted")),V.emit("searchIndexExpired"),V.emit("updateGlobalSetting")}})},re=(o,t)=>{Q.confirm({content:f("confirmDelete"),closable:!0,async onOk(){await Xe({type:t,path:o}),X.success(f("removeCompleted")),V.emit("searchIndexExpired"),V.emit("updateGlobalSetting")}})},R=o=>(Ge("data-v-7cef9bff"),o=o(),Ue(),o),rt={class:"container"},ut={class:"header"},dt={key:0,style:{"margin-left":"16px","font-size":"1.5em"}},pt=R(()=>n("div",{"flex-placeholder":""},null,-1)),mt=R(()=>n("a",{href:"https://github.com/zanllp/sd-webui-infinite-image-browsing",target:"_blank",class:"last-record"},"Github",-1)),vt={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/blob/main/.env.example",target:"_blank",class:"last-record"},ht={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/wiki/Change-log",target:"_blank",class:"last-record"},ft={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90",target:"_blank",class:"last-record"},gt={class:"access-mode-message"},_t=R(()=>n("div",{"flex-placeholder":""},null,-1)),bt={class:"access-mode-message"},yt=R(()=>n("div",{"flex-placeholder":""},null,-1)),kt={class:"content"},wt={key:0,class:"feature-item"},Ct={class:"text line-clamp-1"},Ot=["onClick"],xt={class:"text line-clamp-2"},$t={key:1,class:"feature-item"},It={class:"text line-clamp-1"},St=["onClick"],Pt={class:"text line-clamp-2"},zt={class:"feature-item"},At=["onClick"],Et={class:"text line-clamp-1"},Mt={class:"text line-clamp-1"},Dt={class:"text line-clamp-1"},Tt={class:"text line-clamp-1"},Ft={key:2,class:"feature-item recent"},Lt={class:"title"},Nt=["onClick"],Ht={class:"text line-clamp-1"},jt=ue({__name:"emptyStartup",props:{tabIdx:{},paneIdx:{}},setup(o){const t=o,e=je(),l=Be(),r={local:f("local"),"tag-search":f("imgSearch"),"fuzzy-search":f("fuzzy-search"),"global-setting":f("globalSettings"),"batch-download":f("batchDownload")+" / "+f("archive")},b=(a,u,$=!1)=>{let g;switch(a){case"tag-search-matched-image-grid":case"img-sli":return;case"global-setting":case"tag-search":case"batch-download":case"fuzzy-search":case"empty":g={type:a,name:r[a],key:Date.now()+se()};break;case"local":g={type:a,name:r[a],key:Date.now()+se(),path:u,walkModePath:$?u:void 0}}const O=e.tabList[t.tabIdx];O.panes.splice(t.paneIdx,1,g),O.key=g.key},P=ne(()=>{var a;return(a=e.tabListHistoryRecord)==null?void 0:a[1]}),z=ne(()=>e.quickMovePaths.filter(({key:a,type:u})=>a==="outdir_txt2img_samples"||a==="outdir_img2img_samples"||a==="outdir_txt2img_grids"||a==="outdir_img2img_grids"||u==="walk")),q=window.parent!==window,G=()=>window.parent.open("/infinite_image_browsing"+(window.parent.location.href.includes("theme=dark")?"?__theme=dark":"")),C=()=>{Ve(P.value),e.tabList=Re(P.value.tabs)};return(a,u)=>{var O,y,d;const $=tt,g=qe;return p(),h("div",rt,[n("div",ut,[n("h1",null,i(a.$t("welcome")),1),(O=c(e).conf)!=null&&O.enable_access_control&&c(e).dontShowAgain?(p(),h("div",dt,[m(c(ie),{title:"Access Control mode",style:{"vertical-align":"text-bottom"}})])):_("",!0),pt,mt,n("a",vt,i(a.$t("privacyAndSecurity")),1),n("a",ht,i(a.$t("changlog")),1),n("a",ft,i(a.$t("faq")),1)]),(y=c(e).conf)!=null&&y.enable_access_control&&!c(e).dontShowAgain?(p(),H($,{key:0,"show-icon":""},{message:S(()=>[n("div",gt,[n("div",null,i(a.$t("accessControlModeTips")),1),_t,n("a",{onClick:u[0]||(u[0]=w(s=>c(e).dontShowAgain=!0,["prevent"]))},i(a.$t("dontShowAgain")),1)])]),icon:S(()=>[m(c(ie))]),_:1})):_("",!0),c(e).dontShowAgainNewImgOpts?_("",!0):(p(),H($,{key:1,"show-icon":""},{message:S(()=>[n("div",bt,[n("div",null,i(a.$t("majorUpdateCustomCellSizeTips")),1),yt,n("a",{onClick:u[1]||(u[1]=w(s=>c(e).dontShowAgainNewImgOpts=!0,["prevent"]))},i(a.$t("dontShowAgain")),1)])]),_:1})),n("div",kt,[z.value.length?(p(),h("div",wt,[n("h2",null,i(a.$t("walkMode")),1),n("ul",null,[n("li",{onClick:u[2]||(u[2]=s=>c(ce)("walk")),class:"item",style:{"text-align":""}},[n("span",Ct,[m(c(ae)),M(" "+i(a.$t("add")),1)])]),(p(!0),h(j,null,B(z.value,s=>(p(),h("li",{key:s.key,class:"item rem",onClick:w(k=>b("local",s.dir,!0),["prevent"])},[n("span",xt,i(s.zh),1),s.can_delete?(p(),H(g,{key:0,type:"link",onClick:w(k=>c(re)(s.dir,"walk"),["stop"])},{default:S(()=>[M(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):_("",!0)],8,Ot))),128))])])):_("",!0),c(e).quickMovePaths.length?(p(),h("div",$t,[n("h2",null,i(a.$t("launchFromQuickMove")),1),n("ul",null,[n("li",{onClick:u[3]||(u[3]=s=>c(ce)("scanned")),class:"item",style:{"text-align":""}},[n("span",It,[m(c(ae)),M(" "+i(a.$t("add")),1)])]),(p(!0),h(j,null,B(c(e).quickMovePaths.filter(s=>s.type!=="walk"),s=>(p(),h("li",{key:s.key,class:"item rem",onClick:w(k=>b("local",s.dir),["prevent"])},[n("span",Pt,i(s.zh),1),s.can_delete&&s.type=="scanned"?(p(),H(g,{key:0,type:"link",onClick:w(k=>c(re)(s.dir,"scanned"),["stop"])},{default:S(()=>[M(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):_("",!0)],8,St))),128))])])):_("",!0),n("div",zt,[n("h2",null,i(a.$t("launch")),1),n("ul",null,[(p(!0),h(j,null,B(Object.keys(r),s=>(p(),h("li",{key:s,class:"item",onClick:w(k=>b(s),["prevent"])},[n("span",Et,i(r[s]),1)],8,At))),128)),n("li",{class:"item",onClick:u[4]||(u[4]=s=>c(l).opened=!0)},[n("span",Mt,i(a.$t("imgCompare")),1)]),q?(p(),h("li",{key:0,class:"item",onClick:G},[n("span",Dt,i(a.$t("openInNewWindow")),1)])):_("",!0),(d=P.value)!=null&&d.tabs.length?(p(),h("li",{key:1,class:"item",onClick:C},[n("span",Tt,i(a.$t("restoreLastRecord")),1)])):_("",!0)])]),c(e).recent.length?(p(),h("div",Ft,[n("div",Lt,[n("h2",null,i(a.$t("recent")),1),m(g,{onClick:u[5]||(u[5]=s=>c(e).recent=[]),type:"link"},{default:S(()=>[M(i(a.$t("clear")),1)]),_:1})]),n("ul",null,[(p(!0),h(j,null,B(c(e).recent,s=>(p(),h("li",{key:s.key,class:"item",onClick:w(k=>b("local",s.path),["prevent"])},[m(c(ot),{class:"icon"}),n("span",Ht,i(s.path),1)],8,Nt))),128))])])):_("",!0)])])}}});const Rt=We(jt,[["__scopeId","data-v-7cef9bff"]]);export{Rt as default}; diff --git a/vue/dist/assets/fullScreenContextMenu-ce458082.js b/vue/dist/assets/fullScreenContextMenu-2de1a5a3.js similarity index 99% rename from vue/dist/assets/fullScreenContextMenu-ce458082.js rename to vue/dist/assets/fullScreenContextMenu-2de1a5a3.js index 0067541..c68f7bf 100644 --- a/vue/dist/assets/fullScreenContextMenu-ce458082.js +++ b/vue/dist/assets/fullScreenContextMenu-2de1a5a3.js @@ -1,2 +1,2 @@ -import{d as fe,bq as he,aI as ye,bW as be,ax as we,aC as X,bX as Oe,bY as K,e as R,c as o,_ as _e,h as C,a as ee,bz as Ee,P as te,ag as j,aw as Le,aM as $e,l as ve,k as Se,$ as T,ao as U,bO as xe,bZ as Pe,b_ as Ce,ai as A,o as h,y as b,p as N,r as u,m as I,n as p,L as ne,b$ as Me,C as M,z as B,x as y,v as g,t as ie,A as V,N as ae,B as ke,q as De,V as re,W as ze,c0 as Ae,M as Ne,X as je}from"./index-342b69b7.js";import{i as Te,j as We,_ as Ie,D as Be}from"./FileItem-51205eb2.js";import"./shortcut-42287857.js";var Fe=["class","style"],Ue=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:te.any,delay:Number,indicator:te.any}},F=null;function Ve(t,e){return!!t&&!!e&&!isNaN(Number(e))}function kt(t){var e=t.indicator;F=typeof e=="function"?e:function(){return o(e,null,null)}}const Dt=fe({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:he(Ue(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:ye("configProvider",be)}},data:function(){var e=this.spinning,i=this.delay,n=Ve(e,i);return{sSpinning:e&&!n}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;we(function(){e.debouncifyUpdateSpinning(),e.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var i=e||this.$props,n=i.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=X(this.originalUpdateSpinning,n))},updateSpinning:function(){var e=this.spinning,i=this.sSpinning;i!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var i="".concat(e,"-dot"),n=Oe(this,"indicator");return n===null?null:(Array.isArray(n)&&(n=n.length===1?n[0]:n),K(n)?R(n,{class:i}):F&&K(F())?R(F(),{class:i}):o("span",{class:"".concat(i," ").concat(e,"-dot-spin")},[o("i",{class:"".concat(e,"-dot-item")},null),o("i",{class:"".concat(e,"-dot-item")},null),o("i",{class:"".concat(e,"-dot-item")},null),o("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,i,n,l=this.$props,w=l.size,_=l.prefixCls,$=l.tip,S=$===void 0?(e=(i=this.$slots).tip)===null||e===void 0?void 0:e.call(i):$,E=l.wrapperClassName,x=this.$attrs,P=x.class,k=x.style,O=_e(x,Fe),s=this.configProvider,D=s.getPrefixCls,L=s.direction,m=D("spin",_),r=this.sSpinning,a=(n={},C(n,m,!0),C(n,"".concat(m,"-sm"),w==="small"),C(n,"".concat(m,"-lg"),w==="large"),C(n,"".concat(m,"-spinning"),r),C(n,"".concat(m,"-show-text"),!!S),C(n,"".concat(m,"-rtl"),L==="rtl"),C(n,P,!!P),n),f=o("div",ee(ee({},O),{},{style:k,class:a}),[this.renderIndicator(m),S?o("div",{class:"".concat(m,"-text")},[S]):null]),c=Ee(this);if(c&&c.length){var d,z=(d={},C(d,"".concat(m,"-container"),!0),C(d,"".concat(m,"-blur"),r),d);return o("div",{class:["".concat(m,"-nested-loading"),E]},[r&&o("div",{key:"loading"},[f]),o("div",{class:z,key:"container"},[c])])}return f}});var Xe={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 Ye=Xe;function le(t){for(var e=1;e{a.stopPropagation(),a.preventDefault(),!(!t.value||!e.value)&&(w=a instanceof MouseEvent?a.clientX:a.touches[0].clientX,_=a instanceof MouseEvent?a.clientY:a.touches[0].clientY,$=t.value.offsetWidth,S=t.value.offsetHeight,l.x=e.value.offsetLeft,l.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",O),document.documentElement.addEventListener("touchmove",O),document.documentElement.addEventListener("mouseup",s),document.documentElement.addEventListener("touchend",s))},O=a=>{if(!t.value||!e.value)return;let f=$+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-w),c=S+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-_),d=l.x+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-w),z=l.y+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-_);d+e.value.offsetWidth>window.innerWidth&&(d=window.innerWidth-e.value.offsetWidth),t.value.offsetLeft+f>window.innerWidth&&(f=window.innerWidth-t.value.offsetLeft),z+e.value.offsetHeight>window.innerHeight&&(z=window.innerHeight-e.value.offsetHeight),t.value.offsetTop+c>window.innerHeight&&(c=window.innerHeight-t.value.offsetTop),t.value.style.width=`${f}px`,t.value.style.height=`${c}px`,e.value.style.left=`${d}px`,e.value.style.top=`${z}px`,n!=null&&n.onResize&&n.onResize(f,c)},s=()=>{document.documentElement.removeEventListener("mousemove",O),document.documentElement.removeEventListener("touchmove",O),document.documentElement.removeEventListener("mouseup",s),document.documentElement.removeEventListener("touchend",s)},D=a=>{a.stopPropagation(),a.preventDefault(),!(!t.value||!i.value)&&(P=!0,E=t.value.offsetLeft,x=t.value.offsetTop,w=a instanceof MouseEvent?a.clientX:a.touches[0].clientX,_=a instanceof MouseEvent?a.clientY:a.touches[0].clientY,document.documentElement.addEventListener("mousemove",L),document.documentElement.addEventListener("touchmove",L),document.documentElement.addEventListener("mouseup",m),document.documentElement.addEventListener("touchend",m))},L=a=>{if(!t.value||!i.value||!P)return;const f=E+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-w),c=x+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-_);f<0?t.value.style.left="0px":f+t.value.offsetWidth>window.innerWidth?t.value.style.left=`${window.innerWidth-t.value.offsetWidth}px`:t.value.style.left=`${f}px`,c<0?t.value.style.top="0px":c+t.value.offsetHeight>window.innerHeight?t.value.style.top=`${window.innerHeight-t.value.offsetHeight}px`:t.value.style.top=`${c}px`,n!=null&&n.onDrag&&n.onDrag(f,c)},m=()=>{P=!1,document.documentElement.removeEventListener("mousemove",L),document.documentElement.removeEventListener("touchmove",L),document.documentElement.removeEventListener("mouseup",m),document.documentElement.removeEventListener("touchend",m)},r=()=>{if(!t.value||!e.value)return;let a=t.value.offsetLeft,f=t.value.offsetTop,c=t.value.offsetWidth,d=t.value.offsetHeight;a+c>window.innerWidth&&(a=window.innerWidth-c,a<0&&(a=0,c=window.innerWidth)),f+d>window.innerHeight&&(f=window.innerHeight-d,f<0&&(f=0,d=window.innerHeight)),t.value.style.left=`${a}px`,t.value.style.top=`${f}px`,t.value.style.width=`${c}px`,t.value.style.height=`${d}px`};return Le(()=>{!t.value||!n||(typeof n.width=="number"&&(t.value.style.width=`${n.width}px`),typeof n.height=="number"&&(t.value.style.height=`${n.height}px`),typeof n.left=="number"&&(t.value.style.left=`${n.left}px`),typeof n.top=="number"&&(t.value.style.top=`${n.top}px`),r(),window.addEventListener("resize",r))}),$e(()=>{document.documentElement.removeEventListener("mousemove",O),document.documentElement.removeEventListener("touchmove",O),document.documentElement.removeEventListener("mouseup",s),document.documentElement.removeEventListener("touchend",s),document.documentElement.removeEventListener("mousemove",L),document.documentElement.removeEventListener("touchmove",L),document.documentElement.removeEventListener("mouseup",m),document.documentElement.removeEventListener("touchend",m),window.removeEventListener("resize",r)}),ve(()=>[t.value,e.value,i.value],([a,f,c])=>{a&&f&&(f.addEventListener("mousedown",k),f.addEventListener("touchstart",k)),a&&c&&(c.addEventListener("mousedown",D),c.addEventListener("touchstart",D))}),{handleResizeMouseDown:k,handleDragMouseDown:D}}const vt={class:"container"},pt={class:"action-bar"},mt=["title"],gt=["title"],ht={key:0,class:"icon",style:{cursor:"pointer"}},yt={key:0,"flex-placeholder":""},bt={key:1,class:"action-bar"},wt={key:0,class:"gen-info"},Ot={class:"info-tags"},_t={class:"name"},Et={class:"value"},Lt={key:0,class:"tags-container"},$t=["onClick"],St=["title"],xt=fe({__name:"fullScreenContextMenu",props:{file:{},idx:{}},emits:["contextMenuClick"],setup(t,{emit:e}){const i=t,n=Se(),l=Te(),w=T(),_=U(()=>l.tagMap.get(i.file.fullpath)??[]),$=T(""),S=xe(),E=T(""),x=U(()=>E.value.split(` -`));ve(()=>{var r;return(r=i==null?void 0:i.file)==null?void 0:r.fullpath},async r=>{r&&(S.tasks.forEach(a=>a.cancel()),S.pushAction(()=>Pe(r)).res.then(a=>{E.value=a}))},{immediate:!0});const P=T(),k=T(),O={left:100,top:100,width:512,height:384,expanded:!0},s=Ce("fullScreenContextMenu.vue-drag",O);s.value&&(s.value.left<0||s.value.top<0)&&(s.value={...O}),ft(w,P,k,{...s.value,onDrag:X(function(r,a){s.value={...s.value,left:r,top:a}},300),onResize:X(function(r,a){s.value={...s.value,width:r,height:a}},300)});function D(r){return r.parentNode}We("load",r=>{const a=r.target;a.className==="ant-image-preview-img"&&($.value=`${a.naturalWidth} x ${a.naturalHeight}`)},{capture:!0});const L=U(()=>{const r=[{name:A("fileName"),val:i.file.name},{name:A("fileSize"),val:i.file.size}];return $.value&&r.push({name:A("resolution"),val:$.value}),r}),m=()=>ie(x.value[0]??"");return(r,a)=>{var J;const f=Be,c=re,d=ze,z=Ae,pe=Ne,me=re;return h(),b("div",{ref_key:"el",ref:w,class:ae(["full-screen-menu",{"unset-size":!u(s).expanded}]),onWheelCapture:a[5]||(a[5]=De(()=>{},["stop"]))},[N("div",vt,[N("div",pt,[N("div",{ref_key:"dragHandle",ref:k,class:"icon",style:{cursor:"grab"},title:u(A)("dragToMovePanel")},[o(u(Je))],8,mt),N("div",{class:"icon",style:{cursor:"pointer"},onClick:a[0]||(a[0]=v=>u(s).expanded=!u(s).expanded),title:u(A)("clickToToggleMaximizeMinimize")},[u(s).expanded?(h(),I(u(tt),{key:0})):(h(),I(u(rt),{key:1}))],8,gt),o(f,{"get-popup-container":D},{overlay:p(()=>[o(Ie,{file:r.file,idx:r.idx,"selected-tag":_.value,"disable-delete":u(ne)(r.file)===u(n).fullscreenPreviewInitialUrl,onContextMenuClick:a[1]||(a[1]=(v,W,ge)=>e("contextMenuClick",v,W,ge))},null,8,["file","idx","selected-tag","disable-delete"])]),default:p(()=>[u(s).expanded?M("",!0):(h(),b("div",ht,[o(u(Me))]))]),_:1}),u(s).expanded?(h(),b("div",yt)):M("",!0),u(s).expanded?(h(),b("div",bt,[o(f,{trigger:["hover"],"get-popup-container":D},{overlay:p(()=>[o(pe,{onClick:a[2]||(a[2]=v=>e("contextMenuClick",v,r.file,r.idx))},{default:p(()=>{var v;return[((v=u(n).conf)==null?void 0:v.launch_mode)!=="server"?(h(),b(B,{key:0},[o(d,{key:"send2txt2img"},{default:p(()=>[y(g(r.$t("sendToTxt2img")),1)]),_:1}),o(d,{key:"send2img2img"},{default:p(()=>[y(g(r.$t("sendToImg2img")),1)]),_:1}),o(d,{key:"send2inpaint"},{default:p(()=>[y(g(r.$t("sendToInpaint")),1)]),_:1}),o(d,{key:"send2extras"},{default:p(()=>[y(g(r.$t("sendToExtraFeatures")),1)]),_:1}),o(z,{key:"sendToThirdPartyExtension",title:r.$t("sendToThirdPartyExtension")},{default:p(()=>[o(d,{key:"send2controlnet-txt2img"},{default:p(()=>[y("ControlNet - "+g(r.$t("t2i")),1)]),_:1}),o(d,{key:"send2controlnet-img2img"},{default:p(()=>[y("ControlNet - "+g(r.$t("i2i")),1)]),_:1}),o(d,{key:"send2outpaint"},{default:p(()=>[y("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):M("",!0),o(d,{key:"send2BatchDownload"},{default:p(()=>[y(g(r.$t("sendToBatchDownload")),1)]),_:1}),o(d,{key:"send2savedDir"},{default:p(()=>[y(g(r.$t("send2savedDir")),1)]),_:1}),o(d,{key:"deleteFiles",disabled:u(ne)(r.file)===u(n).fullscreenPreviewInitialUrl},{default:p(()=>[y(g(r.$t("deleteSelected")),1)]),_:1},8,["disabled"]),o(d,{key:"previewInNewWindow"},{default:p(()=>[y(g(r.$t("previewInNewWindow")),1)]),_:1}),o(d,{key:"copyPreviewUrl"},{default:p(()=>[y(g(r.$t("copySourceFilePreviewLink")),1)]),_:1})]}),_:1})]),default:p(()=>[o(c,null,{default:p(()=>[y(g(u(A)("openContextMenu")),1)]),_:1})]),_:1}),o(me,{onClick:a[3]||(a[3]=v=>e("contextMenuClick",{key:"download"},i.file,i.idx))},{default:p(()=>[y(g(r.$t("download")),1)]),_:1}),E.value?(h(),I(c,{key:0,onClick:a[4]||(a[4]=v=>u(ie)(E.value))},{default:p(()=>[y(g(r.$t("copyPrompt")),1)]),_:1})):M("",!0),E.value?(h(),I(c,{key:1,onClick:m},{default:p(()=>[y(g(r.$t("copyPositivePrompt")),1)]),_:1})):M("",!0)])):M("",!0)]),u(s).expanded?(h(),b("div",wt,[N("div",Ot,[(h(!0),b(B,null,V(L.value,v=>(h(),b("span",{class:"info-tag",key:v.name},[N("span",_t,g(v.name),1),N("span",Et,g(v.val),1)]))),128))]),(J=u(n).conf)!=null&&J.all_custom_tags?(h(),b("div",Lt,[(h(!0),b(B,null,V(u(n).conf.all_custom_tags,v=>(h(),b("div",{class:ae(["tag",{selected:_.value.some(W=>W.id===v.id)}]),onClick:W=>e("contextMenuClick",{key:`toggle-tag-${v.id}`},r.file,r.idx),key:v.id,style:ke({"--tag-color":u(l).getColor(v.name)})},g(v.name),15,$t))),128))])):M("",!0),(h(!0),b(B,null,V(x.value,v=>(h(),b("p",{key:v,class:"gen-info-frag"},g(v),1))),128))])):M("",!0)]),u(s).expanded?(h(),b("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:P,title:u(A)("dragToResizePanel")},[o(u(qe))],8,St)):M("",!0)],34)}}});const Nt=je(xt,[["__scopeId","data-v-f62ccba9"]]);export{zt as L,At as R,Dt as S,Nt as f,kt as s}; +import{d as fe,bq as he,aI as ye,bW as be,ax as we,aC as X,bX as Oe,bY as K,e as R,c as o,_ as _e,h as C,a as ee,bz as Ee,P as te,ag as j,aw as Le,aM as $e,l as ve,k as Se,$ as T,ao as U,bO as xe,bZ as Pe,b_ as Ce,ai as A,o as h,y as b,p as N,r as u,m as I,n as p,L as ne,b$ as Me,C as M,z as B,x as y,v as g,t as ie,A as V,N as ae,B as ke,q as De,V as re,W as ze,c0 as Ae,M as Ne,X as je}from"./index-066a7869.js";import{i as Te,j as We,_ as Ie,D as Be}from"./FileItem-a96f33a2.js";import"./shortcut-16098eef.js";var Fe=["class","style"],Ue=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:te.any,delay:Number,indicator:te.any}},F=null;function Ve(t,e){return!!t&&!!e&&!isNaN(Number(e))}function kt(t){var e=t.indicator;F=typeof e=="function"?e:function(){return o(e,null,null)}}const Dt=fe({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:he(Ue(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:ye("configProvider",be)}},data:function(){var e=this.spinning,i=this.delay,n=Ve(e,i);return{sSpinning:e&&!n}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var e=this;we(function(){e.debouncifyUpdateSpinning(),e.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(e){var i=e||this.$props,n=i.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=X(this.originalUpdateSpinning,n))},updateSpinning:function(){var e=this.spinning,i=this.sSpinning;i!==e&&(this.sSpinning=e)},cancelExistingSpin:function(){var e=this.updateSpinning;e&&e.cancel&&e.cancel()},renderIndicator:function(e){var i="".concat(e,"-dot"),n=Oe(this,"indicator");return n===null?null:(Array.isArray(n)&&(n=n.length===1?n[0]:n),K(n)?R(n,{class:i}):F&&K(F())?R(F(),{class:i}):o("span",{class:"".concat(i," ").concat(e,"-dot-spin")},[o("i",{class:"".concat(e,"-dot-item")},null),o("i",{class:"".concat(e,"-dot-item")},null),o("i",{class:"".concat(e,"-dot-item")},null),o("i",{class:"".concat(e,"-dot-item")},null)]))}},render:function(){var e,i,n,l=this.$props,w=l.size,_=l.prefixCls,$=l.tip,S=$===void 0?(e=(i=this.$slots).tip)===null||e===void 0?void 0:e.call(i):$,E=l.wrapperClassName,x=this.$attrs,P=x.class,k=x.style,O=_e(x,Fe),s=this.configProvider,D=s.getPrefixCls,L=s.direction,m=D("spin",_),r=this.sSpinning,a=(n={},C(n,m,!0),C(n,"".concat(m,"-sm"),w==="small"),C(n,"".concat(m,"-lg"),w==="large"),C(n,"".concat(m,"-spinning"),r),C(n,"".concat(m,"-show-text"),!!S),C(n,"".concat(m,"-rtl"),L==="rtl"),C(n,P,!!P),n),f=o("div",ee(ee({},O),{},{style:k,class:a}),[this.renderIndicator(m),S?o("div",{class:"".concat(m,"-text")},[S]):null]),c=Ee(this);if(c&&c.length){var d,z=(d={},C(d,"".concat(m,"-container"),!0),C(d,"".concat(m,"-blur"),r),d);return o("div",{class:["".concat(m,"-nested-loading"),E]},[r&&o("div",{key:"loading"},[f]),o("div",{class:z,key:"container"},[c])])}return f}});var Xe={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 Ye=Xe;function le(t){for(var e=1;e{a.stopPropagation(),a.preventDefault(),!(!t.value||!e.value)&&(w=a instanceof MouseEvent?a.clientX:a.touches[0].clientX,_=a instanceof MouseEvent?a.clientY:a.touches[0].clientY,$=t.value.offsetWidth,S=t.value.offsetHeight,l.x=e.value.offsetLeft,l.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",O),document.documentElement.addEventListener("touchmove",O),document.documentElement.addEventListener("mouseup",s),document.documentElement.addEventListener("touchend",s))},O=a=>{if(!t.value||!e.value)return;let f=$+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-w),c=S+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-_),d=l.x+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-w),z=l.y+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-_);d+e.value.offsetWidth>window.innerWidth&&(d=window.innerWidth-e.value.offsetWidth),t.value.offsetLeft+f>window.innerWidth&&(f=window.innerWidth-t.value.offsetLeft),z+e.value.offsetHeight>window.innerHeight&&(z=window.innerHeight-e.value.offsetHeight),t.value.offsetTop+c>window.innerHeight&&(c=window.innerHeight-t.value.offsetTop),t.value.style.width=`${f}px`,t.value.style.height=`${c}px`,e.value.style.left=`${d}px`,e.value.style.top=`${z}px`,n!=null&&n.onResize&&n.onResize(f,c)},s=()=>{document.documentElement.removeEventListener("mousemove",O),document.documentElement.removeEventListener("touchmove",O),document.documentElement.removeEventListener("mouseup",s),document.documentElement.removeEventListener("touchend",s)},D=a=>{a.stopPropagation(),a.preventDefault(),!(!t.value||!i.value)&&(P=!0,E=t.value.offsetLeft,x=t.value.offsetTop,w=a instanceof MouseEvent?a.clientX:a.touches[0].clientX,_=a instanceof MouseEvent?a.clientY:a.touches[0].clientY,document.documentElement.addEventListener("mousemove",L),document.documentElement.addEventListener("touchmove",L),document.documentElement.addEventListener("mouseup",m),document.documentElement.addEventListener("touchend",m))},L=a=>{if(!t.value||!i.value||!P)return;const f=E+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-w),c=x+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-_);f<0?t.value.style.left="0px":f+t.value.offsetWidth>window.innerWidth?t.value.style.left=`${window.innerWidth-t.value.offsetWidth}px`:t.value.style.left=`${f}px`,c<0?t.value.style.top="0px":c+t.value.offsetHeight>window.innerHeight?t.value.style.top=`${window.innerHeight-t.value.offsetHeight}px`:t.value.style.top=`${c}px`,n!=null&&n.onDrag&&n.onDrag(f,c)},m=()=>{P=!1,document.documentElement.removeEventListener("mousemove",L),document.documentElement.removeEventListener("touchmove",L),document.documentElement.removeEventListener("mouseup",m),document.documentElement.removeEventListener("touchend",m)},r=()=>{if(!t.value||!e.value)return;let a=t.value.offsetLeft,f=t.value.offsetTop,c=t.value.offsetWidth,d=t.value.offsetHeight;a+c>window.innerWidth&&(a=window.innerWidth-c,a<0&&(a=0,c=window.innerWidth)),f+d>window.innerHeight&&(f=window.innerHeight-d,f<0&&(f=0,d=window.innerHeight)),t.value.style.left=`${a}px`,t.value.style.top=`${f}px`,t.value.style.width=`${c}px`,t.value.style.height=`${d}px`};return Le(()=>{!t.value||!n||(typeof n.width=="number"&&(t.value.style.width=`${n.width}px`),typeof n.height=="number"&&(t.value.style.height=`${n.height}px`),typeof n.left=="number"&&(t.value.style.left=`${n.left}px`),typeof n.top=="number"&&(t.value.style.top=`${n.top}px`),r(),window.addEventListener("resize",r))}),$e(()=>{document.documentElement.removeEventListener("mousemove",O),document.documentElement.removeEventListener("touchmove",O),document.documentElement.removeEventListener("mouseup",s),document.documentElement.removeEventListener("touchend",s),document.documentElement.removeEventListener("mousemove",L),document.documentElement.removeEventListener("touchmove",L),document.documentElement.removeEventListener("mouseup",m),document.documentElement.removeEventListener("touchend",m),window.removeEventListener("resize",r)}),ve(()=>[t.value,e.value,i.value],([a,f,c])=>{a&&f&&(f.addEventListener("mousedown",k),f.addEventListener("touchstart",k)),a&&c&&(c.addEventListener("mousedown",D),c.addEventListener("touchstart",D))}),{handleResizeMouseDown:k,handleDragMouseDown:D}}const vt={class:"container"},pt={class:"action-bar"},mt=["title"],gt=["title"],ht={key:0,class:"icon",style:{cursor:"pointer"}},yt={key:0,"flex-placeholder":""},bt={key:1,class:"action-bar"},wt={key:0,class:"gen-info"},Ot={class:"info-tags"},_t={class:"name"},Et={class:"value"},Lt={key:0,class:"tags-container"},$t=["onClick"],St=["title"],xt=fe({__name:"fullScreenContextMenu",props:{file:{},idx:{}},emits:["contextMenuClick"],setup(t,{emit:e}){const i=t,n=Se(),l=Te(),w=T(),_=U(()=>l.tagMap.get(i.file.fullpath)??[]),$=T(""),S=xe(),E=T(""),x=U(()=>E.value.split(` +`));ve(()=>{var r;return(r=i==null?void 0:i.file)==null?void 0:r.fullpath},async r=>{r&&(S.tasks.forEach(a=>a.cancel()),S.pushAction(()=>Pe(r)).res.then(a=>{E.value=a}))},{immediate:!0});const P=T(),k=T(),O={left:100,top:100,width:512,height:384,expanded:!0},s=Ce("fullScreenContextMenu.vue-drag",O);s.value&&(s.value.left<0||s.value.top<0)&&(s.value={...O}),ft(w,P,k,{...s.value,onDrag:X(function(r,a){s.value={...s.value,left:r,top:a}},300),onResize:X(function(r,a){s.value={...s.value,width:r,height:a}},300)});function D(r){return r.parentNode}We("load",r=>{const a=r.target;a.className==="ant-image-preview-img"&&($.value=`${a.naturalWidth} x ${a.naturalHeight}`)},{capture:!0});const L=U(()=>{const r=[{name:A("fileName"),val:i.file.name},{name:A("fileSize"),val:i.file.size}];return $.value&&r.push({name:A("resolution"),val:$.value}),r}),m=()=>ie(x.value[0]??"");return(r,a)=>{var J;const f=Be,c=re,d=ze,z=Ae,pe=Ne,me=re;return h(),b("div",{ref_key:"el",ref:w,class:ae(["full-screen-menu",{"unset-size":!u(s).expanded}]),onWheelCapture:a[5]||(a[5]=De(()=>{},["stop"]))},[N("div",vt,[N("div",pt,[N("div",{ref_key:"dragHandle",ref:k,class:"icon",style:{cursor:"grab"},title:u(A)("dragToMovePanel")},[o(u(Je))],8,mt),N("div",{class:"icon",style:{cursor:"pointer"},onClick:a[0]||(a[0]=v=>u(s).expanded=!u(s).expanded),title:u(A)("clickToToggleMaximizeMinimize")},[u(s).expanded?(h(),I(u(tt),{key:0})):(h(),I(u(rt),{key:1}))],8,gt),o(f,{"get-popup-container":D},{overlay:p(()=>[o(Ie,{file:r.file,idx:r.idx,"selected-tag":_.value,"disable-delete":u(ne)(r.file)===u(n).fullscreenPreviewInitialUrl,onContextMenuClick:a[1]||(a[1]=(v,W,ge)=>e("contextMenuClick",v,W,ge))},null,8,["file","idx","selected-tag","disable-delete"])]),default:p(()=>[u(s).expanded?M("",!0):(h(),b("div",ht,[o(u(Me))]))]),_:1}),u(s).expanded?(h(),b("div",yt)):M("",!0),u(s).expanded?(h(),b("div",bt,[o(f,{trigger:["hover"],"get-popup-container":D},{overlay:p(()=>[o(pe,{onClick:a[2]||(a[2]=v=>e("contextMenuClick",v,r.file,r.idx))},{default:p(()=>{var v;return[((v=u(n).conf)==null?void 0:v.launch_mode)!=="server"?(h(),b(B,{key:0},[o(d,{key:"send2txt2img"},{default:p(()=>[y(g(r.$t("sendToTxt2img")),1)]),_:1}),o(d,{key:"send2img2img"},{default:p(()=>[y(g(r.$t("sendToImg2img")),1)]),_:1}),o(d,{key:"send2inpaint"},{default:p(()=>[y(g(r.$t("sendToInpaint")),1)]),_:1}),o(d,{key:"send2extras"},{default:p(()=>[y(g(r.$t("sendToExtraFeatures")),1)]),_:1}),o(z,{key:"sendToThirdPartyExtension",title:r.$t("sendToThirdPartyExtension")},{default:p(()=>[o(d,{key:"send2controlnet-txt2img"},{default:p(()=>[y("ControlNet - "+g(r.$t("t2i")),1)]),_:1}),o(d,{key:"send2controlnet-img2img"},{default:p(()=>[y("ControlNet - "+g(r.$t("i2i")),1)]),_:1}),o(d,{key:"send2outpaint"},{default:p(()=>[y("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):M("",!0),o(d,{key:"send2BatchDownload"},{default:p(()=>[y(g(r.$t("sendToBatchDownload")),1)]),_:1}),o(d,{key:"send2savedDir"},{default:p(()=>[y(g(r.$t("send2savedDir")),1)]),_:1}),o(d,{key:"deleteFiles",disabled:u(ne)(r.file)===u(n).fullscreenPreviewInitialUrl},{default:p(()=>[y(g(r.$t("deleteSelected")),1)]),_:1},8,["disabled"]),o(d,{key:"previewInNewWindow"},{default:p(()=>[y(g(r.$t("previewInNewWindow")),1)]),_:1}),o(d,{key:"copyPreviewUrl"},{default:p(()=>[y(g(r.$t("copySourceFilePreviewLink")),1)]),_:1})]}),_:1})]),default:p(()=>[o(c,null,{default:p(()=>[y(g(u(A)("openContextMenu")),1)]),_:1})]),_:1}),o(me,{onClick:a[3]||(a[3]=v=>e("contextMenuClick",{key:"download"},i.file,i.idx))},{default:p(()=>[y(g(r.$t("download")),1)]),_:1}),E.value?(h(),I(c,{key:0,onClick:a[4]||(a[4]=v=>u(ie)(E.value))},{default:p(()=>[y(g(r.$t("copyPrompt")),1)]),_:1})):M("",!0),E.value?(h(),I(c,{key:1,onClick:m},{default:p(()=>[y(g(r.$t("copyPositivePrompt")),1)]),_:1})):M("",!0)])):M("",!0)]),u(s).expanded?(h(),b("div",wt,[N("div",Ot,[(h(!0),b(B,null,V(L.value,v=>(h(),b("span",{class:"info-tag",key:v.name},[N("span",_t,g(v.name),1),N("span",Et,g(v.val),1)]))),128))]),(J=u(n).conf)!=null&&J.all_custom_tags?(h(),b("div",Lt,[(h(!0),b(B,null,V(u(n).conf.all_custom_tags,v=>(h(),b("div",{class:ae(["tag",{selected:_.value.some(W=>W.id===v.id)}]),onClick:W=>e("contextMenuClick",{key:`toggle-tag-${v.id}`},r.file,r.idx),key:v.id,style:ke({"--tag-color":u(l).getColor(v.name)})},g(v.name),15,$t))),128))])):M("",!0),(h(!0),b(B,null,V(x.value,v=>(h(),b("p",{key:v,class:"gen-info-frag"},g(v),1))),128))])):M("",!0)]),u(s).expanded?(h(),b("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:P,title:u(A)("dragToResizePanel")},[o(u(qe))],8,St)):M("",!0)],34)}}});const Nt=je(xt,[["__scopeId","data-v-3ba1b3cd"]]);export{zt as L,At as R,Dt as S,Nt as f,kt as s}; diff --git a/vue/dist/assets/fullScreenContextMenu-8d6d6030.css b/vue/dist/assets/fullScreenContextMenu-73df97d0.css similarity index 67% rename from vue/dist/assets/fullScreenContextMenu-8d6d6030.css rename to vue/dist/assets/fullScreenContextMenu-73df97d0.css index 7b5600b..2a4229e 100644 --- a/vue/dist/assets/fullScreenContextMenu-8d6d6030.css +++ b/vue/dist/assets/fullScreenContextMenu-73df97d0.css @@ -1 +1 @@ -.ant-spin{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;display:none;color:#d03f0a;text-align:center;vertical-align:middle;opacity:0;transition:transform .3s cubic-bezier(.78,.14,.15,.86)}.ant-spin-spinning{position:static;display:inline-block;opacity:1}.ant-spin-nested-loading{position:relative}.ant-spin-nested-loading>div>.ant-spin{position:absolute;top:0;left:0;z-index:4;display:block;width:100%;height:100%;max-height:400px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-dot{position:absolute;top:50%;left:50%;margin:-10px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-text{position:absolute;top:50%;width:100%;padding-top:5px;text-shadow:0 1px 2px #fff}.ant-spin-nested-loading>div>.ant-spin.ant-spin-show-text .ant-spin-dot{margin-top:-20px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-dot{margin:-7px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-text{padding-top:2px}.ant-spin-nested-loading>div>.ant-spin-sm.ant-spin-show-text .ant-spin-dot{margin-top:-17px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-dot{margin:-16px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-text{padding-top:11px}.ant-spin-nested-loading>div>.ant-spin-lg.ant-spin-show-text .ant-spin-dot{margin-top:-26px}.ant-spin-container{position:relative;transition:opacity .3s}.ant-spin-container:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:none \ ;width:100%;height:100%;background:#fff;opacity:0;transition:all .3s;content:"";pointer-events:none}.ant-spin-blur{clear:both;opacity:.5;user-select:none;pointer-events:none}.ant-spin-blur:after{opacity:.4;pointer-events:auto}.ant-spin-tip{color:#00000073}.ant-spin-dot{position:relative;display:inline-block;font-size:20px;width:1em;height:1em}.ant-spin-dot-item{position:absolute;display:block;width:9px;height:9px;background-color:#d03f0a;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.ant-spin-dot-item:nth-child(1){top:0;left:0}.ant-spin-dot-item:nth-child(2){top:0;right:0;animation-delay:.4s}.ant-spin-dot-item:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ant-spin-dot-item:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ant-spin-dot-spin{transform:rotate(45deg);animation:antRotate 1.2s infinite linear}.ant-spin-sm .ant-spin-dot{font-size:14px}.ant-spin-sm .ant-spin-dot i{width:6px;height:6px}.ant-spin-lg .ant-spin-dot{font-size:32px}.ant-spin-lg .ant-spin-dot i{width:14px;height:14px}.ant-spin.ant-spin-show-text .ant-spin-text{display:block}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ant-spin-blur{background:#fff;opacity:.5}}@keyframes antSpinMove{to{opacity:1}}@keyframes antRotate{to{transform:rotate(405deg)}}.ant-spin-rtl{direction:rtl}.ant-spin-rtl .ant-spin-dot-spin{transform:rotate(-45deg);animation-name:antRotateRtl}@keyframes antRotateRtl{to{transform:rotate(-405deg)}}.full-screen-menu[data-v-f62ccba9]{position:fixed;z-index:99999;background:var(--zp-primary-background);padding:8px 16px;box-shadow:0 0 4px var(--zp-secondary);border-radius:4px}.full-screen-menu .tags-container[data-v-f62ccba9]{margin:4px 0}.full-screen-menu .tags-container .tag[data-v-f62ccba9]{margin-right:4px;padding:2px 16px;border-radius:4px;display:inline-block;cursor:pointer;font-weight:700;transition:.5s all ease;border:2px solid var(--tag-color);color:var(--tag-color);background:var(--zp-primary-background);user-select:none}.full-screen-menu .tags-container .tag.selected[data-v-f62ccba9]{background:var(--tag-color);color:#fff}.full-screen-menu .container[data-v-f62ccba9]{height:100%;display:flex;overflow:hidden;flex-direction:column}.full-screen-menu .gen-info[data-v-f62ccba9]{flex:1;word-break:break-all;white-space:pre-line;overflow:auto;z-index:1;padding-top:4px;position:relative}.full-screen-menu .gen-info .gen-info-frag[data-v-f62ccba9]{margin-bottom:.5em}.full-screen-menu .gen-info .info-tags .info-tag[data-v-f62ccba9]{display:inline-block;overflow:hidden;border-radius:4px;margin-right:8px;border:2px solid var(--zp-primary)}.full-screen-menu .gen-info .info-tags .name[data-v-f62ccba9]{background-color:var(--zp-primary);color:var(--zp-primary-background);padding:4px}.full-screen-menu .gen-info .info-tags .value[data-v-f62ccba9]{padding:4px}.full-screen-menu.unset-size[data-v-f62ccba9]{width:unset!important;height:unset!important}.full-screen-menu .mouse-sensor[data-v-f62ccba9]{position:absolute;bottom:0;right:0;transform:rotate(90deg);cursor:se-resize;z-index:1;background:var(--zp-primary-background);border-radius:2px}.full-screen-menu .mouse-sensor>*[data-v-f62ccba9]{font-size:18px;padding:4px}.full-screen-menu .action-bar[data-v-f62ccba9]{display:flex;align-items:center;user-select:none;gap:4px}.full-screen-menu .action-bar .icon[data-v-f62ccba9]{font-size:1.5em;padding:2px 4px;border-radius:4px}.full-screen-menu .action-bar .icon[data-v-f62ccba9]:hover{background:var(--zp-secondary-variant-background)}.full-screen-menu .action-bar>*[data-v-f62ccba9]{flex-wrap:wrap} +.ant-spin{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;display:none;color:#d03f0a;text-align:center;vertical-align:middle;opacity:0;transition:transform .3s cubic-bezier(.78,.14,.15,.86)}.ant-spin-spinning{position:static;display:inline-block;opacity:1}.ant-spin-nested-loading{position:relative}.ant-spin-nested-loading>div>.ant-spin{position:absolute;top:0;left:0;z-index:4;display:block;width:100%;height:100%;max-height:400px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-dot{position:absolute;top:50%;left:50%;margin:-10px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-text{position:absolute;top:50%;width:100%;padding-top:5px;text-shadow:0 1px 2px #fff}.ant-spin-nested-loading>div>.ant-spin.ant-spin-show-text .ant-spin-dot{margin-top:-20px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-dot{margin:-7px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-text{padding-top:2px}.ant-spin-nested-loading>div>.ant-spin-sm.ant-spin-show-text .ant-spin-dot{margin-top:-17px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-dot{margin:-16px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-text{padding-top:11px}.ant-spin-nested-loading>div>.ant-spin-lg.ant-spin-show-text .ant-spin-dot{margin-top:-26px}.ant-spin-container{position:relative;transition:opacity .3s}.ant-spin-container:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:none \ ;width:100%;height:100%;background:#fff;opacity:0;transition:all .3s;content:"";pointer-events:none}.ant-spin-blur{clear:both;opacity:.5;user-select:none;pointer-events:none}.ant-spin-blur:after{opacity:.4;pointer-events:auto}.ant-spin-tip{color:#00000073}.ant-spin-dot{position:relative;display:inline-block;font-size:20px;width:1em;height:1em}.ant-spin-dot-item{position:absolute;display:block;width:9px;height:9px;background-color:#d03f0a;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.ant-spin-dot-item:nth-child(1){top:0;left:0}.ant-spin-dot-item:nth-child(2){top:0;right:0;animation-delay:.4s}.ant-spin-dot-item:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ant-spin-dot-item:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ant-spin-dot-spin{transform:rotate(45deg);animation:antRotate 1.2s infinite linear}.ant-spin-sm .ant-spin-dot{font-size:14px}.ant-spin-sm .ant-spin-dot i{width:6px;height:6px}.ant-spin-lg .ant-spin-dot{font-size:32px}.ant-spin-lg .ant-spin-dot i{width:14px;height:14px}.ant-spin.ant-spin-show-text .ant-spin-text{display:block}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ant-spin-blur{background:#fff;opacity:.5}}@keyframes antSpinMove{to{opacity:1}}@keyframes antRotate{to{transform:rotate(405deg)}}.ant-spin-rtl{direction:rtl}.ant-spin-rtl .ant-spin-dot-spin{transform:rotate(-45deg);animation-name:antRotateRtl}@keyframes antRotateRtl{to{transform:rotate(-405deg)}}.full-screen-menu[data-v-3ba1b3cd]{position:fixed;z-index:99999;background:var(--zp-primary-background);padding:8px 16px;box-shadow:0 0 4px var(--zp-secondary);border-radius:4px}.full-screen-menu .tags-container[data-v-3ba1b3cd]{margin:4px 0}.full-screen-menu .tags-container .tag[data-v-3ba1b3cd]{margin-right:4px;padding:2px 16px;border-radius:4px;display:inline-block;cursor:pointer;font-weight:700;transition:.5s all ease;border:2px solid var(--tag-color);color:var(--tag-color);background:var(--zp-primary-background);user-select:none}.full-screen-menu .tags-container .tag.selected[data-v-3ba1b3cd]{background:var(--tag-color);color:#fff}.full-screen-menu .container[data-v-3ba1b3cd]{height:100%;display:flex;overflow:hidden;flex-direction:column}.full-screen-menu .gen-info[data-v-3ba1b3cd]{flex:1;word-break:break-all;white-space:pre-line;overflow:auto;z-index:1;padding-top:4px;position:relative}.full-screen-menu .gen-info .info-tags .info-tag[data-v-3ba1b3cd]{display:inline-block;overflow:hidden;border-radius:4px;margin-right:8px;border:2px solid var(--zp-primary)}.full-screen-menu .gen-info .info-tags .name[data-v-3ba1b3cd]{background-color:var(--zp-primary);color:var(--zp-primary-background);padding:4px}.full-screen-menu .gen-info .info-tags .value[data-v-3ba1b3cd]{padding:4px}.full-screen-menu.unset-size[data-v-3ba1b3cd]{width:unset!important;height:unset!important}.full-screen-menu .mouse-sensor[data-v-3ba1b3cd]{position:absolute;bottom:0;right:0;transform:rotate(90deg);cursor:se-resize;z-index:1;background:var(--zp-primary-background);border-radius:2px}.full-screen-menu .mouse-sensor>*[data-v-3ba1b3cd]{font-size:18px;padding:4px}.full-screen-menu .action-bar[data-v-3ba1b3cd]{display:flex;align-items:center;user-select:none;gap:4px}.full-screen-menu .action-bar .icon[data-v-3ba1b3cd]{font-size:1.5em;padding:2px 4px;border-radius:4px}.full-screen-menu .action-bar .icon[data-v-3ba1b3cd]:hover{background:var(--zp-secondary-variant-background)}.full-screen-menu .action-bar>*[data-v-3ba1b3cd]{flex-wrap:wrap} diff --git a/vue/dist/assets/globalSetting-e33f2a88.js b/vue/dist/assets/globalSetting-6cc3c392.js similarity index 97% rename from vue/dist/assets/globalSetting-e33f2a88.js rename to vue/dist/assets/globalSetting-6cc3c392.js index 5dcb18f..b6e7a75 100644 --- a/vue/dist/assets/globalSetting-e33f2a88.js +++ b/vue/dist/assets/globalSetting-6cc3c392.js @@ -1 +1 @@ -import{Y as te,Z as ae,d as D,j as le,av as oe,w as O,$ as U,ao as E,l as q,u as ue,aw as ie,ax as de,h as $,c as a,a as P,ay as se,az as ce,g as R,aA as re,P as s,aB as z,k as X,aC as he,o as b,y as T,n as c,r as n,ai as C,m as V,C as B,p,z as M,v as w,S as G,aD as fe,I as me,x as F,A as W,q as j,E as ve,aE as ge,aF as _e,aG as pe,aH as be,V as Ce,U as ke,X as we}from"./index-342b69b7.js";import{N as H,_ as Y,F as ye}from"./numInput-e2a9cc11.js";import{g as Se,C as $e}from"./shortcut-42287857.js";/* empty css *//* empty css */var xe=ae("small","default"),Te=function(){return{id:String,prefixCls:String,size:s.oneOf(xe),disabled:{type:Boolean,default:void 0},checkedChildren:s.any,unCheckedChildren:s.any,tabindex:s.oneOfType([s.string,s.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:s.oneOfType([s.string,s.number,s.looseBool]),checkedValue:s.oneOfType([s.string,s.number,s.looseBool]).def(!0),unCheckedValue:s.oneOfType([s.string,s.number,s.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},Ie=D({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:Te(),slots:["checkedChildren","unCheckedChildren"],setup:function(e,u){var g=u.attrs,y=u.slots,h=u.expose,r=u.emit,l=le();oe(function(){O(!("defaultChecked"in g),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),O(!("value"in g),"Switch","`value` is not validate prop, do you mean `checked`?")});var t=U(e.checked!==void 0?e.checked:g.defaultChecked),_=E(function(){return t.value===e.checkedValue});q(function(){return e.checked},function(){t.value=e.checked});var m=ue("switch",e),f=m.prefixCls,A=m.direction,I=m.size,S=U(),x=function(){var o;(o=S.value)===null||o===void 0||o.focus()},i=function(){var o;(o=S.value)===null||o===void 0||o.blur()};h({focus:x,blur:i}),ie(function(){de(function(){e.autofocus&&!e.disabled&&S.value.focus()})});var v=function(o,k){e.disabled||(r("update:checked",o),r("change",o,k),l.onFieldChange())},K=function(o){r("blur",o)},J=function(o){x();var k=_.value?e.unCheckedValue:e.checkedValue;v(k,o),r("click",k,o)},Q=function(o){o.keyCode===z.LEFT?v(e.unCheckedValue,o):o.keyCode===z.RIGHT&&v(e.checkedValue,o),r("keydown",o)},ee=function(o){var k;(k=S.value)===null||k===void 0||k.blur(),r("mouseup",o)},ne=E(function(){var d;return d={},$(d,"".concat(f.value,"-small"),I.value==="small"),$(d,"".concat(f.value,"-loading"),e.loading),$(d,"".concat(f.value,"-checked"),_.value),$(d,"".concat(f.value,"-disabled"),e.disabled),$(d,f.value,!0),$(d,"".concat(f.value,"-rtl"),A.value==="rtl"),d});return function(){var d;return a(re,{insertExtraNode:!0},{default:function(){return[a("button",P(P(P({},se(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),g),{},{id:(d=e.id)!==null&&d!==void 0?d:l.id.value,onKeydown:Q,onClick:J,onBlur:K,onMouseup:ee,type:"button",role:"switch","aria-checked":t.value,disabled:e.disabled||e.loading,class:[g.class,ne.value],ref:S}),[a("div",{class:"".concat(f.value,"-handle")},[e.loading?a(ce,{class:"".concat(f.value,"-loading-icon")},null):null]),a("span",{class:"".concat(f.value,"-inner")},[_.value?R(y,e,"checkedChildren"):R(y,e,"unCheckedChildren")])])]}})}}});const Z=te(Ie);const L="/infinite_image_browsing/fe-static/assets/sample-55dcafc6.webp",Fe=["width","height","src"],Ve=D({__name:"ImageSetting",setup(N){function e(y,h){return new Promise(r=>{const l=new Image;l.onload=()=>{const t=document.createElement("canvas");t.width=l.width*h,t.height=l.height*h,t.getContext("2d").drawImage(l,0,0,t.width,t.height),r(t.toDataURL())},l.src=y})}const u=X(),g=U("");return q(()=>[u.enableThumbnail,u.gridThumbnailResolution],he(async()=>{u.enableThumbnail&&(g.value=await e(L,u.gridThumbnailResolution/1024))},300),{immediate:!0,deep:!0}),(y,h)=>{const r=Y,l=Z;return b(),T(M,null,[a(r,{label:n(C)("defaultGridCellWidth")},{default:c(()=>[a(H,{min:64,max:1024,step:32,modelValue:n(u).defaultGridCellWidth,"onUpdate:modelValue":h[0]||(h[0]=t=>n(u).defaultGridCellWidth=t)},null,8,["modelValue"])]),_:1},8,["label"]),a(r,{label:n(C)("useThumbnailPreview")},{default:c(()=>[a(l,{checked:n(u).enableThumbnail,"onUpdate:checked":h[1]||(h[1]=t=>n(u).enableThumbnail=t)},null,8,["checked"])]),_:1},8,["label"]),n(u).enableThumbnail?(b(),V(r,{key:0,label:n(C)("thumbnailResolution")},{default:c(()=>[a(H,{modelValue:n(u).gridThumbnailResolution,"onUpdate:modelValue":h[2]||(h[2]=t=>n(u).gridThumbnailResolution=t),min:256,max:1024,step:64},null,8,["modelValue"])]),_:1},8,["label"])):B("",!0),a(r,{label:n(C)("livePreview")},{default:c(()=>[p("div",null,[p("img",{width:n(u).defaultGridCellWidth,height:n(u).defaultGridCellWidth,src:n(u).enableThumbnail?g.value:n(L)},null,8,Fe)])]),_:1},8,["label"])],64)}}}),Be={class:"panel"},Me={style:{"margin-top":"0"}},Ue={class:"lang-select-wrap"},Ne={class:"col"},Ae={class:"col"},Ke={class:"col"},Pe=D({__name:"globalSetting",setup(N){const e=X(),u=U(!1),g=async()=>{window.location.reload()},y=[{value:"en",text:"English"},{value:"zhHans",text:"简体中文"},{value:"zhHant",text:"繁體中文"},{value:"de",text:"Deutsch"}],h=(l,t)=>{const _=Se(l);_&&(e.shortcut[t]=_)},r=async()=>{await ge("shutdown_api_server_command"),await _e.removeFile(pe),await be()};return(l,t)=>{const _=Z,m=Y,f=Ce,A=$e,I=ke,S=ye;return b(),T("div",Be,[B("",!0),a(S,null,{default:c(()=>{var x;return[p("h2",Me,w(n(C)("ImageBrowsingSettings")),1),a(Ve),p("h2",null,w(n(C)("other")),1),a(m,{label:l.$t("onlyFoldersAndImages")},{default:c(()=>[a(_,{checked:n(e).onlyFoldersAndImages,"onUpdate:checked":t[0]||(t[0]=i=>n(e).onlyFoldersAndImages=i)},null,8,["checked"])]),_:1},8,["label"]),a(m,{label:l.$t("defaultSortingMethod")},{default:c(()=>[a(n(G),{value:n(e).defaultSortingMethod,"onUpdate:value":t[1]||(t[1]=i=>n(e).defaultSortingMethod=i),conv:n(fe),options:n(me)},null,8,["value","conv","options"])]),_:1},8,["label"]),a(m,{label:l.$t("longPressOpenContextMenu")},{default:c(()=>[a(_,{checked:n(e).longPressOpenContextMenu,"onUpdate:checked":t[2]||(t[2]=i=>n(e).longPressOpenContextMenu=i)},null,8,["checked"])]),_:1},8,["label"]),a(m,{label:l.$t("lang")},{default:c(()=>[p("div",Ue,[a(n(G),{options:y,value:n(e).lang,"onUpdate:value":t[3]||(t[3]=i=>n(e).lang=i),onChange:t[4]||(t[4]=i=>u.value=!0)},null,8,["value"])]),u.value?(b(),V(f,{key:0,type:"primary",onClick:g,ghost:""},{default:c(()=>[F(w(n(C)("langChangeReload")),1)]),_:1})):B("",!0)]),_:1},8,["label"]),(b(!0),T(M,null,W(n(e).ignoredConfirmActions,(i,v)=>(b(),V(m,{label:l.$t(v+"SkipConfirm"),key:v},{default:c(()=>[a(A,{checked:n(e).ignoredConfirmActions[v],"onUpdate:checked":K=>n(e).ignoredConfirmActions[v]=K},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"]))),128)),p("h2",null,w(n(C)("shortcutKey")),1),a(m,{label:l.$t("deleteSelected")},{default:c(()=>[p("div",Ne,[a(I,{value:n(e).shortcut.delete,onKeydown:t[5]||(t[5]=j(i=>h(i,"delete"),["stop","prevent"])),placeholder:l.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),a(f,{onClick:t[6]||(t[6]=i=>n(e).shortcut.delete=""),class:"clear-btn"},{default:c(()=>[F(w(l.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),(b(!0),T(M,null,W(((x=n(e).conf)==null?void 0:x.all_custom_tags)??[],i=>(b(),V(m,{label:l.$t("toggleTagSelection",{tag:i.name}),key:i.id},{default:c(()=>[p("div",Ae,[a(I,{value:n(e).shortcut[`toggle_tag_${i.name}`],onKeydown:j(v=>h(v,`toggle_tag_${i.name}`),["stop","prevent"]),placeholder:l.$t("shortcutKeyDescription")},null,8,["value","onKeydown","placeholder"]),a(f,{onClick:v=>n(e).shortcut[`toggle_tag_${i.name}`]="",class:"clear-btn"},{default:c(()=>[F(w(l.$t("clear")),1)]),_:2},1032,["onClick"])])]),_:2},1032,["label"]))),128)),n(ve)?(b(),T(M,{key:0},[p("h2",null,w(n(C)("clientSpecificSettings")),1),a(m,null,{default:c(()=>[p("div",Ke,[a(f,{onClick:r,class:"clear-btn"},{default:c(()=>[F(w(l.$t("initiateSoftwareStartupConfig")),1)]),_:1})])]),_:1})],64)):B("",!0)]}),_:1})])}}});const Ge=we(Pe,[["__scopeId","data-v-4695135b"]]);export{Ge as default}; +import{Y as te,Z as ae,d as D,j as le,av as oe,w as O,$ as U,ao as E,l as q,u as ue,aw as ie,ax as de,h as $,c as a,a as P,ay as se,az as ce,g as R,aA as re,P as s,aB as z,k as X,aC as he,o as b,y as T,n as c,r as n,ai as C,m as V,C as B,p,z as M,v as w,S as G,aD as fe,I as me,x as F,A as W,q as j,E as ve,aE as ge,aF as _e,aG as pe,aH as be,V as Ce,U as ke,X as we}from"./index-066a7869.js";import{N as H,_ as Y,F as ye}from"./numInput-136f608c.js";import{g as Se,C as $e}from"./shortcut-16098eef.js";/* empty css *//* empty css */var xe=ae("small","default"),Te=function(){return{id:String,prefixCls:String,size:s.oneOf(xe),disabled:{type:Boolean,default:void 0},checkedChildren:s.any,unCheckedChildren:s.any,tabindex:s.oneOfType([s.string,s.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:s.oneOfType([s.string,s.number,s.looseBool]),checkedValue:s.oneOfType([s.string,s.number,s.looseBool]).def(!0),unCheckedValue:s.oneOfType([s.string,s.number,s.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},Ie=D({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:Te(),slots:["checkedChildren","unCheckedChildren"],setup:function(e,u){var g=u.attrs,y=u.slots,h=u.expose,r=u.emit,l=le();oe(function(){O(!("defaultChecked"in g),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),O(!("value"in g),"Switch","`value` is not validate prop, do you mean `checked`?")});var t=U(e.checked!==void 0?e.checked:g.defaultChecked),_=E(function(){return t.value===e.checkedValue});q(function(){return e.checked},function(){t.value=e.checked});var m=ue("switch",e),f=m.prefixCls,A=m.direction,I=m.size,S=U(),x=function(){var o;(o=S.value)===null||o===void 0||o.focus()},i=function(){var o;(o=S.value)===null||o===void 0||o.blur()};h({focus:x,blur:i}),ie(function(){de(function(){e.autofocus&&!e.disabled&&S.value.focus()})});var v=function(o,k){e.disabled||(r("update:checked",o),r("change",o,k),l.onFieldChange())},K=function(o){r("blur",o)},J=function(o){x();var k=_.value?e.unCheckedValue:e.checkedValue;v(k,o),r("click",k,o)},Q=function(o){o.keyCode===z.LEFT?v(e.unCheckedValue,o):o.keyCode===z.RIGHT&&v(e.checkedValue,o),r("keydown",o)},ee=function(o){var k;(k=S.value)===null||k===void 0||k.blur(),r("mouseup",o)},ne=E(function(){var d;return d={},$(d,"".concat(f.value,"-small"),I.value==="small"),$(d,"".concat(f.value,"-loading"),e.loading),$(d,"".concat(f.value,"-checked"),_.value),$(d,"".concat(f.value,"-disabled"),e.disabled),$(d,f.value,!0),$(d,"".concat(f.value,"-rtl"),A.value==="rtl"),d});return function(){var d;return a(re,{insertExtraNode:!0},{default:function(){return[a("button",P(P(P({},se(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),g),{},{id:(d=e.id)!==null&&d!==void 0?d:l.id.value,onKeydown:Q,onClick:J,onBlur:K,onMouseup:ee,type:"button",role:"switch","aria-checked":t.value,disabled:e.disabled||e.loading,class:[g.class,ne.value],ref:S}),[a("div",{class:"".concat(f.value,"-handle")},[e.loading?a(ce,{class:"".concat(f.value,"-loading-icon")},null):null]),a("span",{class:"".concat(f.value,"-inner")},[_.value?R(y,e,"checkedChildren"):R(y,e,"unCheckedChildren")])])]}})}}});const Z=te(Ie);const L="/infinite_image_browsing/fe-static/assets/sample-55dcafc6.webp",Fe=["width","height","src"],Ve=D({__name:"ImageSetting",setup(N){function e(y,h){return new Promise(r=>{const l=new Image;l.onload=()=>{const t=document.createElement("canvas");t.width=l.width*h,t.height=l.height*h,t.getContext("2d").drawImage(l,0,0,t.width,t.height),r(t.toDataURL())},l.src=y})}const u=X(),g=U("");return q(()=>[u.enableThumbnail,u.gridThumbnailResolution],he(async()=>{u.enableThumbnail&&(g.value=await e(L,u.gridThumbnailResolution/1024))},300),{immediate:!0,deep:!0}),(y,h)=>{const r=Y,l=Z;return b(),T(M,null,[a(r,{label:n(C)("defaultGridCellWidth")},{default:c(()=>[a(H,{min:64,max:1024,step:32,modelValue:n(u).defaultGridCellWidth,"onUpdate:modelValue":h[0]||(h[0]=t=>n(u).defaultGridCellWidth=t)},null,8,["modelValue"])]),_:1},8,["label"]),a(r,{label:n(C)("useThumbnailPreview")},{default:c(()=>[a(l,{checked:n(u).enableThumbnail,"onUpdate:checked":h[1]||(h[1]=t=>n(u).enableThumbnail=t)},null,8,["checked"])]),_:1},8,["label"]),n(u).enableThumbnail?(b(),V(r,{key:0,label:n(C)("thumbnailResolution")},{default:c(()=>[a(H,{modelValue:n(u).gridThumbnailResolution,"onUpdate:modelValue":h[2]||(h[2]=t=>n(u).gridThumbnailResolution=t),min:256,max:1024,step:64},null,8,["modelValue"])]),_:1},8,["label"])):B("",!0),a(r,{label:n(C)("livePreview")},{default:c(()=>[p("div",null,[p("img",{width:n(u).defaultGridCellWidth,height:n(u).defaultGridCellWidth,src:n(u).enableThumbnail?g.value:n(L)},null,8,Fe)])]),_:1},8,["label"])],64)}}}),Be={class:"panel"},Me={style:{"margin-top":"0"}},Ue={class:"lang-select-wrap"},Ne={class:"col"},Ae={class:"col"},Ke={class:"col"},Pe=D({__name:"globalSetting",setup(N){const e=X(),u=U(!1),g=async()=>{window.location.reload()},y=[{value:"en",text:"English"},{value:"zhHans",text:"简体中文"},{value:"zhHant",text:"繁體中文"},{value:"de",text:"Deutsch"}],h=(l,t)=>{const _=Se(l);_&&(e.shortcut[t]=_)},r=async()=>{await ge("shutdown_api_server_command"),await _e.removeFile(pe),await be()};return(l,t)=>{const _=Z,m=Y,f=Ce,A=$e,I=ke,S=ye;return b(),T("div",Be,[B("",!0),a(S,null,{default:c(()=>{var x;return[p("h2",Me,w(n(C)("ImageBrowsingSettings")),1),a(Ve),p("h2",null,w(n(C)("other")),1),a(m,{label:l.$t("onlyFoldersAndImages")},{default:c(()=>[a(_,{checked:n(e).onlyFoldersAndImages,"onUpdate:checked":t[0]||(t[0]=i=>n(e).onlyFoldersAndImages=i)},null,8,["checked"])]),_:1},8,["label"]),a(m,{label:l.$t("defaultSortingMethod")},{default:c(()=>[a(n(G),{value:n(e).defaultSortingMethod,"onUpdate:value":t[1]||(t[1]=i=>n(e).defaultSortingMethod=i),conv:n(fe),options:n(me)},null,8,["value","conv","options"])]),_:1},8,["label"]),a(m,{label:l.$t("longPressOpenContextMenu")},{default:c(()=>[a(_,{checked:n(e).longPressOpenContextMenu,"onUpdate:checked":t[2]||(t[2]=i=>n(e).longPressOpenContextMenu=i)},null,8,["checked"])]),_:1},8,["label"]),a(m,{label:l.$t("lang")},{default:c(()=>[p("div",Ue,[a(n(G),{options:y,value:n(e).lang,"onUpdate:value":t[3]||(t[3]=i=>n(e).lang=i),onChange:t[4]||(t[4]=i=>u.value=!0)},null,8,["value"])]),u.value?(b(),V(f,{key:0,type:"primary",onClick:g,ghost:""},{default:c(()=>[F(w(n(C)("langChangeReload")),1)]),_:1})):B("",!0)]),_:1},8,["label"]),(b(!0),T(M,null,W(n(e).ignoredConfirmActions,(i,v)=>(b(),V(m,{label:l.$t(v+"SkipConfirm"),key:v},{default:c(()=>[a(A,{checked:n(e).ignoredConfirmActions[v],"onUpdate:checked":K=>n(e).ignoredConfirmActions[v]=K},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"]))),128)),p("h2",null,w(n(C)("shortcutKey")),1),a(m,{label:l.$t("deleteSelected")},{default:c(()=>[p("div",Ne,[a(I,{value:n(e).shortcut.delete,onKeydown:t[5]||(t[5]=j(i=>h(i,"delete"),["stop","prevent"])),placeholder:l.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),a(f,{onClick:t[6]||(t[6]=i=>n(e).shortcut.delete=""),class:"clear-btn"},{default:c(()=>[F(w(l.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),(b(!0),T(M,null,W(((x=n(e).conf)==null?void 0:x.all_custom_tags)??[],i=>(b(),V(m,{label:l.$t("toggleTagSelection",{tag:i.name}),key:i.id},{default:c(()=>[p("div",Ae,[a(I,{value:n(e).shortcut[`toggle_tag_${i.name}`],onKeydown:j(v=>h(v,`toggle_tag_${i.name}`),["stop","prevent"]),placeholder:l.$t("shortcutKeyDescription")},null,8,["value","onKeydown","placeholder"]),a(f,{onClick:v=>n(e).shortcut[`toggle_tag_${i.name}`]="",class:"clear-btn"},{default:c(()=>[F(w(l.$t("clear")),1)]),_:2},1032,["onClick"])])]),_:2},1032,["label"]))),128)),n(ve)?(b(),T(M,{key:0},[p("h2",null,w(n(C)("clientSpecificSettings")),1),a(m,null,{default:c(()=>[p("div",Ke,[a(f,{onClick:r,class:"clear-btn"},{default:c(()=>[F(w(l.$t("initiateSoftwareStartupConfig")),1)]),_:1})])]),_:1})],64)):B("",!0)]}),_:1})])}}});const Ge=we(Pe,[["__scopeId","data-v-4695135b"]]);export{Ge as default}; diff --git a/vue/dist/assets/hook-7463589c.js b/vue/dist/assets/hook-6c156191.js similarity index 95% rename from vue/dist/assets/hook-7463589c.js rename to vue/dist/assets/hook-6c156191.js index 41b8b6a..5c781c6 100644 --- a/vue/dist/assets/hook-7463589c.js +++ b/vue/dist/assets/hook-6c156191.js @@ -1 +1 @@ -import{bn as A,$ as g,bU as q,bV as x,ar as k,ao as D,bO as z,bd as G}from"./index-342b69b7.js";import{u as N,b as O,f as Q,c as U,d as j,e as H,h as L}from"./FileItem-51205eb2.js";let T=0;const V=()=>++T,W=(r,l,{dataUpdateStrategy:c="replace"}={})=>{const s=A([""]),u=g(!1),t=g(),a=g(!1);let f=g(-1);const v=new Set,b=e=>{var n;c==="replace"?t.value=e:c==="merge"&&(k((Array.isArray(t.value)||typeof t.value>"u")&&Array.isArray(e),"数据更新策略为合并时仅可用于值为数组的情况"),t.value=[...(n=t==null?void 0:t.value)!==null&&n!==void 0?n:[],...e])},d=e=>x(void 0,void 0,void 0,function*(){if(a.value||u.value&&typeof e>"u")return!1;a.value=!0;const n=V();f.value=n;try{let o;if(typeof e=="number"){if(o=s[e],typeof o!="string")return!1}else o=s[s.length-1];const p=yield r(o);if(v.has(n))return v.delete(n),!1;b(l(p));const i=p.cursor;if((e===s.length-1||typeof e!="number")&&(u.value=!i.has_next,i.has_next)){const I=i.next_cursor||i.next;k(typeof I=="string"),s.push(I)}}finally{f.value===n&&(a.value=!1)}return!0}),h=()=>{v.add(f.value),a.value=!1},w=(e=!1)=>x(void 0,void 0,void 0,function*(){const{refetch:n,force:o}=typeof e=="object"?e:{refetch:e};o&&h(),k(!a.value),s.splice(0,s.length,""),a.value=!1,t.value=void 0,u.value=!1,n&&(yield d())}),m=()=>({next:()=>x(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return q({abort:h,load:u,next:d,res:t,loading:a,cursorStack:s,reset:w,[Symbol.asyncIterator]:m,iter:{[Symbol.asyncIterator]:m}})},J=r=>A(W(r,l=>l.files,{dataUpdateStrategy:"merge"})),K=r=>{const l=A(new Set),c=D(()=>(r.res??[]).filter(y=>!l.has(y.fullpath))),s=z(),{stackViewEl:u,multiSelectedIdxs:t,stack:a,scroller:f}=N({images:c}).toRefs(),{itemSize:v,gridItems:b,cellWidth:d,onScroll:h}=O({fetchNext:()=>r.next()}),{showMenuIdx:w}=Q(),{onFileDragStart:m,onFileDragEnd:e}=U(),{showGenInfo:n,imageGenInfo:o,q:p,onContextMenuClick:i,onFileItemClick:I}=j({openNext:G}),{previewIdx:C,previewing:F,onPreviewVisibleChange:_,previewImgMove:E,canPreview:M}=H(),P=async(y,S,R)=>{a.value=[{curr:"",files:c.value}],await i(y,S,R)};return L("removeFiles",async({paths:y})=>{y.forEach(S=>l.add(S))}),{images:c,scroller:f,queue:s,iter:r,onContextMenuClickU:P,stackViewEl:u,previewIdx:C,previewing:F,onPreviewVisibleChange:_,previewImgMove:E,canPreview:M,itemSize:v,gridItems:b,showGenInfo:n,imageGenInfo:o,q:p,onContextMenuClick:i,onFileItemClick:I,showMenuIdx:w,multiSelectedIdxs:t,onFileDragStart:m,onFileDragEnd:e,cellWidth:d,onScroll:h}};export{J as c,K as u}; +import{bn as A,$ as g,bU as q,bV as x,ar as k,ao as D,bO as z,bd as G}from"./index-066a7869.js";import{u as N,b as O,f as Q,c as U,d as j,e as H,h as L}from"./FileItem-a96f33a2.js";let T=0;const V=()=>++T,W=(r,l,{dataUpdateStrategy:c="replace"}={})=>{const s=A([""]),u=g(!1),t=g(),a=g(!1);let f=g(-1);const v=new Set,b=e=>{var n;c==="replace"?t.value=e:c==="merge"&&(k((Array.isArray(t.value)||typeof t.value>"u")&&Array.isArray(e),"数据更新策略为合并时仅可用于值为数组的情况"),t.value=[...(n=t==null?void 0:t.value)!==null&&n!==void 0?n:[],...e])},d=e=>x(void 0,void 0,void 0,function*(){if(a.value||u.value&&typeof e>"u")return!1;a.value=!0;const n=V();f.value=n;try{let o;if(typeof e=="number"){if(o=s[e],typeof o!="string")return!1}else o=s[s.length-1];const p=yield r(o);if(v.has(n))return v.delete(n),!1;b(l(p));const i=p.cursor;if((e===s.length-1||typeof e!="number")&&(u.value=!i.has_next,i.has_next)){const I=i.next_cursor||i.next;k(typeof I=="string"),s.push(I)}}finally{f.value===n&&(a.value=!1)}return!0}),h=()=>{v.add(f.value),a.value=!1},w=(e=!1)=>x(void 0,void 0,void 0,function*(){const{refetch:n,force:o}=typeof e=="object"?e:{refetch:e};o&&h(),k(!a.value),s.splice(0,s.length,""),a.value=!1,t.value=void 0,u.value=!1,n&&(yield d())}),m=()=>({next:()=>x(void 0,void 0,void 0,function*(){if(a.value)throw new Error("不允许同时迭代");return{done:!(yield d()),value:t.value}})});return q({abort:h,load:u,next:d,res:t,loading:a,cursorStack:s,reset:w,[Symbol.asyncIterator]:m,iter:{[Symbol.asyncIterator]:m}})},J=r=>A(W(r,l=>l.files,{dataUpdateStrategy:"merge"})),K=r=>{const l=A(new Set),c=D(()=>(r.res??[]).filter(y=>!l.has(y.fullpath))),s=z(),{stackViewEl:u,multiSelectedIdxs:t,stack:a,scroller:f}=N({images:c}).toRefs(),{itemSize:v,gridItems:b,cellWidth:d,onScroll:h}=O({fetchNext:()=>r.next()}),{showMenuIdx:w}=Q(),{onFileDragStart:m,onFileDragEnd:e}=U(),{showGenInfo:n,imageGenInfo:o,q:p,onContextMenuClick:i,onFileItemClick:I}=j({openNext:G}),{previewIdx:C,previewing:F,onPreviewVisibleChange:_,previewImgMove:E,canPreview:M}=H(),P=async(y,S,R)=>{a.value=[{curr:"",files:c.value}],await i(y,S,R)};return L("removeFiles",async({paths:y})=>{y.forEach(S=>l.add(S))}),{images:c,scroller:f,queue:s,iter:r,onContextMenuClickU:P,stackViewEl:u,previewIdx:C,previewing:F,onPreviewVisibleChange:_,previewImgMove:E,canPreview:M,itemSize:v,gridItems:b,showGenInfo:n,imageGenInfo:o,q:p,onContextMenuClick:i,onFileItemClick:I,showMenuIdx:w,multiSelectedIdxs:t,onFileDragStart:m,onFileDragEnd:e,cellWidth:d,onScroll:h}};export{J as c,K as u}; diff --git a/vue/dist/assets/index-342b69b7.js b/vue/dist/assets/index-066a7869.js similarity index 99% rename from vue/dist/assets/index-342b69b7.js rename to vue/dist/assets/index-066a7869.js index 4d392b9..8d025e1 100644 --- a/vue/dist/assets/index-342b69b7.js +++ b/vue/dist/assets/index-066a7869.js @@ -190,4 +190,4 @@ Note that this is not an issue if running this frontend on a browser instead of * pinia v2.1.3 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let I_;const su=t=>I_=t,A_=Symbol();function yf(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var ro;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(ro||(ro={}));function Zj(){const t=Ef(!0),e=t.run(()=>W({}));let n=[],r=[];const a=Cs({install(i){su(a),a._a=i,i.provide(A_,a),i.config.globalProperties.$pinia=a,r.forEach(o=>n.push(o)),r=[]},use(i){return!this._a&&!Qj?r.push(i):n.push(i),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return a}const M_=()=>{};function xy(t,e,n,r=M_){t.push(e);const a=()=>{const i=t.indexOf(e);i>-1&&(t.splice(i,1),r())};return!n&&Of()&&qy(a),a}function Da(t,...e){t.slice().forEach(n=>{n(...e)})}const ez=t=>t();function bf(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,r)=>t.set(r,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n],a=t[n];yf(a)&&yf(r)&&t.hasOwnProperty(n)&&!tt(r)&&!wr(r)?t[n]=bf(a,r):t[n]=r}return t}const tz=Symbol();function nz(t){return!yf(t)||!t.hasOwnProperty(tz)}const{assign:Rr}=Object;function rz(t){return!!(tt(t)&&t.effect)}function az(t,e,n,r){const{state:a,actions:i,getters:o}=e,l=n.state.value[t];let s;function u(){l||(n.state.value[t]=a?a():{});const f=sb(n.state.value[t]);return Rr(f,i,Object.keys(o||{}).reduce((v,p)=>(v[p]=Cs(K(()=>{su(n);const g=n._s.get(t);return o[p].call(g,g)})),v),{}))}return s=k_(t,u,e,n,r,!0),s}function k_(t,e,n={},r,a,i){let o;const l=Rr({actions:{}},n),s={deep:!0};let u,f,v=[],p=[],g;const c=r.state.value[t];!i&&!c&&(r.state.value[t]={}),W({});let d;function m(I){let P;u=f=!1,typeof I=="function"?(I(r.state.value[t]),P={type:ro.patchFunction,storeId:t,events:g}):(bf(r.state.value[t],I),P={type:ro.patchObject,payload:I,storeId:t,events:g});const k=d=Symbol();Ke().then(()=>{d===k&&(u=!0)}),f=!0,Da(v,P,r.state.value[t])}const h=i?function(){const{state:P}=n,k=P?P():{};this.$patch(L=>{Rr(L,k)})}:M_;function y(){o.stop(),v=[],p=[],r._s.delete(t)}function b(I,P){return function(){su(r);const k=Array.from(arguments),L=[],F=[];function j(M){L.push(M)}function z(M){F.push(M)}Da(p,{args:k,name:I,store:C,after:j,onError:z});let $;try{$=P.apply(this&&this.$id===t?this:C,k)}catch(M){throw Da(F,M),M}return $ instanceof Promise?$.then(M=>(Da(L,M),M)).catch(M=>(Da(F,M),Promise.reject(M))):(Da(L,$),$)}}const w={_p:r,$id:t,$onAction:xy.bind(null,p),$patch:m,$reset:h,$subscribe(I,P={}){const k=xy(v,I,P.detached,()=>L()),L=o.run(()=>pe(()=>r.state.value[t],F=>{(P.flush==="sync"?f:u)&&I({storeId:t,type:ro.direct,events:g},F)},Rr({},s,P)));return k},$dispose:y},C=rt(w);r._s.set(t,C);const _=r._a&&r._a.runWithContext||ez,E=r._e.run(()=>(o=Ef(),_(()=>o.run(e))));for(const I in E){const P=E[I];if(tt(P)&&!rz(P)||wr(P))i||(c&&nz(P)&&(tt(P)?P.value=c[I]:bf(P,c[I])),r.state.value[t][I]=P);else if(typeof P=="function"){const k=b(I,P);E[I]=k,l.actions[I]=P}}return Rr(C,E),Rr(Me(C),E),Object.defineProperty(C,"$state",{get:()=>r.state.value[t],set:I=>{m(P=>{Rr(P,I)})}}),r._p.forEach(I=>{Rr(C,o.run(()=>I({store:C,app:r._a,pinia:r,options:l})))}),c&&i&&n.hydrate&&n.hydrate(C.$state,c),u=!0,f=!0,C}function N_(t,e,n){let r,a;const i=typeof e=="function";typeof t=="string"?(r=t,a=i?n:e):(a=t,r=t.id);function o(l,s){const u=Tx();return l=l||(u?Xe(A_,null):null),l&&su(l),l=I_,l._s.has(r)||(i?k_(r,e,a,l):az(r,a,l)),l._s.get(r)}return o.$id=r,o}function iz(t){{t=Me(t);const e={};for(const n in t){const r=t[n];(tt(r)||wr(r))&&(e[n]=Kt(t,n))}return e}}const oz=t=>Yc({...t,name:typeof t.name=="string"?t.name:t.nameFallbackStr??""}),lz=t=>({...t,panes:t.panes.map(oz)}),Wo=N_("useGlobalStore",()=>{const t=W(),e=W([]),n=W(!0),r=W(512),a=W(Av.CREATED_TIME_DESC),i=W(256),o=()=>({type:"empty",name:ke("emptyStartPage"),key:br()}),l=W([]);Re(()=>{const b=o();l.value.push({panes:[b],key:b.key,id:br()})});const s=W(),u=W(new Array),f=Date.now(),v=W(),p=()=>{var w;const b=Me(l.value).map(lz);((w=v.value)==null?void 0:w[0].time)!==f?v.value=[{tabs:b,time:f},...v.value??[]]:v.value[0].tabs=b,v.value=v.value.slice(0,2)},g=async(b,w,C)=>{let _=l.value.map(I=>I.panes).flat().find(I=>I.type==="tag-search-matched-image-grid"&&I.id===w);if(_){_.selectedTagIds=Yc(C);return}else _={type:"tag-search-matched-image-grid",id:w,selectedTagIds:Yc(C),key:br(),name:ke("searchResults")};const E=l.value[b+1];E?(E.key=_.key,E.panes.push(_)):l.value.push({panes:[_],key:_.key,id:br()})},c=W(X1());pe(c,b=>wv.global.locale.value=b);const d=W(!1),m=W({delete:""}),h=K(()=>{const b=["outdir_extras_samples","outdir_save","outdir_txt2img_samples","outdir_img2img_samples","outdir_img2img_grids","outdir_txt2img_grids"],w=e.value.filter(C=>b.includes(C.key)).map(C=>[C.zh,C.dir]);return Object.fromEntries(w)}),y=rt({deleteOneOnly:!1});return{defaultSortingMethod:a,defaultGridCellWidth:i,pathAliasMap:h,createEmptyPane:o,lang:c,tabList:l,conf:t,quickMovePaths:e,enableThumbnail:n,dragingTab:s,saveRecord:p,recent:u,tabListHistoryRecord:v,gridThumbnailResolution:r,longPressOpenContextMenu:d,openTagSearchMatchedImageGridInRight:g,onlyFoldersAndImages:W(!0),fullscreenPreviewInitialUrl:W(""),shortcut:m,dontShowAgain:W(!1),dontShowAgainNewImgOpts:W(!1),ignoredConfirmActions:y}},{persist:{paths:["dontShowAgainNewImgOpts","defaultSortingMethod","defaultGridCellWidth","dontShowAgain","lang","enableThumbnail","tabListHistoryRecord","recent","gridThumbnailResolution","longPressOpenContextMenu","onlyFoldersAndImages","shortcut","ignoredConfirmActions"]}}),ao=encodeURIComponent,vs=(t,e=!1)=>`${Iv.value}/file?path=${ao(t.fullpath)}&t=${ao(t.date)}${e?`&disposition=${ao(t.name)}`:""}`,Py=(t,e="512x512")=>`${Iv.value}/image-thumbnail?path=${ao(t.fullpath)}&size=${e}&t=${ao(t.date)}`,sz=t=>typeof t=="object"&&t.__id==="FileTransferData",uz=t=>{var n;const e=JSON.parse(((n=t.dataTransfer)==null?void 0:n.getData("text"))??"{}");return sz(e)?e:null},j9=t=>Z1(t,"fullpath");function cz(t){var r;if(typeof t!="string")return!1;const e=[".jpg",".jpeg",".png",".gif",".bmp",".webp"],n=(r=t.split(".").pop())==null?void 0:r.toLowerCase();return n!==void 0&&e.includes(`.${n}`)}function z9(t){const e=document.createElement("a");e.style.display="none",document.body.appendChild(e),t.forEach(n=>{e.href=n,e.download="",e.click()}),document.body.removeChild(e)}function $_(){try{return parent.window.gradioApp()}catch{}const t=parent.document.getElementsByTagName("gradio-app"),e=t.length==0?null:t[0].shadowRoot;return e||document}const fz=()=>{const t=$_().querySelectorAll("#tabs > .tabitem[id^=tab_]");return Array.from(t).findIndex(e=>e.id.includes("infinite-image-browsing"))},dz=()=>{try{$_().querySelector("#tabs").querySelectorAll("button")[fz()].click()}catch(t){console.error(t)}},vz=async(t,e=100,n=1e3)=>new Promise(r=>{const a=(i=0)=>{const o=t();o!=null||i>n/e?r(o):setTimeout(()=>a(++i),e)};a()}),pz=(t,...e)=>e.reduce((n,r)=>(n[r]=t==null?void 0:t[r],n),{}),hz=()=>rt(new Io(-1,0,-1,"throw")),W9=async(t,e)=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(t);else{const n=document.createElement("input");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}ba.success(e??ke("copied"))}catch{ba.error("copy failed. maybe it's non-secure environment")}},{useEventListen:Ey,eventEmitter:R_}=Q1();function V9(t){let e=null,n=!1;return async function(...r){if(n)return e;n=!0;try{return e=t.apply(this,r),await e}finally{n=!1}}}function mz(t){const e=parent.location.href,n=new URLSearchParams(parent.location.search);t.forEach(a=>{n.delete(a)});const r=`${e.split("?")[0]}${n.size?"?":""}${n.toString()}`;return parent.history.pushState(null,"",r),r}const gz=t=>new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=a=>n(a),r.src=t});function yz(t){return/^(?:\/|[a-z]:)/i.test(di(t))}function di(t){if(!t)return"";t=t.replace(/\\/g,"/"),t=t.replace(/\/+/g,"/");const e=t.split("/"),n=[];for(let i=0;i{const n=yz(t)?t:di(bz(e,t));return di(n)},H9=t=>{t=di(t);const e=t.split("/").filter(n=>n);return e[0].endsWith(":")&&(e[0]=e[0]+"/"),e},Oy=async({global_setting:t,sd_cwd:e,home:n,extra_paths:r,cwd:a})=>{const o={...pz(t,"outdir_grids","outdir_extras_samples","outdir_img2img_grids","outdir_img2img_samples","outdir_grids","outdir_extras_samples","outdir_samples","outdir_txt2img_grids","outdir_txt2img_samples","outdir_save"),cwd:e,home:n,desktop:`${n}/Desktop`};Object.keys(o).forEach(p=>{const g=p;if(o[g])try{o[g]=wz(o[g],e)}catch(c){console.error(c)}});const l=await Yj(Object.values(o).filter(p=>p)),s={outdir_txt2img_samples:ke("t2i"),outdir_img2img_samples:ke("i2i"),outdir_save:ke("saveButtonSavesTo"),outdir_extras_samples:ke("extra"),outdir_grids:ke("gridImage"),outdir_img2img_grids:ke("i2i-grid"),outdir_samples:ke("image"),outdir_txt2img_grids:ke("t2i-grid"),cwd:ke("workingFolder"),home:"home",desktop:ke("desktop")},u={home:n,[ke("desktop")]:o.desktop,[ke("workingFolder")]:a,[ke("t2i")]:o.outdir_txt2img_samples,[ke("i2i")]:o.outdir_img2img_samples},f=p=>{p=di(p);const g=[];for(const[c,d]of Object.entries(u))c&&d&&g.push(p.replace(d,"$"+c));return g.sort((c,d)=>c.length-d.length)[0]},v=Object.keys(s).filter(p=>l[o[p]]).map(p=>{const g=p;return{key:g,zh:s[g],dir:o[g],can_delete:!1,type:"preset"}}).concat(r.map(p=>({key:p.path,zh:f(p.path),dir:p.path,can_delete:!0,type:p.type})));return Z1(v,p=>p.key+p.type)};const L_={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let n=0;this.panes=this.panes.map((r,a)=>(r.size=a===e?r.max:r.min,a!==e&&(n+=r.min),r)),this.panes[e].size-=n,this.$emit("pane-maximize",this.panes[e]),this.$emit("resized",this.panes.map(r=>({min:r.min,max:r.max,size:r.size})))},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:n,clientY:r}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:n-e.left,y:r-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),t*100/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const r=0+(this.pushOtherPanes?0:n.prevPanesSize),a=100-(this.pushOtherPanes?0:n.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(t),a),r);let o=[e,e+1],l=this.panes[o[0]]||null,s=this.panes[o[1]]||null;const u=l.max<100&&i>=l.max+n.prevPanesSize,f=s.max<100&&i<=100-(s.max+this.sumNextPanesSize(e+1));if(u||f){u?(l.size=l.max,s.size=Math.max(100-l.max-n.prevPanesSize-n.nextPanesSize,0)):(l.size=Math.max(100-s.max-n.prevPanesSize-this.sumNextPanesSize(e+1),0),s.size=s.max);return}if(this.pushOtherPanes){const v=this.doPushOtherPanes(n,i);if(!v)return;({sums:n,panesToResize:o}=v),l=this.panes[o[0]]||null,s=this.panes[o[1]]||null}l!==null&&(l.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),s!==null&&(s.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,s.min),s.max))},doPushOtherPanes(t,e){const n=this.touch.activeSplitter,r=[n,n+1];return e{i>r[0]&&i<=n&&(a.size=a.min,t.prevReachedMinPanes+=a.min)}),t.prevPanesSize=this.sumPrevPanesSize(r[0]),r[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((a,i)=>{i>0&&i<=n&&(a.size=a.min,t.prevReachedMinPanes+=a.min)}),this.panes[r[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,t.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach((a,i)=>{i>n&&i{i=n+1&&(a.size=a.min,t.nextReachedMinPanes+=a.min)}),this.panes[r[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:r}},sumPrevPanesSize(t){return this.panes.reduce((e,n,r)=>e+(re+(r>t+1?n.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.indexe.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),n=t.classList.contains("splitpanes__splitter");!e&&!n&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))})},addSplitter(t,e,n=!1){const r=t-1,a=document.createElement("div");a.classList.add("splitpanes__splitter"),n||(a.onmousedown=i=>this.onMouseDown(i,r),typeof window<"u"&&"ontouchstart"in window&&(a.ontouchstart=i=>this.onMouseDown(i,r)),a.onclick=i=>this.onSplitterClick(i,r+1)),this.dblClickSplitter&&(a.ondblclick=i=>this.onSplitterDblClick(i,r+1)),e.parentNode.insertBefore(a,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let e=0;t.forEach(n=>{n.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,n,!0):e&&this.addSplitter(e,n),e++)})},requestUpdate({target:t,...e}){const n=this.indexedPanes[t._.uid];Object.entries(e).forEach(([r,a])=>n[r]=a)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(a=>(a.className.includes("splitpanes__pane")&&e++,a===t.$el));const n=parseFloat(t.minSize),r=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((a,i)=>a.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(a=>({min:a.min,max:a.max,size:a.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(r=>r.id===t._.uid),n=this.panes.splice(e,1)[0];this.panes.forEach((r,a)=>r.index=a),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:e}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const n=[],r=[];this.panes.forEach(a=>{a.size=Math.max(Math.min(t,a.max),a.min),e-=a.size,a.size>=a.max&&n.push(a.id),a.size<=a.min&&r.push(a.id)}),e>.1&&this.readjustSizes(e,n,r)},initialPanesSizing(){let t=100;const e=[],n=[];let r=0;this.panes.forEach(i=>{t-=i.size,i.size!==null&&r++,i.size>=i.max&&e.push(i.id),i.size<=i.min&&n.push(i.id)});let a=100;t>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(t/(this.panesCount-r),i.max),i.min)),a-=i.size}),a>.1&&this.readjustSizes(t,e,n))},equalizeAfterAddOrRemove({addedPane:t,removedPane:e}={}){let n=100/this.panesCount,r=0;const a=[],i=[];t&&t.givenSize!==null&&(n=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(o=>{r-=o.size,o.size>=o.max&&a.push(o.id),o.size<=o.min&&i.push(o.id)}),!(Math.abs(r)<.1)&&(this.panes.forEach(o=>{t&&t.givenSize!==null&&t.id===o.id||(o.size=Math.max(Math.min(n,o.max),o.min)),r-=o.size,o.size>=o.max&&a.push(o.id),o.size<=o.min&&i.push(o.id)}),r>.1&&this.readjustSizes(r,a,i))},readjustSizes(t,e,n){let r;t>0?r=t/(this.panesCount-e.length):r=t/(this.panesCount-n.length),this.panes.forEach((a,i)=>{if(t>0&&!e.includes(a.id)){const o=Math.max(Math.min(a.size+r,a.max),a.min),l=o-a.size;t-=l,a.size=o}else if(!n.includes(a.id)){const o=Math.max(Math.min(a.size+r,a.max),a.min),l=o-a.size;t-=l,a.size=o}a.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[a.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,n)=>{e.ondblclick=t?r=>this.onSplitterDblClick(r,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Kr("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},Cz=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},_z={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function Sz(t,e,n,r,a,i){return Ye(),an("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=o=>i.onPaneClick(o,t._.uid)),style:vi(t.style)},[Wl(t.$slots,"default")],4)}const wf=Cz(_z,[["render",Sz]]);function Mv(t){return Of()?(qy(t),!0):!1}function kv(t){return typeof t=="function"?t():xe(t)}const D_=typeof window<"u",Nv=()=>{};function xz(t,e){function n(...r){return new Promise((a,i)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(a).catch(i)})}return n}const F_=t=>t();function Pz(t=F_){const e=W(!0);function n(){e.value=!1}function r(){e.value=!0}const a=(...i)=>{e.value&&t(...i)};return{isActive:ws(e),pause:n,resume:r,eventFilter:a}}function Ez(...t){if(t.length!==1)return Kt(...t);const e=t[0];return typeof e=="function"?ws(WS(()=>({get:e,set:Nv}))):W(e)}function Oz(t,e=!0){bt()?Re(t):e?t():Ke(t)}var Ty=Object.getOwnPropertySymbols,Tz=Object.prototype.hasOwnProperty,Iz=Object.prototype.propertyIsEnumerable,Az=(t,e)=>{var n={};for(var r in t)Tz.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ty)for(var r of Ty(t))e.indexOf(r)<0&&Iz.call(t,r)&&(n[r]=t[r]);return n};function Mz(t,e,n={}){const r=n,{eventFilter:a=F_}=r,i=Az(r,["eventFilter"]);return pe(t,xz(a,e),i)}var kz=Object.defineProperty,Nz=Object.defineProperties,$z=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,j_=Object.prototype.propertyIsEnumerable,Iy=(t,e,n)=>e in t?kz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rz=(t,e)=>{for(var n in e||(e={}))B_.call(e,n)&&Iy(t,n,e[n]);if(ps)for(var n of ps(e))j_.call(e,n)&&Iy(t,n,e[n]);return t},Lz=(t,e)=>Nz(t,$z(e)),Dz=(t,e)=>{var n={};for(var r in t)B_.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ps)for(var r of ps(t))e.indexOf(r)<0&&j_.call(t,r)&&(n[r]=t[r]);return n};function Fz(t,e,n={}){const r=n,{eventFilter:a}=r,i=Dz(r,["eventFilter"]),{eventFilter:o,pause:l,resume:s,isActive:u}=Pz(a);return{stop:Mz(t,e,Lz(Rz({},i),{eventFilter:o})),pause:l,resume:s,isActive:u}}function Bz(t,e,n){let r;tt(n)?r={evaluating:n}:r=n||{};const{lazy:a=!1,evaluating:i=void 0,shallow:o=!0,onError:l=Nv}=r,s=W(!a),u=o?$n(e):W(e);let f=0;return st(async v=>{if(!s.value)return;f++;const p=f;let g=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const c=await t(d=>{v(()=>{i&&(i.value=!1),g||d()})});p===f&&(u.value=c)}catch(c){l(c)}finally{i&&p===f&&(i.value=!1),g=!0}}),a?K(()=>(s.value=!0,u.value)):u}function Hr(t){var e;const n=kv(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Sr=D_?window:void 0,jz=D_?window.document:void 0;function Pn(...t){let e,n,r,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,a]=t,e=Sr):[e,n,r,a]=t,!e)return Nv;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],o=()=>{i.forEach(f=>f()),i.length=0},l=(f,v,p,g)=>(f.addEventListener(v,p,g),()=>f.removeEventListener(v,p,g)),s=pe(()=>[Hr(e),kv(a)],([f,v])=>{o(),f&&i.push(...n.flatMap(p=>r.map(g=>l(f,p,g,v))))},{immediate:!0,flush:"post"}),u=()=>{s(),o()};return Mv(u),u}const zz=500;function U9(t,e,n){var r,a;const i=K(()=>Hr(t));let o;function l(){o&&(clearTimeout(o),o=void 0)}function s(f){var v,p,g,c;(v=n==null?void 0:n.modifiers)!=null&&v.self&&f.target!==i.value||(l(),(p=n==null?void 0:n.modifiers)!=null&&p.prevent&&f.preventDefault(),(g=n==null?void 0:n.modifiers)!=null&&g.stop&&f.stopPropagation(),o=setTimeout(()=>e(f),(c=n==null?void 0:n.delay)!=null?c:zz))}const u={capture:(r=n==null?void 0:n.modifiers)==null?void 0:r.capture,once:(a=n==null?void 0:n.modifiers)==null?void 0:a.once};Pn(i,"pointerdown",s,u),Pn(i,"pointerup",l,u),Pn(i,"pointerleave",l,u)}function Wz(){const t=W(!1);return bt()&&Re(()=>{t.value=!0}),t}function z_(t){const e=Wz();return K(()=>(e.value,!!t()))}function Vz(t,e={}){const{window:n=Sr}=e,r=z_(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let a;const i=W(!1),o=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",l):a.removeListener(l))},l=()=>{r.value&&(o(),a=n.matchMedia(Ez(t).value),i.value=!!(a!=null&&a.matches),a&&("addEventListener"in a?a.addEventListener("change",l):a.addListener(l)))};return st(l),Mv(()=>o()),i}const wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cl="__vueuse_ssr_handlers__",Hz=Uz();function Uz(){return Cl in wl||(wl[Cl]=wl[Cl]||{}),wl[Cl]}function Kz(t,e){return Hz[t]||e}function Gz(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var qz=Object.defineProperty,Ay=Object.getOwnPropertySymbols,Yz=Object.prototype.hasOwnProperty,Xz=Object.prototype.propertyIsEnumerable,My=(t,e,n)=>e in t?qz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ky=(t,e)=>{for(var n in e||(e={}))Yz.call(e,n)&&My(t,n,e[n]);if(Ay)for(var n of Ay(e))Xz.call(e,n)&&My(t,n,e[n]);return t};const Jz={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},Ny="vueuse-storage";function Qz(t,e,n,r={}){var a;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:s=!0,mergeDefaults:u=!1,shallow:f,window:v=Sr,eventFilter:p,onError:g=I=>{console.error(I)}}=r,c=(f?$n:W)(e);if(!n)try{n=Kz("getDefaultStorage",()=>{var I;return(I=Sr)==null?void 0:I.localStorage})()}catch(I){g(I)}if(!n)return c;const d=kv(e),m=Gz(d),h=(a=r.serializer)!=null?a:Jz[m],{pause:y,resume:b}=Fz(c,()=>w(c.value),{flush:i,deep:o,eventFilter:p});return v&&l&&(Pn(v,"storage",E),Pn(v,Ny,_)),E(),c;function w(I){try{if(I==null)n.removeItem(t);else{const P=h.write(I),k=n.getItem(t);k!==P&&(n.setItem(t,P),v&&v.dispatchEvent(new CustomEvent(Ny,{detail:{key:t,oldValue:k,newValue:P,storageArea:n}})))}}catch(P){g(P)}}function C(I){const P=I?I.newValue:n.getItem(t);if(P==null)return s&&d!==null&&n.setItem(t,h.write(d)),d;if(!I&&u){const k=h.read(P);return typeof u=="function"?u(k,d):m==="object"&&!Array.isArray(k)?ky(ky({},d),k):k}else return typeof P!="string"?P:h.read(P)}function _(I){E(I.detail)}function E(I){if(!(I&&I.storageArea!==n)){if(I&&I.key==null){c.value=d;return}if(!(I&&I.key!==t)){y();try{c.value=C(I)}catch(P){g(P)}finally{I?Ke(b):b()}}}}}function Zz(t){return Vz("(prefers-color-scheme: dark)",t)}function e7({document:t=jz}={}){if(!t)return W("visible");const e=W(t.visibilityState);return Pn(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var $y=Object.getOwnPropertySymbols,t7=Object.prototype.hasOwnProperty,n7=Object.prototype.propertyIsEnumerable,r7=(t,e)=>{var n={};for(var r in t)t7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$y)for(var r of $y(t))e.indexOf(r)<0&&n7.call(t,r)&&(n[r]=t[r]);return n};function a7(t,e,n={}){const r=n,{window:a=Sr}=r,i=r7(r,["window"]);let o;const l=z_(()=>a&&"ResizeObserver"in a),s=()=>{o&&(o.disconnect(),o=void 0)},u=K(()=>Array.isArray(t)?t.map(p=>Hr(p)):[Hr(t)]),f=pe(u,p=>{if(s(),l.value&&a){o=new ResizeObserver(e);for(const g of p)g&&o.observe(g,i)}},{immediate:!0,flush:"post",deep:!0}),v=()=>{s(),f()};return Mv(v),{isSupported:l,stop:v}}function i7(t,e={width:0,height:0},n={}){const{window:r=Sr,box:a="content-box"}=n,i=K(()=>{var s,u;return(u=(s=Hr(t))==null?void 0:s.namespaceURI)==null?void 0:u.includes("svg")}),o=W(e.width),l=W(e.height);return a7(t,([s])=>{const u=a==="border-box"?s.borderBoxSize:a==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;if(r&&i.value){const f=Hr(t);if(f){const v=r.getComputedStyle(f);o.value=parseFloat(v.width),l.value=parseFloat(v.height)}}else if(u){const f=Array.isArray(u)?u:[u];o.value=f.reduce((v,{inlineSize:p})=>v+p,0),l.value=f.reduce((v,{blockSize:p})=>v+p,0)}else o.value=s.contentRect.width,l.value=s.contentRect.height},n),pe(()=>Hr(t),s=>{o.value=s?e.width:0,l.value=s?e.height:0}),{width:o,height:l}}function K9(t,e,n={}){const{window:r=Sr}=n;return Qz(t,e,r==null?void 0:r.localStorage,n)}const o7={page:t=>[t.pageX,t.pageY],client:t=>[t.clientX,t.clientY],screen:t=>[t.screenX,t.screenY],movement:t=>t instanceof Touch?null:[t.movementX,t.movementY]};function l7(t={}){const{type:e="page",touch:n=!0,resetOnTouchEnds:r=!1,initialValue:a={x:0,y:0},window:i=Sr,target:o=i,eventFilter:l}=t,s=W(a.x),u=W(a.y),f=W(null),v=typeof e=="function"?e:o7[e],p=h=>{const y=v(h);y&&([s.value,u.value]=y,f.value="mouse")},g=h=>{if(h.touches.length>0){const y=v(h.touches[0]);y&&([s.value,u.value]=y,f.value="touch")}},c=()=>{s.value=a.x,u.value=a.y},d=l?h=>l(()=>p(h),{}):h=>p(h),m=l?h=>l(()=>g(h),{}):h=>g(h);return o&&(Pn(o,"mousemove",d,{passive:!0}),Pn(o,"dragover",d,{passive:!0}),n&&e!=="movement"&&(Pn(o,"touchstart",m,{passive:!0}),Pn(o,"touchmove",m,{passive:!0}),r&&Pn(o,"touchend",c,{passive:!0}))),{x:s,y:u,sourceType:f}}function Ry(t,e={}){const{handleOutside:n=!0,window:r=Sr}=e,{x:a,y:i,sourceType:o}=l7(e),l=W(t??(r==null?void 0:r.document.body)),s=W(0),u=W(0),f=W(0),v=W(0),p=W(0),g=W(0),c=W(!0);let d=()=>{};return r&&(d=pe([l,a,i],()=>{const m=Hr(l);if(!m)return;const{left:h,top:y,width:b,height:w}=m.getBoundingClientRect();f.value=h+r.pageXOffset,v.value=y+r.pageYOffset,p.value=w,g.value=b;const C=a.value-f.value,_=i.value-v.value;c.value=b===0||w===0||C<0||_<0||C>b||_>w,(n||!c.value)&&(s.value=C,u.value=_)},{immediate:!0}),Pn(document,"mouseleave",()=>{c.value=!0})),{x:a,y:i,sourceType:o,elementX:s,elementY:u,elementPositionX:f,elementPositionY:v,elementHeight:p,elementWidth:g,isOutside:c,stop:d}}const s7={style:{position:"relative"}},u7=fe({__name:"edgeTrigger",props:{tabIdx:{}},setup(t){const e=t,n=Wo(),r=W(),a=W(),{isOutside:i}=Ry(a),{isOutside:o}=Ry(r),l=K(()=>!i.value&&!!n.dragingTab),s=K(()=>!o.value&&!!n.dragingTab&&!l.value),u=(f,v)=>{var g,c,d,m;const p=JSON.parse(((g=f.dataTransfer)==null?void 0:g.getData("text"))??"{}");if(console.log("on-drop",v,p),(p==null?void 0:p.from)==="tab-drag"){if(f.stopPropagation(),n.dragingTab=void 0,v==="insert"&&p.tabIdx===e.tabIdx)return;const h=n.tabList,y=h[p.tabIdx].panes[p.paneIdx];h[p.tabIdx].panes.splice(p.paneIdx,1),v==="add-right"?(h[e.tabIdx].key=((c=h[e.tabIdx].panes[p.paneIdx-1])==null?void 0:c.key)??h[e.tabIdx].panes[0].key,h.splice(e.tabIdx+1,0,{panes:[y],key:y.key,id:br()})):(h[p.tabIdx].key=((d=h[p.tabIdx].panes[p.paneIdx-1])==null?void 0:d.key)??((m=h[p.tabIdx].panes[0])==null?void 0:m.key),h[e.tabIdx].panes.push(y),h[e.tabIdx].key=y.key),h[p.tabIdx].panes.length===0&&h.splice(p.tabIdx,1)}};return(f,v)=>(Ye(),an("div",{class:wa(["wrap",{accept:s.value}]),ref_key:"trigger",ref:r,onDragover:v[2]||(v[2]=Ln(()=>{},["prevent"])),onDrop:v[3]||(v[3]=Ln(p=>u(p,"insert"),["prevent"]))},[xn("div",{class:wa(["trigger",{accept:l.value}]),ref_key:"edgeTrigger",ref:a,onDragover:v[0]||(v[0]=Ln(()=>{},["prevent"])),onDrop:v[1]||(v[1]=Ln(p=>u(p,"add-right"),["prevent"]))},null,34),xn("div",s7,[Wl(f.$slots,"default",{},void 0,!0)])],34))}});const uu=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},c7=uu(u7,[["__scopeId","data-v-10c5aba4"]]);const W_=N_("useImgSliStore",()=>{const t=W(!1),e=W(!1),n=W(!1),r=W(),a=W(),i=Wo(),o=K(()=>{var s;const l=i.tabList;for(const u of l)if(((s=u.panes.find(f=>f.key===u.key))==null?void 0:s.type)==="img-sli")return!0;return!1});return{drawerVisible:e,fileDragging:t,left:r,right:a,imgSliActived:o,opened:n}}),f7=t=>(hb("data-v-279a61df"),t=t(),mb(),t),d7={key:0,class:"dragging-port-wrap"},v7={class:"content"},p7={key:0,class:"img-wrap"},h7={key:1},m7=f7(()=>xn("div",{style:{padding:"16px"}},null,-1)),g7={key:0,class:"img-wrap"},y7={key:1},b7={key:0,class:"tips",style:{"max-width":"30vw"}},w7={class:"actions"},C7=fe({__name:"DraggingPort",setup(t){const e=W_(),n=Wo(),{left:r,right:a}=iz(e),i=async(s,u)=>{const f=uz(s);if(f){const v=f.nodes[0];if(!cz(v.name))return;e[u]=v}},o=()=>{e.left=void 0,e.right=void 0,e.opened=!1},l=()=>{t_(r.value&&a.value);const s={type:"img-sli",left:r.value,right:a.value,name:`${ke("imgCompare")} ( ${r.value.name} vs ${a.value.name})`,key:br()};n.tabList[0].panes.push(s),n.tabList[0].key=s.key};return(s,u)=>{const f=wF,v=Tn;return Ye(),Xt(lr,null,{default:_t(()=>[(xe(e).fileDragging||xe(r)||xe(a)||xe(e).opened)&&!xe(e).imgSliActived?(Ye(),an("div",d7,[xn("h2",null,qn(s.$t("imgCompare")),1),xn("div",v7,[xn("div",{class:"left port",onDragover:u[1]||(u[1]=Ln(()=>{},["prevent"])),onDrop:u[2]||(u[2]=Ln(p=>i(p,"left"),["prevent"]))},[xe(r)?(Ye(),an("div",p7,[x(f,{src:xe(Py)(xe(r)),preview:{src:xe(vs)(xe(r))}},null,8,["src","preview"]),x(xe(Jl),{class:"close",onClick:u[0]||(u[0]=p=>r.value=void 0)})])):(Ye(),an("div",h7,qn(s.$t("dragImageHere")),1))],32),m7,xn("div",{class:"right port",onDragover:u[4]||(u[4]=Ln(()=>{},["prevent"])),onDrop:u[5]||(u[5]=Ln(p=>i(p,"right"),["prevent"]))},[xe(a)?(Ye(),an("div",g7,[x(f,{src:xe(Py)(xe(a)),preview:{src:xe(vs)(xe(a))}},null,8,["src","preview"]),x(xe(Jl),{class:"close",onClick:u[3]||(u[3]=p=>a.value=void 0)})])):(Ye(),an("div",y7,qn(s.$t("dragImageHere")),1))],32)]),xe(e).opened?(Ye(),an("p",b7," Tips: "+qn(s.$t("imageCompareTips")),1)):pa("",!0),xn("div",w7,[xe(r)&&xe(a)?(Ye(),Xt(v,{key:0,type:"primary",onClick:u[6]||(u[6]=p=>xe(e).drawerVisible=!0)},{default:_t(()=>[Fn(qn(s.$t("confirm")),1)]),_:1})):pa("",!0),xe(r)&&xe(a)?(Ye(),Xt(v,{key:1,type:"primary",onClick:l},{default:_t(()=>[Fn(qn(s.$t("confirm"))+"("+qn(s.$t("openInNewTab"))+")",1)]),_:1})):pa("",!0),x(v,{style:{"margin-left":"16px"},onClick:o},{default:_t(()=>[Fn(qn(s.$t("close")),1)]),_:1})])])):pa("",!0)]),_:1})}}});const _7=uu(C7,[["__scopeId","data-v-279a61df"]]),S7={class:"container"},x7=["src"],P7=fe({__name:"ImgSliSide",props:{side:{},containerWidth:{},img:{},maxEdge:{},percent:{}},setup(t){const e=t,n=K(()=>{let r="";const i=e.containerWidth;return e.side==="left"?r=`calc(50% - ${(e.percent-50)/100*i}px)`:r=`calc(-50% - ${(e.percent-50)/100*i+4}px)`,`${e.maxEdge==="width"?"width:100%":"height:100%"};transform: translate(${r}, -50%)`});return(r,a)=>(Ye(),an("div",S7,[xn("img",{class:wa(["img",[r.side]]),style:vi(n.value),src:xe(vs)(r.img),onDragstart:a[0]||(a[0]=Ln(()=>{},["prevent","stop"]))},null,46,x7)]))}});const Ly=uu(P7,[["__scopeId","data-v-65d66859"]]),E7=fe({__name:"ImgSliComparePane",props:{left:{},right:{}},setup(t,{expose:e}){const n=t,r=W(50),a=([{size:u}])=>{r.value=u},i=W(),{width:o}=i7(i);e({requestFullScreen:()=>{var u;(u=i.value)==null||u.requestFullscreen()}});const s=Bz(async()=>{if(!n.left)return"width";const u=await gz(vs(n.left)),f=u.width/u.height,v=document.body.clientWidth/document.body.clientHeight;return f>v?"width":"height"});return(u,f)=>(Ye(),an("div",{ref_key:"wrapperEl",ref:i,style:{height:"100%"}},[x(xe(L_),{class:"default-theme",onResize:a},{default:_t(()=>[u.left?(Ye(),Xt(xe(wf),{key:0},{default:_t(()=>[x(Ly,{side:"left","max-edge":xe(s),"container-width":xe(o),percent:r.value,img:u.left},null,8,["max-edge","container-width","percent","img"])]),_:1})):pa("",!0),u.right?(Ye(),Xt(xe(wf),{key:1},{default:_t(()=>[x(Ly,{"max-edge":xe(s),percent:r.value,img:u.right,side:"right","container-width":xe(o)},null,8,["max-edge","percent","img","container-width"])]),_:1})):pa("",!0)]),_:1})],512))}});const O7={class:"actions"},T7=fe({__name:"ImgSliDrawer",setup(t){const e=W_(),n=W();return(r,a)=>{const i=Tn,o=v4;return Ye(),an(De,null,[x(o,{width:"100vw",visible:xe(e).drawerVisible,"onUpdate:visible":a[2]||(a[2]=l=>xe(e).drawerVisible=l),"destroy-on-close":"",class:"img-sli","close-icon":null},{footer:_t(()=>[xn("div",O7,[x(i,{onClick:a[0]||(a[0]=l=>xe(e).drawerVisible=!1)},{default:_t(()=>[Fn(qn(r.$t("close")),1)]),_:1}),x(i,{onClick:a[1]||(a[1]=l=>{var s;return(s=n.value)==null?void 0:s.requestFullScreen()})},{default:_t(()=>[Fn(qn(r.$t("fullscreenview")),1)]),_:1})])]),default:_t(()=>[xe(e).left&&xe(e).right?(Ye(),Xt(E7,{key:0,ref_key:"splitpane",ref:n,left:xe(e).left,right:xe(e).right},null,8,["left","right"])):pa("",!0)]),_:1},8,["visible"]),x(_7)],64)}}});const I7=fe({__name:"SplitViewTab",setup(t){const e=Wo(),n={local:Ir(()=>mr(()=>import("./stackView-26df897b.js"),["assets/stackView-26df897b.js","assets/fullScreenContextMenu-ce458082.js","assets/FileItem-51205eb2.js","assets/db-4c0a2bd4.js","assets/shortcut-42287857.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/fullScreenContextMenu-8d6d6030.css","assets/numInput-e2a9cc11.js","assets/numInput-a08c6857.css","assets/stackView-60dc1bed.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),empty:Ir(()=>mr(()=>import("./emptyStartup-a333b1c3.js"),["assets/emptyStartup-a333b1c3.js","assets/db-4c0a2bd4.js","assets/emptyStartup-feba1fd7.css"])),"global-setting":Ir(()=>mr(()=>import("./globalSetting-e33f2a88.js"),["assets/globalSetting-e33f2a88.js","assets/numInput-e2a9cc11.js","assets/shortcut-42287857.js","assets/shortcut-9fed83c2.css","assets/numInput-a08c6857.css","assets/globalSetting-bc7be568.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"tag-search-matched-image-grid":Ir(()=>mr(()=>import("./MatchedImageGrid-804e84a4.js"),["assets/MatchedImageGrid-804e84a4.js","assets/fullScreenContextMenu-ce458082.js","assets/FileItem-51205eb2.js","assets/db-4c0a2bd4.js","assets/shortcut-42287857.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/fullScreenContextMenu-8d6d6030.css","assets/hook-7463589c.js","assets/MatchedImageGrid-4f83f417.css"])),"tag-search":Ir(()=>mr(()=>import("./TagSearch-7cc1cee3.js"),["assets/TagSearch-7cc1cee3.js","assets/db-4c0a2bd4.js","assets/TagSearch-ffd782da.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"fuzzy-search":Ir(()=>mr(()=>import("./SubstrSearch-37367b93.js"),["assets/SubstrSearch-37367b93.js","assets/fullScreenContextMenu-ce458082.js","assets/FileItem-51205eb2.js","assets/db-4c0a2bd4.js","assets/shortcut-42287857.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/fullScreenContextMenu-8d6d6030.css","assets/hook-7463589c.js","assets/SubstrSearch-9d37606f.css","assets/index-f4bbe4b8.css"])),"img-sli":Ir(()=>mr(()=>import("./ImgSliPagePane-935db780.js"),[])),"batch-download":Ir(()=>mr(()=>import("./batchDownload-a9902fb1.js"),["assets/batchDownload-a9902fb1.js","assets/FileItem-51205eb2.js","assets/db-4c0a2bd4.js","assets/shortcut-42287857.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/batchDownload-08be3fc5.css"]))},r=(o,l,s)=>{var f,v;const u=e.tabList[o];if(s==="add"){const p={type:"empty",key:br(),name:ke("emptyStartPage")};u.panes.push(p),u.key=p.key}else{const p=u.panes.findIndex(g=>g.key===l);if(u.key===l&&(u.key=((f=u.panes[p-1])==null?void 0:f.key)??((v=u.panes[1])==null?void 0:v.key)),u.panes.splice(p,1),u.panes.length===0&&e.tabList.splice(o,1),e.tabList.length===0){const g=e.createEmptyPane();e.tabList.push({panes:[g],key:g.key,id:br()})}}},a=W();pe(()=>e.tabList,async()=>{var o;await Ke(),e.saveRecord(),Array.from(((o=a.value)==null?void 0:o.querySelectorAll(".splitpanes__pane"))??[]).forEach((l,s)=>{Array.from(l.querySelectorAll(".ant-tabs-tab")??[]).forEach((u,f)=>{const v=u;v.setAttribute("draggable","true"),v.setAttribute("tabIdx",s.toString()),v.setAttribute("paneIdx",f.toString()),v.ondragend=()=>{e.dragingTab=void 0},v.ondragstart=p=>{e.dragingTab={tabIdx:s,paneIdx:f},p.dataTransfer.setData("text/plain",JSON.stringify({tabIdx:s,paneIdx:f,from:"tab-drag"}))}})})},{immediate:!0,deep:!0});const i=qc(()=>R_.emit("returnToIIB"),100);return Oz(async()=>{const o=window.parent;if(!await vz(()=>o==null?void 0:o.onUiTabChange,200,3e4)){console.log("watch tab change failed");return}o.onUiTabChange(()=>{const l=o.get_uiCurrentTabContent();l!=null&&l.id.includes("infinite-image-browsing")&&i()})}),pe(e7(),o=>o&&i()),(o,l)=>{const s=ls,u=Qi;return Ye(),an("div",{ref_key:"container",ref:a},[x(xe(L_),{class:"default-theme"},{default:_t(()=>[(Ye(!0),an(De,null,Xv(xe(e).tabList,(f,v)=>(Ye(),Xt(xe(wf),{key:f.id},{default:_t(()=>[x(c7,{tabIdx:v},{default:_t(()=>[x(u,{type:"editable-card",activeKey:f.key,"onUpdate:activeKey":p=>f.key=p,onEdit:(p,g)=>r(v,p,g)},{default:_t(()=>[(Ye(!0),an(De,null,Xv(f.panes,(p,g)=>(Ye(),Xt(s,{key:p.key,tab:p.name,class:"pane"},{default:_t(()=>[(Ye(),Xt(yx(n[p.type]),Gf({tabIdx:v,paneIdx:g},p),null,16,["tabIdx","paneIdx"]))]),_:2},1032,["tab"]))),128))]),_:2},1032,["activeKey","onUpdate:activeKey","onEdit"])]),_:2},1032,["tabIdx"])]),_:2},1024))),128))]),_:1}),x(T7)],512)}}});const A7=uu(I7,[["__scopeId","data-v-c479b9de"]]),M7=async t=>{var r;const e=(r=t.conf)==null?void 0:r.global_setting,n=new URLSearchParams(parent.location.search);switch(n.get("action")){case"open":{let a=n.get("path");if(!a||!e)return;const i={extra:e.outdir_extras_samples,save:e.outdir_save,txt2img:e.outdir_txt2img_samples,img2img:e.outdir_img2img_samples};i[a]&&(a=i[a]);const o=t.tabList[0],l={type:"local",path:a,key:br(),name:"",walkModePath:n.get("walk")?a:void 0};o.panes.unshift(l),o.key=l.key,dz(),mz(["action","path","walk"]);break}}};function Dy(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!nr(t)}const V_="app.conf.json",io=W(),H_=()=>Ao.writeFile(V_,JSON.stringify(Me(io.value),null,4)),k7=fe({setup(){const t=async()=>{const e=await x_({directory:!0});if(typeof e=="string"){if(!await Ao.exists(`${e}/config.json`))return ba.error(ke("tauriLaunchConfMessages.configNotFound"));if(!await Ao.exists(`${e}/extensions/sd-webui-infinite-image-browsing`))return ba.error(ke("tauriLaunchConfMessages.folderNotFound"));io.value.sdwebui_dir=e,ba.info(ke("tauriLaunchConfMessages.configCompletedMessage")),await H_(),await lu("shutdown_api_server_command"),await ou(1500),await C_()}};return()=>{let e,n;return x("div",{style:{padding:"32px 0"}},[x("div",{style:{padding:"16px 0"}},[x("h2",null,[ke("tauriLaunchConf.readSdWebuiConfigTitle")]),x("p",null,[ke("tauriLaunchConf.readSdWebuiConfigDescription")]),x(Tn,{onClick:t,type:"primary"},Dy(e=ke("tauriLaunchConf.selectSdWebuiFolder"))?e:{default:()=>[e]})]),x("div",{style:{padding:"16px 0"}},[x("h2",null,[ke("tauriLaunchConf.skipThisConfigTitle")]),x("p",null,[ke("tauriLaunchConf.skipThisConfigDescription")]),x(Tn,{type:"primary",onClick:Bt.destroyAll},Dy(n=ke("tauriLaunchConf.skipButton"))?n:{default:()=>[n]})])])}}}),N7=async()=>{try{io.value=JSON.parse(await Ao.readTextFile(V_))}catch{}io.value||(io.value={sdwebui_dir:""},await H_(),Bt.info({title:ke("tauriLaunchConfMessages.firstTimeUserTitle"),content:x(k7,null,null),width:"80vw",okText:ke("tauriLaunchConf.skipButton"),okButtonProps:{onClick:Bt.destroyAll}}))},$7=!!{}.TAURI_ARCH,R7=fe({__name:"App",setup(t){const e=Wo(),n=hz();return Ey("updateGlobalSetting",async()=>{await Uj(),console.log(ds.value);const r=await qj();e.conf=r;const a=await Oy(r);e.quickMovePaths=a.filter(i=>{var o,l;return(l=(o=i==null?void 0:i.dir)==null?void 0:o.trim)==null?void 0:l.call(o)}),M7(e)}),Ey("returnToIIB",async()=>{const r=e.conf;if(!r)return;const a=r.global_setting;if(!a.outdir_txt2img_samples&&!a.outdir_img2img_samples)return;const i=new Set(e.quickMovePaths.map(l=>l.key));if(i.has("outdir_txt2img_samples")&&i.has("outdir_img2img_samples"))return;const o=await Oy(r);e.quickMovePaths=o.filter(l=>{var s,u;return(u=(s=l==null?void 0:l.dir)==null?void 0:s.trim)==null?void 0:u.call(s)})}),Re(async()=>{$7&&N7(),R_.emit("updateGlobalSetting")}),(r,a)=>{const i=rn;return Ye(),Xt(i,{loading:!xe(n).isIdle},{default:_t(()=>[x(A7)]),_:1},8,["loading"])}}});function L7(t){return typeof t=="object"&&t!==null}function Fy(t,e){return t=L7(t)?t:Object.create(null),new Proxy(t,{get(n,r,a){return r==="key"?Reflect.get(n,r,a):Reflect.get(n,r,a)||Reflect.get(e,r,a)}})}function D7(t,e){return e.reduce((n,r)=>n==null?void 0:n[r],t)}function F7(t,e,n){return e.slice(0,-1).reduce((r,a)=>/^(__proto__)$/.test(a)?{}:r[a]=r[a]||{},t)[e[e.length-1]]=n,t}function B7(t,e){return e.reduce((n,r)=>{const a=r.split(".");return F7(n,a,D7(t,a))},{})}function By(t,{storage:e,serializer:n,key:r,debug:a}){try{const i=e==null?void 0:e.getItem(r);i&&t.$patch(n==null?void 0:n.deserialize(i))}catch(i){a&&console.error(i)}}function jy(t,{storage:e,serializer:n,key:r,paths:a,debug:i}){try{const o=Array.isArray(a)?B7(t,a):t;e.setItem(r,n.serialize(o))}catch(o){i&&console.error(o)}}function j7(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:r=n},store:a}=e;if(!r)return;const i=(Array.isArray(r)?r.map(o=>Fy(o,t)):[Fy(r,t)]).map(({storage:o=localStorage,beforeRestore:l=null,afterRestore:s=null,serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},key:f=a.$id,paths:v=null,debug:p=!1})=>{var g;return{storage:o,beforeRestore:l,afterRestore:s,serializer:u,key:((g=t.key)!=null?g:c=>c)(f),paths:v,debug:p}});a.$persist=()=>{i.forEach(o=>{jy(a.$state,o)})},a.$hydrate=({runHooks:o=!0}={})=>{i.forEach(l=>{const{beforeRestore:s,afterRestore:u}=l;o&&(s==null||s(e)),By(a,l),o&&(u==null||u(e))})},i.forEach(o=>{const{beforeRestore:l,afterRestore:s}=o;l==null||l(e),By(a,o),s==null||s(e),a.$subscribe((u,f)=>{jy(f,o)},{detached:!0})})}}var z7=j7();const U_=Zj();U_.use(z7);MP(R7).use(U_).use(wv).mount("#zanllp_dev_gradio_fe");const W7=Zz(),V7=()=>{try{return parent.location.search.includes("theme=dark")}catch{}return!1};pe([W7,V7],async([t,e])=>{await ou();const n=document.getElementsByTagName("html")[0];if(t||e){document.body.classList.add("dark");const r=document.createElement("style"),{default:a}=await mr(()=>import("./antd.dark-35e9b327.js"),[]);r.innerHTML=a,r.setAttribute("antd-dark",""),n.appendChild(r)}else document.body.classList.remove("dark"),Array.from(n.querySelectorAll("style[antd-dark]")).forEach(r=>r.remove())},{immediate:!0});export{W as $,Xv as A,vi as B,pa as C,PN as D,$7 as E,t9 as F,H7 as G,Wx as H,D9 as I,L9 as J,U7 as K,vs as L,Vr as M,wa as N,as as O,J as P,rn as Q,Bt as R,n_ as S,qN as T,At as U,Tn as V,Po as W,uu as X,No as Y,gi as Z,ut as _,T as a,$n as a$,ge as a0,Ci as a1,ar as a2,yt as a3,Ns as a4,or as a5,Is as a6,lr as a7,bT as a8,ST as a9,n$ as aA,Ce as aB,qc as aC,F9 as aD,Hj as aE,Ao as aF,V_ as aG,C_ as aH,Xe as aI,a9 as aJ,ct as aK,rm as aL,Qe as aM,n9 as aN,gI as aO,kT as aP,nh as aQ,Iw as aR,GD as aS,Ds as aT,y$ as aU,Zf as aV,_e as aW,ho as aX,B$ as aY,pO as aZ,_P as a_,id as aa,dT as ab,Y0 as ac,X0 as ad,Jl as ae,vd as af,lt as ag,x_ as ah,ke as ai,Kr as aj,Yj as ak,ba as al,R_ as am,W_ as an,K as ao,JR as ap,br as aq,t_ as ar,Yc as as,hb as at,mb as au,Bf as av,Re as aw,Ke as ax,xt as ay,Yl as az,ze as b,eC as b$,st as b0,fO as b1,e9 as b2,mi as b3,Me as b4,H$ as b5,Id as b6,_o as b7,ww as b8,S$ as b9,Fa as bA,Q7 as bB,KN as bC,cx as bD,q7 as bE,G7 as bF,Gf as bG,Hc as bH,J7 as bI,u0 as bJ,tC as bK,On as bL,Wn as bM,CC as bN,hz as bO,Ey as bP,V9 as bQ,IN as bR,m4 as bS,X7 as bT,hf as bU,_B as bV,mI as bW,s0 as bX,nr as bY,R9 as bZ,K9 as b_,_$ as ba,VR as bb,$R as bc,xC as bd,rr as be,Kd as bf,Us as bg,Do as bh,IE as bi,HR as bj,Ks as bk,_L as bl,kl as bm,rt as bn,Nt as bo,j2 as bp,Jt as bq,Z7 as br,Qw as bs,Zw as bt,Fw as bu,Le as bv,Gt as bw,Sn as bx,Aw as by,NE as bz,x as c,Eo as c0,E7 as c1,iz as c2,uz as c3,Si as c4,a$ as c5,HN as c6,QN as c7,jN as c8,r9 as c9,$9 as cA,ZS as cB,Cs as cC,FS as cD,Sb as cE,bx as cF,Wl as cG,yx as cH,K7 as cI,Gc as cJ,Y7 as cK,Py as cL,wF as cM,Xf as cN,Tm as cO,zn as ca,Od as cb,_d as cc,sb as cd,bt as ce,NT as cf,sd as cg,bz as ch,N_ as ci,gy as cj,j9 as ck,Av as cl,B9 as cm,cz as cn,Q1 as co,ou as cp,yz as cq,H9 as cr,di as cs,i7 as ct,Ry as cu,U9 as cv,Z1 as cw,wz as cx,z9 as cy,N9 as cz,fe as d,jn as e,pn as f,Wr as g,te as h,He as i,Bd as j,Wo as k,pe as l,Xt as m,_t as n,Ye as o,xn as p,Ln as q,xe as r,tt as s,W9 as t,Ze as u,qn as v,ks as w,Fn as x,an as y,De as z}; + */let I_;const su=t=>I_=t,A_=Symbol();function yf(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var ro;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(ro||(ro={}));function Zj(){const t=Ef(!0),e=t.run(()=>W({}));let n=[],r=[];const a=Cs({install(i){su(a),a._a=i,i.provide(A_,a),i.config.globalProperties.$pinia=a,r.forEach(o=>n.push(o)),r=[]},use(i){return!this._a&&!Qj?r.push(i):n.push(i),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return a}const M_=()=>{};function xy(t,e,n,r=M_){t.push(e);const a=()=>{const i=t.indexOf(e);i>-1&&(t.splice(i,1),r())};return!n&&Of()&&qy(a),a}function Da(t,...e){t.slice().forEach(n=>{n(...e)})}const ez=t=>t();function bf(t,e){t instanceof Map&&e instanceof Map&&e.forEach((n,r)=>t.set(r,n)),t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n],a=t[n];yf(a)&&yf(r)&&t.hasOwnProperty(n)&&!tt(r)&&!wr(r)?t[n]=bf(a,r):t[n]=r}return t}const tz=Symbol();function nz(t){return!yf(t)||!t.hasOwnProperty(tz)}const{assign:Rr}=Object;function rz(t){return!!(tt(t)&&t.effect)}function az(t,e,n,r){const{state:a,actions:i,getters:o}=e,l=n.state.value[t];let s;function u(){l||(n.state.value[t]=a?a():{});const f=sb(n.state.value[t]);return Rr(f,i,Object.keys(o||{}).reduce((v,p)=>(v[p]=Cs(K(()=>{su(n);const g=n._s.get(t);return o[p].call(g,g)})),v),{}))}return s=k_(t,u,e,n,r,!0),s}function k_(t,e,n={},r,a,i){let o;const l=Rr({actions:{}},n),s={deep:!0};let u,f,v=[],p=[],g;const c=r.state.value[t];!i&&!c&&(r.state.value[t]={}),W({});let d;function m(I){let P;u=f=!1,typeof I=="function"?(I(r.state.value[t]),P={type:ro.patchFunction,storeId:t,events:g}):(bf(r.state.value[t],I),P={type:ro.patchObject,payload:I,storeId:t,events:g});const k=d=Symbol();Ke().then(()=>{d===k&&(u=!0)}),f=!0,Da(v,P,r.state.value[t])}const h=i?function(){const{state:P}=n,k=P?P():{};this.$patch(L=>{Rr(L,k)})}:M_;function y(){o.stop(),v=[],p=[],r._s.delete(t)}function b(I,P){return function(){su(r);const k=Array.from(arguments),L=[],F=[];function j(M){L.push(M)}function z(M){F.push(M)}Da(p,{args:k,name:I,store:C,after:j,onError:z});let $;try{$=P.apply(this&&this.$id===t?this:C,k)}catch(M){throw Da(F,M),M}return $ instanceof Promise?$.then(M=>(Da(L,M),M)).catch(M=>(Da(F,M),Promise.reject(M))):(Da(L,$),$)}}const w={_p:r,$id:t,$onAction:xy.bind(null,p),$patch:m,$reset:h,$subscribe(I,P={}){const k=xy(v,I,P.detached,()=>L()),L=o.run(()=>pe(()=>r.state.value[t],F=>{(P.flush==="sync"?f:u)&&I({storeId:t,type:ro.direct,events:g},F)},Rr({},s,P)));return k},$dispose:y},C=rt(w);r._s.set(t,C);const _=r._a&&r._a.runWithContext||ez,E=r._e.run(()=>(o=Ef(),_(()=>o.run(e))));for(const I in E){const P=E[I];if(tt(P)&&!rz(P)||wr(P))i||(c&&nz(P)&&(tt(P)?P.value=c[I]:bf(P,c[I])),r.state.value[t][I]=P);else if(typeof P=="function"){const k=b(I,P);E[I]=k,l.actions[I]=P}}return Rr(C,E),Rr(Me(C),E),Object.defineProperty(C,"$state",{get:()=>r.state.value[t],set:I=>{m(P=>{Rr(P,I)})}}),r._p.forEach(I=>{Rr(C,o.run(()=>I({store:C,app:r._a,pinia:r,options:l})))}),c&&i&&n.hydrate&&n.hydrate(C.$state,c),u=!0,f=!0,C}function N_(t,e,n){let r,a;const i=typeof e=="function";typeof t=="string"?(r=t,a=i?n:e):(a=t,r=t.id);function o(l,s){const u=Tx();return l=l||(u?Xe(A_,null):null),l&&su(l),l=I_,l._s.has(r)||(i?k_(r,e,a,l):az(r,a,l)),l._s.get(r)}return o.$id=r,o}function iz(t){{t=Me(t);const e={};for(const n in t){const r=t[n];(tt(r)||wr(r))&&(e[n]=Kt(t,n))}return e}}const oz=t=>Yc({...t,name:typeof t.name=="string"?t.name:t.nameFallbackStr??""}),lz=t=>({...t,panes:t.panes.map(oz)}),Wo=N_("useGlobalStore",()=>{const t=W(),e=W([]),n=W(!0),r=W(512),a=W(Av.CREATED_TIME_DESC),i=W(256),o=()=>({type:"empty",name:ke("emptyStartPage"),key:br()}),l=W([]);Re(()=>{const b=o();l.value.push({panes:[b],key:b.key,id:br()})});const s=W(),u=W(new Array),f=Date.now(),v=W(),p=()=>{var w;const b=Me(l.value).map(lz);((w=v.value)==null?void 0:w[0].time)!==f?v.value=[{tabs:b,time:f},...v.value??[]]:v.value[0].tabs=b,v.value=v.value.slice(0,2)},g=async(b,w,C)=>{let _=l.value.map(I=>I.panes).flat().find(I=>I.type==="tag-search-matched-image-grid"&&I.id===w);if(_){_.selectedTagIds=Yc(C);return}else _={type:"tag-search-matched-image-grid",id:w,selectedTagIds:Yc(C),key:br(),name:ke("searchResults")};const E=l.value[b+1];E?(E.key=_.key,E.panes.push(_)):l.value.push({panes:[_],key:_.key,id:br()})},c=W(X1());pe(c,b=>wv.global.locale.value=b);const d=W(!1),m=W({delete:""}),h=K(()=>{const b=["outdir_extras_samples","outdir_save","outdir_txt2img_samples","outdir_img2img_samples","outdir_img2img_grids","outdir_txt2img_grids"],w=e.value.filter(C=>b.includes(C.key)).map(C=>[C.zh,C.dir]);return Object.fromEntries(w)}),y=rt({deleteOneOnly:!1});return{defaultSortingMethod:a,defaultGridCellWidth:i,pathAliasMap:h,createEmptyPane:o,lang:c,tabList:l,conf:t,quickMovePaths:e,enableThumbnail:n,dragingTab:s,saveRecord:p,recent:u,tabListHistoryRecord:v,gridThumbnailResolution:r,longPressOpenContextMenu:d,openTagSearchMatchedImageGridInRight:g,onlyFoldersAndImages:W(!0),fullscreenPreviewInitialUrl:W(""),shortcut:m,dontShowAgain:W(!1),dontShowAgainNewImgOpts:W(!1),ignoredConfirmActions:y}},{persist:{paths:["dontShowAgainNewImgOpts","defaultSortingMethod","defaultGridCellWidth","dontShowAgain","lang","enableThumbnail","tabListHistoryRecord","recent","gridThumbnailResolution","longPressOpenContextMenu","onlyFoldersAndImages","shortcut","ignoredConfirmActions"]}}),ao=encodeURIComponent,vs=(t,e=!1)=>`${Iv.value}/file?path=${ao(t.fullpath)}&t=${ao(t.date)}${e?`&disposition=${ao(t.name)}`:""}`,Py=(t,e="512x512")=>`${Iv.value}/image-thumbnail?path=${ao(t.fullpath)}&size=${e}&t=${ao(t.date)}`,sz=t=>typeof t=="object"&&t.__id==="FileTransferData",uz=t=>{var n;const e=JSON.parse(((n=t.dataTransfer)==null?void 0:n.getData("text"))??"{}");return sz(e)?e:null},j9=t=>Z1(t,"fullpath");function cz(t){var r;if(typeof t!="string")return!1;const e=[".jpg",".jpeg",".png",".gif",".bmp",".webp"],n=(r=t.split(".").pop())==null?void 0:r.toLowerCase();return n!==void 0&&e.includes(`.${n}`)}function z9(t){const e=document.createElement("a");e.style.display="none",document.body.appendChild(e),t.forEach(n=>{e.href=n,e.download="",e.click()}),document.body.removeChild(e)}function $_(){try{return parent.window.gradioApp()}catch{}const t=parent.document.getElementsByTagName("gradio-app"),e=t.length==0?null:t[0].shadowRoot;return e||document}const fz=()=>{const t=$_().querySelectorAll("#tabs > .tabitem[id^=tab_]");return Array.from(t).findIndex(e=>e.id.includes("infinite-image-browsing"))},dz=()=>{try{$_().querySelector("#tabs").querySelectorAll("button")[fz()].click()}catch(t){console.error(t)}},vz=async(t,e=100,n=1e3)=>new Promise(r=>{const a=(i=0)=>{const o=t();o!=null||i>n/e?r(o):setTimeout(()=>a(++i),e)};a()}),pz=(t,...e)=>e.reduce((n,r)=>(n[r]=t==null?void 0:t[r],n),{}),hz=()=>rt(new Io(-1,0,-1,"throw")),W9=async(t,e)=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(t);else{const n=document.createElement("input");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}ba.success(e??ke("copied"))}catch{ba.error("copy failed. maybe it's non-secure environment")}},{useEventListen:Ey,eventEmitter:R_}=Q1();function V9(t){let e=null,n=!1;return async function(...r){if(n)return e;n=!0;try{return e=t.apply(this,r),await e}finally{n=!1}}}function mz(t){const e=parent.location.href,n=new URLSearchParams(parent.location.search);t.forEach(a=>{n.delete(a)});const r=`${e.split("?")[0]}${n.size?"?":""}${n.toString()}`;return parent.history.pushState(null,"",r),r}const gz=t=>new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=a=>n(a),r.src=t});function yz(t){return/^(?:\/|[a-z]:)/i.test(di(t))}function di(t){if(!t)return"";t=t.replace(/\\/g,"/"),t=t.replace(/\/+/g,"/");const e=t.split("/"),n=[];for(let i=0;i{const n=yz(t)?t:di(bz(e,t));return di(n)},H9=t=>{t=di(t);const e=t.split("/").filter(n=>n);return e[0].endsWith(":")&&(e[0]=e[0]+"/"),e},Oy=async({global_setting:t,sd_cwd:e,home:n,extra_paths:r,cwd:a})=>{const o={...pz(t,"outdir_grids","outdir_extras_samples","outdir_img2img_grids","outdir_img2img_samples","outdir_grids","outdir_extras_samples","outdir_samples","outdir_txt2img_grids","outdir_txt2img_samples","outdir_save"),cwd:e,home:n,desktop:`${n}/Desktop`};Object.keys(o).forEach(p=>{const g=p;if(o[g])try{o[g]=wz(o[g],e)}catch(c){console.error(c)}});const l=await Yj(Object.values(o).filter(p=>p)),s={outdir_txt2img_samples:ke("t2i"),outdir_img2img_samples:ke("i2i"),outdir_save:ke("saveButtonSavesTo"),outdir_extras_samples:ke("extra"),outdir_grids:ke("gridImage"),outdir_img2img_grids:ke("i2i-grid"),outdir_samples:ke("image"),outdir_txt2img_grids:ke("t2i-grid"),cwd:ke("workingFolder"),home:"home",desktop:ke("desktop")},u={home:n,[ke("desktop")]:o.desktop,[ke("workingFolder")]:a,[ke("t2i")]:o.outdir_txt2img_samples,[ke("i2i")]:o.outdir_img2img_samples},f=p=>{p=di(p);const g=[];for(const[c,d]of Object.entries(u))c&&d&&g.push(p.replace(d,"$"+c));return g.sort((c,d)=>c.length-d.length)[0]},v=Object.keys(s).filter(p=>l[o[p]]).map(p=>{const g=p;return{key:g,zh:s[g],dir:o[g],can_delete:!1,type:"preset"}}).concat(r.map(p=>({key:p.path,zh:f(p.path),dir:p.path,can_delete:!0,type:p.type})));return Z1(v,p=>p.key+p.type)};const L_={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let n=0;this.panes=this.panes.map((r,a)=>(r.size=a===e?r.max:r.min,a!==e&&(n+=r.min),r)),this.panes[e].size-=n,this.$emit("pane-maximize",this.panes[e]),this.$emit("resized",this.panes.map(r=>({min:r.min,max:r.max,size:r.size})))},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:n,clientY:r}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:n-e.left,y:r-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),t*100/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const r=0+(this.pushOtherPanes?0:n.prevPanesSize),a=100-(this.pushOtherPanes?0:n.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(t),a),r);let o=[e,e+1],l=this.panes[o[0]]||null,s=this.panes[o[1]]||null;const u=l.max<100&&i>=l.max+n.prevPanesSize,f=s.max<100&&i<=100-(s.max+this.sumNextPanesSize(e+1));if(u||f){u?(l.size=l.max,s.size=Math.max(100-l.max-n.prevPanesSize-n.nextPanesSize,0)):(l.size=Math.max(100-s.max-n.prevPanesSize-this.sumNextPanesSize(e+1),0),s.size=s.max);return}if(this.pushOtherPanes){const v=this.doPushOtherPanes(n,i);if(!v)return;({sums:n,panesToResize:o}=v),l=this.panes[o[0]]||null,s=this.panes[o[1]]||null}l!==null&&(l.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),s!==null&&(s.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,s.min),s.max))},doPushOtherPanes(t,e){const n=this.touch.activeSplitter,r=[n,n+1];return e{i>r[0]&&i<=n&&(a.size=a.min,t.prevReachedMinPanes+=a.min)}),t.prevPanesSize=this.sumPrevPanesSize(r[0]),r[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((a,i)=>{i>0&&i<=n&&(a.size=a.min,t.prevReachedMinPanes+=a.min)}),this.panes[r[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,t.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach((a,i)=>{i>n&&i{i=n+1&&(a.size=a.min,t.nextReachedMinPanes+=a.min)}),this.panes[r[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:r}},sumPrevPanesSize(t){return this.panes.reduce((e,n,r)=>e+(re+(r>t+1?n.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.indexe.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),n=t.classList.contains("splitpanes__splitter");!e&&!n&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))})},addSplitter(t,e,n=!1){const r=t-1,a=document.createElement("div");a.classList.add("splitpanes__splitter"),n||(a.onmousedown=i=>this.onMouseDown(i,r),typeof window<"u"&&"ontouchstart"in window&&(a.ontouchstart=i=>this.onMouseDown(i,r)),a.onclick=i=>this.onSplitterClick(i,r+1)),this.dblClickSplitter&&(a.ondblclick=i=>this.onSplitterDblClick(i,r+1)),e.parentNode.insertBefore(a,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let e=0;t.forEach(n=>{n.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,n,!0):e&&this.addSplitter(e,n),e++)})},requestUpdate({target:t,...e}){const n=this.indexedPanes[t._.uid];Object.entries(e).forEach(([r,a])=>n[r]=a)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(a=>(a.className.includes("splitpanes__pane")&&e++,a===t.$el));const n=parseFloat(t.minSize),r=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((a,i)=>a.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(a=>({min:a.min,max:a.max,size:a.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(r=>r.id===t._.uid),n=this.panes.splice(e,1)[0];this.panes.forEach((r,a)=>r.index=a),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:e}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const n=[],r=[];this.panes.forEach(a=>{a.size=Math.max(Math.min(t,a.max),a.min),e-=a.size,a.size>=a.max&&n.push(a.id),a.size<=a.min&&r.push(a.id)}),e>.1&&this.readjustSizes(e,n,r)},initialPanesSizing(){let t=100;const e=[],n=[];let r=0;this.panes.forEach(i=>{t-=i.size,i.size!==null&&r++,i.size>=i.max&&e.push(i.id),i.size<=i.min&&n.push(i.id)});let a=100;t>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(t/(this.panesCount-r),i.max),i.min)),a-=i.size}),a>.1&&this.readjustSizes(t,e,n))},equalizeAfterAddOrRemove({addedPane:t,removedPane:e}={}){let n=100/this.panesCount,r=0;const a=[],i=[];t&&t.givenSize!==null&&(n=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(o=>{r-=o.size,o.size>=o.max&&a.push(o.id),o.size<=o.min&&i.push(o.id)}),!(Math.abs(r)<.1)&&(this.panes.forEach(o=>{t&&t.givenSize!==null&&t.id===o.id||(o.size=Math.max(Math.min(n,o.max),o.min)),r-=o.size,o.size>=o.max&&a.push(o.id),o.size<=o.min&&i.push(o.id)}),r>.1&&this.readjustSizes(r,a,i))},readjustSizes(t,e,n){let r;t>0?r=t/(this.panesCount-e.length):r=t/(this.panesCount-n.length),this.panes.forEach((a,i)=>{if(t>0&&!e.includes(a.id)){const o=Math.max(Math.min(a.size+r,a.max),a.min),l=o-a.size;t-=l,a.size=o}else if(!n.includes(a.id)){const o=Math.max(Math.min(a.size+r,a.max),a.min),l=o-a.size;t-=l,a.size=o}a.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[a.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,n)=>{e.ondblclick=t?r=>this.onSplitterDblClick(r,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Kr("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},Cz=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},_z={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function Sz(t,e,n,r,a,i){return Ye(),an("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=o=>i.onPaneClick(o,t._.uid)),style:vi(t.style)},[Wl(t.$slots,"default")],4)}const wf=Cz(_z,[["render",Sz]]);function Mv(t){return Of()?(qy(t),!0):!1}function kv(t){return typeof t=="function"?t():xe(t)}const D_=typeof window<"u",Nv=()=>{};function xz(t,e){function n(...r){return new Promise((a,i)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(a).catch(i)})}return n}const F_=t=>t();function Pz(t=F_){const e=W(!0);function n(){e.value=!1}function r(){e.value=!0}const a=(...i)=>{e.value&&t(...i)};return{isActive:ws(e),pause:n,resume:r,eventFilter:a}}function Ez(...t){if(t.length!==1)return Kt(...t);const e=t[0];return typeof e=="function"?ws(WS(()=>({get:e,set:Nv}))):W(e)}function Oz(t,e=!0){bt()?Re(t):e?t():Ke(t)}var Ty=Object.getOwnPropertySymbols,Tz=Object.prototype.hasOwnProperty,Iz=Object.prototype.propertyIsEnumerable,Az=(t,e)=>{var n={};for(var r in t)Tz.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ty)for(var r of Ty(t))e.indexOf(r)<0&&Iz.call(t,r)&&(n[r]=t[r]);return n};function Mz(t,e,n={}){const r=n,{eventFilter:a=F_}=r,i=Az(r,["eventFilter"]);return pe(t,xz(a,e),i)}var kz=Object.defineProperty,Nz=Object.defineProperties,$z=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,B_=Object.prototype.hasOwnProperty,j_=Object.prototype.propertyIsEnumerable,Iy=(t,e,n)=>e in t?kz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rz=(t,e)=>{for(var n in e||(e={}))B_.call(e,n)&&Iy(t,n,e[n]);if(ps)for(var n of ps(e))j_.call(e,n)&&Iy(t,n,e[n]);return t},Lz=(t,e)=>Nz(t,$z(e)),Dz=(t,e)=>{var n={};for(var r in t)B_.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ps)for(var r of ps(t))e.indexOf(r)<0&&j_.call(t,r)&&(n[r]=t[r]);return n};function Fz(t,e,n={}){const r=n,{eventFilter:a}=r,i=Dz(r,["eventFilter"]),{eventFilter:o,pause:l,resume:s,isActive:u}=Pz(a);return{stop:Mz(t,e,Lz(Rz({},i),{eventFilter:o})),pause:l,resume:s,isActive:u}}function Bz(t,e,n){let r;tt(n)?r={evaluating:n}:r=n||{};const{lazy:a=!1,evaluating:i=void 0,shallow:o=!0,onError:l=Nv}=r,s=W(!a),u=o?$n(e):W(e);let f=0;return st(async v=>{if(!s.value)return;f++;const p=f;let g=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const c=await t(d=>{v(()=>{i&&(i.value=!1),g||d()})});p===f&&(u.value=c)}catch(c){l(c)}finally{i&&p===f&&(i.value=!1),g=!0}}),a?K(()=>(s.value=!0,u.value)):u}function Hr(t){var e;const n=kv(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Sr=D_?window:void 0,jz=D_?window.document:void 0;function Pn(...t){let e,n,r,a;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,a]=t,e=Sr):[e,n,r,a]=t,!e)return Nv;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],o=()=>{i.forEach(f=>f()),i.length=0},l=(f,v,p,g)=>(f.addEventListener(v,p,g),()=>f.removeEventListener(v,p,g)),s=pe(()=>[Hr(e),kv(a)],([f,v])=>{o(),f&&i.push(...n.flatMap(p=>r.map(g=>l(f,p,g,v))))},{immediate:!0,flush:"post"}),u=()=>{s(),o()};return Mv(u),u}const zz=500;function U9(t,e,n){var r,a;const i=K(()=>Hr(t));let o;function l(){o&&(clearTimeout(o),o=void 0)}function s(f){var v,p,g,c;(v=n==null?void 0:n.modifiers)!=null&&v.self&&f.target!==i.value||(l(),(p=n==null?void 0:n.modifiers)!=null&&p.prevent&&f.preventDefault(),(g=n==null?void 0:n.modifiers)!=null&&g.stop&&f.stopPropagation(),o=setTimeout(()=>e(f),(c=n==null?void 0:n.delay)!=null?c:zz))}const u={capture:(r=n==null?void 0:n.modifiers)==null?void 0:r.capture,once:(a=n==null?void 0:n.modifiers)==null?void 0:a.once};Pn(i,"pointerdown",s,u),Pn(i,"pointerup",l,u),Pn(i,"pointerleave",l,u)}function Wz(){const t=W(!1);return bt()&&Re(()=>{t.value=!0}),t}function z_(t){const e=Wz();return K(()=>(e.value,!!t()))}function Vz(t,e={}){const{window:n=Sr}=e,r=z_(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let a;const i=W(!1),o=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",l):a.removeListener(l))},l=()=>{r.value&&(o(),a=n.matchMedia(Ez(t).value),i.value=!!(a!=null&&a.matches),a&&("addEventListener"in a?a.addEventListener("change",l):a.addListener(l)))};return st(l),Mv(()=>o()),i}const wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cl="__vueuse_ssr_handlers__",Hz=Uz();function Uz(){return Cl in wl||(wl[Cl]=wl[Cl]||{}),wl[Cl]}function Kz(t,e){return Hz[t]||e}function Gz(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}var qz=Object.defineProperty,Ay=Object.getOwnPropertySymbols,Yz=Object.prototype.hasOwnProperty,Xz=Object.prototype.propertyIsEnumerable,My=(t,e,n)=>e in t?qz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ky=(t,e)=>{for(var n in e||(e={}))Yz.call(e,n)&&My(t,n,e[n]);if(Ay)for(var n of Ay(e))Xz.call(e,n)&&My(t,n,e[n]);return t};const Jz={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},Ny="vueuse-storage";function Qz(t,e,n,r={}){var a;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:s=!0,mergeDefaults:u=!1,shallow:f,window:v=Sr,eventFilter:p,onError:g=I=>{console.error(I)}}=r,c=(f?$n:W)(e);if(!n)try{n=Kz("getDefaultStorage",()=>{var I;return(I=Sr)==null?void 0:I.localStorage})()}catch(I){g(I)}if(!n)return c;const d=kv(e),m=Gz(d),h=(a=r.serializer)!=null?a:Jz[m],{pause:y,resume:b}=Fz(c,()=>w(c.value),{flush:i,deep:o,eventFilter:p});return v&&l&&(Pn(v,"storage",E),Pn(v,Ny,_)),E(),c;function w(I){try{if(I==null)n.removeItem(t);else{const P=h.write(I),k=n.getItem(t);k!==P&&(n.setItem(t,P),v&&v.dispatchEvent(new CustomEvent(Ny,{detail:{key:t,oldValue:k,newValue:P,storageArea:n}})))}}catch(P){g(P)}}function C(I){const P=I?I.newValue:n.getItem(t);if(P==null)return s&&d!==null&&n.setItem(t,h.write(d)),d;if(!I&&u){const k=h.read(P);return typeof u=="function"?u(k,d):m==="object"&&!Array.isArray(k)?ky(ky({},d),k):k}else return typeof P!="string"?P:h.read(P)}function _(I){E(I.detail)}function E(I){if(!(I&&I.storageArea!==n)){if(I&&I.key==null){c.value=d;return}if(!(I&&I.key!==t)){y();try{c.value=C(I)}catch(P){g(P)}finally{I?Ke(b):b()}}}}}function Zz(t){return Vz("(prefers-color-scheme: dark)",t)}function e7({document:t=jz}={}){if(!t)return W("visible");const e=W(t.visibilityState);return Pn(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var $y=Object.getOwnPropertySymbols,t7=Object.prototype.hasOwnProperty,n7=Object.prototype.propertyIsEnumerable,r7=(t,e)=>{var n={};for(var r in t)t7.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&$y)for(var r of $y(t))e.indexOf(r)<0&&n7.call(t,r)&&(n[r]=t[r]);return n};function a7(t,e,n={}){const r=n,{window:a=Sr}=r,i=r7(r,["window"]);let o;const l=z_(()=>a&&"ResizeObserver"in a),s=()=>{o&&(o.disconnect(),o=void 0)},u=K(()=>Array.isArray(t)?t.map(p=>Hr(p)):[Hr(t)]),f=pe(u,p=>{if(s(),l.value&&a){o=new ResizeObserver(e);for(const g of p)g&&o.observe(g,i)}},{immediate:!0,flush:"post",deep:!0}),v=()=>{s(),f()};return Mv(v),{isSupported:l,stop:v}}function i7(t,e={width:0,height:0},n={}){const{window:r=Sr,box:a="content-box"}=n,i=K(()=>{var s,u;return(u=(s=Hr(t))==null?void 0:s.namespaceURI)==null?void 0:u.includes("svg")}),o=W(e.width),l=W(e.height);return a7(t,([s])=>{const u=a==="border-box"?s.borderBoxSize:a==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;if(r&&i.value){const f=Hr(t);if(f){const v=r.getComputedStyle(f);o.value=parseFloat(v.width),l.value=parseFloat(v.height)}}else if(u){const f=Array.isArray(u)?u:[u];o.value=f.reduce((v,{inlineSize:p})=>v+p,0),l.value=f.reduce((v,{blockSize:p})=>v+p,0)}else o.value=s.contentRect.width,l.value=s.contentRect.height},n),pe(()=>Hr(t),s=>{o.value=s?e.width:0,l.value=s?e.height:0}),{width:o,height:l}}function K9(t,e,n={}){const{window:r=Sr}=n;return Qz(t,e,r==null?void 0:r.localStorage,n)}const o7={page:t=>[t.pageX,t.pageY],client:t=>[t.clientX,t.clientY],screen:t=>[t.screenX,t.screenY],movement:t=>t instanceof Touch?null:[t.movementX,t.movementY]};function l7(t={}){const{type:e="page",touch:n=!0,resetOnTouchEnds:r=!1,initialValue:a={x:0,y:0},window:i=Sr,target:o=i,eventFilter:l}=t,s=W(a.x),u=W(a.y),f=W(null),v=typeof e=="function"?e:o7[e],p=h=>{const y=v(h);y&&([s.value,u.value]=y,f.value="mouse")},g=h=>{if(h.touches.length>0){const y=v(h.touches[0]);y&&([s.value,u.value]=y,f.value="touch")}},c=()=>{s.value=a.x,u.value=a.y},d=l?h=>l(()=>p(h),{}):h=>p(h),m=l?h=>l(()=>g(h),{}):h=>g(h);return o&&(Pn(o,"mousemove",d,{passive:!0}),Pn(o,"dragover",d,{passive:!0}),n&&e!=="movement"&&(Pn(o,"touchstart",m,{passive:!0}),Pn(o,"touchmove",m,{passive:!0}),r&&Pn(o,"touchend",c,{passive:!0}))),{x:s,y:u,sourceType:f}}function Ry(t,e={}){const{handleOutside:n=!0,window:r=Sr}=e,{x:a,y:i,sourceType:o}=l7(e),l=W(t??(r==null?void 0:r.document.body)),s=W(0),u=W(0),f=W(0),v=W(0),p=W(0),g=W(0),c=W(!0);let d=()=>{};return r&&(d=pe([l,a,i],()=>{const m=Hr(l);if(!m)return;const{left:h,top:y,width:b,height:w}=m.getBoundingClientRect();f.value=h+r.pageXOffset,v.value=y+r.pageYOffset,p.value=w,g.value=b;const C=a.value-f.value,_=i.value-v.value;c.value=b===0||w===0||C<0||_<0||C>b||_>w,(n||!c.value)&&(s.value=C,u.value=_)},{immediate:!0}),Pn(document,"mouseleave",()=>{c.value=!0})),{x:a,y:i,sourceType:o,elementX:s,elementY:u,elementPositionX:f,elementPositionY:v,elementHeight:p,elementWidth:g,isOutside:c,stop:d}}const s7={style:{position:"relative"}},u7=fe({__name:"edgeTrigger",props:{tabIdx:{}},setup(t){const e=t,n=Wo(),r=W(),a=W(),{isOutside:i}=Ry(a),{isOutside:o}=Ry(r),l=K(()=>!i.value&&!!n.dragingTab),s=K(()=>!o.value&&!!n.dragingTab&&!l.value),u=(f,v)=>{var g,c,d,m;const p=JSON.parse(((g=f.dataTransfer)==null?void 0:g.getData("text"))??"{}");if(console.log("on-drop",v,p),(p==null?void 0:p.from)==="tab-drag"){if(f.stopPropagation(),n.dragingTab=void 0,v==="insert"&&p.tabIdx===e.tabIdx)return;const h=n.tabList,y=h[p.tabIdx].panes[p.paneIdx];h[p.tabIdx].panes.splice(p.paneIdx,1),v==="add-right"?(h[e.tabIdx].key=((c=h[e.tabIdx].panes[p.paneIdx-1])==null?void 0:c.key)??h[e.tabIdx].panes[0].key,h.splice(e.tabIdx+1,0,{panes:[y],key:y.key,id:br()})):(h[p.tabIdx].key=((d=h[p.tabIdx].panes[p.paneIdx-1])==null?void 0:d.key)??((m=h[p.tabIdx].panes[0])==null?void 0:m.key),h[e.tabIdx].panes.push(y),h[e.tabIdx].key=y.key),h[p.tabIdx].panes.length===0&&h.splice(p.tabIdx,1)}};return(f,v)=>(Ye(),an("div",{class:wa(["wrap",{accept:s.value}]),ref_key:"trigger",ref:r,onDragover:v[2]||(v[2]=Ln(()=>{},["prevent"])),onDrop:v[3]||(v[3]=Ln(p=>u(p,"insert"),["prevent"]))},[xn("div",{class:wa(["trigger",{accept:l.value}]),ref_key:"edgeTrigger",ref:a,onDragover:v[0]||(v[0]=Ln(()=>{},["prevent"])),onDrop:v[1]||(v[1]=Ln(p=>u(p,"add-right"),["prevent"]))},null,34),xn("div",s7,[Wl(f.$slots,"default",{},void 0,!0)])],34))}});const uu=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},c7=uu(u7,[["__scopeId","data-v-10c5aba4"]]);const W_=N_("useImgSliStore",()=>{const t=W(!1),e=W(!1),n=W(!1),r=W(),a=W(),i=Wo(),o=K(()=>{var s;const l=i.tabList;for(const u of l)if(((s=u.panes.find(f=>f.key===u.key))==null?void 0:s.type)==="img-sli")return!0;return!1});return{drawerVisible:e,fileDragging:t,left:r,right:a,imgSliActived:o,opened:n}}),f7=t=>(hb("data-v-279a61df"),t=t(),mb(),t),d7={key:0,class:"dragging-port-wrap"},v7={class:"content"},p7={key:0,class:"img-wrap"},h7={key:1},m7=f7(()=>xn("div",{style:{padding:"16px"}},null,-1)),g7={key:0,class:"img-wrap"},y7={key:1},b7={key:0,class:"tips",style:{"max-width":"30vw"}},w7={class:"actions"},C7=fe({__name:"DraggingPort",setup(t){const e=W_(),n=Wo(),{left:r,right:a}=iz(e),i=async(s,u)=>{const f=uz(s);if(f){const v=f.nodes[0];if(!cz(v.name))return;e[u]=v}},o=()=>{e.left=void 0,e.right=void 0,e.opened=!1},l=()=>{t_(r.value&&a.value);const s={type:"img-sli",left:r.value,right:a.value,name:`${ke("imgCompare")} ( ${r.value.name} vs ${a.value.name})`,key:br()};n.tabList[0].panes.push(s),n.tabList[0].key=s.key};return(s,u)=>{const f=wF,v=Tn;return Ye(),Xt(lr,null,{default:_t(()=>[(xe(e).fileDragging||xe(r)||xe(a)||xe(e).opened)&&!xe(e).imgSliActived?(Ye(),an("div",d7,[xn("h2",null,qn(s.$t("imgCompare")),1),xn("div",v7,[xn("div",{class:"left port",onDragover:u[1]||(u[1]=Ln(()=>{},["prevent"])),onDrop:u[2]||(u[2]=Ln(p=>i(p,"left"),["prevent"]))},[xe(r)?(Ye(),an("div",p7,[x(f,{src:xe(Py)(xe(r)),preview:{src:xe(vs)(xe(r))}},null,8,["src","preview"]),x(xe(Jl),{class:"close",onClick:u[0]||(u[0]=p=>r.value=void 0)})])):(Ye(),an("div",h7,qn(s.$t("dragImageHere")),1))],32),m7,xn("div",{class:"right port",onDragover:u[4]||(u[4]=Ln(()=>{},["prevent"])),onDrop:u[5]||(u[5]=Ln(p=>i(p,"right"),["prevent"]))},[xe(a)?(Ye(),an("div",g7,[x(f,{src:xe(Py)(xe(a)),preview:{src:xe(vs)(xe(a))}},null,8,["src","preview"]),x(xe(Jl),{class:"close",onClick:u[3]||(u[3]=p=>a.value=void 0)})])):(Ye(),an("div",y7,qn(s.$t("dragImageHere")),1))],32)]),xe(e).opened?(Ye(),an("p",b7," Tips: "+qn(s.$t("imageCompareTips")),1)):pa("",!0),xn("div",w7,[xe(r)&&xe(a)?(Ye(),Xt(v,{key:0,type:"primary",onClick:u[6]||(u[6]=p=>xe(e).drawerVisible=!0)},{default:_t(()=>[Fn(qn(s.$t("confirm")),1)]),_:1})):pa("",!0),xe(r)&&xe(a)?(Ye(),Xt(v,{key:1,type:"primary",onClick:l},{default:_t(()=>[Fn(qn(s.$t("confirm"))+"("+qn(s.$t("openInNewTab"))+")",1)]),_:1})):pa("",!0),x(v,{style:{"margin-left":"16px"},onClick:o},{default:_t(()=>[Fn(qn(s.$t("close")),1)]),_:1})])])):pa("",!0)]),_:1})}}});const _7=uu(C7,[["__scopeId","data-v-279a61df"]]),S7={class:"container"},x7=["src"],P7=fe({__name:"ImgSliSide",props:{side:{},containerWidth:{},img:{},maxEdge:{},percent:{}},setup(t){const e=t,n=K(()=>{let r="";const i=e.containerWidth;return e.side==="left"?r=`calc(50% - ${(e.percent-50)/100*i}px)`:r=`calc(-50% - ${(e.percent-50)/100*i+4}px)`,`${e.maxEdge==="width"?"width:100%":"height:100%"};transform: translate(${r}, -50%)`});return(r,a)=>(Ye(),an("div",S7,[xn("img",{class:wa(["img",[r.side]]),style:vi(n.value),src:xe(vs)(r.img),onDragstart:a[0]||(a[0]=Ln(()=>{},["prevent","stop"]))},null,46,x7)]))}});const Ly=uu(P7,[["__scopeId","data-v-65d66859"]]),E7=fe({__name:"ImgSliComparePane",props:{left:{},right:{}},setup(t,{expose:e}){const n=t,r=W(50),a=([{size:u}])=>{r.value=u},i=W(),{width:o}=i7(i);e({requestFullScreen:()=>{var u;(u=i.value)==null||u.requestFullscreen()}});const s=Bz(async()=>{if(!n.left)return"width";const u=await gz(vs(n.left)),f=u.width/u.height,v=document.body.clientWidth/document.body.clientHeight;return f>v?"width":"height"});return(u,f)=>(Ye(),an("div",{ref_key:"wrapperEl",ref:i,style:{height:"100%"}},[x(xe(L_),{class:"default-theme",onResize:a},{default:_t(()=>[u.left?(Ye(),Xt(xe(wf),{key:0},{default:_t(()=>[x(Ly,{side:"left","max-edge":xe(s),"container-width":xe(o),percent:r.value,img:u.left},null,8,["max-edge","container-width","percent","img"])]),_:1})):pa("",!0),u.right?(Ye(),Xt(xe(wf),{key:1},{default:_t(()=>[x(Ly,{"max-edge":xe(s),percent:r.value,img:u.right,side:"right","container-width":xe(o)},null,8,["max-edge","percent","img","container-width"])]),_:1})):pa("",!0)]),_:1})],512))}});const O7={class:"actions"},T7=fe({__name:"ImgSliDrawer",setup(t){const e=W_(),n=W();return(r,a)=>{const i=Tn,o=v4;return Ye(),an(De,null,[x(o,{width:"100vw",visible:xe(e).drawerVisible,"onUpdate:visible":a[2]||(a[2]=l=>xe(e).drawerVisible=l),"destroy-on-close":"",class:"img-sli","close-icon":null},{footer:_t(()=>[xn("div",O7,[x(i,{onClick:a[0]||(a[0]=l=>xe(e).drawerVisible=!1)},{default:_t(()=>[Fn(qn(r.$t("close")),1)]),_:1}),x(i,{onClick:a[1]||(a[1]=l=>{var s;return(s=n.value)==null?void 0:s.requestFullScreen()})},{default:_t(()=>[Fn(qn(r.$t("fullscreenview")),1)]),_:1})])]),default:_t(()=>[xe(e).left&&xe(e).right?(Ye(),Xt(E7,{key:0,ref_key:"splitpane",ref:n,left:xe(e).left,right:xe(e).right},null,8,["left","right"])):pa("",!0)]),_:1},8,["visible"]),x(_7)],64)}}});const I7=fe({__name:"SplitViewTab",setup(t){const e=Wo(),n={local:Ir(()=>mr(()=>import("./stackView-2d33b96f.js"),["assets/stackView-2d33b96f.js","assets/fullScreenContextMenu-2de1a5a3.js","assets/FileItem-a96f33a2.js","assets/db-7a344507.js","assets/shortcut-16098eef.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/fullScreenContextMenu-73df97d0.css","assets/numInput-136f608c.js","assets/numInput-a08c6857.css","assets/stackView-60dc1bed.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),empty:Ir(()=>mr(()=>import("./emptyStartup-56f578ff.js"),["assets/emptyStartup-56f578ff.js","assets/db-7a344507.js","assets/emptyStartup-feba1fd7.css"])),"global-setting":Ir(()=>mr(()=>import("./globalSetting-6cc3c392.js"),["assets/globalSetting-6cc3c392.js","assets/numInput-136f608c.js","assets/shortcut-16098eef.js","assets/shortcut-9fed83c2.css","assets/numInput-a08c6857.css","assets/globalSetting-bc7be568.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"tag-search-matched-image-grid":Ir(()=>mr(()=>import("./MatchedImageGrid-1992d1ff.js"),["assets/MatchedImageGrid-1992d1ff.js","assets/fullScreenContextMenu-2de1a5a3.js","assets/FileItem-a96f33a2.js","assets/db-7a344507.js","assets/shortcut-16098eef.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/fullScreenContextMenu-73df97d0.css","assets/hook-6c156191.js","assets/MatchedImageGrid-4f83f417.css"])),"tag-search":Ir(()=>mr(()=>import("./TagSearch-a21af1d8.js"),["assets/TagSearch-a21af1d8.js","assets/db-7a344507.js","assets/TagSearch-ffd782da.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"fuzzy-search":Ir(()=>mr(()=>import("./SubstrSearch-d4c86bbb.js"),["assets/SubstrSearch-d4c86bbb.js","assets/fullScreenContextMenu-2de1a5a3.js","assets/FileItem-a96f33a2.js","assets/db-7a344507.js","assets/shortcut-16098eef.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/fullScreenContextMenu-73df97d0.css","assets/hook-6c156191.js","assets/SubstrSearch-9d37606f.css","assets/index-f4bbe4b8.css"])),"img-sli":Ir(()=>mr(()=>import("./ImgSliPagePane-6f28af0c.js"),[])),"batch-download":Ir(()=>mr(()=>import("./batchDownload-3b20e739.js"),["assets/batchDownload-3b20e739.js","assets/FileItem-a96f33a2.js","assets/db-7a344507.js","assets/shortcut-16098eef.js","assets/shortcut-9fed83c2.css","assets/FileItem-f163e0bd.css","assets/batchDownload-08be3fc5.css"]))},r=(o,l,s)=>{var f,v;const u=e.tabList[o];if(s==="add"){const p={type:"empty",key:br(),name:ke("emptyStartPage")};u.panes.push(p),u.key=p.key}else{const p=u.panes.findIndex(g=>g.key===l);if(u.key===l&&(u.key=((f=u.panes[p-1])==null?void 0:f.key)??((v=u.panes[1])==null?void 0:v.key)),u.panes.splice(p,1),u.panes.length===0&&e.tabList.splice(o,1),e.tabList.length===0){const g=e.createEmptyPane();e.tabList.push({panes:[g],key:g.key,id:br()})}}},a=W();pe(()=>e.tabList,async()=>{var o;await Ke(),e.saveRecord(),Array.from(((o=a.value)==null?void 0:o.querySelectorAll(".splitpanes__pane"))??[]).forEach((l,s)=>{Array.from(l.querySelectorAll(".ant-tabs-tab")??[]).forEach((u,f)=>{const v=u;v.setAttribute("draggable","true"),v.setAttribute("tabIdx",s.toString()),v.setAttribute("paneIdx",f.toString()),v.ondragend=()=>{e.dragingTab=void 0},v.ondragstart=p=>{e.dragingTab={tabIdx:s,paneIdx:f},p.dataTransfer.setData("text/plain",JSON.stringify({tabIdx:s,paneIdx:f,from:"tab-drag"}))}})})},{immediate:!0,deep:!0});const i=qc(()=>R_.emit("returnToIIB"),100);return Oz(async()=>{const o=window.parent;if(!await vz(()=>o==null?void 0:o.onUiTabChange,200,3e4)){console.log("watch tab change failed");return}o.onUiTabChange(()=>{const l=o.get_uiCurrentTabContent();l!=null&&l.id.includes("infinite-image-browsing")&&i()})}),pe(e7(),o=>o&&i()),(o,l)=>{const s=ls,u=Qi;return Ye(),an("div",{ref_key:"container",ref:a},[x(xe(L_),{class:"default-theme"},{default:_t(()=>[(Ye(!0),an(De,null,Xv(xe(e).tabList,(f,v)=>(Ye(),Xt(xe(wf),{key:f.id},{default:_t(()=>[x(c7,{tabIdx:v},{default:_t(()=>[x(u,{type:"editable-card",activeKey:f.key,"onUpdate:activeKey":p=>f.key=p,onEdit:(p,g)=>r(v,p,g)},{default:_t(()=>[(Ye(!0),an(De,null,Xv(f.panes,(p,g)=>(Ye(),Xt(s,{key:p.key,tab:p.name,class:"pane"},{default:_t(()=>[(Ye(),Xt(yx(n[p.type]),Gf({tabIdx:v,paneIdx:g},p),null,16,["tabIdx","paneIdx"]))]),_:2},1032,["tab"]))),128))]),_:2},1032,["activeKey","onUpdate:activeKey","onEdit"])]),_:2},1032,["tabIdx"])]),_:2},1024))),128))]),_:1}),x(T7)],512)}}});const A7=uu(I7,[["__scopeId","data-v-c479b9de"]]),M7=async t=>{var r;const e=(r=t.conf)==null?void 0:r.global_setting,n=new URLSearchParams(parent.location.search);switch(n.get("action")){case"open":{let a=n.get("path");if(!a||!e)return;const i={extra:e.outdir_extras_samples,save:e.outdir_save,txt2img:e.outdir_txt2img_samples,img2img:e.outdir_img2img_samples};i[a]&&(a=i[a]);const o=t.tabList[0],l={type:"local",path:a,key:br(),name:"",walkModePath:n.get("walk")?a:void 0};o.panes.unshift(l),o.key=l.key,dz(),mz(["action","path","walk"]);break}}};function Dy(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!nr(t)}const V_="app.conf.json",io=W(),H_=()=>Ao.writeFile(V_,JSON.stringify(Me(io.value),null,4)),k7=fe({setup(){const t=async()=>{const e=await x_({directory:!0});if(typeof e=="string"){if(!await Ao.exists(`${e}/config.json`))return ba.error(ke("tauriLaunchConfMessages.configNotFound"));if(!await Ao.exists(`${e}/extensions/sd-webui-infinite-image-browsing`))return ba.error(ke("tauriLaunchConfMessages.folderNotFound"));io.value.sdwebui_dir=e,ba.info(ke("tauriLaunchConfMessages.configCompletedMessage")),await H_(),await lu("shutdown_api_server_command"),await ou(1500),await C_()}};return()=>{let e,n;return x("div",{style:{padding:"32px 0"}},[x("div",{style:{padding:"16px 0"}},[x("h2",null,[ke("tauriLaunchConf.readSdWebuiConfigTitle")]),x("p",null,[ke("tauriLaunchConf.readSdWebuiConfigDescription")]),x(Tn,{onClick:t,type:"primary"},Dy(e=ke("tauriLaunchConf.selectSdWebuiFolder"))?e:{default:()=>[e]})]),x("div",{style:{padding:"16px 0"}},[x("h2",null,[ke("tauriLaunchConf.skipThisConfigTitle")]),x("p",null,[ke("tauriLaunchConf.skipThisConfigDescription")]),x(Tn,{type:"primary",onClick:Bt.destroyAll},Dy(n=ke("tauriLaunchConf.skipButton"))?n:{default:()=>[n]})])])}}}),N7=async()=>{try{io.value=JSON.parse(await Ao.readTextFile(V_))}catch{}io.value||(io.value={sdwebui_dir:""},await H_(),Bt.info({title:ke("tauriLaunchConfMessages.firstTimeUserTitle"),content:x(k7,null,null),width:"80vw",okText:ke("tauriLaunchConf.skipButton"),okButtonProps:{onClick:Bt.destroyAll}}))},$7=!!{}.TAURI_ARCH,R7=fe({__name:"App",setup(t){const e=Wo(),n=hz();return Ey("updateGlobalSetting",async()=>{await Uj(),console.log(ds.value);const r=await qj();e.conf=r;const a=await Oy(r);e.quickMovePaths=a.filter(i=>{var o,l;return(l=(o=i==null?void 0:i.dir)==null?void 0:o.trim)==null?void 0:l.call(o)}),M7(e)}),Ey("returnToIIB",async()=>{const r=e.conf;if(!r)return;const a=r.global_setting;if(!a.outdir_txt2img_samples&&!a.outdir_img2img_samples)return;const i=new Set(e.quickMovePaths.map(l=>l.key));if(i.has("outdir_txt2img_samples")&&i.has("outdir_img2img_samples"))return;const o=await Oy(r);e.quickMovePaths=o.filter(l=>{var s,u;return(u=(s=l==null?void 0:l.dir)==null?void 0:s.trim)==null?void 0:u.call(s)})}),Re(async()=>{$7&&N7(),R_.emit("updateGlobalSetting")}),(r,a)=>{const i=rn;return Ye(),Xt(i,{loading:!xe(n).isIdle},{default:_t(()=>[x(A7)]),_:1},8,["loading"])}}});function L7(t){return typeof t=="object"&&t!==null}function Fy(t,e){return t=L7(t)?t:Object.create(null),new Proxy(t,{get(n,r,a){return r==="key"?Reflect.get(n,r,a):Reflect.get(n,r,a)||Reflect.get(e,r,a)}})}function D7(t,e){return e.reduce((n,r)=>n==null?void 0:n[r],t)}function F7(t,e,n){return e.slice(0,-1).reduce((r,a)=>/^(__proto__)$/.test(a)?{}:r[a]=r[a]||{},t)[e[e.length-1]]=n,t}function B7(t,e){return e.reduce((n,r)=>{const a=r.split(".");return F7(n,a,D7(t,a))},{})}function By(t,{storage:e,serializer:n,key:r,debug:a}){try{const i=e==null?void 0:e.getItem(r);i&&t.$patch(n==null?void 0:n.deserialize(i))}catch(i){a&&console.error(i)}}function jy(t,{storage:e,serializer:n,key:r,paths:a,debug:i}){try{const o=Array.isArray(a)?B7(t,a):t;e.setItem(r,n.serialize(o))}catch(o){i&&console.error(o)}}function j7(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:r=n},store:a}=e;if(!r)return;const i=(Array.isArray(r)?r.map(o=>Fy(o,t)):[Fy(r,t)]).map(({storage:o=localStorage,beforeRestore:l=null,afterRestore:s=null,serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},key:f=a.$id,paths:v=null,debug:p=!1})=>{var g;return{storage:o,beforeRestore:l,afterRestore:s,serializer:u,key:((g=t.key)!=null?g:c=>c)(f),paths:v,debug:p}});a.$persist=()=>{i.forEach(o=>{jy(a.$state,o)})},a.$hydrate=({runHooks:o=!0}={})=>{i.forEach(l=>{const{beforeRestore:s,afterRestore:u}=l;o&&(s==null||s(e)),By(a,l),o&&(u==null||u(e))})},i.forEach(o=>{const{beforeRestore:l,afterRestore:s}=o;l==null||l(e),By(a,o),s==null||s(e),a.$subscribe((u,f)=>{jy(f,o)},{detached:!0})})}}var z7=j7();const U_=Zj();U_.use(z7);MP(R7).use(U_).use(wv).mount("#zanllp_dev_gradio_fe");const W7=Zz(),V7=()=>{try{return parent.location.search.includes("theme=dark")}catch{}return!1};pe([W7,V7],async([t,e])=>{await ou();const n=document.getElementsByTagName("html")[0];if(t||e){document.body.classList.add("dark");const r=document.createElement("style"),{default:a}=await mr(()=>import("./antd.dark-35e9b327.js"),[]);r.innerHTML=a,r.setAttribute("antd-dark",""),n.appendChild(r)}else document.body.classList.remove("dark"),Array.from(n.querySelectorAll("style[antd-dark]")).forEach(r=>r.remove())},{immediate:!0});export{W as $,Xv as A,vi as B,pa as C,PN as D,$7 as E,t9 as F,H7 as G,Wx as H,D9 as I,L9 as J,U7 as K,vs as L,Vr as M,wa as N,as as O,J as P,rn as Q,Bt as R,n_ as S,qN as T,At as U,Tn as V,Po as W,uu as X,No as Y,gi as Z,ut as _,T as a,$n as a$,ge as a0,Ci as a1,ar as a2,yt as a3,Ns as a4,or as a5,Is as a6,lr as a7,bT as a8,ST as a9,n$ as aA,Ce as aB,qc as aC,F9 as aD,Hj as aE,Ao as aF,V_ as aG,C_ as aH,Xe as aI,a9 as aJ,ct as aK,rm as aL,Qe as aM,n9 as aN,gI as aO,kT as aP,nh as aQ,Iw as aR,GD as aS,Ds as aT,y$ as aU,Zf as aV,_e as aW,ho as aX,B$ as aY,pO as aZ,_P as a_,id as aa,dT as ab,Y0 as ac,X0 as ad,Jl as ae,vd as af,lt as ag,x_ as ah,ke as ai,Kr as aj,Yj as ak,ba as al,R_ as am,W_ as an,K as ao,JR as ap,br as aq,t_ as ar,Yc as as,hb as at,mb as au,Bf as av,Re as aw,Ke as ax,xt as ay,Yl as az,ze as b,eC as b$,st as b0,fO as b1,e9 as b2,mi as b3,Me as b4,H$ as b5,Id as b6,_o as b7,ww as b8,S$ as b9,Fa as bA,Q7 as bB,KN as bC,cx as bD,q7 as bE,G7 as bF,Gf as bG,Hc as bH,J7 as bI,u0 as bJ,tC as bK,On as bL,Wn as bM,CC as bN,hz as bO,Ey as bP,V9 as bQ,IN as bR,m4 as bS,X7 as bT,hf as bU,_B as bV,mI as bW,s0 as bX,nr as bY,R9 as bZ,K9 as b_,_$ as ba,VR as bb,$R as bc,xC as bd,rr as be,Kd as bf,Us as bg,Do as bh,IE as bi,HR as bj,Ks as bk,_L as bl,kl as bm,rt as bn,Nt as bo,j2 as bp,Jt as bq,Z7 as br,Qw as bs,Zw as bt,Fw as bu,Le as bv,Gt as bw,Sn as bx,Aw as by,NE as bz,x as c,Eo as c0,E7 as c1,iz as c2,uz as c3,Si as c4,a$ as c5,HN as c6,QN as c7,jN as c8,r9 as c9,$9 as cA,ZS as cB,Cs as cC,FS as cD,Sb as cE,bx as cF,Wl as cG,yx as cH,K7 as cI,Gc as cJ,Y7 as cK,Py as cL,wF as cM,Xf as cN,Tm as cO,zn as ca,Od as cb,_d as cc,sb as cd,bt as ce,NT as cf,sd as cg,bz as ch,N_ as ci,gy as cj,j9 as ck,Av as cl,B9 as cm,cz as cn,Q1 as co,ou as cp,yz as cq,H9 as cr,di as cs,i7 as ct,Ry as cu,U9 as cv,Z1 as cw,wz as cx,z9 as cy,N9 as cz,fe as d,jn as e,pn as f,Wr as g,te as h,He as i,Bd as j,Wo as k,pe as l,Xt as m,_t as n,Ye as o,xn as p,Ln as q,xe as r,tt as s,W9 as t,Ze as u,qn as v,ks as w,Fn as x,an as y,De as z}; diff --git a/vue/dist/assets/numInput-e2a9cc11.js b/vue/dist/assets/numInput-136f608c.js similarity index 99% rename from vue/dist/assets/numInput-e2a9cc11.js rename to vue/dist/assets/numInput-136f608c.js index 6869b6d..2a073a7 100644 --- a/vue/dist/assets/numInput-e2a9cc11.js +++ b/vue/dist/assets/numInput-136f608c.js @@ -1,4 +1,4 @@ -import{ao as I,aI as Le,$ as Q,aw as ht,aJ as Hr,aK as mt,Z as we,d as ae,u as ye,aL as kt,b as ce,aM as Fe,aN as Mt,a0 as ee,h as M,c as T,a as k,aO as Ur,i as re,aP as He,aQ as me,a2 as Qt,e as Gr,aR as Jt,aS as er,aT as Wr,aU as Kr,aV as zr,aW as tr,z as Re,aX as Xr,l as oe,aY as Yr,aZ as Zr,a_ as Qr,a8 as Jr,ab as en,aa as tn,az as rn,a$ as rr,b0 as nr,b1 as ar,as as je,b2 as nn,b3 as an,P as K,b4 as et,ax as ir,b5 as gt,b6 as ln,b7 as un,b8 as Ot,b9 as on,ba as sn,bb as fn,bc as cn,bd as dn,be as vn,bf as hn,bg as lr,bh as mn,bi as gn,bj as pn,bk as bn,bl as yn,bm as xn,r as ge,bn as wn,bo as Ne,aC as Sn,bp as ur,bq as pt,br as Fn,w as Me,ag as Cn,bs as or,bt as sr,bu as Nn,bv as De,_ as $e,aB as ue,j as fr,D as Vn,ay as kn,a3 as Mn,bw as cr,bx as Ve,by as bt,bz as On,bA as tt,bB as Pn,bC as $n,bD as En,T as An,Y as Tn,bE as In,bF as Bn,o as _n,y as jn,bG as Pt,X as qn}from"./index-342b69b7.js";import{t as Rn,l as Dn}from"./shortcut-42287857.js";var Ln=Symbol("SizeProvider"),Hn=function(e){var t=e?I(function(){return e.size}):Le(Ln,I(function(){return"default"}));return t};function Un(n,e,t){var r=-1,a=n.length;e<0&&(e=-e>a?0:a+e),t=t>a?a:t,t<0&&(t+=a),a=e>t?0:t-e>>>0,e>>>=0;for(var i=Array(a);++r0?"".concat(m[0]/-2,"px"):void 0,F=m[1]>0?"".concat(m[1]/-2,"px"):void 0;return d&&(b.marginLeft=d,b.marginRight=d),c.value?b.rowGap="".concat(m[1],"px"):F&&(b.marginTop=F,b.marginBottom=F),b});return function(){var m;return T("div",{class:f.value,style:y.value},[(m=r.default)===null||m===void 0?void 0:m.call(r)])}}});const Qn=Zn;function Jn(n){return typeof n=="number"?"".concat(n," ").concat(n," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(n)?"0 0 ".concat(n):n}var ea=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const vr=ae({compatConfig:{MODE:3},name:"ACol",props:ea(),setup:function(e,t){var r=t.slots,a=zn(),i=a.gutter,l=a.supportFlexGap,u=a.wrap,o=ye("col",e),c=o.prefixCls,s=o.direction,f=I(function(){var m,b=e.span,d=e.order,F=e.offset,h=e.push,S=e.pull,g=c.value,v={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(p){var N,C={},x=e[p];typeof x=="number"?C.span=x:ce(x)==="object"&&(C=x||{}),v=k(k({},v),{},(N={},M(N,"".concat(g,"-").concat(p,"-").concat(C.span),C.span!==void 0),M(N,"".concat(g,"-").concat(p,"-order-").concat(C.order),C.order||C.order===0),M(N,"".concat(g,"-").concat(p,"-offset-").concat(C.offset),C.offset||C.offset===0),M(N,"".concat(g,"-").concat(p,"-push-").concat(C.push),C.push||C.push===0),M(N,"".concat(g,"-").concat(p,"-pull-").concat(C.pull),C.pull||C.pull===0),M(N,"".concat(g,"-rtl"),s.value==="rtl"),N))}),ee(g,(m={},M(m,"".concat(g,"-").concat(b),b!==void 0),M(m,"".concat(g,"-order-").concat(d),d),M(m,"".concat(g,"-offset-").concat(F),F),M(m,"".concat(g,"-push-").concat(h),h),M(m,"".concat(g,"-pull-").concat(S),S),m),v)}),y=I(function(){var m=e.flex,b=i.value,d={};if(b&&b[0]>0){var F="".concat(b[0]/2,"px");d.paddingLeft=F,d.paddingRight=F}if(b&&b[1]>0&&!l.value){var h="".concat(b[1]/2,"px");d.paddingTop=h,d.paddingBottom=h}return m&&(d.flex=Jn(m),u.value===!1&&!d.minWidth&&(d.minWidth=0)),d});return function(){var m;return T("div",{class:f.value,style:y.value},[(m=r.default)===null||m===void 0?void 0:m.call(r)])}}});function be(){return be=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qe(n,e,t){return ra()?qe=Reflect.construct.bind():qe=function(a,i,l){var u=[null];u.push.apply(u,i);var o=Function.bind.apply(a,u),c=new o;return l&&Ee(c,l.prototype),c},qe.apply(null,arguments)}function na(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function nt(n){var e=typeof Map=="function"?new Map:void 0;return nt=function(r){if(r===null||!na(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,a)}function a(){return qe(r,arguments,rt(this).constructor)}return a.prototype=Object.create(r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Ee(a,r)},nt(n)}var aa=/%[sdj%]/g,ia=function(){};typeof process<"u"&&process.env;function at(n){if(!n||!n.length)return null;var e={};return n.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function le(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r=i)return u;switch(u){case"%s":return String(t[a++]);case"%d":return Number(t[a++]);case"%j":try{return JSON.stringify(t[a++])}catch{return"[Circular]"}break;default:return u}});return l}return n}function la(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}function te(n,e){return!!(n==null||e==="array"&&Array.isArray(n)&&!n.length||la(e)&&typeof n=="string"&&!n)}function ua(n,e,t){var r=[],a=0,i=n.length;function l(u){r.push.apply(r,u||[]),a++,a===i&&t(r)}n.forEach(function(u){e(u,l)})}function $t(n,e,t){var r=0,a=n.length;function i(l){if(l&&l.length){t(l);return}var u=r;r=r+1,ua?0:a+e),t=t>a?a:t,t<0&&(t+=a),a=e>t?0:t-e>>>0,e>>>=0;for(var i=Array(a);++r0?"".concat(m[0]/-2,"px"):void 0,F=m[1]>0?"".concat(m[1]/-2,"px"):void 0;return d&&(b.marginLeft=d,b.marginRight=d),c.value?b.rowGap="".concat(m[1],"px"):F&&(b.marginTop=F,b.marginBottom=F),b});return function(){var m;return T("div",{class:f.value,style:y.value},[(m=r.default)===null||m===void 0?void 0:m.call(r)])}}});const Qn=Zn;function Jn(n){return typeof n=="number"?"".concat(n," ").concat(n," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(n)?"0 0 ".concat(n):n}var ea=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const vr=ae({compatConfig:{MODE:3},name:"ACol",props:ea(),setup:function(e,t){var r=t.slots,a=zn(),i=a.gutter,l=a.supportFlexGap,u=a.wrap,o=ye("col",e),c=o.prefixCls,s=o.direction,f=I(function(){var m,b=e.span,d=e.order,F=e.offset,h=e.push,S=e.pull,g=c.value,v={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(p){var N,C={},x=e[p];typeof x=="number"?C.span=x:ce(x)==="object"&&(C=x||{}),v=k(k({},v),{},(N={},M(N,"".concat(g,"-").concat(p,"-").concat(C.span),C.span!==void 0),M(N,"".concat(g,"-").concat(p,"-order-").concat(C.order),C.order||C.order===0),M(N,"".concat(g,"-").concat(p,"-offset-").concat(C.offset),C.offset||C.offset===0),M(N,"".concat(g,"-").concat(p,"-push-").concat(C.push),C.push||C.push===0),M(N,"".concat(g,"-").concat(p,"-pull-").concat(C.pull),C.pull||C.pull===0),M(N,"".concat(g,"-rtl"),s.value==="rtl"),N))}),ee(g,(m={},M(m,"".concat(g,"-").concat(b),b!==void 0),M(m,"".concat(g,"-order-").concat(d),d),M(m,"".concat(g,"-offset-").concat(F),F),M(m,"".concat(g,"-push-").concat(h),h),M(m,"".concat(g,"-pull-").concat(S),S),m),v)}),y=I(function(){var m=e.flex,b=i.value,d={};if(b&&b[0]>0){var F="".concat(b[0]/2,"px");d.paddingLeft=F,d.paddingRight=F}if(b&&b[1]>0&&!l.value){var h="".concat(b[1]/2,"px");d.paddingTop=h,d.paddingBottom=h}return m&&(d.flex=Jn(m),u.value===!1&&!d.minWidth&&(d.minWidth=0)),d});return function(){var m;return T("div",{class:f.value,style:y.value},[(m=r.default)===null||m===void 0?void 0:m.call(r)])}}});function be(){return be=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function qe(n,e,t){return ra()?qe=Reflect.construct.bind():qe=function(a,i,l){var u=[null];u.push.apply(u,i);var o=Function.bind.apply(a,u),c=new o;return l&&Ee(c,l.prototype),c},qe.apply(null,arguments)}function na(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function nt(n){var e=typeof Map=="function"?new Map:void 0;return nt=function(r){if(r===null||!na(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,a)}function a(){return qe(r,arguments,rt(this).constructor)}return a.prototype=Object.create(r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Ee(a,r)},nt(n)}var aa=/%[sdj%]/g,ia=function(){};typeof process<"u"&&process.env;function at(n){if(!n||!n.length)return null;var e={};return n.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function le(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r=i)return u;switch(u){case"%s":return String(t[a++]);case"%d":return Number(t[a++]);case"%j":try{return JSON.stringify(t[a++])}catch{return"[Circular]"}break;default:return u}});return l}return n}function la(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}function te(n,e){return!!(n==null||e==="array"&&Array.isArray(n)&&!n.length||la(e)&&typeof n=="string"&&!n)}function ua(n,e,t){var r=[],a=0,i=n.length;function l(u){r.push.apply(r,u||[]),a++,a===i&&t(r)}n.forEach(function(u){e(u,l)})}function $t(n,e,t){var r=0,a=n.length;function i(l){if(l&&l.length){t(l);return}var u=r;r=r+1,u=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +import{cN as Q,cO as Z,d as H,bq as ee,$ as _,l as q,_ as T,a as f,a0 as U,h as B,c as w,P as Y,j as z,u as J,aI as ne,b0 as ae,aM as te,aw as re,w as ue,f as le,ao as R,aK as oe,i as ie}from"./index-066a7869.js";function ce(n,e){var u=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!u){if(Array.isArray(n)||(u=Q(n))||e&&n&&typeof n.length=="number"){u&&(n=u);var o=0,s=function(){};return{s,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var k=!0,m=!1,g;return{s:function(){u=u.call(n)},n:function(){var c=u.next();return k=c.done,c},e:function(c){m=!0,g=c},f:function(){try{!k&&u.return!=null&&u.return()}finally{if(m)throw g}}}}var X=1/0,de=17976931348623157e292;function ke(n){if(!n)return n===0?n:0;if(n=Z(n),n===X||n===-X){var e=n<0?-1:1;return e*de}return n===n?n:0}var se=["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"],fe={prefixCls:String,name:String,id:String,type:String,defaultChecked:{type:[Boolean,Number],default:void 0},checked:{type:[Boolean,Number],default:void 0},disabled:Boolean,tabindex:{type:[Number,String]},readonly:Boolean,autofocus:Boolean,value:Y.any,required:Boolean};const ve=H({compatConfig:{MODE:3},name:"Checkbox",inheritAttrs:!1,props:ee(fe,{prefixCls:"rc-checkbox",type:"checkbox",defaultChecked:!1}),emits:["click","change"],setup:function(e,u){var o=u.attrs,s=u.emit,k=u.expose,m=_(e.checked===void 0?e.defaultChecked:e.checked),g=_();q(function(){return e.checked},function(){m.value=e.checked}),k({focus:function(){var t;(t=g.value)===null||t===void 0||t.focus()},blur:function(){var t;(t=g.value)===null||t===void 0||t.blur()}});var d=_(),c=function(t){if(!e.disabled){e.checked===void 0&&(m.value=t.target.checked),t.shiftKey=d.value;var C={target:f(f({},e),{},{checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t};e.checked!==void 0&&(g.value.checked=!!e.checked),s("change",C),d.value=!1}},p=function(t){s("click",t),d.value=t.shiftKey};return function(){var r,t=e.prefixCls,C=e.name,S=e.id,V=e.type,K=e.disabled,x=e.readonly,a=e.tabindex,l=e.autofocus,v=e.value,h=e.required,b=T(e,se),i=o.class,I=o.onFocus,A=o.onBlur,G=o.onKeydown,M=o.onKeypress,$=o.onKeyup,F=f(f({},b),o),y=Object.keys(F).reduce(function(N,P){return(P.substr(0,5)==="aria-"||P.substr(0,5)==="data-"||P==="role")&&(N[P]=F[P]),N},{}),E=U(t,i,(r={},B(r,"".concat(t,"-checked"),m.value),B(r,"".concat(t,"-disabled"),K),r)),D=f(f({name:C,id:S,type:V,readonly:x,disabled:K,tabindex:a,class:"".concat(t,"-input"),checked:!!m.value,autofocus:l,value:v},y),{},{onChange:c,onClick:p,onFocus:I,onBlur:A,onKeydown:G,onKeypress:M,onKeyup:$,required:h});return w("span",{class:E},[w("input",f({ref:g},D),null),w("span",{class:"".concat(t,"-inner")},null)])}}});function Ce(n){var e=n==null?0:n.length;return e?n[e-1]:void 0}var he=function(){return{name:String,prefixCls:String,options:{type:Array,default:function(){return[]}},disabled:Boolean,id:String}},be=function(){return f(f({},he()),{},{defaultValue:{type:Array},value:{type:Array},onChange:{type:Function},"onUpdate:value":{type:Function}})},me=function(){return{prefixCls:String,defaultChecked:{type:Boolean,default:void 0},checked:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},isGroup:{type:Boolean,default:void 0},value:Y.any,name:String,id:String,indeterminate:{type:Boolean,default:void 0},type:{type:String,default:"checkbox"},autofocus:{type:Boolean,default:void 0},onChange:Function,"onUpdate:checked":Function,onClick:Function,skipGroup:{type:Boolean,default:!1}}},ge=function(){return f(f({},me()),{},{indeterminate:{type:Boolean,default:!1}})},L=Symbol("CheckboxGroupContext"),pe=["indeterminate","skipGroup","id"],ye=["onMouseenter","onMouseleave","onInput","class","style"];const O=H({compatConfig:{MODE:3},name:"ACheckbox",inheritAttrs:!1,__ANT_CHECKBOX:!0,props:ge(),setup:function(e,u){var o=u.emit,s=u.attrs,k=u.slots,m=u.expose,g=z(),d=J("checkbox",e),c=d.prefixCls,p=d.direction,r=ne(L,void 0),t=Symbol("checkboxUniId");ae(function(){!e.skipGroup&&r&&r.registerValue(t,e.value)}),te(function(){r&&r.cancelValue(t)}),re(function(){ue(e.checked!==void 0||r||e.value===void 0,"Checkbox","`value` is not validate prop, do you mean `checked`?")});var C=function(a){var l=a.target.checked;o("update:checked",l),o("change",a)},S=_(),V=function(){var a;(a=S.value)===null||a===void 0||a.focus()},K=function(){var a;(a=S.value)===null||a===void 0||a.blur()};return m({focus:V,blur:K}),function(){var x,a,l=le((x=k.default)===null||x===void 0?void 0:x.call(k)),v=e.indeterminate,h=e.skipGroup,b=e.id,i=b===void 0?g.id.value:b,I=T(e,pe),A=s.onMouseenter,G=s.onMouseleave;s.onInput;var M=s.class,$=s.style,F=T(s,ye),y=f(f({},I),{},{id:i,prefixCls:c.value},F);r&&!h?(y.onChange=function(){for(var N=arguments.length,P=new Array(N),j=0;j0&&(h=r.value.map(function(i){var I;return w(O,{prefixCls:d.value,key:i.value.toString(),disabled:"disabled"in i?i.disabled:e.disabled,indeterminate:i.indeterminate,value:i.value,checked:p.value.indexOf(i.value)!==-1,onChange:i.onChange,class:"".concat(b,"-item")},{default:function(){return[i.label===void 0?(I=o.label)===null||I===void 0?void 0:I.call(o,i):i.label]}})})),w("div",{class:[b,B({},"".concat(b,"-rtl"),c.value==="rtl")],id:v},[h||((a=o.default)===null||a===void 0?void 0:a.call(o))])}}});O.Group=W;O.install=function(n){return n.component(O.name,O),n.component(W.name,W),n};const Se=n=>{const e=[];return n.shiftKey&&e.push("Shift"),n.ctrlKey&&e.push("Ctrl"),n.metaKey&&e.push("Cmd"),(n.code.startsWith("Key")||n.code.startsWith("Digit"))&&e.push(n.code),e.join(" + ")};export{O as C,Se as g,Ce as l,ke as t}; diff --git a/vue/dist/assets/stackView-26df897b.js b/vue/dist/assets/stackView-2d33b96f.js similarity index 96% rename from vue/dist/assets/stackView-26df897b.js rename to vue/dist/assets/stackView-2d33b96f.js index 46a559d..ce95463 100644 --- a/vue/dist/assets/stackView-26df897b.js +++ b/vue/dist/assets/stackView-2d33b96f.js @@ -1 +1 @@ -import{d as Y,u as ie,g as U,_ as xe,c as a,a as re,P as X,D as Se,f as Pe,w as Xe,b as Ye,e as Ze,h as he,M as oe,i as et,j as tt,F as se,k as nt,l as at,o as d,m as F,n as i,p as u,q as v,r as e,s as T,t as rt,v as c,x as L,y as w,z as ne,A as ae,B as ot,C as V,E as st,G as lt,H as it,S as ut,I as dt,J as ct,K as pt,L as mt,N as we,O as vt,Q as ft,R as kt,T as gt,U as Ct,V as bt,W as _t,X as yt}from"./index-342b69b7.js";import{S as W,s as ht,L as wt,R as It,f as xt}from"./fullScreenContextMenu-ce458082.js";import{F as N,N as St,_ as Pt}from"./numInput-e2a9cc11.js";import"./shortcut-42287857.js";import{D as Me,u as Mt,a as $t,b as At,c as Rt,d as Bt,e as Dt,f as Ft,s as Nt,g as Et,F as Tt}from"./FileItem-51205eb2.js";/* empty css *//* empty css */import"./db-4c0a2bd4.js";var Vt=["class","style"],zt=function(){return{prefixCls:String,href:String,separator:X.any,overlay:X.any,onClick:Function}};const q=Y({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:zt(),slots:["separator","overlay"],setup:function(o,_){var f=_.slots,g=_.attrs,h=ie("breadcrumb",o),y=h.prefixCls,S=function(I,p){var s=U(f,o,"overlay");return s?a(Me,{overlay:s,placement:"bottom"},{default:function(){return[a("span",{class:"".concat(p,"-overlay-link")},[I,a(Se,null,null)])]}}):I};return function(){var P,I=(P=U(f,o,"separator"))!==null&&P!==void 0?P:"/",p=U(f,o),s=g.class,C=g.style,k=xe(g,Vt),m;return o.href!==void 0?m=a("a",re({class:"".concat(y.value,"-link"),onClick:o.onClick},k),[p]):m=a("span",re({class:"".concat(y.value,"-link"),onClick:o.onClick},k),[p]),m=S(m,y.value),p?a("span",{class:s,style:C},[m,I&&a("span",{class:"".concat(y.value,"-separator")},[I])]):null}}});var Ot=function(){return{prefixCls:String,routes:{type:Array},params:X.any,separator:X.any,itemRender:{type:Function}}};function jt(r,o){if(!r.breadcrumbName)return null;var _=Object.keys(o).join("|"),f=r.breadcrumbName.replace(new RegExp(":(".concat(_,")"),"g"),function(g,h){return o[h]||g});return f}function Ie(r){var o=r.route,_=r.params,f=r.routes,g=r.paths,h=f.indexOf(o)===f.length-1,y=jt(o,_);return h?a("span",null,[y]):a("a",{href:"#/".concat(g.join("/"))},[y])}const z=Y({compatConfig:{MODE:3},name:"ABreadcrumb",props:Ot(),slots:["separator","itemRender"],setup:function(o,_){var f=_.slots,g=ie("breadcrumb",o),h=g.prefixCls,y=g.direction,S=function(s,C){return s=(s||"").replace(/^\//,""),Object.keys(C).forEach(function(k){s=s.replace(":".concat(k),C[k])}),s},P=function(s,C,k){var m=et(s),x=S(C||"",k);return x&&m.push(x),m},I=function(s){var C=s.routes,k=C===void 0?[]:C,m=s.params,x=m===void 0?{}:m,M=s.separator,$=s.itemRender,A=$===void 0?Ie:$,R=[];return k.map(function(b){var B=S(b.path,x);B&&R.push(B);var O=[].concat(R),j=null;return b.children&&b.children.length&&(j=a(oe,null,{default:function(){return[b.children.map(function(E){return a(oe.Item,{key:E.path||E.breadcrumbName},{default:function(){return[A({route:E,params:x,routes:k,paths:P(O,E.path,x)})]}})})]}})),a(q,{overlay:j,separator:M,key:B||b.breadcrumbName},{default:function(){return[A({route:b,params:x,routes:k,paths:O})]}})})};return function(){var p,s,C,k=o.routes,m=o.params,x=m===void 0?{}:m,M=Pe(U(f,o)),$=(p=U(f,o,"separator"))!==null&&p!==void 0?p:"/",A=o.itemRender||f.itemRender||Ie;k&&k.length>0?C=I({routes:k,params:x,separator:$,itemRender:A}):M.length&&(C=M.map(function(b,B){return Xe(Ye(b.type)==="object"&&(b.type.__ANT_BREADCRUMB_ITEM||b.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Ze(b,{separator:$,key:B})}));var R=(s={},he(s,h.value,!0),he(s,"".concat(h.value,"-rtl"),y.value==="rtl"),s);return a("div",{class:R},[C])}}});var Lt=["separator","class"],Ut=function(){return{prefixCls:String}};const le=Y({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Ut(),setup:function(o,_){var f=_.slots,g=_.attrs,h=ie("breadcrumb",o),y=h.prefixCls;return function(){var S;g.separator;var P=g.class,I=xe(g,Lt),p=Pe((S=f.default)===null||S===void 0?void 0:S.call(f));return a("span",re({class:["".concat(y.value,"-separator"),P]},I),[p.length>0?p:"/"])}}});z.Item=q;z.Separator=le;z.install=function(r){return r.component(z.name,z),r.component(q.name,q),r.component(le.name,le),r};N.useInjectFormItemContext=tt;N.ItemRest=se;N.install=function(r){return r.component(N.name,N),r.component(N.Item.name,N.Item),r.component(se.name,se),r};W.setDefaultIndicator=ht;W.install=function(r){return r.component(W.name,W),r};const Wt={class:"hint"},qt={class:"location-bar"},Gt={key:0},Kt=["onClick"],Qt={key:3,style:{"margin-left":"8px"}},Ht={class:"actions"},Jt=["onClick"],Xt={style:{width:"512px",background:"var(--zp-primary-background)",padding:"16px","border-radius":"4px","box-shadow":"0 0 4px var(--zp-secondary-background)",border:"1px solid var(--zp-secondary-background)"}},Yt={style:{padding:"4px"}},Zt={style:{padding:"4px"}},en={style:{padding:"4px"}},tn={key:0,class:"view"},nn={style:{padding:"16px 0 32px"}},an={key:0,class:"preview-switch"},rn=Y({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},walkModePath:{},stackKey:{}},setup(r){const o=r,_=nt(),{scroller:f,stackViewEl:g,props:h,multiSelectedIdxs:y,spinning:S}=Mt().toRefs(),{currLocation:P,currPage:I,refresh:p,copyLocation:s,back:C,openNext:k,stack:m,quickMoveTo:x,addToSearchScanPathAndQuickMove:M,searchPathInfo:$,locInputValue:A,isLocationEditing:R,onLocEditEnter:b,onEditBtnClick:B,share:O,selectAll:j,onCreateFloderBtnClick:G,onWalkBtnClick:E,showWalkButton:ue}=$t(),{gridItems:$e,sortMethodConv:Ae,moreActionsDropdownShow:Z,sortedFiles:K,sortMethod:ee,itemSize:de,loadNextDir:Re,loadNextDirLoading:Be,canLoadNext:De,onScroll:Fe,cellWidth:Q}=At(),{onDrop:Ne,onFileDragStart:Ee,onFileDragEnd:Te}=Rt(),{onFileItemClick:Ve,onContextMenuClick:ce,showGenInfo:H,imageGenInfo:pe,q:ze}=Bt({openNext:k}),{previewIdx:J,onPreviewVisibleChange:Oe,previewing:me,previewImgMove:ve,canPreview:fe}=Dt(),{showMenuIdx:te}=Ft();return at(()=>o,()=>{h.value=o;const l=Nt.get(o.stackKey??"");l&&(m.value=l.slice())},{immediate:!0}),(l,t)=>{const je=vt,Le=ft,Ue=kt,ke=q,ge=z,We=gt,qe=Ct,Ce=bt,Ge=_t,Ke=oe,be=Me,Qe=St,_e=Pt,He=N,Je=W;return d(),F(Je,{spinning:e(S),size:"large"},{default:i(()=>[a(je,{style:{display:"none"}}),u("div",{ref_key:"stackViewEl",ref:g,onDragover:t[24]||(t[24]=v(()=>{},["prevent"])),onDrop:t[25]||(t[25]=v(n=>e(Ne)(n),["prevent"])),class:"container"},[a(Ue,{visible:e(H),"onUpdate:visible":t[1]||(t[1]=n=>T(H)?H.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>H.value=!1)},{cancelText:i(()=>[]),default:i(()=>[a(Le,{active:"",loading:!e(ze).isIdle},{default:i(()=>[u("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto","z-index":"9999"},onDblclick:t[0]||(t[0]=n=>e(rt)(e(pe)))},[u("div",Wt,c(l.$t("doubleClickToCopy")),1),L(" "+c(e(pe)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),u("div",qt,[o.walkModePath?(d(),w("div",Gt,[a(We,null,{title:i(()=>[L(c(l.$t("walk-mode-move-message")),1)]),default:i(()=>[a(ge,{style:{flex:"1"}},{default:i(()=>[(d(!0),w(ne,null,ae(e(m),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("span",null,c(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})])):(d(),w("div",{key:1,class:"breadcrumb",style:ot({flex:e(R)?1:""})},[e(R)?(d(),F(qe,{key:0,style:{flex:"1"},value:e(A),"onUpdate:value":t[3]||(t[3]=n=>T(A)?A.value=n:null),onClick:t[4]||(t[4]=v(()=>{},["stop"])),onPressEnter:e(b),"allow-clear":""},null,8,["value","onPressEnter"])):(d(),F(ge,{key:1,style:{flex:"1"}},{default:i(()=>[(d(!0),w(ne,null,ae(e(m),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("a",{onClick:v(ye=>e(C)(D),["prevent"])},c(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),9,Kt)]),_:2},1024))),128))]),_:1})),e(R)?(d(),F(Ce,{key:2,size:"small",onClick:e(b),type:"primary"},{default:i(()=>[L(c(l.$t("go")),1)]),_:1},8,["onClick"])):(d(),w("div",Qt,[u("a",{onClick:t[5]||(t[5]=v((...n)=>e(s)&&e(s)(...n),["prevent"])),style:{"margin-right":"4px"}},c(l.$t("copy")),1),u("a",{onClick:t[6]||(t[6]=v((...n)=>e(B)&&e(B)(...n),["prevent","stop"]))},c(l.$t("edit")),1)]))],4)),u("div",Ht,[u("a",{class:"opt",onClick:t[7]||(t[7]=v((...n)=>e(p)&&e(p)(...n),["prevent"]))},c(l.$t("refresh")),1),e(ue)?(d(),w("a",{key:0,class:"opt",onClick:t[8]||(t[8]=v((...n)=>e(E)&&e(E)(...n),["prevent"]))}," Walk ")):V("",!0),u("a",{class:"opt",onClick:t[9]||(t[9]=v((...n)=>e(j)&&e(j)(...n),["prevent","stop"]))},c(l.$t("selectAll")),1),e(st)?V("",!0):(d(),w("a",{key:1,class:"opt",onClick:t[10]||(t[10]=v((...n)=>e(O)&&e(O)(...n),["prevent"]))},c(l.$t("share")),1)),a(be,null,{overlay:i(()=>[a(Ke,null,{default:i(()=>[(d(!0),w(ne,null,ae(e(_).quickMovePaths,n=>(d(),F(Ge,{key:n.dir},{default:i(()=>[u("a",{onClick:v(D=>e(x)(n.dir),["prevent"])},c(n.zh),9,Jt)]),_:2},1024))),128))]),_:1})]),default:i(()=>[u("a",{class:"opt",onClick:t[11]||(t[11]=v(()=>{},["prevent"]))},[L(c(l.$t("quickMove"))+" ",1),a(e(Se))])]),_:1}),a(be,{trigger:["click"],visible:e(Z),"onUpdate:visible":t[20]||(t[20]=n=>T(Z)?Z.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:i(()=>[u("div",Xt,[a(He,lt(it({labelCol:{span:6},wrapperCol:{span:18}})),{default:i(()=>[a(_e,{label:l.$t("gridCellWidth")},{default:i(()=>[a(Qe,{modelValue:e(Q),"onUpdate:modelValue":t[13]||(t[13]=n=>T(Q)?Q.value=n:null),max:1024,min:64,step:64},null,8,["modelValue"])]),_:1},8,["label"]),a(_e,{label:l.$t("sortingMethod")},{default:i(()=>[a(e(ut),{value:e(ee),"onUpdate:value":t[14]||(t[14]=n=>T(ee)?ee.value=n:null),onClick:t[15]||(t[15]=v(()=>{},["stop"])),conv:e(Ae),options:e(dt)},null,8,["value","conv","options"])]),_:1},8,["label"]),u("div",Yt,[e($)?e($).can_delete?(d(),w("a",{key:1,onClick:t[17]||(t[17]=v((...n)=>e(M)&&e(M)(...n),["prevent"]))},c(l.$t("removeFromSearchScanPathAndQuickMove")),1)):V("",!0):(d(),w("a",{key:0,onClick:t[16]||(t[16]=v((...n)=>e(M)&&e(M)(...n),["prevent"]))},c(l.$t("addToSearchScanPathAndQuickMove")),1))]),u("div",Zt,[u("a",{onClick:t[18]||(t[18]=v(n=>e(ct)(e(P)+"/"),["prevent"]))},c(l.$t("openWithLocalFileBrowser")),1)]),u("div",en,[u("a",{onClick:t[19]||(t[19]=v((...n)=>e(G)&&e(G)(...n),["prevent"]))},c(l.$t("createFolder")),1)])]),_:1},16)])]),default:i(()=>[u("a",{class:"opt",onClick:t[12]||(t[12]=v(()=>{},["prevent"]))},c(l.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(I)?(d(),w("div",tn,[a(e(Et),{class:"file-list",items:e(K),ref_key:"scroller",ref:f,onScroll:e(Fe),"item-size":e(de).first,"key-field":"fullpath","item-secondary-size":e(de).second,gridItems:e($e)},pt({default:i(({item:n,index:D})=>[a(Tt,{idx:parseInt(D),file:n,"full-screen-preview-image-url":e(K)[e(J)]?e(mt)(e(K)[e(J)]):"","show-menu-idx":e(te),"onUpdate:showMenuIdx":t[21]||(t[21]=ye=>T(te)?te.value=ye:null),selected:e(y).includes(D),"cell-width":e(Q),onFileItemClick:e(Ve),onDragstart:e(Ee),onDragend:e(Te),onPreviewVisibleChange:e(Oe),onContextMenuClick:e(ce)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","cell-width","onFileItemClick","onDragstart","onDragend","onPreviewVisibleChange","onContextMenuClick"])]),_:2},[o.walkModePath?{name:"after",fn:i(()=>[u("div",nn,[a(Ce,{onClick:e(Re),loading:e(Be),block:"",type:"primary",disabled:!e(De),ghost:""},{default:i(()=>[L(c(l.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])])]),key:"0"}:void 0]),1032,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(me)?(d(),w("div",an,[a(e(wt),{onClick:t[22]||(t[22]=n=>e(ve)("prev")),class:we({disable:!e(fe)("prev")})},null,8,["class"]),a(e(It),{onClick:t[23]||(t[23]=n=>e(ve)("next")),class:we({disable:!e(fe)("next")})},null,8,["class"])])):V("",!0)])):V("",!0)],544),e(me)?(d(),F(xt,{key:0,file:e(K)[e(J)],idx:e(J),onContextMenuClick:e(ce)},null,8,["file","idx","onContextMenuClick"])):V("",!0)]),_:1},8,["spinning"])}}});const vn=yt(rn,[["__scopeId","data-v-0f674aa0"]]);export{vn as default}; +import{d as Y,u as ie,g as U,_ as xe,c as a,a as re,P as X,D as Se,f as Pe,w as Xe,b as Ye,e as Ze,h as he,M as oe,i as et,j as tt,F as se,k as nt,l as at,o as d,m as F,n as i,p as u,q as v,r as e,s as T,t as rt,v as c,x as L,y as w,z as ne,A as ae,B as ot,C as V,E as st,G as lt,H as it,S as ut,I as dt,J as ct,K as pt,L as mt,N as we,O as vt,Q as ft,R as kt,T as gt,U as Ct,V as bt,W as _t,X as yt}from"./index-066a7869.js";import{S as W,s as ht,L as wt,R as It,f as xt}from"./fullScreenContextMenu-2de1a5a3.js";import{F as N,N as St,_ as Pt}from"./numInput-136f608c.js";import"./shortcut-16098eef.js";import{D as Me,u as Mt,a as $t,b as At,c as Rt,d as Bt,e as Dt,f as Ft,s as Nt,g as Et,F as Tt}from"./FileItem-a96f33a2.js";/* empty css *//* empty css */import"./db-7a344507.js";var Vt=["class","style"],zt=function(){return{prefixCls:String,href:String,separator:X.any,overlay:X.any,onClick:Function}};const q=Y({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:zt(),slots:["separator","overlay"],setup:function(o,_){var f=_.slots,g=_.attrs,h=ie("breadcrumb",o),y=h.prefixCls,S=function(I,p){var s=U(f,o,"overlay");return s?a(Me,{overlay:s,placement:"bottom"},{default:function(){return[a("span",{class:"".concat(p,"-overlay-link")},[I,a(Se,null,null)])]}}):I};return function(){var P,I=(P=U(f,o,"separator"))!==null&&P!==void 0?P:"/",p=U(f,o),s=g.class,C=g.style,k=xe(g,Vt),m;return o.href!==void 0?m=a("a",re({class:"".concat(y.value,"-link"),onClick:o.onClick},k),[p]):m=a("span",re({class:"".concat(y.value,"-link"),onClick:o.onClick},k),[p]),m=S(m,y.value),p?a("span",{class:s,style:C},[m,I&&a("span",{class:"".concat(y.value,"-separator")},[I])]):null}}});var Ot=function(){return{prefixCls:String,routes:{type:Array},params:X.any,separator:X.any,itemRender:{type:Function}}};function jt(r,o){if(!r.breadcrumbName)return null;var _=Object.keys(o).join("|"),f=r.breadcrumbName.replace(new RegExp(":(".concat(_,")"),"g"),function(g,h){return o[h]||g});return f}function Ie(r){var o=r.route,_=r.params,f=r.routes,g=r.paths,h=f.indexOf(o)===f.length-1,y=jt(o,_);return h?a("span",null,[y]):a("a",{href:"#/".concat(g.join("/"))},[y])}const z=Y({compatConfig:{MODE:3},name:"ABreadcrumb",props:Ot(),slots:["separator","itemRender"],setup:function(o,_){var f=_.slots,g=ie("breadcrumb",o),h=g.prefixCls,y=g.direction,S=function(s,C){return s=(s||"").replace(/^\//,""),Object.keys(C).forEach(function(k){s=s.replace(":".concat(k),C[k])}),s},P=function(s,C,k){var m=et(s),x=S(C||"",k);return x&&m.push(x),m},I=function(s){var C=s.routes,k=C===void 0?[]:C,m=s.params,x=m===void 0?{}:m,M=s.separator,$=s.itemRender,A=$===void 0?Ie:$,R=[];return k.map(function(b){var B=S(b.path,x);B&&R.push(B);var O=[].concat(R),j=null;return b.children&&b.children.length&&(j=a(oe,null,{default:function(){return[b.children.map(function(E){return a(oe.Item,{key:E.path||E.breadcrumbName},{default:function(){return[A({route:E,params:x,routes:k,paths:P(O,E.path,x)})]}})})]}})),a(q,{overlay:j,separator:M,key:B||b.breadcrumbName},{default:function(){return[A({route:b,params:x,routes:k,paths:O})]}})})};return function(){var p,s,C,k=o.routes,m=o.params,x=m===void 0?{}:m,M=Pe(U(f,o)),$=(p=U(f,o,"separator"))!==null&&p!==void 0?p:"/",A=o.itemRender||f.itemRender||Ie;k&&k.length>0?C=I({routes:k,params:x,separator:$,itemRender:A}):M.length&&(C=M.map(function(b,B){return Xe(Ye(b.type)==="object"&&(b.type.__ANT_BREADCRUMB_ITEM||b.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Ze(b,{separator:$,key:B})}));var R=(s={},he(s,h.value,!0),he(s,"".concat(h.value,"-rtl"),y.value==="rtl"),s);return a("div",{class:R},[C])}}});var Lt=["separator","class"],Ut=function(){return{prefixCls:String}};const le=Y({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Ut(),setup:function(o,_){var f=_.slots,g=_.attrs,h=ie("breadcrumb",o),y=h.prefixCls;return function(){var S;g.separator;var P=g.class,I=xe(g,Lt),p=Pe((S=f.default)===null||S===void 0?void 0:S.call(f));return a("span",re({class:["".concat(y.value,"-separator"),P]},I),[p.length>0?p:"/"])}}});z.Item=q;z.Separator=le;z.install=function(r){return r.component(z.name,z),r.component(q.name,q),r.component(le.name,le),r};N.useInjectFormItemContext=tt;N.ItemRest=se;N.install=function(r){return r.component(N.name,N),r.component(N.Item.name,N.Item),r.component(se.name,se),r};W.setDefaultIndicator=ht;W.install=function(r){return r.component(W.name,W),r};const Wt={class:"hint"},qt={class:"location-bar"},Gt={key:0},Kt=["onClick"],Qt={key:3,style:{"margin-left":"8px"}},Ht={class:"actions"},Jt=["onClick"],Xt={style:{width:"512px",background:"var(--zp-primary-background)",padding:"16px","border-radius":"4px","box-shadow":"0 0 4px var(--zp-secondary-background)",border:"1px solid var(--zp-secondary-background)"}},Yt={style:{padding:"4px"}},Zt={style:{padding:"4px"}},en={style:{padding:"4px"}},tn={key:0,class:"view"},nn={style:{padding:"16px 0 32px"}},an={key:0,class:"preview-switch"},rn=Y({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},walkModePath:{},stackKey:{}},setup(r){const o=r,_=nt(),{scroller:f,stackViewEl:g,props:h,multiSelectedIdxs:y,spinning:S}=Mt().toRefs(),{currLocation:P,currPage:I,refresh:p,copyLocation:s,back:C,openNext:k,stack:m,quickMoveTo:x,addToSearchScanPathAndQuickMove:M,searchPathInfo:$,locInputValue:A,isLocationEditing:R,onLocEditEnter:b,onEditBtnClick:B,share:O,selectAll:j,onCreateFloderBtnClick:G,onWalkBtnClick:E,showWalkButton:ue}=$t(),{gridItems:$e,sortMethodConv:Ae,moreActionsDropdownShow:Z,sortedFiles:K,sortMethod:ee,itemSize:de,loadNextDir:Re,loadNextDirLoading:Be,canLoadNext:De,onScroll:Fe,cellWidth:Q}=At(),{onDrop:Ne,onFileDragStart:Ee,onFileDragEnd:Te}=Rt(),{onFileItemClick:Ve,onContextMenuClick:ce,showGenInfo:H,imageGenInfo:pe,q:ze}=Bt({openNext:k}),{previewIdx:J,onPreviewVisibleChange:Oe,previewing:me,previewImgMove:ve,canPreview:fe}=Dt(),{showMenuIdx:te}=Ft();return at(()=>o,()=>{h.value=o;const l=Nt.get(o.stackKey??"");l&&(m.value=l.slice())},{immediate:!0}),(l,t)=>{const je=vt,Le=ft,Ue=kt,ke=q,ge=z,We=gt,qe=Ct,Ce=bt,Ge=_t,Ke=oe,be=Me,Qe=St,_e=Pt,He=N,Je=W;return d(),F(Je,{spinning:e(S),size:"large"},{default:i(()=>[a(je,{style:{display:"none"}}),u("div",{ref_key:"stackViewEl",ref:g,onDragover:t[24]||(t[24]=v(()=>{},["prevent"])),onDrop:t[25]||(t[25]=v(n=>e(Ne)(n),["prevent"])),class:"container"},[a(Ue,{visible:e(H),"onUpdate:visible":t[1]||(t[1]=n=>T(H)?H.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>H.value=!1)},{cancelText:i(()=>[]),default:i(()=>[a(Le,{active:"",loading:!e(ze).isIdle},{default:i(()=>[u("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto","z-index":"9999"},onDblclick:t[0]||(t[0]=n=>e(rt)(e(pe)))},[u("div",Wt,c(l.$t("doubleClickToCopy")),1),L(" "+c(e(pe)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),u("div",qt,[o.walkModePath?(d(),w("div",Gt,[a(We,null,{title:i(()=>[L(c(l.$t("walk-mode-move-message")),1)]),default:i(()=>[a(ge,{style:{flex:"1"}},{default:i(()=>[(d(!0),w(ne,null,ae(e(m),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("span",null,c(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})])):(d(),w("div",{key:1,class:"breadcrumb",style:ot({flex:e(R)?1:""})},[e(R)?(d(),F(qe,{key:0,style:{flex:"1"},value:e(A),"onUpdate:value":t[3]||(t[3]=n=>T(A)?A.value=n:null),onClick:t[4]||(t[4]=v(()=>{},["stop"])),onPressEnter:e(b),"allow-clear":""},null,8,["value","onPressEnter"])):(d(),F(ge,{key:1,style:{flex:"1"}},{default:i(()=>[(d(!0),w(ne,null,ae(e(m),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("a",{onClick:v(ye=>e(C)(D),["prevent"])},c(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),9,Kt)]),_:2},1024))),128))]),_:1})),e(R)?(d(),F(Ce,{key:2,size:"small",onClick:e(b),type:"primary"},{default:i(()=>[L(c(l.$t("go")),1)]),_:1},8,["onClick"])):(d(),w("div",Qt,[u("a",{onClick:t[5]||(t[5]=v((...n)=>e(s)&&e(s)(...n),["prevent"])),style:{"margin-right":"4px"}},c(l.$t("copy")),1),u("a",{onClick:t[6]||(t[6]=v((...n)=>e(B)&&e(B)(...n),["prevent","stop"]))},c(l.$t("edit")),1)]))],4)),u("div",Ht,[u("a",{class:"opt",onClick:t[7]||(t[7]=v((...n)=>e(p)&&e(p)(...n),["prevent"]))},c(l.$t("refresh")),1),e(ue)?(d(),w("a",{key:0,class:"opt",onClick:t[8]||(t[8]=v((...n)=>e(E)&&e(E)(...n),["prevent"]))}," Walk ")):V("",!0),u("a",{class:"opt",onClick:t[9]||(t[9]=v((...n)=>e(j)&&e(j)(...n),["prevent","stop"]))},c(l.$t("selectAll")),1),e(st)?V("",!0):(d(),w("a",{key:1,class:"opt",onClick:t[10]||(t[10]=v((...n)=>e(O)&&e(O)(...n),["prevent"]))},c(l.$t("share")),1)),a(be,null,{overlay:i(()=>[a(Ke,null,{default:i(()=>[(d(!0),w(ne,null,ae(e(_).quickMovePaths,n=>(d(),F(Ge,{key:n.dir},{default:i(()=>[u("a",{onClick:v(D=>e(x)(n.dir),["prevent"])},c(n.zh),9,Jt)]),_:2},1024))),128))]),_:1})]),default:i(()=>[u("a",{class:"opt",onClick:t[11]||(t[11]=v(()=>{},["prevent"]))},[L(c(l.$t("quickMove"))+" ",1),a(e(Se))])]),_:1}),a(be,{trigger:["click"],visible:e(Z),"onUpdate:visible":t[20]||(t[20]=n=>T(Z)?Z.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:i(()=>[u("div",Xt,[a(He,lt(it({labelCol:{span:6},wrapperCol:{span:18}})),{default:i(()=>[a(_e,{label:l.$t("gridCellWidth")},{default:i(()=>[a(Qe,{modelValue:e(Q),"onUpdate:modelValue":t[13]||(t[13]=n=>T(Q)?Q.value=n:null),max:1024,min:64,step:64},null,8,["modelValue"])]),_:1},8,["label"]),a(_e,{label:l.$t("sortingMethod")},{default:i(()=>[a(e(ut),{value:e(ee),"onUpdate:value":t[14]||(t[14]=n=>T(ee)?ee.value=n:null),onClick:t[15]||(t[15]=v(()=>{},["stop"])),conv:e(Ae),options:e(dt)},null,8,["value","conv","options"])]),_:1},8,["label"]),u("div",Yt,[e($)?e($).can_delete?(d(),w("a",{key:1,onClick:t[17]||(t[17]=v((...n)=>e(M)&&e(M)(...n),["prevent"]))},c(l.$t("removeFromSearchScanPathAndQuickMove")),1)):V("",!0):(d(),w("a",{key:0,onClick:t[16]||(t[16]=v((...n)=>e(M)&&e(M)(...n),["prevent"]))},c(l.$t("addToSearchScanPathAndQuickMove")),1))]),u("div",Zt,[u("a",{onClick:t[18]||(t[18]=v(n=>e(ct)(e(P)+"/"),["prevent"]))},c(l.$t("openWithLocalFileBrowser")),1)]),u("div",en,[u("a",{onClick:t[19]||(t[19]=v((...n)=>e(G)&&e(G)(...n),["prevent"]))},c(l.$t("createFolder")),1)])]),_:1},16)])]),default:i(()=>[u("a",{class:"opt",onClick:t[12]||(t[12]=v(()=>{},["prevent"]))},c(l.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(I)?(d(),w("div",tn,[a(e(Et),{class:"file-list",items:e(K),ref_key:"scroller",ref:f,onScroll:e(Fe),"item-size":e(de).first,"key-field":"fullpath","item-secondary-size":e(de).second,gridItems:e($e)},pt({default:i(({item:n,index:D})=>[a(Tt,{idx:parseInt(D),file:n,"full-screen-preview-image-url":e(K)[e(J)]?e(mt)(e(K)[e(J)]):"","show-menu-idx":e(te),"onUpdate:showMenuIdx":t[21]||(t[21]=ye=>T(te)?te.value=ye:null),selected:e(y).includes(D),"cell-width":e(Q),onFileItemClick:e(Ve),onDragstart:e(Ee),onDragend:e(Te),onPreviewVisibleChange:e(Oe),onContextMenuClick:e(ce)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","cell-width","onFileItemClick","onDragstart","onDragend","onPreviewVisibleChange","onContextMenuClick"])]),_:2},[o.walkModePath?{name:"after",fn:i(()=>[u("div",nn,[a(Ce,{onClick:e(Re),loading:e(Be),block:"",type:"primary",disabled:!e(De),ghost:""},{default:i(()=>[L(c(l.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])])]),key:"0"}:void 0]),1032,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(me)?(d(),w("div",an,[a(e(wt),{onClick:t[22]||(t[22]=n=>e(ve)("prev")),class:we({disable:!e(fe)("prev")})},null,8,["class"]),a(e(It),{onClick:t[23]||(t[23]=n=>e(ve)("next")),class:we({disable:!e(fe)("next")})},null,8,["class"])])):V("",!0)])):V("",!0)],544),e(me)?(d(),F(xt,{key:0,file:e(K)[e(J)],idx:e(J),onContextMenuClick:e(ce)},null,8,["file","idx","onContextMenuClick"])):V("",!0)]),_:1},8,["spinning"])}}});const vn=yt(rn,[["__scopeId","data-v-0f674aa0"]]);export{vn as default}; diff --git a/vue/dist/index.html b/vue/dist/index.html index b666bf8..783d8f4 100644 --- a/vue/dist/index.html +++ b/vue/dist/index.html @@ -7,7 +7,7 @@ Infinite Image Browsing - + diff --git a/vue/src/page/fileTransfer/fullScreenContextMenu.vue b/vue/src/page/fileTransfer/fullScreenContextMenu.vue index 11eb143..803ec35 100644 --- a/vue/src/page/fileTransfer/fullScreenContextMenu.vue +++ b/vue/src/page/fileTransfer/fullScreenContextMenu.vue @@ -249,10 +249,6 @@ const copyPositivePrompt = () => copy2clipboardI18n(geninfoFrags.value[0] ?? '') padding-top: 4px; position: relative; - .gen-info-frag { - margin-bottom: .5em; - } - .info-tags { .info-tag { display: inline-block;