From 7ffc22fa2206db9fc0d6ce9267cd825d6e6af4e7 Mon Sep 17 00:00:00 2001 From: zanllp Date: Sat, 23 Sep 2023 11:02:24 +0800 Subject: [PATCH] Improve fuzzy-search regexp function hint. --- javascript/index.js | 2 +- .../assets/{FileItem-ced5f921.js => FileItem-c84a61c8.js} | 2 +- ...SliPagePane-25ccb7d8.js => ImgSliPagePane-0186a499.js} | 2 +- ...ImageGrid-2899eea8.js => MatchedImageGrid-2776313c.js} | 2 +- vue/dist/assets/SubstrSearch-1edc4acf.css | 1 - vue/dist/assets/SubstrSearch-218d7a61.js | 1 + vue/dist/assets/SubstrSearch-4bbe3e8d.js | 1 - vue/dist/assets/SubstrSearch-7e9861e7.css | 1 + .../{TagSearch-b9fd740b.js => TagSearch-0422ab6e.js} | 2 +- ...atchDownload-9459d89e.js => batchDownload-6f33ec7a.js} | 2 +- vue/dist/assets/{db-8d04be33.js => db-f71a84c3.js} | 2 +- ...{emptyStartup-06d4c63f.js => emptyStartup-a812cca8.js} | 2 +- ...Menu-9e3be5a3.js => fullScreenContextMenu-67c7b1b8.js} | 2 +- ...lobalSetting-5ce174c1.js => globalSetting-be834608.js} | 2 +- vue/dist/assets/{hook-9c9eb74d.js => hook-8fa8389e.js} | 2 +- vue/dist/assets/{index-54d35579.js => index-b44dfcf8.js} | 8 ++++---- .../assets/{numInput-be9a0500.js => numInput-6bcdca58.js} | 2 +- .../assets/{shortcut-dae64d46.js => shortcut-0fe96b62.js} | 2 +- .../{stackView-ddc0c403.js => stackView-c5946a9f.js} | 2 +- vue/dist/index.html | 2 +- vue/src/i18n/en.ts | 3 ++- vue/src/i18n/zh-hans.ts | 3 ++- vue/src/i18n/zh-hant.ts | 3 ++- vue/src/page/TagSearch/SubstrSearch.vue | 2 +- 24 files changed, 28 insertions(+), 25 deletions(-) rename vue/dist/assets/{FileItem-ced5f921.js => FileItem-c84a61c8.js} (99%) rename vue/dist/assets/{ImgSliPagePane-25ccb7d8.js => ImgSliPagePane-0186a499.js} (74%) rename vue/dist/assets/{MatchedImageGrid-2899eea8.js => MatchedImageGrid-2776313c.js} (89%) delete mode 100644 vue/dist/assets/SubstrSearch-1edc4acf.css create mode 100644 vue/dist/assets/SubstrSearch-218d7a61.js delete mode 100644 vue/dist/assets/SubstrSearch-4bbe3e8d.js create mode 100644 vue/dist/assets/SubstrSearch-7e9861e7.css rename vue/dist/assets/{TagSearch-b9fd740b.js => TagSearch-0422ab6e.js} (99%) rename vue/dist/assets/{batchDownload-9459d89e.js => batchDownload-6f33ec7a.js} (90%) rename vue/dist/assets/{db-8d04be33.js => db-f71a84c3.js} (92%) rename vue/dist/assets/{emptyStartup-06d4c63f.js => emptyStartup-a812cca8.js} (98%) rename vue/dist/assets/{fullScreenContextMenu-9e3be5a3.js => fullScreenContextMenu-67c7b1b8.js} (99%) rename vue/dist/assets/{globalSetting-5ce174c1.js => globalSetting-be834608.js} (98%) rename vue/dist/assets/{hook-9c9eb74d.js => hook-8fa8389e.js} (95%) rename vue/dist/assets/{index-54d35579.js => index-b44dfcf8.js} (98%) rename vue/dist/assets/{numInput-be9a0500.js => numInput-6bcdca58.js} (99%) rename vue/dist/assets/{shortcut-dae64d46.js => shortcut-0fe96b62.js} (99%) rename vue/dist/assets/{stackView-ddc0c403.js => stackView-c5946a9f.js} (96%) diff --git a/javascript/index.js b/javascript/index.js index 149638e..7363132 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-ced5f921.js b/vue/dist/assets/FileItem-c84a61c8.js similarity index 99% rename from vue/dist/assets/FileItem-ced5f921.js rename to vue/dist/assets/FileItem-c84a61c8.js index dd652b1..427dad9 100644 --- a/vue/dist/assets/FileItem-ced5f921.js +++ b/vue/dist/assets/FileItem-c84a61c8.js @@ -1,4 +1,4 @@ -var fn=Object.defineProperty;var vn=(e,t,n)=>t in e?fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qe=(e,t,n)=>(vn(e,typeof t!="symbol"?t+"":t,n),n);import{P as $e,c5 as pn,a as ie,d as me,bq as Nt,u as Ne,c as w,b$ as zt,_ as hn,V as de,a0 as Ae,ao as U,bL as ut,a3 as dt,bo as mn,h as le,c6 as gn,b as yn,ay as bn,c7 as wn,a2 as ft,bK as An,c8 as kn,c9 as Sn,$ as H,b0 as Cn,z as te,aA as In,a1 as En,ag as ae,ca as On,aR as _n,cb as Pn,cc as xn,aM as Qt,ar as Me,bn as Ye,cd as Tn,ce as $n,c4 as Se,cf as Mn,cg as Bn,R as ue,ch as Fn,L as ne,ci as Dt,ai as L,U as Nn,cj as Ze,x as j,ck as Lt,cl as vt,cm as zn,cn as Qn,co as jt,cp as Rt,k as Xe,an as Dn,cq as Ht,al as ee,cr as et,l as he,aC as Be,aw as Ln,aj as De,cs as jn,ct as pt,as as Vt,bQ as ht,bP as Rn,cu as Oe,cv as Hn,aD as Vn,cw as Z,bO as Ut,cx as Un,cy as Jn,t as Ve,am as mt,aq as ge,cz as gt,c3 as Wn,J as Kn,bZ as yt,cA as qn,bY as Gn,cB as Yn,cC as Zn,at as Xn,au as ei,ax as Jt,o as x,m as W,cD as ti,cE as ni,cF as ii,cG as ai,cH as ri,a5 as li,y as V,cI as Ce,C as Y,n as F,A as be,cJ as bt,bG as si,cK as oi,B as ci,N as fe,v as R,r as J,W as Wt,cL as ui,c0 as di,M as Kt,cM as fi,cN as vi,p as re,ae as pi,cO as hi,cP as mi,X as gi}from"./index-54d35579.js";import{h as yi,r as bi,a as wi,t as Ai}from"./db-8d04be33.js";import{t as Le,l as ve,C as ki,g as Si}from"./shortcut-dae64d46.js";var qt=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:$e.any,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},align:{type:Object},getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:{type:Object,default:void 0},forceRender:{type:Boolean,default:void 0},mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:void 0},onVisibleChange:{type:Function},"onUpdate:visible":{type:Function}}},je=pn(),Ci=function(){return ie(ie({},qt()),{},{type:je.type,size:String,htmlType:je.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:$e.any,title:String,loading:je.loading,onClick:{type:Function}})},Ii=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],Ei=de.Group;const Fe=me({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Nt(Ci(),{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,v=function(S){r("update:visible",S),r("visibleChange",S)},c=Ne("dropdown-button",t),h=c.prefixCls,b=c.direction,d=c.getPopupContainer;return function(){var m,S,p=ie(ie({},t),a),l=p.type,s=l===void 0?"default":l,o=p.disabled,f=p.loading,A=p.htmlType,g=p.class,u=g===void 0?"":g,C=p.overlay,O=C===void 0?(m=i.overlay)===null||m===void 0?void 0:m.call(i):C,I=p.trigger,E=p.align,P=p.visible;p.onVisibleChange;var k=p.placement,$=k===void 0?b.value==="rtl"?"bottomLeft":"bottomRight":k,M=p.href,Q=p.title,_=p.icon,z=_===void 0?((S=i.icon)===null||S===void 0?void 0:S.call(i))||w(zt,null,null):_,D=p.mouseEnterDelay,y=p.mouseLeaveDelay,T=p.overlayClassName,B=p.overlayStyle,q=p.destroyPopupOnHide,K=p.onClick;p["onUpdate:visible"];var X=hn(p,Ii),G={align:E,disabled:o,trigger:o?[]:I,placement:$,getPopupContainer:d.value,onVisibleChange:v,mouseEnterDelay:D,mouseLeaveDelay:y,visible:P,overlayClassName:T,overlayStyle:B,destroyPopupOnHide:q},oe=w(de,{type:s,disabled:o,loading:f,onClick:K,htmlType:A,href:M,title:Q},{default:i.default}),ce=w(de,{type:s,icon:z},null);return w(Ei,ie(ie({},X),{},{class:Ae(h.value,u)}),{default:function(){return[i.leftButton?i.leftButton({button:oe}):oe,w(pe,G,{default:function(){return[i.rightButton?i.rightButton({button:ce}):ce]},overlay:function(){return O}})]}})}}});var Gt=me({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Nt(qt(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(t,n){var i=n.slots,a=n.attrs,r=n.emit,v=Ne("dropdown",t),c=v.prefixCls,h=v.rootPrefixCls,b=v.direction,d=v.getPopupContainer,m=U(function(){var s=t.placement,o=s===void 0?"":s,f=t.transitionName;return f!==void 0?f:o.indexOf("top")>=0?"".concat(h.value,"-slide-down"):"".concat(h.value,"-slide-up")}),S=function(){var o,f,A,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||{};ut(!C.mode||C.mode==="vertical","Dropdown",'mode="'.concat(C.mode,`" is not supported for Dropdown's Menu.`));var O=C.selectable,I=O===void 0?!1:O,E=C.expandIcon,P=E===void 0?(f=u.children)===null||f===void 0||(A=f.expandIcon)===null||A===void 0?void 0:A.call(f):E,k=typeof P<"u"&&ft(P)?P:w("span",{class:"".concat(c.value,"-menu-submenu-arrow")},[w(An,{class:"".concat(c.value,"-menu-submenu-arrow-icon")},null)]),$=ft(u)?dt(u,{mode:"vertical",selectable:I,expandIcon:function(){return k}}):u;return $},p=U(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 ut(!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,f=t.arrow,A=t.trigger,g=t.disabled,u=t.overlayClassName,C=(s=i.default)===null||s===void 0?void 0:s.call(i)[0],O=dt(C,mn({class:Ae(C==null||(o=C.props)===null||o===void 0?void 0:o.class,le({},"".concat(c.value,"-rtl"),b.value==="rtl"),"".concat(c.value,"-trigger"))},g?{disabled:g}:{})),I=Ae(u,le({},"".concat(c.value,"-rtl"),b.value==="rtl")),E=g?[]:A,P;E&&E.indexOf("contextmenu")!==-1&&(P=!0);var k=gn({arrowPointAtCenter:yn(f)==="object"&&f.pointAtCenter,autoAdjustOverflow:!0}),$=bn(ie(ie(ie({},t),a),{},{builtinPlacements:k,overlayClassName:I,arrow:f,alignPoint:P,prefixCls:c.value,getPopupContainer:d.value,transitionName:m.value,trigger:E,onVisibleChange:l,placement:p.value}),["overlay","onUpdate:visible"]);return w(wn,$,{default:function(){return[O]},overlay:S})}}});Gt.Button=Fe;const pe=Gt;var Oi=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},_i=me({compatConfig:{MODE:3},name:"ACheckableTag",props:Oi(),setup:function(t,n){var i=n.slots,a=n.emit,r=Ne("tag",t),v=r.prefixCls,c=function(d){var m=t.checked;a("update:checked",!m),a("change",!m),a("click",d)},h=U(function(){var b;return Ae(v.value,(b={},le(b,"".concat(v.value,"-checkable"),!0),le(b,"".concat(v.value,"-checkable-checked"),t.checked),b))});return function(){var b;return w("span",{class:h.value,onClick:c},[(b=i.default)===null||b===void 0?void 0:b.call(i)])}}});const Ue=_i;var Pi=new RegExp("^(".concat(kn.join("|"),")(-inverse)?$")),xi=new RegExp("^(".concat(Sn.join("|"),")$")),Ti=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:$e.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:$e.any}},we=me({compatConfig:{MODE:3},name:"ATag",props:Ti(),slots:["closeIcon","icon"],setup:function(t,n){var i=n.slots,a=n.emit,r=n.attrs,v=Ne("tag",t),c=v.prefixCls,h=v.direction,b=H(!0);Cn(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=U(function(){var p=t.color;return p?Pi.test(p)||xi.test(p):!1}),S=U(function(){var p;return Ae(c.value,(p={},le(p,"".concat(c.value,"-").concat(t.color),m.value),le(p,"".concat(c.value,"-has-color"),t.color&&!m.value),le(p,"".concat(c.value,"-hidden"),!b.value),le(p,"".concat(c.value,"-rtl"),h.value==="rtl"),p))});return function(){var p,l,s,o=t.icon,f=o===void 0?(p=i.icon)===null||p===void 0?void 0:p.call(i):o,A=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,O=C===void 0?!1:C,I=function(){return O?u?w("span",{class:"".concat(c.value,"-close-icon"),onClick:d},[u]):w(En,{class:"".concat(c.value,"-close-icon"),onClick:d},null):null},E={backgroundColor:A&&!m.value?A:void 0},P=f||null,k=(s=i.default)===null||s===void 0?void 0:s.call(i),$=P?w(te,null,[P,w("span",null,[k])]):k,M="onClick"in r,Q=w("span",{class:S.value,style:E},[$,I()]);return M?w(In,null,{default:function(){return[Q]}}):Q}}});we.CheckableTag=Ue;we.install=function(e){return e.component(we.name,we),e.component(Ue.name,Ue),e};const $i=we;pe.Button=Fe;pe.install=function(e){return e.component(pe.name,pe),e.component(Fe.name,Fe),e};var Mi={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 Bi=Mi;function wt(e){for(var t=1;t{document.addEventListener(...e),Qt(()=>document.removeEventListener(...e))},ta="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==",Ie=new WeakMap;function na(e,t){return{useHookShareState:i=>{const a=$n();Me(a),Ie.has(a)||(Ie.set(a,Ye(e(a,i??(t==null?void 0:t())))),Qt(()=>{Ie.delete(a)}));const r=Ie.get(a);return Me(r),{state:r,toRefs(){return Tn(r)}}}}}var ia={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 aa=ia;function Ct(e){for(var t=1;t(await Se.value.get("/files",{params:{folder_path:e}})).data,ka=async e=>(await Se.value.post("/delete_files",{file_paths:e})).data,en=async(e,t,n)=>(await Se.value.post("/move_files",{file_paths:e,dest:t,create_dest_folder:n})).data,Sa=async(e,t,n)=>(await Se.value.post("/copy_files",{file_paths:e,dest:t,create_dest_folder:n})).data,Ca=async e=>{await Se.value.post("/mkdirs",{dest_folder:e})};var tn={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress +var fn=Object.defineProperty;var vn=(e,t,n)=>t in e?fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Qe=(e,t,n)=>(vn(e,typeof t!="symbol"?t+"":t,n),n);import{P as $e,c5 as pn,a as ie,d as me,bq as Nt,u as Ne,c as w,b$ as zt,_ as hn,V as de,a0 as Ae,ao as U,bL as ut,a3 as dt,bo as mn,h as le,c6 as gn,b as yn,ay as bn,c7 as wn,a2 as ft,bK as An,c8 as kn,c9 as Sn,$ as H,b0 as Cn,z as te,aA as In,a1 as En,ag as ae,ca as On,aR as _n,cb as Pn,cc as xn,aM as Qt,ar as Me,bn as Ye,cd as Tn,ce as $n,c4 as Se,cf as Mn,cg as Bn,R as ue,ch as Fn,L as ne,ci as Dt,ai as L,U as Nn,cj as Ze,x as j,ck as Lt,cl as vt,cm as zn,cn as Qn,co as jt,cp as Rt,k as Xe,an as Dn,cq as Ht,al as ee,cr as et,l as he,aC as Be,aw as Ln,aj as De,cs as jn,ct as pt,as as Vt,bQ as ht,bP as Rn,cu as Oe,cv as Hn,aD as Vn,cw as Z,bO as Ut,cx as Un,cy as Jn,t as Ve,am as mt,aq as ge,cz as gt,c3 as Wn,J as Kn,bZ as yt,cA as qn,bY as Gn,cB as Yn,cC as Zn,at as Xn,au as ei,ax as Jt,o as x,m as W,cD as ti,cE as ni,cF as ii,cG as ai,cH as ri,a5 as li,y as V,cI as Ce,C as Y,n as F,A as be,cJ as bt,bG as si,cK as oi,B as ci,N as fe,v as R,r as J,W as Wt,cL as ui,c0 as di,M as Kt,cM as fi,cN as vi,p as re,ae as pi,cO as hi,cP as mi,X as gi}from"./index-b44dfcf8.js";import{h as yi,r as bi,a as wi,t as Ai}from"./db-f71a84c3.js";import{t as Le,l as ve,C as ki,g as Si}from"./shortcut-0fe96b62.js";var qt=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:$e.any,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},align:{type:Object},getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:{type:Object,default:void 0},forceRender:{type:Boolean,default:void 0},mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:void 0},onVisibleChange:{type:Function},"onUpdate:visible":{type:Function}}},je=pn(),Ci=function(){return ie(ie({},qt()),{},{type:je.type,size:String,htmlType:je.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:$e.any,title:String,loading:je.loading,onClick:{type:Function}})},Ii=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],Ei=de.Group;const Fe=me({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Nt(Ci(),{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,v=function(S){r("update:visible",S),r("visibleChange",S)},c=Ne("dropdown-button",t),h=c.prefixCls,b=c.direction,d=c.getPopupContainer;return function(){var m,S,p=ie(ie({},t),a),l=p.type,s=l===void 0?"default":l,o=p.disabled,f=p.loading,A=p.htmlType,g=p.class,u=g===void 0?"":g,C=p.overlay,O=C===void 0?(m=i.overlay)===null||m===void 0?void 0:m.call(i):C,I=p.trigger,E=p.align,P=p.visible;p.onVisibleChange;var k=p.placement,$=k===void 0?b.value==="rtl"?"bottomLeft":"bottomRight":k,M=p.href,Q=p.title,_=p.icon,z=_===void 0?((S=i.icon)===null||S===void 0?void 0:S.call(i))||w(zt,null,null):_,D=p.mouseEnterDelay,y=p.mouseLeaveDelay,T=p.overlayClassName,B=p.overlayStyle,q=p.destroyPopupOnHide,K=p.onClick;p["onUpdate:visible"];var X=hn(p,Ii),G={align:E,disabled:o,trigger:o?[]:I,placement:$,getPopupContainer:d.value,onVisibleChange:v,mouseEnterDelay:D,mouseLeaveDelay:y,visible:P,overlayClassName:T,overlayStyle:B,destroyPopupOnHide:q},oe=w(de,{type:s,disabled:o,loading:f,onClick:K,htmlType:A,href:M,title:Q},{default:i.default}),ce=w(de,{type:s,icon:z},null);return w(Ei,ie(ie({},X),{},{class:Ae(h.value,u)}),{default:function(){return[i.leftButton?i.leftButton({button:oe}):oe,w(pe,G,{default:function(){return[i.rightButton?i.rightButton({button:ce}):ce]},overlay:function(){return O}})]}})}}});var Gt=me({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:Nt(qt(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(t,n){var i=n.slots,a=n.attrs,r=n.emit,v=Ne("dropdown",t),c=v.prefixCls,h=v.rootPrefixCls,b=v.direction,d=v.getPopupContainer,m=U(function(){var s=t.placement,o=s===void 0?"":s,f=t.transitionName;return f!==void 0?f:o.indexOf("top")>=0?"".concat(h.value,"-slide-down"):"".concat(h.value,"-slide-up")}),S=function(){var o,f,A,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||{};ut(!C.mode||C.mode==="vertical","Dropdown",'mode="'.concat(C.mode,`" is not supported for Dropdown's Menu.`));var O=C.selectable,I=O===void 0?!1:O,E=C.expandIcon,P=E===void 0?(f=u.children)===null||f===void 0||(A=f.expandIcon)===null||A===void 0?void 0:A.call(f):E,k=typeof P<"u"&&ft(P)?P:w("span",{class:"".concat(c.value,"-menu-submenu-arrow")},[w(An,{class:"".concat(c.value,"-menu-submenu-arrow-icon")},null)]),$=ft(u)?dt(u,{mode:"vertical",selectable:I,expandIcon:function(){return k}}):u;return $},p=U(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 ut(!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,f=t.arrow,A=t.trigger,g=t.disabled,u=t.overlayClassName,C=(s=i.default)===null||s===void 0?void 0:s.call(i)[0],O=dt(C,mn({class:Ae(C==null||(o=C.props)===null||o===void 0?void 0:o.class,le({},"".concat(c.value,"-rtl"),b.value==="rtl"),"".concat(c.value,"-trigger"))},g?{disabled:g}:{})),I=Ae(u,le({},"".concat(c.value,"-rtl"),b.value==="rtl")),E=g?[]:A,P;E&&E.indexOf("contextmenu")!==-1&&(P=!0);var k=gn({arrowPointAtCenter:yn(f)==="object"&&f.pointAtCenter,autoAdjustOverflow:!0}),$=bn(ie(ie(ie({},t),a),{},{builtinPlacements:k,overlayClassName:I,arrow:f,alignPoint:P,prefixCls:c.value,getPopupContainer:d.value,transitionName:m.value,trigger:E,onVisibleChange:l,placement:p.value}),["overlay","onUpdate:visible"]);return w(wn,$,{default:function(){return[O]},overlay:S})}}});Gt.Button=Fe;const pe=Gt;var Oi=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},_i=me({compatConfig:{MODE:3},name:"ACheckableTag",props:Oi(),setup:function(t,n){var i=n.slots,a=n.emit,r=Ne("tag",t),v=r.prefixCls,c=function(d){var m=t.checked;a("update:checked",!m),a("change",!m),a("click",d)},h=U(function(){var b;return Ae(v.value,(b={},le(b,"".concat(v.value,"-checkable"),!0),le(b,"".concat(v.value,"-checkable-checked"),t.checked),b))});return function(){var b;return w("span",{class:h.value,onClick:c},[(b=i.default)===null||b===void 0?void 0:b.call(i)])}}});const Ue=_i;var Pi=new RegExp("^(".concat(kn.join("|"),")(-inverse)?$")),xi=new RegExp("^(".concat(Sn.join("|"),")$")),Ti=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:$e.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:$e.any}},we=me({compatConfig:{MODE:3},name:"ATag",props:Ti(),slots:["closeIcon","icon"],setup:function(t,n){var i=n.slots,a=n.emit,r=n.attrs,v=Ne("tag",t),c=v.prefixCls,h=v.direction,b=H(!0);Cn(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=U(function(){var p=t.color;return p?Pi.test(p)||xi.test(p):!1}),S=U(function(){var p;return Ae(c.value,(p={},le(p,"".concat(c.value,"-").concat(t.color),m.value),le(p,"".concat(c.value,"-has-color"),t.color&&!m.value),le(p,"".concat(c.value,"-hidden"),!b.value),le(p,"".concat(c.value,"-rtl"),h.value==="rtl"),p))});return function(){var p,l,s,o=t.icon,f=o===void 0?(p=i.icon)===null||p===void 0?void 0:p.call(i):o,A=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,O=C===void 0?!1:C,I=function(){return O?u?w("span",{class:"".concat(c.value,"-close-icon"),onClick:d},[u]):w(En,{class:"".concat(c.value,"-close-icon"),onClick:d},null):null},E={backgroundColor:A&&!m.value?A:void 0},P=f||null,k=(s=i.default)===null||s===void 0?void 0:s.call(i),$=P?w(te,null,[P,w("span",null,[k])]):k,M="onClick"in r,Q=w("span",{class:S.value,style:E},[$,I()]);return M?w(In,null,{default:function(){return[Q]}}):Q}}});we.CheckableTag=Ue;we.install=function(e){return e.component(we.name,we),e.component(Ue.name,Ue),e};const $i=we;pe.Button=Fe;pe.install=function(e){return e.component(pe.name,pe),e.component(Fe.name,Fe),e};var Mi={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 Bi=Mi;function wt(e){for(var t=1;t{document.addEventListener(...e),Qt(()=>document.removeEventListener(...e))},ta="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==",Ie=new WeakMap;function na(e,t){return{useHookShareState:i=>{const a=$n();Me(a),Ie.has(a)||(Ie.set(a,Ye(e(a,i??(t==null?void 0:t())))),Qt(()=>{Ie.delete(a)}));const r=Ie.get(a);return Me(r),{state:r,toRefs(){return Tn(r)}}}}}var ia={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 aa=ia;function Ct(e){for(var t=1;t(await Se.value.get("/files",{params:{folder_path:e}})).data,ka=async e=>(await Se.value.post("/delete_files",{file_paths:e})).data,en=async(e,t,n)=>(await Se.value.post("/move_files",{file_paths:e,dest:t,create_dest_folder:n})).data,Sa=async(e,t,n)=>(await Se.value.post("/copy_files",{file_paths:e,dest:t,create_dest_folder:n})).data,Ca=async e=>{await Se.value.post("/mkdirs",{dest_folder:e})};var tn={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress * @license MIT */(function(e,t){(function(n,i){e.exports=i})(Mn,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),f=o.querySelector(i.barSelector),A=i.speed,g=i.easing;return o.offsetWidth,c(function(u){i.positionUsing===""&&(i.positionUsing=n.getPositioningCSS()),h(f,v(l,A,g)),l===1?(h(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){h(o,{transition:"all "+A+"ms linear",opacity:0}),setTimeout(function(){n.remove(),u()},A)},A)):setTimeout(u,A)}),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),f=l?"-100":r(n.status||0),A=n.getParent(),g;return h(o,{transition:"all 0 linear",transform:"translate3d("+f+"%,0,0)"}),i.showSpinner||(g=s.querySelector(i.spinnerSelector),g&&p(g)),A!=document.body&&d(A,"nprogress-custom-parent"),A.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&&p(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 v(l,s,o){var f;return i.positionUsing==="translate3d"?f={transform:"translate3d("+r(l)+"%,0,0)"}:i.positionUsing==="translate"?f={transform:"translate("+r(l)+"%,0)"}:f={"margin-left":r(l)+"%"},f.transition="all "+s+"ms "+o,f}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,O){return O.toUpperCase()})}function f(u){var C=document.body.style;if(u in C)return u;for(var O=l.length,I=u.charAt(0).toUpperCase()+u.slice(1),E;O--;)if(E=l[O]+I,E in C)return E;return u}function A(u){return u=o(u),s[u]||(s[u]=f(u))}function g(u,C,O){C=A(C),u.style[C]=O}return function(u,C){var O=arguments,I,E;if(O.length==2)for(I in C)E=C[I],E!==void 0&&C.hasOwnProperty(I)&&g(u,I,E);else g(u,O[1],O[2])}}();function b(l,s){var o=typeof l=="string"?l:S(l);return o.indexOf(" "+s+" ")>=0}function d(l,s){var o=S(l),f=o+s;b(o,s)||(l.className=f.substring(1))}function m(l,s){var o=S(l),f;b(l,s)&&(f=o.replace(" "+s+" "," "),l.className=f.substring(1,f.length-1))}function S(l){return(" "+(l&&l.className||"")+" ").replace(/\s+/gi," ")}function p(l){l&&l.parentNode&&l.parentNode.removeChild(l)}return n})})(tn);var Ia=tn.exports;const Ea=Bn(Ia),Oa=e=>{const t=H("");return new Promise(n=>{ue.confirm({title:L("inputFolderName"),content:()=>w(Nn,{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()}})})},nn=()=>w("p",{style:{background:"var(--zp-secondary-background)",padding:"8px",borderLeft:"4px solid var(--primary-color)"}},[j("Tips: "),L("multiSelectTips")]),_a=e=>{ue.confirm({width:"80vw",title:e.name,icon:null,content:()=>w("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}},[w("video",{style:{maxHeight:Fn?"80vh":"60vh"},src:ne(e),controls:!0,autoplay:!0},null),w("div",{class:"actions",style:{marginTop:"16px"}},[w(de,{onClick:()=>Dt([ne(e,!0)])},{icon:w(Wi,null,null),default:L("download")})])]),maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})};function Pa(){const e=[];for(let a=0;a<72;a++){const v=`hsl(${a*7.2}, 90%, 35%)`;e.push(v)}return e}const Pt=Pa(),an=Lt("useTagStore",()=>{const e=Ye(new Map),t=async r=>{if(r=r.filter(v=>!e.has(v)),!!r.length)try{r.forEach(c=>e.set(c,[]));const v=await yi(r);for(const c in v)e.set(c,v[c])}catch{r.forEach(v=>e.delete(v))}},n=new Map;return{tagMap:e,getColor:r=>{let v=n.get(r);if(!v){const c=vt.hash.sha256.hash(r),h=parseInt(vt.codec.hex.fromBits(c),16)%Pt.length;v=Pt[h],n.set(r,v)}return v},fetchImageTags:t,refreshTags:async r=>{r.forEach(v=>e.delete(v)),await t(r)}}}),xa=Lt("useBatchDownloadStore",()=>{const e=H([]);return{selectdFiles:e,addFiles:n=>{e.value=zn([...e.value,...n])}}});class xt{constructor(t,n=Qn.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(Rt(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 ye(t.info.fullpath);return t.children=jt(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 Re(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Gn(e)}const _e=new Map,N=Xe(),Ta=xa(),rn=an(),Tt=Dn(),Ee=new BroadcastChannel("iib-image-transfer-bus"),{eventEmitter:Pe,useEventListen:Je}=Ht(),{useHookShareState:se}=na((e,{images:t})=>{const n=H({tabIdx:-1,paneIdx:-1}),i=U(()=>ve(a.value)),a=H([]),r=U(()=>{var A;return a.value.map(g=>g.curr).slice((A=N.conf)!=null&&A.is_win?1:0)}),v=U(()=>Ze(...r.value)),c=H(N.defaultSortingMethod),h=H(n.value.walkModePath?new xt(n.value.walkModePath,c.value):void 0);he([()=>n.value.walkModePath,c],()=>{h.value=n.value.walkModePath?new xt(n.value.walkModePath,c.value):void 0});const b=Ye(new Set);he(i,()=>b.clear());const d=U(()=>{var C;if(t.value)return t.value;if(h.value)return h.value.images.filter(O=>!b.has(O.fullpath));if(!i.value)return[];const A=((C=i.value)==null?void 0:C.files)??[],g=c.value;return jt((O=>N.onlyFoldersAndImages?O.filter(I=>I.type==="dir"||Rt(I.name)):O)(A),g).filter(O=>!b.has(O.fullpath))}),m=H([]),S=H(-1),p=U(()=>h.value?!h.value.isCompleted:!1),l=H(!1),s=H(!1),o=()=>{var A,g,u;return(u=(g=(A=N.tabList)==null?void 0:A[n.value.tabIdx])==null?void 0:g.panes)==null?void 0:u[n.value.paneIdx]},f=Ht();return f.useEventListen("selectAll",()=>{console.log(`select all 0 -> ${d.value.length}`),m.value=Zt(0,d.value.length)}),{previewing:s,spinning:l,canLoadNext:p,multiSelectedIdxs:m,previewIdx:S,basePath:r,currLocation:v,currPage:i,stack:a,sortMethod:c,sortedFiles:d,scroller:H(),stackViewEl:H(),props:n,getPane:o,walker:h,deletedFiles:b,...f}},()=>({images:H()}));function wr(){const{previewIdx:e,eventEmitter:t,canLoadNext:n,previewing:i,sortedFiles:a,scroller:r,props:v}=se().toRefs(),{state:c}=se();let h=null;const b=(p,l)=>{var s;i.value=p,h!=null&&!p&&l&&((s=r.value)==null||s.scrollToItem(h),h=null)},d=()=>{v.value.walkModePath&&!S("next")&&n&&(ee.info(L("loadingNextFolder")),t.value.emit("loadNextDir",!0))};ke("keydown",p=>{var l;if(i.value){let s=e.value;if(["ArrowDown","ArrowRight"].includes(p.key))for(s++;a.value[s]&&!Z(a.value[s].name);)s++;else if(["ArrowUp","ArrowLeft"].includes(p.key))for(s--;a.value[s]&&!Z(a.value[s].name);)s--;if(Z((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=p=>{var s;let l=e.value;if(p==="next")for(l++;a.value[l]&&!Z(a.value[l].name);)l++;else if(p==="prev")for(l--;a.value[l]&&!Z(a.value[l].name);)l--;if(Z((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()},S=p=>{var s;let l=e.value;if(p==="next")for(l++;a.value[l]&&!Z(a.value[l].name);)l++;else if(p==="prev")for(l--;a.value[l]&&!Z(a.value[l].name);)l--;return Z((s=a.value[l])==null?void 0:s.name)??""};return Je("removeFiles",async()=>{var p;i.value&&!c.sortedFiles[e.value]&&(ee.info(L("manualExitFullScreen"),5),await et(500),(p=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||p.click(),e.value=-1)}),{previewIdx:e,onPreviewVisibleChange:b,previewing:i,previewImgMove:m,canPreview:S}}function Ar(){const e=H(),{scroller:t,stackViewEl:n,stack:i,currPage:a,currLocation:r,useEventListen:v,eventEmitter:c,getPane:h,props:b,deletedFiles:d,walker:m,sortedFiles:S}=se().toRefs();he(()=>i.value.length,Be((y,T)=>{var B;y!==T&&((B=t.value)==null||B.scrollToItem(0))},300));const p=async y=>{var T;await A(y),b.value.walkModePath&&(await et(),await((T=m.value)==null?void 0:T.reset()),c.value.emit("loadNextDir"))};Ln(async()=>{var y;if(!i.value.length){const T=await ye("/");i.value.push({files:T.files,curr:"/"})}e.value=new Ea,e.value.configure({parent:n.value}),b.value.path&&b.value.path!=="/"?await p(b.value.walkModePath??b.value.path):(y=N.conf)!=null&&y.home&&A(N.conf.home)}),he(r,Be(y=>{const T=h.value();if(!T)return;T.path=y;const B=T.path.split("/").pop(),K=(()=>{var X;if(!b.value.walkModePath){const G=Oe(y);for(const[oe,ce]of Object.entries(N.pathAliasMap))if(G.startsWith(ce))return G.replace(ce,oe);return B}return"Walk: "+(((X=N.quickMovePaths.find(G=>G.dir===T.walkModePath))==null?void 0:X.zh)??B)})();T.name=De("div",{style:"display:flex;align-items:center"},[De(la),De("span",{class:"line-clamp-1",style:"max-width: 256px"},K)]),T.nameFallbackStr=K,N.recent=N.recent.filter(X=>X.key!==T.key),N.recent.unshift({path:y,key:T.key}),N.recent.length>20&&(N.recent=N.recent.slice(0,20))},300));const l=()=>Ve(r.value),s=async y=>{var T,B;if(y.type==="dir")try{(T=e.value)==null||T.start();const{files:q}=await ye(y.fullpath);i.value.push({files:q,curr:y.name})}finally{(B=e.value)==null||B.done()}},o=y=>{for(;y(Me(N.conf,"global.conf load failed"),N.conf.is_win?y.toLowerCase()==T.toLowerCase():y==T),A=async y=>{var B,q;const T=i.value.slice();try{jn(y)||(y=Ze(((B=N.conf)==null?void 0:B.sd_cwd)??"/",y));const K=pt(y),X=i.value.map(G=>G.curr);for(X.shift();X[0]&&K[0]&&f(X[0],K[0]);)X.shift(),K.shift();for(let G=0;Gf(ce.name,G));if(!oe)throw console.error({frags:K,frag:G,stack:Vt(i.value)}),new Error(`${G} not found`);await s(oe)}}catch(K){throw ee.error(L("moveFailedCheckPath")+(K instanceof Error?K.message:"")),console.error(y,pt(y),a.value),i.value=T,K}},g=ht(async()=>{var y,T,B;try{if((y=e.value)==null||y.start(),m.value)await m.value.reset(),c.value.emit("loadNextDir");else{const{files:q}=await ye(i.value.length===1?"/":r.value);ve(i.value).files=q}d.value.clear(),(T=t.value)==null||T.scrollToItem(0),ee.success(L("refreshCompleted"))}finally{(B=e.value)==null||B.done()}});Rn("returnToIIB",ht(async()=>{var y,T;if(!b.value.walkModePath)try{(y=e.value)==null||y.start();const{files:B}=await ye(i.value.length===1?"/":r.value);ve(i.value).files.map(K=>K.date).join()!==B.map(K=>K.date).join()&&(ve(i.value).files=B,ee.success(L("autoUpdate")))}finally{(T=e.value)==null||T.done()}})),v.value("refresh",g);const u=y=>{b.value.walkModePath&&(h.value().walkModePath=y),p(y)},C=U(()=>N.quickMovePaths.map(y=>({...y,path:Oe(y.dir)}))),O=U(()=>{const y=Oe(r.value);return C.value.find(B=>B.path===y)}),I=async()=>{const y=O.value;if(y){if(!y.can_delete)return;await bi({path:r.value,type:"scanned"}),ee.success(L("removeCompleted"))}else await wi({path:r.value,type:"scanned"}),ee.success(L("addCompleted"));mt.emit("searchIndexExpired"),mt.emit("updateGlobalSetting")},E=H(!1),P=H(r.value),k=()=>{E.value=!0,P.value=r.value},$=async()=>{await A(P.value),E.value=!1};ke("click",y=>{var T,B,q;(q=(B=(T=y.target)==null?void 0:T.className)==null?void 0:B.includes)!=null&&q.call(B,"ant-input")||(E.value=!1)});const M=()=>{const y=parent.location,T=y.href.substring(0,y.href.length-y.search.length),B=new URLSearchParams(y.search);B.set("action","open"),m.value&&B.set("walk","1"),B.set("path",r.value);const q=`${T}?${B.toString()}`;Ve(q,L("copyLocationUrlSuccessMsg"))},Q=()=>c.value.emit("selectAll"),_=async()=>{await Oa(r.value),await g()},z=()=>{const y=r.value;_e.set(y,i.value);const T=N.tabList[b.value.tabIdx],B={type:"local",key:ge(),path:y,name:L("local"),stackKey:y,walkModePath:y};T.panes.push(B),T.key=B.key},D=U(()=>!m.value&&S.value.some(y=>y.type==="dir"));return{locInputValue:P,isLocationEditing:E,onLocEditEnter:$,onEditBtnClick:k,addToSearchScanPathAndQuickMove:I,searchPathInfo:O,refresh:g,copyLocation:l,back:o,openNext:s,currPage:a,currLocation:r,to:A,stack:i,scroller:t,share:M,selectAll:Q,quickMoveTo:u,onCreateFloderBtnClick:_,onWalkBtnClick:z,showWalkButton:D}}function kr({fetchNext:e}={}){const{scroller:t,sortedFiles:n,sortMethod:i,currLocation:a,stackViewEl:r,canLoadNext:v,previewIdx:c,props:h,walker:b}=se().toRefs(),{state:d}=se(),m=H(!1),S=H(N.defaultGridCellWidth),p=U(()=>S.value+16),l=44,{width:s}=Hn(r),o=U(()=>~~(s.value/p.value)),f=U(()=>{const I=p.value;return{first:I+(S.value<=160?0:l),second:I}}),A=H(!1),g=async()=>{var I;if(!(A.value||!h.value.walkModePath||!v.value))try{A.value=!0,await((I=b.value)==null?void 0:I.next())}finally{A.value=!1}},u=async(I=!1)=>{const E=t.value,P=()=>I?c.value:(E==null?void 0:E.$_endIndex)??0,k=()=>{const $=n.value.length,M=50;return $?e?P()>$-M:P()>$-M&&v.value:!0};for(;k();){await et(30);const $=await(e??g)();if(typeof $=="boolean"&&!$)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&&Z(P.name)).map(P=>P.fullpath);rn.fetchImageTags(E)}};he(a,Be(C,150));const O=Be(async()=>{await u(),C()},150);return{gridItems:o,sortedFiles:n,sortMethodConv:Vn,moreActionsDropdownShow:m,gridSize:p,sortMethod:i,onScroll:O,loadNextDir:g,loadNextDirLoading:A,canLoadNext:v,itemSize:f,cellWidth:S}}function Sr(){const{currLocation:e,sortedFiles:t,currPage:n,multiSelectedIdxs:i,eventEmitter:a,walker:r}=se().toRefs(),v=()=>{i.value=[]};return ke("click",v),ke("blur",v),he(n,v),{onFileDragStart:(d,m)=>{const S=Vt(t.value[m]);Tt.fileDragging=!0,console.log("onFileDragStart set drag file ",d,m,S);const p=[S];let l=S.type==="dir";if(i.value.includes(m)){const o=i.value.map(f=>t.value[f]);p.push(...o),l=o.some(f=>f.type==="dir")}const s={includeDir:l,loc:e.value||"search-result",path:gt(p,"fullpath").map(o=>o.fullpath),nodes:gt(p,"fullpath"),__id:"FileTransferData"};d.dataTransfer.setData("text/plain",JSON.stringify(s))},onDrop:async d=>{if(r.value)return;const m=Wn(d);if(!m)return;const S=e.value;if(m.loc===S)return;const p=Ut(),l=async()=>p.pushAction(async()=>{await Sa(m.path,S),a.value.emit("refresh"),ue.destroyAll()}),s=()=>p.pushAction(async()=>{await en(m.path,S),Pe.emit("removeFiles",{paths:m.path,loc:m.loc}),a.value.emit("refresh"),ue.destroyAll()});ue.confirm({title:L("confirm")+"?",width:"60vw",content:()=>{let o,f,A;return w("div",null,[w("div",null,[`${L("moveSelectedFilesTo")} ${S}`,w("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[m.path.map(g=>w("li",null,[g.split(/[/\\]/).pop()]))])]),w(nn,null,null),w("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},class:"actions"},[w(de,{onClick:ue.destroyAll},Re(o=L("cancel"))?o:{default:()=>[o]}),w(de,{type:"primary",loading:!p.isIdle,onClick:l},Re(f=L("copy"))?f:{default:()=>[f]}),w(de,{type:"primary",loading:!p.isIdle,onClick:s},Re(A=L("move"))?A:{default:()=>[A]})])])},maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})},multiSelectedIdxs:i,onFileDragEnd:()=>{Tt.fileDragging=!1}}}function Cr({openNext:e}){const t=H(!1),n=H(""),{sortedFiles:i,previewIdx:a,multiSelectedIdxs:r,stack:v,currLocation:c,spinning:h,previewing:b,stackViewEl:d,eventEmitter:m,props:S,deletedFiles:p}=se().toRefs(),l=Oe;Je("removeFiles",({paths:g,loc:u})=>{l(u)!==l(c.value)||!ve(v.value)||(g.forEach(O=>p.value.add(O)),g.filter(Z).forEach(O=>p.value.add(O.replace(/\.\w+$/,".txt"))))}),Je("addFiles",({files:g,loc:u})=>{if(l(u)!==l(c.value))return;const C=ve(v.value);C&&C.files.unshift(...g)});const s=Ut(),o=async(g,u,C)=>{a.value=C,N.fullscreenPreviewInitialUrl=ne(u);const O=r.value.indexOf(C);if(g.shiftKey){if(O!==-1)r.value.splice(O,1);else{r.value.push(C),r.value.sort((P,k)=>P-k);const I=r.value[0],E=r.value[r.value.length-1];r.value=Zt(I,E+1)}g.stopPropagation()}else g.ctrlKey||g.metaKey?(O!==-1?r.value.splice(O,1):r.value.push(C),g.stopPropagation()):await e(u)},f=async(g,u,C)=>{var $,M,Q;const O=ne(u),I=c.value,E={IIB_container_id:parent.IIB_container_id},P=()=>{let _=[];return r.value.includes(C)?_=r.value.map(z=>i.value[z]):_.push(u),_},k=async _=>{if(!h.value)try{h.value=!0,await Yn(u.fullpath),Ee.postMessage({...E,event:"click_hidden_button",btnEleId:"iib_hidden_img_update_trigger"}),await Zn(),Ee.postMessage({...E,event:"click_hidden_button",btnEleId:`iib_hidden_tab_${_}`})}catch(z){console.error(z),ee.error("发送图像失败,请携带console的错误消息找开发者")}finally{h.value=!1}};if(`${g.key}`.startsWith("toggle-tag-")){const _=+`${g.key}`.split("toggle-tag-")[1],{is_remove:z}=await Ai({tag_id:_,img_path:u.fullpath}),D=(M=($=N.conf)==null?void 0:$.all_custom_tags.find(y=>y.id===_))==null?void 0:M.name;rn.refreshTags([u.fullpath]),ee.success(L(z?"removedTagFromImage":"addedTagToImage",{tag:D}));return}switch(g.key){case"previewInNewWindow":return window.open(O);case"download":{const _=P();Dt(_.map(z=>ne(z,!0)));break}case"copyPreviewUrl":return Ve(parent.document.location.origin+O);case"send2txt2img":return k("txt2img");case"send2img2img":return k("img2img");case"send2inpaint":return k("inpaint");case"send2extras":return k("extras");case"send2savedDir":{const _=N.quickMovePaths.find(y=>y.key==="outdir_save");if(!_)return ee.error(L("unknownSavedDir"));const z=qn(_.dir,(Q=N.conf)==null?void 0:Q.sd_cwd),D=P();await en(D.map(y=>y.fullpath),z,!0),Pe.emit("removeFiles",{paths:D.map(y=>y.fullpath),loc:c.value}),Pe.emit("addFiles",{files:D,loc:z});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const _=g.key.split("-")[1];Ee.postMessage({...E,event:"send_to_control_net",type:_,url:ne(u)});break}case"send2outpaint":{n.value=await s.pushAction(()=>yt(u.fullpath)).res;const[_,z]=(n.value||"").split(` `);Ee.postMessage({...E,event:"send_to_outpaint",url:ne(u),prompt:_,negPrompt:z.slice(17)});break}case"openWithWalkMode":{_e.set(I,v.value);const _=N.tabList[S.value.tabIdx],z={type:"local",key:ge(),path:u.fullpath,name:L("local"),stackKey:I,walkModePath:u.fullpath};_.panes.push(z),_.key=z.key;break}case"openInNewTab":{_e.set(I,v.value);const _=N.tabList[S.value.tabIdx],z={type:"local",key:ge(),path:u.fullpath,name:L("local"),stackKey:I};_.panes.push(z),_.key=z.key;break}case"openOnTheRight":{_e.set(I,v.value);let _=N.tabList[S.value.tabIdx+1];_||(_={panes:[],key:"",id:ge()},N.tabList[S.value.tabIdx+1]=_);const z={type:"local",key:ge(),path:u.fullpath,name:L("local"),stackKey:I};_.panes.push(z),_.key=z.key;break}case"send2BatchDownload":{Ta.addFiles(P());break}case"viewGenInfo":{t.value=!0,n.value=await s.pushAction(()=>yt(u.fullpath)).res;break}case"openWithLocalFileBrowser":{await Kn(u.fullpath);break}case"deleteFiles":{const _=P(),z=async()=>{const D=_.map(y=>y.fullpath);await ka(D),ee.success(L("deleteSuccess")),Pe.emit("removeFiles",{paths:D,loc:c.value})};if(_.length===1&&N.ignoredConfirmActions.deleteOneOnly)return z();await new Promise(D=>{ue.confirm({title:L("confirmDelete"),maskClosable:!0,width:"60vw",content:()=>w("div",null,[w("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[_.map(y=>w("li",null,[y.fullpath.split(/[/\\]/).pop()]))]),w(nn,null,null),w(ki,{checked:N.ignoredConfirmActions.deleteOneOnly,"onUpdate:checked":y=>N.ignoredConfirmActions.deleteOneOnly=y},{default:()=>[L("deleteOneOnlySkipConfirm"),j(" ("),L("resetOnGlobalSettingsPage"),j(")")]})]),async onOk(){await z(),D()}})});break}}return{}},{isOutside:A}=Un(d);return ke("keydown",g=>{var C,O,I;const u=Si(g);if(b.value){const E=(C=Object.entries(N.shortcut).find(P=>P[1]===u&&P[1]))==null?void 0:C[0];if(E){g.stopPropagation(),g.preventDefault();const P=a.value,k=i.value[P];switch(E){case"delete":return ne(k)===N.fullscreenPreviewInitialUrl?ee.warn(L("fullscreenRestriction")):f({key:"deleteFiles"},k,P);case"download":return f({key:"download"},k,P);default:{const $=(O=/^toggle_tag_(.*)$/.exec(E))==null?void 0:O[1],M=(I=N.conf)==null?void 0:I.all_custom_tags.find(Q=>Q.name===$);return M?f({key:`toggle-tag-${M.id}`},k,P):void 0}}}}else!A.value&&["Ctrl + KeyA","Cmd + KeyA"].includes(u)&&(g.preventDefault(),g.stopPropagation(),m.value.emit("selectAll"))}),{onFileItemClick:o,onContextMenuClick:f,showGenInfo:t,imageGenInfo:n,q:s}}const Ir=()=>{const{stackViewEl:e}=se().toRefs(),t=H(-1);return Jn(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 $a(){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 xe;function We(){We.init||(We.init=!0,xe=$a()!==-1)}var ze={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){We(),Jt(()=>{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",xe&&this.$el.appendChild(e),e.data="about:blank",xe||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&&(!xe&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Ma=ti();Xn("data-v-b329ee4c");const Ba={class:"resize-observer",tabindex:"-1"};ei();const Fa=Ma((e,t,n,i,a,r)=>(x(),W("div",Ba)));ze.render=Fa;ze.__scopeId="data-v-b329ee4c";ze.__file="src/components/ResizeObserver.vue";function Te(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Te=function(t){return typeof t}:Te=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Te(e)}function Na(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $t(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,v=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),Jt(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 sn(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 Va(e,i,n);e._vue_visibilityState=a}}function Ua(e,t,n){var i=t.value,a=t.oldValue;if(!ln(i,a)){var r=e._vue_visibilityState;if(!i){on(e);return}r?r.createObserver(i,n):sn(e,{value:i},n)}}function on(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Ja={beforeMount:sn,updated:Ua,unmounted:on},Wa={itemsLimit:1e3},Ka=/(auto|scroll)/;function cn(e,t){return e.parentNode===null?t:cn(e.parentNode,t.concat([e]))}var He=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},qa=function(t){return He(t,"overflow")+He(t,"overflow-y")+He(t,"overflow-x")},Ga=function(t){return Ka.test(qa(t))};function Bt(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=cn(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=ni({id:er++,index:t,used:!0,key:i,type:a}),v=ii({item:n,position:0,nr:r});return e.push(v),v},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,v=this.typeField,c=this.simpleArray?null:this.keyField,h=this.items,b=h.length,d=this.sizes,m=this.$_views,S=this.$_unusedViews,p=this.pool,l=this.itemIndexByKey;let s,o,f,A,g;if(!b)s=o=A=g=f=0;else if(this.$_prerender)s=A=0,o=g=Math.min(this.prerender,h.length),f=null;else{const k=this.getScroll();if(t){let Q=k.start-this.$_lastUpdateScrollPosition;if(Q<0&&(Q=-Q),n===null&&Qk.start&&(z=D),D=~~((_+z)/2);while(D!==y);for(D<0&&(D=0),s=D,f=d[b-1].accumulator,o=D;ob&&(o=b)),A=s;Ab&&(o=b),A<0&&(A=0),g>b&&(g=b),f=Math.ceil(b/i)*n}}o-s>Wa.itemsLimit&&this.itemsLimitError(),this.totalSize=f;let u;const C=s<=this.$_endIndex&&o>=this.$_startIndex;if(C)for(let k=0,$=p.length;k<$;k++)u=p[k],u.nr.used&&(e&&(u.nr.index=l[u.item[c]]),(u.nr.index==null||u.nr.index=o)&&this.unuseView(u));const O=C?null:new Map;let I,E,P;for(let k=s;k=M.length)&&(u=this.addView(p,k,I,$,E),this.unuseView(u,!0),M=S.get(E)),u=M[P],O.set(E,P+1)),m.delete(u.nr.key),u.nr.used=!0,u.nr.index=k,u.nr.key=$,u.nr.type=E,m.set($,u),Q=!0;else if(!u.nr.used&&(u.nr.used=!0,u.nr.index=k,Q=!0,M)){const _=M.indexOf(u);_!==-1&&M.splice(_,1)}u.item=I,Q&&(k===h.length-1&&this.$emit("scroll-end"),k===0&&this.$emit("scroll-start")),n===null?(u.position=d[k-1].accumulator,u.offset=0):(u.position=Math.floor(k/i)*n,u.offset=k%i*a)}return this.$_startIndex=s,this.$_endIndex=o,this.emitUpdate&&this.$emit("update",s,o,A,g),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:C}},getListenerTarget(){let e=Bt(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 v=-(n?a.top:a.left),c=n?window.innerHeight:window.innerWidth;v<0&&(c+=v,v=0),v+c>r&&(c=r-v),i={start:v,end:v+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=Bt(this.$el),v=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+v+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 tr={key:0,ref:"before",class:"vue-recycle-scroller__slot"},nr={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function ir(e,t,n,i,a,r){const v=ai("ResizeObserver"),c=ri("observe-visibility");return li((x(),V("div",{class:fe(["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?(x(),V("div",tr,[Ce(e.$slots,"before")],512)):Y("v-if",!0),(x(),W(bt(n.listTag),{ref:"wrapper",style:ci({[e.direction==="vertical"?"minHeight":"minWidth"]:a.totalSize+"px"}),class:fe(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:F(()=>[(x(!0),V(te,null,be(a.pool,h=>(x(),W(bt(n.itemTag),si({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}]]},oi(n.skipHover?{}:{mouseenter:()=>{a.hoverKey=h.nr.key},mouseleave:()=>{a.hoverKey=null}})),{default:F(()=>[Ce(e.$slots,"default",{item:h.item,index:h.nr.index,active:h.nr.used})]),_:2},1040,["style","class"]))),128)),Ce(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(x(),V("div",nr,[Ce(e.$slots,"after")],512)):Y("v-if",!0),w(v,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[c,r.handleVisibilityChange]])}un.render=ir;un.__file="src/components/RecycleScroller.vue";const Ft=me({__name:"ContextMenu",props:{file:{},idx:{},selectedTag:{},disableDelete:{type:Boolean}},emits:["contextMenuClick"],setup(e,{emit:t}){const n=e,i=Xe(),a=U(()=>{var r;return(((r=i.conf)==null?void 0:r.all_custom_tags)??[]).reduce((v,c)=>[...v,{...c,selected:!!n.selectedTag.find(h=>h.id===c.id)}],[])});return(r,v)=>{const c=Wt,h=ui,b=di,d=Kt;return x(),W(d,{onClick:v[0]||(v[0]=m=>t("contextMenuClick",m,r.file,r.idx))},{default:F(()=>{var m;return[w(c,{key:"deleteFiles",disabled:r.disableDelete},{default:F(()=>[j(R(r.$t("deleteSelected")),1)]),_:1},8,["disabled"]),r.file.type==="dir"?(x(),V(te,{key:0},[w(c,{key:"openInNewTab"},{default:F(()=>[j(R(r.$t("openInNewTab")),1)]),_:1}),w(c,{key:"openOnTheRight"},{default:F(()=>[j(R(r.$t("openOnTheRight")),1)]),_:1}),w(c,{key:"openWithWalkMode"},{default:F(()=>[j(R(r.$t("openWithWalkMode")),1)]),_:1})],64)):Y("",!0),r.file.type==="file"?(x(),V(te,{key:1},[J(Z)(r.file.name)?(x(),V(te,{key:0},[w(c,{key:"viewGenInfo"},{default:F(()=>[j(R(r.$t("viewGenerationInfo")),1)]),_:1}),w(h),((m=J(i).conf)==null?void 0:m.launch_mode)!=="server"?(x(),V(te,{key:0},[w(c,{key:"send2txt2img"},{default:F(()=>[j(R(r.$t("sendToTxt2img")),1)]),_:1}),w(c,{key:"send2img2img"},{default:F(()=>[j(R(r.$t("sendToImg2img")),1)]),_:1}),w(c,{key:"send2inpaint"},{default:F(()=>[j(R(r.$t("sendToInpaint")),1)]),_:1}),w(c,{key:"send2extras"},{default:F(()=>[j(R(r.$t("sendToExtraFeatures")),1)]),_:1}),w(b,{key:"sendToThirdPartyExtension",title:r.$t("sendToThirdPartyExtension")},{default:F(()=>[w(c,{key:"send2controlnet-txt2img"},{default:F(()=>[j("ControlNet - "+R(r.$t("t2i")),1)]),_:1}),w(c,{key:"send2controlnet-img2img"},{default:F(()=>[j("ControlNet - "+R(r.$t("i2i")),1)]),_:1}),w(c,{key:"send2outpaint"},{default:F(()=>[j("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):Y("",!0),w(c,{key:"send2BatchDownload"},{default:F(()=>[j(R(r.$t("sendToBatchDownload")),1)]),_:1}),w(c,{key:"send2savedDir"},{default:F(()=>[j(R(r.$t("send2savedDir")),1)]),_:1}),w(h),w(b,{key:"toggle-tag",title:r.$t("toggleTag")},{default:F(()=>[(x(!0),V(te,null,be(a.value,S=>(x(),W(c,{key:`toggle-tag-${S.id}`},{default:F(()=>[j(R(S.name)+" ",1),S.selected?(x(),W(J(Yt),{key:0})):(x(),W(J(Xt),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"]),w(c,{key:"openWithLocalFileBrowser"},{default:F(()=>[j(R(r.$t("openWithLocalFileBrowser")),1)]),_:1})],64)):Y("",!0),w(c,{key:"previewInNewWindow"},{default:F(()=>[j(R(r.$t("previewInNewWindow")),1)]),_:1}),w(c,{key:"download"},{default:F(()=>[j(R(r.$t("download")),1)]),_:1}),w(c,{key:"copyPreviewUrl"},{default:F(()=>[j(R(r.$t("copySourceFilePreviewLink")),1)]),_:1})],64)):Y("",!0)]}),_:1})}}}),ar=["data-idx"],rr={key:1,class:"more"},lr={class:"float-btn-wrap"},sr={key:0,class:"tags-container"},or={class:"play-icon"},cr={key:0,class:"tags-container"},ur={key:4,class:"preview-icon-wrap"},dr={key:5,class:"profile"},fr={class:"name line-clamp-1"},vr={class:"basic-info"},pr=me({__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;fi(d=>({a5a93268:d.$props.cellWidth+"px"}));const i=Xe(),a=an(),r=U(()=>a.tagMap.get(n.file.fullpath)??[]),v=U(()=>{const d=i.gridThumbnailResolution;return i.enableThumbnail?vi(n.file,[d,d].join("x")):ne(n.file)}),c=U(()=>{var d;return(((d=i.conf)==null?void 0:d.all_custom_tags)??[]).reduce((m,S)=>[...m,{...S,selected:!!r.value.find(p=>p.id===S.id)}],[])}),h=U(()=>c.value.find(d=>d.type==="custom"&&d.name==="like")),b=()=>{Me(h.value),t("contextMenuClick",{key:`toggle-tag-${h.value.id}`},n.file,n.idx)};return(d,m)=>{const S=pe,p=Wt,l=Kt,s=mi,o=$i;return x(),W(S,{trigger:["contextmenu"],visible:J(i).longPressOpenContextMenu?typeof d.idx=="number"&&d.showMenuIdx===d.idx:void 0,"onUpdate:visible":m[8]||(m[8]=f=>typeof d.idx=="number"&&t("update:showMenuIdx",f?d.idx:-1))},{overlay:F(()=>[d.enableRightClickMenu?(x(),W(Ft,{key:0,file:d.file,idx:d.idx,"selected-tag":r.value,onContextMenuClick:m[7]||(m[7]=(f,A,g)=>t("contextMenuClick",f,A,g))},null,8,["file","idx","selected-tag"])):Y("",!0)]),default:F(()=>[(x(),V("li",{class:fe(["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[4]||(m[4]=f=>t("dragstart",f,d.idx)),onDragend:m[5]||(m[5]=f=>t("dragend",f,d.idx)),onClickCapture:m[6]||(m[6]=f=>t("fileItemClick",f,d.file,d.idx))},[re("div",null,[d.enableCloseIcon?(x(),V("div",{key:0,class:"close-icon",onClick:m[0]||(m[0]=f=>t("close-icon-click"))},[w(J(pi))])):Y("",!0),d.enableRightClickMenu?(x(),V("div",rr,[w(S,null,{overlay:F(()=>[w(Ft,{file:d.file,idx:d.idx,"selected-tag":r.value,onContextMenuClick:m[1]||(m[1]=(f,A,g)=>t("contextMenuClick",f,A,g))},null,8,["file","idx","selected-tag"])]),default:F(()=>[re("div",lr,[w(J(zt))])]),_:1}),d.file.type==="file"?(x(),W(S,{key:0},{overlay:F(()=>[c.value.length>1?(x(),W(l,{key:0,onClick:m[2]||(m[2]=f=>t("contextMenuClick",f,d.file,d.idx))},{default:F(()=>[(x(!0),V(te,null,be(c.value,f=>(x(),W(p,{key:`toggle-tag-${f.id}`},{default:F(()=>[j(R(f.name)+" ",1),f.selected?(x(),W(J(Yt),{key:0})):(x(),W(J(Xt),{key:1}))]),_:2},1024))),128))]),_:1})):Y("",!0)]),default:F(()=>{var f,A;return[re("div",{class:fe(["float-btn-wrap",{"like-selected":(f=h.value)==null?void 0:f.selected}]),onClick:b},[(A=h.value)!=null&&A.selected?(x(),W(J(ua),{key:0})):(x(),W(J(pa),{key:1}))],2)]}),_:1})):Y("",!0)])):Y("",!0),J(Z)(d.file.name)?(x(),V("div",{key:d.file.fullpath,class:fe(`idx-${d.idx} item-content`)},[w(s,{src:v.value,fallback:J(ta),preview:{src:d.fullScreenPreviewImageUrl,onVisibleChange:(f,A)=>t("previewVisibleChange",f,A)}},null,8,["src","fallback","preview"]),r.value&&d.cellWidth>128?(x(),V("div",sr,[(x(!0),V(te,null,be(r.value,f=>(x(),W(o,{key:f.id,color:J(a).getColor(f.name)},{default:F(()=>[j(R(f.name),1)]),_:2},1032,["color"]))),128))])):Y("",!0)],2)):J(hi)(d.file.name)?(x(),V("div",{key:3,class:fe(`idx-${d.idx} item-content video`),onClick:m[3]||(m[3]=f=>J(_a)(d.file))},[re("div",or,[w(J(ya))]),r.value&&d.cellWidth>128?(x(),V("div",cr,[(x(!0),V(te,null,be(r.value,f=>(x(),W(o,{key:f.id,color:J(a).getColor(f.name)},{default:F(()=>[j(R(f.name),1)]),_:2},1032,["color"]))),128))])):Y("",!0)],2)):(x(),V("div",ur,[d.file.type==="file"?(x(),W(J(Di),{key:0,class:"icon center"})):(x(),W(J(Hi),{key:1,class:"icon center"}))])),d.cellWidth>128?(x(),V("div",dr,[re("div",fr,R(d.file.name),1),re("div",vr,[re("div",null,R(d.file.size),1),re("div",null,R(d.file.date),1)])])):Y("",!0)])],42,ar))]),_:1},8,["visible"])}}});const Er=gi(pr,[["__scopeId","data-v-bbbcb390"]]);export{pe as D,Er as F,Ft as _,Ar as a,kr as b,Sr as c,Cr as d,wr as e,Ir as f,un as g,Je as h,an as i,ke as j,xa as k,_e as s,se as u}; diff --git a/vue/dist/assets/ImgSliPagePane-25ccb7d8.js b/vue/dist/assets/ImgSliPagePane-0186a499.js similarity index 74% rename from vue/dist/assets/ImgSliPagePane-25ccb7d8.js rename to vue/dist/assets/ImgSliPagePane-0186a499.js index 7341195..364a784 100644 --- a/vue/dist/assets/ImgSliPagePane-25ccb7d8.js +++ b/vue/dist/assets/ImgSliPagePane-0186a499.js @@ -1 +1 @@ -import{d as t,o as a,m as r,c1 as n}from"./index-54d35579.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-b44dfcf8.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-2899eea8.js b/vue/dist/assets/MatchedImageGrid-2776313c.js similarity index 89% rename from vue/dist/assets/MatchedImageGrid-2899eea8.js rename to vue/dist/assets/MatchedImageGrid-2776313c.js index 4f5f029..fc80921 100644 --- a/vue/dist/assets/MatchedImageGrid-2899eea8.js +++ b/vue/dist/assets/MatchedImageGrid-2776313c.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-54d35579.js";import{L as Z,R as ee,f as te,S as ie}from"./fullScreenContextMenu-9e3be5a3.js";import{g as se,F as le}from"./FileItem-ced5f921.js";import{g as ne}from"./db-8d04be33.js";import{c as ae,u as oe}from"./hook-9c9eb74d.js";import"./shortcut-dae64d46.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-b44dfcf8.js";import{L as Z,R as ee,f as te,S as ie}from"./fullScreenContextMenu-67c7b1b8.js";import{g as se,F as le}from"./FileItem-c84a61c8.js";import{g as ne}from"./db-f71a84c3.js";import{c as ae,u as oe}from"./hook-8fa8389e.js";import"./shortcut-0fe96b62.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-1edc4acf.css b/vue/dist/assets/SubstrSearch-1edc4acf.css deleted file mode 100644 index a0c6289..0000000 --- a/vue/dist/assets/SubstrSearch-1edc4acf.css +++ /dev/null @@ -1 +0,0 @@ -.regex-icon[data-v-64c2d73c]{user-select:none;padding:4px;margin:0 4px;cursor:pointer;border:1px solid var(--zp-border);border-radius:4px}.regex-icon img[data-v-64c2d73c]{height:1.5em}.regex-icon[data-v-64c2d73c]:hover{background:var(--zp-border)}.regex-icon.selected[data-v-64c2d73c]{background:var(--primary-color-1);border:1px solid var(--primary-color)}.search-bar[data-v-64c2d73c]{padding:8px;display:flex}.preview-switch[data-v-64c2d73c]{position:fixed;top:0;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;z-index:11111;pointer-events:none}.preview-switch>*[data-v-64c2d73c]{color:#fff;margin:16px;font-size:4em;pointer-events:all;cursor:pointer}.preview-switch>*.disable[data-v-64c2d73c]{opacity:0;pointer-events:none;cursor:none}.container[data-v-64c2d73c]{background:var(--zp-secondary-background)}.container .file-list[data-v-64c2d73c]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%} diff --git a/vue/dist/assets/SubstrSearch-218d7a61.js b/vue/dist/assets/SubstrSearch-218d7a61.js new file mode 100644 index 0000000..07e0e02 --- /dev/null +++ b/vue/dist/assets/SubstrSearch-218d7a61.js @@ -0,0 +1 @@ +import{d as se,$ as x,aw as ne,bQ as ae,bP as U,o as i,y as b,q as A,c as o,r as e,bT as le,p as m,N as y,m as g,n as r,x as I,v as f,C as w,s as T,t as ie,L as oe,ax as re,al as de,ai as ue,U as ce,V as pe,Q as ve,R as me,X as ge}from"./index-b44dfcf8.js";import{L as fe,R as we,f as ke,S as xe}from"./fullScreenContextMenu-67c7b1b8.js";/* empty css */import{g as be,F as ye}from"./FileItem-c84a61c8.js";import{b as K,c as Ie,f as N,u as Ce}from"./db-f71a84c3.js";import{c as he,u as _e}from"./hook-8fa8389e.js";import"./shortcut-0fe96b62.js";const Se="/infinite_image_browsing/fe-static/assets/regex-a447f877.svg",Me=["src"],$e={class:"hint"},ze={key:1,class:"preview-switch"},De=se({__name:"SubstrSearch",setup(Be){const p=x(!1),u=x(""),C=he(n=>p.value?N("",n,u.value):N(u.value,n)),{queue:d,images:l,onContextMenuClickU:h,stackViewEl:P,previewIdx:c,previewing:_,onPreviewVisibleChange:q,previewImgMove:S,canPreview:M,itemSize:$,gridItems:L,showGenInfo:v,imageGenInfo:z,q:G,multiSelectedIdxs:O,onFileItemClick:Q,scroller:D,showMenuIdx:k,onFileDragStart:H,onFileDragEnd:W,cellWidth:X,onScroll:B}=_e(C),s=x();ne(async()=>{s.value=await K(),s.value.img_count&&s.value.expired&&V()});const V=ae(()=>d.pushAction(async()=>(await Ce(),s.value=await K(),s.value)).res),E=async()=>{await C.reset({refetch:!0}),await re(),B(),D.value.scrollToItem(0),l.value.length||de.info(ue("fuzzy-search-noResults"))};U("returnToIIB",async()=>{const n=await d.pushAction(Ie).res;s.value.expired=n.expired}),U("searchIndexExpired",()=>s.value&&(s.value.expired=!0));const j=()=>{p.value=!p.value};return(n,t)=>{const J=ce,F=pe,Y=ve,Z=me,ee=xe;return i(),b("div",{class:"container",ref_key:"stackViewEl",ref:P},[s.value?(i(),b("div",{key:0,class:"search-bar",onKeydown:t[2]||(t[2]=A(()=>{},["stop"]))},[o(J,{value:u.value,"onUpdate:value":t[0]||(t[0]=a=>u.value=a),placeholder:n.$t("fuzzy-search-placeholder")+" "+n.$t("regexSearchEnabledHint"),disabled:!e(d).isIdle,onKeydown:le(E,["enter"]),"allow-clear":""},null,8,["value","placeholder","disabled","onKeydown"]),m("div",{class:y(["regex-icon",{selected:p.value}]),onKeydown:t[1]||(t[1]=A(()=>{},["stop"])),onClick:j,title:"Use Regular Expression"},[m("img",{src:e(Se)},null,8,Me)],34),s.value.expired||!s.value.img_count?(i(),g(F,{key:0,onClick:e(V),loading:!e(d).isIdle,type:"primary"},{default:r(()=>[I(f(s.value.img_count===0?n.$t("generateIndexHint"):n.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(i(),g(F,{key:1,type:"primary",onClick:E,loading:!e(d).isIdle,disabled:!u.value},{default:r(()=>[I(f(n.$t("search")),1)]),_:1},8,["loading","disabled"]))],32)):w("",!0),o(ee,{size:"large",spinning:!e(d).isIdle},{default:r(()=>[o(Z,{visible:e(v),"onUpdate:visible":t[4]||(t[4]=a=>T(v)?v.value=a:null),width:"70vw","mask-closable":"",onOk:t[5]||(t[5]=a=>v.value=!1)},{cancelText:r(()=>[]),default:r(()=>[o(Y,{active:"",loading:!e(G).isIdle},{default:r(()=>[m("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[3]||(t[3]=a=>e(ie)(e(z)))},[m("div",$e,f(n.$t("doubleClickToCopy")),1),I(" "+f(e(z)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(l)?(i(),g(e(be),{key:0,ref_key:"scroller",ref:D,class:"file-list",items:e(l),"item-size":e($).first,"key-field":"fullpath","item-secondary-size":e($).second,gridItems:e(L),onScroll:e(B)},{default:r(({item:a,index:R})=>[o(ye,{idx:R,file:a,"show-menu-idx":e(k),"onUpdate:showMenuIdx":t[6]||(t[6]=te=>T(k)?k.value=te:null),onFileItemClick:e(Q),"full-screen-preview-image-url":e(l)[e(c)]?e(oe)(e(l)[e(c)]):"","cell-width":e(X),selected:e(O).includes(R),onContextMenuClick:e(h),onDragstart:e(H),onDragend:e(W),onPreviewVisibleChange:e(q)},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"])):w("",!0),e(_)?(i(),b("div",ze,[o(e(fe),{onClick:t[7]||(t[7]=a=>e(S)("prev")),class:y({disable:!e(M)("prev")})},null,8,["class"]),o(e(we),{onClick:t[8]||(t[8]=a=>e(S)("next")),class:y({disable:!e(M)("next")})},null,8,["class"])])):w("",!0)]),_:1},8,["spinning"]),e(_)&&e(l)&&e(l)[e(c)]?(i(),g(ke,{key:1,file:e(l)[e(c)],idx:e(c),onContextMenuClick:e(h)},null,8,["file","idx","onContextMenuClick"])):w("",!0)],512)}}});const Ke=ge(De,[["__scopeId","data-v-a1cb02be"]]);export{Ke as default}; diff --git a/vue/dist/assets/SubstrSearch-4bbe3e8d.js b/vue/dist/assets/SubstrSearch-4bbe3e8d.js deleted file mode 100644 index 2b63dba..0000000 --- a/vue/dist/assets/SubstrSearch-4bbe3e8d.js +++ /dev/null @@ -1 +0,0 @@ -import{d as te,$ as x,aw as ne,bQ as le,bP as E,o as i,y,q as A,c as o,r as e,bT as ae,p as m,N as I,m as g,n as r,x as C,v as f,C as w,s as T,t as ie,L as oe,ax as re,al as de,ai as ue,U as ce,V as pe,Q as ve,R as me,X as ge}from"./index-54d35579.js";import{L as fe,R as we,f as ke,S as xe}from"./fullScreenContextMenu-9e3be5a3.js";/* empty css */import{g as ye,F as Ie}from"./FileItem-ced5f921.js";import{b as K,c as Ce,f as N,u as be}from"./db-8d04be33.js";import{c as _e,u as he}from"./hook-9c9eb74d.js";import"./shortcut-dae64d46.js";const Se="/infinite_image_browsing/fe-static/assets/regex-a447f877.svg",Me=["src"],ze={class:"hint"},De={key:1,class:"preview-switch"},$e=te({__name:"SubstrSearch",setup(Be){const p=x(!1),u=x(""),b=_e(n=>p.value?N("",n,u.value):N(u.value,n)),{queue:d,images:a,onContextMenuClickU:_,stackViewEl:P,previewIdx:c,previewing:h,onPreviewVisibleChange:q,previewImgMove:S,canPreview:M,itemSize:z,gridItems:L,showGenInfo:v,imageGenInfo:D,q:G,multiSelectedIdxs:O,onFileItemClick:Q,scroller:$,showMenuIdx:k,onFileDragStart:H,onFileDragEnd:W,cellWidth:X,onScroll:B}=he(b),t=x();ne(async()=>{t.value=await K(),t.value.img_count&&t.value.expired&&V()});const V=le(()=>d.pushAction(async()=>(await be(),t.value=await K(),t.value)).res),F=async()=>{await b.reset({refetch:!0}),await re(),B(),$.value.scrollToItem(0),a.value.length||de.info(ue("fuzzy-search-noResults"))};E("returnToIIB",async()=>{const n=await d.pushAction(Ce).res;t.value.expired=n.expired}),E("searchIndexExpired",()=>t.value&&(t.value.expired=!0));const j=()=>{p.value=!p.value};return(n,s)=>{const J=ce,R=pe,Y=ve,Z=me,ee=xe;return i(),y("div",{class:"container",ref_key:"stackViewEl",ref:P},[t.value?(i(),y("div",{key:0,class:"search-bar",onKeydown:s[2]||(s[2]=A(()=>{},["stop"]))},[o(J,{value:u.value,"onUpdate:value":s[0]||(s[0]=l=>u.value=l),placeholder:n.$t("fuzzy-search-placeholder"),disabled:!e(d).isIdle,onKeydown:ae(F,["enter"]),"allow-clear":""},null,8,["value","placeholder","disabled","onKeydown"]),m("div",{class:I(["regex-icon",{selected:p.value}]),onKeydown:s[1]||(s[1]=A(()=>{},["stop"])),onClick:j,title:"Use Regular Expression"},[m("img",{src:e(Se)},null,8,Me)],34),t.value.expired||!t.value.img_count?(i(),g(R,{key:0,onClick:e(V),loading:!e(d).isIdle,type:"primary"},{default:r(()=>[C(f(t.value.img_count===0?n.$t("generateIndexHint"):n.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(i(),g(R,{key:1,type:"primary",onClick:F,loading:!e(d).isIdle,disabled:!u.value},{default:r(()=>[C(f(n.$t("search")),1)]),_:1},8,["loading","disabled"]))],32)):w("",!0),o(ee,{size:"large",spinning:!e(d).isIdle},{default:r(()=>[o(Z,{visible:e(v),"onUpdate:visible":s[4]||(s[4]=l=>T(v)?v.value=l:null),width:"70vw","mask-closable":"",onOk:s[5]||(s[5]=l=>v.value=!1)},{cancelText:r(()=>[]),default:r(()=>[o(Y,{active:"",loading:!e(G).isIdle},{default:r(()=>[m("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[3]||(s[3]=l=>e(ie)(e(D)))},[m("div",ze,f(n.$t("doubleClickToCopy")),1),C(" "+f(e(D)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(a)?(i(),g(e(ye),{key:0,ref_key:"scroller",ref:$,class:"file-list",items:e(a),"item-size":e(z).first,"key-field":"fullpath","item-secondary-size":e(z).second,gridItems:e(L),onScroll:e(B)},{default:r(({item:l,index:U})=>[o(Ie,{idx:U,file:l,"show-menu-idx":e(k),"onUpdate:showMenuIdx":s[6]||(s[6]=se=>T(k)?k.value=se:null),onFileItemClick:e(Q),"full-screen-preview-image-url":e(a)[e(c)]?e(oe)(e(a)[e(c)]):"","cell-width":e(X),selected:e(O).includes(U),onContextMenuClick:e(_),onDragstart:e(H),onDragend:e(W),onPreviewVisibleChange:e(q)},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"])):w("",!0),e(h)?(i(),y("div",De,[o(e(fe),{onClick:s[7]||(s[7]=l=>e(S)("prev")),class:I({disable:!e(M)("prev")})},null,8,["class"]),o(e(we),{onClick:s[8]||(s[8]=l=>e(S)("next")),class:I({disable:!e(M)("next")})},null,8,["class"])])):w("",!0)]),_:1},8,["spinning"]),e(h)&&e(a)&&e(a)[e(c)]?(i(),g(ke,{key:1,file:e(a)[e(c)],idx:e(c),onContextMenuClick:e(_)},null,8,["file","idx","onContextMenuClick"])):w("",!0)],512)}}});const Ke=ge($e,[["__scopeId","data-v-64c2d73c"]]);export{Ke as default}; diff --git a/vue/dist/assets/SubstrSearch-7e9861e7.css b/vue/dist/assets/SubstrSearch-7e9861e7.css new file mode 100644 index 0000000..eb535c8 --- /dev/null +++ b/vue/dist/assets/SubstrSearch-7e9861e7.css @@ -0,0 +1 @@ +.regex-icon[data-v-a1cb02be]{user-select:none;padding:4px;margin:0 4px;cursor:pointer;border:1px solid var(--zp-border);border-radius:4px}.regex-icon img[data-v-a1cb02be]{height:1.5em}.regex-icon[data-v-a1cb02be]:hover{background:var(--zp-border)}.regex-icon.selected[data-v-a1cb02be]{background:var(--primary-color-1);border:1px solid var(--primary-color)}.search-bar[data-v-a1cb02be]{padding:8px;display:flex}.preview-switch[data-v-a1cb02be]{position:fixed;top:0;bottom:0;left:0;right:0;display:flex;align-items:center;justify-content:space-between;z-index:11111;pointer-events:none}.preview-switch>*[data-v-a1cb02be]{color:#fff;margin:16px;font-size:4em;pointer-events:all;cursor:pointer}.preview-switch>*.disable[data-v-a1cb02be]{opacity:0;pointer-events:none;cursor:none}.container[data-v-a1cb02be]{background:var(--zp-secondary-background)}.container .file-list[data-v-a1cb02be]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%} diff --git a/vue/dist/assets/TagSearch-b9fd740b.js b/vue/dist/assets/TagSearch-0422ab6e.js similarity index 99% rename from vue/dist/assets/TagSearch-b9fd740b.js rename to vue/dist/assets/TagSearch-0422ab6e.js index 93dc245..197f6d9 100644 --- a/vue/dist/assets/TagSearch-b9fd740b.js +++ b/vue/dist/assets/TagSearch-0422ab6e.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-54d35579.js";/* empty css *//* empty css */import{b as ve,c as Ze,d as ea,e as aa,u as ta}from"./db-8d04be33.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-b44dfcf8.js";/* empty css *//* empty css */import{b as ve,c as Ze,d as ea,e as aa,u as ta}from"./db-f71a84c3.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-9459d89e.js b/vue/dist/assets/batchDownload-6f33ec7a.js similarity index 90% rename from vue/dist/assets/batchDownload-9459d89e.js rename to vue/dist/assets/batchDownload-6f33ec7a.js index 1214da5..5927860 100644 --- a/vue/dist/assets/batchDownload-9459d89e.js +++ b/vue/dist/assets/batchDownload-6f33ec7a.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-54d35579.js";import{u as S,b as V,k as E,F as A,g as L}from"./FileItem-ced5f921.js";import"./db-8d04be33.js";import"./shortcut-dae64d46.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-b44dfcf8.js";import{u as S,b as V,k as E,F as A,g as L}from"./FileItem-c84a61c8.js";import"./db-f71a84c3.js";import"./shortcut-0fe96b62.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-8d04be33.js b/vue/dist/assets/db-f71a84c3.js similarity index 92% rename from vue/dist/assets/db-8d04be33.js rename to vue/dist/assets/db-f71a84c3.js index 5ca53fa..e233853 100644 --- a/vue/dist/assets/db-8d04be33.js +++ b/vue/dist/assets/db-f71a84c3.js @@ -1 +1 @@ -import{c4 as t}from"./index-54d35579.js";const c=async()=>(await t.value.get("/db/basic_info")).data,d=async()=>(await t.value.get("/db/expired_dirs")).data,g=async()=>{await t.value.post("/db/update_image_data",{},{timeout:1/0})},u=async(a,s)=>(await t.value.post("/db/match_images_by_tags",{...a,cursor:s})).data,p=async a=>(await t.value.post("/db/add_custom_tag",a)).data,i=async a=>(await t.value.post("/db/toggle_custom_tag_to_img",a)).data,m=async a=>{await t.value.post("/db/remove_custom_tag",a)},_=async(a,s,e)=>(await t.value.get("/db/search_by_substr",{params:{substr:a,cursor:s,regexp:e}})).data,r="/db/extra_paths",b=async a=>{await t.value.post(r,a)},y=async a=>{await t.value.delete(r,{data:a})},l=async a=>(await t.value.post("/db/get_image_tags",{paths:a})).data;export{b as a,c as b,d as c,p as d,m as e,_ as f,u as g,l as h,y as r,i as t,g as u}; +import{c4 as t}from"./index-b44dfcf8.js";const c=async()=>(await t.value.get("/db/basic_info")).data,d=async()=>(await t.value.get("/db/expired_dirs")).data,g=async()=>{await t.value.post("/db/update_image_data",{},{timeout:1/0})},u=async(a,s)=>(await t.value.post("/db/match_images_by_tags",{...a,cursor:s})).data,p=async a=>(await t.value.post("/db/add_custom_tag",a)).data,i=async a=>(await t.value.post("/db/toggle_custom_tag_to_img",a)).data,m=async a=>{await t.value.post("/db/remove_custom_tag",a)},_=async(a,s,e)=>(await t.value.get("/db/search_by_substr",{params:{substr:a,cursor:s,regexp:e}})).data,r="/db/extra_paths",b=async a=>{await t.value.post(r,a)},y=async a=>{await t.value.delete(r,{data:a})},l=async a=>(await t.value.post("/db/get_image_tags",{paths:a})).data;export{b as a,c as b,d as c,p as d,m as e,_ as f,u as g,l as h,y as r,i as t,g as u}; diff --git a/vue/dist/assets/emptyStartup-06d4c63f.js b/vue/dist/assets/emptyStartup-a812cca8.js similarity index 98% rename from vue/dist/assets/emptyStartup-06d4c63f.js rename to vue/dist/assets/emptyStartup-a812cca8.js index aa8d771..548d623 100644 --- a/vue/dist/assets/emptyStartup-06d4c63f.js +++ b/vue/dist/assets/emptyStartup-a812cca8.js @@ -1 +1 @@ -import{Y as ge,Z as _e,d as ue,u as be,$ as M,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 b,m as H,n as S,q as w,ap as ae,x as E,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-54d35579.js";import{a as Qe,r as Xe}from"./db-8d04be33.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,_=e.attrs,P=e.expose,D=be("alert",t),q=D.prefixCls,G=D.direction,C=M(!1),a=M(!1),u=M(),$=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=M({});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,z=t.type,A=t.showIcon,W=N(l,t,"closeText"),T=N(l,t,"description"),K=N(l,t,"message"),F=N(l,t,"icon");A=s&&A===void 0?!0:A,z=s&&z===void 0?"warning":z||"info";var pe=(T?Ze:Ye)[z]||null;W&&(U=!0);var v=q.value,me=ye(v,(d={},x(d,"".concat(v,"-").concat(z),!0),x(d,"".concat(v,"-closing"),C.value),x(d,"".concat(v,"-with-description"),!!T),x(d,"".concat(v,"-no-icon"),!A),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"},_),{},{style:[_.style,O.value],class:[_.class,me],"data-show":!C.value,ref:u}),[A?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=M("");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-b64a1c39"),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={class:"feature-item"},Ct={class:"text line-clamp-1"},Ot=["onClick"],xt={class:"text line-clamp-2"},$t={key:0,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:1,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")},_=(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]}),D=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"}})])):b("",!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})):b("",!0),c(e).dontShowAgainNewImgOpts?b("",!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,[n("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)),E(" "+i(a.$t("add")),1)])]),(p(!0),h(j,null,B(D.value,s=>(p(),h("li",{key:s.key,class:"item rem",onClick:w(k=>_("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(()=>[E(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):b("",!0)],8,Ot))),128))])]),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)),E(" "+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=>_("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(()=>[E(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):b("",!0)],8,St))),128))])])):b("",!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=>_(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)])):b("",!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)])):b("",!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(()=>[E(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=>_("local",s.path),["prevent"])},[m(c(ot),{class:"icon"}),n("span",Ht,i(s.path),1)],8,Nt))),128))])])):b("",!0)])])}}});const Rt=We(jt,[["__scopeId","data-v-b64a1c39"]]);export{Rt as default}; +import{Y as ge,Z as _e,d as ue,u as be,$ as M,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 b,m as H,n as S,q as w,ap as ae,x as E,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-b44dfcf8.js";import{a as Qe,r as Xe}from"./db-f71a84c3.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,_=e.attrs,P=e.expose,D=be("alert",t),q=D.prefixCls,G=D.direction,C=M(!1),a=M(!1),u=M(),$=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=M({});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,z=t.type,A=t.showIcon,W=N(l,t,"closeText"),T=N(l,t,"description"),K=N(l,t,"message"),F=N(l,t,"icon");A=s&&A===void 0?!0:A,z=s&&z===void 0?"warning":z||"info";var pe=(T?Ze:Ye)[z]||null;W&&(U=!0);var v=q.value,me=ye(v,(d={},x(d,"".concat(v,"-").concat(z),!0),x(d,"".concat(v,"-closing"),C.value),x(d,"".concat(v,"-with-description"),!!T),x(d,"".concat(v,"-no-icon"),!A),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"},_),{},{style:[_.style,O.value],class:[_.class,me],"data-show":!C.value,ref:u}),[A?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=M("");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-b64a1c39"),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={class:"feature-item"},Ct={class:"text line-clamp-1"},Ot=["onClick"],xt={class:"text line-clamp-2"},$t={key:0,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:1,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")},_=(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]}),D=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"}})])):b("",!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})):b("",!0),c(e).dontShowAgainNewImgOpts?b("",!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,[n("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)),E(" "+i(a.$t("add")),1)])]),(p(!0),h(j,null,B(D.value,s=>(p(),h("li",{key:s.key,class:"item rem",onClick:w(k=>_("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(()=>[E(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):b("",!0)],8,Ot))),128))])]),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)),E(" "+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=>_("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(()=>[E(i(a.$t("remove")),1)]),_:2},1032,["onClick"])):b("",!0)],8,St))),128))])])):b("",!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=>_(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)])):b("",!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)])):b("",!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(()=>[E(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=>_("local",s.path),["prevent"])},[m(c(ot),{class:"icon"}),n("span",Ht,i(s.path),1)],8,Nt))),128))])])):b("",!0)])])}}});const Rt=We(jt,[["__scopeId","data-v-b64a1c39"]]);export{Rt as default}; diff --git a/vue/dist/assets/fullScreenContextMenu-9e3be5a3.js b/vue/dist/assets/fullScreenContextMenu-67c7b1b8.js similarity index 99% rename from vue/dist/assets/fullScreenContextMenu-9e3be5a3.js rename to vue/dist/assets/fullScreenContextMenu-67c7b1b8.js index c61609f..1721971 100644 --- a/vue/dist/assets/fullScreenContextMenu-9e3be5a3.js +++ b/vue/dist/assets/fullScreenContextMenu-67c7b1b8.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-54d35579.js";import{i as Te,j as We,_ as Ie,D as Be}from"./FileItem-ced5f921.js";import"./shortcut-dae64d46.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(` +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-b44dfcf8.js";import{i as Te,j as We,_ as Ie,D as Be}from"./FileItem-c84a61c8.js";import"./shortcut-0fe96b62.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/globalSetting-5ce174c1.js b/vue/dist/assets/globalSetting-be834608.js similarity index 98% rename from vue/dist/assets/globalSetting-5ce174c1.js rename to vue/dist/assets/globalSetting-be834608.js index f86f3ad..84a719b 100644 --- a/vue/dist/assets/globalSetting-5ce174c1.js +++ b/vue/dist/assets/globalSetting-be834608.js @@ -1 +1 @@ -import{Y as te,Z as le,d as O,j as ae,av as oe,w as E,$ as U,ao as R,l as q,u as ue,aw as de,ax as ie,h as $,c as l,a as P,ay as se,az as ce,g as z,aA as re,P as c,aB as G,k as X,aC as he,o as C,y as F,n as s,r as n,ai as k,m as V,C as B,p as g,z as M,v as b,S as W,aD as fe,I as me,x as I,A as j,q as D,E as ve,aE as ge,aF as pe,aG as _e,aH as be,V as Ce,U as ke,X as we}from"./index-54d35579.js";import{N as H,_ as Y,F as ye}from"./numInput-be9a0500.js";import{g as Se,C as $e}from"./shortcut-dae64d46.js";/* empty css *//* empty css */var Te=le("small","default"),xe=function(){return{id:String,prefixCls:String,size:c.oneOf(Te),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},Ie=O({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:xe(),slots:["checkedChildren","unCheckedChildren"],setup:function(e,d){var p=d.attrs,y=d.slots,r=d.expose,h=d.emit,a=ae();oe(function(){E(!("defaultChecked"in p),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),E(!("value"in p),"Switch","`value` is not validate prop, do you mean `checked`?")});var t=U(e.checked!==void 0?e.checked:p.defaultChecked),_=R(function(){return t.value===e.checkedValue});q(function(){return e.checked},function(){t.value=e.checked});var m=ue("switch",e),f=m.prefixCls,N=m.direction,T=m.size,S=U(),x=function(){var o;(o=S.value)===null||o===void 0||o.focus()},u=function(){var o;(o=S.value)===null||o===void 0||o.blur()};r({focus:x,blur:u}),de(function(){ie(function(){e.autofocus&&!e.disabled&&S.value.focus()})});var v=function(o,w){e.disabled||(h("update:checked",o),h("change",o,w),a.onFieldChange())},A=function(o){h("blur",o)},J=function(o){x();var w=_.value?e.unCheckedValue:e.checkedValue;v(w,o),h("click",w,o)},Q=function(o){o.keyCode===G.LEFT?v(e.unCheckedValue,o):o.keyCode===G.RIGHT&&v(e.checkedValue,o),h("keydown",o)},ee=function(o){var w;(w=S.value)===null||w===void 0||w.blur(),h("mouseup",o)},ne=R(function(){var i;return i={},$(i,"".concat(f.value,"-small"),T.value==="small"),$(i,"".concat(f.value,"-loading"),e.loading),$(i,"".concat(f.value,"-checked"),_.value),$(i,"".concat(f.value,"-disabled"),e.disabled),$(i,f.value,!0),$(i,"".concat(f.value,"-rtl"),N.value==="rtl"),i});return function(){var i;return l(re,{insertExtraNode:!0},{default:function(){return[l("button",P(P(P({},se(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),p),{},{id:(i=e.id)!==null&&i!==void 0?i:a.id.value,onKeydown:Q,onClick:J,onBlur:A,onMouseup:ee,type:"button",role:"switch","aria-checked":t.value,disabled:e.disabled||e.loading,class:[p.class,ne.value],ref:S}),[l("div",{class:"".concat(f.value,"-handle")},[e.loading?l(ce,{class:"".concat(f.value,"-loading-icon")},null):null]),l("span",{class:"".concat(f.value,"-inner")},[_.value?z(y,e,"checkedChildren"):z(y,e,"unCheckedChildren")])])]}})}}});const Z=te(Ie);const L="/infinite_image_browsing/fe-static/assets/sample-55dcafc6.webp",Fe=["width","height","src"],Ve=O({__name:"ImageSetting",setup(K){function e(y,r){return new Promise(h=>{const a=new Image;a.onload=()=>{const t=document.createElement("canvas");t.width=a.width*r,t.height=a.height*r,t.getContext("2d").drawImage(a,0,0,t.width,t.height),h(t.toDataURL())},a.src=y})}const d=X(),p=U("");return q(()=>[d.enableThumbnail,d.gridThumbnailResolution],he(async()=>{d.enableThumbnail&&(p.value=await e(L,d.gridThumbnailResolution/1024))},300),{immediate:!0,deep:!0}),(y,r)=>{const h=Y,a=Z;return C(),F(M,null,[l(h,{label:n(k)("defaultGridCellWidth")},{default:s(()=>[l(H,{min:64,max:1024,step:32,modelValue:n(d).defaultGridCellWidth,"onUpdate:modelValue":r[0]||(r[0]=t=>n(d).defaultGridCellWidth=t)},null,8,["modelValue"])]),_:1},8,["label"]),l(h,{label:n(k)("useThumbnailPreview")},{default:s(()=>[l(a,{checked:n(d).enableThumbnail,"onUpdate:checked":r[1]||(r[1]=t=>n(d).enableThumbnail=t)},null,8,["checked"])]),_:1},8,["label"]),n(d).enableThumbnail?(C(),V(h,{key:0,label:n(k)("thumbnailResolution")},{default:s(()=>[l(H,{modelValue:n(d).gridThumbnailResolution,"onUpdate:modelValue":r[2]||(r[2]=t=>n(d).gridThumbnailResolution=t),min:256,max:1024,step:64},null,8,["modelValue"])]),_:1},8,["label"])):B("",!0),l(h,{label:n(k)("livePreview")},{default:s(()=>[g("div",null,[g("img",{width:n(d).defaultGridCellWidth,height:n(d).defaultGridCellWidth,src:n(d).enableThumbnail?p.value:n(L)},null,8,Fe)])]),_:1},8,["label"])],64)}}}),Be={class:"panel"},Me={style:{"margin-top":"0"}},Ue={class:"lang-select-wrap"},Ke={class:"col"},Ne={class:"col"},Ae={class:"col"},Pe={class:"col"},De=O({__name:"globalSetting",setup(K){const e=X(),d=U(!1),p=async()=>{window.location.reload()},y=[{value:"en",text:"English"},{value:"zhHans",text:"简体中文"},{value:"zhHant",text:"繁體中文"},{value:"de",text:"Deutsch"}],r=(a,t)=>{const _=Se(a);_&&(e.shortcut[t]=_)},h=async()=>{await ge("shutdown_api_server_command"),await pe.removeFile(_e),await be()};return(a,t)=>{const _=Z,m=Y,f=Ce,N=$e,T=ke,S=ye;return C(),F("div",Be,[B("",!0),l(S,null,{default:s(()=>{var x;return[g("h2",Me,b(n(k)("ImageBrowsingSettings")),1),l(Ve),g("h2",null,b(n(k)("other")),1),l(m,{label:a.$t("onlyFoldersAndImages")},{default:s(()=>[l(_,{checked:n(e).onlyFoldersAndImages,"onUpdate:checked":t[0]||(t[0]=u=>n(e).onlyFoldersAndImages=u)},null,8,["checked"])]),_:1},8,["label"]),l(m,{label:a.$t("defaultSortingMethod")},{default:s(()=>[l(n(W),{value:n(e).defaultSortingMethod,"onUpdate:value":t[1]||(t[1]=u=>n(e).defaultSortingMethod=u),conv:n(fe),options:n(me)},null,8,["value","conv","options"])]),_:1},8,["label"]),l(m,{label:a.$t("longPressOpenContextMenu")},{default:s(()=>[l(_,{checked:n(e).longPressOpenContextMenu,"onUpdate:checked":t[2]||(t[2]=u=>n(e).longPressOpenContextMenu=u)},null,8,["checked"])]),_:1},8,["label"]),l(m,{label:a.$t("lang")},{default:s(()=>[g("div",Ue,[l(n(W),{options:y,value:n(e).lang,"onUpdate:value":t[3]||(t[3]=u=>n(e).lang=u),onChange:t[4]||(t[4]=u=>d.value=!0)},null,8,["value"])]),d.value?(C(),V(f,{key:0,type:"primary",onClick:p,ghost:""},{default:s(()=>[I(b(n(k)("langChangeReload")),1)]),_:1})):B("",!0)]),_:1},8,["label"]),(C(!0),F(M,null,j(n(e).ignoredConfirmActions,(u,v)=>(C(),V(m,{label:a.$t(v+"SkipConfirm"),key:v},{default:s(()=>[l(N,{checked:n(e).ignoredConfirmActions[v],"onUpdate:checked":A=>n(e).ignoredConfirmActions[v]=A},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"]))),128)),g("h2",null,b(n(k)("shortcutKey")),1),l(m,{label:a.$t("download")},{default:s(()=>[g("div",Ke,[l(T,{value:n(e).shortcut.download,onKeydown:t[5]||(t[5]=D(u=>r(u,"download"),["stop","prevent"])),placeholder:a.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),l(f,{onClick:t[6]||(t[6]=u=>n(e).shortcut.download=""),class:"clear-btn"},{default:s(()=>[I(b(a.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),l(m,{label:a.$t("deleteSelected")},{default:s(()=>[g("div",Ne,[l(T,{value:n(e).shortcut.delete,onKeydown:t[7]||(t[7]=D(u=>r(u,"delete"),["stop","prevent"])),placeholder:a.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),l(f,{onClick:t[8]||(t[8]=u=>n(e).shortcut.delete=""),class:"clear-btn"},{default:s(()=>[I(b(a.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),(C(!0),F(M,null,j(((x=n(e).conf)==null?void 0:x.all_custom_tags)??[],u=>(C(),V(m,{label:a.$t("toggleTagSelection",{tag:u.name}),key:u.id},{default:s(()=>[g("div",Ae,[l(T,{value:n(e).shortcut[`toggle_tag_${u.name}`],onKeydown:D(v=>r(v,`toggle_tag_${u.name}`),["stop","prevent"]),placeholder:a.$t("shortcutKeyDescription")},null,8,["value","onKeydown","placeholder"]),l(f,{onClick:v=>n(e).shortcut[`toggle_tag_${u.name}`]="",class:"clear-btn"},{default:s(()=>[I(b(a.$t("clear")),1)]),_:2},1032,["onClick"])])]),_:2},1032,["label"]))),128)),n(ve)?(C(),F(M,{key:0},[g("h2",null,b(n(k)("clientSpecificSettings")),1),l(m,null,{default:s(()=>[g("div",Pe,[l(f,{onClick:h,class:"clear-btn"},{default:s(()=>[I(b(a.$t("initiateSoftwareStartupConfig")),1)]),_:1})])]),_:1})],64)):B("",!0)]}),_:1})])}}});const We=we(De,[["__scopeId","data-v-a56cd1af"]]);export{We as default}; +import{Y as te,Z as le,d as O,j as ae,av as oe,w as E,$ as U,ao as R,l as q,u as ue,aw as de,ax as ie,h as $,c as l,a as P,ay as se,az as ce,g as z,aA as re,P as c,aB as G,k as X,aC as he,o as C,y as F,n as s,r as n,ai as k,m as V,C as B,p as g,z as M,v as b,S as W,aD as fe,I as me,x as I,A as j,q as D,E as ve,aE as ge,aF as pe,aG as _e,aH as be,V as Ce,U as ke,X as we}from"./index-b44dfcf8.js";import{N as H,_ as Y,F as ye}from"./numInput-6bcdca58.js";import{g as Se,C as $e}from"./shortcut-0fe96b62.js";/* empty css *//* empty css */var Te=le("small","default"),xe=function(){return{id:String,prefixCls:String,size:c.oneOf(Te),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},Ie=O({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:xe(),slots:["checkedChildren","unCheckedChildren"],setup:function(e,d){var p=d.attrs,y=d.slots,r=d.expose,h=d.emit,a=ae();oe(function(){E(!("defaultChecked"in p),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),E(!("value"in p),"Switch","`value` is not validate prop, do you mean `checked`?")});var t=U(e.checked!==void 0?e.checked:p.defaultChecked),_=R(function(){return t.value===e.checkedValue});q(function(){return e.checked},function(){t.value=e.checked});var m=ue("switch",e),f=m.prefixCls,N=m.direction,T=m.size,S=U(),x=function(){var o;(o=S.value)===null||o===void 0||o.focus()},u=function(){var o;(o=S.value)===null||o===void 0||o.blur()};r({focus:x,blur:u}),de(function(){ie(function(){e.autofocus&&!e.disabled&&S.value.focus()})});var v=function(o,w){e.disabled||(h("update:checked",o),h("change",o,w),a.onFieldChange())},A=function(o){h("blur",o)},J=function(o){x();var w=_.value?e.unCheckedValue:e.checkedValue;v(w,o),h("click",w,o)},Q=function(o){o.keyCode===G.LEFT?v(e.unCheckedValue,o):o.keyCode===G.RIGHT&&v(e.checkedValue,o),h("keydown",o)},ee=function(o){var w;(w=S.value)===null||w===void 0||w.blur(),h("mouseup",o)},ne=R(function(){var i;return i={},$(i,"".concat(f.value,"-small"),T.value==="small"),$(i,"".concat(f.value,"-loading"),e.loading),$(i,"".concat(f.value,"-checked"),_.value),$(i,"".concat(f.value,"-disabled"),e.disabled),$(i,f.value,!0),$(i,"".concat(f.value,"-rtl"),N.value==="rtl"),i});return function(){var i;return l(re,{insertExtraNode:!0},{default:function(){return[l("button",P(P(P({},se(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),p),{},{id:(i=e.id)!==null&&i!==void 0?i:a.id.value,onKeydown:Q,onClick:J,onBlur:A,onMouseup:ee,type:"button",role:"switch","aria-checked":t.value,disabled:e.disabled||e.loading,class:[p.class,ne.value],ref:S}),[l("div",{class:"".concat(f.value,"-handle")},[e.loading?l(ce,{class:"".concat(f.value,"-loading-icon")},null):null]),l("span",{class:"".concat(f.value,"-inner")},[_.value?z(y,e,"checkedChildren"):z(y,e,"unCheckedChildren")])])]}})}}});const Z=te(Ie);const L="/infinite_image_browsing/fe-static/assets/sample-55dcafc6.webp",Fe=["width","height","src"],Ve=O({__name:"ImageSetting",setup(K){function e(y,r){return new Promise(h=>{const a=new Image;a.onload=()=>{const t=document.createElement("canvas");t.width=a.width*r,t.height=a.height*r,t.getContext("2d").drawImage(a,0,0,t.width,t.height),h(t.toDataURL())},a.src=y})}const d=X(),p=U("");return q(()=>[d.enableThumbnail,d.gridThumbnailResolution],he(async()=>{d.enableThumbnail&&(p.value=await e(L,d.gridThumbnailResolution/1024))},300),{immediate:!0,deep:!0}),(y,r)=>{const h=Y,a=Z;return C(),F(M,null,[l(h,{label:n(k)("defaultGridCellWidth")},{default:s(()=>[l(H,{min:64,max:1024,step:32,modelValue:n(d).defaultGridCellWidth,"onUpdate:modelValue":r[0]||(r[0]=t=>n(d).defaultGridCellWidth=t)},null,8,["modelValue"])]),_:1},8,["label"]),l(h,{label:n(k)("useThumbnailPreview")},{default:s(()=>[l(a,{checked:n(d).enableThumbnail,"onUpdate:checked":r[1]||(r[1]=t=>n(d).enableThumbnail=t)},null,8,["checked"])]),_:1},8,["label"]),n(d).enableThumbnail?(C(),V(h,{key:0,label:n(k)("thumbnailResolution")},{default:s(()=>[l(H,{modelValue:n(d).gridThumbnailResolution,"onUpdate:modelValue":r[2]||(r[2]=t=>n(d).gridThumbnailResolution=t),min:256,max:1024,step:64},null,8,["modelValue"])]),_:1},8,["label"])):B("",!0),l(h,{label:n(k)("livePreview")},{default:s(()=>[g("div",null,[g("img",{width:n(d).defaultGridCellWidth,height:n(d).defaultGridCellWidth,src:n(d).enableThumbnail?p.value:n(L)},null,8,Fe)])]),_:1},8,["label"])],64)}}}),Be={class:"panel"},Me={style:{"margin-top":"0"}},Ue={class:"lang-select-wrap"},Ke={class:"col"},Ne={class:"col"},Ae={class:"col"},Pe={class:"col"},De=O({__name:"globalSetting",setup(K){const e=X(),d=U(!1),p=async()=>{window.location.reload()},y=[{value:"en",text:"English"},{value:"zhHans",text:"简体中文"},{value:"zhHant",text:"繁體中文"},{value:"de",text:"Deutsch"}],r=(a,t)=>{const _=Se(a);_&&(e.shortcut[t]=_)},h=async()=>{await ge("shutdown_api_server_command"),await pe.removeFile(_e),await be()};return(a,t)=>{const _=Z,m=Y,f=Ce,N=$e,T=ke,S=ye;return C(),F("div",Be,[B("",!0),l(S,null,{default:s(()=>{var x;return[g("h2",Me,b(n(k)("ImageBrowsingSettings")),1),l(Ve),g("h2",null,b(n(k)("other")),1),l(m,{label:a.$t("onlyFoldersAndImages")},{default:s(()=>[l(_,{checked:n(e).onlyFoldersAndImages,"onUpdate:checked":t[0]||(t[0]=u=>n(e).onlyFoldersAndImages=u)},null,8,["checked"])]),_:1},8,["label"]),l(m,{label:a.$t("defaultSortingMethod")},{default:s(()=>[l(n(W),{value:n(e).defaultSortingMethod,"onUpdate:value":t[1]||(t[1]=u=>n(e).defaultSortingMethod=u),conv:n(fe),options:n(me)},null,8,["value","conv","options"])]),_:1},8,["label"]),l(m,{label:a.$t("longPressOpenContextMenu")},{default:s(()=>[l(_,{checked:n(e).longPressOpenContextMenu,"onUpdate:checked":t[2]||(t[2]=u=>n(e).longPressOpenContextMenu=u)},null,8,["checked"])]),_:1},8,["label"]),l(m,{label:a.$t("lang")},{default:s(()=>[g("div",Ue,[l(n(W),{options:y,value:n(e).lang,"onUpdate:value":t[3]||(t[3]=u=>n(e).lang=u),onChange:t[4]||(t[4]=u=>d.value=!0)},null,8,["value"])]),d.value?(C(),V(f,{key:0,type:"primary",onClick:p,ghost:""},{default:s(()=>[I(b(n(k)("langChangeReload")),1)]),_:1})):B("",!0)]),_:1},8,["label"]),(C(!0),F(M,null,j(n(e).ignoredConfirmActions,(u,v)=>(C(),V(m,{label:a.$t(v+"SkipConfirm"),key:v},{default:s(()=>[l(N,{checked:n(e).ignoredConfirmActions[v],"onUpdate:checked":A=>n(e).ignoredConfirmActions[v]=A},null,8,["checked","onUpdate:checked"])]),_:2},1032,["label"]))),128)),g("h2",null,b(n(k)("shortcutKey")),1),l(m,{label:a.$t("download")},{default:s(()=>[g("div",Ke,[l(T,{value:n(e).shortcut.download,onKeydown:t[5]||(t[5]=D(u=>r(u,"download"),["stop","prevent"])),placeholder:a.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),l(f,{onClick:t[6]||(t[6]=u=>n(e).shortcut.download=""),class:"clear-btn"},{default:s(()=>[I(b(a.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),l(m,{label:a.$t("deleteSelected")},{default:s(()=>[g("div",Ne,[l(T,{value:n(e).shortcut.delete,onKeydown:t[7]||(t[7]=D(u=>r(u,"delete"),["stop","prevent"])),placeholder:a.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),l(f,{onClick:t[8]||(t[8]=u=>n(e).shortcut.delete=""),class:"clear-btn"},{default:s(()=>[I(b(a.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),(C(!0),F(M,null,j(((x=n(e).conf)==null?void 0:x.all_custom_tags)??[],u=>(C(),V(m,{label:a.$t("toggleTagSelection",{tag:u.name}),key:u.id},{default:s(()=>[g("div",Ae,[l(T,{value:n(e).shortcut[`toggle_tag_${u.name}`],onKeydown:D(v=>r(v,`toggle_tag_${u.name}`),["stop","prevent"]),placeholder:a.$t("shortcutKeyDescription")},null,8,["value","onKeydown","placeholder"]),l(f,{onClick:v=>n(e).shortcut[`toggle_tag_${u.name}`]="",class:"clear-btn"},{default:s(()=>[I(b(a.$t("clear")),1)]),_:2},1032,["onClick"])])]),_:2},1032,["label"]))),128)),n(ve)?(C(),F(M,{key:0},[g("h2",null,b(n(k)("clientSpecificSettings")),1),l(m,null,{default:s(()=>[g("div",Pe,[l(f,{onClick:h,class:"clear-btn"},{default:s(()=>[I(b(a.$t("initiateSoftwareStartupConfig")),1)]),_:1})])]),_:1})],64)):B("",!0)]}),_:1})])}}});const We=we(De,[["__scopeId","data-v-a56cd1af"]]);export{We as default}; diff --git a/vue/dist/assets/hook-9c9eb74d.js b/vue/dist/assets/hook-8fa8389e.js similarity index 95% rename from vue/dist/assets/hook-9c9eb74d.js rename to vue/dist/assets/hook-8fa8389e.js index 9500820..4380561 100644 --- a/vue/dist/assets/hook-9c9eb74d.js +++ b/vue/dist/assets/hook-8fa8389e.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-54d35579.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-ced5f921.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-b44dfcf8.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-c84a61c8.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-54d35579.js b/vue/dist/assets/index-b44dfcf8.js similarity index 98% rename from vue/dist/assets/index-54d35579.js rename to vue/dist/assets/index-b44dfcf8.js index b82d2aa..0c49179 100644 --- a/vue/dist/assets/index-54d35579.js +++ b/vue/dist/assets/index-b44dfcf8.js @@ -126,12 +126,12 @@ summary tabindex target title type usemap value width wmode wrap`,ck=`onCopy onC * Released under the MIT License. */const U8="9.3.0-beta.19";function K8(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(to().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(to().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(to().__INTLIFY_PROD_DEVTOOLS__=!1)}let V1=Ue.__EXTEND_POINT__;const en=()=>++V1,Ct={UNEXPECTED_RETURN_TYPE:V1,INVALID_ARGUMENT:en(),MUST_BE_CALL_SETUP_TOP:en(),NOT_INSTALLED:en(),NOT_AVAILABLE_IN_LEGACY_MODE:en(),REQUIRED_VALUE:en(),INVALID_VALUE:en(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:en(),NOT_INSTALLED_WITH_PROVIDE:en(),UNEXPECTED_ERROR:en(),NOT_COMPATIBLE_LEGACY_VUE_I18N:en(),BRIDGE_SUPPORT_VUE_2_ONLY:en(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:en(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:en(),__EXTEND_POINT__:en()};function Pt(t,...e){return ru(t,null,void 0)}const uf=Aa("__translateVNode"),cf=Aa("__datetimeParts"),ff=Aa("__numberParts"),H1=Aa("__setPluralRules"),U1=Aa("__injectWithOption");function df(t){if(!Je(t))return t;for(const e in t)if(pv(t,e))if(!e.includes("."))Je(t[e])&&df(t[e]);else{const n=e.split("."),r=n.length-1;let a=t;for(let i=0;i{if("locale"in l&&"resource"in l){const{locale:s,resource:u}=l;s?(o[s]=o[s]||{},no(u,o[s])):no(u,o)}else be(l)&&no(JSON.parse(l),o)}),a==null&&i)for(const l in o)pv(o,l)&&df(o[l]);return o}const gl=t=>!Je(t)||ot(t);function no(t,e){if(gl(t)||gl(e))throw Pt(Ct.INVALID_VALUE);for(const n in t)pv(t,n)&&(gl(t[n])||gl(e[n])?e[n]=t[n]:no(t[n],e[n]))}function K1(t){return t.type}function G1(t,e,n){let r=Je(e.messages)?e.messages:{};"__i18nGlobal"in n&&(r=iu(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const a=Object.keys(r);a.length&&a.forEach(i=>{t.mergeLocaleMessage(i,r[i])});{if(Je(e.datetimeFormats)){const i=Object.keys(e.datetimeFormats);i.length&&i.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(Je(e.numberFormats)){const i=Object.keys(e.numberFormats);i.length&&i.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function iy(t){return x(Ea,null,t,0)}const oy="__INTLIFY_META__";let ly=0;function sy(t){return(e,n,r,a)=>t(n,r,bt()||void 0,a)}const G8=()=>{const t=bt();let e=null;return t&&(e=K1(t)[oy])?{[oy]:e}:null};function gv(t={},e){const{__root:n}=t,r=n===void 0;let a=Fe(t.inheritLocale)?t.inheritLocale:!0;const i=W(n&&a?n.locale.value:be(t.locale)?t.locale:zo),o=W(n&&a?n.fallbackLocale.value:be(t.fallbackLocale)||ot(t.fallbackLocale)||Te(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:i.value),l=W(iu(i.value,t)),s=W(Te(t.datetimeFormats)?t.datetimeFormats:{[i.value]:{}}),u=W(Te(t.numberFormats)?t.numberFormats:{[i.value]:{}});let f=n?n.missingWarn:Fe(t.missingWarn)||Gr(t.missingWarn)?t.missingWarn:!0,v=n?n.fallbackWarn:Fe(t.fallbackWarn)||Gr(t.fallbackWarn)?t.fallbackWarn:!0,p=n?n.fallbackRoot:Fe(t.fallbackRoot)?t.fallbackRoot:!0,g=!!t.fallbackFormat,c=gt(t.missing)?t.missing:null,d=gt(t.missing)?sy(t.missing):null,m=gt(t.postTranslation)?t.postTranslation:null,h=n?n.warnHtmlMessage:Fe(t.warnHtmlMessage)?t.warnHtmlMessage:!0,y=!!t.escapeParameter;const b=n?n.modifiers:Te(t.modifiers)?t.modifiers:{};let w=t.pluralRules||n&&n.pluralRules,C;C=(()=>{r&&Xg(null);const V={version:U8,locale:i.value,fallbackLocale:o.value,messages:l.value,modifiers:b,pluralRules:w,missing:d===null?void 0:d,missingWarn:f,fallbackWarn:v,fallbackFormat:g,unresolving:!0,postTranslation:m===null?void 0:m,warnHtmlMessage:h,escapeParameter:y,messageResolver:t.messageResolver,__meta:{framework:"vue"}};V.datetimeFormats=s.value,V.numberFormats=u.value,V.__datetimeFormatters=Te(C)?C.__datetimeFormatters:void 0,V.__numberFormatters=Te(C)?C.__numberFormatters:void 0;const U=F8(V);return r&&Xg(U),U})(),Fi(C,i.value,o.value);function E(){return[i.value,o.value,l.value,s.value,u.value]}const I=K({get:()=>i.value,set:V=>{i.value=V,C.locale=i.value}}),P=K({get:()=>o.value,set:V=>{o.value=V,C.fallbackLocale=o.value,Fi(C,i.value,V)}}),k=K(()=>l.value),L=K(()=>s.value),F=K(()=>u.value);function j(){return gt(m)?m:null}function z(V){m=V,C.postTranslation=V}function $(){return c}function M(V){V!==null&&(d=sy(V)),c=V,C.missing=d}const A=(V,U,se,ce,we,Pe)=>{E();let Oe;if(__INTLIFY_PROD_DEVTOOLS__)try{Yg(G8()),r||(C.fallbackContext=n?D8():void 0),Oe=V(C)}finally{Yg(null),r||(C.fallbackContext=void 0)}else Oe=V(C);if(St(Oe)&&Oe===au){const[$e,ft]=U();return n&&p?ce(n):we($e)}else{if(Pe(Oe))return Oe;throw Pt(Ct.UNEXPECTED_RETURN_TYPE)}};function N(...V){return A(U=>Reflect.apply(ey,null,[U,...V]),()=>of(...V),"translate",U=>Reflect.apply(U.t,U,[...V]),U=>U,U=>be(U))}function D(...V){const[U,se,ce]=V;if(ce&&!Je(ce))throw Pt(Ct.INVALID_ARGUMENT);return N(U,se,$t({resolvedMessage:!0},ce||{}))}function q(...V){return A(U=>Reflect.apply(ty,null,[U,...V]),()=>lf(...V),"datetime format",U=>Reflect.apply(U.d,U,[...V]),()=>Gg,U=>be(U))}function ee(...V){return A(U=>Reflect.apply(ry,null,[U,...V]),()=>sf(...V),"number format",U=>Reflect.apply(U.n,U,[...V]),()=>Gg,U=>be(U))}function Z(V){return V.map(U=>be(U)||St(U)||Fe(U)?iy(String(U)):U)}const G={normalize:Z,interpolate:V=>V,type:"vnode"};function ne(...V){return A(U=>{let se;const ce=U;try{ce.processor=G,se=Reflect.apply(ey,null,[ce,...V])}finally{ce.processor=null}return se},()=>of(...V),"translate",U=>U[uf](...V),U=>[iy(U)],U=>ot(U))}function oe(...V){return A(U=>Reflect.apply(ry,null,[U,...V]),()=>sf(...V),"number format",U=>U[ff](...V),()=>[],U=>be(U)||ot(U))}function de(...V){return A(U=>Reflect.apply(ty,null,[U,...V]),()=>lf(...V),"datetime format",U=>U[cf](...V),()=>[],U=>be(U)||ot(U))}function me(V){w=V,C.pluralRules=w}function ve(V,U){const se=be(U)?U:i.value,ce=R(se);return C.messageResolver(ce,V)!==null}function he(V){let U=null;const se=k1(C,o.value,i.value);for(let ce=0;ce{a&&(i.value=V,C.locale=V,Fi(C,i.value,o.value))}),pe(n.fallbackLocale,V=>{a&&(o.value=V,C.fallbackLocale=V,Fi(C,i.value,o.value))}));const X={id:ly,locale:I,fallbackLocale:P,get inheritLocale(){return a},set inheritLocale(V){a=V,V&&n&&(i.value=n.locale.value,o.value=n.fallbackLocale.value,Fi(C,i.value,o.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:k,get modifiers(){return b},get pluralRules(){return w||{}},get isGlobal(){return r},get missingWarn(){return f},set missingWarn(V){f=V,C.missingWarn=f},get fallbackWarn(){return v},set fallbackWarn(V){v=V,C.fallbackWarn=v},get fallbackRoot(){return p},set fallbackRoot(V){p=V},get fallbackFormat(){return g},set fallbackFormat(V){g=V,C.fallbackFormat=g},get warnHtmlMessage(){return h},set warnHtmlMessage(V){h=V,C.warnHtmlMessage=V},get escapeParameter(){return y},set escapeParameter(V){y=V,C.escapeParameter=V},t:N,getLocaleMessage:R,setLocaleMessage:S,mergeLocaleMessage:O,getPostTranslationHandler:j,setPostTranslationHandler:z,getMissingHandler:$,setMissingHandler:M,[H1]:me};return X.datetimeFormats=L,X.numberFormats=F,X.rt=D,X.te=ve,X.tm=ye,X.d=q,X.n=ee,X.getDateTimeFormat=B,X.setDateTimeFormat=H,X.mergeDateTimeFormat=Q,X.getNumberFormat=ae,X.setNumberFormat=ie,X.mergeNumberFormat=re,X[U1]=t.__injectWithOption,X[uf]=ne,X[cf]=de,X[ff]=oe,X}function q8(t){const e=be(t.locale)?t.locale:zo,n=be(t.fallbackLocale)||ot(t.fallbackLocale)||Te(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,r=gt(t.missing)?t.missing:void 0,a=Fe(t.silentTranslationWarn)||Gr(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,i=Fe(t.silentFallbackWarn)||Gr(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=Fe(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,s=Te(t.modifiers)?t.modifiers:{},u=t.pluralizationRules,f=gt(t.postTranslation)?t.postTranslation:void 0,v=be(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,p=!!t.escapeParameterHtml,g=Fe(t.sync)?t.sync:!0;let c=t.messages;if(Te(t.sharedMessages)){const C=t.sharedMessages;c=Object.keys(C).reduce((E,I)=>{const P=E[I]||(E[I]={});return $t(P,C[I]),E},c||{})}const{__i18n:d,__root:m,__injectWithOption:h}=t,y=t.datetimeFormats,b=t.numberFormats,w=t.flatJson;return{locale:e,fallbackLocale:n,messages:c,flatJson:w,datetimeFormats:y,numberFormats:b,missing:r,missingWarn:a,fallbackWarn:i,fallbackRoot:o,fallbackFormat:l,modifiers:s,pluralRules:u,postTranslation:f,warnHtmlMessage:v,escapeParameter:p,messageResolver:t.messageResolver,inheritLocale:g,__i18n:d,__root:m,__injectWithOption:h}}function vf(t={},e){{const n=gv(q8(t)),r={id:n.id,get locale(){return n.locale.value},set locale(a){n.locale.value=a},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(a){n.fallbackLocale.value=a},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(a){},get missing(){return n.getMissingHandler()},set missing(a){n.setMissingHandler(a)},get silentTranslationWarn(){return Fe(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(a){n.missingWarn=Fe(a)?!a:a},get silentFallbackWarn(){return Fe(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(a){n.fallbackWarn=Fe(a)?!a:a},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(a){n.fallbackFormat=a},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(a){n.setPostTranslationHandler(a)},get sync(){return n.inheritLocale},set sync(a){n.inheritLocale=a},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){n.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(a){n.escapeParameter=a},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(a){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...a){const[i,o,l]=a,s={};let u=null,f=null;if(!be(i))throw Pt(Ct.INVALID_ARGUMENT);const v=i;return be(o)?s.locale=o:ot(o)?u=o:Te(o)&&(f=o),ot(l)?u=l:Te(l)&&(f=l),Reflect.apply(n.t,n,[v,u||f||{},s])},rt(...a){return Reflect.apply(n.rt,n,[...a])},tc(...a){const[i,o,l]=a,s={plural:1};let u=null,f=null;if(!be(i))throw Pt(Ct.INVALID_ARGUMENT);const v=i;return be(o)?s.locale=o:St(o)?s.plural=o:ot(o)?u=o:Te(o)&&(f=o),be(l)?s.locale=l:ot(l)?u=l:Te(l)&&(f=l),Reflect.apply(n.t,n,[v,u||f||{},s])},te(a,i){return n.te(a,i)},tm(a){return n.tm(a)},getLocaleMessage(a){return n.getLocaleMessage(a)},setLocaleMessage(a,i){n.setLocaleMessage(a,i)},mergeLocaleMessage(a,i){n.mergeLocaleMessage(a,i)},d(...a){return Reflect.apply(n.d,n,[...a])},getDateTimeFormat(a){return n.getDateTimeFormat(a)},setDateTimeFormat(a,i){n.setDateTimeFormat(a,i)},mergeDateTimeFormat(a,i){n.mergeDateTimeFormat(a,i)},n(...a){return Reflect.apply(n.n,n,[...a])},getNumberFormat(a){return n.getNumberFormat(a)},setNumberFormat(a,i){n.setNumberFormat(a,i)},mergeNumberFormat(a,i){n.mergeNumberFormat(a,i)},getChoiceIndex(a,i){return-1},__onComponentInstanceCreated(a){const{componentInstanceCreatedListener:i}=t;i&&i(a,r)}};return r}}const yv={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function Y8({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,a)=>[...r,...a.type===De?a.children:[a]],[]):e.reduce((n,r)=>{const a=t[r];return a&&(n[r]=a()),n},{})}function q1(t){return De}const X8=fe({name:"i18n-t",props:$t({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>St(t)||!isNaN(t)}},yv),setup(t,e){const{slots:n,attrs:r}=e,a=t.i18n||bv({useScope:t.scope,__useComponent:!0});return()=>{const i=Object.keys(n).filter(v=>v!=="_"),o={};t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=be(t.plural)?+t.plural:t.plural);const l=Y8(e,i),s=a[uf](t.keypath,l,o),u=$t({},r),f=be(t.tag)||Je(t.tag)?t.tag:q1();return Kr(f,u,s)}}}),uy=X8;function J8(t){return ot(t)&&!be(t[0])}function Y1(t,e,n,r){const{slots:a,attrs:i}=e;return()=>{const o={part:!0};let l={};t.locale&&(o.locale=t.locale),be(t.format)?o.key=t.format:Je(t.format)&&(be(t.format.key)&&(o.key=t.format.key),l=Object.keys(t.format).reduce((p,g)=>n.includes(g)?$t({},p,{[g]:t.format[g]}):p,{}));const s=r(t.value,o,l);let u=[o.key];ot(s)?u=s.map((p,g)=>{const c=a[p.type],d=c?c({[p.type]:p.value,index:g,parts:s}):[p.value];return J8(d)&&(d[0].key=`${p.type}-${g}`),d}):be(s)&&(u=[s]);const f=$t({},i),v=be(t.tag)||Je(t.tag)?t.tag:q1();return Kr(v,f,u)}}const Q8=fe({name:"i18n-n",props:$t({value:{type:Number,required:!0},format:{type:[String,Object]}},yv),setup(t,e){const n=t.i18n||bv({useScope:"parent",__useComponent:!0});return Y1(t,e,W1,(...r)=>n[ff](...r))}}),cy=Q8,Z8=fe({name:"i18n-d",props:$t({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},yv),setup(t,e){const n=t.i18n||bv({useScope:"parent",__useComponent:!0});return Y1(t,e,z1,(...r)=>n[cf](...r))}}),fy=Z8;function eB(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const r=n.__getInstance(e);return r!=null?r.__composer:t.global.__composer}}function tB(t){const e=o=>{const{instance:l,modifiers:s,value:u}=o;if(!l||!l.$)throw Pt(Ct.UNEXPECTED_ERROR);const f=eB(t,l.$),v=dy(u);return[Reflect.apply(f.t,f,[...vy(v)]),f]};return{created:(o,l)=>{const[s,u]=e(l);rf&&t.global===u&&(o.__i18nWatcher=pe(u.locale,()=>{l.instance&&l.instance.$forceUpdate()})),o.__composer=u,o.textContent=s},unmounted:o=>{rf&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:l})=>{if(o.__composer){const s=o.__composer,u=dy(l);o.textContent=Reflect.apply(s.t,s,[...vy(u)])}},getSSRProps:o=>{const[l]=e(o);return{textContent:l}}}}function dy(t){if(be(t))return{path:t};if(Te(t)){if(!("path"in t))throw Pt(Ct.REQUIRED_VALUE,"path");return t}else throw Pt(Ct.INVALID_VALUE)}function vy(t){const{path:e,locale:n,args:r,choice:a,plural:i}=t,o={},l=r||{};return be(n)&&(o.locale=n),St(a)&&(o.plural=a),St(i)&&(o.plural=i),[e,l,o]}function nB(t,e,...n){const r=Te(n[0])?n[0]:{},a=!!r.useI18nComponentName;(Fe(r.globalInstall)?r.globalInstall:!0)&&(t.component(a?"i18n":uy.name,uy),t.component(cy.name,cy),t.component(fy.name,fy)),t.directive("t",tB(e))}function rB(t,e,n){return{beforeCreate(){const r=bt();if(!r)throw Pt(Ct.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const i=a.i18n;a.__i18n&&(i.__i18n=a.__i18n),i.__root=e,this===this.$root?this.$i18n=py(t,i):(i.__injectWithOption=!0,this.$i18n=vf(i))}else a.__i18n?this===this.$root?this.$i18n=py(t,a):this.$i18n=vf({__i18n:a.__i18n,__injectWithOption:!0,__root:e}):this.$i18n=t;a.__i18nGlobal&&G1(e,a,a),t.__onComponentInstanceCreated(this.$i18n),n.__setInstance(r,this.$i18n),this.$t=(...i)=>this.$i18n.t(...i),this.$rt=(...i)=>this.$i18n.rt(...i),this.$tc=(...i)=>this.$i18n.tc(...i),this.$te=(i,o)=>this.$i18n.te(i,o),this.$d=(...i)=>this.$i18n.d(...i),this.$n=(...i)=>this.$i18n.n(...i),this.$tm=i=>this.$i18n.tm(i),this!==this.$root&&!this.$i18n.__extended__&&n.__vueI18nExtend&&(n.__vueI18nExtend(this.$i18n),this.$i18n.__extended__=!0)},mounted(){},unmounted(){const r=bt();if(!r)throw Pt(Ct.UNEXPECTED_ERROR);delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__deleteInstance(r),delete this.$i18n}}}function py(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[H1](e.pluralizationRules||t.pluralizationRules);const n=iu(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(r=>t.mergeLocaleMessage(r,n[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>t.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>t.mergeNumberFormat(r,e.numberFormats[r])),t}const aB=Aa("global-vue-i18n");function iB(t={},e){const n=__VUE_I18N_LEGACY_API__&&Fe(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,r=Fe(t.globalInjection)?t.globalInjection:!0,a=__VUE_I18N_LEGACY_API__&&n?!!t.allowComposition:!0,i=new Map,[o,l]=oB(t,n),s=Aa("");function u(p){return i.get(p)||null}function f(p,g){i.set(p,g)}function v(p){i.delete(p)}{const p={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return a},async install(g,...c){if(g.__VUE_I18N_SYMBOL__=s,g.provide(g.__VUE_I18N_SYMBOL__,p),Te(c[0])){const m=c[0];p.__composerExtend=m.__composerExtend,p.__vueI18nExtend=m.__vueI18nExtend}!n&&r&&mB(g,p.global),__VUE_I18N_FULL_INSTALL__&&nB(g,p,...c),__VUE_I18N_LEGACY_API__&&n&&g.mixin(rB(l,l.__composer,p));const d=g.unmount;g.unmount=()=>{p.dispose(),d()}},get global(){return l},dispose(){o.stop()},__instances:i,__getInstance:u,__setInstance:f,__deleteInstance:v};return p}}function bv(t={}){const e=bt();if(e==null)throw Pt(Ct.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Pt(Ct.NOT_INSTALLED);const n=lB(e),r=uB(n),a=K1(e),i=sB(t,a);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!t.__useComponent){if(!n.allowComposition)throw Pt(Ct.NOT_AVAILABLE_IN_LEGACY_MODE);return vB(e,i,r,t)}if(i==="global")return G1(r,t,a),r;if(i==="parent"){let s=cB(n,e,t.__useComponent);return s==null&&(s=r),s}const o=n;let l=o.__getInstance(e);if(l==null){const s=$t({},t);"__i18n"in a&&(s.__i18n=a.__i18n),r&&(s.__root=r),l=gv(s),o.__composerExtend&&o.__composerExtend(l),dB(o,e),o.__setInstance(e,l)}return l}function oB(t,e,n){const r=Ef();{const a=__VUE_I18N_LEGACY_API__&&e?r.run(()=>vf(t)):r.run(()=>gv(t));if(a==null)throw Pt(Ct.UNEXPECTED_ERROR);return[r,a]}}function lB(t){{const e=Xe(t.isCE?aB:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Pt(t.isCE?Ct.NOT_INSTALLED_WITH_PROVIDE:Ct.UNEXPECTED_ERROR);return e}}function sB(t,e){return nu(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function uB(t){return t.mode==="composition"?t.global:t.global.__composer}function cB(t,e,n=!1){let r=null;const a=e.root;let i=fB(e,n);for(;i!=null;){const o=t;if(t.mode==="composition")r=o.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const l=o.__getInstance(i);l!=null&&(r=l.__composer,n&&r&&!r[U1]&&(r=null))}if(r!=null||a===i)break;i=i.parent}return r}function fB(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function dB(t,e,n){Re(()=>{},e),ln(()=>{t.__deleteInstance(e)},e)}function vB(t,e,n,r={}){const a=e==="local",i=$n(null);if(a&&t.proxy&&!(t.proxy.$options.i18n||t.proxy.$options.__i18n))throw Pt(Ct.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=Fe(r.inheritLocale)?r.inheritLocale:!be(r.locale),l=W(!a||o?n.locale.value:be(r.locale)?r.locale:zo),s=W(!a||o?n.fallbackLocale.value:be(r.fallbackLocale)||ot(r.fallbackLocale)||Te(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:l.value),u=W(iu(l.value,r)),f=W(Te(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),v=W(Te(r.numberFormats)?r.numberFormats:{[l.value]:{}}),p=a?n.missingWarn:Fe(r.missingWarn)||Gr(r.missingWarn)?r.missingWarn:!0,g=a?n.fallbackWarn:Fe(r.fallbackWarn)||Gr(r.fallbackWarn)?r.fallbackWarn:!0,c=a?n.fallbackRoot:Fe(r.fallbackRoot)?r.fallbackRoot:!0,d=!!r.fallbackFormat,m=gt(r.missing)?r.missing:null,h=gt(r.postTranslation)?r.postTranslation:null,y=a?n.warnHtmlMessage:Fe(r.warnHtmlMessage)?r.warnHtmlMessage:!0,b=!!r.escapeParameter,w=a?n.modifiers:Te(r.modifiers)?r.modifiers:{},C=r.pluralRules||a&&n.pluralRules;function _(){return[l.value,s.value,u.value,f.value,v.value]}const E=K({get:()=>i.value?i.value.locale.value:l.value,set:O=>{i.value&&(i.value.locale.value=O),l.value=O}}),I=K({get:()=>i.value?i.value.fallbackLocale.value:s.value,set:O=>{i.value&&(i.value.fallbackLocale.value=O),s.value=O}}),P=K(()=>i.value?i.value.messages.value:u.value),k=K(()=>f.value),L=K(()=>v.value);function F(){return i.value?i.value.getPostTranslationHandler():h}function j(O){i.value&&i.value.setPostTranslationHandler(O)}function z(){return i.value?i.value.getMissingHandler():m}function $(O){i.value&&i.value.setMissingHandler(O)}function M(O){return _(),O()}function A(...O){return i.value?M(()=>Reflect.apply(i.value.t,null,[...O])):M(()=>"")}function N(...O){return i.value?Reflect.apply(i.value.rt,null,[...O]):""}function D(...O){return i.value?M(()=>Reflect.apply(i.value.d,null,[...O])):M(()=>"")}function q(...O){return i.value?M(()=>Reflect.apply(i.value.n,null,[...O])):M(()=>"")}function ee(O){return i.value?i.value.tm(O):{}}function Z(O,B){return i.value?i.value.te(O,B):!1}function Y(O){return i.value?i.value.getLocaleMessage(O):{}}function G(O,B){i.value&&(i.value.setLocaleMessage(O,B),u.value[O]=B)}function ne(O,B){i.value&&i.value.mergeLocaleMessage(O,B)}function oe(O){return i.value?i.value.getDateTimeFormat(O):{}}function de(O,B){i.value&&(i.value.setDateTimeFormat(O,B),f.value[O]=B)}function me(O,B){i.value&&i.value.mergeDateTimeFormat(O,B)}function ve(O){return i.value?i.value.getNumberFormat(O):{}}function he(O,B){i.value&&(i.value.setNumberFormat(O,B),v.value[O]=B)}function ye(O,B){i.value&&i.value.mergeNumberFormat(O,B)}const R={get id(){return i.value?i.value.id:-1},locale:E,fallbackLocale:I,messages:P,datetimeFormats:k,numberFormats:L,get inheritLocale(){return i.value?i.value.inheritLocale:o},set inheritLocale(O){i.value&&(i.value.inheritLocale=O)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(u.value)},get modifiers(){return i.value?i.value.modifiers:w},get pluralRules(){return i.value?i.value.pluralRules:C},get isGlobal(){return i.value?i.value.isGlobal:!1},get missingWarn(){return i.value?i.value.missingWarn:p},set missingWarn(O){i.value&&(i.value.missingWarn=O)},get fallbackWarn(){return i.value?i.value.fallbackWarn:g},set fallbackWarn(O){i.value&&(i.value.missingWarn=O)},get fallbackRoot(){return i.value?i.value.fallbackRoot:c},set fallbackRoot(O){i.value&&(i.value.fallbackRoot=O)},get fallbackFormat(){return i.value?i.value.fallbackFormat:d},set fallbackFormat(O){i.value&&(i.value.fallbackFormat=O)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:y},set warnHtmlMessage(O){i.value&&(i.value.warnHtmlMessage=O)},get escapeParameter(){return i.value?i.value.escapeParameter:b},set escapeParameter(O){i.value&&(i.value.escapeParameter=O)},t:A,getPostTranslationHandler:F,setPostTranslationHandler:j,getMissingHandler:z,setMissingHandler:$,rt:N,d:D,n:q,tm:ee,te:Z,getLocaleMessage:Y,setLocaleMessage:G,mergeLocaleMessage:ne,getDateTimeFormat:oe,setDateTimeFormat:de,mergeDateTimeFormat:me,getNumberFormat:ve,setNumberFormat:he,mergeNumberFormat:ye};function S(O){O.locale.value=l.value,O.fallbackLocale.value=s.value,Object.keys(u.value).forEach(B=>{O.mergeLocaleMessage(B,u.value[B])}),Object.keys(f.value).forEach(B=>{O.mergeDateTimeFormat(B,f.value[B])}),Object.keys(v.value).forEach(B=>{O.mergeNumberFormat(B,v.value[B])}),O.escapeParameter=b,O.fallbackFormat=d,O.fallbackRoot=c,O.fallbackWarn=g,O.missingWarn=p,O.warnHtmlMessage=y}return Bf(()=>{if(t.proxy==null||t.proxy.$i18n==null)throw Pt(Ct.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const O=i.value=t.proxy.$i18n.__composer;e==="global"?(l.value=O.locale.value,s.value=O.fallbackLocale.value,u.value=O.messages.value,f.value=O.datetimeFormats.value,v.value=O.numberFormats.value):a&&S(O)}),R}const pB=["locale","fallbackLocale","availableLocales"],hB=["t","rt","d","n","tm","te"];function mB(t,e){const n=Object.create(null);pB.forEach(r=>{const a=Object.getOwnPropertyDescriptor(e,r);if(!a)throw Pt(Ct.UNEXPECTED_ERROR);const i=tt(a.value)?{get(){return a.value.value},set(o){a.value.value=o}}:{get(){return a.get&&a.get()}};Object.defineProperty(n,r,i)}),t.config.globalProperties.$i18n=n,hB.forEach(r=>{const a=Object.getOwnPropertyDescriptor(e,r);if(!a||!a.value)throw Pt(Ct.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${r}`,a)})}N8(j8);$8(h8);R8(k1);K8();if(__INTLIFY_PROD_DEVTOOLS__){const t=to();t.__INTLIFY__=!0,x8(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const hy={errorOccurred:"发生了个错误",useThumbnailPreview:"使用缩略图预览",gridThumbnailWidth:"网格缩略图宽度",start:"开始",tip:"提示",sortByDateAscending:"修改日期升序",sortByDateDescending:"修改日期降序",sortByCreatedDateAscending:"创建日期升序",sortByCreatedDateDescending:"创建日期降序",sortByNameAscending:"名称升序",sortByNameDescending:"名称降序",sortBySizeAscending:"大小升序",sortBySizeDescending:"大小降序",inputAddressAndPressEnter:"输入地址回车",go:"前往",unknownError:"未知错误",loadingNextFolder:"即将加载下一个文件夹的文件",moveFailedCheckPath:"移动失败,检查你的路径输入",detailList:"详情列表",previewGrid:"预览网格",moveSelectedFilesTo:"下列文件 移动 / 复制 至",confirm:"确定",download:"下载",local:"本地",sendImageFailed:"发送图像失败,请携带console的错误消息找开发者",confirmDelete:"确认删除?",deleteSuccess:"删除成功",doubleClickToCopy:"双击复制",root:"根",drive:"盘",refresh:"刷新",quickMove:"快速移动",more:"更多",viewMode:"查看模式",sortingMethod:"排序方法",copyPath:"复制路径",deleteSelected:"删除",previewInNewWindow:"在新窗口预览",copySourceFilePreviewLink:"复制源文件预览链接",viewGenerationInfo:"查看生成信息(prompt等)",sendToTxt2img:"发送到文生图",sendToImg2img:"发送到图生图",sendToInpaint:"发送到局部重绘",sendToControlNet:"发送到ControlNet",sendToBatchDownload:"发送到批量下载",sendToExtraFeatures:"发送到附加功能",loadNextPage:"加载下一页",localFile:"本地文件",globalSettings:"全局设置",welcome:"欢迎",openInNewWindow:"在新页面打开",restoreLastRecord:"还原上次记录",launch:"启动",walkMode:"使用 Walk 模式浏览图片",launchFromQuickMove:"从快速移动启动",recent:"最近",emptyStartPage:"空启动页",t2i:"文生图",i2i:"图生图",saveButtonSavesTo:"保存",extra:"附加",gridImage:"宫格图","i2i-grid":"图生图宫格",image:"图像","t2i-grid":"文生图宫格",workingFolder:"工作文件夹",lang:"语言",langChangeReload:"重新加载: 一些变化可能需要在重新加载后生效",openOnTheRight:"在右边打开",openInNewTab:"在新标签打开",openWithWalkMode:"使用 Walk 模式打开",longPressOpenContextMenu:"支持使用长按打开右键菜单",searchResults:"搜索结果",imgSearch:"图像搜索",onlyFoldersAndImages:"只显示文件夹/图像/视频",send2savedDir:"发送到保存的文件夹",unknownSavedDir:"找不到保存的文件夹(配置文件中的outdir_save字段)",Model:"模型",Sampler:"采样器",lora:"LoRA",size:"尺寸",pos:"正面提示",generateIndexHint:"生成索引用于搜索图像",UpdateIndex:"更新索引",needGenerateIdx:`你需要先点击按钮生成索引用于搜索图像 这个过程可能需要消耗几分钟`,search:"搜索",custom:"自定义",add:"新增",cancel:"取消",submit:"提交",existInOtherType:"已存在于其他类型",alreadyExists:"已存在",toggleTag:"切换标签选中 (收藏)",addCompleted:"添加完成",removeCompleted:"删除完成",addedTagToImage:'已添加标签 "{tag}" 到本图片',removedTagFromImage:'已从本图片上移除 "{tag}" 标签',openContextMenu:"打开上下文菜单",copyPrompt:"复制提示",copyPositivePrompt:"复制正向提示",refreshCompleted:"刷新完成","walk-mode-move-message":"在walk模式下仅允许使用“快速移动”移动位置",manualExitFullScreen:"你删除了最后一张图片,也许需要你手动退出全屏查看",copied:"已复制!","index.expired":"索引过期,正在自动更新","auto.refreshed":"自动刷新完成!",exactMatch:"完全匹配",anyMatch:"匹配任意",exclude:"排除掉",selectExactMatchTag:"选择完全匹配的 Tag",selectAnyMatchTag:"可选,选择匹配其中一个或多个的 Tag",selectExcludeTag:"可选,选择需要排除掉的 Tag",faq:"常见问题",autoUpdate:"检测到发生改变自动更新","fuzzy-search":"模糊搜索","fuzzy-search-placeholder":"输入图像信息或者文件名的一部分来进行搜索","fuzzy-search-noResults":"什么都没找到",openWithLocalFileBrowser:"使用本地文件浏览器打开",addToSearchScanPathAndQuickMove:"添加到搜索扫描路径和快速移动",removeFromSearchScanPathAndQuickMove:"从搜索扫描路径和快速移动中移除",serverKeyRequired:"服务器配置了密匙,你必须提供相同的密匙才能继续使用",shortcutKey:"快捷键(仅允许在全屏查看下使用)",shortcutKeyDescription:"点击输入框按下你想使用的按键,支持与Shift和Ctrl进行组合",fullscreenRestriction:"受技术限制,当前拓展不允许删除打开全屏查看时的首张图片。",clear:"清除",toggleTagSelection:'切换 "{tag}" 标签选中',changlog:"更新日志",accessControlModeTips:"为确保数据安全,您当前正以访问控制模式运行,仅能访问授权文件夹。您可以通过编辑本拓展根目录的下.env文件来调整访问权限设置 (IIB_ACCESS_CONTROL) .如果不存在.env文件, 你可以将.env.example文件复制并重命名为.env",dontShowAgain:"不再显示",defaultSortingMethod:"默认排序方法",defaultViewMode:"默认查看模式",showPreviewImage:"显示预览图",copy:"复制",edit:"编辑",document:"文档",multiSelectTips:"您可以按住 Shift、Ctrl 或 Cmd 键,然后单击文件来进行多选删除/移动操作",copyLocationUrlSuccessMsg:"复制完成,你可以通过复制的链接直接打开当前文件夹",share:"分享",dragImageHere:"拖拽图像到这里",imgCompare:"图像对比",close:"关闭",fullscreenview:"全屏查看",fileName:"文件名",resolution:"分辨率",fileSize:"文件大小",selectAll:"全选","tauriLaunchConf.readSdWebuiConfigTitle":"读取Stable Diffusion Webui的配置","tauriLaunchConf.readSdWebuiConfigDescription":"如果你已经安装sd-webui,且在sd-webui内安装了本拓展,推荐直接使用这个,将直接读取配置并且数据共享","tauriLaunchConf.selectSdWebuiFolder":"点击选择SD-webui的文件夹","tauriLaunchConf.skipThisConfigTitle":"跳过本次配置","tauriLaunchConf.skipThisConfigDescription":"所有功能仍将可用,你可以在设置页重置","tauriLaunchConf.skipButton":"跳过","tauriLaunchConfMessages.configNotFound":"找不到对应配置,检查选择的文件夹是否正确","tauriLaunchConfMessages.folderNotFound":"找不到对应文件夹,检查选择的文件夹是否正确","tauriLaunchConfMessages.configCompletedMessage":"配置完成,即将重启","tauriLaunchConfMessages.firstTimeUserTitle":"看起来你好像是第一次使用, 需要进行一些配置",inputTargetFolderPath:"输入目标文件夹的绝对路径",pathDoesNotExist:"路径不存在",confirmToAddToExtraPath:"确定添加?如果文件夹过大将会消耗过多时间建立索引。",clientSpecificSettings:"客户端特有的设置",initiateSoftwareStartupConfig:"初始化软件启动配置",gridCellWidth:"网格单元宽度 (px)",defaultGridCellWidth:"默认网格单元宽度 (px)",thumbnailResolution:"缩略图分辨率 (px)",livePreview:"实时预览",other:"其他",ImageBrowsingSettings:"图像浏览设置",majorUpdateCustomCellSizeTips:"重大更新:你可以自定义网格图像的大小了,在全局设置页或者右上角的“更多”里面进行调整",desktop:"桌面",move:"移动",inputFolderName:"输入文件夹名",createFolder:"创建文件夹",sendToThirdPartyExtension:"发送到第三方拓展",lyco:"LyCORIS",batchDownloaDDragAndDropHint:"使用拖拽或者右键菜单中的“发送到批量下载”将其他页面的图片添加到这里,支持多选",zipDownload:"打包成zip下载",archive:"归档",batchDownload:"批量下载",remove:"移除",secretKeyRequiredWarnMsg:`为了安全考虑,你必须为本拓展单独配置Secret Key,具体参考本拓展根目录下的.env.example文件内的IIB_SECRET_KEY。 - 这项警告只会在配置了gradio-auth时出现`,secretKeyMustBeConfigured:"必须配置Secret Key",deleteOneOnlySkipConfirm:"删除单个文件时不进行确认",resetOnGlobalSettingsPage:"你可以在全局设置页重置",privacyAndSecurity:"安全与隐私",dragToResizePanel:"按住并拖动来调整面板的大小",clickToToggleMaximizeMinimize:"单击切换最大化/最小化",dragToMovePanel:"按住并拖动来移动面板",imageCompareTips:"拖拽文件时也会出现这个面板,可以不需要打开 “图像对比” 功能"},gB={imageCompareTips:`When dragging files, this panel will also appear, so you don't need to open the "Image Comparison" feature separately.`,dragToResizePanel:"Drag to resize the panel",clickToToggleMaximizeMinimize:"Click to toggle maximize/minimize",dragToMovePanel:"Drag to move the panel",privacyAndSecurity:"Security & Privacy",deleteOneOnlySkipConfirm:"Do not confirm when deleting a single file",resetOnGlobalSettingsPage:"You can reset on the global settings page",secretKeyMustBeConfigured:"Secret Key must be configured",secretKeyRequiredWarnMsg:`For security reasons, you must separately configure Secret Key for this extension, refer to the IIB_SECRET_KEY in the .env.example file under the root directory of this extension. + 这项警告只会在配置了gradio-auth时出现`,secretKeyMustBeConfigured:"必须配置Secret Key",deleteOneOnlySkipConfirm:"删除单个文件时不进行确认",resetOnGlobalSettingsPage:"你可以在全局设置页重置",privacyAndSecurity:"安全与隐私",dragToResizePanel:"按住并拖动来调整面板的大小",clickToToggleMaximizeMinimize:"单击切换最大化/最小化",dragToMovePanel:"按住并拖动来移动面板",imageCompareTips:"拖拽文件时也会出现这个面板,可以不需要打开 “图像对比” 功能",regexSearchEnabledHint:"(你也可以通过点击右侧的正则式图标来启用正则式搜索)"},gB={imageCompareTips:`When dragging files, this panel will also appear, so you don't need to open the "Image Comparison" feature separately.`,dragToResizePanel:"Drag to resize the panel",clickToToggleMaximizeMinimize:"Click to toggle maximize/minimize",dragToMovePanel:"Drag to move the panel",privacyAndSecurity:"Security & Privacy",deleteOneOnlySkipConfirm:"Do not confirm when deleting a single file",resetOnGlobalSettingsPage:"You can reset on the global settings page",secretKeyMustBeConfigured:"Secret Key must be configured",secretKeyRequiredWarnMsg:`For security reasons, you must separately configure Secret Key for this extension, refer to the IIB_SECRET_KEY in the .env.example file under the root directory of this extension. This error only appears when gradio-auth is configured.`,remove:"Remove",batchDownload:"Batch Download",archive:"Archive",zipDownload:"Download as ZIP",batchDownloaDDragAndDropHint:"Use drag and drop or the 'Send to Batch Download' option in the right-click menu to add images from other pages here. Multiple selections are supported.",lyco:"LyCORIS",sendToThirdPartyExtension:"Send to third-party extension",createFolder:"Create Folder",inputFolderName:"Input Folder Name",desktop:"Desktop",move:"Move",majorUpdateCustomCellSizeTips:'Major Update: You can now customize the size of the grid image. Adjust it in the global settings page or in the "More" menu in the upper right corner.',ImageBrowsingSettings:"Image Browsing Settings",other:"Other",livePreview:"Live Preview",gridCellWidth:"Grid Cell Width (px)",defaultGridCellWidth:"Default Grid Cell Width (px)",thumbnailResolution:"Thumbnail Resolution (px)",inputTargetFolderPath:"Enter the absolute path of the target folder",pathDoesNotExist:"Path does not exist",confirmToAddToExtraPath:"Are you sure you want to add? This may take a lot of time to index if the folder is large. ",clientSpecificSettings:"Client-specific settings",initiateSoftwareStartupConfig:"Initiate software startup configuration","tauriLaunchConf.readSdWebuiConfigTitle":"Read Stable Diffusion Webui Config","tauriLaunchConf.readSdWebuiConfigDescription":"If you have installed sd-webui and this extension, it is recommended to use this option to directly read the configuration and share data.","tauriLaunchConf.selectSdWebuiFolder":"Click to select the SD-webui folder","tauriLaunchConf.skipThisConfigTitle":"Skip This Configuration","tauriLaunchConf.skipThisConfigDescription":"All features will still be available and you can reset them in the settings page.","tauriLaunchConf.skipButton":"Skip","tauriLaunchConfMessages.configNotFound":"Cannot find the corresponding configuration. Please check if the selected folder is correct.","tauriLaunchConfMessages.folderNotFound":"Cannot find the corresponding folder. Please check if the selected folder is correct.","tauriLaunchConfMessages.configCompletedMessage":"Configuration completed. The application will restart shortly.","tauriLaunchConfMessages.firstTimeUserTitle":"It looks like this is your first time using the application. Some configuration is required.",selectAll:"Select All",close:"Close",fileName:"File Name",resolution:"Resolution",fileSize:"File Size",fullscreenview:"Fullscreen View",imgCompare:"Image Comparison",share:"Share",dragImageHere:"Drag image here",copyLocationUrlSuccessMsg:"Copy completed, you can directly open the current folder through the copied link",multiSelectTips:"You can hold down the Shift, Ctrl, or Cmd key and then click on files to perform batch delete/move operations",document:"Document",copy:"Copy",edit:"Edit",defaultSortingMethod:"Default Sorting Method",defaultViewMode:"Default View Mode",showPreviewImage:"Show Preview Image",dontShowAgain:"Don't show again",accessControlModeTips:"To ensure data security, you are currently running in access control mode, which only allows access to authorized folders. You can adjust the access permissions settings (IIB_ACCESS_CONTROL) by editing the .env file in the root directory of this extension. If the .env file does not exist, you can copy the .env.example file and rename it to .env.",changlog:"Change log",clear:"Clear",toggleTagSelection:'Toggle Selection of Tag "{tag}"',fullscreenRestriction:"Due to technical limitations, the first image cannot be deleted when opening the Full-screen view.",shortcutKey:"Keyboard Shortcuts (Only Available in Full-screen view mode)",shortcutKeyDescription:"Click on the input box and press the shortcut key you want to use, supporting combinations with Shift and Ctrl.",serverKeyRequired:"The server has configured a key. You must provide the same key to continue using it.",removeFromSearchScanPathAndQuickMove:"Remove from Search Scan Path and Quick Move",addToSearchScanPathAndQuickMove:"Add to Search Scan Path and Quick Move",openWithLocalFileBrowser:"Open with Local File Browser","fuzzy-search-noResults":"Nothing was found","fuzzy-search-placeholder":"Enter a part of the image information or filename to search","fuzzy-search":"Fuzzy search",autoUpdate:"Detected changes, automatically updating",faq:"FAQ",selectExactMatchTag:"Select Exact Match Tags",selectAnyMatchTag:"Optional, Select Any Match Tags",selectExcludeTag:"Optional, Select Exclude Tags",exactMatch:"Exact Match",anyMatch:"Match Any",exclude:"Exclude","auto.refreshed":"Auto refresh completed!",copied:"Copied!","index.expired":"Index expired, updating automatically",manualExitFullScreen:"You have deleted the last image and may need to manually exit Full-screen view","walk-mode-move-message":"Moving position is only allowed using 'Quick Move' in walk mode",refreshCompleted:"Refresh completed",addedTagToImage:'Tag "{tag}" has been added to this image',removedTagFromImage:'Tag "{tag}" has been removed from this image',openContextMenu:"Open context menu",copyPrompt:"Copy prompt",copyPositivePrompt:"Copy positive prompt",toggleTag:"Toggle Tag Selection (Favorite)",addCompleted:"Add completed",removeCompleted:"Remove Completed",existInOtherType:"Already exists in other type",alreadyExists:"Already exists",cancel:"Cancel",submit:"Submit",add:"Add",custom:"Custom",needGenerateIdx:`You need to click the button to generate an index for searching images. - This process may take a few minutes to complete.`,search:"Search",UpdateIndex:"Update index",generateIndexHint:"Generate index for search image",Model:"Model",Sampler:"Sampler",lora:"LoRA",size:"Size",pos:"Positive Prompt",unknownSavedDir:"Cannot find the saved folder (outdir_save field in the config)",errorOccurred:"An error occurred",useThumbnailPreview:"Use thumbnail preview",gridThumbnailWidth:"Grid thumbnail width",start:"Start",tip:"Tip",sortByDateAscending:"Updated date ascending",sortByDateDescending:"UPdated date descending",sortByCreatedDateAscending:"Created date ascending",sortByCreatedDateDescending:"Created date descending",sortByNameAscending:"Name ascending",sortByNameDescending:"Name descending",sortBySizeAscending:"Size ascending",sortBySizeDescending:"Size descending",inputAddressAndPressEnter:"Input address and press Enter",go:"Go",unknownError:"Unknown error",loadingNextFolder:"Loading files from the next folder",moveFailedCheckPath:"Move failed. Check your path input.",detailList:"Detail list",previewGrid:"Preview grid",moveSelectedFilesTo:"Move / Copy selected files to",confirm:"Confirm",download:"Download",local:"Local",sendImageFailed:"Failed to send image. Please contact the developer with the error message from the console.",confirmDelete:"Are you sure you want to delete?",deleteSuccess:"Deleted successfully",doubleClickToCopy:"Double-click to copy",root:"Root",drive:" drive",refresh:"Refresh",quickMove:"Quick move",more:"More",viewMode:"View mode",sortingMethod:"Sorting method",copyPath:"Copy path",deleteSelected:"Delete",previewInNewWindow:"Open in new window",copySourceFilePreviewLink:"Copy source file preview link",viewGenerationInfo:"View generation information (prompt, etc.)",sendToTxt2img:"Send to txt2img",sendToImg2img:"Send to img2img",sendToInpaint:"Send to Inpaint",sendToBatchDownload:"Send to BatchDownload",sendToExtraFeatures:"Send to Extra",sendToControlNet:"Send to ControlNet",loadNextPage:"Load next page",localFile:"Local file",globalSettings:"Global settings",welcome:"Welcome",openInNewWindow:"Open in new tab",restoreLastRecord:"Restore last record",launch:"Launch",walkMode:"Use Walk mode to browse images",launchFromQuickMove:"Launch from Quick Move",recent:"Recent",emptyStartPage:"Empty start page",t2i:"txt2img",i2i:"img2img",saveButtonSavesTo:"save",extra:"extras",gridImage:"Grid image","i2i-grid":"img2img grid",image:"Image","t2i-grid":"txt2img grid",workingFolder:"working folder",lang:"Language",langChangeReload:"Reload: Some changes may require a reload to take effect",openOnTheRight:"Open on the right",openInNewTab:"Open in a new tab",openWithWalkMode:"Open with Walk Mode",longPressOpenContextMenu:"Support long press to open right-click menu",searchResults:"Search Results",imgSearch:"Image Search",onlyFoldersAndImages:"Only show folders/images/videos",send2savedDir:"Send to saved folder"},yB={serverKeyRequired:"Für die weitere Nutzung ist die Eingabe eines Schlüssels erforderlich, der vom Server konfiguriert wurde.",removeFromSearchScanPathAndQuickMove:"Schnellzugriff entfernen",addToSearchScanPathAndQuickMove:"Schnellzugriff hinzufügen",openWithLocalFileBrowser:"Im lokalen Dateimanager öffnen","fuzzy-search-noResults":"Es wurde nichts gefunden","fuzzy-search-placeholder":"Geben Sie einen Teil der Bildinformationen oder des Dateinamens ein, um passende Ergebnisse zu finden","fuzzy-search":"Schnellsuche",autoUpdate:"Erkannte Änderungen, automatische Aktualisierung wird ausgeführt",faq:"FAQ",selectExactMatchTag:"Wähle Tags für exakte Übereinstimmung aus",selectAnyMatchTag:"(Optional) Wähle Tags für beliebige Übereinstimmung aus",selectExcludeTag:"(Optional) Wähle Tags zum Ausschliessen aus",exactMatch:"Exakte Übereinstimmung",anyMatch:"Beliebige Übereinstimmung",exclude:"Ausschliessen","auto.refreshed":"Automatische Aktualisierung erfolgreich durchgeführt!",copied:"In die Zwischenablage kopiert!","index.expired":"Index abgelaufen, automatische Aktualisierung wird durchgeführt",manualExitFullScreen:"Du hast das letzte Bild gelöscht und musst möglicherweise manuell den Vollbild-Vorschaumodus beenden","walk-mode-move-message":"Im Walk-Modus ist das Verschieben des Verzeichnisses nur über 'Schnellzugriff' gestattet",refreshCompleted:"Aktualisierung erfolgreich abgeschlossen",addedTagToImage:"Schlagwort wurde erfolgreich diesem Bild hinzugefügt",removedTagFromImage:"Schlagwort wurde von diesem Bild entfernt",openContextMenu:"Öffne das Kontextmenü",copyPrompt:"Kopiere Prompt-Konfiguration",toggleTag:"(Favorite) Schlagwort hinzufügen/entfernen",addCompleted:"Hinzufügen abgeschlossen",removeCompleted:"Entfernen abgeschlossen",existInOtherType:"Bereits in anderem Typ vorhanden",alreadyExists:"Bereits vorhanden",cancel:"Abbrechen",submit:"Bestätigen",add:"Hinzufügen",custom:"Benutzerdefiniert",needGenerateIdx:`Klicken Sie auf die Schaltfläche, um einen Index zur Bildersuche zu generieren. + This process may take a few minutes to complete.`,search:"Search",UpdateIndex:"Update index",generateIndexHint:"Generate index for search image",Model:"Model",Sampler:"Sampler",lora:"LoRA",size:"Size",pos:"Positive Prompt",unknownSavedDir:"Cannot find the saved folder (outdir_save field in the config)",errorOccurred:"An error occurred",useThumbnailPreview:"Use thumbnail preview",gridThumbnailWidth:"Grid thumbnail width",start:"Start",tip:"Tip",sortByDateAscending:"Updated date ascending",sortByDateDescending:"UPdated date descending",sortByCreatedDateAscending:"Created date ascending",sortByCreatedDateDescending:"Created date descending",sortByNameAscending:"Name ascending",sortByNameDescending:"Name descending",sortBySizeAscending:"Size ascending",sortBySizeDescending:"Size descending",inputAddressAndPressEnter:"Input address and press Enter",go:"Go",unknownError:"Unknown error",loadingNextFolder:"Loading files from the next folder",moveFailedCheckPath:"Move failed. Check your path input.",detailList:"Detail list",previewGrid:"Preview grid",moveSelectedFilesTo:"Move / Copy selected files to",confirm:"Confirm",download:"Download",local:"Local",sendImageFailed:"Failed to send image. Please contact the developer with the error message from the console.",confirmDelete:"Are you sure you want to delete?",deleteSuccess:"Deleted successfully",doubleClickToCopy:"Double-click to copy",root:"Root",drive:" drive",refresh:"Refresh",quickMove:"Quick move",more:"More",viewMode:"View mode",sortingMethod:"Sorting method",copyPath:"Copy path",deleteSelected:"Delete",previewInNewWindow:"Open in new window",copySourceFilePreviewLink:"Copy source file preview link",viewGenerationInfo:"View generation information (prompt, etc.)",sendToTxt2img:"Send to txt2img",sendToImg2img:"Send to img2img",sendToInpaint:"Send to Inpaint",sendToBatchDownload:"Send to BatchDownload",sendToExtraFeatures:"Send to Extra",sendToControlNet:"Send to ControlNet",loadNextPage:"Load next page",localFile:"Local file",globalSettings:"Global settings",welcome:"Welcome",openInNewWindow:"Open in new tab",restoreLastRecord:"Restore last record",launch:"Launch",walkMode:"Use Walk mode to browse images",launchFromQuickMove:"Launch from Quick Move",recent:"Recent",emptyStartPage:"Empty start page",t2i:"txt2img",i2i:"img2img",saveButtonSavesTo:"save",extra:"extras",gridImage:"Grid image","i2i-grid":"img2img grid",image:"Image","t2i-grid":"txt2img grid",workingFolder:"working folder",lang:"Language",langChangeReload:"Reload: Some changes may require a reload to take effect",openOnTheRight:"Open on the right",openInNewTab:"Open in a new tab",openWithWalkMode:"Open with Walk Mode",longPressOpenContextMenu:"Support long press to open right-click menu",searchResults:"Search Results",imgSearch:"Image Search",onlyFoldersAndImages:"Only show folders/images/videos",send2savedDir:"Send to saved folder",regexSearchEnabledHint:"(You can also enable regex search by clicking the regex icon on the right)"},yB={serverKeyRequired:"Für die weitere Nutzung ist die Eingabe eines Schlüssels erforderlich, der vom Server konfiguriert wurde.",removeFromSearchScanPathAndQuickMove:"Schnellzugriff entfernen",addToSearchScanPathAndQuickMove:"Schnellzugriff hinzufügen",openWithLocalFileBrowser:"Im lokalen Dateimanager öffnen","fuzzy-search-noResults":"Es wurde nichts gefunden","fuzzy-search-placeholder":"Geben Sie einen Teil der Bildinformationen oder des Dateinamens ein, um passende Ergebnisse zu finden","fuzzy-search":"Schnellsuche",autoUpdate:"Erkannte Änderungen, automatische Aktualisierung wird ausgeführt",faq:"FAQ",selectExactMatchTag:"Wähle Tags für exakte Übereinstimmung aus",selectAnyMatchTag:"(Optional) Wähle Tags für beliebige Übereinstimmung aus",selectExcludeTag:"(Optional) Wähle Tags zum Ausschliessen aus",exactMatch:"Exakte Übereinstimmung",anyMatch:"Beliebige Übereinstimmung",exclude:"Ausschliessen","auto.refreshed":"Automatische Aktualisierung erfolgreich durchgeführt!",copied:"In die Zwischenablage kopiert!","index.expired":"Index abgelaufen, automatische Aktualisierung wird durchgeführt",manualExitFullScreen:"Du hast das letzte Bild gelöscht und musst möglicherweise manuell den Vollbild-Vorschaumodus beenden","walk-mode-move-message":"Im Walk-Modus ist das Verschieben des Verzeichnisses nur über 'Schnellzugriff' gestattet",refreshCompleted:"Aktualisierung erfolgreich abgeschlossen",addedTagToImage:"Schlagwort wurde erfolgreich diesem Bild hinzugefügt",removedTagFromImage:"Schlagwort wurde von diesem Bild entfernt",openContextMenu:"Öffne das Kontextmenü",copyPrompt:"Kopiere Prompt-Konfiguration",toggleTag:"(Favorite) Schlagwort hinzufügen/entfernen",addCompleted:"Hinzufügen abgeschlossen",removeCompleted:"Entfernen abgeschlossen",existInOtherType:"Bereits in anderem Typ vorhanden",alreadyExists:"Bereits vorhanden",cancel:"Abbrechen",submit:"Bestätigen",add:"Hinzufügen",custom:"Benutzerdefiniert",needGenerateIdx:`Klicken Sie auf die Schaltfläche, um einen Index zur Bildersuche zu generieren. Dieser Vorgang kann einige Minuten in Anspruch nehmen.`,search:"Suchen",UpdateIndex:"Index aktualisieren",generateIndexHint:"Index für die Bildersuche generieren",Model:"Modell",Sampler:"Sampler",lora:"LoRA",size:"Grösse",pos:"Positiver Prompt",unknownSavedDir:"Das Speicherverzeichnis konnte nicht gefunden werden (Einstellung für das Speicherverzeichnis in der Konfiguration)",errorOccurred:"Ein Fehler ist aufgetreten",useThumbnailPreview:"Verwende Miniaturansichtsvorschau",gridThumbnailWidth:"Breite der Miniatur-Rasteransicht",start:"Start",tip:"Hinweis",sortByDateAscending:"Datum aufsteigend",sortByDateDescending:"Datum absteigend",sortByCreatedDateAscending:"Erstellungsdatum aufsteigend",sortByCreatedDateDescending:"Erstellungsdatum absteigend",sortByNameAscending:"Name aufsteigend",sortByNameDescending:"Name absteigend",sortBySizeAscending:"Grösse aufsteigend",sortBySizeDescending:"Grösse absteigend",inputAddressAndPressEnter:"Geben Sie die Adresse ein und drücken Sie Enter",go:"Los",unknownError:"Unbekannter Fehler aufgetreten",loadingNextFolder:"Lade Dateien aus dem nächsten Verzeichnis",moveFailedCheckPath:`Fehler beim Verschieben. Überprüfen Sie den eingegebenen Pfad. `,detailList:"Detailübersicht",previewGrid:"Vorschau-Rasteransicht",moveSelectedFilesTo:"Ausgewählte Dateien verschieben nach",confirm:"Bestätigen",download:"Herunterladen",local:"Lokal",sendImageFailed:"Fehler beim Senden des Bildes. Bitte kontaktieren Sie den Entwickler mit der Fehlermeldung aus der Konsole.",confirmDelete:"Sind Sie sicher, dass Sie dies löschen möchten?",deleteSuccess:"Erfolgreich gelöscht",doubleClickToCopy:"Doppelklick zum Kopieren",root:"Root",drive:" Laufwerk",refresh:"Aktualisieren",quickMove:"Schnellzugriff",more:"Mehr",viewMode:"Ansichtsmodus",sortingMethod:"Sortiermethode",copyPath:"Pfad kopieren",deleteSelected:"Löschen",previewInNewWindow:"In neuem Fenster öffnen",copySourceFilePreviewLink:"Kopiere Dateilink aus dem Verzeichnis",viewGenerationInfo:"Anzeige von Generierungsinformationen (Prompt, etc.)",sendToTxt2img:"Senden an Text-zu-Bild",sendToImg2img:"Senden an Bild-zu-Bild",sendToInpaint:"Senden an Inpaint",sendToExtraFeatures:"Senden an Extras",sendToControlNet:"Senden an ControlNet",loadNextPage:"Nächste Seite laden",localFile:"Lokale Datei",globalSettings:"Globale Einstellungen",welcome:"Willkommen",openInNewWindow:"In neuem Fenster öffnen",restoreLastRecord:"Letztes Verzeichnis wiederherstellen",launch:"Ausführen",walkMode:"Verwende den Walk-Modus, um Bilder zu durchsuchen",launchFromQuickMove:"Ausführen aus Schnellzugriff",recent:"Kürzlich",emptyStartPage:"Leere Startseite",t2i:"Text-zu-Bild",i2i:"Bild-zu-Bild",saveButtonSavesTo:"Speichern",extra:"Extras",gridImage:"Rasterbild","i2i-grid":"Bild-zu-Bild Raster",image:"Bild","t2i-grid":"Text-zu-Bild Raster",workingFolder:"Arbeitsordner",lang:"Sprache",langChangeReload:"Neuladen: Einige Änderungen erfordern ein Neuladen, um wirksam zu werden",openOnTheRight:"Rechts öffnen",openInNewTab:"In neuem Tab öffnen",openWithWalkMode:"Im Walk-Modus öffnen",longPressOpenContextMenu:"Langes Rechtsklicken zur Öffnung des Kontextmenüs unterstützen",searchResults:"Suchergebnisse",imgSearch:"Bildsuche",send2savedDir:"In den gespeicherten Ordner senden"},bB={errorOccurred:"發生了個錯誤",useThumbnailPreview:"使用縮圖預覽",gridThumbnailWidth:"網格縮圖寬度",start:"開始",tip:"提示",sortByDateAscending:"修改日期昇序",sortByDateDescending:"修改日期降序",sortByCreatedDateAscending:"創建日期昇序",sortByCreatedDateDescending:"創建日期降序",sortByNameAscending:"名稱昇序",sortByNameDescending:"名稱降序",sortBySizeAscending:"大小昇序",sortBySizeDescending:"大小降序",inputAddressAndPressEnter:"輸入地址回車",go:"前往",unknownError:"未知錯誤",loadingNextFolder:"即將載入下一個文件夾的文件",moveFailedCheckPath:"移動失敗,檢查你的路徑輸入",detailList:"詳情列表",previewGrid:"預覽網格",moveSelectedFilesTo:"下列文件 移動 / 複製 至",confirm:"確定",download:"下載",local:"本地",sendImageFailed:"發送圖像失敗,請攜帶console的錯誤訊息找開發者",confirmDelete:"確認刪除?",deleteSuccess:"刪除成功",doubleClickToCopy:"雙擊複製",root:"根",drive:"磁碟",refresh:"重新整理",quickMove:"快速移動",more:"更多",viewMode:"檢視模式",sortingMethod:"排序方法",copyPath:"複製路徑",deleteSelected:"刪除",previewInNewWindow:"在新窗口預覽",copySourceFilePreviewLink:"複製源文件預覽連結",viewGenerationInfo:"檢視生成信息(提示等)",sendToTxt2img:"发送到文生圖",sendToImg2img:"發送到圖生圖",sendToInpaint:"發送到局部重繪",sendToControlNet:"發送到ControlNet",sendToBatchDownload:"發送到批量下載",sendToExtraFeatures:"發送到附加功能",loadNextPage:"載入下一頁",localFile:"本地檔案",globalSettings:"全域設定",welcome:"歡迎",openInNewWindow:"在新頁面打開",restoreLastRecord:"還原上次記錄",launch:"啟動",walkMode:"使用 Walk 模式瀏覽圖片",launchFromQuickMove:"從快速移動啟動",recent:"最近",emptyStartPage:"空啟動頁",t2i:"文生圖",i2i:"圖生圖",saveButtonSavesTo:"儲存",extra:"附加",gridImage:"網格式圖","i2i-grid":"圖生圖網格",image:"圖片","t2i-grid":"文生圖網格",workingFolder:"工作文件夾",lang:"語言",langChangeReload:"重新載入: 一些變化可能需要在重新載入後生效",openOnTheRight:"在右邊打開",openInNewTab:"在新分頁打開",openWithWalkMode:"使用 Walk 模式打開",longPressOpenContextMenu:"支持使用長按打開右鍵功能表",searchResults:"搜尋結果",imgSearch:"圖片搜尋",onlyFoldersAndImages:"只顯示文件夾/圖片/視頻",send2savedDir:"發送到儲存的文件夾",unknownSavedDir:"找不到儲存的文件夾(配置文件中的outdir_save欄位)",Model:"模型",Sampler:"採樣器",lora:"LoRA",size:"尺寸",pos:"正面提示",generateIndexHint:"生成索引用於搜尋圖片",UpdateIndex:"更新索引",needGenerateIdx:`你需要先點擊按鈕生成索引用於搜尋圖片 -這個過程可能需要消耗幾分鐘`,search:"搜尋",custom:"自定義",add:"新增",cancel:"取消",submit:"提交",existInOtherType:"已存在於其他類型",alreadyExists:"已存在",toggleTag:"切換標籤選中 (收藏)",addCompleted:"新增完成",removeCompleted:"移除完成",addedTagToImage:'已添加標籤 "{tag}" 到本圖片',removedTagFromImage:'已從本圖片上移除 "{tag}" 標籤',openContextMenu:"打開上下文功能表",copyPrompt:"複製提示",copyPositivePrompt:"複製正向提示",refreshCompleted:"重新整理完成","walk-mode-move-message":"在walk模式下僅允許使用“快速移動”移動位置",manualExitFullScreen:"你刪除了最後一張圖片,也許需要你手動退出全螢幕檢視",copied:"已複製!","index.expired":"索引過期,正在自動更新","auto.refreshed":"自動重新整理完成!",exactMatch:"完全匹配",anyMatch:"匹配任意",exclude:"排除掉",selectExactMatchTag:"選擇完全匹配的 Tag",selectAnyMatchTag:"可選,選擇匹配其中一個或多個的 Tag",selectExcludeTag:"可選,選擇需要排除掉的 Tag",faq:"常見問題",autoUpdate:"檢測到發生改變自動更新","fuzzy-search":"模糊搜尋","fuzzy-search-placeholder":"輸入圖片信息或者文件名的一部分來進行搜尋","fuzzy-search-noResults":"什麼都沒找到",openWithLocalFileBrowser:"使用本地檔案瀏覽器打開",addToSearchScanPathAndQuickMove:"加入搜尋掃描路徑和快速移動",removeFromSearchScanPathAndQuickMove:"從搜尋掃描路徑和快速移動中移除",serverKeyRequired:"伺服器配置了密鑰,你必须提供相同的密鑰才能繼續使用",shortcutKey:"快速鍵(僅允許在全螢幕檢視下使用)",shortcutKeyDescription:"點擊輸入框按下你想使用的按鍵,支持與Shift和Ctrl進行組合",fullscreenRestriction:"受技術限制,目前拓展不允許刪除打開全螢幕檢視時的首張圖片。",clear:"清除",toggleTagSelection:'切換 "{tag}" 標籤選中',changlog:"更新紀錄",accessControlModeTips:"為確保數據安全,您目前正以訪問控制模式運行,僅能訪問授權文件夾。您可以通過編輯本拓展根目錄的下.env文件來調整訪問權限設置 (IIB_ACCESS_CONTROL) .如果不存在.env文件, 你可以將.env.example文件複製並重命名為.env",dontShowAgain:"不再顯示",defaultSortingMethod:"默認排序方法",defaultViewMode:"默認檢視模式",showPreviewImage:"顯示預覽圖",copy:"複製",edit:"編輯",document:"文件",multiSelectTips:"您可以按住Shift、Ctrl或 Cmd鍵,然後單擊文件來進行多選刪除/移動操作",copyLocationUrlSuccessMsg:"複製完成,你可以通過複製的url直接打開目前文件夾",share:"分享",dragImageHere:"拖拽圖片到這裡",imgCompare:"圖片對比",close:"關閉",fullscreenview:"全屏查看",fileName:"文件名稱",resolution:"解析度",fileSize:"文件大小",selectAll:"全選","tauriLaunchConf.readSdWebuiConfigTitle":"讀取Stable Diffusion Webui的配置","tauriLaunchConf.readSdWebuiConfigDescription":"如果你已經安裝sd-webui,且在sd-webui內安裝了本拓展,推薦直接使用這個,將直接讀取配置並且數據共享","tauriLaunchConf.selectSdWebuiFolder":"點擊選擇SD-webui的文件夾","tauriLaunchConf.skipThisConfigTitle":"跳過本次配置","tauriLaunchConf.skipThisConfigDescription":"所有功能仍將可用,你可以在設置頁重置","tauriLaunchConf.skipButton":"跳過","tauriLaunchConfMessages.configNotFound":"找不到對應配置,檢查選擇的文件夾是否正確","tauriLaunchConfMessages.folderNotFound":"找不到對應文件夾,檢查選擇的文件夾是否正確","tauriLaunchConfMessages.configCompletedMessage":"配置完成,即將重啟","tauriLaunchConfMessages.firstTimeUserTitle":"看起來你好像是第一次使用,需要進行一些配置",inputTargetFolderPath:"輸入目標文件夾的絕對路徑",pathDoesNotExist:"路徑不存在",confirmToAddToExtraPath:"確定添加?如果文件夾過大將會消耗過多時間建立索引。",clientSpecificSettings:"客戶端特有的設置",initiateSoftwareStartupConfig:"初始化軟件啟動配置",gridCellWidth:"網格單元寬度 (px)",defaultGridCellWidth:"默認網格單元寬度 (px)",thumbnailResolution:"縮圖解析度 (px)",livePreview:"實時預覽",other:"其他",ImageBrowsingSettings:"圖片瀏覽設置",majorUpdateCustomCellSizeTips:"重大更新:你可以自定義網格圖像的大小了,在全域設置頁或者右上角的“更多”裡面進行調整",desktop:"桌面",move:"移動",inputFolderName:"輸入文件夾名稱",createFolder:"新增文件夾",sendToThirdPartyExtension:"發送到第三方拓展",lyco:"LyCORIS",batchDownloaDDragAndDropHint:"使用拖拽或者右鍵功能表中的“發送到批量下載”將其他頁面的圖片添加到這裡,支持多選",zipDownload:"打包成zip下載",archive:"歸檔",batchDownload:"批量下載",remove:"移除",secretKeyRequiredWarnMsg:"為了安全考慮,你必須為本拓展單獨配置Secret Key,具體參考本拓展根目錄下的.env.example文件內的IIB_SECRET_KEY。 這項警告只會在配置了gradio-auth時出現",secretKeyMustBeConfigured:"必須配置Secret Key",deleteOneOnlySkipConfirm:"刪除單個文件時不進行確認",resetOnGlobalSettingsPage:"你可以在全域設置頁重置",privacyAndSecurity:"安全與隱私",dragToResizePanel:"按住並拖動來調整面板的大小",clickToToggleMaximizeMinimize:"單擊切換最大化/最小化",dragToMovePanel:"按住並拖動來移動面板",imageCompareTips:"拖拽文件時也會出現這個面板,可以不需要打開 “圖片對比” 功能"},X1=()=>{const t=navigator.language.toLowerCase();if(t.startsWith("zh"))return/hk|tw|mo/.test(t)?"zhHant":"zhHans";switch(t){case"de":case"de-de":return"de";default:return"en"}},wv=iB({locale:X1(),fallbackLocale:"en",messages:{zhHans:hy,zhHant:bB,zh:hy,en:gB,de:yB},legacy:!1}),{t:ke,locale:S9}=wv.global;/*! js-cookie v3.0.5 | MIT */function yl(t){for(var e=1;e"u")){o=yl({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var s in o)o[s]&&(l+="; "+s,o[s]!==!0&&(l+="="+o[s].split(";")[0]));return document.cookie=a+"="+t.write(i,a)+l}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var i=document.cookie?document.cookie.split("; "):[],o={},l=0;l{const t=new Cv;return{eventEmitter:t,useEventListen:(n,r)=>{t.on(n,r),Qe(()=>t.off(n,r))}}};/*! ***************************************************************************** +這個過程可能需要消耗幾分鐘`,search:"搜尋",custom:"自定義",add:"新增",cancel:"取消",submit:"提交",existInOtherType:"已存在於其他類型",alreadyExists:"已存在",toggleTag:"切換標籤選中 (收藏)",addCompleted:"新增完成",removeCompleted:"移除完成",addedTagToImage:'已添加標籤 "{tag}" 到本圖片',removedTagFromImage:'已從本圖片上移除 "{tag}" 標籤',openContextMenu:"打開上下文功能表",copyPrompt:"複製提示",copyPositivePrompt:"複製正向提示",refreshCompleted:"重新整理完成","walk-mode-move-message":"在walk模式下僅允許使用“快速移動”移動位置",manualExitFullScreen:"你刪除了最後一張圖片,也許需要你手動退出全螢幕檢視",copied:"已複製!","index.expired":"索引過期,正在自動更新","auto.refreshed":"自動重新整理完成!",exactMatch:"完全匹配",anyMatch:"匹配任意",exclude:"排除掉",selectExactMatchTag:"選擇完全匹配的 Tag",selectAnyMatchTag:"可選,選擇匹配其中一個或多個的 Tag",selectExcludeTag:"可選,選擇需要排除掉的 Tag",faq:"常見問題",autoUpdate:"檢測到發生改變自動更新","fuzzy-search":"模糊搜尋","fuzzy-search-placeholder":"輸入圖片信息或者文件名的一部分來進行搜尋","fuzzy-search-noResults":"什麼都沒找到",openWithLocalFileBrowser:"使用本地檔案瀏覽器打開",addToSearchScanPathAndQuickMove:"加入搜尋掃描路徑和快速移動",removeFromSearchScanPathAndQuickMove:"從搜尋掃描路徑和快速移動中移除",serverKeyRequired:"伺服器配置了密鑰,你必须提供相同的密鑰才能繼續使用",shortcutKey:"快速鍵(僅允許在全螢幕檢視下使用)",shortcutKeyDescription:"點擊輸入框按下你想使用的按鍵,支持與Shift和Ctrl進行組合",fullscreenRestriction:"受技術限制,目前拓展不允許刪除打開全螢幕檢視時的首張圖片。",clear:"清除",toggleTagSelection:'切換 "{tag}" 標籤選中',changlog:"更新紀錄",accessControlModeTips:"為確保數據安全,您目前正以訪問控制模式運行,僅能訪問授權文件夾。您可以通過編輯本拓展根目錄的下.env文件來調整訪問權限設置 (IIB_ACCESS_CONTROL) .如果不存在.env文件, 你可以將.env.example文件複製並重命名為.env",dontShowAgain:"不再顯示",defaultSortingMethod:"默認排序方法",defaultViewMode:"默認檢視模式",showPreviewImage:"顯示預覽圖",copy:"複製",edit:"編輯",document:"文件",multiSelectTips:"您可以按住Shift、Ctrl或 Cmd鍵,然後單擊文件來進行多選刪除/移動操作",copyLocationUrlSuccessMsg:"複製完成,你可以通過複製的url直接打開目前文件夾",share:"分享",dragImageHere:"拖拽圖片到這裡",imgCompare:"圖片對比",close:"關閉",fullscreenview:"全屏查看",fileName:"文件名稱",resolution:"解析度",fileSize:"文件大小",selectAll:"全選","tauriLaunchConf.readSdWebuiConfigTitle":"讀取Stable Diffusion Webui的配置","tauriLaunchConf.readSdWebuiConfigDescription":"如果你已經安裝sd-webui,且在sd-webui內安裝了本拓展,推薦直接使用這個,將直接讀取配置並且數據共享","tauriLaunchConf.selectSdWebuiFolder":"點擊選擇SD-webui的文件夾","tauriLaunchConf.skipThisConfigTitle":"跳過本次配置","tauriLaunchConf.skipThisConfigDescription":"所有功能仍將可用,你可以在設置頁重置","tauriLaunchConf.skipButton":"跳過","tauriLaunchConfMessages.configNotFound":"找不到對應配置,檢查選擇的文件夾是否正確","tauriLaunchConfMessages.folderNotFound":"找不到對應文件夾,檢查選擇的文件夾是否正確","tauriLaunchConfMessages.configCompletedMessage":"配置完成,即將重啟","tauriLaunchConfMessages.firstTimeUserTitle":"看起來你好像是第一次使用,需要進行一些配置",inputTargetFolderPath:"輸入目標文件夾的絕對路徑",pathDoesNotExist:"路徑不存在",confirmToAddToExtraPath:"確定添加?如果文件夾過大將會消耗過多時間建立索引。",clientSpecificSettings:"客戶端特有的設置",initiateSoftwareStartupConfig:"初始化軟件啟動配置",gridCellWidth:"網格單元寬度 (px)",defaultGridCellWidth:"默認網格單元寬度 (px)",thumbnailResolution:"縮圖解析度 (px)",livePreview:"實時預覽",other:"其他",ImageBrowsingSettings:"圖片瀏覽設置",majorUpdateCustomCellSizeTips:"重大更新:你可以自定義網格圖像的大小了,在全域設置頁或者右上角的“更多”裡面進行調整",desktop:"桌面",move:"移動",inputFolderName:"輸入文件夾名稱",createFolder:"新增文件夾",sendToThirdPartyExtension:"發送到第三方拓展",lyco:"LyCORIS",batchDownloaDDragAndDropHint:"使用拖拽或者右鍵功能表中的“發送到批量下載”將其他頁面的圖片添加到這裡,支持多選",zipDownload:"打包成zip下載",archive:"歸檔",batchDownload:"批量下載",remove:"移除",secretKeyRequiredWarnMsg:"為了安全考慮,你必須為本拓展單獨配置Secret Key,具體參考本拓展根目錄下的.env.example文件內的IIB_SECRET_KEY。 這項警告只會在配置了gradio-auth時出現",secretKeyMustBeConfigured:"必須配置Secret Key",deleteOneOnlySkipConfirm:"刪除單個文件時不進行確認",resetOnGlobalSettingsPage:"你可以在全域設置頁重置",privacyAndSecurity:"安全與隱私",dragToResizePanel:"按住並拖動來調整面板的大小",clickToToggleMaximizeMinimize:"單擊切換最大化/最小化",dragToMovePanel:"按住並拖動來移動面板",imageCompareTips:"拖拽文件時也會出現這個面板,可以不需要打開 “圖片對比” 功能",regexSearchEnabledHint:"(你也可以通過點擊右側的正則式圖標來啟用正則式搜索)"},X1=()=>{const t=navigator.language.toLowerCase();if(t.startsWith("zh"))return/hk|tw|mo/.test(t)?"zhHant":"zhHans";switch(t){case"de":case"de-de":return"de";default:return"en"}},wv=iB({locale:X1(),fallbackLocale:"en",messages:{zhHans:hy,zhHant:bB,zh:hy,en:gB,de:yB},legacy:!1}),{t:ke,locale:S9}=wv.global;/*! js-cookie v3.0.5 | MIT */function yl(t){for(var e=1;e"u")){o=yl({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var s in o)o[s]&&(l+="; "+s,o[s]!==!0&&(l+="="+o[s].split(";")[0]));return document.cookie=a+"="+t.write(i,a)+l}}function r(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var i=document.cookie?document.cookie.split("; "):[],o={},l=0;l{const t=new Cv;return{eventEmitter:t,useEventListen:(n,r)=>{t.on(n,r),Qe(()=>t.off(n,r))}}};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -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 ez(){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&&!Zj?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 tz=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 nz=Symbol();function rz(t){return!yf(t)||!t.hasOwnProperty(nz)}const{assign:Rr}=Object;function az(t){return!!(tt(t)&&t.effect)}function iz(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||tz,E=r._e.run(()=>(o=Ef(),_(()=>o.run(e))));for(const I in E){const P=E[I];if(tt(P)&&!az(P)||wr(P))i||(c&&rz(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=Ix();return l=l||(u?Xe(A_,null):null),l&&su(l),l=I_,l._s.has(r)||(i?k_(r,e,a,l):iz(r,a,l)),l._s.get(r)}return o.$id=r,o}function oz(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 lz=t=>Yc({...t,name:typeof t.name=="string"?t.name:t.nameFallbackStr??""}),sz=t=>({...t,panes:t.panes.map(lz)}),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(sz);((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:"",download:""}),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)}`,uz=t=>typeof t=="object"&&t.__id==="FileTransferData",cz=t=>{var n;const e=JSON.parse(((n=t.dataTransfer)==null?void 0:n.getData("text"))??"{}");return uz(e)?e:null},W9=t=>Z1(t,"fullpath");function $_(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 fz(t){var r;if(typeof t!="string")return!1;const e=[".mp4",".avi",".mov",".mkv"],n=(r=t.split(".").pop())==null?void 0:r.toLowerCase();return n!==void 0&&e.includes(`.${n}`)}const V9=t=>$_(t)||fz(t);function H9(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 R_(){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 dz=()=>{const t=R_().querySelectorAll("#tabs > .tabitem[id^=tab_]");return Array.from(t).findIndex(e=>e.id.includes("infinite-image-browsing"))},vz=()=>{try{R_().querySelector("#tabs").querySelectorAll("button")[dz()].click()}catch(t){console.error(t)}},pz=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()}),hz=(t,...e)=>e.reduce((n,r)=>(n[r]=t==null?void 0:t[r],n),{}),mz=()=>rt(new Io(-1,0,-1,"throw")),U9=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:L_}=Q1();function K9(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 gz(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 yz=t=>new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=a=>n(a),r.src=t}),bz=t=>{try{return JSON.parse(t)}catch{return null}};function wz(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=wz(t)?t:di(Cz(e,t));return di(n)},G9=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={...hz(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]=_z(o[g],e)}catch(c){console.error(c)}});const l=await Xj(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 D_={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())}},Sz=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},xz={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 Pz(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=Sz(xz,[["render",Pz]]);function Mv(t){return Of()?(qy(t),!0):!1}function kv(t){return typeof t=="function"?t():xe(t)}const F_=typeof window<"u",Nv=()=>{};function Ez(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 B_=t=>t();function Oz(t=B_){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 Tz(...t){if(t.length!==1)return Kt(...t);const e=t[0];return typeof e=="function"?ws(VS(()=>({get:e,set:Nv}))):W(e)}function Iz(t,e=!0){bt()?Re(t):e?t():Ke(t)}var Ty=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,Mz=Object.prototype.propertyIsEnumerable,kz=(t,e)=>{var n={};for(var r in t)Az.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&&Mz.call(t,r)&&(n[r]=t[r]);return n};function Nz(t,e,n={}){const r=n,{eventFilter:a=B_}=r,i=kz(r,["eventFilter"]);return pe(t,Ez(a,e),i)}var $z=Object.defineProperty,Rz=Object.defineProperties,Lz=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,j_=Object.prototype.hasOwnProperty,z_=Object.prototype.propertyIsEnumerable,Iy=(t,e,n)=>e in t?$z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dz=(t,e)=>{for(var n in e||(e={}))j_.call(e,n)&&Iy(t,n,e[n]);if(ps)for(var n of ps(e))z_.call(e,n)&&Iy(t,n,e[n]);return t},Fz=(t,e)=>Rz(t,Lz(e)),Bz=(t,e)=>{var n={};for(var r in t)j_.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&&z_.call(t,r)&&(n[r]=t[r]);return n};function jz(t,e,n={}){const r=n,{eventFilter:a}=r,i=Bz(r,["eventFilter"]),{eventFilter:o,pause:l,resume:s,isActive:u}=Oz(a);return{stop:Nz(t,e,Fz(Dz({},i),{eventFilter:o})),pause:l,resume:s,isActive:u}}function zz(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=F_?window:void 0,Wz=F_?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 Vz=500;function q9(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:Vz))}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 Hz(){const t=W(!1);return bt()&&Re(()=>{t.value=!0}),t}function W_(t){const e=Hz();return K(()=>(e.value,!!t()))}function Uz(t,e={}){const{window:n=Sr}=e,r=W_(()=>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(Tz(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__",Kz=Gz();function Gz(){return Cl in wl||(wl[Cl]=wl[Cl]||{}),wl[Cl]}function qz(t,e){return Kz[t]||e}function Yz(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 Xz=Object.defineProperty,Ay=Object.getOwnPropertySymbols,Jz=Object.prototype.hasOwnProperty,Qz=Object.prototype.propertyIsEnumerable,My=(t,e,n)=>e in t?Xz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ky=(t,e)=>{for(var n in e||(e={}))Jz.call(e,n)&&My(t,n,e[n]);if(Ay)for(var n of Ay(e))Qz.call(e,n)&&My(t,n,e[n]);return t};const Zz={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 e7(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=qz("getDefaultStorage",()=>{var I;return(I=Sr)==null?void 0:I.localStorage})()}catch(I){g(I)}if(!n)return c;const d=kv(e),m=Yz(d),h=(a=r.serializer)!=null?a:Zz[m],{pause:y,resume:b}=jz(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 t7(t){return Uz("(prefers-color-scheme: dark)",t)}function n7({document:t=Wz}={}){if(!t)return W("visible");const e=W(t.visibilityState);return Pn(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var $y=Object.getOwnPropertySymbols,r7=Object.prototype.hasOwnProperty,a7=Object.prototype.propertyIsEnumerable,i7=(t,e)=>{var n={};for(var r in t)r7.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&&a7.call(t,r)&&(n[r]=t[r]);return n};function o7(t,e,n={}){const r=n,{window:a=Sr}=r,i=i7(r,["window"]);let o;const l=W_(()=>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 l7(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 o7(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 Y9(t,e,n={}){const{window:r=Sr}=n;return e7(t,e,r==null?void 0:r.localStorage,n)}const s7={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 u7(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:s7[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}=u7(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 c7={style:{position:"relative"}},f7=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=bz(((g=f.dataTransfer)==null?void 0:g.getData("text"))??"{}");if(p&&(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",c7,[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},d7=uu(f7,[["__scopeId","data-v-1f3b5d72"]]);const V_=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}}),v7=t=>(hb("data-v-279a61df"),t=t(),mb(),t),p7={key:0,class:"dragging-port-wrap"},h7={class:"content"},m7={key:0,class:"img-wrap"},g7={key:1},y7=v7(()=>xn("div",{style:{padding:"16px"}},null,-1)),b7={key:0,class:"img-wrap"},w7={key:1},C7={key:0,class:"tips",style:{"max-width":"30vw"}},_7={class:"actions"},S7=fe({__name:"DraggingPort",setup(t){const e=V_(),n=Wo(),{left:r,right:a}=oz(e),i=async(s,u)=>{const f=cz(s);if(f){const v=f.nodes[0];if(!$_(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=CF,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",p7,[xn("h2",null,qn(s.$t("imgCompare")),1),xn("div",h7,[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",m7,[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",g7,qn(s.$t("dragImageHere")),1))],32),y7,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",b7,[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",w7,qn(s.$t("dragImageHere")),1))],32)]),xe(e).opened?(Ye(),an("p",C7," Tips: "+qn(s.$t("imageCompareTips")),1)):pa("",!0),xn("div",_7,[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 x7=uu(S7,[["__scopeId","data-v-279a61df"]]),P7={class:"container"},E7=["src"],O7=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",P7,[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,E7)]))}});const Ly=uu(O7,[["__scopeId","data-v-65d66859"]]),T7=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}=l7(i);e({requestFullScreen:()=>{var u;(u=i.value)==null||u.requestFullscreen()}});const s=zz(async()=>{if(!n.left)return"width";const u=await yz(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(D_),{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 I7={class:"actions"},A7=fe({__name:"ImgSliDrawer",setup(t){const e=V_(),n=W();return(r,a)=>{const i=Tn,o=p4;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",I7,[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(T7,{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(x7)],64)}}});const M7=fe({__name:"SplitViewTab",setup(t){const e=Wo(),n={local:Ir(()=>mr(()=>import("./stackView-ddc0c403.js"),["assets/stackView-ddc0c403.js","assets/fullScreenContextMenu-9e3be5a3.js","assets/FileItem-ced5f921.js","assets/db-8d04be33.js","assets/shortcut-dae64d46.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.css","assets/fullScreenContextMenu-73df97d0.css","assets/numInput-be9a0500.js","assets/numInput-a08c6857.css","assets/stackView-6a9bcb83.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),empty:Ir(()=>mr(()=>import("./emptyStartup-06d4c63f.js"),["assets/emptyStartup-06d4c63f.js","assets/db-8d04be33.js","assets/emptyStartup-f9353e31.css"])),"global-setting":Ir(()=>mr(()=>import("./globalSetting-5ce174c1.js"),["assets/globalSetting-5ce174c1.js","assets/numInput-be9a0500.js","assets/shortcut-dae64d46.js","assets/shortcut-9fed83c2.css","assets/numInput-a08c6857.css","assets/globalSetting-40971f83.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"tag-search-matched-image-grid":Ir(()=>mr(()=>import("./MatchedImageGrid-2899eea8.js"),["assets/MatchedImageGrid-2899eea8.js","assets/fullScreenContextMenu-9e3be5a3.js","assets/FileItem-ced5f921.js","assets/db-8d04be33.js","assets/shortcut-dae64d46.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.css","assets/fullScreenContextMenu-73df97d0.css","assets/hook-9c9eb74d.js","assets/MatchedImageGrid-4f83f417.css"])),"tag-search":Ir(()=>mr(()=>import("./TagSearch-b9fd740b.js"),["assets/TagSearch-b9fd740b.js","assets/db-8d04be33.js","assets/TagSearch-ffd782da.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"fuzzy-search":Ir(()=>mr(()=>import("./SubstrSearch-4bbe3e8d.js"),["assets/SubstrSearch-4bbe3e8d.js","assets/fullScreenContextMenu-9e3be5a3.js","assets/FileItem-ced5f921.js","assets/db-8d04be33.js","assets/shortcut-dae64d46.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.css","assets/fullScreenContextMenu-73df97d0.css","assets/hook-9c9eb74d.js","assets/SubstrSearch-1edc4acf.css","assets/index-f4bbe4b8.css"])),"img-sli":Ir(()=>mr(()=>import("./ImgSliPagePane-25ccb7d8.js"),[])),"batch-download":Ir(()=>mr(()=>import("./batchDownload-9459d89e.js"),["assets/batchDownload-9459d89e.js","assets/FileItem-ced5f921.js","assets/db-8d04be33.js","assets/shortcut-dae64d46.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.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(()=>L_.emit("returnToIIB"),100);return Iz(async()=>{const o=window.parent;if(!await pz(()=>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(n7(),o=>o&&i()),(o,l)=>{const s=ls,u=Qi;return Ye(),an("div",{ref_key:"container",ref:a},[x(xe(D_),{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(d7,{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(bx(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(A7)],512)}}});const k7=uu(M7,[["__scopeId","data-v-c479b9de"]]),N7=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,vz(),gz(["action","path","walk"]);break}}};function Dy(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!nr(t)}const H_="app.conf.json",io=W(),U_=()=>Ao.writeFile(H_,JSON.stringify(Me(io.value),null,4)),$7=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 U_(),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]})])])}}}),R7=async()=>{try{io.value=JSON.parse(await Ao.readTextFile(H_))}catch{}io.value||(io.value={sdwebui_dir:""},await U_(),Bt.info({title:ke("tauriLaunchConfMessages.firstTimeUserTitle"),content:x($7,null,null),width:"80vw",okText:ke("tauriLaunchConf.skipButton"),okButtonProps:{onClick:Bt.destroyAll}}))},L7=!!{}.TAURI_ARCH,X9=window===parent,D7=fe({__name:"App",setup(t){const e=Wo(),n=mz();return Ey("updateGlobalSetting",async()=>{await Kj(),console.log(ds.value);const r=await Yj();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)}),N7(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()=>{L7&&R7(),L_.emit("updateGlobalSetting")}),(r,a)=>{const i=rn;return Ye(),Xt(i,{loading:!xe(n).isIdle},{default:_t(()=>[x(k7)]),_:1},8,["loading"])}}});function F7(t){return typeof t=="object"&&t!==null}function Fy(t,e){return t=F7(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 B7(t,e){return e.reduce((n,r)=>n==null?void 0:n[r],t)}function j7(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 z7(t,e){return e.reduce((n,r)=>{const a=r.split(".");return j7(n,a,B7(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)?z7(t,a):t;e.setItem(r,n.serialize(o))}catch(o){i&&console.error(o)}}function W7(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 V7=W7();const K_=ez();K_.use(V7);kP(D7).use(K_).use(wv).mount("#zanllp_dev_gradio_fe");const H7=t7(),U7=()=>{try{return parent.location.search.includes("theme=dark")}catch{}return!1};pe([H7,U7],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,EN as D,L7 as E,r9 as F,K7 as G,Vx as H,B9 as I,F9 as J,G7 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,YN 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,wT as a8,xT as a9,r$ as aA,Ce as aB,qc as aC,j9 as aD,Uj as aE,Ao as aF,H_ as aG,C_ as aH,Xe as aI,o9 as aJ,ct as aK,rm as aL,Qe as aM,a9 as aN,yI as aO,NT as aP,nh as aQ,Iw as aR,qD as aS,Ds as aT,b$ as aU,Zf as aV,_e as aW,ho as aX,j$ as aY,hO as aZ,SP as a_,id as aa,vT 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,Xj as ak,ba as al,L_ as am,V_ as an,K as ao,QR 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,dO as b1,n9 as b2,mi as b3,Me as b4,U$ as b5,Id as b6,_o as b7,ww as b8,x$ as b9,Fa as bA,e9 as bB,GN as bC,fx as bD,X7 as bE,Y7 as bF,Gf as bG,Hc as bH,Z7 as bI,u0 as bJ,tC as bK,On as bL,Wn as bM,CC as bN,mz as bO,Ey as bP,K9 as bQ,AN as bR,g4 as bS,Q7 as bT,hf as bU,SB as bV,gI as bW,s0 as bX,nr as bY,D9 as bZ,Y9 as b_,S$ as ba,HR as bb,RR as bc,xC as bd,rr as be,Kd as bf,Us as bg,Do as bh,AE as bi,UR as bj,Ks as bk,SL as bl,kl as bm,rt as bn,Nt as bo,z2 as bp,Jt as bq,t9 as br,Qw as bs,Zw as bt,Fw as bu,Le as bv,Gt as bw,Sn as bx,Aw as by,$E as bz,x as c,Eo as c0,T7 as c1,oz as c2,cz as c3,Si as c4,i$ as c5,UN as c6,ZN as c7,zN as c8,i9 as c9,_z as cA,R9 as cB,L9 as cC,ex as cD,Cs as cE,BS as cF,Sb as cG,wx as cH,Wl as cI,bx as cJ,q7 as cK,Gc as cL,J7 as cM,Py as cN,fz as cO,CF as cP,Xf as cQ,Tm as cR,zn as ca,Od as cb,_d as cc,sb as cd,bt as ce,$T as cf,sd as cg,X9 as ch,H9 as ci,Cz as cj,N_ as ck,gy as cl,W9 as cm,Av as cn,z9 as co,V9 as cp,Q1 as cq,ou as cr,wz as cs,G9 as ct,di as cu,l7 as cv,$_ as cw,Ry as cx,q9 as cy,Z1 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,U9 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 ez(){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&&!Zj?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 tz=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 nz=Symbol();function rz(t){return!yf(t)||!t.hasOwnProperty(nz)}const{assign:Rr}=Object;function az(t){return!!(tt(t)&&t.effect)}function iz(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||tz,E=r._e.run(()=>(o=Ef(),_(()=>o.run(e))));for(const I in E){const P=E[I];if(tt(P)&&!az(P)||wr(P))i||(c&&rz(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=Ix();return l=l||(u?Xe(A_,null):null),l&&su(l),l=I_,l._s.has(r)||(i?k_(r,e,a,l):iz(r,a,l)),l._s.get(r)}return o.$id=r,o}function oz(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 lz=t=>Yc({...t,name:typeof t.name=="string"?t.name:t.nameFallbackStr??""}),sz=t=>({...t,panes:t.panes.map(lz)}),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(sz);((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:"",download:""}),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)}`,uz=t=>typeof t=="object"&&t.__id==="FileTransferData",cz=t=>{var n;const e=JSON.parse(((n=t.dataTransfer)==null?void 0:n.getData("text"))??"{}");return uz(e)?e:null},W9=t=>Z1(t,"fullpath");function $_(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 fz(t){var r;if(typeof t!="string")return!1;const e=[".mp4",".avi",".mov",".mkv"],n=(r=t.split(".").pop())==null?void 0:r.toLowerCase();return n!==void 0&&e.includes(`.${n}`)}const V9=t=>$_(t)||fz(t);function H9(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 R_(){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 dz=()=>{const t=R_().querySelectorAll("#tabs > .tabitem[id^=tab_]");return Array.from(t).findIndex(e=>e.id.includes("infinite-image-browsing"))},vz=()=>{try{R_().querySelector("#tabs").querySelectorAll("button")[dz()].click()}catch(t){console.error(t)}},pz=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()}),hz=(t,...e)=>e.reduce((n,r)=>(n[r]=t==null?void 0:t[r],n),{}),mz=()=>rt(new Io(-1,0,-1,"throw")),U9=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:L_}=Q1();function K9(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 gz(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 yz=t=>new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=a=>n(a),r.src=t}),bz=t=>{try{return JSON.parse(t)}catch{return null}};function wz(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=wz(t)?t:di(Cz(e,t));return di(n)},G9=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={...hz(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]=_z(o[g],e)}catch(c){console.error(c)}});const l=await Xj(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 D_={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())}},Sz=(t,e)=>{const n=t.__vccOpts||t;for(const[r,a]of e)n[r]=a;return n},xz={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 Pz(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=Sz(xz,[["render",Pz]]);function Mv(t){return Of()?(qy(t),!0):!1}function kv(t){return typeof t=="function"?t():xe(t)}const F_=typeof window<"u",Nv=()=>{};function Ez(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 B_=t=>t();function Oz(t=B_){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 Tz(...t){if(t.length!==1)return Kt(...t);const e=t[0];return typeof e=="function"?ws(VS(()=>({get:e,set:Nv}))):W(e)}function Iz(t,e=!0){bt()?Re(t):e?t():Ke(t)}var Ty=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,Mz=Object.prototype.propertyIsEnumerable,kz=(t,e)=>{var n={};for(var r in t)Az.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&&Mz.call(t,r)&&(n[r]=t[r]);return n};function Nz(t,e,n={}){const r=n,{eventFilter:a=B_}=r,i=kz(r,["eventFilter"]);return pe(t,Ez(a,e),i)}var $z=Object.defineProperty,Rz=Object.defineProperties,Lz=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,j_=Object.prototype.hasOwnProperty,z_=Object.prototype.propertyIsEnumerable,Iy=(t,e,n)=>e in t?$z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Dz=(t,e)=>{for(var n in e||(e={}))j_.call(e,n)&&Iy(t,n,e[n]);if(ps)for(var n of ps(e))z_.call(e,n)&&Iy(t,n,e[n]);return t},Fz=(t,e)=>Rz(t,Lz(e)),Bz=(t,e)=>{var n={};for(var r in t)j_.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&&z_.call(t,r)&&(n[r]=t[r]);return n};function jz(t,e,n={}){const r=n,{eventFilter:a}=r,i=Bz(r,["eventFilter"]),{eventFilter:o,pause:l,resume:s,isActive:u}=Oz(a);return{stop:Nz(t,e,Fz(Dz({},i),{eventFilter:o})),pause:l,resume:s,isActive:u}}function zz(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=F_?window:void 0,Wz=F_?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 Vz=500;function q9(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:Vz))}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 Hz(){const t=W(!1);return bt()&&Re(()=>{t.value=!0}),t}function W_(t){const e=Hz();return K(()=>(e.value,!!t()))}function Uz(t,e={}){const{window:n=Sr}=e,r=W_(()=>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(Tz(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__",Kz=Gz();function Gz(){return Cl in wl||(wl[Cl]=wl[Cl]||{}),wl[Cl]}function qz(t,e){return Kz[t]||e}function Yz(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 Xz=Object.defineProperty,Ay=Object.getOwnPropertySymbols,Jz=Object.prototype.hasOwnProperty,Qz=Object.prototype.propertyIsEnumerable,My=(t,e,n)=>e in t?Xz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ky=(t,e)=>{for(var n in e||(e={}))Jz.call(e,n)&&My(t,n,e[n]);if(Ay)for(var n of Ay(e))Qz.call(e,n)&&My(t,n,e[n]);return t};const Zz={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 e7(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=qz("getDefaultStorage",()=>{var I;return(I=Sr)==null?void 0:I.localStorage})()}catch(I){g(I)}if(!n)return c;const d=kv(e),m=Yz(d),h=(a=r.serializer)!=null?a:Zz[m],{pause:y,resume:b}=jz(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 t7(t){return Uz("(prefers-color-scheme: dark)",t)}function n7({document:t=Wz}={}){if(!t)return W("visible");const e=W(t.visibilityState);return Pn(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var $y=Object.getOwnPropertySymbols,r7=Object.prototype.hasOwnProperty,a7=Object.prototype.propertyIsEnumerable,i7=(t,e)=>{var n={};for(var r in t)r7.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&&a7.call(t,r)&&(n[r]=t[r]);return n};function o7(t,e,n={}){const r=n,{window:a=Sr}=r,i=i7(r,["window"]);let o;const l=W_(()=>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 l7(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 o7(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 Y9(t,e,n={}){const{window:r=Sr}=n;return e7(t,e,r==null?void 0:r.localStorage,n)}const s7={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 u7(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:s7[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}=u7(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 c7={style:{position:"relative"}},f7=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=bz(((g=f.dataTransfer)==null?void 0:g.getData("text"))??"{}");if(p&&(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",c7,[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},d7=uu(f7,[["__scopeId","data-v-1f3b5d72"]]);const V_=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}}),v7=t=>(hb("data-v-279a61df"),t=t(),mb(),t),p7={key:0,class:"dragging-port-wrap"},h7={class:"content"},m7={key:0,class:"img-wrap"},g7={key:1},y7=v7(()=>xn("div",{style:{padding:"16px"}},null,-1)),b7={key:0,class:"img-wrap"},w7={key:1},C7={key:0,class:"tips",style:{"max-width":"30vw"}},_7={class:"actions"},S7=fe({__name:"DraggingPort",setup(t){const e=V_(),n=Wo(),{left:r,right:a}=oz(e),i=async(s,u)=>{const f=cz(s);if(f){const v=f.nodes[0];if(!$_(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=CF,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",p7,[xn("h2",null,qn(s.$t("imgCompare")),1),xn("div",h7,[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",m7,[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",g7,qn(s.$t("dragImageHere")),1))],32),y7,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",b7,[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",w7,qn(s.$t("dragImageHere")),1))],32)]),xe(e).opened?(Ye(),an("p",C7," Tips: "+qn(s.$t("imageCompareTips")),1)):pa("",!0),xn("div",_7,[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 x7=uu(S7,[["__scopeId","data-v-279a61df"]]),P7={class:"container"},E7=["src"],O7=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",P7,[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,E7)]))}});const Ly=uu(O7,[["__scopeId","data-v-65d66859"]]),T7=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}=l7(i);e({requestFullScreen:()=>{var u;(u=i.value)==null||u.requestFullscreen()}});const s=zz(async()=>{if(!n.left)return"width";const u=await yz(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(D_),{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 I7={class:"actions"},A7=fe({__name:"ImgSliDrawer",setup(t){const e=V_(),n=W();return(r,a)=>{const i=Tn,o=p4;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",I7,[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(T7,{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(x7)],64)}}});const M7=fe({__name:"SplitViewTab",setup(t){const e=Wo(),n={local:Ir(()=>mr(()=>import("./stackView-c5946a9f.js"),["assets/stackView-c5946a9f.js","assets/fullScreenContextMenu-67c7b1b8.js","assets/FileItem-c84a61c8.js","assets/db-f71a84c3.js","assets/shortcut-0fe96b62.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.css","assets/fullScreenContextMenu-73df97d0.css","assets/numInput-6bcdca58.js","assets/numInput-a08c6857.css","assets/stackView-6a9bcb83.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),empty:Ir(()=>mr(()=>import("./emptyStartup-a812cca8.js"),["assets/emptyStartup-a812cca8.js","assets/db-f71a84c3.js","assets/emptyStartup-f9353e31.css"])),"global-setting":Ir(()=>mr(()=>import("./globalSetting-be834608.js"),["assets/globalSetting-be834608.js","assets/numInput-6bcdca58.js","assets/shortcut-0fe96b62.js","assets/shortcut-9fed83c2.css","assets/numInput-a08c6857.css","assets/globalSetting-40971f83.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"tag-search-matched-image-grid":Ir(()=>mr(()=>import("./MatchedImageGrid-2776313c.js"),["assets/MatchedImageGrid-2776313c.js","assets/fullScreenContextMenu-67c7b1b8.js","assets/FileItem-c84a61c8.js","assets/db-f71a84c3.js","assets/shortcut-0fe96b62.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.css","assets/fullScreenContextMenu-73df97d0.css","assets/hook-8fa8389e.js","assets/MatchedImageGrid-4f83f417.css"])),"tag-search":Ir(()=>mr(()=>import("./TagSearch-0422ab6e.js"),["assets/TagSearch-0422ab6e.js","assets/db-f71a84c3.js","assets/TagSearch-ffd782da.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"fuzzy-search":Ir(()=>mr(()=>import("./SubstrSearch-218d7a61.js"),["assets/SubstrSearch-218d7a61.js","assets/fullScreenContextMenu-67c7b1b8.js","assets/FileItem-c84a61c8.js","assets/db-f71a84c3.js","assets/shortcut-0fe96b62.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.css","assets/fullScreenContextMenu-73df97d0.css","assets/hook-8fa8389e.js","assets/SubstrSearch-7e9861e7.css","assets/index-f4bbe4b8.css"])),"img-sli":Ir(()=>mr(()=>import("./ImgSliPagePane-0186a499.js"),[])),"batch-download":Ir(()=>mr(()=>import("./batchDownload-6f33ec7a.js"),["assets/batchDownload-6f33ec7a.js","assets/FileItem-c84a61c8.js","assets/db-f71a84c3.js","assets/shortcut-0fe96b62.js","assets/shortcut-9fed83c2.css","assets/FileItem-eb45abcf.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(()=>L_.emit("returnToIIB"),100);return Iz(async()=>{const o=window.parent;if(!await pz(()=>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(n7(),o=>o&&i()),(o,l)=>{const s=ls,u=Qi;return Ye(),an("div",{ref_key:"container",ref:a},[x(xe(D_),{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(d7,{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(bx(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(A7)],512)}}});const k7=uu(M7,[["__scopeId","data-v-c479b9de"]]),N7=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,vz(),gz(["action","path","walk"]);break}}};function Dy(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!nr(t)}const H_="app.conf.json",io=W(),U_=()=>Ao.writeFile(H_,JSON.stringify(Me(io.value),null,4)),$7=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 U_(),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]})])])}}}),R7=async()=>{try{io.value=JSON.parse(await Ao.readTextFile(H_))}catch{}io.value||(io.value={sdwebui_dir:""},await U_(),Bt.info({title:ke("tauriLaunchConfMessages.firstTimeUserTitle"),content:x($7,null,null),width:"80vw",okText:ke("tauriLaunchConf.skipButton"),okButtonProps:{onClick:Bt.destroyAll}}))},L7=!!{}.TAURI_ARCH,X9=window===parent,D7=fe({__name:"App",setup(t){const e=Wo(),n=mz();return Ey("updateGlobalSetting",async()=>{await Kj(),console.log(ds.value);const r=await Yj();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)}),N7(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()=>{L7&&R7(),L_.emit("updateGlobalSetting")}),(r,a)=>{const i=rn;return Ye(),Xt(i,{loading:!xe(n).isIdle},{default:_t(()=>[x(k7)]),_:1},8,["loading"])}}});function F7(t){return typeof t=="object"&&t!==null}function Fy(t,e){return t=F7(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 B7(t,e){return e.reduce((n,r)=>n==null?void 0:n[r],t)}function j7(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 z7(t,e){return e.reduce((n,r)=>{const a=r.split(".");return j7(n,a,B7(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)?z7(t,a):t;e.setItem(r,n.serialize(o))}catch(o){i&&console.error(o)}}function W7(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 V7=W7();const K_=ez();K_.use(V7);kP(D7).use(K_).use(wv).mount("#zanllp_dev_gradio_fe");const H7=t7(),U7=()=>{try{return parent.location.search.includes("theme=dark")}catch{}return!1};pe([H7,U7],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,EN as D,L7 as E,r9 as F,K7 as G,Vx as H,B9 as I,F9 as J,G7 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,YN 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,wT as a8,xT as a9,r$ as aA,Ce as aB,qc as aC,j9 as aD,Uj as aE,Ao as aF,H_ as aG,C_ as aH,Xe as aI,o9 as aJ,ct as aK,rm as aL,Qe as aM,a9 as aN,yI as aO,NT as aP,nh as aQ,Iw as aR,qD as aS,Ds as aT,b$ as aU,Zf as aV,_e as aW,ho as aX,j$ as aY,hO as aZ,SP as a_,id as aa,vT 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,Xj as ak,ba as al,L_ as am,V_ as an,K as ao,QR 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,dO as b1,n9 as b2,mi as b3,Me as b4,U$ as b5,Id as b6,_o as b7,ww as b8,x$ as b9,Fa as bA,e9 as bB,GN as bC,fx as bD,X7 as bE,Y7 as bF,Gf as bG,Hc as bH,Z7 as bI,u0 as bJ,tC as bK,On as bL,Wn as bM,CC as bN,mz as bO,Ey as bP,K9 as bQ,AN as bR,g4 as bS,Q7 as bT,hf as bU,SB as bV,gI as bW,s0 as bX,nr as bY,D9 as bZ,Y9 as b_,S$ as ba,HR as bb,RR as bc,xC as bd,rr as be,Kd as bf,Us as bg,Do as bh,AE as bi,UR as bj,Ks as bk,SL as bl,kl as bm,rt as bn,Nt as bo,z2 as bp,Jt as bq,t9 as br,Qw as bs,Zw as bt,Fw as bu,Le as bv,Gt as bw,Sn as bx,Aw as by,$E as bz,x as c,Eo as c0,T7 as c1,oz as c2,cz as c3,Si as c4,i$ as c5,UN as c6,ZN as c7,zN as c8,i9 as c9,_z as cA,R9 as cB,L9 as cC,ex as cD,Cs as cE,BS as cF,Sb as cG,wx as cH,Wl as cI,bx as cJ,q7 as cK,Gc as cL,J7 as cM,Py as cN,fz as cO,CF as cP,Xf as cQ,Tm as cR,zn as ca,Od as cb,_d as cc,sb as cd,bt as ce,$T as cf,sd as cg,X9 as ch,H9 as ci,Cz as cj,N_ as ck,gy as cl,W9 as cm,Av as cn,z9 as co,V9 as cp,Q1 as cq,ou as cr,wz as cs,G9 as ct,di as cu,l7 as cv,$_ as cw,Ry as cx,q9 as cy,Z1 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,U9 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-be9a0500.js b/vue/dist/assets/numInput-6bcdca58.js similarity index 99% rename from vue/dist/assets/numInput-be9a0500.js rename to vue/dist/assets/numInput-6bcdca58.js index 4df78e7..0ec994d 100644 --- a/vue/dist/assets/numInput-be9a0500.js +++ b/vue/dist/assets/numInput-6bcdca58.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-54d35579.js";import{t as Rn,l as Dn}from"./shortcut-dae64d46.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{cQ as L,cR 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 Q,j as Y,u as z,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-b44dfcf8.js";function ce(n,e){var u=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!u){if(Array.isArray(n)||(u=L(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:Q.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,O=f(f({},b),o),y=Object.keys(O).reduce(function(F,P){return(P.substr(0,5)==="aria-"||P.substr(0,5)==="data-"||P==="role")&&(F[P]=O[P]),F},{}),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:Q.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}})},J=Symbol("CheckboxGroupContext"),pe=["indeterminate","skipGroup","id"],ye=["onMouseenter","onMouseleave","onInput","class","style"];const N=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=Y(),d=z("checkbox",e),c=d.prefixCls,p=d.direction,r=ne(J,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,O=T(s,ye),y=f(f({},I),{},{id:i,prefixCls:c.value},O);r&&!h?(y.onChange=function(){for(var F=arguments.length,P=new Array(F),j=0;j0&&(h=r.value.map(function(i){var I;return w(N,{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))])}}});N.Group=W;N.install=function(n){return n.component(N.name,N),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{N as C,Se as g,Ce as l,ke as t}; diff --git a/vue/dist/assets/stackView-ddc0c403.js b/vue/dist/assets/stackView-c5946a9f.js similarity index 96% rename from vue/dist/assets/stackView-ddc0c403.js rename to vue/dist/assets/stackView-c5946a9f.js index 4bcfabe..a807766 100644 --- a/vue/dist/assets/stackView-ddc0c403.js +++ b/vue/dist/assets/stackView-c5946a9f.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 we,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 c,r as e,s as T,t as rt,v as p,x as L,y as h,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 he,O as vt,Q as ft,R as kt,T as bt,U as gt,V as Ct,W as yt,X as _t}from"./index-54d35579.js";import{S as W,s as wt,L as ht,R as It,f as xt}from"./fullScreenContextMenu-9e3be5a3.js";import{F as N,N as St,_ as Pt}from"./numInput-be9a0500.js";import"./shortcut-dae64d46.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-ced5f921.js";/* empty css *//* empty css */import"./db-8d04be33.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,y){var f=y.slots,b=y.attrs,w=ie("breadcrumb",o),_=w.prefixCls,S=function(I,m){var s=U(f,o,"overlay");return s?a(Me,{overlay:s,placement:"bottom"},{default:function(){return[a("span",{class:"".concat(m,"-overlay-link")},[I,a(Se,null,null)])]}}):I};return function(){var P,I=(P=U(f,o,"separator"))!==null&&P!==void 0?P:"/",m=U(f,o),s=b.class,g=b.style,k=xe(b,Vt),v;return o.href!==void 0?v=a("a",re({class:"".concat(_.value,"-link"),onClick:o.onClick},k),[m]):v=a("span",re({class:"".concat(_.value,"-link"),onClick:o.onClick},k),[m]),v=S(v,_.value),m?a("span",{class:s,style:g},[v,I&&a("span",{class:"".concat(_.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 y=Object.keys(o).join("|"),f=r.breadcrumbName.replace(new RegExp(":(".concat(y,")"),"g"),function(b,w){return o[w]||b});return f}function Ie(r){var o=r.route,y=r.params,f=r.routes,b=r.paths,w=f.indexOf(o)===f.length-1,_=jt(o,y);return w?a("span",null,[_]):a("a",{href:"#/".concat(b.join("/"))},[_])}const z=Y({compatConfig:{MODE:3},name:"ABreadcrumb",props:Ot(),slots:["separator","itemRender"],setup:function(o,y){var f=y.slots,b=ie("breadcrumb",o),w=b.prefixCls,_=b.direction,S=function(s,g){return s=(s||"").replace(/^\//,""),Object.keys(g).forEach(function(k){s=s.replace(":".concat(k),g[k])}),s},P=function(s,g,k){var v=et(s),x=S(g||"",k);return x&&v.push(x),v},I=function(s){var g=s.routes,k=g===void 0?[]:g,v=s.params,x=v===void 0?{}:v,M=s.separator,$=s.itemRender,A=$===void 0?Ie:$,R=[];return k.map(function(C){var B=S(C.path,x);B&&R.push(B);var O=[].concat(R),j=null;return C.children&&C.children.length&&(j=a(oe,null,{default:function(){return[C.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||C.breadcrumbName},{default:function(){return[A({route:C,params:x,routes:k,paths:O})]}})})};return function(){var m,s,g,k=o.routes,v=o.params,x=v===void 0?{}:v,M=Pe(U(f,o)),$=(m=U(f,o,"separator"))!==null&&m!==void 0?m:"/",A=o.itemRender||f.itemRender||Ie;k&&k.length>0?g=I({routes:k,params:x,separator:$,itemRender:A}):M.length&&(g=M.map(function(C,B){return Xe(Ye(C.type)==="object"&&(C.type.__ANT_BREADCRUMB_ITEM||C.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Ze(C,{separator:$,key:B})}));var R=(s={},we(s,w.value,!0),we(s,"".concat(w.value,"-rtl"),_.value==="rtl"),s);return a("div",{class:R},[g])}}});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,y){var f=y.slots,b=y.attrs,w=ie("breadcrumb",o),_=w.prefixCls;return function(){var S;b.separator;var P=b.class,I=xe(b,Lt),m=Pe((S=f.default)===null||S===void 0?void 0:S.call(f));return a("span",re({class:["".concat(_.value,"-separator"),P]},I),[m.length>0?m:"/"])}}});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=wt;W.install=function(r){return r.component(W.name,W),r};const Wt={class:"hint"},qt={class:"location-bar"},Kt={key:0},Gt=["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,y=nt(),{scroller:f,stackViewEl:b,props:w,multiSelectedIdxs:_,spinning:S}=Mt().toRefs(),{currLocation:P,currPage:I,refresh:m,copyLocation:s,back:g,openNext:k,stack:v,quickMoveTo:x,addToSearchScanPathAndQuickMove:M,searchPathInfo:$,locInputValue:A,isLocationEditing:R,onLocEditEnter:C,onEditBtnClick:B,share:O,selectAll:j,onCreateFloderBtnClick:K,onWalkBtnClick:E,showWalkButton:ue}=$t(),{gridItems:$e,sortMethodConv:Ae,moreActionsDropdownShow:Z,sortedFiles:G,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,()=>{w.value=o;const l=Nt.get(o.stackKey??"");l&&(v.value=l.slice())},{immediate:!0}),(l,t)=>{const je=vt,Le=ft,Ue=kt,ke=q,be=z,We=bt,qe=gt,ge=Ct,Ke=yt,Ge=oe,Ce=Me,Qe=St,ye=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:b,onDragover:t[25]||(t[25]=c(()=>{},["prevent"])),onDrop:t[26]||(t[26]=c(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,p(l.$t("doubleClickToCopy")),1),L(" "+p(e(pe)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),u("div",qt,[o.walkModePath?(d(),h("div",Kt,[a(We,null,{title:i(()=>[L(p(l.$t("walk-mode-move-message")),1)]),default:i(()=>[a(be,{style:{flex:"1"}},{default:i(()=>[(d(!0),h(ne,null,ae(e(v),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("span",null,p(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})])):(d(),h("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]=c(()=>{},["stop"])),onKeydown:t[5]||(t[5]=c(()=>{},["stop"])),onPressEnter:e(C),"allow-clear":""},null,8,["value","onPressEnter"])):(d(),F(be,{key:1,style:{flex:"1"}},{default:i(()=>[(d(!0),h(ne,null,ae(e(v),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("a",{onClick:c(_e=>e(g)(D),["prevent"])},p(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),9,Gt)]),_:2},1024))),128))]),_:1})),e(R)?(d(),F(ge,{key:2,size:"small",onClick:e(C),type:"primary"},{default:i(()=>[L(p(l.$t("go")),1)]),_:1},8,["onClick"])):(d(),h("div",Qt,[u("a",{onClick:t[6]||(t[6]=c((...n)=>e(s)&&e(s)(...n),["prevent"])),style:{"margin-right":"4px"}},p(l.$t("copy")),1),u("a",{onClick:t[7]||(t[7]=c((...n)=>e(B)&&e(B)(...n),["prevent","stop"]))},p(l.$t("edit")),1)]))],4)),u("div",Ht,[u("a",{class:"opt",onClick:t[8]||(t[8]=c((...n)=>e(m)&&e(m)(...n),["prevent"]))},p(l.$t("refresh")),1),e(ue)?(d(),h("a",{key:0,class:"opt",onClick:t[9]||(t[9]=c((...n)=>e(E)&&e(E)(...n),["prevent"]))}," Walk ")):V("",!0),u("a",{class:"opt",onClick:t[10]||(t[10]=c((...n)=>e(j)&&e(j)(...n),["prevent","stop"]))},p(l.$t("selectAll")),1),e(st)?V("",!0):(d(),h("a",{key:1,class:"opt",onClick:t[11]||(t[11]=c((...n)=>e(O)&&e(O)(...n),["prevent"]))},p(l.$t("share")),1)),a(Ce,null,{overlay:i(()=>[a(Ge,null,{default:i(()=>[(d(!0),h(ne,null,ae(e(y).quickMovePaths,n=>(d(),F(Ke,{key:n.dir},{default:i(()=>[u("a",{onClick:c(D=>e(x)(n.dir),["prevent"])},p(n.zh),9,Jt)]),_:2},1024))),128))]),_:1})]),default:i(()=>[u("a",{class:"opt",onClick:t[12]||(t[12]=c(()=>{},["prevent"]))},[L(p(l.$t("quickMove"))+" ",1),a(e(Se))])]),_:1}),a(Ce,{trigger:["click"],visible:e(Z),"onUpdate:visible":t[21]||(t[21]=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(ye,{label:l.$t("gridCellWidth")},{default:i(()=>[a(Qe,{modelValue:e(Q),"onUpdate:modelValue":t[14]||(t[14]=n=>T(Q)?Q.value=n:null),max:1024,min:64,step:64},null,8,["modelValue"])]),_:1},8,["label"]),a(ye,{label:l.$t("sortingMethod")},{default:i(()=>[a(e(ut),{value:e(ee),"onUpdate:value":t[15]||(t[15]=n=>T(ee)?ee.value=n:null),onClick:t[16]||(t[16]=c(()=>{},["stop"])),conv:e(Ae),options:e(dt)},null,8,["value","conv","options"])]),_:1},8,["label"]),u("div",Yt,[e($)?e($).can_delete?(d(),h("a",{key:1,onClick:t[18]||(t[18]=c((...n)=>e(M)&&e(M)(...n),["prevent"]))},p(l.$t("removeFromSearchScanPathAndQuickMove")),1)):V("",!0):(d(),h("a",{key:0,onClick:t[17]||(t[17]=c((...n)=>e(M)&&e(M)(...n),["prevent"]))},p(l.$t("addToSearchScanPathAndQuickMove")),1))]),u("div",Zt,[u("a",{onClick:t[19]||(t[19]=c(n=>e(ct)(e(P)+"/"),["prevent"]))},p(l.$t("openWithLocalFileBrowser")),1)]),u("div",en,[u("a",{onClick:t[20]||(t[20]=c((...n)=>e(K)&&e(K)(...n),["prevent"]))},p(l.$t("createFolder")),1)])]),_:1},16)])]),default:i(()=>[u("a",{class:"opt",onClick:t[13]||(t[13]=c(()=>{},["prevent"]))},p(l.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(I)?(d(),h("div",tn,[a(e(Et),{class:"file-list",items:e(G),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(G)[e(J)]?e(mt)(e(G)[e(J)]):"","show-menu-idx":e(te),"onUpdate:showMenuIdx":t[22]||(t[22]=_e=>T(te)?te.value=_e:null),selected:e(_).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(ge,{onClick:e(Re),loading:e(Be),block:"",type:"primary",disabled:!e(De),ghost:""},{default:i(()=>[L(p(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(),h("div",an,[a(e(ht),{onClick:t[23]||(t[23]=n=>e(ve)("prev")),class:he({disable:!e(fe)("prev")})},null,8,["class"]),a(e(It),{onClick:t[24]||(t[24]=n=>e(ve)("next")),class:he({disable:!e(fe)("next")})},null,8,["class"])])):V("",!0)])):V("",!0)],544),e(me)?(d(),F(xt,{key:0,file:e(G)[e(J)],idx:e(J),onContextMenuClick:e(ce)},null,8,["file","idx","onContextMenuClick"])):V("",!0)]),_:1},8,["spinning"])}}});const vn=_t(rn,[["__scopeId","data-v-3b7597ab"]]);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 we,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 c,r as e,s as T,t as rt,v as p,x as L,y as h,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 he,O as vt,Q as ft,R as kt,T as bt,U as gt,V as Ct,W as yt,X as _t}from"./index-b44dfcf8.js";import{S as W,s as wt,L as ht,R as It,f as xt}from"./fullScreenContextMenu-67c7b1b8.js";import{F as N,N as St,_ as Pt}from"./numInput-6bcdca58.js";import"./shortcut-0fe96b62.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-c84a61c8.js";/* empty css *//* empty css */import"./db-f71a84c3.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,y){var f=y.slots,b=y.attrs,w=ie("breadcrumb",o),_=w.prefixCls,S=function(I,m){var s=U(f,o,"overlay");return s?a(Me,{overlay:s,placement:"bottom"},{default:function(){return[a("span",{class:"".concat(m,"-overlay-link")},[I,a(Se,null,null)])]}}):I};return function(){var P,I=(P=U(f,o,"separator"))!==null&&P!==void 0?P:"/",m=U(f,o),s=b.class,g=b.style,k=xe(b,Vt),v;return o.href!==void 0?v=a("a",re({class:"".concat(_.value,"-link"),onClick:o.onClick},k),[m]):v=a("span",re({class:"".concat(_.value,"-link"),onClick:o.onClick},k),[m]),v=S(v,_.value),m?a("span",{class:s,style:g},[v,I&&a("span",{class:"".concat(_.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 y=Object.keys(o).join("|"),f=r.breadcrumbName.replace(new RegExp(":(".concat(y,")"),"g"),function(b,w){return o[w]||b});return f}function Ie(r){var o=r.route,y=r.params,f=r.routes,b=r.paths,w=f.indexOf(o)===f.length-1,_=jt(o,y);return w?a("span",null,[_]):a("a",{href:"#/".concat(b.join("/"))},[_])}const z=Y({compatConfig:{MODE:3},name:"ABreadcrumb",props:Ot(),slots:["separator","itemRender"],setup:function(o,y){var f=y.slots,b=ie("breadcrumb",o),w=b.prefixCls,_=b.direction,S=function(s,g){return s=(s||"").replace(/^\//,""),Object.keys(g).forEach(function(k){s=s.replace(":".concat(k),g[k])}),s},P=function(s,g,k){var v=et(s),x=S(g||"",k);return x&&v.push(x),v},I=function(s){var g=s.routes,k=g===void 0?[]:g,v=s.params,x=v===void 0?{}:v,M=s.separator,$=s.itemRender,A=$===void 0?Ie:$,R=[];return k.map(function(C){var B=S(C.path,x);B&&R.push(B);var O=[].concat(R),j=null;return C.children&&C.children.length&&(j=a(oe,null,{default:function(){return[C.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||C.breadcrumbName},{default:function(){return[A({route:C,params:x,routes:k,paths:O})]}})})};return function(){var m,s,g,k=o.routes,v=o.params,x=v===void 0?{}:v,M=Pe(U(f,o)),$=(m=U(f,o,"separator"))!==null&&m!==void 0?m:"/",A=o.itemRender||f.itemRender||Ie;k&&k.length>0?g=I({routes:k,params:x,separator:$,itemRender:A}):M.length&&(g=M.map(function(C,B){return Xe(Ye(C.type)==="object"&&(C.type.__ANT_BREADCRUMB_ITEM||C.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),Ze(C,{separator:$,key:B})}));var R=(s={},we(s,w.value,!0),we(s,"".concat(w.value,"-rtl"),_.value==="rtl"),s);return a("div",{class:R},[g])}}});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,y){var f=y.slots,b=y.attrs,w=ie("breadcrumb",o),_=w.prefixCls;return function(){var S;b.separator;var P=b.class,I=xe(b,Lt),m=Pe((S=f.default)===null||S===void 0?void 0:S.call(f));return a("span",re({class:["".concat(_.value,"-separator"),P]},I),[m.length>0?m:"/"])}}});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=wt;W.install=function(r){return r.component(W.name,W),r};const Wt={class:"hint"},qt={class:"location-bar"},Kt={key:0},Gt=["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,y=nt(),{scroller:f,stackViewEl:b,props:w,multiSelectedIdxs:_,spinning:S}=Mt().toRefs(),{currLocation:P,currPage:I,refresh:m,copyLocation:s,back:g,openNext:k,stack:v,quickMoveTo:x,addToSearchScanPathAndQuickMove:M,searchPathInfo:$,locInputValue:A,isLocationEditing:R,onLocEditEnter:C,onEditBtnClick:B,share:O,selectAll:j,onCreateFloderBtnClick:K,onWalkBtnClick:E,showWalkButton:ue}=$t(),{gridItems:$e,sortMethodConv:Ae,moreActionsDropdownShow:Z,sortedFiles:G,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,()=>{w.value=o;const l=Nt.get(o.stackKey??"");l&&(v.value=l.slice())},{immediate:!0}),(l,t)=>{const je=vt,Le=ft,Ue=kt,ke=q,be=z,We=bt,qe=gt,ge=Ct,Ke=yt,Ge=oe,Ce=Me,Qe=St,ye=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:b,onDragover:t[25]||(t[25]=c(()=>{},["prevent"])),onDrop:t[26]||(t[26]=c(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,p(l.$t("doubleClickToCopy")),1),L(" "+p(e(pe)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),u("div",qt,[o.walkModePath?(d(),h("div",Kt,[a(We,null,{title:i(()=>[L(p(l.$t("walk-mode-move-message")),1)]),default:i(()=>[a(be,{style:{flex:"1"}},{default:i(()=>[(d(!0),h(ne,null,ae(e(v),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("span",null,p(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})])):(d(),h("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]=c(()=>{},["stop"])),onKeydown:t[5]||(t[5]=c(()=>{},["stop"])),onPressEnter:e(C),"allow-clear":""},null,8,["value","onPressEnter"])):(d(),F(be,{key:1,style:{flex:"1"}},{default:i(()=>[(d(!0),h(ne,null,ae(e(v),(n,D)=>(d(),F(ke,{key:D},{default:i(()=>[u("a",{onClick:c(_e=>e(g)(D),["prevent"])},p(n.curr==="/"?l.$t("root"):n.curr.replace(/:\/$/,l.$t("drive"))),9,Gt)]),_:2},1024))),128))]),_:1})),e(R)?(d(),F(ge,{key:2,size:"small",onClick:e(C),type:"primary"},{default:i(()=>[L(p(l.$t("go")),1)]),_:1},8,["onClick"])):(d(),h("div",Qt,[u("a",{onClick:t[6]||(t[6]=c((...n)=>e(s)&&e(s)(...n),["prevent"])),style:{"margin-right":"4px"}},p(l.$t("copy")),1),u("a",{onClick:t[7]||(t[7]=c((...n)=>e(B)&&e(B)(...n),["prevent","stop"]))},p(l.$t("edit")),1)]))],4)),u("div",Ht,[u("a",{class:"opt",onClick:t[8]||(t[8]=c((...n)=>e(m)&&e(m)(...n),["prevent"]))},p(l.$t("refresh")),1),e(ue)?(d(),h("a",{key:0,class:"opt",onClick:t[9]||(t[9]=c((...n)=>e(E)&&e(E)(...n),["prevent"]))}," Walk ")):V("",!0),u("a",{class:"opt",onClick:t[10]||(t[10]=c((...n)=>e(j)&&e(j)(...n),["prevent","stop"]))},p(l.$t("selectAll")),1),e(st)?V("",!0):(d(),h("a",{key:1,class:"opt",onClick:t[11]||(t[11]=c((...n)=>e(O)&&e(O)(...n),["prevent"]))},p(l.$t("share")),1)),a(Ce,null,{overlay:i(()=>[a(Ge,null,{default:i(()=>[(d(!0),h(ne,null,ae(e(y).quickMovePaths,n=>(d(),F(Ke,{key:n.dir},{default:i(()=>[u("a",{onClick:c(D=>e(x)(n.dir),["prevent"])},p(n.zh),9,Jt)]),_:2},1024))),128))]),_:1})]),default:i(()=>[u("a",{class:"opt",onClick:t[12]||(t[12]=c(()=>{},["prevent"]))},[L(p(l.$t("quickMove"))+" ",1),a(e(Se))])]),_:1}),a(Ce,{trigger:["click"],visible:e(Z),"onUpdate:visible":t[21]||(t[21]=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(ye,{label:l.$t("gridCellWidth")},{default:i(()=>[a(Qe,{modelValue:e(Q),"onUpdate:modelValue":t[14]||(t[14]=n=>T(Q)?Q.value=n:null),max:1024,min:64,step:64},null,8,["modelValue"])]),_:1},8,["label"]),a(ye,{label:l.$t("sortingMethod")},{default:i(()=>[a(e(ut),{value:e(ee),"onUpdate:value":t[15]||(t[15]=n=>T(ee)?ee.value=n:null),onClick:t[16]||(t[16]=c(()=>{},["stop"])),conv:e(Ae),options:e(dt)},null,8,["value","conv","options"])]),_:1},8,["label"]),u("div",Yt,[e($)?e($).can_delete?(d(),h("a",{key:1,onClick:t[18]||(t[18]=c((...n)=>e(M)&&e(M)(...n),["prevent"]))},p(l.$t("removeFromSearchScanPathAndQuickMove")),1)):V("",!0):(d(),h("a",{key:0,onClick:t[17]||(t[17]=c((...n)=>e(M)&&e(M)(...n),["prevent"]))},p(l.$t("addToSearchScanPathAndQuickMove")),1))]),u("div",Zt,[u("a",{onClick:t[19]||(t[19]=c(n=>e(ct)(e(P)+"/"),["prevent"]))},p(l.$t("openWithLocalFileBrowser")),1)]),u("div",en,[u("a",{onClick:t[20]||(t[20]=c((...n)=>e(K)&&e(K)(...n),["prevent"]))},p(l.$t("createFolder")),1)])]),_:1},16)])]),default:i(()=>[u("a",{class:"opt",onClick:t[13]||(t[13]=c(()=>{},["prevent"]))},p(l.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(I)?(d(),h("div",tn,[a(e(Et),{class:"file-list",items:e(G),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(G)[e(J)]?e(mt)(e(G)[e(J)]):"","show-menu-idx":e(te),"onUpdate:showMenuIdx":t[22]||(t[22]=_e=>T(te)?te.value=_e:null),selected:e(_).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(ge,{onClick:e(Re),loading:e(Be),block:"",type:"primary",disabled:!e(De),ghost:""},{default:i(()=>[L(p(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(),h("div",an,[a(e(ht),{onClick:t[23]||(t[23]=n=>e(ve)("prev")),class:he({disable:!e(fe)("prev")})},null,8,["class"]),a(e(It),{onClick:t[24]||(t[24]=n=>e(ve)("next")),class:he({disable:!e(fe)("next")})},null,8,["class"])])):V("",!0)])):V("",!0)],544),e(me)?(d(),F(xt,{key:0,file:e(G)[e(J)],idx:e(J),onContextMenuClick:e(ce)},null,8,["file","idx","onContextMenuClick"])):V("",!0)]),_:1},8,["spinning"])}}});const vn=_t(rn,[["__scopeId","data-v-3b7597ab"]]);export{vn as default}; diff --git a/vue/dist/index.html b/vue/dist/index.html index f8c7cf3..fb7cbb5 100644 --- a/vue/dist/index.html +++ b/vue/dist/index.html @@ -7,7 +7,7 @@ Infinite Image Browsing - + diff --git a/vue/src/i18n/en.ts b/vue/src/i18n/en.ts index a15e376..a8d7ea9 100644 --- a/vue/src/i18n/en.ts +++ b/vue/src/i18n/en.ts @@ -208,5 +208,6 @@ export const en: IIBI18nMap = { searchResults: 'Search Results', imgSearch: 'Image Search', onlyFoldersAndImages: 'Only show folders/images/videos', - send2savedDir: 'Send to saved folder' + send2savedDir: 'Send to saved folder', + regexSearchEnabledHint: '(You can also enable regex search by clicking the regex icon on the right)' } diff --git a/vue/src/i18n/zh-hans.ts b/vue/src/i18n/zh-hans.ts index e7613b6..9ca11db 100644 --- a/vue/src/i18n/zh-hans.ts +++ b/vue/src/i18n/zh-hans.ts @@ -191,5 +191,6 @@ export const zhHans = { dragToResizePanel: '按住并拖动来调整面板的大小', clickToToggleMaximizeMinimize: '单击切换最大化/最小化', dragToMovePanel: '按住并拖动来移动面板', - imageCompareTips: '拖拽文件时也会出现这个面板,可以不需要打开 “图像对比” 功能' + imageCompareTips: '拖拽文件时也会出现这个面板,可以不需要打开 “图像对比” 功能', + regexSearchEnabledHint: "(你也可以通过点击右侧的正则式图标来启用正则式搜索)" } diff --git a/vue/src/i18n/zh-hant.ts b/vue/src/i18n/zh-hant.ts index 5c04702..c122b79 100644 --- a/vue/src/i18n/zh-hant.ts +++ b/vue/src/i18n/zh-hant.ts @@ -195,5 +195,6 @@ export const zhHant: IIBI18nMap = { dragToResizePanel: '按住並拖動來調整面板的大小', clickToToggleMaximizeMinimize: '單擊切換最大化/最小化', dragToMovePanel: '按住並拖動來移動面板', - imageCompareTips: '拖拽文件時也會出現這個面板,可以不需要打開 “圖片對比” 功能' + imageCompareTips: '拖拽文件時也會出現這個面板,可以不需要打開 “圖片對比” 功能', + regexSearchEnabledHint: "(你也可以通過點擊右側的正則式圖標來啟用正則式搜索)" } diff --git a/vue/src/page/TagSearch/SubstrSearch.vue b/vue/src/page/TagSearch/SubstrSearch.vue index 85fb86f..f5428ac 100644 --- a/vue/src/page/TagSearch/SubstrSearch.vue +++ b/vue/src/page/TagSearch/SubstrSearch.vue @@ -83,7 +83,7 @@ const onRegexpClick = () => {