PennyJX's picture
Upload 160 files
b173115 verified
raw
history blame
64 kB
var Zt=Object.defineProperty;var Xt=(e,n,t)=>n in e?Zt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Fe=(e,n,t)=>(Xt(e,typeof n!="symbol"?n+"":n,t),t);import{d as Me,u as _t,ap as J,a0 as Ot,h as oe,c as A,c7 as en,c8 as tn,$ as V,b1 as nn,z as X,aB as an,P as at,a1 as rn,ag as re,c9 as sn,aS as ln,ca as on,cb as cn,aN as Pt,as as Oe,bo as We,cc as un,cd as dn,ce as fn,cf as hn,cg as Mt,ch as rt,ci as vn,cj as pn,ck as Tt,cl as Ft,k as Ke,ao as mn,cm as zt,al as ee,ai as R,cn as qe,l as fe,aD as Pe,ax as gn,aj as ze,co as yn,cp as xt,cq as st,at as Bt,bR as lt,bQ as bn,cr as Se,cs as wn,aE as An,ct as Z,bP as Qt,cu as kn,cv as Sn,t as Ne,am as ot,ar as ce,cw as ct,c5 as In,R as he,V as xe,L as se,x as L,J as En,b$ as ut,cx as Cn,cy as _n,b_ as On,cz as Pn,cA as Mn,au as Tn,av as Fn,ay as $t,o as I,m as H,cB as zn,cC as xn,cD as Bn,cE as Qn,cF as $n,a5 as Nn,y as j,an as we,C as q,n as F,A as le,cG as dt,bH as Ln,cH as Dn,B as Rn,N as ue,v as D,r as U,W as Nt,cI as jn,c2 as Hn,M as Lt,cJ as Vn,cK as Un,p as ie,ae as Jn,c1 as Wn,cL as Kn,cM as qn,X as Gn}from"./index-7c0f3f3a.js";import{t as Be,a as ve,l as de,b as Yn,M as Dt,C as Zn,m as Rt,g as Xn,c as ei,d as ti,e as ni}from"./functionalCallableComp-6d05295c.js";import{h as ii,r as ai,a as ri,t as si,i as li}from"./db-90de1b1b.js";import{D as pe,a as Le}from"./index-00c5caf5.js";/* empty css */var oi=function(){return{prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}},ci=Me({compatConfig:{MODE:3},name:"ACheckableTag",props:oi(),setup:function(n,t){var i=t.slots,a=t.emit,r=_t("tag",n),f=r.prefixCls,o=function(c){var m=n.checked;a("update:checked",!m),a("change",!m),a("click",c)},h=J(function(){var g;return Ot(f.value,(g={},oe(g,"".concat(f.value,"-checkable"),!0),oe(g,"".concat(f.value,"-checkable-checked"),n.checked),g))});return function(){var g;return A("span",{class:h.value,onClick:o},[(g=i.default)===null||g===void 0?void 0:g.call(i)])}}});const De=ci;var ui=new RegExp("^(".concat(en.join("|"),")(-inverse)?$")),di=new RegExp("^(".concat(tn.join("|"),")$")),fi=function(){return{prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:at.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},"onUpdate:visible":Function,icon:at.any}},me=Me({compatConfig:{MODE:3},name:"ATag",props:fi(),slots:["closeIcon","icon"],setup:function(n,t){var i=t.slots,a=t.emit,r=t.attrs,f=_t("tag",n),o=f.prefixCls,h=f.direction,g=V(!0);nn(function(){n.visible!==void 0&&(g.value=n.visible)});var c=function(s){s.stopPropagation(),a("update:visible",!1),a("close",s),!s.defaultPrevented&&n.visible===void 0&&(g.value=!1)},m=J(function(){var b=n.color;return b?ui.test(b)||di.test(b):!1}),k=J(function(){var b;return Ot(o.value,(b={},oe(b,"".concat(o.value,"-").concat(n.color),m.value),oe(b,"".concat(o.value,"-has-color"),n.color&&!m.value),oe(b,"".concat(o.value,"-hidden"),!g.value),oe(b,"".concat(o.value,"-rtl"),h.value==="rtl"),b))});return function(){var b,s,l,d=n.icon,v=d===void 0?(b=i.icon)===null||b===void 0?void 0:b.call(i):d,w=n.color,y=n.closeIcon,u=y===void 0?(s=i.closeIcon)===null||s===void 0?void 0:s.call(i):y,O=n.closable,C=O===void 0?!1:O,E=function(){return C?u?A("span",{class:"".concat(o.value,"-close-icon"),onClick:c},[u]):A(rn,{class:"".concat(o.value,"-close-icon"),onClick:c},null):null},P={backgroundColor:w&&!m.value?w:void 0},z=v||null,S=(l=i.default)===null||l===void 0?void 0:l.call(i),Q=z?A(X,null,[z,A("span",null,[S])]):S,$="onClick"in r,N=A("span",{class:k.value,style:P},[Q,E()]);return $?A(an,null,{default:function(){return[N]}}):N}}});me.CheckableTag=De;me.install=function(e){return e.component(me.name,me),e.component(De.name,De),e};const hi=me;pe.Button=Le;pe.install=function(e){return e.component(pe.name,pe),e.component(Le.name,Le),e};var vi={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 pi=vi;function ft(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){mi(e,a,t[a])})}return e}function mi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Ge=function(n,t){var i=ft({},n,t.attrs);return A(re,ft({},i,{icon:pi}),null)};Ge.displayName="StarFilled";Ge.inheritAttrs=!1;const jt=Ge;var gi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};const yi=gi;function ht(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){bi(e,a,t[a])})}return e}function bi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Ye=function(n,t){var i=ht({},n,t.attrs);return A(re,ht({},i,{icon:yi}),null)};Ye.displayName="FileOutlined";Ye.inheritAttrs=!1;const wi=Ye;var Ai={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};const ki=Ai;function vt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){Si(e,a,t[a])})}return e}function Si(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Ze=function(n,t){var i=vt({},n,t.attrs);return A(re,vt({},i,{icon:ki}),null)};Ze.displayName="FolderOpenOutlined";Ze.inheritAttrs=!1;const Ii=Ze;function Ei(e,n,t){if(!sn(t))return!1;var i=typeof n;return(i=="number"?ln(t)&&on(n,t.length):i=="string"&&n in t)?cn(t[n],e):!1}function Ci(e){return e&&e.length?e[0]:void 0}var _i=Math.ceil,Oi=Math.max;function Pi(e,n,t,i){for(var a=-1,r=Oi(_i((n-e)/(t||1)),0),f=Array(r);r--;)f[i?r:++a]=e,e+=t;return f}function Mi(e){return function(n,t,i){return i&&typeof i!="number"&&Ei(n,t,i)&&(t=i=void 0),n=Be(n),t===void 0?(t=n,n=0):t=Be(t),i=i===void 0?n<t?1:-1:Be(i),Pi(n,t,i,e)}}var Ti=Mi();const Ht=Ti,ge=(...e)=>{document.addEventListener(...e),Pt(()=>document.removeEventListener(...e))},Fi="data:image/png;base64,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",Ae=new WeakMap;function zi(e,n){return{useHookShareState:i=>{const a=dn();Oe(a),Ae.has(a)||(Ae.set(a,We(e(a,i??(n==null?void 0:n())))),Pt(()=>{Ae.delete(a)}));const r=Ae.get(a);return Oe(r),{state:r,toRefs(){return un(r)}}}}}var xi={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 Bi=xi;function pt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){Qi(e,a,t[a])})}return e}function Qi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Xe=function(n,t){var i=pt({},n,t.attrs);return A(re,pt({},i,{icon:Bi}),null)};Xe.displayName="DatabaseOutlined";Xe.inheritAttrs=!1;const $i=Xe;var Ni={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9z"}}]},name:"heart",theme:"filled"};const Li=Ni;function mt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){Di(e,a,t[a])})}return e}function Di(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var et=function(n,t){var i=mt({},n,t.attrs);return A(re,mt({},i,{icon:Li}),null)};et.displayName="HeartFilled";et.inheritAttrs=!1;const Ri=et;var ji={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z"}}]},name:"heart",theme:"outlined"};const Hi=ji;function gt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){Vi(e,a,t[a])})}return e}function Vi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var tt=function(n,t){var i=gt({},n,t.attrs);return A(re,gt({},i,{icon:Hi}),null)};tt.displayName="HeartOutlined";tt.inheritAttrs=!1;const Ui=tt;var Ji={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm144.1 454.9L437.7 677.8a8.02 8.02 0 01-12.7-6.5V353.7a8 8 0 0112.7-6.5L656.1 506a7.9 7.9 0 010 12.9z"}}]},name:"play-circle",theme:"filled"};const Wi=Ji;function yt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){Ki(e,a,t[a])})}return e}function Ki(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var nt=function(n,t){var i=yt({},n,t.attrs);return A(re,yt({},i,{icon:Wi}),null)};nt.displayName="PlayCircleFilled";nt.inheritAttrs=!1;const qi=nt;var Gi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"};const Yi=Gi;function bt(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},i=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(i=i.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),i.forEach(function(a){Zi(e,a,t[a])})}return e}function Zi(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var it=function(n,t){var i=bt({},n,t.attrs);return A(re,bt({},i,{icon:Yi}),null)};it.displayName="StarOutlined";it.inheritAttrs=!1;const Vt=it;var Ut={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */(function(e,n){(function(t,i){e.exports=i})(fn,function(){var t={};t.version="0.3.5";var i=t.settings={minimum:.08,easing:"linear",positionUsing:"",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};t.configure=function(s){var l,d;for(l in s)d=s[l],d!==void 0&&s.hasOwnProperty(l)&&(i[l]=d);return this},t.status=null,t.set=function(s){var l=t.isStarted();s=a(s,i.minimum,1),t.status=s===1?null:s;var d=t.render(!l),v=d.querySelector(i.barSelector),w=i.speed,y=i.easing;return d.offsetWidth,o(function(u){i.positionUsing===""&&(i.positionUsing=t.getPositioningCSS()),h(v,f(s,w,y)),s===1?(h(d,{transition:"none",opacity:1}),d.offsetWidth,setTimeout(function(){h(d,{transition:"all "+w+"ms linear",opacity:0}),setTimeout(function(){t.remove(),u()},w)},w)):setTimeout(u,w)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var s=function(){setTimeout(function(){t.status&&(t.trickle(),s())},i.trickleSpeed)};return i.trickle&&s(),this},t.done=function(s){return!s&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(s){var l=t.status;return l?l>1?void 0:(typeof s!="number"&&(l>=0&&l<.2?s=.1:l>=.2&&l<.5?s=.04:l>=.5&&l<.8?s=.02:l>=.8&&l<.99?s=.005:s=0),l=a(l+s,0,.994),t.set(l)):t.start()},t.trickle=function(){return t.inc()},function(){var s=0,l=0;t.promise=function(d){return!d||d.state()==="resolved"?this:(l===0&&t.start(),s++,l++,d.always(function(){l--,l===0?(s=0,t.done()):t.set((s-l)/s)}),this)}}(),t.getElement=function(){var s=t.getParent();if(s){var l=Array.prototype.slice.call(s.querySelectorAll(".nprogress")).filter(function(d){return d.parentElement===s});if(l.length>0)return l[0]}return null},t.getParent=function(){if(i.parent instanceof HTMLElement)return i.parent;if(typeof i.parent=="string")return document.querySelector(i.parent)},t.render=function(s){if(t.isRendered())return t.getElement();c(document.documentElement,"nprogress-busy");var l=document.createElement("div");l.id="nprogress",l.className="nprogress",l.innerHTML=i.template;var d=l.querySelector(i.barSelector),v=s?"-100":r(t.status||0),w=t.getParent(),y;return h(d,{transition:"all 0 linear",transform:"translate3d("+v+"%,0,0)"}),i.showSpinner||(y=l.querySelector(i.spinnerSelector),y&&b(y)),w!=document.body&&c(w,"nprogress-custom-parent"),w.appendChild(l),l},t.remove=function(){t.status=null,m(document.documentElement,"nprogress-busy"),m(t.getParent(),"nprogress-custom-parent");var s=t.getElement();s&&b(s)},t.isRendered=function(){return!!t.getElement()},t.getPositioningCSS=function(){var s=document.body.style,l="WebkitTransform"in s?"Webkit":"MozTransform"in s?"Moz":"msTransform"in s?"ms":"OTransform"in s?"O":"";return l+"Perspective"in s?"translate3d":l+"Transform"in s?"translate":"margin"};function a(s,l,d){return s<l?l:s>d?d:s}function r(s){return(-1+s)*100}function f(s,l,d){var v;return i.positionUsing==="translate3d"?v={transform:"translate3d("+r(s)+"%,0,0)"}:i.positionUsing==="translate"?v={transform:"translate("+r(s)+"%,0)"}:v={"margin-left":r(s)+"%"},v.transition="all "+l+"ms "+d,v}var o=function(){var s=[];function l(){var d=s.shift();d&&d(l)}return function(d){s.push(d),s.length==1&&l()}}(),h=function(){var s=["Webkit","O","Moz","ms"],l={};function d(u){return u.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(O,C){return C.toUpperCase()})}function v(u){var O=document.body.style;if(u in O)return u;for(var C=s.length,E=u.charAt(0).toUpperCase()+u.slice(1),P;C--;)if(P=s[C]+E,P in O)return P;return u}function w(u){return u=d(u),l[u]||(l[u]=v(u))}function y(u,O,C){O=w(O),u.style[O]=C}return function(u,O){var C=arguments,E,P;if(C.length==2)for(E in O)P=O[E],P!==void 0&&O.hasOwnProperty(E)&&y(u,E,P);else y(u,C[1],C[2])}}();function g(s,l){var d=typeof s=="string"?s:k(s);return d.indexOf(" "+l+" ")>=0}function c(s,l){var d=k(s),v=d+l;g(d,l)||(s.className=v.substring(1))}function m(s,l){var d=k(s),v;g(s,l)&&(v=d.replace(" "+l+" "," "),s.className=v.substring(1,v.length-1))}function k(s){return(" "+(s&&s.className||"")+" ").replace(/\s+/gi," ")}function b(s){s&&s.parentNode&&s.parentNode.removeChild(s)}return t})})(Ut);var Xi=Ut.exports;const ea=hn(Xi);function ta(){const e=[];for(let a=0;a<72;a++){const f=`hsl(${a*7.2}, 90%, 35%)`;e.push(f)}return e}const wt=ta(),Jt=Mt("useTagStore",()=>{const e=We(new Map),n=async r=>{if(r=r.filter(f=>!e.has(f)),!!r.length)try{r.forEach(o=>e.set(o,[]));const f=await ii(r);for(const o in f)e.set(o,f[o])}catch{r.forEach(f=>e.delete(f))}},t=new Map;return{tagMap:e,getColor:r=>{let f=t.get(r);if(!f){const o=rt.hash.sha256.hash(r),h=parseInt(rt.codec.hex.fromBits(o),16)%wt.length;f=wt[h],t.set(r,f)}return f},fetchImageTags:n,refreshTags:async r=>{r.forEach(f=>e.delete(f)),await n(r)}}}),na=Mt("useBatchDownloadStore",()=>{const e=V([]);return{selectdFiles:e,addFiles:t=>{e.value=vn([...e.value,...t])}}});class At{constructor(n,t=pn.CREATED_TIME_DESC){Fe(this,"root");Fe(this,"execQueue",[]);this.sortMethod=t,this.root={children:[],info:{name:n,size:"-",bytes:0,created_time:"",is_under_scanned_path:!0,date:"",type:"dir",fullpath:n}},this.fetchChildren(this.root)}reset(){return this.root.children=[],this.fetchChildren(this.root)}get images(){const n=t=>t.children.map(i=>{if(i.info.type==="dir")return n(i);if(Ft(i.info.name))return i.info}).filter(i=>i).flat(1);return n(this.root)}get isCompleted(){return this.execQueue.length===0}async fetchChildren(n){const{files:t}=await ve(n.info.fullpath);return n.children=Tt(t,this.sortMethod).map(i=>({info:i,children:[]})),this.execQueue.shift(),this.execQueue.unshift(...n.children.filter(i=>i.info.type==="dir").map(i=>({fn:()=>this.fetchChildren(i),...i}))),n}async next(){const n=Ci(this.execQueue);if(!n)return null;const t=await n.fn();return this.execQueue=this.execQueue.slice(),this.root={...this.root},t}}function Qe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!On(e)}const Ie=new Map,B=Ke(),ia=na(),Re=Jt(),kt=mn(),ke=new BroadcastChannel("iib-image-transfer-bus"),{eventEmitter:Ee,useEventListen:je}=zt(),{useHookShareState:ae}=zi((e,{images:n})=>{const t=V({tabIdx:-1,paneIdx:-1}),i=J(()=>de(a.value)),a=V([]),r=J(()=>{var w;return a.value.map(y=>y.curr).slice((w=B.conf)!=null&&w.is_win?1:0)}),f=J(()=>xt(...r.value)),o=V(B.defaultSortingMethod),h=V(t.value.walkModePath?new At(t.value.walkModePath,o.value):void 0);fe([()=>t.value.walkModePath,o],()=>{h.value=t.value.walkModePath?new At(t.value.walkModePath,o.value):void 0});const g=We(new Set);fe(i,()=>g.clear());const c=J(()=>{var O;if(n.value)return n.value;if(h.value)return h.value.images.filter(C=>!g.has(C.fullpath));if(!i.value)return[];const w=((O=i.value)==null?void 0:O.files)??[],y=o.value;return Tt((C=>B.onlyFoldersAndImages?C.filter(E=>E.type==="dir"||Ft(E.name)):C)(w),y).filter(C=>!g.has(C.fullpath))}),m=V([]),k=V(-1),b=J(()=>h.value?!h.value.isCompleted:!1),s=V(!1),l=V(!1),d=()=>{var w,y,u;return(u=(y=(w=B.tabList)==null?void 0:w[t.value.tabIdx])==null?void 0:y.panes)==null?void 0:u[t.value.paneIdx]},v=zt();return v.useEventListen("selectAll",()=>{console.log(`select all 0 -> ${c.value.length}`),m.value=Ht(0,c.value.length)}),{previewing:l,spinning:s,canLoadNext:b,multiSelectedIdxs:m,previewIdx:k,basePath:r,currLocation:f,currPage:i,stack:a,sortMethod:o,sortedFiles:c,scroller:V(),stackViewEl:V(),props:t,getPane:d,walker:h,deletedFiles:g,...v}},()=>({images:V()}));function Wa(){const{previewIdx:e,eventEmitter:n,canLoadNext:t,previewing:i,sortedFiles:a,scroller:r,props:f}=ae().toRefs(),{state:o}=ae();let h=null;const g=(b,s)=>{var l;i.value=b,h!=null&&!b&&s&&((l=r.value)==null||l.scrollToItem(h),h=null)},c=()=>{f.value.walkModePath&&!k("next")&&t&&(ee.info(R("loadingNextFolder")),n.value.emit("loadNextDir",!0))};ge("keydown",b=>{var s;if(i.value){let l=e.value;if(["ArrowDown","ArrowRight"].includes(b.key))for(l++;a.value[l]&&!Z(a.value[l].name);)l++;else if(["ArrowUp","ArrowLeft"].includes(b.key))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 d=r.value;d&&!(l>=d.$_startIndex&&l<=d.$_endIndex)&&(h=l)}c()}});const m=b=>{var l;let s=e.value;if(b==="next")for(s++;a.value[s]&&!Z(a.value[s].name);)s++;else if(b==="prev")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 d=r.value;d&&!(s>=d.$_startIndex&&s<=d.$_endIndex)&&(h=s)}c()},k=b=>{var l;let s=e.value;if(b==="next")for(s++;a.value[s]&&!Z(a.value[s].name);)s++;else if(b==="prev")for(s--;a.value[s]&&!Z(a.value[s].name);)s--;return Z((l=a.value[s])==null?void 0:l.name)??""};return je("removeFiles",async()=>{var b;i.value&&!o.sortedFiles[e.value]&&(ee.info(R("manualExitFullScreen"),5),await qe(500),(b=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||b.click(),e.value=-1)}),{previewIdx:e,onPreviewVisibleChange:g,previewing:i,previewImgMove:m,canPreview:k}}function Ka(){const e=V(),{scroller:n,stackViewEl:t,stack:i,currPage:a,currLocation:r,useEventListen:f,eventEmitter:o,getPane:h,props:g,deletedFiles:c,walker:m,sortedFiles:k}=ae().toRefs();fe(()=>i.value.length,Pe((p,M)=>{var x;p!==M&&((x=n.value)==null||x.scrollToItem(0))},300));const b=async p=>{var M;await w(p),g.value.walkModePath&&(await qe(),await((M=m.value)==null?void 0:M.reset()),o.value.emit("loadNextDir"))};gn(async()=>{var p;if(!i.value.length){const M=await ve("/");i.value.push({files:M.files,curr:"/"})}e.value=new ea,e.value.configure({parent:t.value}),g.value.path&&g.value.path!=="/"?await b(g.value.walkModePath??g.value.path):(p=B.conf)!=null&&p.home&&w(B.conf.home)}),fe(r,Pe(p=>{const M=h.value();if(!M)return;M.path=p;const x=M.path.split("/").pop(),K=(()=>{var ne;if(!g.value.walkModePath){const Y=Se(p);for(const[ye,be]of Object.entries(B.pathAliasMap))if(Y.startsWith(be))return Y.replace(be,ye);return x}return"Walk: "+(((ne=B.quickMovePaths.find(Y=>Y.dir===M.walkModePath))==null?void 0:ne.zh)??x)})();M.name=ze("div",{style:"display:flex;align-items:center"},[ze($i),ze("span",{class:"line-clamp-1",style:"max-width: 256px"},K)]),M.nameFallbackStr=K,B.recent=B.recent.filter(ne=>ne.key!==M.key),B.recent.unshift({path:p,key:M.key}),B.recent.length>20&&(B.recent=B.recent.slice(0,20))},300));const s=()=>Ne(r.value),l=async p=>{var M,x;if(p.type==="dir")try{(M=e.value)==null||M.start();const{files:G}=await ve(p.fullpath);i.value.push({files:G,curr:p.name})}finally{(x=e.value)==null||x.done()}},d=p=>{for(;p<i.value.length-1;)i.value.pop()},v=(p,M)=>(Oe(B.conf,"global.conf load failed"),B.conf.is_win?p.toLowerCase()==M.toLowerCase():p==M),w=async p=>{var x,G;const M=i.value.slice();try{yn(p)||(p=xt(((x=B.conf)==null?void 0:x.sd_cwd)??"/",p));const K=st(p),ne=i.value.map(Y=>Y.curr);for(ne.shift();ne[0]&&K[0]&&v(ne[0],K[0]);)ne.shift(),K.shift();for(let Y=0;Y<ne.length;Y++)i.value.pop();if(!K.length)return y();for(const Y of K){const ye=(G=a.value)==null?void 0:G.files.find(be=>v(be.name,Y));if(!ye)throw console.error({frags:K,frag:Y,stack:Bt(i.value)}),new Error(`${Y} not found`);await l(ye)}}catch(K){throw ee.error(R("moveFailedCheckPath")+(K instanceof Error?K.message:"")),console.error(p,st(p),a.value),i.value=M,K}},y=lt(async()=>{var p,M,x;try{if((p=e.value)==null||p.start(),m.value)await m.value.reset(),o.value.emit("loadNextDir");else{const{files:G}=await ve(i.value.length===1?"/":r.value);de(i.value).files=G}c.value.clear(),(M=n.value)==null||M.scrollToItem(0),ee.success(R("refreshCompleted"))}finally{(x=e.value)==null||x.done()}});bn("returnToIIB",lt(async()=>{var p,M;if(!g.value.walkModePath)try{(p=e.value)==null||p.start();const{files:x}=await ve(i.value.length===1?"/":r.value);de(i.value).files.map(K=>K.date).join()!==x.map(K=>K.date).join()&&(de(i.value).files=x,ee.success(R("autoUpdate")))}finally{(M=e.value)==null||M.done()}})),f.value("refresh",y);const u=p=>{g.value.walkModePath&&(h.value().walkModePath=p),b(p)},O=J(()=>B.quickMovePaths.map(p=>({...p,path:Se(p.dir)}))),C=J(()=>{const p=Se(r.value);return O.value.find(x=>x.path===p)}),E=async()=>{const p=C.value;if(p){if(!p.can_delete)return;await ai({path:r.value,type:"scanned"}),ee.success(R("removeCompleted"))}else await ri({path:r.value,type:"scanned"}),ee.success(R("addCompleted"));ot.emit("searchIndexExpired"),ot.emit("updateGlobalSetting")},P=V(!1),z=V(r.value),S=()=>{P.value=!0,z.value=r.value},Q=async()=>{await w(z.value),P.value=!1};ge("click",p=>{var M,x,G;(G=(x=(M=p.target)==null?void 0:M.className)==null?void 0:x.includes)!=null&&G.call(x,"ant-input")||(P.value=!1)});const $=()=>{const p=parent.location,M=p.href.substring(0,p.href.length-p.search.length),x=new URLSearchParams(p.search);x.set("action","open"),m.value&&x.set("walk","1"),x.set("path",r.value);const G=`${M}?${x.toString()}`;Ne(G,R("copyLocationUrlSuccessMsg"))},N=(p="tag-search")=>{const M=B.tabList[g.value.tabIdx],x={type:p,key:ce(),searchScope:r.value,name:R(p==="tag-search"?"imgSearch":"fuzzy-search")};M.panes.push(x),M.key=x.key},te=()=>o.value.emit("selectAll"),T=async()=>{await Yn(r.value),await y()},_=()=>{const p=r.value;Ie.set(p,i.value);const M=B.tabList[g.value.tabIdx],x={type:"local",key:ce(),path:p,name:R("local"),stackKey:p,walkModePath:p};M.panes.push(x),M.key=x.key},W=J(()=>!m.value&&k.value.some(p=>p.type==="dir"));return{locInputValue:z,isLocationEditing:P,onLocEditEnter:Q,onEditBtnClick:S,addToSearchScanPathAndQuickMove:E,searchPathInfo:C,refresh:y,copyLocation:s,back:d,openNext:l,currPage:a,currLocation:r,to:w,stack:i,scroller:n,share:$,selectAll:te,quickMoveTo:u,onCreateFloderBtnClick:T,onWalkBtnClick:_,showWalkButton:W,searchInCurrentDir:N}}function qa({fetchNext:e}={}){const{scroller:n,sortedFiles:t,sortMethod:i,currLocation:a,stackViewEl:r,canLoadNext:f,previewIdx:o,props:h,walker:g}=ae().toRefs(),{state:c}=ae(),m=V(!1),k=V(B.defaultGridCellWidth),b=J(()=>k.value+16),s=44,{width:l}=wn(r),d=J(()=>~~(l.value/b.value)),v=J(()=>{const E=b.value;return{first:E+(k.value<=160?0:s),second:E}}),w=V(!1),y=async()=>{var E;if(!(w.value||!h.value.walkModePath||!f.value))try{w.value=!0,await((E=g.value)==null?void 0:E.next())}finally{w.value=!1}},u=async(E=!1)=>{const P=n.value,z=()=>E?o.value:(P==null?void 0:P.$_endIndex)??0,S=()=>{const Q=t.value.length,$=50;return Q?e?z()>Q-$:z()>Q-$&&f.value:!0};for(;S();){await qe(30);const Q=await(e??y)();if(typeof Q=="boolean"&&!Q)return}};c.useEventListen("loadNextDir",u);const O=()=>{const E=n.value;if(E){const P=t.value.slice(Math.max(E.$_startIndex-10,0),E.$_endIndex+10).filter(z=>z.is_under_scanned_path&&Z(z.name)).map(z=>z.fullpath);Re.fetchImageTags(P)}};fe(a,Pe(O,150));const C=Pe(async()=>{await u(),O()},150);return{gridItems:d,sortedFiles:t,sortMethodConv:An,moreActionsDropdownShow:m,gridSize:b,sortMethod:i,onScroll:C,loadNextDir:y,loadNextDirLoading:w,canLoadNext:f,itemSize:v,cellWidth:k}}function Ga(){const{currLocation:e,sortedFiles:n,currPage:t,multiSelectedIdxs:i,eventEmitter:a,walker:r}=ae().toRefs(),f=()=>{i.value=[]};return ge("click",f),ge("blur",f),fe(t,f),{onFileDragStart:(c,m)=>{const k=Bt(n.value[m]);kt.fileDragging=!0,console.log("onFileDragStart set drag file ",c,m,k);const b=[k];let s=k.type==="dir";if(i.value.includes(m)){const d=i.value.map(v=>n.value[v]);b.push(...d),s=d.some(v=>v.type==="dir")}const l={includeDir:s,loc:e.value||"search-result",path:ct(b,"fullpath").map(d=>d.fullpath),nodes:ct(b,"fullpath"),__id:"FileTransferData"};c.dataTransfer.setData("text/plain",JSON.stringify(l))},onDrop:async c=>{if(r.value)return;const m=In(c);if(!m)return;const k=e.value;if(m.loc===k)return;const b=Qt(),s=async()=>b.pushAction(async()=>{await ei(m.path,k),a.value.emit("refresh"),he.destroyAll()}),l=()=>b.pushAction(async()=>{await Rt(m.path,k),Ee.emit("removeFiles",{paths:m.path,loc:m.loc}),a.value.emit("refresh"),he.destroyAll()});he.confirm({title:R("confirm")+"?",width:"60vw",content:()=>{let d,v,w;return A("div",null,[A("div",null,[`${R("moveSelectedFilesTo")} ${k}`,A("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[m.path.map(y=>A("li",null,[y.split(/[/\\]/).pop()]))])]),A(Dt,null,null),A("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},class:"actions"},[A(xe,{onClick:he.destroyAll},Qe(d=R("cancel"))?d:{default:()=>[d]}),A(xe,{type:"primary",loading:!b.isIdle,onClick:s},Qe(v=R("copy"))?v:{default:()=>[v]}),A(xe,{type:"primary",loading:!b.isIdle,onClick:l},Qe(w=R("move"))?w:{default:()=>[w]})])])},maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})},multiSelectedIdxs:i,onFileDragEnd:()=>{kt.fileDragging=!1}}}function Ya({openNext:e}){const n=V(!1),t=V(""),{sortedFiles:i,previewIdx:a,multiSelectedIdxs:r,stack:f,currLocation:o,spinning:h,previewing:g,stackViewEl:c,eventEmitter:m,props:k,deletedFiles:b}=ae().toRefs(),s=Se;je("removeFiles",({paths:y,loc:u})=>{s(u)!==s(o.value)||!de(f.value)||(y.forEach(C=>b.value.add(C)),y.filter(Z).forEach(C=>b.value.add(C.replace(/\.\w+$/,".txt"))))}),je("addFiles",({files:y,loc:u})=>{if(s(u)!==s(o.value))return;const O=de(f.value);O&&O.files.unshift(...y)});const l=Qt(),d=async(y,u,O)=>{a.value=O,B.fullscreenPreviewInitialUrl=se(u);const C=r.value.indexOf(O);if(y.shiftKey){if(C!==-1)r.value.splice(C,1);else{r.value.push(O),r.value.sort((z,S)=>z-S);const E=r.value[0],P=r.value[r.value.length-1];r.value=Ht(E,P+1)}y.stopPropagation()}else y.ctrlKey||y.metaKey?(C!==-1?r.value.splice(C,1):r.value.push(O),y.stopPropagation()):await e(u)},v=async(y,u,O)=>{var $,N,te;const C=se(u),E=o.value,P={IIB_container_id:parent.IIB_container_id},z=()=>{let T=[];return r.value.includes(O)?T=r.value.map(_=>i.value[_]):T.push(u),T},S=async T=>{if(!h.value)try{h.value=!0,await Pn(u.fullpath),ke.postMessage({...P,event:"click_hidden_button",btnEleId:"iib_hidden_img_update_trigger"}),await Mn(),ke.postMessage({...P,event:"click_hidden_button",btnEleId:`iib_hidden_tab_${T}`})}catch(_){console.error(_),ee.error("发送图像失败,请携带console的错误消息找开发者")}finally{h.value=!1}},Q=`${y.key}`;if(Q.startsWith("toggle-tag-")){const T=+Q.split("toggle-tag-")[1],{is_remove:_}=await si({tag_id:T,img_path:u.fullpath}),W=(N=($=B.conf)==null?void 0:$.all_custom_tags.find(p=>p.id===T))==null?void 0:N.name;await Re.refreshTags([u.fullpath]),ee.success(R(_?"removedTagFromImage":"addedTagToImage",{tag:W}));return}else if(Q.startsWith("batch-add-tag-")||Q.startsWith("batch-remove-tag-")){const T=+Q.split("-tag-")[1],_=Q.includes("add")?"add":"remove",W=z().map(p=>p.fullpath);await li({tag_id:T,img_paths:W,action:_}),await Re.refreshTags(W),ee.success(R(_==="add"?"addCompleted":"removeCompleted"));return}switch(y.key){case"previewInNewWindow":return window.open(C);case"download":{const T=z();_n(T.map(_=>se(_,!0)));break}case"copyPreviewUrl":return Ne(parent.document.location.origin+C);case"send2txt2img":return S("txt2img");case"send2img2img":return S("img2img");case"send2inpaint":return S("inpaint");case"send2extras":return S("extras");case"send2savedDir":{const T=B.quickMovePaths.find(p=>p.key==="outdir_save");if(!T)return ee.error(R("unknownSavedDir"));const _=Cn(T.dir,(te=B.conf)==null?void 0:te.sd_cwd),W=z();await Rt(W.map(p=>p.fullpath),_,!0),Ee.emit("removeFiles",{paths:W.map(p=>p.fullpath),loc:o.value}),Ee.emit("addFiles",{files:W,loc:_});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const T=y.key.split("-")[1];ke.postMessage({...P,event:"send_to_control_net",type:T,url:se(u)});break}case"send2outpaint":{t.value=await l.pushAction(()=>ut(u.fullpath)).res;const[T,_]=(t.value||"").split(`
`);ke.postMessage({...P,event:"send_to_outpaint",url:se(u),prompt:T,negPrompt:_.slice(17)});break}case"openWithWalkMode":{Ie.set(E,f.value);const T=B.tabList[k.value.tabIdx],_={type:"local",key:ce(),path:u.fullpath,name:R("local"),stackKey:E,walkModePath:u.fullpath};T.panes.push(_),T.key=_.key;break}case"openInNewTab":{Ie.set(E,f.value);const T=B.tabList[k.value.tabIdx],_={type:"local",key:ce(),path:u.fullpath,name:R("local"),stackKey:E};T.panes.push(_),T.key=_.key;break}case"openOnTheRight":{Ie.set(E,f.value);let T=B.tabList[k.value.tabIdx+1];T||(T={panes:[],key:"",id:ce()},B.tabList[k.value.tabIdx+1]=T);const _={type:"local",key:ce(),path:u.fullpath,name:R("local"),stackKey:E};T.panes.push(_),T.key=_.key;break}case"send2BatchDownload":{ia.addFiles(z());break}case"viewGenInfo":{n.value=!0,t.value=await l.pushAction(()=>ut(u.fullpath)).res;break}case"openWithLocalFileBrowser":{await En(u.fullpath);break}case"deleteFiles":{const T=z(),_=async()=>{const W=T.map(p=>p.fullpath);await ti(W),ee.success(R("deleteSuccess")),Ee.emit("removeFiles",{paths:W,loc:o.value})};if(T.length===1&&B.ignoredConfirmActions.deleteOneOnly)return _();await new Promise(W=>{he.confirm({title:R("confirmDelete"),maskClosable:!0,width:"60vw",content:()=>A("div",null,[A("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[T.map(p=>A("li",null,[p.fullpath.split(/[/\\]/).pop()]))]),A(Dt,null,null),A(Zn,{checked:B.ignoredConfirmActions.deleteOneOnly,"onUpdate:checked":p=>B.ignoredConfirmActions.deleteOneOnly=p},{default:()=>[R("deleteOneOnlySkipConfirm"),L(" ("),R("resetOnGlobalSettingsPage"),L(")")]})]),async onOk(){await _(),W()}})});break}}return{}},{isOutside:w}=kn(c);return ge("keydown",y=>{var O,C,E;const u=Xn(y);if(g.value){const P=(O=Object.entries(B.shortcut).find(z=>z[1]===u&&z[1]))==null?void 0:O[0];if(P){y.stopPropagation(),y.preventDefault();const z=a.value,S=i.value[z];switch(P){case"delete":return se(S)===B.fullscreenPreviewInitialUrl?ee.warn(R("fullscreenRestriction")):v({key:"deleteFiles"},S,z);case"download":return v({key:"download"},S,z);default:{const Q=(C=/^toggle_tag_(.*)$/.exec(P))==null?void 0:C[1],$=(E=B.conf)==null?void 0:E.all_custom_tags.find(N=>N.name===Q);return $?v({key:`toggle-tag-${$.id}`},S,z):void 0}}}}else!w.value&&["Ctrl + KeyA","Cmd + KeyA"].includes(u)&&(y.preventDefault(),y.stopPropagation(),m.value.emit("selectAll"))}),{onFileItemClick:d,onContextMenuClick:v,showGenInfo:n,imageGenInfo:t,q:l}}const Za=()=>{const{stackViewEl:e}=ae().toRefs(),n=V(-1);return Sn(e,t=>{var a;let i=t.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)&&(n.value=+r);return}}),{showMenuIdx:n}};function aa(){var e=window.navigator.userAgent,n=e.indexOf("MSIE ");if(n>0)return parseInt(e.substring(n+5,e.indexOf(".",n)),10);var t=e.indexOf("Trident/");if(t>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 Ce;function He(){He.init||(He.init=!0,Ce=aa()!==-1)}var Te={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){He(),$t(()=>{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",Ce&&this.$el.appendChild(e),e.data="about:blank",Ce||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&&(!Ce&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const ra=zn();Tn("data-v-b329ee4c");const sa={class:"resize-observer",tabindex:"-1"};Fn();const la=ra((e,n,t,i,a,r)=>(I(),H("div",sa)));Te.render=la;Te.__scopeId="data-v-b329ee4c";Te.__file="src/components/ResizeObserver.vue";function _e(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_e=function(n){return typeof n}:_e=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_e(e)}function oa(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function St(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ca(e,n,t){return n&&St(e.prototype,n),t&&St(e,t),e}function It(e){return ua(e)||da(e)||fa(e)||ha()}function ua(e){if(Array.isArray(e))return Ve(e)}function da(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function fa(e,n){if(e){if(typeof e=="string")return Ve(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ve(e,n)}}function Ve(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function ha(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function va(e){var n;return typeof e=="function"?n={callback:e}:n=e,n}function pa(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,r,f=function(h){for(var g=arguments.length,c=new Array(g>1?g-1:0),m=1;m<g;m++)c[m-1]=arguments[m];if(r=c,!(i&&h===a)){var k=t.leading;typeof k=="function"&&(k=k(h,a)),(!i||h!==a)&&k&&e.apply(void 0,[h].concat(It(r))),a=h,clearTimeout(i),i=setTimeout(function(){e.apply(void 0,[h].concat(It(r))),i=0},n)}};return f._clear=function(){clearTimeout(i),i=null},f}function Wt(e,n){if(e===n)return!0;if(_e(e)==="object"){for(var t in e)if(!Wt(e[t],n[t]))return!1;return!0}return!1}var ma=function(){function e(n,t,i){oa(this,e),this.el=n,this.observer=null,this.frozen=!1,this.createObserver(t,i)}return ca(e,[{key:"createObserver",value:function(t,i){var a=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=va(t),this.callback=function(o,h){a.options.callback(o,h),o&&a.options.once&&(a.frozen=!0,a.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},f=r.leading;this.callback=pa(this.callback,this.options.throttle,{leading:function(h){return f==="both"||f==="visible"&&h||f==="hidden"&&!h}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(o){var h=o[0];if(o.length>1){var g=o.find(function(m){return m.isIntersecting});g&&(h=g)}if(a.callback){var c=h.isIntersecting&&h.intersectionRatio>=a.threshold;if(c===a.oldResult)return;a.oldResult=c,a.callback(c,h)}},this.options.intersection),$t(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 Kt(e,n,t){var i=n.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 ma(e,i,t);e._vue_visibilityState=a}}function ga(e,n,t){var i=n.value,a=n.oldValue;if(!Wt(i,a)){var r=e._vue_visibilityState;if(!i){qt(e);return}r?r.createObserver(i,t):Kt(e,{value:i},t)}}function qt(e){var n=e._vue_visibilityState;n&&(n.destroyObserver(),delete e._vue_visibilityState)}var ya={beforeMount:Kt,updated:ga,unmounted:qt},ba={itemsLimit:1e3},wa=/(auto|scroll)/;function Gt(e,n){return e.parentNode===null?n:Gt(e.parentNode,n.concat([e]))}var $e=function(n,t){return getComputedStyle(n,null).getPropertyValue(t)},Aa=function(n){return $e(n,"overflow")+$e(n,"overflow-y")+$e(n,"overflow-x")},ka=function(n){return wa.test(Aa(n))};function Et(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var n=Gt(e.parentNode,[]),t=0;t<n.length;t+=1)if(ka(n[t]))return n[t];return document.scrollingElement||document.documentElement}}function Ue(e){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ue(e)}var Sa={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(n){return["vertical","horizontal"].includes(n)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Ia(){return this.items.length&&Ue(this.items[0])!=="object"}var Je=!1;if(typeof window<"u"){Je=!1;try{var Ea=Object.defineProperty({},"passive",{get:function(){Je=!0}});window.addEventListener("test",null,Ea)}catch{}}let Ca=0;var Yt={name:"RecycleScroller",components:{ResizeObserver:Te},directives:{ObserveVisibility:ya},props:{...Sa,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},n=this.items,t=this.sizeField,i=this.minItemSize;let a=1e4,r=0,f;for(let o=0,h=n.length;o<h;o++)f=n[o][t]||i,f<a&&(a=f),r+=f,e[o]={accumulator:r,size:f};return this.$_computedMinItemSize=a,e}return[]},simpleArray:Ia,itemIndexByKey(){const{keyField:e,items:n}=this,t={};for(let i=0,a=n.length;i<a;i++)t[n[i][e]]=i;return t}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,n,t,i,a){const r=xn({id:Ca++,index:n,used:!0,key:i,type:a}),f=Bn({item:t,position:0,nr:r});return e.push(f),f},unuseView(e,n=!1){const t=this.$_unusedViews,i=e.nr.type;let a=t.get(i);a||(a=[],t.set(i,a)),a.push(e),n||(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 n=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:t}=this.updateVisibleItems(!1,!0);t||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});n(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&n()},this.updateInterval))}},handleVisibilityChange(e,n){this.ready&&(e||n.boundingClientRect.width!==0||n.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,n=!1){const t=this.itemSize,i=this.gridItems||1,a=this.itemSecondarySize||t,r=this.$_computedMinItemSize,f=this.typeField,o=this.simpleArray?null:this.keyField,h=this.items,g=h.length,c=this.sizes,m=this.$_views,k=this.$_unusedViews,b=this.pool,s=this.itemIndexByKey;let l,d,v,w,y;if(!g)l=d=w=y=v=0;else if(this.$_prerender)l=w=0,d=y=Math.min(this.prerender,h.length),v=null;else{const S=this.getScroll();if(n){let N=S.start-this.$_lastUpdateScrollPosition;if(N<0&&(N=-N),t===null&&N<r||N<t)return{continuous:!0}}this.$_lastUpdateScrollPosition=S.start;const Q=this.buffer;S.start-=Q,S.end+=Q;let $=0;if(this.$refs.before&&($=this.$refs.before.scrollHeight,S.start-=$),this.$refs.after){const N=this.$refs.after.scrollHeight;S.end+=N}if(t===null){let N,te=0,T=g-1,_=~~(g/2),W;do W=_,N=c[_].accumulator,N<S.start?te=_:_<g-1&&c[_+1].accumulator>S.start&&(T=_),_=~~((te+T)/2);while(_!==W);for(_<0&&(_=0),l=_,v=c[g-1].accumulator,d=_;d<g&&c[d].accumulator<S.end;d++);for(d===-1?d=h.length-1:(d++,d>g&&(d=g)),w=l;w<g&&$+c[w].accumulator<S.start;w++);for(y=w;y<g&&$+c[y].accumulator<S.end;y++);}else{l=~~(S.start/t*i);const N=l%i;l-=N,d=Math.ceil(S.end/t*i),w=Math.max(0,Math.floor((S.start-$)/t*i)),y=Math.floor((S.end-$)/t*i),l<0&&(l=0),d>g&&(d=g),w<0&&(w=0),y>g&&(y=g),v=Math.ceil(g/i)*t}}d-l>ba.itemsLimit&&this.itemsLimitError(),this.totalSize=v;let u;const O=l<=this.$_endIndex&&d>=this.$_startIndex;if(O)for(let S=0,Q=b.length;S<Q;S++)u=b[S],u.nr.used&&(e&&(u.nr.index=s[u.item[o]]),(u.nr.index==null||u.nr.index<l||u.nr.index>=d)&&this.unuseView(u));const C=O?null:new Map;let E,P,z;for(let S=l;S<d;S++){E=h[S];const Q=o?E[o]:E;if(Q==null)throw new Error(`Key is ${Q} on item (keyField is '${o}')`);if(u=m.get(Q),!t&&!c[S].size){u&&this.unuseView(u);continue}P=E[f];let $=k.get(P),N=!1;if(!u)O?$&&$.length?u=$.pop():u=this.addView(b,S,E,Q,P):(z=C.get(P)||0,(!$||z>=$.length)&&(u=this.addView(b,S,E,Q,P),this.unuseView(u,!0),$=k.get(P)),u=$[z],C.set(P,z+1)),m.delete(u.nr.key),u.nr.used=!0,u.nr.index=S,u.nr.key=Q,u.nr.type=P,m.set(Q,u),N=!0;else if(!u.nr.used&&(u.nr.used=!0,u.nr.index=S,N=!0,$)){const te=$.indexOf(u);te!==-1&&$.splice(te,1)}u.item=E,N&&(S===h.length-1&&this.$emit("scroll-end"),S===0&&this.$emit("scroll-start")),t===null?(u.position=c[S-1].accumulator,u.offset=0):(u.position=Math.floor(S/i)*t,u.offset=S%i*a)}return this.$_startIndex=l,this.$_endIndex=d,this.emitUpdate&&this.$emit("update",l,d,w,y),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:O}},getListenerTarget(){let e=Et(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:n}=this,t=n==="vertical";let i;if(this.pageMode){const a=e.getBoundingClientRect(),r=t?a.height:a.width;let f=-(t?a.top:a.left),o=t?window.innerHeight:window.innerWidth;f<0&&(o+=f,f=0),f+o>r&&(o=r-f),i={start:f,end:f+o}}else t?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,Je?{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 n;const t=this.gridItems||1;this.itemSize===null?n=e>0?this.sizes[e-1].accumulator:0:n=Math.floor(e/t)*this.itemSize,this.scrollToPosition(n)},scrollToPosition(e){const n=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let t,i,a;if(this.pageMode){const r=Et(this.$el),f=r.tagName==="HTML"?0:r[n.scroll],o=r.getBoundingClientRect(),g=this.$el.getBoundingClientRect()[n.start]-o[n.start];t=r,i=n.scroll,a=e+f+g}else t=this.$el,i=n.scroll,a=e;t[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,n)=>e.nr.index-n.nr.index)}}};const _a={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Oa={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Pa(e,n,t,i,a,r){const f=Qn("ResizeObserver"),o=$n("observe-visibility");return Nn((I(),j("div",{class:ue(["vue-recycle-scroller",{ready:a.ready,"page-mode":t.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:n[0]||(n[0]=(...h)=>r.handleScroll&&r.handleScroll(...h))},[e.$slots.before?(I(),j("div",_a,[we(e.$slots,"before")],512)):q("v-if",!0),(I(),H(dt(t.listTag),{ref:"wrapper",style:Rn({[e.direction==="vertical"?"minHeight":"minWidth"]:a.totalSize+"px"}),class:ue(["vue-recycle-scroller__item-wrapper",t.listClass])},{default:F(()=>[(I(!0),j(X,null,le(a.pool,h=>(I(),H(dt(t.itemTag),Ln({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:t.gridItems?`${e.direction==="vertical"&&t.itemSecondarySize||t.itemSize}px`:void 0,height:t.gridItems?`${e.direction==="horizontal"&&t.itemSecondarySize||t.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[t.itemClass,{hover:!t.skipHover&&a.hoverKey===h.nr.key}]]},Dn(t.skipHover?{}:{mouseenter:()=>{a.hoverKey=h.nr.key},mouseleave:()=>{a.hoverKey=null}})),{default:F(()=>[we(e.$slots,"default",{item:h.item,index:h.nr.index,active:h.nr.used})]),_:2},1040,["style","class"]))),128)),we(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(I(),j("div",Oa,[we(e.$slots,"after")],512)):q("v-if",!0),A(f,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[o,r.handleVisibilityChange]])}Yt.render=Pa;Yt.__file="src/components/RecycleScroller.vue";const Ct=Me({__name:"ContextMenu",props:{file:{},idx:{},selectedTag:{},disableDelete:{type:Boolean},isSelectedMutilFiles:{type:Boolean}},emits:["contextMenuClick"],setup(e,{emit:n}){const t=e,i=Ke(),a=J(()=>{var r;return(((r=i.conf)==null?void 0:r.all_custom_tags)??[]).reduce((f,o)=>[...f,{...o,selected:!!t.selectedTag.find(h=>h.id===o.id)}],[])});return(r,f)=>{const o=Nt,h=jn,g=Hn,c=Lt;return I(),H(c,{onClick:f[0]||(f[0]=m=>n("contextMenuClick",m,r.file,r.idx))},{default:F(()=>{var m;return[A(o,{key:"deleteFiles",disabled:r.disableDelete},{default:F(()=>[L(D(r.$t("deleteSelected")),1)]),_:1},8,["disabled"]),r.file.type==="dir"?(I(),j(X,{key:0},[A(o,{key:"openInNewTab"},{default:F(()=>[L(D(r.$t("openInNewTab")),1)]),_:1}),A(o,{key:"openOnTheRight"},{default:F(()=>[L(D(r.$t("openOnTheRight")),1)]),_:1}),A(o,{key:"openWithWalkMode"},{default:F(()=>[L(D(r.$t("openWithWalkMode")),1)]),_:1})],64)):q("",!0),r.file.type==="file"?(I(),j(X,{key:1},[U(Z)(r.file.name)?(I(),j(X,{key:0},[A(o,{key:"viewGenInfo"},{default:F(()=>[L(D(r.$t("viewGenerationInfo")),1)]),_:1}),A(h),((m=U(i).conf)==null?void 0:m.launch_mode)!=="server"?(I(),j(X,{key:0},[A(o,{key:"send2txt2img"},{default:F(()=>[L(D(r.$t("sendToTxt2img")),1)]),_:1}),A(o,{key:"send2img2img"},{default:F(()=>[L(D(r.$t("sendToImg2img")),1)]),_:1}),A(o,{key:"send2inpaint"},{default:F(()=>[L(D(r.$t("sendToInpaint")),1)]),_:1}),A(o,{key:"send2extras"},{default:F(()=>[L(D(r.$t("sendToExtraFeatures")),1)]),_:1}),A(g,{key:"sendToThirdPartyExtension",title:r.$t("sendToThirdPartyExtension")},{default:F(()=>[A(o,{key:"send2controlnet-txt2img"},{default:F(()=>[L("ControlNet - "+D(r.$t("t2i")),1)]),_:1}),A(o,{key:"send2controlnet-img2img"},{default:F(()=>[L("ControlNet - "+D(r.$t("i2i")),1)]),_:1}),A(o,{key:"send2outpaint"},{default:F(()=>[L("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):q("",!0),A(o,{key:"send2BatchDownload"},{default:F(()=>[L(D(r.$t("sendToBatchDownload")),1)]),_:1}),A(o,{key:"send2savedDir"},{default:F(()=>[L(D(r.$t("send2savedDir")),1)]),_:1}),A(h),r.isSelectedMutilFiles?(I(),j(X,{key:1},[A(g,{key:"batch-add-tag",title:r.$t("batchAddTag")},{default:F(()=>[(I(!0),j(X,null,le(a.value,k=>(I(),H(o,{key:`batch-add-tag-${k.id}`},{default:F(()=>[L(D(k.name),1)]),_:2},1024))),128))]),_:1},8,["title"]),A(g,{key:"batch-remove-tag",title:r.$t("batchRemoveTag")},{default:F(()=>[(I(!0),j(X,null,le(a.value,k=>(I(),H(o,{key:`batch-remove-tag-${k.id}`},{default:F(()=>[L(D(k.name),1)]),_:2},1024))),128))]),_:1},8,["title"])],64)):(I(),H(g,{key:"toggle-tag",title:r.$t("toggleTag")},{default:F(()=>[(I(!0),j(X,null,le(a.value,k=>(I(),H(o,{key:`toggle-tag-${k.id}`},{default:F(()=>[L(D(k.name)+" ",1),k.selected?(I(),H(U(jt),{key:0})):(I(),H(U(Vt),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"])),A(o,{key:"openWithLocalFileBrowser"},{default:F(()=>[L(D(r.$t("openWithLocalFileBrowser")),1)]),_:1})],64)):q("",!0),A(o,{key:"previewInNewWindow"},{default:F(()=>[L(D(r.$t("previewInNewWindow")),1)]),_:1}),A(o,{key:"download"},{default:F(()=>[L(D(r.$t("download")),1)]),_:1}),A(o,{key:"copyPreviewUrl"},{default:F(()=>[L(D(r.$t("copySourceFilePreviewLink")),1)]),_:1})],64)):q("",!0)]}),_:1})}}}),Ma=["data-idx"],Ta={key:1,class:"more"},Fa={class:"float-btn-wrap"},za={key:0,class:"tags-container"},xa={class:"play-icon"},Ba={key:0,class:"tags-container"},Qa={key:4,class:"preview-icon-wrap"},$a={key:5,class:"profile"},Na={class:"name line-clamp-1"},La={class:"basic-info"},Da=Me({__name:"FileItem",props:{file:{},idx:{},selected:{type:Boolean,default:!1},showMenuIdx:{},cellWidth:{},fullScreenPreviewImageUrl:{},enableRightClickMenu:{type:Boolean,default:!0},enableCloseIcon:{type:Boolean,default:!1},isSelectedMutilFiles:{type:Boolean}},emits:["update:showMenuIdx","fileItemClick","dragstart","dragend","previewVisibleChange","contextMenuClick","close-icon-click"],setup(e,{emit:n}){const t=e;Vn(c=>({"6b5a16d0":c.$props.cellWidth+"px"}));const i=Ke(),a=Jt(),r=J(()=>a.tagMap.get(t.file.fullpath)??[]),f=J(()=>{const c=i.gridThumbnailResolution;return i.enableThumbnail?Un(t.file,[c,c].join("x")):se(t.file)}),o=J(()=>{var c;return(((c=i.conf)==null?void 0:c.all_custom_tags)??[]).reduce((m,k)=>[...m,{...k,selected:!!r.value.find(b=>b.id===k.id)}],[])}),h=J(()=>o.value.find(c=>c.type==="custom"&&c.name==="like")),g=()=>{Oe(h.value),n("contextMenuClick",{key:`toggle-tag-${h.value.id}`},t.file,t.idx)};return(c,m)=>{const k=pe,b=Nt,s=Lt,l=qn,d=hi;return I(),H(k,{trigger:["contextmenu"],visible:U(i).longPressOpenContextMenu?typeof c.idx=="number"&&c.showMenuIdx===c.idx:void 0,"onUpdate:visible":m[8]||(m[8]=v=>typeof c.idx=="number"&&n("update:showMenuIdx",v?c.idx:-1))},{overlay:F(()=>[c.enableRightClickMenu?(I(),H(Ct,{key:0,file:c.file,idx:c.idx,"selected-tag":r.value,onContextMenuClick:m[7]||(m[7]=(v,w,y)=>n("contextMenuClick",v,w,y)),"is-selected-mutil-files":c.isSelectedMutilFiles},null,8,["file","idx","selected-tag","is-selected-mutil-files"])):q("",!0)]),default:F(()=>[(I(),j("li",{class:ue(["file file-item-trigger grid",{clickable:c.file.type==="dir",selected:c.selected}]),"data-idx":c.idx,key:c.file.name,draggable:"true",onDragstart:m[4]||(m[4]=v=>n("dragstart",v,c.idx)),onDragend:m[5]||(m[5]=v=>n("dragend",v,c.idx)),onClickCapture:m[6]||(m[6]=v=>n("fileItemClick",v,c.file,c.idx))},[ie("div",null,[c.enableCloseIcon?(I(),j("div",{key:0,class:"close-icon",onClick:m[0]||(m[0]=v=>n("close-icon-click"))},[A(U(Jn))])):q("",!0),c.enableRightClickMenu?(I(),j("div",Ta,[A(k,null,{overlay:F(()=>[A(Ct,{file:c.file,idx:c.idx,"selected-tag":r.value,onContextMenuClick:m[1]||(m[1]=(v,w,y)=>n("contextMenuClick",v,w,y)),"is-selected-mutil-files":c.isSelectedMutilFiles},null,8,["file","idx","selected-tag","is-selected-mutil-files"])]),default:F(()=>[ie("div",Fa,[A(U(Wn))])]),_:1}),c.file.type==="file"?(I(),H(k,{key:0},{overlay:F(()=>[o.value.length>1?(I(),H(s,{key:0,onClick:m[2]||(m[2]=v=>n("contextMenuClick",v,c.file,c.idx))},{default:F(()=>[(I(!0),j(X,null,le(o.value,v=>(I(),H(b,{key:`toggle-tag-${v.id}`},{default:F(()=>[L(D(v.name)+" ",1),v.selected?(I(),H(U(jt),{key:0})):(I(),H(U(Vt),{key:1}))]),_:2},1024))),128))]),_:1})):q("",!0)]),default:F(()=>{var v,w;return[ie("div",{class:ue(["float-btn-wrap",{"like-selected":(v=h.value)==null?void 0:v.selected}]),onClick:g},[(w=h.value)!=null&&w.selected?(I(),H(U(Ri),{key:0})):(I(),H(U(Ui),{key:1}))],2)]}),_:1})):q("",!0)])):q("",!0),U(Z)(c.file.name)?(I(),j("div",{key:c.file.fullpath,class:ue(`idx-${c.idx} item-content`)},[A(l,{src:f.value,fallback:U(Fi),preview:{src:c.fullScreenPreviewImageUrl,onVisibleChange:(v,w)=>n("previewVisibleChange",v,w)}},null,8,["src","fallback","preview"]),r.value&&c.cellWidth>128?(I(),j("div",za,[(I(!0),j(X,null,le(r.value,v=>(I(),H(d,{key:v.id,color:U(a).getColor(v.name)},{default:F(()=>[L(D(v.name),1)]),_:2},1032,["color"]))),128))])):q("",!0)],2)):U(Kn)(c.file.name)?(I(),j("div",{key:3,class:ue(`idx-${c.idx} item-content video`),onClick:m[3]||(m[3]=v=>U(ni)(c.file))},[ie("div",xa,[A(U(qi))]),r.value&&c.cellWidth>128?(I(),j("div",Ba,[(I(!0),j(X,null,le(r.value,v=>(I(),H(d,{key:v.id,color:U(a).getColor(v.name)},{default:F(()=>[L(D(v.name),1)]),_:2},1032,["color"]))),128))])):q("",!0)],2)):(I(),j("div",Qa,[c.file.type==="file"?(I(),H(U(wi),{key:0,class:"icon center"})):(I(),H(U(Ii),{key:1,class:"icon center"}))])),c.cellWidth>128?(I(),j("div",$a,[ie("div",Na,D(c.file.name),1),ie("div",La,[ie("div",null,D(c.file.size),1),ie("div",null,D(c.file.date),1)])])):q("",!0)])],42,Ma))]),_:1},8,["visible"])}}});const Xa=Gn(Da,[["__scopeId","data-v-8b135d68"]]);export{Xa as F,Ct as _,Ka as a,qa as b,Ga as c,Ya as d,Wa as e,Za as f,Yt as g,je as h,Jt as i,ge as j,na as k,Ie as s,ae as u};