From 0dc117c41fa9182757ce85d96e1e3f79da944b18 Mon Sep 17 00:00:00 2001 From: zanllp Date: Wed, 21 Jun 2023 00:22:14 +0800 Subject: [PATCH] Revert "Revert "Fix issue with dragging and dropping files from search results page"" This reverts commit df267c551e404743a12dbe58ea9de4926932bb11. --- vue/dist/assets/MatchedImageGrid-a6088856.css | 1 - vue/dist/assets/MatchedImageGrid-c3669272.js | 1 + vue/dist/assets/MatchedImageGrid-c6dd7328.js | 1 - vue/dist/assets/MatchedImageGrid-d5ef6daf.css | 1 + vue/dist/assets/SubstrSearch-50945367.css | 1 - vue/dist/assets/SubstrSearch-66ef0359.js | 1 + vue/dist/assets/SubstrSearch-d97a6e0c.js | 1 - vue/dist/assets/SubstrSearch-e138ba8f.css | 1 + .../assets/{TagSearch-b60ab014.js => TagSearch-436869c8.js} | 2 +- vue/dist/assets/{db-f752a0b1.js => db-89fdf46d.js} | 2 +- .../{emptyStartup-508527f1.js => emptyStartup-54657ab7.js} | 2 +- ...extMenu-c0cd1bbd.js => fullScreenContextMenu-01ffa640.js} | 2 +- .../{globalSetting-f5336043.js => globalSetting-b4392f4a.js} | 2 +- vue/dist/assets/hook-7125bc0b.js | 1 - vue/dist/assets/hook-93ddaeff.js | 1 + vue/dist/assets/{hook-b7fce3b0.js => hook-dadee24a.js} | 4 ++-- vue/dist/assets/{index-d77bcb54.js => index-2ccb5782.js} | 2 +- vue/dist/assets/{index-7ab29b41.js => index-6f28cdca.js} | 2 +- .../assets/{stackView-0e934d10.js => stackView-91ffbd75.js} | 2 +- vue/dist/index.html | 2 +- vue/src/page/TagSearch/MatchedImageGrid.vue | 4 +++- vue/src/page/TagSearch/SubstrSearch.vue | 5 ++++- vue/src/page/TagSearch/hook.ts | 3 ++- vue/src/page/fileTransfer/hook.ts | 2 +- 24 files changed, 26 insertions(+), 20 deletions(-) delete mode 100644 vue/dist/assets/MatchedImageGrid-a6088856.css create mode 100644 vue/dist/assets/MatchedImageGrid-c3669272.js delete mode 100644 vue/dist/assets/MatchedImageGrid-c6dd7328.js create mode 100644 vue/dist/assets/MatchedImageGrid-d5ef6daf.css delete mode 100644 vue/dist/assets/SubstrSearch-50945367.css create mode 100644 vue/dist/assets/SubstrSearch-66ef0359.js delete mode 100644 vue/dist/assets/SubstrSearch-d97a6e0c.js create mode 100644 vue/dist/assets/SubstrSearch-e138ba8f.css rename vue/dist/assets/{TagSearch-b60ab014.js => TagSearch-436869c8.js} (99%) rename vue/dist/assets/{db-f752a0b1.js => db-89fdf46d.js} (96%) rename vue/dist/assets/{emptyStartup-508527f1.js => emptyStartup-54657ab7.js} (99%) rename vue/dist/assets/{fullScreenContextMenu-c0cd1bbd.js => fullScreenContextMenu-01ffa640.js} (99%) rename vue/dist/assets/{globalSetting-f5336043.js => globalSetting-b4392f4a.js} (98%) delete mode 100644 vue/dist/assets/hook-7125bc0b.js create mode 100644 vue/dist/assets/hook-93ddaeff.js rename vue/dist/assets/{hook-b7fce3b0.js => hook-dadee24a.js} (58%) rename vue/dist/assets/{index-d77bcb54.js => index-2ccb5782.js} (99%) rename vue/dist/assets/{index-7ab29b41.js => index-6f28cdca.js} (99%) rename vue/dist/assets/{stackView-0e934d10.js => stackView-91ffbd75.js} (97%) diff --git a/vue/dist/assets/MatchedImageGrid-a6088856.css b/vue/dist/assets/MatchedImageGrid-a6088856.css deleted file mode 100644 index 5a78fb1..0000000 --- a/vue/dist/assets/MatchedImageGrid-a6088856.css +++ /dev/null @@ -1 +0,0 @@ -.preview-switch[data-v-2a47e96e]{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-2a47e96e]{color:#fff;margin:16px;font-size:4em;pointer-events:all;cursor:pointer}.preview-switch>*.disable[data-v-2a47e96e]{opacity:0;pointer-events:none;cursor:none}.container[data-v-2a47e96e]{background:var(--zp-secondary-background)}.container .file-list[data-v-2a47e96e]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%} diff --git a/vue/dist/assets/MatchedImageGrid-c3669272.js b/vue/dist/assets/MatchedImageGrid-c3669272.js new file mode 100644 index 0000000..e7ff6a9 --- /dev/null +++ b/vue/dist/assets/MatchedImageGrid-c3669272.js @@ -0,0 +1 @@ +import{d as P,y as U,o as r,l as _,c as l,m as a,n as e,p as y,q as b,B as q,t as h,C as E,z as M,K as u,O as S,R as L,v as K,W as Q}from"./index-2ccb5782.js";import{a as W,f as j,L as H,R as J,b as X,S as Y}from"./fullScreenContextMenu-01ffa640.js";import{t as Z}from"./hook-dadee24a.js";import{g as ee}from"./db-89fdf46d.js";import{u as te}from"./hook-93ddaeff.js";const se={class:"hint"},ie={key:1,class:"preview-switch"},le=P({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(V){const m=V,{queue:p,images:s,onContextMenuClickU:f,stackViewEl:z,previewIdx:n,previewing:v,onPreviewVisibleChange:T,previewImgMove:g,canPreview:I,itemSize:k,gridItems:B,showGenInfo:o,imageGenInfo:C,q:$,multiSelectedIdxs:D,onFileItemClick:F,scroller:w,showMenuIdx:d,onFileDragStart:G}=te();return U(()=>m.selectedTagIds,async()=>{var t;const{res:c}=p.pushAction(()=>ee(m.selectedTagIds));s.value=await c,(t=w.value)==null||t.scrollToItem(0)},{immediate:!0}),(c,t)=>{const R=L,A=K,N=Y;return r(),_("div",{class:"container",ref_key:"stackViewEl",ref:z},[l(N,{size:"large",spinning:!e(p).isIdle},{default:a(()=>[l(A,{visible:e(o),"onUpdate:visible":t[1]||(t[1]=i=>y(o)?o.value=i:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=i=>o.value=!1)},{cancelText:a(()=>[]),default:a(()=>[l(R,{active:"",loading:!e($).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]=i=>e(q)(e(C)))},[b("div",se,h(c.$t("doubleClickToCopy")),1),E(" "+h(e(C)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(s)?(r(),M(e(W),{key:0,ref_key:"scroller",ref:w,class:"file-list",items:e(s),"item-size":e(k).first,"key-field":"fullpath","item-secondary-size":e(k).second,gridItems:e(B)},{default:a(({item:i,index:x})=>[l(j,{idx:x,file:i,"show-menu-idx":e(d),"onUpdate:showMenuIdx":t[3]||(t[3]=O=>y(d)?d.value=O:null),onDragstart:e(G),onFileItemClick:e(F),"full-screen-preview-image-url":e(s)[e(n)]?e(Z)(e(s)[e(n)]):"",selected:e(D).includes(x),onContextMenuClick:e(f),onPreviewVisibleChange:e(T)},null,8,["idx","file","show-menu-idx","onDragstart","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):u("",!0),e(v)?(r(),_("div",ie,[l(e(H),{onClick:t[4]||(t[4]=i=>e(g)("prev")),class:S({disable:!e(I)("prev")})},null,8,["class"]),l(e(J),{onClick:t[5]||(t[5]=i=>e(g)("next")),class:S({disable:!e(I)("next")})},null,8,["class"])])):u("",!0)]),_:1},8,["spinning"]),e(v)&&e(s)&&e(s)[e(n)]?(r(),M(X,{key:0,file:e(s)[e(n)],idx:e(n),onContextMenuClick:e(f)},null,8,["file","idx","onContextMenuClick"])):u("",!0)],512)}}});const ce=Q(le,[["__scopeId","data-v-5a51edf4"]]);export{ce as default}; diff --git a/vue/dist/assets/MatchedImageGrid-c6dd7328.js b/vue/dist/assets/MatchedImageGrid-c6dd7328.js deleted file mode 100644 index 84587ea..0000000 --- a/vue/dist/assets/MatchedImageGrid-c6dd7328.js +++ /dev/null @@ -1 +0,0 @@ -import{d as P,y as U,o as r,l as _,c as l,m as a,n as e,p as y,q as b,B as q,t as h,C as E,z as M,K as u,O as S,R as D,v as L,W as K}from"./index-d77bcb54.js";import{a as Q,f as W,L as j,R as H,b as J,S as X}from"./fullScreenContextMenu-c0cd1bbd.js";import{t as Y}from"./hook-b7fce3b0.js";import{g as Z}from"./db-f752a0b1.js";import{u as ee}from"./hook-7125bc0b.js";const se={class:"hint"},ie={key:1,class:"preview-switch"},te=P({__name:"MatchedImageGrid",props:{tabIdx:{},paneIdx:{},selectedTagIds:{},id:{}},setup(V){const m=V,{queue:p,images:i,onContextMenuClickU:f,stackViewEl:z,previewIdx:n,previewing:v,onPreviewVisibleChange:T,previewImgMove:g,canPreview:I,itemSize:k,gridItems:B,showGenInfo:o,imageGenInfo:C,q:$,multiSelectedIdxs:G,onFileItemClick:R,scroller:w,showMenuIdx:d}=ee();return U(()=>m.selectedTagIds,async()=>{var s;const{res:c}=p.pushAction(()=>Z(m.selectedTagIds));i.value=await c,(s=w.value)==null||s.scrollToItem(0)},{immediate:!0}),(c,s)=>{const A=D,F=L,N=X;return r(),_("div",{class:"container",ref_key:"stackViewEl",ref:z},[l(N,{size:"large",spinning:!e(p).isIdle},{default:a(()=>[l(F,{visible:e(o),"onUpdate:visible":s[1]||(s[1]=t=>y(o)?o.value=t:null),width:"70vw","mask-closable":"",onOk:s[2]||(s[2]=t=>o.value=!1)},{cancelText:a(()=>[]),default:a(()=>[l(A,{active:"",loading:!e($).isIdle},{default:a(()=>[b("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[0]||(s[0]=t=>e(q)(e(C)))},[b("div",se,h(c.$t("doubleClickToCopy")),1),E(" "+h(e(C)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(i)?(r(),M(e(Q),{key:0,ref_key:"scroller",ref:w,class:"file-list",items:e(i),"item-size":e(k).first,"key-field":"fullpath","item-secondary-size":e(k).second,gridItems:e(B)},{default:a(({item:t,index:x})=>[l(W,{idx:x,file:t,"show-menu-idx":e(d),"onUpdate:showMenuIdx":s[3]||(s[3]=O=>y(d)?d.value=O:null),onFileItemClick:e(R),"full-screen-preview-image-url":e(i)[e(n)]?e(Y)(e(i)[e(n)]):"",selected:e(G).includes(x),onContextMenuClick:e(f),onPreviewVisibleChange:e(T)},null,8,["idx","file","show-menu-idx","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):u("",!0),e(v)?(r(),_("div",ie,[l(e(j),{onClick:s[4]||(s[4]=t=>e(g)("prev")),class:S({disable:!e(I)("prev")})},null,8,["class"]),l(e(H),{onClick:s[5]||(s[5]=t=>e(g)("next")),class:S({disable:!e(I)("next")})},null,8,["class"])])):u("",!0)]),_:1},8,["spinning"]),e(v)&&e(i)&&e(i)[e(n)]?(r(),M(J,{key:0,file:e(i)[e(n)],idx:e(n),onContextMenuClick:e(f)},null,8,["file","idx","onContextMenuClick"])):u("",!0)],512)}}});const de=K(te,[["__scopeId","data-v-2a47e96e"]]);export{de as default}; diff --git a/vue/dist/assets/MatchedImageGrid-d5ef6daf.css b/vue/dist/assets/MatchedImageGrid-d5ef6daf.css new file mode 100644 index 0000000..cc0a68c --- /dev/null +++ b/vue/dist/assets/MatchedImageGrid-d5ef6daf.css @@ -0,0 +1 @@ +.preview-switch[data-v-5a51edf4]{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-5a51edf4]{color:#fff;margin:16px;font-size:4em;pointer-events:all;cursor:pointer}.preview-switch>*.disable[data-v-5a51edf4]{opacity:0;pointer-events:none;cursor:none}.container[data-v-5a51edf4]{background:var(--zp-secondary-background)}.container .file-list[data-v-5a51edf4]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%} diff --git a/vue/dist/assets/SubstrSearch-50945367.css b/vue/dist/assets/SubstrSearch-50945367.css deleted file mode 100644 index 6a28bd6..0000000 --- a/vue/dist/assets/SubstrSearch-50945367.css +++ /dev/null @@ -1 +0,0 @@ -.search-bar[data-v-837e8af1]{padding:8px;display:flex}.preview-switch[data-v-837e8af1]{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-837e8af1]{color:#fff;margin:16px;font-size:4em;pointer-events:all;cursor:pointer}.preview-switch>*.disable[data-v-837e8af1]{opacity:0;pointer-events:none;cursor:none}.container[data-v-837e8af1]{background:var(--zp-secondary-background)}.container .file-list[data-v-837e8af1]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%} diff --git a/vue/dist/assets/SubstrSearch-66ef0359.js b/vue/dist/assets/SubstrSearch-66ef0359.js new file mode 100644 index 0000000..27890ca --- /dev/null +++ b/vue/dist/assets/SubstrSearch-66ef0359.js @@ -0,0 +1 @@ +import{d as Q,r as V,ax as W,bq as j,br as J,o,l as k,c as r,n as e,bw as X,z as m,m as u,C as w,t as v,K as f,p as $,q as A,B as Y,O as D,bu as Z,af as ee,I as te,V as se,R as ae,v as ne,W as ie}from"./index-2ccb5782.js";import{a as le,f as oe,L as re,R as ue,b as de,S as ce}from"./fullScreenContextMenu-01ffa640.js";/* empty css */import{t as pe}from"./hook-dadee24a.js";import{a as U,c as me,e as ve,u as fe}from"./db-89fdf46d.js";import{u as ge}from"./hook-93ddaeff.js";const ke={key:0,class:"search-bar"},we={class:"hint"},ye={key:1,class:"preview-switch"},Ce=Q({__name:"SubstrSearch",setup(be){const{queue:l,images:n,onContextMenuClickU:y,stackViewEl:F,previewIdx:d,previewing:C,onPreviewVisibleChange:R,previewImgMove:b,canPreview:I,itemSize:_,gridItems:q,showGenInfo:c,imageGenInfo:x,q:E,multiSelectedIdxs:K,onFileItemClick:N,scroller:h,showMenuIdx:g,onFileDragStart:O}=ge(),p=V(""),s=V();W(async()=>{s.value=await U(),s.value.img_count&&s.value.expired&&S()});const S=j(()=>l.pushAction(async()=>(await fe(),s.value=await U(),s.value)).res),z=async()=>{var a;n.value=await l.pushAction(()=>ve(p.value)).res,(a=h.value)==null||a.scrollToItem(0),n.value.length||Z.info(ee("fuzzy-search-noResults"))};return J("return-to-iib",async()=>{const a=await l.pushAction(me).res;s.value.expired=a.expired}),(a,t)=>{const P=te,M=se,T=ae,G=ne,L=ce;return o(),k("div",{class:"container",ref_key:"stackViewEl",ref:F},[s.value?(o(),k("div",ke,[r(P,{value:p.value,"onUpdate:value":t[0]||(t[0]=i=>p.value=i),placeholder:a.$t("fuzzy-search-placeholder"),disabled:!e(l).isIdle,onKeydown:X(z,["enter"])},null,8,["value","placeholder","disabled","onKeydown"]),s.value.expired||!s.value.img_count?(o(),m(M,{key:0,onClick:e(S),loading:!e(l).isIdle,type:"primary"},{default:u(()=>[w(v(s.value.img_count===0?a.$t("generateIndexHint"):a.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(o(),m(M,{key:1,type:"primary",onClick:z,loading:!e(l).isIdle,disabled:!p.value},{default:u(()=>[w(v(a.$t("search")),1)]),_:1},8,["loading","disabled"]))])):f("",!0),r(L,{size:"large",spinning:!e(l).isIdle},{default:u(()=>[r(G,{visible:e(c),"onUpdate:visible":t[2]||(t[2]=i=>$(c)?c.value=i:null),width:"70vw","mask-closable":"",onOk:t[3]||(t[3]=i=>c.value=!1)},{cancelText:u(()=>[]),default:u(()=>[r(T,{active:"",loading:!e(E).isIdle},{default:u(()=>[A("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:t[1]||(t[1]=i=>e(Y)(e(x)))},[A("div",we,v(a.$t("doubleClickToCopy")),1),w(" "+v(e(x)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(n)?(o(),m(e(le),{key:0,ref_key:"scroller",ref:h,class:"file-list",items:e(n),"item-size":e(_).first,"key-field":"fullpath","item-secondary-size":e(_).second,gridItems:e(q)},{default:u(({item:i,index:B})=>[r(oe,{idx:B,file:i,"show-menu-idx":e(g),"onUpdate:showMenuIdx":t[4]||(t[4]=H=>$(g)?g.value=H:null),onFileItemClick:e(N),"full-screen-preview-image-url":e(n)[e(d)]?e(pe)(e(n)[e(d)]):"",selected:e(K).includes(B),onContextMenuClick:e(y),onDragstart:e(O),onPreviewVisibleChange:e(R)},null,8,["idx","file","show-menu-idx","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onDragstart","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):f("",!0),e(C)?(o(),k("div",ye,[r(e(re),{onClick:t[5]||(t[5]=i=>e(b)("prev")),class:D({disable:!e(I)("prev")})},null,8,["class"]),r(e(ue),{onClick:t[6]||(t[6]=i=>e(b)("next")),class:D({disable:!e(I)("next")})},null,8,["class"])])):f("",!0)]),_:1},8,["spinning"]),e(C)&&e(n)&&e(n)[e(d)]?(o(),m(de,{key:1,file:e(n)[e(d)],idx:e(d),onContextMenuClick:e(y)},null,8,["file","idx","onContextMenuClick"])):f("",!0)],512)}}});const Me=ie(Ce,[["__scopeId","data-v-a2e6e698"]]);export{Me as default}; diff --git a/vue/dist/assets/SubstrSearch-d97a6e0c.js b/vue/dist/assets/SubstrSearch-d97a6e0c.js deleted file mode 100644 index 7be2819..0000000 --- a/vue/dist/assets/SubstrSearch-d97a6e0c.js +++ /dev/null @@ -1 +0,0 @@ -import{d as H,r as V,ax as Q,bq as W,br as j,o,l as k,c as r,n as e,bw as J,z as m,m as u,C as w,t as v,K as f,p as $,q as A,B as X,O as U,bu as Y,af as Z,I as ee,V as se,R as te,v as ne,W as ie}from"./index-d77bcb54.js";import{a as ae,f as le,L as oe,R as re,b as ue,S as de}from"./fullScreenContextMenu-c0cd1bbd.js";/* empty css */import{t as ce}from"./hook-b7fce3b0.js";import{a as R,c as pe,e as me,u as ve}from"./db-f752a0b1.js";import{u as fe}from"./hook-7125bc0b.js";const ge={key:0,class:"search-bar"},ke={class:"hint"},we={key:1,class:"preview-switch"},ye=H({__name:"SubstrSearch",setup(Ce){const{queue:l,images:i,onContextMenuClickU:y,stackViewEl:q,previewIdx:d,previewing:C,onPreviewVisibleChange:D,previewImgMove:b,canPreview:I,itemSize:_,gridItems:E,showGenInfo:c,imageGenInfo:x,q:F,multiSelectedIdxs:K,onFileItemClick:N,scroller:h,showMenuIdx:g}=fe(),p=V(""),t=V();Q(async()=>{t.value=await R(),t.value.img_count&&t.value.expired&&S()});const S=W(()=>l.pushAction(async()=>(await ve(),t.value=await R(),t.value)).res),z=async()=>{var n;i.value=await l.pushAction(()=>me(p.value)).res,(n=h.value)==null||n.scrollToItem(0),i.value.length||Y.info(Z("fuzzy-search-noResults"))};return j("return-to-iib",async()=>{const n=await l.pushAction(pe).res;t.value.expired=n.expired}),(n,s)=>{const O=ee,M=se,P=te,T=ne,G=de;return o(),k("div",{class:"container",ref_key:"stackViewEl",ref:q},[t.value?(o(),k("div",ge,[r(O,{value:p.value,"onUpdate:value":s[0]||(s[0]=a=>p.value=a),placeholder:n.$t("fuzzy-search-placeholder"),disabled:!e(l).isIdle,onKeydown:J(z,["enter"])},null,8,["value","placeholder","disabled","onKeydown"]),t.value.expired||!t.value.img_count?(o(),m(M,{key:0,onClick:e(S),loading:!e(l).isIdle,type:"primary"},{default:u(()=>[w(v(t.value.img_count===0?n.$t("generateIndexHint"):n.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(o(),m(M,{key:1,type:"primary",onClick:z,loading:!e(l).isIdle,disabled:!p.value},{default:u(()=>[w(v(n.$t("search")),1)]),_:1},8,["loading","disabled"]))])):f("",!0),r(G,{size:"large",spinning:!e(l).isIdle},{default:u(()=>[r(T,{visible:e(c),"onUpdate:visible":s[2]||(s[2]=a=>$(c)?c.value=a:null),width:"70vw","mask-closable":"",onOk:s[3]||(s[3]=a=>c.value=!1)},{cancelText:u(()=>[]),default:u(()=>[r(P,{active:"",loading:!e(F).isIdle},{default:u(()=>[A("div",{style:{width:"100%","word-break":"break-all","white-space":"pre-line","max-height":"70vh",overflow:"auto"},onDblclick:s[1]||(s[1]=a=>e(X)(e(x)))},[A("div",ke,v(n.$t("doubleClickToCopy")),1),w(" "+v(e(x)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),e(i)?(o(),m(e(ae),{key:0,ref_key:"scroller",ref:h,class:"file-list",items:e(i),"item-size":e(_).first,"key-field":"fullpath","item-secondary-size":e(_).second,gridItems:e(E)},{default:u(({item:a,index:B})=>[r(le,{idx:B,file:a,"show-menu-idx":e(g),"onUpdate:showMenuIdx":s[4]||(s[4]=L=>$(g)?g.value=L:null),onFileItemClick:e(N),"full-screen-preview-image-url":e(i)[e(d)]?e(ce)(e(i)[e(d)]):"",selected:e(K).includes(B),onContextMenuClick:e(y),onPreviewVisibleChange:e(D)},null,8,["idx","file","show-menu-idx","onFileItemClick","full-screen-preview-image-url","selected","onContextMenuClick","onPreviewVisibleChange"])]),_:1},8,["items","item-size","item-secondary-size","gridItems"])):f("",!0),e(C)?(o(),k("div",we,[r(e(oe),{onClick:s[5]||(s[5]=a=>e(b)("prev")),class:U({disable:!e(I)("prev")})},null,8,["class"]),r(e(re),{onClick:s[6]||(s[6]=a=>e(b)("next")),class:U({disable:!e(I)("next")})},null,8,["class"])])):f("",!0)]),_:1},8,["spinning"]),e(C)&&e(i)&&e(i)[e(d)]?(o(),m(ue,{key:1,file:e(i)[e(d)],idx:e(d),onContextMenuClick:e(y)},null,8,["file","idx","onContextMenuClick"])):f("",!0)],512)}}});const ze=ie(ye,[["__scopeId","data-v-837e8af1"]]);export{ze as default}; diff --git a/vue/dist/assets/SubstrSearch-e138ba8f.css b/vue/dist/assets/SubstrSearch-e138ba8f.css new file mode 100644 index 0000000..20b2afd --- /dev/null +++ b/vue/dist/assets/SubstrSearch-e138ba8f.css @@ -0,0 +1 @@ +.search-bar[data-v-a2e6e698]{padding:8px;display:flex}.preview-switch[data-v-a2e6e698]{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-a2e6e698]{color:#fff;margin:16px;font-size:4em;pointer-events:all;cursor:pointer}.preview-switch>*.disable[data-v-a2e6e698]{opacity:0;pointer-events:none;cursor:none}.container[data-v-a2e6e698]{background:var(--zp-secondary-background)}.container .file-list[data-v-a2e6e698]{list-style:none;padding:8px;height:100%;overflow:auto;height:var(--pane-max-height);width:100%} diff --git a/vue/dist/assets/TagSearch-b60ab014.js b/vue/dist/assets/TagSearch-436869c8.js similarity index 99% rename from vue/dist/assets/TagSearch-b60ab014.js rename to vue/dist/assets/TagSearch-436869c8.js index 0eba141..23d0383 100644 --- a/vue/dist/assets/TagSearch-b60ab014.js +++ b/vue/dist/assets/TagSearch-436869c8.js @@ -1 +1 @@ -import{P as D,Y as ye,d as ae,bg as pe,aP as be,r as F,bi as _e,y as Ce,u as ge,ag as Q,Z as X,h as x,c as v,a as Y,bj as xe,b as Ae,f as Ie,bk as we,a1 as se,bl as ke,a0 as Pe,i as $e,aT as Oe,bm as Se,a3 as Be,a4 as Ke,a5 as Ee,ae as Te,aL as Ne,aK as Re,bn as Me,bo as je,x as De,bp as Fe,ah as Ue,ax as Ve,bq as Le,br as qe,o as C,l as S,K as q,s as J,q as M,t as B,n as K,S as te,z as W,m as V,C as z,E as oe,O as ie,bs as ze,A as re,$ as Ge,bt as He,bu as ce,af as ne,v as We,V as de,I as Qe,bv as Ye,W as Ze}from"./index-d77bcb54.js";/* empty css *//* empty css */import{b as Je,a as ue,c as Xe,d as ea,r as aa,u as ta}from"./db-f752a0b1.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:D.object,expandIconPosition:D.oneOf(ye("left","right")),collapsible:{type:String},ghost:{type:Boolean,default:void 0},onChange:Function,"onUpdate:activeKey":Function}},he=function(){return{openAnimation:D.object,prefixCls:String,header:D.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:D.any,panelKey:D.oneOfType([D.string,D.number]),collapsible:{type:String},role:String,onItemClick:{type:Function}}};function ve(n){var e=n;if(!Array.isArray(e)){var t=Ae(e);e=t==="number"||t==="string"?[e]:[]}return e.map(function(l){return String(l)})}const Z=ae({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:pe(na(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,openAnimation:be("ant-motion-collapse",!1),expandIconPosition:"left"}),slots:["expandIcon"],setup:function(e,t){var l=t.attrs,c=t.slots,s=t.emit,o=F(ve(_e([e.activeKey,e.defaultActiveKey])));Ce(function(){return e.activeKey},function(){o.value=ve(e.activeKey)},{deep:!0});var f=ge("collapse",e),g=f.prefixCls,P=f.direction,E=Q(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,b=y?y(r):v(ke,{rotate:r.isActive?90:void 0},null);return v("div",null,[Pe(Array.isArray(y)?b[0]:b)?se(b,{class:"".concat(g.value,"-arrow")},!1):b])},T=function(r){e.activeKey===void 0&&(o.value=r);var u=e.accordion?r[0]:r;s("update:activeKey",u),s("change",u)},$=function(r){var u=o.value;if(e.accordion)u=u[0]===r?[]:[r];else{u=$e(u);var y=u.indexOf(r),b=y>-1;b?u.splice(y,1):u.push(r)}T(u)},j=function(r,u){var y,b,R;if(!we(r)){var a=o.value,i=e.accordion,_=e.destroyInactivePanel,k=e.collapsible,O=e.openAnimation,A=String((y=r.key)!==null&&y!==void 0?y:u),w=r.props||{},I=w.header,p=I===void 0?(b=r.children)===null||b===void 0||(R=b.header)===null||R===void 0?void 0:R.call(b):I,G=w.headerClass,m=w.collapsible,L=w.disabled,U=!1;i?U=a[0]===A:U=a.indexOf(A)>-1;var H=m??k;(L||L==="")&&(H="disabled");var me={key:A,panelKey:A,header:p,headerClass:G,isActive:U,prefixCls:g.value,destroyInactivePanel:_,openAnimation:O,accordion:i,onItemClick:H==="disabled"?null:$,expandIcon:h,collapsible:H};return se(r,me)}},N=function(){var r;return Ie((r=c.default)===null||r===void 0?void 0:r.call(c)).map(j)};return function(){var d,r=e.accordion,u=e.bordered,y=e.ghost,b=X((d={},x(d,g.value,!0),x(d,"".concat(g.value,"-borderless"),!u),x(d,"".concat(g.value,"-icon-position-").concat(E.value),!0),x(d,"".concat(g.value,"-rtl"),P.value==="rtl"),x(d,"".concat(g.value,"-ghost"),!!y),x(d,l.class,!!l.class),d));return v("div",Y(Y({class:b},xe(l)),{},{style:l.style,role:r?"tablist":null}),[N()])}}}),la=ae({compatConfig:{MODE:3},name:"PanelContent",props:he(),setup:function(e,t){var l=t.slots,c=F(!1);return Oe(function(){(e.isActive||e.forceRender)&&(c.value=!0)}),function(){var s,o;if(!c.value)return null;var f=e.prefixCls,g=e.isActive,P=e.role;return v("div",{ref:F,class:X("".concat(f,"-content"),(s={},x(s,"".concat(f,"-content-active"),g),x(s,"".concat(f,"-content-inactive"),!g),s)),role:P},[v("div",{class:"".concat(f,"-content-box")},[(o=l.default)===null||o===void 0?void 0:o.call(l)])])}}}),ee=ae({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:pe(he(),{showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1}),slots:["expandIcon","extra","header"],setup:function(e,t){var l=t.slots,c=t.emit,s=t.attrs;Se(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');var o=ge("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 E,h,T,$,j=e.header,N=j===void 0?(E=l.header)===null||E===void 0?void 0:E.call(l):j,d=e.headerClass,r=e.isActive,u=e.showArrow,y=e.destroyInactivePanel,b=e.accordion,R=e.forceRender,a=e.openAnimation,i=e.expandIcon,_=i===void 0?l.expandIcon:i,k=e.extra,O=k===void 0?(h=l.extra)===null||h===void 0?void 0:h.call(l):k,A=e.collapsible,w=A==="disabled",I=f.value,p=X("".concat(I,"-header"),(T={},x(T,d,d),x(T,"".concat(I,"-header-collapsible-only"),A==="header"),T)),G=X(($={},x($,"".concat(I,"-item"),!0),x($,"".concat(I,"-item-active"),r),x($,"".concat(I,"-item-disabled"),w),x($,"".concat(I,"-no-arrow"),!u),x($,"".concat(s.class),!!s.class),$)),m=v("i",{class:"arrow"},null);u&&typeof _=="function"&&(m=_(e));var L=Be(v(la,{prefixCls:I,isActive:r,forceRender:R,role:b?"tabpanel":null},{default:l.default}),[[Ke,r]]),U=Y({appear:!1,css:!1},a);return v("div",Y(Y({},s),{},{class:G}),[v("div",{class:p,onClick:function(){return A!=="header"&&g()},role:b?"tab":"button",tabindex:w?-1:0,"aria-expanded":r,onKeypress:P},[u&&m,A==="header"?v("span",{onClick:g,class:"".concat(I,"-header-text")},[N]):N,O&&v("div",{class:"".concat(I,"-extra")},[O])]),v(Ee,U,{default:function(){return[!y||r?L:null]}})])}}});Z.Panel=ee;Z.install=function(n){return n.component(Z.name,Z),n.component(ee.name,ee),n};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 fe(n){for(var e=1;e!l.isIdle),s=F(),o=F({and_tags:[],or_tags:[],not_tags:[]}),f=Q(()=>s.value?s.value.tags.slice().sort((a,i)=>i.count-a.count):[]),g=["custom","Model","lora","pos","size","Postprocess upscaler","Postprocess upscale by","Sampler"].reduce((a,i,_)=>(a[i]=_,a),{}),P=Q(()=>Object.entries(xa(f.value,a=>a.type)).sort((a,i)=>g[a[0]]-g[i[0]])),E=Ue(),h=F(P.value.map(a=>a[0]));Ve(async()=>{s.value=await ue(),h.value=P.value.map(a=>a[0]),s.value.img_count&&s.value.expired&&T()});const T=Le(()=>l.pushAction(async()=>(await ta(),s.value=await ue(),h.value=P.value.map(a=>a[0]),s.value)).res),$=()=>{t.openTagSearchMatchedImageGridInRight(e.tabIdx,E,o.value)};qe("return-to-iib",async()=>{const a=await l.pushAction(Xe).res;s.value.expired=a.expired});const j=(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,_,k;if(!d.value){N.value=!1;return}const a=await l.pushAction(()=>ea({tag_name:d.value})).res;a.type!=="custom"&&ce.error(ne("existInOtherType")),(i=s.value)!=null&&i.tags.find(O=>O.id===a.id)?ce.error(ne("alreadyExists")):((_=s.value)==null||_.tags.push(a),(k=t.conf)==null||k.all_custom_tags.push(a)),d.value="",N.value=!1},u=a=>{We.confirm({title:ne("confirmDelete"),async onOk(){var _,k,O,A;await aa({tag_id:a});const i=((_=s.value)==null?void 0:_.tags.findIndex(w=>w.id===a))??-1;(k=s.value)==null||k.tags.splice(i,1),(A=t.conf)==null||A.all_custom_tags.splice((O=t.conf)==null?void 0:O.all_custom_tags.findIndex(w=>w.id===a),1)}})},y=Q(()=>new Set([o.value.and_tags,o.value.or_tags,o.value.not_tags].flat())),b=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:j,optionText:a=>j(a,!0)};return(a,i)=>{const _=de,k=Qe,O=de,A=Ye,w=ee,I=Z;return C(),S("div",Aa,[q("",!0),s.value?(C(),S(J,{key:1},[M("div",null,[M("div",Ia,[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"]),s.value.expired||!s.value.img_count?(C(),W(_,{key:0,onClick:K(T),loading:!K(l).isIdle,type:"primary"},{default:V(()=>[z(B(s.value.img_count===0?a.$t("generateIndexHint"):a.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(C(),W(_,{key:1,type:"primary",onClick:$,loading:!K(l).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(J,null,oe(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:ie(["arrow",{down:h.value.includes(p)}])},null,8,["class"]),z(" "+B(a.$t(p)),1)],8,Ka),v(I,{ghost:"",activeKey:h.value,"onUpdate:activeKey":i[5]||(i[5]=m=>h.value=m)},{expandIcon:V(()=>[]),default:V(()=>[(C(),W(w,{key:p},{default:V(()=>[(C(!0),S(J,null,oe(G,(m,L)=>(C(),S("li",{key:m.id,class:ie(["tag",{selected:y.value.has(m.id)}]),onClick:U=>b(m)},[y.value.has(m.id)?(C(),W(K(ze),{key:0})):q("",!0),z(" "+B(j(m))+" ",1),p==="custom"&&L!==0?(C(),S("span",{key:1,class:"remove",onClickCapture:re(U=>u(m.id),["stop"])},[v(K(Ge))],40,Ta)):q("",!0)],10,Ea))),128)),p==="custom"?(C(),S("li",{key:0,class:"tag",onClick:i[4]||(i[4]=m=>N.value=!0)},[N.value?(C(),W(A,{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:re(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(J,{key:1},[v(K(He)),z(" "+B(a.$t("add")),1)],64))])):q("",!0)]),_:2},1024))]),_:2},1032,["activeKey"])]))),128))])],64)):q("",!0)])}}});const Fa=Ze(Na,[["__scopeId","data-v-d55ebc48"]]);export{Fa as default}; +import{P as D,Y as ye,d as ae,bg as pe,aP as be,r as F,bi as _e,y as Ce,u as ge,ag as Q,Z as X,h as x,c as v,a as Y,bj as xe,b as Ae,f as Ie,bk as we,a1 as se,bl as ke,a0 as Pe,i as $e,aT as Oe,bm as Se,a3 as Be,a4 as Ke,a5 as Ee,ae as Te,aL as Ne,aK as Re,bn as Me,bo as je,x as De,bp as Fe,ah as Ue,ax as Ve,bq as Le,br as qe,o as C,l as S,K as q,s as J,q as M,t as B,n as K,S as te,z as W,m as V,C as z,E as oe,O as ie,bs as ze,A as re,$ as Ge,bt as He,bu as ce,af as ne,v as We,V as de,I as Qe,bv as Ye,W as Ze}from"./index-2ccb5782.js";/* empty css *//* empty css */import{b as Je,a as ue,c as Xe,d as ea,r as aa,u as ta}from"./db-89fdf46d.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:D.object,expandIconPosition:D.oneOf(ye("left","right")),collapsible:{type:String},ghost:{type:Boolean,default:void 0},onChange:Function,"onUpdate:activeKey":Function}},he=function(){return{openAnimation:D.object,prefixCls:String,header:D.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:D.any,panelKey:D.oneOfType([D.string,D.number]),collapsible:{type:String},role:String,onItemClick:{type:Function}}};function ve(n){var e=n;if(!Array.isArray(e)){var t=Ae(e);e=t==="number"||t==="string"?[e]:[]}return e.map(function(l){return String(l)})}const Z=ae({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:pe(na(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,openAnimation:be("ant-motion-collapse",!1),expandIconPosition:"left"}),slots:["expandIcon"],setup:function(e,t){var l=t.attrs,c=t.slots,s=t.emit,o=F(ve(_e([e.activeKey,e.defaultActiveKey])));Ce(function(){return e.activeKey},function(){o.value=ve(e.activeKey)},{deep:!0});var f=ge("collapse",e),g=f.prefixCls,P=f.direction,E=Q(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,b=y?y(r):v(ke,{rotate:r.isActive?90:void 0},null);return v("div",null,[Pe(Array.isArray(y)?b[0]:b)?se(b,{class:"".concat(g.value,"-arrow")},!1):b])},T=function(r){e.activeKey===void 0&&(o.value=r);var u=e.accordion?r[0]:r;s("update:activeKey",u),s("change",u)},$=function(r){var u=o.value;if(e.accordion)u=u[0]===r?[]:[r];else{u=$e(u);var y=u.indexOf(r),b=y>-1;b?u.splice(y,1):u.push(r)}T(u)},j=function(r,u){var y,b,R;if(!we(r)){var a=o.value,i=e.accordion,_=e.destroyInactivePanel,k=e.collapsible,O=e.openAnimation,A=String((y=r.key)!==null&&y!==void 0?y:u),w=r.props||{},I=w.header,p=I===void 0?(b=r.children)===null||b===void 0||(R=b.header)===null||R===void 0?void 0:R.call(b):I,G=w.headerClass,m=w.collapsible,L=w.disabled,U=!1;i?U=a[0]===A:U=a.indexOf(A)>-1;var H=m??k;(L||L==="")&&(H="disabled");var me={key:A,panelKey:A,header:p,headerClass:G,isActive:U,prefixCls:g.value,destroyInactivePanel:_,openAnimation:O,accordion:i,onItemClick:H==="disabled"?null:$,expandIcon:h,collapsible:H};return se(r,me)}},N=function(){var r;return Ie((r=c.default)===null||r===void 0?void 0:r.call(c)).map(j)};return function(){var d,r=e.accordion,u=e.bordered,y=e.ghost,b=X((d={},x(d,g.value,!0),x(d,"".concat(g.value,"-borderless"),!u),x(d,"".concat(g.value,"-icon-position-").concat(E.value),!0),x(d,"".concat(g.value,"-rtl"),P.value==="rtl"),x(d,"".concat(g.value,"-ghost"),!!y),x(d,l.class,!!l.class),d));return v("div",Y(Y({class:b},xe(l)),{},{style:l.style,role:r?"tablist":null}),[N()])}}}),la=ae({compatConfig:{MODE:3},name:"PanelContent",props:he(),setup:function(e,t){var l=t.slots,c=F(!1);return Oe(function(){(e.isActive||e.forceRender)&&(c.value=!0)}),function(){var s,o;if(!c.value)return null;var f=e.prefixCls,g=e.isActive,P=e.role;return v("div",{ref:F,class:X("".concat(f,"-content"),(s={},x(s,"".concat(f,"-content-active"),g),x(s,"".concat(f,"-content-inactive"),!g),s)),role:P},[v("div",{class:"".concat(f,"-content-box")},[(o=l.default)===null||o===void 0?void 0:o.call(l)])])}}}),ee=ae({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:pe(he(),{showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1}),slots:["expandIcon","extra","header"],setup:function(e,t){var l=t.slots,c=t.emit,s=t.attrs;Se(e.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');var o=ge("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 E,h,T,$,j=e.header,N=j===void 0?(E=l.header)===null||E===void 0?void 0:E.call(l):j,d=e.headerClass,r=e.isActive,u=e.showArrow,y=e.destroyInactivePanel,b=e.accordion,R=e.forceRender,a=e.openAnimation,i=e.expandIcon,_=i===void 0?l.expandIcon:i,k=e.extra,O=k===void 0?(h=l.extra)===null||h===void 0?void 0:h.call(l):k,A=e.collapsible,w=A==="disabled",I=f.value,p=X("".concat(I,"-header"),(T={},x(T,d,d),x(T,"".concat(I,"-header-collapsible-only"),A==="header"),T)),G=X(($={},x($,"".concat(I,"-item"),!0),x($,"".concat(I,"-item-active"),r),x($,"".concat(I,"-item-disabled"),w),x($,"".concat(I,"-no-arrow"),!u),x($,"".concat(s.class),!!s.class),$)),m=v("i",{class:"arrow"},null);u&&typeof _=="function"&&(m=_(e));var L=Be(v(la,{prefixCls:I,isActive:r,forceRender:R,role:b?"tabpanel":null},{default:l.default}),[[Ke,r]]),U=Y({appear:!1,css:!1},a);return v("div",Y(Y({},s),{},{class:G}),[v("div",{class:p,onClick:function(){return A!=="header"&&g()},role:b?"tab":"button",tabindex:w?-1:0,"aria-expanded":r,onKeypress:P},[u&&m,A==="header"?v("span",{onClick:g,class:"".concat(I,"-header-text")},[N]):N,O&&v("div",{class:"".concat(I,"-extra")},[O])]),v(Ee,U,{default:function(){return[!y||r?L:null]}})])}}});Z.Panel=ee;Z.install=function(n){return n.component(Z.name,Z),n.component(ee.name,ee),n};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 fe(n){for(var e=1;e!l.isIdle),s=F(),o=F({and_tags:[],or_tags:[],not_tags:[]}),f=Q(()=>s.value?s.value.tags.slice().sort((a,i)=>i.count-a.count):[]),g=["custom","Model","lora","pos","size","Postprocess upscaler","Postprocess upscale by","Sampler"].reduce((a,i,_)=>(a[i]=_,a),{}),P=Q(()=>Object.entries(xa(f.value,a=>a.type)).sort((a,i)=>g[a[0]]-g[i[0]])),E=Ue(),h=F(P.value.map(a=>a[0]));Ve(async()=>{s.value=await ue(),h.value=P.value.map(a=>a[0]),s.value.img_count&&s.value.expired&&T()});const T=Le(()=>l.pushAction(async()=>(await ta(),s.value=await ue(),h.value=P.value.map(a=>a[0]),s.value)).res),$=()=>{t.openTagSearchMatchedImageGridInRight(e.tabIdx,E,o.value)};qe("return-to-iib",async()=>{const a=await l.pushAction(Xe).res;s.value.expired=a.expired});const j=(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,_,k;if(!d.value){N.value=!1;return}const a=await l.pushAction(()=>ea({tag_name:d.value})).res;a.type!=="custom"&&ce.error(ne("existInOtherType")),(i=s.value)!=null&&i.tags.find(O=>O.id===a.id)?ce.error(ne("alreadyExists")):((_=s.value)==null||_.tags.push(a),(k=t.conf)==null||k.all_custom_tags.push(a)),d.value="",N.value=!1},u=a=>{We.confirm({title:ne("confirmDelete"),async onOk(){var _,k,O,A;await aa({tag_id:a});const i=((_=s.value)==null?void 0:_.tags.findIndex(w=>w.id===a))??-1;(k=s.value)==null||k.tags.splice(i,1),(A=t.conf)==null||A.all_custom_tags.splice((O=t.conf)==null?void 0:O.all_custom_tags.findIndex(w=>w.id===a),1)}})},y=Q(()=>new Set([o.value.and_tags,o.value.or_tags,o.value.not_tags].flat())),b=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:j,optionText:a=>j(a,!0)};return(a,i)=>{const _=de,k=Qe,O=de,A=Ye,w=ee,I=Z;return C(),S("div",Aa,[q("",!0),s.value?(C(),S(J,{key:1},[M("div",null,[M("div",Ia,[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"]),s.value.expired||!s.value.img_count?(C(),W(_,{key:0,onClick:K(T),loading:!K(l).isIdle,type:"primary"},{default:V(()=>[z(B(s.value.img_count===0?a.$t("generateIndexHint"):a.$t("UpdateIndex")),1)]),_:1},8,["onClick","loading"])):(C(),W(_,{key:1,type:"primary",onClick:$,loading:!K(l).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(J,null,oe(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:ie(["arrow",{down:h.value.includes(p)}])},null,8,["class"]),z(" "+B(a.$t(p)),1)],8,Ka),v(I,{ghost:"",activeKey:h.value,"onUpdate:activeKey":i[5]||(i[5]=m=>h.value=m)},{expandIcon:V(()=>[]),default:V(()=>[(C(),W(w,{key:p},{default:V(()=>[(C(!0),S(J,null,oe(G,(m,L)=>(C(),S("li",{key:m.id,class:ie(["tag",{selected:y.value.has(m.id)}]),onClick:U=>b(m)},[y.value.has(m.id)?(C(),W(K(ze),{key:0})):q("",!0),z(" "+B(j(m))+" ",1),p==="custom"&&L!==0?(C(),S("span",{key:1,class:"remove",onClickCapture:re(U=>u(m.id),["stop"])},[v(K(Ge))],40,Ta)):q("",!0)],10,Ea))),128)),p==="custom"?(C(),S("li",{key:0,class:"tag",onClick:i[4]||(i[4]=m=>N.value=!0)},[N.value?(C(),W(A,{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:re(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(J,{key:1},[v(K(He)),z(" "+B(a.$t("add")),1)],64))])):q("",!0)]),_:2},1024))]),_:2},1032,["activeKey"])]))),128))])],64)):q("",!0)])}}});const Fa=Ze(Na,[["__scopeId","data-v-d55ebc48"]]);export{Fa as default}; diff --git a/vue/dist/assets/db-f752a0b1.js b/vue/dist/assets/db-89fdf46d.js similarity index 96% rename from vue/dist/assets/db-f752a0b1.js rename to vue/dist/assets/db-89fdf46d.js index bc6d5e8..8f710bc 100644 --- a/vue/dist/assets/db-f752a0b1.js +++ b/vue/dist/assets/db-89fdf46d.js @@ -1 +1 @@ -import{ct as I,cu as _,c3 as A,aL as P,b5 as m,cv as y,b7 as b,cw as C,b3 as E,bn as R,c9 as a}from"./index-d77bcb54.js";function O(t){return function(n){return n==null?void 0:n[t]}}var D=1,M=2;function T(t,n,e,s){var r=e.length,c=r,d=!s;if(t==null)return!c;for(t=Object(t);r--;){var i=e[r];if(d&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++r(await a.get("/db/basic_info")).data,q=async()=>(await a.get("/db/expired_dirs")).data,H=async()=>{await a.post("/db/update_image_data",{},{timeout:1/0})},J=async t=>(await a.post("/db/match_images_by_tags",t)).data,Q=async t=>(await a.post("/db/add_custom_tag",t)).data,W=async t=>(await a.post("/db/toggle_custom_tag_to_img",t)).data,X=async t=>{await a.post("/db/remove_custom_tag",t)},Y=async t=>(await a.get("/db/img_selected_custom_tag",{params:{path:t}})).data,Z=async t=>(await a.get("/db/search_by_substr",{params:{substr:t}})).data,l="/db/scanned_paths",z=async t=>{await a.post(l,{path:t})},k=async t=>{await a.delete(l,{data:{path:t}})};export{$ as a,U as b,q as c,Q as d,Z as e,Y as f,J as g,k as h,z as i,X as r,W as t,H as u}; +import{ct as I,cu as _,c3 as A,aL as P,b5 as m,cv as y,b7 as b,cw as C,b3 as E,bn as R,c9 as a}from"./index-2ccb5782.js";function O(t){return function(n){return n==null?void 0:n[t]}}var D=1,M=2;function T(t,n,e,s){var r=e.length,c=r,d=!s;if(t==null)return!c;for(t=Object(t);r--;){var i=e[r];if(d&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++r(await a.get("/db/basic_info")).data,q=async()=>(await a.get("/db/expired_dirs")).data,H=async()=>{await a.post("/db/update_image_data",{},{timeout:1/0})},J=async t=>(await a.post("/db/match_images_by_tags",t)).data,Q=async t=>(await a.post("/db/add_custom_tag",t)).data,W=async t=>(await a.post("/db/toggle_custom_tag_to_img",t)).data,X=async t=>{await a.post("/db/remove_custom_tag",t)},Y=async t=>(await a.get("/db/img_selected_custom_tag",{params:{path:t}})).data,Z=async t=>(await a.get("/db/search_by_substr",{params:{substr:t}})).data,l="/db/scanned_paths",z=async t=>{await a.post(l,{path:t})},k=async t=>{await a.delete(l,{data:{path:t}})};export{$ as a,U as b,q as c,Q as d,Z as e,Y as f,J as g,k as h,z as i,X as r,W as t,H as u}; diff --git a/vue/dist/assets/emptyStartup-508527f1.js b/vue/dist/assets/emptyStartup-54657ab7.js similarity index 99% rename from vue/dist/assets/emptyStartup-508527f1.js rename to vue/dist/assets/emptyStartup-54657ab7.js index 319fac3..4add3da 100644 --- a/vue/dist/assets/emptyStartup-508527f1.js +++ b/vue/dist/assets/emptyStartup-54657ab7.js @@ -1 +1 @@ -import{X as re,Y as ue,d as te,u as de,r as A,g as D,Z as ve,h as y,c as u,$ as pe,a0 as fe,a1 as he,a2 as me,a3 as ge,a4 as _e,a as Y,a5 as be,P as C,a6 as ye,a7 as ke,a8 as we,a9 as Ce,aa as Oe,ab as xe,ac as Ie,ad as Se,ae as ne,x as $e,af as L,ag as Z,o as r,l as d,q as o,t as v,n as f,K as k,z as ze,m as T,A as F,s as H,E as j,C as Pe,ah as J,ai as Me,aj as Ae,V as De,ak as Le,al as Fe,W as He}from"./index-d77bcb54.js";var je={success:ye,info:ke,error:we,warning:Ce},Be={success:Oe,info:xe,error:Ie,warning:Se},Ne=ue("success","info","warning","error"),Ve=function(){return{type:C.oneOf(Ne),closable:{type:Boolean,default:void 0},closeText:C.any,message:C.any,description:C.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:C.any,closeIcon:C.any,onClose:Function}},Ee=te({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:Ve(),setup:function(t,e){var l=e.slots,i=e.emit,b=e.attrs,I=e.expose,S=de("alert",t),B=S.prefixCls,N=S.direction,a=A(!1),h=A(!1),w=A(),m=function(n){n.preventDefault();var p=w.value;p.style.height="".concat(p.offsetHeight,"px"),p.style.height="".concat(p.offsetHeight,"px"),a.value=!0,i("close",n)},g=function(){var n;a.value=!1,h.value=!0,(n=t.afterClose)===null||n===void 0||n.call(t)};I({animationEnd:g});var $=A({});return function(){var _,n,p=t.banner,W=t.closeIcon,G=W===void 0?(_=l.closeIcon)===null||_===void 0?void 0:_.call(l):W,V=t.closable,O=t.type,x=t.showIcon,E=D(l,t,"closeText"),z=D(l,t,"description"),Q=D(l,t,"message"),P=D(l,t,"icon");x=p&&x===void 0?!0:x,O=p&&O===void 0?"warning":O||"info";var se=(z?Be:je)[O]||null;E&&(V=!0);var c=B.value,oe=ve(c,(n={},y(n,"".concat(c,"-").concat(O),!0),y(n,"".concat(c,"-closing"),a.value),y(n,"".concat(c,"-with-description"),!!z),y(n,"".concat(c,"-no-icon"),!x),y(n,"".concat(c,"-banner"),!!p),y(n,"".concat(c,"-closable"),V),y(n,"".concat(c,"-rtl"),N.value==="rtl"),n)),le=V?u("button",{type:"button",onClick:m,class:"".concat(c,"-close-icon"),tabindex:0},[E?u("span",{class:"".concat(c,"-close-text")},[E]):G===void 0?u(pe,null,null):G]):null,ce=P&&(fe(P)?he(P,{class:"".concat(c,"-icon")}):u("span",{class:"".concat(c,"-icon")},[P]))||u(se,{class:"".concat(c,"-icon")},null),ie=me("".concat(c,"-motion"),{appear:!1,css:!0,onAfterLeave:g,onBeforeLeave:function(M){M.style.maxHeight="".concat(M.offsetHeight,"px")},onLeave:function(M){M.style.maxHeight="0px"}});return h.value?null:u(be,ie,{default:function(){return[ge(u("div",Y(Y({role:"alert"},b),{},{style:[b.style,$.value],class:[b.class,oe],"data-show":!a.value,ref:w}),[x?ce:null,u("div",{class:"".concat(c,"-content")},[Q?u("div",{class:"".concat(c,"-message")},[Q]):null,z?u("div",{class:"".concat(c,"-description")},[z]):null]),le]),[[_e,!a.value]])]}})}}});const Te=re(Ee);var qe={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 Re=qe;function U(s){for(var t=1;t(Le("data-v-b43e34c7"),s=s(),Fe(),s),Ze={class:"container"},Je={class:"header"},Ue={key:0,style:{"margin-left":"16px","font-size":"1.5em"}},Ke=ae(()=>o("div",{"flex-placeholder":""},null,-1)),et={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/131",target:"_blank",class:"last-record"},tt={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90",target:"_blank",class:"last-record"},nt={class:"access-mode-message"},at=ae(()=>o("div",{"flex-placeholder":""},null,-1)),st={class:"content"},ot={key:0,class:"quick-start"},lt={key:1,class:"quick-start"},ct=["onClick"],it={class:"text line-clamp-1"},rt={class:"quick-start"},ut=["onClick"],dt={class:"text line-clamp-1"},vt={class:"text line-clamp-1"},pt={class:"text line-clamp-1"},ft={key:2,class:"quick-start"},ht=["onClick"],mt={class:"text line-clamp-1"},gt=te({__name:"emptyStartup",props:{tabIdx:{},paneIdx:{}},setup(s){const t=s,e=$e(),l={local:L("local"),"tag-search":L("imgSearch"),"fuzzy-search":L("fuzzy-search"),"global-setting":L("globalSettings")},i=(a,h,w=!1)=>{let m;switch(a){case"tag-search-matched-image-grid":return;case"global-setting":case"tag-search":case"fuzzy-search":case"empty":m={type:a,name:l[a],key:Date.now()+J()};break;case"local":m={type:a,name:l[a],key:Date.now()+J(),path:h,walkModePath:w?h:void 0}}const g=e.tabList[t.tabIdx];g.panes.splice(t.paneIdx,1,m),g.key=m.key},b=Z(()=>{var a;return(a=e.tabListHistoryRecord)==null?void 0:a[1]}),I=Z(()=>e.quickMovePaths.filter(({key:a})=>a==="outdir_txt2img_samples"||a==="outdir_img2img_samples")),S=window.parent!==window,B=()=>window.parent.open("/infinite_image_browsing"),N=()=>{Me(b.value),e.tabList=Ae(b.value.tabs)};return(a,h)=>{var g,$,_;const w=Te,m=De;return r(),d("div",Ze,[o("div",Je,[o("h1",null,v(a.$t("welcome")),1),(g=f(e).conf)!=null&&g.enable_access_control&&f(e).dontShowAgain?(r(),d("div",Ue,[u(f(ee),{title:"Access Control mode",style:{"vertical-align":"text-bottom"}})])):k("",!0),Ke,o("a",et,v(a.$t("changlog")),1),o("a",tt,v(a.$t("faq")),1)]),($=f(e).conf)!=null&&$.enable_access_control&&!f(e).dontShowAgain?(r(),ze(w,{key:0,"show-icon":""},{message:T(()=>[o("div",nt,[o("div",null,v(a.$t("accessControlModeTips")),1),at,o("a",{onClick:h[0]||(h[0]=F(n=>f(e).dontShowAgain=!0,["prevent"]))},v(a.$t("dontShowAgain")),1)])]),icon:T(()=>[u(f(ee))]),_:1})):k("",!0),o("div",st,[I.value.length?(r(),d("div",ot,[o("h2",null,v(a.$t("walkMode")),1),o("ul",null,[(r(!0),d(H,null,j(I.value,n=>(r(),d("li",{key:n.dir,class:"item"},[u(m,{onClick:p=>i("local",n.dir,!0),ghost:"",type:"primary",block:""},{default:T(()=>[Pe(v(n.zh),1)]),_:2},1032,["onClick"])]))),128))])])):k("",!0),f(e).quickMovePaths.length?(r(),d("div",lt,[o("h2",null,v(a.$t("launchFromQuickMove")),1),o("ul",null,[(r(!0),d(H,null,j(f(e).quickMovePaths,n=>(r(),d("li",{key:n.key,class:"item",onClick:F(p=>i("local",n.dir),["prevent"])},[o("span",it,v(n.zh),1)],8,ct))),128))])])):k("",!0),o("div",rt,[o("h2",null,v(a.$t("launch")),1),o("ul",null,[(r(!0),d(H,null,j(Object.keys(l),n=>(r(),d("li",{key:n,class:"item",onClick:F(p=>i(n),["prevent"])},[o("span",dt,v(l[n]),1)],8,ut))),128)),S?(r(),d("li",{key:0,class:"item",onClick:B},[o("span",vt,v(a.$t("openInNewWindow")),1)])):k("",!0),(_=b.value)!=null&&_.tabs.length?(r(),d("li",{key:1,class:"item",onClick:N},[o("span",pt,v(a.$t("restoreLastRecord")),1)])):k("",!0)])]),f(e).recent.length?(r(),d("div",ft,[o("h2",null,v(a.$t("recent")),1),o("ul",null,[(r(!0),d(H,null,j(f(e).recent,n=>(r(),d("li",{key:n.key,class:"item",onClick:F(p=>i("local",n.path),["prevent"])},[u(f(Ge),{class:"icon"}),o("span",mt,v(n.path),1)],8,ht))),128))])])):k("",!0)])])}}});const bt=He(gt,[["__scopeId","data-v-b43e34c7"]]);export{bt as default}; +import{X as re,Y as ue,d as te,u as de,r as A,g as D,Z as ve,h as y,c as u,$ as pe,a0 as fe,a1 as he,a2 as me,a3 as ge,a4 as _e,a as Y,a5 as be,P as C,a6 as ye,a7 as ke,a8 as we,a9 as Ce,aa as Oe,ab as xe,ac as Ie,ad as Se,ae as ne,x as $e,af as L,ag as Z,o as r,l as d,q as o,t as v,n as f,K as k,z as ze,m as T,A as F,s as H,E as j,C as Pe,ah as J,ai as Me,aj as Ae,V as De,ak as Le,al as Fe,W as He}from"./index-2ccb5782.js";var je={success:ye,info:ke,error:we,warning:Ce},Be={success:Oe,info:xe,error:Ie,warning:Se},Ne=ue("success","info","warning","error"),Ve=function(){return{type:C.oneOf(Ne),closable:{type:Boolean,default:void 0},closeText:C.any,message:C.any,description:C.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:C.any,closeIcon:C.any,onClose:Function}},Ee=te({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:Ve(),setup:function(t,e){var l=e.slots,i=e.emit,b=e.attrs,I=e.expose,S=de("alert",t),B=S.prefixCls,N=S.direction,a=A(!1),h=A(!1),w=A(),m=function(n){n.preventDefault();var p=w.value;p.style.height="".concat(p.offsetHeight,"px"),p.style.height="".concat(p.offsetHeight,"px"),a.value=!0,i("close",n)},g=function(){var n;a.value=!1,h.value=!0,(n=t.afterClose)===null||n===void 0||n.call(t)};I({animationEnd:g});var $=A({});return function(){var _,n,p=t.banner,W=t.closeIcon,G=W===void 0?(_=l.closeIcon)===null||_===void 0?void 0:_.call(l):W,V=t.closable,O=t.type,x=t.showIcon,E=D(l,t,"closeText"),z=D(l,t,"description"),Q=D(l,t,"message"),P=D(l,t,"icon");x=p&&x===void 0?!0:x,O=p&&O===void 0?"warning":O||"info";var se=(z?Be:je)[O]||null;E&&(V=!0);var c=B.value,oe=ve(c,(n={},y(n,"".concat(c,"-").concat(O),!0),y(n,"".concat(c,"-closing"),a.value),y(n,"".concat(c,"-with-description"),!!z),y(n,"".concat(c,"-no-icon"),!x),y(n,"".concat(c,"-banner"),!!p),y(n,"".concat(c,"-closable"),V),y(n,"".concat(c,"-rtl"),N.value==="rtl"),n)),le=V?u("button",{type:"button",onClick:m,class:"".concat(c,"-close-icon"),tabindex:0},[E?u("span",{class:"".concat(c,"-close-text")},[E]):G===void 0?u(pe,null,null):G]):null,ce=P&&(fe(P)?he(P,{class:"".concat(c,"-icon")}):u("span",{class:"".concat(c,"-icon")},[P]))||u(se,{class:"".concat(c,"-icon")},null),ie=me("".concat(c,"-motion"),{appear:!1,css:!0,onAfterLeave:g,onBeforeLeave:function(M){M.style.maxHeight="".concat(M.offsetHeight,"px")},onLeave:function(M){M.style.maxHeight="0px"}});return h.value?null:u(be,ie,{default:function(){return[ge(u("div",Y(Y({role:"alert"},b),{},{style:[b.style,$.value],class:[b.class,oe],"data-show":!a.value,ref:w}),[x?ce:null,u("div",{class:"".concat(c,"-content")},[Q?u("div",{class:"".concat(c,"-message")},[Q]):null,z?u("div",{class:"".concat(c,"-description")},[z]):null]),le]),[[_e,!a.value]])]}})}}});const Te=re(Ee);var qe={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 Re=qe;function U(s){for(var t=1;t(Le("data-v-b43e34c7"),s=s(),Fe(),s),Ze={class:"container"},Je={class:"header"},Ue={key:0,style:{"margin-left":"16px","font-size":"1.5em"}},Ke=ae(()=>o("div",{"flex-placeholder":""},null,-1)),et={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/131",target:"_blank",class:"last-record"},tt={href:"https://github.com/zanllp/sd-webui-infinite-image-browsing/issues/90",target:"_blank",class:"last-record"},nt={class:"access-mode-message"},at=ae(()=>o("div",{"flex-placeholder":""},null,-1)),st={class:"content"},ot={key:0,class:"quick-start"},lt={key:1,class:"quick-start"},ct=["onClick"],it={class:"text line-clamp-1"},rt={class:"quick-start"},ut=["onClick"],dt={class:"text line-clamp-1"},vt={class:"text line-clamp-1"},pt={class:"text line-clamp-1"},ft={key:2,class:"quick-start"},ht=["onClick"],mt={class:"text line-clamp-1"},gt=te({__name:"emptyStartup",props:{tabIdx:{},paneIdx:{}},setup(s){const t=s,e=$e(),l={local:L("local"),"tag-search":L("imgSearch"),"fuzzy-search":L("fuzzy-search"),"global-setting":L("globalSettings")},i=(a,h,w=!1)=>{let m;switch(a){case"tag-search-matched-image-grid":return;case"global-setting":case"tag-search":case"fuzzy-search":case"empty":m={type:a,name:l[a],key:Date.now()+J()};break;case"local":m={type:a,name:l[a],key:Date.now()+J(),path:h,walkModePath:w?h:void 0}}const g=e.tabList[t.tabIdx];g.panes.splice(t.paneIdx,1,m),g.key=m.key},b=Z(()=>{var a;return(a=e.tabListHistoryRecord)==null?void 0:a[1]}),I=Z(()=>e.quickMovePaths.filter(({key:a})=>a==="outdir_txt2img_samples"||a==="outdir_img2img_samples")),S=window.parent!==window,B=()=>window.parent.open("/infinite_image_browsing"),N=()=>{Me(b.value),e.tabList=Ae(b.value.tabs)};return(a,h)=>{var g,$,_;const w=Te,m=De;return r(),d("div",Ze,[o("div",Je,[o("h1",null,v(a.$t("welcome")),1),(g=f(e).conf)!=null&&g.enable_access_control&&f(e).dontShowAgain?(r(),d("div",Ue,[u(f(ee),{title:"Access Control mode",style:{"vertical-align":"text-bottom"}})])):k("",!0),Ke,o("a",et,v(a.$t("changlog")),1),o("a",tt,v(a.$t("faq")),1)]),($=f(e).conf)!=null&&$.enable_access_control&&!f(e).dontShowAgain?(r(),ze(w,{key:0,"show-icon":""},{message:T(()=>[o("div",nt,[o("div",null,v(a.$t("accessControlModeTips")),1),at,o("a",{onClick:h[0]||(h[0]=F(n=>f(e).dontShowAgain=!0,["prevent"]))},v(a.$t("dontShowAgain")),1)])]),icon:T(()=>[u(f(ee))]),_:1})):k("",!0),o("div",st,[I.value.length?(r(),d("div",ot,[o("h2",null,v(a.$t("walkMode")),1),o("ul",null,[(r(!0),d(H,null,j(I.value,n=>(r(),d("li",{key:n.dir,class:"item"},[u(m,{onClick:p=>i("local",n.dir,!0),ghost:"",type:"primary",block:""},{default:T(()=>[Pe(v(n.zh),1)]),_:2},1032,["onClick"])]))),128))])])):k("",!0),f(e).quickMovePaths.length?(r(),d("div",lt,[o("h2",null,v(a.$t("launchFromQuickMove")),1),o("ul",null,[(r(!0),d(H,null,j(f(e).quickMovePaths,n=>(r(),d("li",{key:n.key,class:"item",onClick:F(p=>i("local",n.dir),["prevent"])},[o("span",it,v(n.zh),1)],8,ct))),128))])])):k("",!0),o("div",rt,[o("h2",null,v(a.$t("launch")),1),o("ul",null,[(r(!0),d(H,null,j(Object.keys(l),n=>(r(),d("li",{key:n,class:"item",onClick:F(p=>i(n),["prevent"])},[o("span",dt,v(l[n]),1)],8,ut))),128)),S?(r(),d("li",{key:0,class:"item",onClick:B},[o("span",vt,v(a.$t("openInNewWindow")),1)])):k("",!0),(_=b.value)!=null&&_.tabs.length?(r(),d("li",{key:1,class:"item",onClick:N},[o("span",pt,v(a.$t("restoreLastRecord")),1)])):k("",!0)])]),f(e).recent.length?(r(),d("div",ft,[o("h2",null,v(a.$t("recent")),1),o("ul",null,[(r(!0),d(H,null,j(f(e).recent,n=>(r(),d("li",{key:n.key,class:"item",onClick:F(p=>i("local",n.path),["prevent"])},[u(f(Ge),{class:"icon"}),o("span",mt,v(n.path),1)],8,ht))),128))])])):k("",!0)])])}}});const bt=He(gt,[["__scopeId","data-v-b43e34c7"]]);export{bt as default}; diff --git a/vue/dist/assets/fullScreenContextMenu-c0cd1bbd.js b/vue/dist/assets/fullScreenContextMenu-01ffa640.js similarity index 99% rename from vue/dist/assets/fullScreenContextMenu-c0cd1bbd.js rename to vue/dist/assets/fullScreenContextMenu-01ffa640.js index 7228145..38dd37c 100644 --- a/vue/dist/assets/fullScreenContextMenu-c0cd1bbd.js +++ b/vue/dist/assets/fullScreenContextMenu-01ffa640.js @@ -1,2 +1,2 @@ -import{P as Oe,bx as En,a as O,d as ee,bg as et,u as Be,c as a,by as tt,_ as nt,V as ze,Z as ae,ag as B,bm as At,a1 as St,au as it,h as U,bz as Pn,b as Qe,av as $n,bA as In,a0 as Ot,bl as Xt,r as V,bd as ke,ax as De,ar as Et,aE as _n,aC as Kt,bB as qt,as as Se,y as oe,aT as xn,bC as Ln,s as se,bD as Mn,bE as we,bF as en,e as Ge,bG as zn,at as Pt,bH as kn,ae as W,$ as Nn,bI as Bn,bJ as $t,aO as Qn,bK as Dn,bL as Tn,ay as rt,be as Ye,bM as jn,bN as It,bO as Rn,ak as Vn,al as Fn,o as _,z as Y,bP as Un,bQ as Hn,bR as Gn,bS as Yn,bT as Jn,a3 as Wn,l as G,bU as _e,K as ie,m as S,E as lt,bV as _t,bW as Zn,bX as Xn,bY as Kn,O as Ee,x as at,C as Q,t as I,n as z,bZ as tn,U as nn,b_ as qn,b$ as ei,M as rn,bp as ln,q as J,W as an,ao as ti,c0 as ni,c1 as ii,af as ri,B as li,A as ai}from"./index-d77bcb54.js";import{i as oi,t as Je}from"./hook-b7fce3b0.js";import{f as on}from"./db-f752a0b1.js";var sn=function(){return{arrow:{type:[Boolean,Object],default:void 0},trigger:{type:[Array,String]},overlay:Oe.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}}},Ue=En(),si=function(){return O(O({},sn()),{},{type:Ue.type,size:String,htmlType:Ue.htmlType,href:String,disabled:{type:Boolean,default:void 0},prefixCls:String,icon:Oe.any,title:String,loading:Ue.loading,onClick:{type:Function}})},ui=["type","disabled","loading","htmlType","class","overlay","trigger","align","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:visible"],ci=ze.Group;const Ne=ee({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:et(si(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:["icon","leftButton","rightButton","overlay"],setup:function(e,n){var i=n.slots,r=n.attrs,l=n.emit,p=function(C){l("update:visible",C),l("visibleChange",C)},o=Be("dropdown-button",e),m=o.prefixCls,u=o.direction,h=o.getPopupContainer;return function(){var w,C,f=O(O({},e),r),v=f.type,d=v===void 0?"default":v,g=f.disabled,y=f.loading,s=f.htmlType,A=f.class,c=A===void 0?"":A,E=f.overlay,M=E===void 0?(w=i.overlay)===null||w===void 0?void 0:w.call(i):E,D=f.trigger,P=f.align,$=f.visible;f.onVisibleChange;var b=f.placement,x=b===void 0?u.value==="rtl"?"bottomLeft":"bottomRight":b,L=f.href,k=f.title,R=f.icon,ue=R===void 0?((C=i.icon)===null||C===void 0?void 0:C.call(i))||a(tt,null,null):R,F=f.mouseEnterDelay,te=f.mouseLeaveDelay,re=f.overlayClassName,le=f.overlayStyle,de=f.destroyPopupOnHide,T=f.onClick;f["onUpdate:visible"];var H=nt(f,ui),Z={align:P,disabled:g,trigger:g?[]:D,placement:x,getPopupContainer:h.value,onVisibleChange:p,mouseEnterDelay:F,mouseLeaveDelay:te,visible:$,overlayClassName:re,overlayStyle:le,destroyPopupOnHide:de},X=a(ze,{type:d,disabled:g,loading:y,onClick:T,htmlType:s,href:L,title:k},{default:i.default}),K=a(ze,{type:d,icon:ue},null);return a(ci,O(O({},H),{},{class:ae(m.value,c)}),{default:function(){return[i.leftButton?i.leftButton({button:X}):X,a(ge,Z,{default:function(){return[i.rightButton?i.rightButton({button:K}):K]},overlay:function(){return M}})]}})}}});var un=ee({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:et(sn(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:["overlay"],setup:function(e,n){var i=n.slots,r=n.attrs,l=n.emit,p=Be("dropdown",e),o=p.prefixCls,m=p.rootPrefixCls,u=p.direction,h=p.getPopupContainer,w=B(function(){var d=e.placement,g=d===void 0?"":d,y=e.transitionName;return y!==void 0?y:g.indexOf("top")>=0?"".concat(m.value,"-slide-down"):"".concat(m.value,"-slide-up")}),C=function(){var g,y,s,A=e.overlay||((g=i.overlay)===null||g===void 0?void 0:g.call(i)),c=Array.isArray(A)?A[0]:A;if(!c)return null;var E=c.props||{};At(!E.mode||E.mode==="vertical","Dropdown",'mode="'.concat(E.mode,`" is not supported for Dropdown's Menu.`));var M=E.selectable,D=M===void 0?!1:M,P=E.expandIcon,$=P===void 0?(y=c.children)===null||y===void 0||(s=y.expandIcon)===null||s===void 0?void 0:s.call(y):P,b=typeof $<"u"&&Ot($)?$:a("span",{class:"".concat(o.value,"-menu-submenu-arrow")},[a(Xt,{class:"".concat(o.value,"-menu-submenu-arrow-icon")},null)]),x=Ot(c)?St(c,{mode:"vertical",selectable:D,expandIcon:function(){return b}}):c;return x},f=B(function(){var d=e.placement;if(!d)return u.value==="rtl"?"bottomRight":"bottomLeft";if(d.includes("Center")){var g=d.slice(0,d.indexOf("Center"));return At(!d.includes("Center"),"Dropdown","You are using '".concat(d,"' placement in Dropdown, which is deprecated. Try to use '").concat(g,"' instead.")),g}return d}),v=function(g){l("update:visible",g),l("visibleChange",g)};return function(){var d,g,y=e.arrow,s=e.trigger,A=e.disabled,c=e.overlayClassName,E=(d=i.default)===null||d===void 0?void 0:d.call(i)[0],M=St(E,it({class:ae(E==null||(g=E.props)===null||g===void 0?void 0:g.class,U({},"".concat(o.value,"-rtl"),u.value==="rtl"),"".concat(o.value,"-trigger"))},A?{disabled:A}:{})),D=ae(c,U({},"".concat(o.value,"-rtl"),u.value==="rtl")),P=A?[]:s,$;P&&P.indexOf("contextmenu")!==-1&&($=!0);var b=Pn({arrowPointAtCenter:Qe(y)==="object"&&y.pointAtCenter,autoAdjustOverflow:!0}),x=$n(O(O(O({},e),r),{},{builtinPlacements:b,overlayClassName:D,arrow:y,alignPoint:$,prefixCls:o.value,getPopupContainer:h.value,transitionName:w.value,trigger:P,onVisibleChange:v,placement:f.value}),["overlay","onUpdate:visible"]);return a(In,x,{default:function(){return[M]},overlay:C})}}});un.Button=Ne;const ge=un;ge.Button=Ne;ge.install=function(t){return t.component(ge.name,ge),t.component(Ne.name,Ne),t};function di(){var t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function cn(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function fi(t){var e=V(null),n=ke(O({},t)),i=V([]),r=function(p){e.value===null&&(i.value=[],e.value=Et(function(){var o;i.value.forEach(function(m){o=O(O({},o),m)}),it(n,o),e.value=null})),i.value.push(p)};return De(function(){e.value&&Et.cancel(e.value)}),[n,r]}function xt(t,e,n,i){var r=e+n,l=(n-i)/2;if(n>i){if(e>0)return U({},t,l);if(e<0&&ri)return U({},t,e<0?l:-l);return{}}function vi(t,e,n,i){var r=di(),l=r.width,p=r.height,o=null;return t<=l&&e<=p?o={x:0,y:0}:(t>l||e>p)&&(o=O(O({},xt("x",n,t,l)),xt("y",i,e,p))),o}var Lt=Symbol("previewGroupContext"),ot={provide:function(e){_n(Lt,e)},inject:function(){return Kt(Lt,{isPreviewGroup:V(!1),previewUrls:B(function(){return new Map}),setPreviewUrls:function(){},current:V(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},mi=ee({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:function(){return{}}}},setup:function(e,n){var i=n.slots,r=B(function(){var P={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return Qe(e.preview)==="object"?mn(e.preview,P):P}),l=ke(new Map),p=V(),o=B(function(){return r.value.visible}),m=B(function(){return r.value.getContainer}),u=function($,b){var x,L;(x=(L=r.value).onVisibleChange)===null||x===void 0||x.call(L,$,b)},h=qt(!!o.value,{value:o,onChange:u}),w=Se(h,2),C=w[0],f=w[1],v=V(null),d=B(function(){return o.value!==void 0}),g=B(function(){return Array.from(l.keys())}),y=B(function(){return g.value[r.value.current]}),s=B(function(){return new Map(Array.from(l).filter(function(P){var $=Se(P,2),b=$[1].canPreview;return!!b}).map(function(P){var $=Se(P,2),b=$[0],x=$[1].url;return[b,x]}))}),A=function($,b){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;l.set($,{url:b,canPreview:x})},c=function($){p.value=$},E=function($){v.value=$},M=function($,b){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=function(){l.delete($)};return l.set($,{url:b,canPreview:x}),L},D=function($){$==null||$.stopPropagation(),f(!1),E(null)};return oe(y,function(P){c(P)},{immediate:!0,flush:"post"}),xn(function(){C.value&&d.value&&c(y.value)},{flush:"post"}),ot.provide({isPreviewGroup:V(!0),previewUrls:s,setPreviewUrls:A,current:p,setCurrent:c,setShowPreview:f,setMousePosition:E,registerImage:M}),function(){var P=it({},(Ln(r.value),r.value));return a(se,null,[i.default&&i.default(),a(fn,O(O({},P),{},{"ria-hidden":!C.value,visible:C.value,prefixCls:e.previewPrefixCls,onClose:D,mousePosition:v.value,src:s.value.get(p.value),icons:e.icons,getContainer:m.value}),null)])}}});const dn=mi;var me={x:0,y:0},pi=O(O({},Mn()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),gi=ee({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:pi,emits:["close","afterClose"],setup:function(e,n){var i=n.emit,r=n.attrs,l=ke(e.icons),p=l.rotateLeft,o=l.rotateRight,m=l.zoomIn,u=l.zoomOut,h=l.close,w=l.left,C=l.right,f=V(1),v=V(0),d=fi(me),g=Se(d,2),y=g[0],s=g[1],A=function(){return i("close")},c=V(),E=ke({originX:0,originY:0,deltaX:0,deltaY:0}),M=V(!1),D=ot.inject(),P=D.previewUrls,$=D.current,b=D.isPreviewGroup,x=D.setCurrent,L=B(function(){return P.value.size}),k=B(function(){return Array.from(P.value.keys())}),R=B(function(){return k.value.indexOf($.value)}),ue=B(function(){return b.value?P.value.get($.value):e.src}),F=B(function(){return b.value&&L.value>1}),te=V({wheelDirection:0}),re=function(){f.value=1,v.value=0,s(me),i("afterClose")},le=function(){f.value++,s(me)},de=function(){f.value>1&&f.value--,s(me)},T=function(){v.value+=90},H=function(){v.value-=90},Z=function(N){N.preventDefault(),N.stopPropagation(),R.value>0&&x(k.value[R.value-1])},X=function(N){N.preventDefault(),N.stopPropagation(),R.value0&&x(k.value[R.value-1]):N.keyCode===Pt.RIGHT&&R.value0?de():j<0&&le()})}),en(function(){Ae()}),function(){var j=e.visible,N=e.prefixCls,q=e.rootClassName;return a(zn,O(O({},r),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:N,onClose:A,afterClose:re,visible:j,wrapClassName:K,rootClassName:q,getContainer:e.getContainer}),{default:function(){return[a("ul",{class:"".concat(e.prefixCls,"-operations")},[je.map(function(ne){var ve=ne.icon,ce=ne.onClick,ye=ne.type,be=ne.disabled;return a("li",{class:ae(Pe,U({},"".concat(e.prefixCls,"-operations-operation-disabled"),be&&(be==null?void 0:be.value))),onClick:ce,key:ye},[Ge(ve,{class:he})])})]),a("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(y.x,"px, ").concat(y.y,"px, 0)")}},[a("img",{onMousedown:Re,onDblclick:Fe,ref:c,class:"".concat(e.prefixCls,"-img"),src:ue.value,alt:e.alt,style:{transform:"scale3d(".concat(f.value,", ").concat(f.value,", 1) rotate(").concat(v.value,"deg)")}},null)]),F.value&&a("div",{class:ae("".concat(e.prefixCls,"-switch-left"),U({},"".concat(e.prefixCls,"-switch-left-disabled"),R.value<=0)),onClick:Z},[w]),F.value&&a("div",{class:ae("".concat(e.prefixCls,"-switch-right"),U({},"".concat(e.prefixCls,"-switch-right-disabled"),R.value>=L.value-1)),onClick:X},[C])]}})}}});const fn=gi;var hi=["icons","maskClassName"],vn=function(){return{src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,previewMask:{type:[Boolean,Function],default:void 0},placeholder:Oe.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},mn=function(e,n){var i=O({},e);return Object.keys(n).forEach(function(r){e[r]===void 0&&(i[r]=n[r])}),i},yi=0,pn=ee({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:vn(),emits:["click","error"],setup:function(e,n){var i=n.attrs,r=n.slots,l=n.emit,p=B(function(){return e.prefixCls}),o=B(function(){return"".concat(p.value,"-preview")}),m=B(function(){var T={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return Qe(e.preview)==="object"?mn(e.preview,T):T}),u=B(function(){var T;return(T=m.value.src)!==null&&T!==void 0?T:e.src}),h=B(function(){return e.placeholder&&e.placeholder!==!0||r.placeholder}),w=B(function(){return m.value.visible}),C=B(function(){return m.value.getContainer}),f=B(function(){return w.value!==void 0}),v=function(H,Z){var X,K;(X=(K=m.value).onVisibleChange)===null||X===void 0||X.call(K,H,Z)},d=qt(!!w.value,{value:w,onChange:v}),g=Se(d,2),y=g[0],s=g[1];oe(y,function(T,H){v(T,H)});var A=V(h.value?"loading":"normal");oe(function(){return e.src},function(){A.value=h.value?"loading":"normal"});var c=V(null),E=B(function(){return A.value==="error"}),M=ot.inject(),D=M.isPreviewGroup,P=M.setCurrent,$=M.setShowPreview,b=M.setMousePosition,x=M.registerImage,L=V(yi++),k=B(function(){return e.preview&&!E.value}),R=function(){A.value="normal"},ue=function(H){A.value="error",l("error",H)},F=function(H){if(!f.value){var Z=cn(H.target),X=Z.left,K=Z.top;D.value?(P(L.value),b({x:X,y:K})):c.value={x:X,y:K}}D.value?$(!0):s(!0),l("click",H)},te=function(){s(!1),f.value||(c.value=null)},re=V(null);oe(function(){return re},function(){A.value==="loading"&&re.value.complete&&(re.value.naturalWidth||re.value.naturalHeight)&&R()});var le=function(){};De(function(){oe([u,k],function(){if(le(),!D.value)return function(){};le=x(L.value,u.value,k.value),k.value||le()},{flush:"post",immediate:!0})}),en(function(){le()});var de=function(H){return kn(H)?H+"px":H};return function(){var T=e.prefixCls,H=e.wrapperClassName,Z=e.fallback,X=e.src,K=e.placeholder,Pe=e.wrapperStyle,he=e.rootClassName,je=i.width,Ce=i.height,Re=i.crossorigin,$e=i.decoding,Ie=i.alt,Ve=i.sizes,Fe=i.srcset,Ae=i.usemap,j=i.class,N=i.style,q=m.value,fe=q.icons,ne=q.maskClassName,ve=nt(q,hi),ce=ae(T,H,he,U({},"".concat(T,"-error"),E.value)),ye=E.value&&Z?Z:u.value,be={crossorigin:Re,decoding:$e,alt:Ie,sizes:Ve,srcset:Fe,usemap:Ae,class:ae("".concat(T,"-img"),U({},"".concat(T,"-img-placeholder"),K===!0),j),style:O({height:Ce},N)};return a(se,null,[a("div",{class:ce,onClick:k.value?F:function(On){l("click",On)},style:O({width:de(je),height:de(Ce)},Pe)},[a("img",O(O(O({},be),E.value&&Z?{src:Z}:{onLoad:R,onError:ue,src:X}),{},{ref:re}),null),A.value==="loading"&&a("div",{"aria-hidden":"true",class:"".concat(T,"-placeholder")},[K||r.placeholder&&r.placeholder()]),r.previewMask&&k.value&&a("div",{class:["".concat(T,"-mask"),ne]},[r.previewMask()])]),!D.value&&k.value&&a(fn,O(O({},ve),{},{"aria-hidden":!y.value,visible:y.value,prefixCls:o.value,onClose:te,mousePosition:c.value,src:ye,alt:Ie,getContainer:C.value,icons:fe,rootClassName:he}),null)])}}});pn.PreviewGroup=dn;const bi=pn;var wi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const Ci=wi;function Mt(t){for(var e=1;e0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var r=t.indexOf("Edge/");return r>0?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1}let Le;function We(){We.init||(We.init=!0,Le=Sr()!==-1)}var Te={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){We(),rt(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",Le&&this.$el.appendChild(t),t.data="about:blank",Le||this.$el.appendChild(t)},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&&(!Le&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Or=Un();Vn("data-v-b329ee4c");const Er={class:"resize-observer",tabindex:"-1"};Fn();const Pr=Or((t,e,n,i,r,l)=>(_(),Y("div",Er)));Te.render=Pr;Te.__scopeId="data-v-b329ee4c";Te.__file="src/components/ResizeObserver.vue";function Me(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Me=function(e){return typeof e}:Me=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}function $r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jt(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0?"".concat(m.value,"-slide-down"):"".concat(m.value,"-slide-up")}),C=function(){var g,y,s,A=e.overlay||((g=i.overlay)===null||g===void 0?void 0:g.call(i)),c=Array.isArray(A)?A[0]:A;if(!c)return null;var E=c.props||{};At(!E.mode||E.mode==="vertical","Dropdown",'mode="'.concat(E.mode,`" is not supported for Dropdown's Menu.`));var M=E.selectable,D=M===void 0?!1:M,P=E.expandIcon,$=P===void 0?(y=c.children)===null||y===void 0||(s=y.expandIcon)===null||s===void 0?void 0:s.call(y):P,b=typeof $<"u"&&Ot($)?$:a("span",{class:"".concat(o.value,"-menu-submenu-arrow")},[a(Xt,{class:"".concat(o.value,"-menu-submenu-arrow-icon")},null)]),x=Ot(c)?St(c,{mode:"vertical",selectable:D,expandIcon:function(){return b}}):c;return x},f=B(function(){var d=e.placement;if(!d)return u.value==="rtl"?"bottomRight":"bottomLeft";if(d.includes("Center")){var g=d.slice(0,d.indexOf("Center"));return At(!d.includes("Center"),"Dropdown","You are using '".concat(d,"' placement in Dropdown, which is deprecated. Try to use '").concat(g,"' instead.")),g}return d}),v=function(g){l("update:visible",g),l("visibleChange",g)};return function(){var d,g,y=e.arrow,s=e.trigger,A=e.disabled,c=e.overlayClassName,E=(d=i.default)===null||d===void 0?void 0:d.call(i)[0],M=St(E,it({class:ae(E==null||(g=E.props)===null||g===void 0?void 0:g.class,U({},"".concat(o.value,"-rtl"),u.value==="rtl"),"".concat(o.value,"-trigger"))},A?{disabled:A}:{})),D=ae(c,U({},"".concat(o.value,"-rtl"),u.value==="rtl")),P=A?[]:s,$;P&&P.indexOf("contextmenu")!==-1&&($=!0);var b=Pn({arrowPointAtCenter:Qe(y)==="object"&&y.pointAtCenter,autoAdjustOverflow:!0}),x=$n(O(O(O({},e),r),{},{builtinPlacements:b,overlayClassName:D,arrow:y,alignPoint:$,prefixCls:o.value,getPopupContainer:h.value,transitionName:w.value,trigger:P,onVisibleChange:v,placement:f.value}),["overlay","onUpdate:visible"]);return a(In,x,{default:function(){return[M]},overlay:C})}}});un.Button=Ne;const ge=un;ge.Button=Ne;ge.install=function(t){return t.component(ge.name,ge),t.component(Ne.name,Ne),t};function di(){var t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function cn(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function fi(t){var e=V(null),n=ke(O({},t)),i=V([]),r=function(p){e.value===null&&(i.value=[],e.value=Et(function(){var o;i.value.forEach(function(m){o=O(O({},o),m)}),it(n,o),e.value=null})),i.value.push(p)};return De(function(){e.value&&Et.cancel(e.value)}),[n,r]}function xt(t,e,n,i){var r=e+n,l=(n-i)/2;if(n>i){if(e>0)return U({},t,l);if(e<0&&ri)return U({},t,e<0?l:-l);return{}}function vi(t,e,n,i){var r=di(),l=r.width,p=r.height,o=null;return t<=l&&e<=p?o={x:0,y:0}:(t>l||e>p)&&(o=O(O({},xt("x",n,t,l)),xt("y",i,e,p))),o}var Lt=Symbol("previewGroupContext"),ot={provide:function(e){_n(Lt,e)},inject:function(){return Kt(Lt,{isPreviewGroup:V(!1),previewUrls:B(function(){return new Map}),setPreviewUrls:function(){},current:V(null),setCurrent:function(){},setShowPreview:function(){},setMousePosition:function(){},registerImage:null,rootClassName:""})}},mi=ee({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:{previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:function(){return{}}}},setup:function(e,n){var i=n.slots,r=B(function(){var P={visible:void 0,onVisibleChange:function(){},getContainer:void 0,current:0};return Qe(e.preview)==="object"?mn(e.preview,P):P}),l=ke(new Map),p=V(),o=B(function(){return r.value.visible}),m=B(function(){return r.value.getContainer}),u=function($,b){var x,L;(x=(L=r.value).onVisibleChange)===null||x===void 0||x.call(L,$,b)},h=qt(!!o.value,{value:o,onChange:u}),w=Se(h,2),C=w[0],f=w[1],v=V(null),d=B(function(){return o.value!==void 0}),g=B(function(){return Array.from(l.keys())}),y=B(function(){return g.value[r.value.current]}),s=B(function(){return new Map(Array.from(l).filter(function(P){var $=Se(P,2),b=$[1].canPreview;return!!b}).map(function(P){var $=Se(P,2),b=$[0],x=$[1].url;return[b,x]}))}),A=function($,b){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;l.set($,{url:b,canPreview:x})},c=function($){p.value=$},E=function($){v.value=$},M=function($,b){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,L=function(){l.delete($)};return l.set($,{url:b,canPreview:x}),L},D=function($){$==null||$.stopPropagation(),f(!1),E(null)};return oe(y,function(P){c(P)},{immediate:!0,flush:"post"}),xn(function(){C.value&&d.value&&c(y.value)},{flush:"post"}),ot.provide({isPreviewGroup:V(!0),previewUrls:s,setPreviewUrls:A,current:p,setCurrent:c,setShowPreview:f,setMousePosition:E,registerImage:M}),function(){var P=it({},(Ln(r.value),r.value));return a(se,null,[i.default&&i.default(),a(fn,O(O({},P),{},{"ria-hidden":!C.value,visible:C.value,prefixCls:e.previewPrefixCls,onClose:D,mousePosition:v.value,src:s.value.get(p.value),icons:e.icons,getContainer:m.value}),null)])}}});const dn=mi;var me={x:0,y:0},pi=O(O({},Mn()),{},{src:String,alt:String,rootClassName:String,icons:{type:Object,default:function(){return{}}}}),gi=ee({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:pi,emits:["close","afterClose"],setup:function(e,n){var i=n.emit,r=n.attrs,l=ke(e.icons),p=l.rotateLeft,o=l.rotateRight,m=l.zoomIn,u=l.zoomOut,h=l.close,w=l.left,C=l.right,f=V(1),v=V(0),d=fi(me),g=Se(d,2),y=g[0],s=g[1],A=function(){return i("close")},c=V(),E=ke({originX:0,originY:0,deltaX:0,deltaY:0}),M=V(!1),D=ot.inject(),P=D.previewUrls,$=D.current,b=D.isPreviewGroup,x=D.setCurrent,L=B(function(){return P.value.size}),k=B(function(){return Array.from(P.value.keys())}),R=B(function(){return k.value.indexOf($.value)}),ue=B(function(){return b.value?P.value.get($.value):e.src}),F=B(function(){return b.value&&L.value>1}),te=V({wheelDirection:0}),re=function(){f.value=1,v.value=0,s(me),i("afterClose")},le=function(){f.value++,s(me)},de=function(){f.value>1&&f.value--,s(me)},T=function(){v.value+=90},H=function(){v.value-=90},Z=function(N){N.preventDefault(),N.stopPropagation(),R.value>0&&x(k.value[R.value-1])},X=function(N){N.preventDefault(),N.stopPropagation(),R.value0&&x(k.value[R.value-1]):N.keyCode===Pt.RIGHT&&R.value0?de():j<0&&le()})}),en(function(){Ae()}),function(){var j=e.visible,N=e.prefixCls,q=e.rootClassName;return a(zn,O(O({},r),{},{transitionName:"zoom",maskTransitionName:"fade",closable:!1,keyboard:!0,prefixCls:N,onClose:A,afterClose:re,visible:j,wrapClassName:K,rootClassName:q,getContainer:e.getContainer}),{default:function(){return[a("ul",{class:"".concat(e.prefixCls,"-operations")},[je.map(function(ne){var ve=ne.icon,ce=ne.onClick,ye=ne.type,be=ne.disabled;return a("li",{class:ae(Pe,U({},"".concat(e.prefixCls,"-operations-operation-disabled"),be&&(be==null?void 0:be.value))),onClick:ce,key:ye},[Ge(ve,{class:he})])})]),a("div",{class:"".concat(e.prefixCls,"-img-wrapper"),style:{transform:"translate3d(".concat(y.x,"px, ").concat(y.y,"px, 0)")}},[a("img",{onMousedown:Re,onDblclick:Fe,ref:c,class:"".concat(e.prefixCls,"-img"),src:ue.value,alt:e.alt,style:{transform:"scale3d(".concat(f.value,", ").concat(f.value,", 1) rotate(").concat(v.value,"deg)")}},null)]),F.value&&a("div",{class:ae("".concat(e.prefixCls,"-switch-left"),U({},"".concat(e.prefixCls,"-switch-left-disabled"),R.value<=0)),onClick:Z},[w]),F.value&&a("div",{class:ae("".concat(e.prefixCls,"-switch-right"),U({},"".concat(e.prefixCls,"-switch-right-disabled"),R.value>=L.value-1)),onClick:X},[C])]}})}}});const fn=gi;var hi=["icons","maskClassName"],vn=function(){return{src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,previewMask:{type:[Boolean,Function],default:void 0},placeholder:Oe.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}},mn=function(e,n){var i=O({},e);return Object.keys(n).forEach(function(r){e[r]===void 0&&(i[r]=n[r])}),i},yi=0,pn=ee({compatConfig:{MODE:3},name:"Image",inheritAttrs:!1,props:vn(),emits:["click","error"],setup:function(e,n){var i=n.attrs,r=n.slots,l=n.emit,p=B(function(){return e.prefixCls}),o=B(function(){return"".concat(p.value,"-preview")}),m=B(function(){var T={visible:void 0,onVisibleChange:function(){},getContainer:void 0};return Qe(e.preview)==="object"?mn(e.preview,T):T}),u=B(function(){var T;return(T=m.value.src)!==null&&T!==void 0?T:e.src}),h=B(function(){return e.placeholder&&e.placeholder!==!0||r.placeholder}),w=B(function(){return m.value.visible}),C=B(function(){return m.value.getContainer}),f=B(function(){return w.value!==void 0}),v=function(H,Z){var X,K;(X=(K=m.value).onVisibleChange)===null||X===void 0||X.call(K,H,Z)},d=qt(!!w.value,{value:w,onChange:v}),g=Se(d,2),y=g[0],s=g[1];oe(y,function(T,H){v(T,H)});var A=V(h.value?"loading":"normal");oe(function(){return e.src},function(){A.value=h.value?"loading":"normal"});var c=V(null),E=B(function(){return A.value==="error"}),M=ot.inject(),D=M.isPreviewGroup,P=M.setCurrent,$=M.setShowPreview,b=M.setMousePosition,x=M.registerImage,L=V(yi++),k=B(function(){return e.preview&&!E.value}),R=function(){A.value="normal"},ue=function(H){A.value="error",l("error",H)},F=function(H){if(!f.value){var Z=cn(H.target),X=Z.left,K=Z.top;D.value?(P(L.value),b({x:X,y:K})):c.value={x:X,y:K}}D.value?$(!0):s(!0),l("click",H)},te=function(){s(!1),f.value||(c.value=null)},re=V(null);oe(function(){return re},function(){A.value==="loading"&&re.value.complete&&(re.value.naturalWidth||re.value.naturalHeight)&&R()});var le=function(){};De(function(){oe([u,k],function(){if(le(),!D.value)return function(){};le=x(L.value,u.value,k.value),k.value||le()},{flush:"post",immediate:!0})}),en(function(){le()});var de=function(H){return kn(H)?H+"px":H};return function(){var T=e.prefixCls,H=e.wrapperClassName,Z=e.fallback,X=e.src,K=e.placeholder,Pe=e.wrapperStyle,he=e.rootClassName,je=i.width,Ce=i.height,Re=i.crossorigin,$e=i.decoding,Ie=i.alt,Ve=i.sizes,Fe=i.srcset,Ae=i.usemap,j=i.class,N=i.style,q=m.value,fe=q.icons,ne=q.maskClassName,ve=nt(q,hi),ce=ae(T,H,he,U({},"".concat(T,"-error"),E.value)),ye=E.value&&Z?Z:u.value,be={crossorigin:Re,decoding:$e,alt:Ie,sizes:Ve,srcset:Fe,usemap:Ae,class:ae("".concat(T,"-img"),U({},"".concat(T,"-img-placeholder"),K===!0),j),style:O({height:Ce},N)};return a(se,null,[a("div",{class:ce,onClick:k.value?F:function(On){l("click",On)},style:O({width:de(je),height:de(Ce)},Pe)},[a("img",O(O(O({},be),E.value&&Z?{src:Z}:{onLoad:R,onError:ue,src:X}),{},{ref:re}),null),A.value==="loading"&&a("div",{"aria-hidden":"true",class:"".concat(T,"-placeholder")},[K||r.placeholder&&r.placeholder()]),r.previewMask&&k.value&&a("div",{class:["".concat(T,"-mask"),ne]},[r.previewMask()])]),!D.value&&k.value&&a(fn,O(O({},ve),{},{"aria-hidden":!y.value,visible:y.value,prefixCls:o.value,onClose:te,mousePosition:c.value,src:ye,alt:Ie,getContainer:C.value,icons:fe,rootClassName:he}),null)])}}});pn.PreviewGroup=dn;const bi=pn;var wi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};const Ci=wi;function Mt(t){for(var e=1;e0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var r=t.indexOf("Edge/");return r>0?parseInt(t.substring(r+5,t.indexOf(".",r)),10):-1}let Le;function We(){We.init||(We.init=!0,Le=Sr()!==-1)}var Te={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){We(),rt(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",Le&&this.$el.appendChild(t),t.data="about:blank",Le||this.$el.appendChild(t)},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&&(!Le&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Or=Un();Vn("data-v-b329ee4c");const Er={class:"resize-observer",tabindex:"-1"};Fn();const Pr=Or((t,e,n,i,r,l)=>(_(),Y("div",Er)));Te.render=Pr;Te.__scopeId="data-v-b329ee4c";Te.__file="src/components/ResizeObserver.vue";function Me(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Me=function(e){return typeof e}:Me=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}function $r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jt(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n2&&arguments[2]!==void 0?arguments[2]:{},i,r,l,p=function(m){for(var u=arguments.length,h=new Array(u>1?u-1:0),w=1;w1){var u=o.find(function(w){return w.isIntersecting});u&&(m=u)}if(r.callback){var h=m.isIntersecting&&m.intersectionRatio>=r.threshold;if(h===r.oldResult)return;r.oldResult=h,r.callback(h,m)}},this.options.intersection),rt(function(){r.observer&&r.observer.observe(r.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function wn(t,e,n){var i=e.value;if(i)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var r=new Nr(t,i,n);t._vue_visibilityState=r}}function Br(t,e,n){var i=e.value,r=e.oldValue;if(!bn(i,r)){var l=t._vue_visibilityState;if(!i){Cn(t);return}l?l.createObserver(i,n):wn(t,{value:i},n)}}function Cn(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var Qr={beforeMount:wn,updated:Br,unmounted:Cn},Dr={itemsLimit:1e3},Tr=/(auto|scroll)/;function An(t,e){return t.parentNode===null?e:An(t.parentNode,e.concat([t]))}var He=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},jr=function(e){return He(e,"overflow")+He(e,"overflow-y")+He(e,"overflow-x")},Rr=function(e){return Tr.test(jr(e))};function Zt(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=An(t.parentNode,[]),n=0;n{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,i,r){const l=Hn({id:Hr++,index:e,used:!0,key:i,type:r}),p=Gn({item:n,position:0,nr:l});return t.push(p),p},unuseView(t,e=!1){const n=this.$_unusedViews,i=t.nr.type;let r=n.get(i);r||(r=[],n.set(i,r)),r.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,i=this.gridItems||1,r=this.itemSecondarySize||n,l=this.$_computedMinItemSize,p=this.typeField,o=this.simpleArray?null:this.keyField,m=this.items,u=m.length,h=this.sizes,w=this.$_views,C=this.$_unusedViews,f=this.pool,v=this.itemIndexByKey;let d,g,y,s,A;if(!u)d=g=s=A=y=0;else if(this.$_prerender)d=s=0,g=A=Math.min(this.prerender,m.length),y=null;else{const b=this.getScroll();if(e){let k=b.start-this.$_lastUpdateScrollPosition;if(k<0&&(k=-k),n===null&&kb.start&&(ue=F),F=~~((R+ue)/2);while(F!==te);for(F<0&&(F=0),d=F,y=h[u-1].accumulator,g=F;gu&&(g=u)),s=d;su&&(g=u),s<0&&(s=0),A>u&&(A=u),y=Math.ceil(u/i)*n}}g-d>Dr.itemsLimit&&this.itemsLimitError(),this.totalSize=y;let c;const E=d<=this.$_endIndex&&g>=this.$_startIndex;if(E)for(let b=0,x=f.length;b=g)&&this.unuseView(c));const M=E?null:new Map;let D,P,$;for(let b=d;b=L.length)&&(c=this.addView(f,b,D,x,P),this.unuseView(c,!0),L=C.get(P)),c=L[$],M.set(P,$+1)),w.delete(c.nr.key),c.nr.used=!0,c.nr.index=b,c.nr.key=x,c.nr.type=P,w.set(x,c),k=!0;else if(!c.nr.used&&(c.nr.used=!0,c.nr.index=b,k=!0,L)){const R=L.indexOf(c);R!==-1&&L.splice(R,1)}c.item=D,k&&(b===m.length-1&&this.$emit("scroll-end"),b===0&&this.$emit("scroll-start")),n===null?(c.position=h[b-1].accumulator,c.offset=0):(c.position=Math.floor(b/i)*n,c.offset=b%i*r)}return this.$_startIndex=d,this.$_endIndex=g,this.emitUpdate&&this.$emit("update",d,g,s,A),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:E}},getListenerTarget(){let t=Zt(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let i;if(this.pageMode){const r=t.getBoundingClientRect(),l=n?r.height:r.width;let p=-(n?r.top:r.left),o=n?window.innerHeight:window.innerWidth;p<0&&(o+=p,p=0),p+o>l&&(o=l-p),i={start:p,end:p+o}}else n?i={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:i={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Ke?{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(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,r;if(this.pageMode){const l=Zt(this.$el),p=l.tagName==="HTML"?0:l[e.scroll],o=l.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[e.start]-o[e.start];n=l,i=e.scroll,r=t+p+u}else n=this.$el,i=e.scroll,r=t;n[i]=r},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const Gr={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Yr={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Jr(t,e,n,i,r,l){const p=Yn("ResizeObserver"),o=Jn("observe-visibility");return Wn((_(),G("div",{class:Ee(["vue-recycle-scroller",{ready:r.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...m)=>l.handleScroll&&l.handleScroll(...m))},[t.$slots.before?(_(),G("div",Gr,[_e(t.$slots,"before")],512)):ie("v-if",!0),(_(),Y(_t(n.listTag),{ref:"wrapper",style:Kn({[t.direction==="vertical"?"minHeight":"minWidth"]:r.totalSize+"px"}),class:Ee(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:S(()=>[(_(!0),G(se,null,lt(r.pool,m=>(_(),Y(_t(n.itemTag),Zn({key:m.nr.id,style:r.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${m.position}px) translate${t.direction==="vertical"?"X":"Y"}(${m.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&r.hoverKey===m.nr.key}]]},Xn(n.skipHover?{}:{mouseenter:()=>{r.hoverKey=m.nr.key},mouseleave:()=>{r.hoverKey=null}})),{default:S(()=>[_e(t.$slots,"default",{item:m.item,index:m.nr.index,active:m.nr.used})]),_:2},1040,["style","class"]))),128)),_e(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(_(),G("div",Yr,[_e(t.$slots,"after")],512)):ie("v-if",!0),a(p,{onNotify:l.handleResize},null,8,["onNotify"])],34)),[[o,l.handleVisibilityChange]])}Sn.render=Jr;Sn.__file="src/components/RecycleScroller.vue";const qe=ee({__name:"ContextMenu",props:{file:{},idx:{},selectedTag:{},disableDelete:{type:Boolean}},emits:["contextMenuClick"],setup(t,{emit:e}){const n=t,i=at(),r=B(()=>{var l;return(((l=i.conf)==null?void 0:l.all_custom_tags)??[]).reduce((p,o)=>[...p,{...o,selected:!!n.selectedTag.find(m=>m.id===o.id)}],[])});return(l,p)=>{const o=nn,m=qn,u=ei,h=rn;return _(),Y(h,{onClick:p[0]||(p[0]=w=>e("contextMenuClick",w,l.file,l.idx))},{default:S(()=>[a(o,{key:"deleteFiles",disabled:l.disableDelete},{default:S(()=>[Q(I(l.$t("deleteSelected")),1)]),_:1},8,["disabled"]),l.file.type==="dir"?(_(),G(se,{key:0},[a(o,{key:"openInNewTab"},{default:S(()=>[Q(I(l.$t("openInNewTab")),1)]),_:1}),a(o,{key:"openOnTheRight"},{default:S(()=>[Q(I(l.$t("openOnTheRight")),1)]),_:1}),a(o,{key:"openWithWalkMode"},{default:S(()=>[Q(I(l.$t("openWithWalkMode")),1)]),_:1})],64)):ie("",!0),l.file.type==="file"?(_(),G(se,{key:1},[z(tn)(l.file.name)?(_(),G(se,{key:0},[a(o,{key:"viewGenInfo"},{default:S(()=>[Q(I(l.$t("viewGenerationInfo")),1)]),_:1}),a(m),a(o,{key:"send2txt2img"},{default:S(()=>[Q(I(l.$t("sendToTxt2img")),1)]),_:1}),a(o,{key:"send2img2img"},{default:S(()=>[Q(I(l.$t("sendToImg2img")),1)]),_:1}),a(o,{key:"send2inpaint"},{default:S(()=>[Q(I(l.$t("sendToInpaint")),1)]),_:1}),a(o,{key:"send2extras"},{default:S(()=>[Q(I(l.$t("sendToExtraFeatures")),1)]),_:1}),a(u,{key:"send2controlnet",title:l.$t("sendToControlNet")},{default:S(()=>[a(o,{key:"send2controlnet-txt2img"},{default:S(()=>[Q(I(l.$t("t2i")),1)]),_:1}),a(o,{key:"send2controlnet-img2img"},{default:S(()=>[Q(I(l.$t("i2i")),1)]),_:1})]),_:1},8,["title"]),a(o,{key:"send2savedDir"},{default:S(()=>[Q(I(l.$t("send2savedDir")),1)]),_:1}),a(m),a(u,{key:"toggle-tag",title:l.$t("toggleTag")},{default:S(()=>[(_(!0),G(se,null,lt(r.value,w=>(_(),Y(o,{key:`toggle-tag-${w.id}`},{default:S(()=>[Q(I(w.name)+" ",1),w.selected?(_(),Y(z(hn),{key:0})):(_(),Y(z(yn),{key:1}))]),_:2},1024))),128))]),_:1},8,["title"]),a(o,{key:"openWithLocalFileBrowser"},{default:S(()=>[Q(I(l.$t("openWithLocalFileBrowser")),1)]),_:1})],64)):ie("",!0),a(o,{key:"previewInNewWindow"},{default:S(()=>[Q(I(l.$t("previewInNewWindow")),1)]),_:1}),a(o,{key:"download"},{default:S(()=>[Q(I(l.$t("download")),1)]),_:1}),a(o,{key:"copyPreviewUrl"},{default:S(()=>[Q(I(l.$t("copySourceFilePreviewLink")),1)]),_:1})],64)):ie("",!0)]),_:1})}}}),Wr=["data-idx"],Zr={key:0},Xr={class:"more"},Kr={key:1,class:"preview-icon-wrap"},qr={class:"profile"},el={class:"name line-clamp-1"},tl={class:"basic-info"},nl={class:"name line-clamp-1"},il={class:"basic-info"},rl=ee({__name:"FileItem",props:{file:{},idx:{},selected:{type:Boolean,default:!1},showMenuIdx:{},viewMode:{default:"previewGrid"},fullScreenPreviewImageUrl:{}},emits:["update:showMenuIdx","fileItemClick","dragstart","previewVisibleChange","contextMenuClick"],setup(t,{emit:e}){const n=t,i=at(),r=V([]),l=()=>{var u;((u=n==null?void 0:n.file)==null?void 0:u.type)==="file"&&p.pushAction(()=>on(n.file.fullpath)).res.then(h=>{r.value=h})},p=ln(),o=B(()=>n.viewMode==="previewGrid"?[i.gridThumbnailSize,i.gridThumbnailSize].join("x"):[i.largeGridThumbnailSize,i.largeGridThumbnailSize].join("x")),m=B(()=>i.enableThumbnail?oi(n.file,o.value):Je(n.file));return(u,h)=>{const w=ge,C=Di;return _(),Y(w,{trigger:["contextmenu"],visible:z(i).longPressOpenContextMenu?typeof u.idx=="number"&&u.showMenuIdx===u.idx:void 0,"onUpdate:visible":h[4]||(h[4]=f=>typeof u.idx=="number"&&e("update:showMenuIdx",f?u.idx:-1))},{overlay:S(()=>[a(qe,{file:u.file,idx:u.idx,"selected-tag":r.value,onContextMenuClick:h[3]||(h[3]=(f,v,d)=>e("contextMenuClick",f,v,d))},null,8,["file","idx","selected-tag"])]),default:S(()=>[(_(),G("li",{class:Ee(["file file-item-trigger",{clickable:u.file.type==="dir",selected:u.selected,grid:u.viewMode==="previewGrid"||u.viewMode==="largePreviewGrid","large-grid":u.viewMode==="largePreviewGrid"}]),"data-idx":u.idx,key:u.file.name,draggable:"true",onDragstart:h[1]||(h[1]=f=>e("dragstart",f,u.idx)),onContextmenu:l,onClickCapture:h[2]||(h[2]=f=>e("fileItemClick",f,u.file,u.idx))},[u.viewMode!=="detailList"?(_(),G("div",Zr,[a(w,null,{overlay:S(()=>[a(qe,{file:u.file,idx:u.idx,"selected-tag":r.value,onContextMenuClick:h[0]||(h[0]=(f,v,d)=>e("contextMenuClick",f,v,d))},null,8,["file","idx","selected-tag"])]),default:S(()=>[J("div",Xr,[a(z(tt))])]),_:1}),z(tn)(u.file.name)?(_(),Y(C,{key:u.file.fullpath,class:Ee(`idx-${u.idx}`),src:m.value,fallback:z(Xi),preview:{src:u.fullScreenPreviewImageUrl,onVisibleChange:(f,v)=>e("previewVisibleChange",f,v)}},null,8,["class","src","fallback","preview"])):(_(),G("div",Kr,[u.file.type==="file"?(_(),Y(z(Dt),{key:0,class:"icon center"})):(_(),Y(z(jt),{key:1,class:"icon center"}))])),J("div",qr,[J("div",el,I(u.file.name),1),J("div",tl,[J("div",null,I(u.file.size),1),J("div",null,I(u.file.date),1)])])])):(_(),G(se,{key:1},[u.file.type==="file"?(_(),Y(z(Dt),{key:0,class:"icon"})):(_(),Y(z(jt),{key:1,class:"icon"})),J("div",nl,I(u.file.name),1),J("div",il,[J("div",null,I(u.file.size),1),J("div",null,I(u.file.date),1)])],64))],42,Wr))]),_:1},8,["visible"])}}});const wl=an(rl,[["__scopeId","data-v-be32f69f"]]);function ll(t,e,n,i){const r={x:0,y:0};let l=0,p=0,o=typeof(i==null?void 0:i.width)=="number"?i.width:0,m=typeof(i==null?void 0:i.height)=="number"?i.height:0,u=typeof(i==null?void 0:i.left)=="number"?i.left:0,h=typeof(i==null?void 0:i.top)=="number"?i.top:0,w=!1;const C=s=>{s.stopPropagation(),s.preventDefault(),!(!t.value||!e.value)&&(l=s instanceof MouseEvent?s.clientX:s.touches[0].clientX,p=s instanceof MouseEvent?s.clientY:s.touches[0].clientY,o=t.value.offsetWidth,m=t.value.offsetHeight,r.x=e.value.offsetLeft,r.y=e.value.offsetTop,document.documentElement.addEventListener("mousemove",f),document.documentElement.addEventListener("touchmove",f),document.documentElement.addEventListener("mouseup",v),document.documentElement.addEventListener("touchend",v))},f=s=>{if(!t.value||!e.value)return;const A=o+((s instanceof MouseEvent?s.clientX:s.touches[0].clientX)-l),c=m+((s instanceof MouseEvent?s.clientY:s.touches[0].clientY)-p),E=r.x+((s instanceof MouseEvent?s.clientX:s.touches[0].clientX)-l),M=r.y+((s instanceof MouseEvent?s.clientY:s.touches[0].clientY)-p);t.value.style.width=`${A}px`,t.value.style.height=`${c}px`,e.value.style.left=`${E}px`,e.value.style.top=`${M}px`,i!=null&&i.onResize&&i.onResize(A,c)},v=()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("touchmove",f),document.documentElement.removeEventListener("mouseup",v),document.documentElement.removeEventListener("touchend",v)},d=s=>{s.stopPropagation(),s.preventDefault(),!(!t.value||!n.value)&&(w=!0,u=t.value.offsetLeft,h=t.value.offsetTop,l=s instanceof MouseEvent?s.clientX:s.touches[0].clientX,p=s instanceof MouseEvent?s.clientY:s.touches[0].clientY,document.documentElement.addEventListener("mousemove",g),document.documentElement.addEventListener("touchmove",g),document.documentElement.addEventListener("mouseup",y),document.documentElement.addEventListener("touchend",y))},g=s=>{if(!t.value||!n.value||!w)return;const A=u+((s instanceof MouseEvent?s.clientX:s.touches[0].clientX)-l),c=h+((s instanceof MouseEvent?s.clientY:s.touches[0].clientY)-p);t.value.style.left=`${A}px`,t.value.style.top=`${c}px`,i!=null&&i.onDrag&&i.onDrag(A,c)},y=()=>{w=!1,document.documentElement.removeEventListener("mousemove",g),document.documentElement.removeEventListener("touchmove",g),document.documentElement.removeEventListener("mouseup",y),document.documentElement.removeEventListener("touchend",y)};return De(()=>{!t.value||!i||(typeof i.width=="number"&&(t.value.style.width=`${i.width}px`),typeof i.height=="number"&&(t.value.style.height=`${i.height}px`),typeof i.left=="number"&&(t.value.style.left=`${i.left}px`),typeof i.top=="number"&&(t.value.style.top=`${i.top}px`))}),ti(()=>{document.documentElement.removeEventListener("mousemove",f),document.documentElement.removeEventListener("touchmove",f),document.documentElement.removeEventListener("mouseup",v),document.documentElement.removeEventListener("touchend",v),document.documentElement.removeEventListener("mousemove",g),document.documentElement.removeEventListener("touchmove",g),document.documentElement.removeEventListener("mouseup",y),document.documentElement.removeEventListener("touchend",y)}),oe(()=>[t.value,e.value,n.value],([s,A,c])=>{s&&A&&(A.addEventListener("mousedown",C),A.addEventListener("touchstart",C)),s&&c&&(c.addEventListener("mousedown",d),c.addEventListener("touchstart",d))}),{handleResizeMouseDown:C,handleDragMouseDown:d}}const al={class:"container"},ol={class:"action-bar"},sl={key:0,class:"icon",style:{cursor:"pointer"}},ul={key:0,"flex-placeholder":""},cl={key:1,class:"action-bar"},dl={key:0,class:"gen-info"},fl=ee({__name:"fullScreenContextMenu",props:{file:{},idx:{}},emits:["contextMenuClick"],setup(t,{emit:e}){const n=t,i=at(),r=V(),l=V([]),p=B(()=>{var v;return(((v=i.conf)==null?void 0:v.all_custom_tags)??[]).reduce((d,g)=>[...d,{...g,selected:!!l.value.find(y=>y.id===g.id)}],[])}),o=ln(),m=V("");oe(()=>{var v;return(v=n==null?void 0:n.file)==null?void 0:v.fullpath},async v=>{v&&(o.tasks.forEach(d=>d.cancel()),o.pushAction(()=>ni(v)).res.then(d=>{m.value=d}))},{immediate:!0});const u=v=>{v&&o.pushAction(()=>on(n.file.fullpath)).res.then(d=>{l.value=d})},h=V(),w=V(),C=ii("fullScreenContextMenu.vue-drag",{left:100,top:100,width:512,height:384,expanded:!0});ll(r,h,w,{...C.value,onDrag:Ye(function(v,d){C.value={...C.value,left:v,top:d}},300),onResize:Ye(function(v,d){C.value={...C.value,width:v,height:d}},300)});function f(v){return v.parentNode}return(v,d)=>{const g=ge,y=ze,s=nn,A=rn;return _(),G("div",{ref_key:"el",ref:r,class:Ee(["full-screen-menu",{"unset-size":!z(C).expanded}]),onWheelCapture:d[5]||(d[5]=ai(()=>{},["stop"]))},[J("div",al,[J("div",ol,[J("div",{ref_key:"dragHandle",ref:w,class:"icon",style:{cursor:"grab"}},[a(z(lr))],512),J("div",{class:"icon",style:{cursor:"pointer"},onClick:d[0]||(d[0]=c=>z(C).expanded=!z(C).expanded)},[z(C).expanded?(_(),Y(z(ur),{key:0})):(_(),Y(z(vr),{key:1}))]),a(g,{onVisibleChange:u,"get-popup-container":f},{overlay:S(()=>[a(qe,{file:v.file,idx:v.idx,"selected-tag":l.value,"disable-delete":z(Je)(v.file)===z(i).fullscreenPreviewInitialUrl,onContextMenuClick:d[1]||(d[1]=(c,E,M)=>e("contextMenuClick",c,E,M))},null,8,["file","idx","selected-tag","disable-delete"])]),default:S(()=>[z(C).expanded?ie("",!0):(_(),G("div",sl,[a(z(tt))]))]),_:1}),z(C).expanded?(_(),G("div",ul)):ie("",!0),z(C).expanded?(_(),G("div",cl,[a(g,{trigger:["hover"],"get-popup-container":f,onVisibleChange:u},{overlay:S(()=>[a(A,{onClick:d[2]||(d[2]=c=>e("contextMenuClick",c,v.file,v.idx))},{default:S(()=>[(_(!0),G(se,null,lt(p.value,c=>(_(),Y(s,{key:`toggle-tag-${c.id}`},{default:S(()=>[Q(I(c.name)+" ",1),c.selected?(_(),Y(z(hn),{key:0})):(_(),Y(z(yn),{key:1}))]),_:2},1024))),128))]),_:1})]),default:S(()=>[a(y,null,{default:S(()=>[Q(I(v.$t("toggleTag")),1)]),_:1})]),_:1}),a(g,{trigger:["hover"],"get-popup-container":f},{overlay:S(()=>[a(A,{onClick:d[3]||(d[3]=c=>e("contextMenuClick",c,v.file,v.idx))},{default:S(()=>[a(s,{key:"send2txt2img"},{default:S(()=>[Q(I(v.$t("sendToTxt2img")),1)]),_:1}),a(s,{key:"send2img2img"},{default:S(()=>[Q(I(v.$t("sendToImg2img")),1)]),_:1}),a(s,{key:"send2inpaint"},{default:S(()=>[Q(I(v.$t("sendToInpaint")),1)]),_:1}),a(s,{key:"send2extras"},{default:S(()=>[Q(I(v.$t("sendToExtraFeatures")),1)]),_:1}),a(s,{key:"send2savedDir"},{default:S(()=>[Q(I(v.$t("send2savedDir")),1)]),_:1}),a(s,{key:"deleteFiles",disabled:z(Je)(v.file)===z(i).fullscreenPreviewInitialUrl},{default:S(()=>[Q(I(v.$t("deleteSelected")),1)]),_:1},8,["disabled"]),a(s,{key:"previewInNewWindow"},{default:S(()=>[Q(I(v.$t("previewInNewWindow")),1)]),_:1}),a(s,{key:"download"},{default:S(()=>[Q(I(v.$t("download")),1)]),_:1}),a(s,{key:"copyPreviewUrl"},{default:S(()=>[Q(I(v.$t("copySourceFilePreviewLink")),1)]),_:1})]),_:1})]),default:S(()=>[a(y,null,{default:S(()=>[Q(I(z(ri)("openContextMenu")),1)]),_:1})]),_:1}),a(y,{onClick:d[4]||(d[4]=c=>z(li)(m.value))},{default:S(()=>[Q(I(v.$t("copyPrompt")),1)]),_:1})])):ie("",!0)]),z(C).expanded?(_(),G("div",dl,I(m.value),1)):ie("",!0)]),z(C).expanded?(_(),G("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:h},[a(z(tr))],512)):ie("",!0)],34)}}});const Cl=an(fl,[["__scopeId","data-v-10ae8e66"]]);export{ge as D,yl as L,bl as R,hl as S,Sn as a,Cl as b,wl as f,gl as s}; diff --git a/vue/dist/assets/globalSetting-f5336043.js b/vue/dist/assets/globalSetting-b4392f4a.js similarity index 98% rename from vue/dist/assets/globalSetting-f5336043.js rename to vue/dist/assets/globalSetting-b4392f4a.js index caa48ab..803e660 100644 --- a/vue/dist/assets/globalSetting-f5336043.js +++ b/vue/dist/assets/globalSetting-b4392f4a.js @@ -1 +1 @@ -import{c,ae as at,am as Re,an as Ke,h as y,d as le,r as B,ao as qe,ap as rt,Z as q,a as _,aq as lt,ar as De,b as ut,ag as L,as as it,y as X,_ as He,at as Y,au as ot,j as We,u as je,D as st,av as Ge,a1 as ct,P as k,X as dt,Y as vt,aw as ft,w as Me,ax as mt,ay as gt,az as pt,g as $e,aA as ht,x as bt,o as fe,l as Be,K as Ve,m as F,n as N,S as ye,aB as yt,J as St,C as ne,q as me,z as Fe,t as ge,af as Ae,A as Te,s as Nt,E as Ct,V as wt,I as kt,W as It}from"./index-d77bcb54.js";import{_ as _t,F as xt}from"./index-7ab29b41.js";import{v as Et}from"./hook-b7fce3b0.js";/* empty css *//* empty css */import"./db-f752a0b1.js";var Dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};const Mt=Dt;function Oe(n){for(var e=1;eNumber.MAX_SAFE_INTEGER)return String(Ce()?BigInt(n).toString():Number.MAX_SAFE_INTEGER);if(nNumber.MAX_SAFE_INTEGER)return new n(Number.MAX_SAFE_INTEGER);if(m0&&arguments[0]!==void 0?arguments[0]:!0;return t?this.isInvalidate()?"":_e(this.number):this.origin}}]),n}(),Ft=function(){function n(e){if(Ke(this,n),y(this,"origin",""),Le(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var t=e;if(Ie(t)&&(t=Number(t)),t=typeof t=="string"?t:_e(t),xe(t)){var o=ae(t);this.negative=o.negative;var m=o.trimStr.split(".");this.integer=BigInt(m[0]);var p=m[1]||"0";this.decimal=BigInt(p),this.decimalLen=p.length}else this.nan=!0}return Re(n,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(t){var o="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(t,"0"));return BigInt(o)}},{key:"negate",value:function(){var t=new n(this.toString());return t.negative=!t.negative,t}},{key:"add",value:function(t){if(this.isInvalidate())return new n(t);var o=new n(t);if(o.isInvalidate())return this;var m=Math.max(this.getDecimalStr().length,o.getDecimalStr().length),p=this.alignDecimal(m),i=o.alignDecimal(m),l=(p+i).toString(),f=ae(l),v=f.negativeStr,b=f.trimStr,r="".concat(v).concat(b.padStart(m+1,"0"));return new n("".concat(r.slice(0,-m),".").concat(r.slice(-m)))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(t){return this.toString()===(t==null?void 0:t.toString())}},{key:"lessEquals",value:function(t){return this.add(t.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t?this.isInvalidate()?"":ae("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),n}();function P(n){return Ce()?new Ft(n):new Vt(n)}function we(n,e,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(n==="")return"";var m=ae(n),p=m.negativeStr,i=m.integerStr,l=m.decimalStr,f="".concat(e).concat(l),v="".concat(p).concat(i);if(t>=0){var b=Number(l[t]);if(b>=5&&!o){var r=P(n).add("".concat(p,"0.").concat("0".repeat(t)).concat(10-b));return we(r.toString(),e,t,o)}return t===0?v:"".concat(v).concat(e).concat(l.padEnd(t,"0").slice(0,t))}return f===".0"?v:"".concat(v).concat(f)}var At=200,Tt=600;const Ot=le({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:{type:Function}},slots:["upNode","downNode"],setup:function(e,t){var o=t.slots,m=t.emit,p=B(),i=function(v,b){v.preventDefault(),m("step",b);function r(){m("step",b),p.value=setTimeout(r,At)}p.value=setTimeout(r,Tt)},l=function(){clearTimeout(p.value)};return qe(function(){l()}),function(){if(rt())return null;var f=e.prefixCls,v=e.upDisabled,b=e.downDisabled,r="".concat(f,"-handler"),M=q(r,"".concat(r,"-up"),y({},"".concat(r,"-up-disabled"),v)),V=q(r,"".concat(r,"-down"),y({},"".concat(r,"-down-disabled"),b)),I={unselectable:"on",role:"button",onMouseup:l,onMouseleave:l},s=o.upNode,A=o.downNode;return c("div",{class:"".concat(r,"-wrap")},[c("span",_(_({},I),{},{onMousedown:function(T){i(T,!0)},"aria-label":"Increase Value","aria-disabled":v,class:M}),[(s==null?void 0:s())||c("span",{unselectable:"on",class:"".concat(f,"-handler-up-inner")},null)]),c("span",_(_({},I),{},{onMousedown:function(T){i(T,!1)},"aria-label":"Decrease Value","aria-disabled":b,class:V}),[(A==null?void 0:A())||c("span",{unselectable:"on",class:"".concat(f,"-handler-down-inner")},null)])])}}});function Pt(n,e){var t=B(null);function o(){try{var p=n.value,i=p.selectionStart,l=p.selectionEnd,f=p.value,v=f.substring(0,i),b=f.substring(l);t.value={start:i,end:l,value:f,beforeTxt:v,afterTxt:b}}catch{}}function m(){if(n.value&&t.value&&e.value)try{var p=n.value.value,i=t.value,l=i.beforeTxt,f=i.afterTxt,v=i.start,b=p.length;if(p.endsWith(f))b=p.length-t.value.afterTxt.length;else if(p.startsWith(l))b=l.length;else{var r=l[v-1],M=p.indexOf(r,v-1);M!==-1&&(b=M+1)}n.value.setSelectionRange(b,b)}catch(V){lt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(V.message))}}return[o,m]}const Ut=function(){var n=B(0),e=function(){De.cancel(n.value)};return qe(function(){e()}),function(t){e(),n.value=De(function(){t()})}};var zt=["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"],Pe=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},Ue=function(e){var t=P(e);return t.isInvalidate()?null:t},Xe=function(){return{stringMode:{type:Boolean},defaultValue:{type:[String,Number]},value:{type:[String,Number]},prefixCls:{type:String},min:{type:[String,Number]},max:{type:[String,Number]},step:{type:[String,Number],default:1},tabindex:{type:Number},controls:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},autofocus:{type:Boolean},keyboard:{type:Boolean,default:!0},parser:{type:Function},formatter:{type:Function},precision:{type:Number},decimalSeparator:{type:String},onInput:{type:Function},onChange:{type:Function},onPressEnter:{type:Function},onStep:{type:Function},onBlur:{type:Function},onFocus:{type:Function}}};const Rt=le({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:_(_({},Xe()),{},{lazy:Boolean}),slots:["upHandler","downHandler"],setup:function(e,t){var o=t.attrs,m=t.slots,p=t.emit,i=t.expose,l=B(),f=B(!1),v=B(!1),b=B(!1),r=B(P(e.value));function M(d){e.value===void 0&&(r.value=d)}var V=function(a,h){if(!h)return e.precision>=0?e.precision:Math.max(re(a),re(e.step))},I=function(a){var h=String(a);if(e.parser)return e.parser(h);var u=h;return e.decimalSeparator&&(u=u.replace(e.decimalSeparator,".")),u.replace(/[^\w.-]+/g,"")},s=B(""),A=function(a,h){if(e.formatter)return e.formatter(a,{userTyping:h,input:String(s.value)});var u=typeof a=="number"?_e(a):a;if(!h){var D=V(u,h);if(xe(u)&&(e.decimalSeparator||D>=0)){var x=e.decimalSeparator||".";u=we(u,x,D)}}return u},U=function(){var d=e.value;return r.value.isInvalidate()&&["string","number"].includes(ut(d))?Number.isNaN(d)?"":d:A(r.value.toString(),!1)}();s.value=U;function T(d,a){s.value=A(d.isInvalidate()?d.toString(!1):d.toString(!a),a)}var z=L(function(){return Ue(e.max)}),E=L(function(){return Ue(e.min)}),C=L(function(){return!z.value||!r.value||r.value.isInvalidate()?!1:z.value.lessEquals(r.value)}),R=L(function(){return!E.value||!r.value||r.value.isInvalidate()?!1:r.value.lessEquals(E.value)}),S=Pt(l,f),g=it(S,2),$=g[0],ue=g[1],H=function(a){return z.value&&!a.lessEquals(z.value)?z.value:E.value&&!E.value.lessEquals(a)?E.value:null},W=function(a){return!H(a)},j=function(a,h){var u=a,D=W(u)||u.isEmpty();if(!u.isEmpty()&&!h&&(u=H(u)||u,D=!0),!e.readonly&&!e.disabled&&D){var x=u.toString(),O=V(x,h);if(O>=0&&(u=P(we(x,".",O))),!u.equals(r.value)){var K;M(u),(K=e.onChange)===null||K===void 0||K.call(e,u.isEmpty()?null:Pe(e.stringMode,u)),e.value===void 0&&T(u,h)}return u}return r.value},J=Ut(),Z=function d(a){var h;if($(),s.value=a,!b.value){var u=I(a),D=P(u);D.isNaN()||j(D,!0)}(h=e.onInput)===null||h===void 0||h.call(e,a),J(function(){var x=a;e.parser||(x=a.replace(/。/g,".")),x!==a&&d(x)})},Q=function(){b.value=!0},ie=function(){b.value=!1,Z(l.value.value)},ee=function(a){Z(a.target.value)},te=function(a){var h,u;if(!(a&&C.value||!a&&R.value)){v.value=!1;var D=P(e.step);a||(D=D.negate());var x=(r.value||P(0)).add(D.toString()),O=j(x,!1);(h=e.onStep)===null||h===void 0||h.call(e,Pe(e.stringMode,O),{offset:e.step,type:a?"up":"down"}),(u=l.value)===null||u===void 0||u.focus()}},oe=function(a){var h=P(I(s.value)),u=h;h.isNaN()?u=r.value:u=j(h,a),e.value!==void 0?T(r.value,!1):u.isNaN()||T(u,!1)},pe=function(a){var h=a.which;if(v.value=!0,h===Y.ENTER){var u;b.value||(v.value=!1),oe(!1),(u=e.onPressEnter)===null||u===void 0||u.call(e,a)}e.keyboard!==!1&&!b.value&&[Y.UP,Y.DOWN].includes(h)&&(te(Y.UP===h),a.preventDefault())},w=function(){v.value=!1},G=function(a){oe(!1),f.value=!1,v.value=!1,p("blur",a)};return X(function(){return e.precision},function(){r.value.isInvalidate()||T(r.value,!1)},{flush:"post"}),X(function(){return e.value},function(){var d=P(e.value);r.value=d;var a=P(I(s.value));(!d.equals(a)||!v.value||e.formatter)&&T(d,v.value)},{flush:"post"}),X(s,function(){e.formatter&&ue()},{flush:"post"}),X(function(){return e.disabled},function(d){d&&(f.value=!1)}),i({focus:function(){var a;(a=l.value)===null||a===void 0||a.focus()},blur:function(){var a;(a=l.value)===null||a===void 0||a.blur()}}),function(){var d,a=_(_({},o),e),h=a.prefixCls,u=h===void 0?"rc-input-number":h,D=a.min,x=a.max,O=a.step,K=O===void 0?1:O;a.defaultValue,a.value;var se=a.disabled,ce=a.readonly;a.keyboard;var de=a.controls,he=de===void 0?!0:de,ve=a.autofocus;a.stringMode,a.parser,a.formatter,a.precision,a.decimalSeparator,a.onChange,a.onInput,a.onPressEnter,a.onStep;var Ye=a.lazy,Je=a.class,Ze=a.style,Qe=He(a,zt),et=m.upHandler,tt=m.downHandler,Ee="".concat(u,"-input"),be={};return Ye?be.onChange=ee:be.onInput=ee,c("div",{class:q(u,Je,(d={},y(d,"".concat(u,"-focused"),f.value),y(d,"".concat(u,"-disabled"),se),y(d,"".concat(u,"-readonly"),ce),y(d,"".concat(u,"-not-a-number"),r.value.isNaN()),y(d,"".concat(u,"-out-of-range"),!r.value.isInvalidate()&&!W(r.value)),d)),style:Ze,onKeydown:pe,onKeyup:w},[he&&c(Ot,{prefixCls:u,upDisabled:C.value,downDisabled:R.value,onStep:te},{upNode:et,downNode:tt}),c("div",{class:"".concat(Ee,"-wrap")},[c("input",_(_(_({autofocus:ve,autocomplete:"off",role:"spinbutton","aria-valuemin":D,"aria-valuemax":x,"aria-valuenow":r.value.isInvalidate()?null:r.value.toString(),step:K},Qe),{},{ref:l,class:Ee,value:s.value,disabled:se,readonly:ce,onFocus:function(nt){f.value=!0,p("focus",nt)}},be),{},{onBlur:G,onCompositionstart:Q,onCompositionend:ie}),null)])])}}});function Se(n){return n!=null}var Kt=["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"],ze=Xe(),qt=function(){return _(_({},ze),{},{size:{type:String},bordered:{type:Boolean,default:!0},placeholder:String,name:String,id:String,type:String,addonBefore:k.any,addonAfter:k.any,prefix:k.any,"onUpdate:value":ze.onChange,valueModifiers:Object})},Ne=le({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:qt(),slots:["addonBefore","addonAfter","prefix"],setup:function(e,t){var o=t.emit,m=t.expose,p=t.attrs,i=t.slots,l=We(),f=je("input-number",e),v=f.prefixCls,b=f.size,r=f.direction,M=B(e.value===void 0?e.defaultValue:e.value),V=B(!1);X(function(){return e.value},function(){M.value=e.value});var I=B(null),s=function(){var C;(C=I.value)===null||C===void 0||C.focus()},A=function(){var C;(C=I.value)===null||C===void 0||C.blur()};m({focus:s,blur:A});var U=function(C){e.value===void 0&&(M.value=C),o("update:value",C),o("change",C),l.onFieldChange()},T=function(C){V.value=!1,o("blur",C),l.onFieldBlur()},z=function(C){V.value=!0,o("focus",C)};return function(){var E,C,R,S,g=_(_({},p),e),$=g.class,ue=g.bordered,H=g.readonly,W=g.style,j=g.addonBefore,J=j===void 0?(E=i.addonBefore)===null||E===void 0?void 0:E.call(i):j,Z=g.addonAfter,Q=Z===void 0?(C=i.addonAfter)===null||C===void 0?void 0:C.call(i):Z,ie=g.prefix,ee=ie===void 0?(R=i.prefix)===null||R===void 0?void 0:R.call(i):ie,te=g.valueModifiers,oe=te===void 0?{}:te,pe=He(g,Kt),w=v.value,G=b.value,d=q((S={},y(S,"".concat(w,"-lg"),G==="large"),y(S,"".concat(w,"-sm"),G==="small"),y(S,"".concat(w,"-rtl"),r.value==="rtl"),y(S,"".concat(w,"-readonly"),H),y(S,"".concat(w,"-borderless"),!ue),S),$),a=c(Rt,_(_({},Ge(pe,["size","defaultValue"])),{},{ref:I,lazy:!!oe.lazy,value:M.value,class:d,prefixCls:w,readonly:H,onChange:U,onBlur:T,onFocus:z}),{upHandler:function(){return c(Bt,{class:"".concat(w,"-handler-up-inner")},null)},downHandler:function(){return c(st,{class:"".concat(w,"-handler-down-inner")},null)}}),h=Se(J)||Se(Q);if(Se(ee)){var u,D=q("".concat(w,"-affix-wrapper"),(u={},y(u,"".concat(w,"-affix-wrapper-focused"),V.value),y(u,"".concat(w,"-affix-wrapper-disabled"),e.disabled),y(u,"".concat(w,"-affix-wrapper-rtl"),r.value==="rtl"),y(u,"".concat(w,"-affix-wrapper-readonly"),H),y(u,"".concat(w,"-affix-wrapper-borderless"),!ue),y(u,"".concat($),!h&&$),u));a=c("div",{class:D,style:W,onMouseup:function(){return I.value.focus()}},[c("span",{class:"".concat(w,"-prefix")},[ee]),a])}if(h){var x,O="".concat(w,"-group"),K="".concat(O,"-addon"),se=J?c("div",{class:K},[J]):null,ce=Q?c("div",{class:K},[Q]):null,de=q("".concat(w,"-wrapper"),O,y({},"".concat(O,"-rtl"),r.value==="rtl")),he=q("".concat(w,"-group-wrapper"),(x={},y(x,"".concat(w,"-group-wrapper-sm"),G==="small"),y(x,"".concat(w,"-group-wrapper-lg"),G==="large"),y(x,"".concat(w,"-group-wrapper-rtl"),r.value==="rtl"),x),$);a=c("div",{class:he,style:W},[c("div",{class:de},[se,a,ce])])}return ct(a,{style:W})}}});const Ht=ot(Ne,{install:function(e){return e.component(Ne.name,Ne),e}});var Wt=vt("small","default"),jt=function(){return{id:String,prefixCls:String,size:k.oneOf(Wt),disabled:{type:Boolean,default:void 0},checkedChildren:k.any,unCheckedChildren:k.any,tabindex:k.oneOfType([k.string,k.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:k.oneOfType([k.string,k.number,k.looseBool]),checkedValue:k.oneOfType([k.string,k.number,k.looseBool]).def(!0),unCheckedValue:k.oneOfType([k.string,k.number,k.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},Gt=le({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:jt(),slots:["checkedChildren","unCheckedChildren"],setup:function(e,t){var o=t.attrs,m=t.slots,p=t.expose,i=t.emit,l=We();ft(function(){Me(!("defaultChecked"in o),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),Me(!("value"in o),"Switch","`value` is not validate prop, do you mean `checked`?")});var f=B(e.checked!==void 0?e.checked:o.defaultChecked),v=L(function(){return f.value===e.checkedValue});X(function(){return e.checked},function(){f.value=e.checked});var b=je("switch",e),r=b.prefixCls,M=b.direction,V=b.size,I=B(),s=function(){var g;(g=I.value)===null||g===void 0||g.focus()},A=function(){var g;(g=I.value)===null||g===void 0||g.blur()};p({focus:s,blur:A}),mt(function(){gt(function(){e.autofocus&&!e.disabled&&I.value.focus()})});var U=function(g,$){e.disabled||(i("update:checked",g),i("change",g,$),l.onFieldChange())},T=function(g){i("blur",g)},z=function(g){s();var $=v.value?e.unCheckedValue:e.checkedValue;U($,g),i("click",$,g)},E=function(g){g.keyCode===Y.LEFT?U(e.unCheckedValue,g):g.keyCode===Y.RIGHT&&U(e.checkedValue,g),i("keydown",g)},C=function(g){var $;($=I.value)===null||$===void 0||$.blur(),i("mouseup",g)},R=L(function(){var S;return S={},y(S,"".concat(r.value,"-small"),V.value==="small"),y(S,"".concat(r.value,"-loading"),e.loading),y(S,"".concat(r.value,"-checked"),v.value),y(S,"".concat(r.value,"-disabled"),e.disabled),y(S,r.value,!0),y(S,"".concat(r.value,"-rtl"),M.value==="rtl"),S});return function(){var S;return c(ht,{insertExtraNode:!0},{default:function(){return[c("button",_(_(_({},Ge(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),o),{},{id:(S=e.id)!==null&&S!==void 0?S:l.id.value,onKeydown:E,onClick:z,onBlur:T,onMouseup:C,type:"button",role:"switch","aria-checked":f.value,disabled:e.disabled||e.loading,class:[o.class,R.value],ref:I}),[c("div",{class:"".concat(r.value,"-handle")},[e.loading?c(pt,{class:"".concat(r.value,"-loading-icon")},null):null]),c("span",{class:"".concat(r.value,"-inner")},[v.value?$e(m,e,"checkedChildren"):$e(m,e,"unCheckedChildren")])])]}})}}});const Lt=dt(Gt);const Xt={class:"panel"},Yt={class:"lang-select-wrap"},Jt={class:"col"},Zt={class:"col"},Qt=le({__name:"globalSetting",setup(n){const e=bt(),t=B(!1),o=async()=>{window.location.reload()},m=[{value:"en",text:"English"},{value:"zh",text:"中文"},{value:"de",text:"Deutsch"}],p=(i,l)=>{const f=[];i.shiftKey&&f.push("Shift"),i.ctrlKey&&f.push("Ctrl"),(i.code.startsWith("Key")||i.code.startsWith("Digit"))&&(f.push(i.code),e.shortcut[l]=f.join(" + "))};return(i,l)=>{const f=Lt,v=_t,b=Ht,r=wt,M=kt,V=xt;return fe(),Be("div",Xt,[Ve("",!0),c(V,null,{default:F(()=>{var I;return[c(v,{label:i.$t("useThumbnailPreview")},{default:F(()=>[c(f,{checked:N(e).enableThumbnail,"onUpdate:checked":l[0]||(l[0]=s=>N(e).enableThumbnail=s)},null,8,["checked"])]),_:1},8,["label"]),c(v,{label:i.$t("defaultSortingMethod")},{default:F(()=>[c(N(ye),{value:N(e).defaultSortingMethod,"onUpdate:value":l[1]||(l[1]=s=>N(e).defaultSortingMethod=s),conv:N(yt),options:N(St)},null,8,["value","conv","options"])]),_:1},8,["label"]),c(v,{label:i.$t("defaultViewMode")},{default:F(()=>[c(N(ye),{value:N(e).defaultViewMode,"onUpdate:value":l[2]||(l[2]=s=>N(e).defaultViewMode=s),conv:{value:s=>s,text:s=>i.$t(s)},options:N(Et)},null,8,["value","conv","options"])]),_:1},8,["label"]),c(v,{label:i.$t("gridThumbnailWidth")},{default:F(()=>[c(b,{value:N(e).gridThumbnailSize,"onUpdate:value":l[3]||(l[3]=s=>N(e).gridThumbnailSize=s),min:256,max:1024},null,8,["value"]),ne(" (px) ")]),_:1},8,["label"]),c(v,{label:i.$t("largeGridThumbnailWidth")},{default:F(()=>[c(b,{value:N(e).largeGridThumbnailSize,"onUpdate:value":l[4]||(l[4]=s=>N(e).largeGridThumbnailSize=s),min:256,max:1024},null,8,["value"]),ne(" (px) ")]),_:1},8,["label"]),c(v,{label:i.$t("longPressOpenContextMenu")},{default:F(()=>[c(f,{checked:N(e).longPressOpenContextMenu,"onUpdate:checked":l[5]||(l[5]=s=>N(e).longPressOpenContextMenu=s)},null,8,["checked"])]),_:1},8,["label"]),c(v,{label:i.$t("onlyFoldersAndImages")},{default:F(()=>[c(f,{checked:N(e).onlyFoldersAndImages,"onUpdate:checked":l[6]||(l[6]=s=>N(e).onlyFoldersAndImages=s)},null,8,["checked"])]),_:1},8,["label"]),c(v,{label:i.$t("lang")},{default:F(()=>[me("div",Yt,[c(N(ye),{options:m,value:N(e).lang,"onUpdate:value":l[7]||(l[7]=s=>N(e).lang=s),onChange:l[8]||(l[8]=s=>t.value=!0)},null,8,["value"])]),t.value?(fe(),Fe(r,{key:0,type:"primary",onClick:o,ghost:""},{default:F(()=>[ne(ge(N(Ae)("langChangeReload")),1)]),_:1})):Ve("",!0)]),_:1},8,["label"]),me("h2",null,ge(N(Ae)("shortcutKey")),1),c(v,{label:i.$t("deleteSelected")},{default:F(()=>[me("div",Jt,[c(M,{value:N(e).shortcut.delete,onKeydown:l[9]||(l[9]=Te(s=>p(s,"delete"),["stop","prevent"])),placeholder:i.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),c(r,{onClick:l[10]||(l[10]=s=>N(e).shortcut.delete=""),class:"clear-btn"},{default:F(()=>[ne(ge(i.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),(fe(!0),Be(Nt,null,Ct(((I=N(e).conf)==null?void 0:I.all_custom_tags)??[],s=>(fe(),Fe(v,{label:i.$t("toggleTagSelection",{tag:s.name}),key:s.id},{default:F(()=>[me("div",Zt,[c(M,{value:N(e).shortcut[`toggle_tag_${s.name}`],onKeydown:Te(A=>p(A,`toggle_tag_${s.name}`),["stop","prevent"]),placeholder:i.$t("shortcutKeyDescription")},null,8,["value","onKeydown","placeholder"]),c(r,{onClick:A=>N(e).shortcut[`toggle_tag_${s.name}`]="",class:"clear-btn"},{default:F(()=>[ne(ge(i.$t("clear")),1)]),_:2},1032,["onClick"])])]),_:2},1032,["label"]))),128))]}),_:1})])}}});const on=It(Qt,[["__scopeId","data-v-e085f84b"]]);export{on as default}; +import{c,ae as at,am as Re,an as Ke,h as y,d as le,r as B,ao as qe,ap as rt,Z as q,a as _,aq as lt,ar as De,b as ut,ag as L,as as it,y as X,_ as He,at as Y,au as ot,j as We,u as je,D as st,av as Ge,a1 as ct,P as k,X as dt,Y as vt,aw as ft,w as Me,ax as mt,ay as gt,az as pt,g as $e,aA as ht,x as bt,o as fe,l as Be,K as Ve,m as F,n as N,S as ye,aB as yt,J as St,C as ne,q as me,z as Fe,t as ge,af as Ae,A as Te,s as Nt,E as Ct,V as wt,I as kt,W as It}from"./index-2ccb5782.js";import{_ as _t,F as xt}from"./index-6f28cdca.js";import{v as Et}from"./hook-dadee24a.js";/* empty css *//* empty css */import"./db-89fdf46d.js";var Dt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};const Mt=Dt;function Oe(n){for(var e=1;eNumber.MAX_SAFE_INTEGER)return String(Ce()?BigInt(n).toString():Number.MAX_SAFE_INTEGER);if(nNumber.MAX_SAFE_INTEGER)return new n(Number.MAX_SAFE_INTEGER);if(m0&&arguments[0]!==void 0?arguments[0]:!0;return t?this.isInvalidate()?"":_e(this.number):this.origin}}]),n}(),Ft=function(){function n(e){if(Ke(this,n),y(this,"origin",""),Le(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var t=e;if(Ie(t)&&(t=Number(t)),t=typeof t=="string"?t:_e(t),xe(t)){var o=ae(t);this.negative=o.negative;var m=o.trimStr.split(".");this.integer=BigInt(m[0]);var p=m[1]||"0";this.decimal=BigInt(p),this.decimalLen=p.length}else this.nan=!0}return Re(n,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(t){var o="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(t,"0"));return BigInt(o)}},{key:"negate",value:function(){var t=new n(this.toString());return t.negative=!t.negative,t}},{key:"add",value:function(t){if(this.isInvalidate())return new n(t);var o=new n(t);if(o.isInvalidate())return this;var m=Math.max(this.getDecimalStr().length,o.getDecimalStr().length),p=this.alignDecimal(m),i=o.alignDecimal(m),l=(p+i).toString(),f=ae(l),v=f.negativeStr,b=f.trimStr,r="".concat(v).concat(b.padStart(m+1,"0"));return new n("".concat(r.slice(0,-m),".").concat(r.slice(-m)))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(t){return this.toString()===(t==null?void 0:t.toString())}},{key:"lessEquals",value:function(t){return this.add(t.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t?this.isInvalidate()?"":ae("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),n}();function P(n){return Ce()?new Ft(n):new Vt(n)}function we(n,e,t){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(n==="")return"";var m=ae(n),p=m.negativeStr,i=m.integerStr,l=m.decimalStr,f="".concat(e).concat(l),v="".concat(p).concat(i);if(t>=0){var b=Number(l[t]);if(b>=5&&!o){var r=P(n).add("".concat(p,"0.").concat("0".repeat(t)).concat(10-b));return we(r.toString(),e,t,o)}return t===0?v:"".concat(v).concat(e).concat(l.padEnd(t,"0").slice(0,t))}return f===".0"?v:"".concat(v).concat(f)}var At=200,Tt=600;const Ot=le({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:{type:Function}},slots:["upNode","downNode"],setup:function(e,t){var o=t.slots,m=t.emit,p=B(),i=function(v,b){v.preventDefault(),m("step",b);function r(){m("step",b),p.value=setTimeout(r,At)}p.value=setTimeout(r,Tt)},l=function(){clearTimeout(p.value)};return qe(function(){l()}),function(){if(rt())return null;var f=e.prefixCls,v=e.upDisabled,b=e.downDisabled,r="".concat(f,"-handler"),M=q(r,"".concat(r,"-up"),y({},"".concat(r,"-up-disabled"),v)),V=q(r,"".concat(r,"-down"),y({},"".concat(r,"-down-disabled"),b)),I={unselectable:"on",role:"button",onMouseup:l,onMouseleave:l},s=o.upNode,A=o.downNode;return c("div",{class:"".concat(r,"-wrap")},[c("span",_(_({},I),{},{onMousedown:function(T){i(T,!0)},"aria-label":"Increase Value","aria-disabled":v,class:M}),[(s==null?void 0:s())||c("span",{unselectable:"on",class:"".concat(f,"-handler-up-inner")},null)]),c("span",_(_({},I),{},{onMousedown:function(T){i(T,!1)},"aria-label":"Decrease Value","aria-disabled":b,class:V}),[(A==null?void 0:A())||c("span",{unselectable:"on",class:"".concat(f,"-handler-down-inner")},null)])])}}});function Pt(n,e){var t=B(null);function o(){try{var p=n.value,i=p.selectionStart,l=p.selectionEnd,f=p.value,v=f.substring(0,i),b=f.substring(l);t.value={start:i,end:l,value:f,beforeTxt:v,afterTxt:b}}catch{}}function m(){if(n.value&&t.value&&e.value)try{var p=n.value.value,i=t.value,l=i.beforeTxt,f=i.afterTxt,v=i.start,b=p.length;if(p.endsWith(f))b=p.length-t.value.afterTxt.length;else if(p.startsWith(l))b=l.length;else{var r=l[v-1],M=p.indexOf(r,v-1);M!==-1&&(b=M+1)}n.value.setSelectionRange(b,b)}catch(V){lt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(V.message))}}return[o,m]}const Ut=function(){var n=B(0),e=function(){De.cancel(n.value)};return qe(function(){e()}),function(t){e(),n.value=De(function(){t()})}};var zt=["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"],Pe=function(e,t){return e||t.isEmpty()?t.toString():t.toNumber()},Ue=function(e){var t=P(e);return t.isInvalidate()?null:t},Xe=function(){return{stringMode:{type:Boolean},defaultValue:{type:[String,Number]},value:{type:[String,Number]},prefixCls:{type:String},min:{type:[String,Number]},max:{type:[String,Number]},step:{type:[String,Number],default:1},tabindex:{type:Number},controls:{type:Boolean,default:!0},readonly:{type:Boolean},disabled:{type:Boolean},autofocus:{type:Boolean},keyboard:{type:Boolean,default:!0},parser:{type:Function},formatter:{type:Function},precision:{type:Number},decimalSeparator:{type:String},onInput:{type:Function},onChange:{type:Function},onPressEnter:{type:Function},onStep:{type:Function},onBlur:{type:Function},onFocus:{type:Function}}};const Rt=le({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:_(_({},Xe()),{},{lazy:Boolean}),slots:["upHandler","downHandler"],setup:function(e,t){var o=t.attrs,m=t.slots,p=t.emit,i=t.expose,l=B(),f=B(!1),v=B(!1),b=B(!1),r=B(P(e.value));function M(d){e.value===void 0&&(r.value=d)}var V=function(a,h){if(!h)return e.precision>=0?e.precision:Math.max(re(a),re(e.step))},I=function(a){var h=String(a);if(e.parser)return e.parser(h);var u=h;return e.decimalSeparator&&(u=u.replace(e.decimalSeparator,".")),u.replace(/[^\w.-]+/g,"")},s=B(""),A=function(a,h){if(e.formatter)return e.formatter(a,{userTyping:h,input:String(s.value)});var u=typeof a=="number"?_e(a):a;if(!h){var D=V(u,h);if(xe(u)&&(e.decimalSeparator||D>=0)){var x=e.decimalSeparator||".";u=we(u,x,D)}}return u},U=function(){var d=e.value;return r.value.isInvalidate()&&["string","number"].includes(ut(d))?Number.isNaN(d)?"":d:A(r.value.toString(),!1)}();s.value=U;function T(d,a){s.value=A(d.isInvalidate()?d.toString(!1):d.toString(!a),a)}var z=L(function(){return Ue(e.max)}),E=L(function(){return Ue(e.min)}),C=L(function(){return!z.value||!r.value||r.value.isInvalidate()?!1:z.value.lessEquals(r.value)}),R=L(function(){return!E.value||!r.value||r.value.isInvalidate()?!1:r.value.lessEquals(E.value)}),S=Pt(l,f),g=it(S,2),$=g[0],ue=g[1],H=function(a){return z.value&&!a.lessEquals(z.value)?z.value:E.value&&!E.value.lessEquals(a)?E.value:null},W=function(a){return!H(a)},j=function(a,h){var u=a,D=W(u)||u.isEmpty();if(!u.isEmpty()&&!h&&(u=H(u)||u,D=!0),!e.readonly&&!e.disabled&&D){var x=u.toString(),O=V(x,h);if(O>=0&&(u=P(we(x,".",O))),!u.equals(r.value)){var K;M(u),(K=e.onChange)===null||K===void 0||K.call(e,u.isEmpty()?null:Pe(e.stringMode,u)),e.value===void 0&&T(u,h)}return u}return r.value},J=Ut(),Z=function d(a){var h;if($(),s.value=a,!b.value){var u=I(a),D=P(u);D.isNaN()||j(D,!0)}(h=e.onInput)===null||h===void 0||h.call(e,a),J(function(){var x=a;e.parser||(x=a.replace(/。/g,".")),x!==a&&d(x)})},Q=function(){b.value=!0},ie=function(){b.value=!1,Z(l.value.value)},ee=function(a){Z(a.target.value)},te=function(a){var h,u;if(!(a&&C.value||!a&&R.value)){v.value=!1;var D=P(e.step);a||(D=D.negate());var x=(r.value||P(0)).add(D.toString()),O=j(x,!1);(h=e.onStep)===null||h===void 0||h.call(e,Pe(e.stringMode,O),{offset:e.step,type:a?"up":"down"}),(u=l.value)===null||u===void 0||u.focus()}},oe=function(a){var h=P(I(s.value)),u=h;h.isNaN()?u=r.value:u=j(h,a),e.value!==void 0?T(r.value,!1):u.isNaN()||T(u,!1)},pe=function(a){var h=a.which;if(v.value=!0,h===Y.ENTER){var u;b.value||(v.value=!1),oe(!1),(u=e.onPressEnter)===null||u===void 0||u.call(e,a)}e.keyboard!==!1&&!b.value&&[Y.UP,Y.DOWN].includes(h)&&(te(Y.UP===h),a.preventDefault())},w=function(){v.value=!1},G=function(a){oe(!1),f.value=!1,v.value=!1,p("blur",a)};return X(function(){return e.precision},function(){r.value.isInvalidate()||T(r.value,!1)},{flush:"post"}),X(function(){return e.value},function(){var d=P(e.value);r.value=d;var a=P(I(s.value));(!d.equals(a)||!v.value||e.formatter)&&T(d,v.value)},{flush:"post"}),X(s,function(){e.formatter&&ue()},{flush:"post"}),X(function(){return e.disabled},function(d){d&&(f.value=!1)}),i({focus:function(){var a;(a=l.value)===null||a===void 0||a.focus()},blur:function(){var a;(a=l.value)===null||a===void 0||a.blur()}}),function(){var d,a=_(_({},o),e),h=a.prefixCls,u=h===void 0?"rc-input-number":h,D=a.min,x=a.max,O=a.step,K=O===void 0?1:O;a.defaultValue,a.value;var se=a.disabled,ce=a.readonly;a.keyboard;var de=a.controls,he=de===void 0?!0:de,ve=a.autofocus;a.stringMode,a.parser,a.formatter,a.precision,a.decimalSeparator,a.onChange,a.onInput,a.onPressEnter,a.onStep;var Ye=a.lazy,Je=a.class,Ze=a.style,Qe=He(a,zt),et=m.upHandler,tt=m.downHandler,Ee="".concat(u,"-input"),be={};return Ye?be.onChange=ee:be.onInput=ee,c("div",{class:q(u,Je,(d={},y(d,"".concat(u,"-focused"),f.value),y(d,"".concat(u,"-disabled"),se),y(d,"".concat(u,"-readonly"),ce),y(d,"".concat(u,"-not-a-number"),r.value.isNaN()),y(d,"".concat(u,"-out-of-range"),!r.value.isInvalidate()&&!W(r.value)),d)),style:Ze,onKeydown:pe,onKeyup:w},[he&&c(Ot,{prefixCls:u,upDisabled:C.value,downDisabled:R.value,onStep:te},{upNode:et,downNode:tt}),c("div",{class:"".concat(Ee,"-wrap")},[c("input",_(_(_({autofocus:ve,autocomplete:"off",role:"spinbutton","aria-valuemin":D,"aria-valuemax":x,"aria-valuenow":r.value.isInvalidate()?null:r.value.toString(),step:K},Qe),{},{ref:l,class:Ee,value:s.value,disabled:se,readonly:ce,onFocus:function(nt){f.value=!0,p("focus",nt)}},be),{},{onBlur:G,onCompositionstart:Q,onCompositionend:ie}),null)])])}}});function Se(n){return n!=null}var Kt=["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"],ze=Xe(),qt=function(){return _(_({},ze),{},{size:{type:String},bordered:{type:Boolean,default:!0},placeholder:String,name:String,id:String,type:String,addonBefore:k.any,addonAfter:k.any,prefix:k.any,"onUpdate:value":ze.onChange,valueModifiers:Object})},Ne=le({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:qt(),slots:["addonBefore","addonAfter","prefix"],setup:function(e,t){var o=t.emit,m=t.expose,p=t.attrs,i=t.slots,l=We(),f=je("input-number",e),v=f.prefixCls,b=f.size,r=f.direction,M=B(e.value===void 0?e.defaultValue:e.value),V=B(!1);X(function(){return e.value},function(){M.value=e.value});var I=B(null),s=function(){var C;(C=I.value)===null||C===void 0||C.focus()},A=function(){var C;(C=I.value)===null||C===void 0||C.blur()};m({focus:s,blur:A});var U=function(C){e.value===void 0&&(M.value=C),o("update:value",C),o("change",C),l.onFieldChange()},T=function(C){V.value=!1,o("blur",C),l.onFieldBlur()},z=function(C){V.value=!0,o("focus",C)};return function(){var E,C,R,S,g=_(_({},p),e),$=g.class,ue=g.bordered,H=g.readonly,W=g.style,j=g.addonBefore,J=j===void 0?(E=i.addonBefore)===null||E===void 0?void 0:E.call(i):j,Z=g.addonAfter,Q=Z===void 0?(C=i.addonAfter)===null||C===void 0?void 0:C.call(i):Z,ie=g.prefix,ee=ie===void 0?(R=i.prefix)===null||R===void 0?void 0:R.call(i):ie,te=g.valueModifiers,oe=te===void 0?{}:te,pe=He(g,Kt),w=v.value,G=b.value,d=q((S={},y(S,"".concat(w,"-lg"),G==="large"),y(S,"".concat(w,"-sm"),G==="small"),y(S,"".concat(w,"-rtl"),r.value==="rtl"),y(S,"".concat(w,"-readonly"),H),y(S,"".concat(w,"-borderless"),!ue),S),$),a=c(Rt,_(_({},Ge(pe,["size","defaultValue"])),{},{ref:I,lazy:!!oe.lazy,value:M.value,class:d,prefixCls:w,readonly:H,onChange:U,onBlur:T,onFocus:z}),{upHandler:function(){return c(Bt,{class:"".concat(w,"-handler-up-inner")},null)},downHandler:function(){return c(st,{class:"".concat(w,"-handler-down-inner")},null)}}),h=Se(J)||Se(Q);if(Se(ee)){var u,D=q("".concat(w,"-affix-wrapper"),(u={},y(u,"".concat(w,"-affix-wrapper-focused"),V.value),y(u,"".concat(w,"-affix-wrapper-disabled"),e.disabled),y(u,"".concat(w,"-affix-wrapper-rtl"),r.value==="rtl"),y(u,"".concat(w,"-affix-wrapper-readonly"),H),y(u,"".concat(w,"-affix-wrapper-borderless"),!ue),y(u,"".concat($),!h&&$),u));a=c("div",{class:D,style:W,onMouseup:function(){return I.value.focus()}},[c("span",{class:"".concat(w,"-prefix")},[ee]),a])}if(h){var x,O="".concat(w,"-group"),K="".concat(O,"-addon"),se=J?c("div",{class:K},[J]):null,ce=Q?c("div",{class:K},[Q]):null,de=q("".concat(w,"-wrapper"),O,y({},"".concat(O,"-rtl"),r.value==="rtl")),he=q("".concat(w,"-group-wrapper"),(x={},y(x,"".concat(w,"-group-wrapper-sm"),G==="small"),y(x,"".concat(w,"-group-wrapper-lg"),G==="large"),y(x,"".concat(w,"-group-wrapper-rtl"),r.value==="rtl"),x),$);a=c("div",{class:he,style:W},[c("div",{class:de},[se,a,ce])])}return ct(a,{style:W})}}});const Ht=ot(Ne,{install:function(e){return e.component(Ne.name,Ne),e}});var Wt=vt("small","default"),jt=function(){return{id:String,prefixCls:String,size:k.oneOf(Wt),disabled:{type:Boolean,default:void 0},checkedChildren:k.any,unCheckedChildren:k.any,tabindex:k.oneOfType([k.string,k.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:k.oneOfType([k.string,k.number,k.looseBool]),checkedValue:k.oneOfType([k.string,k.number,k.looseBool]).def(!0),unCheckedValue:k.oneOfType([k.string,k.number,k.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}},Gt=le({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:jt(),slots:["checkedChildren","unCheckedChildren"],setup:function(e,t){var o=t.attrs,m=t.slots,p=t.expose,i=t.emit,l=We();ft(function(){Me(!("defaultChecked"in o),"Switch","'defaultChecked' is deprecated, please use 'v-model:checked'"),Me(!("value"in o),"Switch","`value` is not validate prop, do you mean `checked`?")});var f=B(e.checked!==void 0?e.checked:o.defaultChecked),v=L(function(){return f.value===e.checkedValue});X(function(){return e.checked},function(){f.value=e.checked});var b=je("switch",e),r=b.prefixCls,M=b.direction,V=b.size,I=B(),s=function(){var g;(g=I.value)===null||g===void 0||g.focus()},A=function(){var g;(g=I.value)===null||g===void 0||g.blur()};p({focus:s,blur:A}),mt(function(){gt(function(){e.autofocus&&!e.disabled&&I.value.focus()})});var U=function(g,$){e.disabled||(i("update:checked",g),i("change",g,$),l.onFieldChange())},T=function(g){i("blur",g)},z=function(g){s();var $=v.value?e.unCheckedValue:e.checkedValue;U($,g),i("click",$,g)},E=function(g){g.keyCode===Y.LEFT?U(e.unCheckedValue,g):g.keyCode===Y.RIGHT&&U(e.checkedValue,g),i("keydown",g)},C=function(g){var $;($=I.value)===null||$===void 0||$.blur(),i("mouseup",g)},R=L(function(){var S;return S={},y(S,"".concat(r.value,"-small"),V.value==="small"),y(S,"".concat(r.value,"-loading"),e.loading),y(S,"".concat(r.value,"-checked"),v.value),y(S,"".concat(r.value,"-disabled"),e.disabled),y(S,r.value,!0),y(S,"".concat(r.value,"-rtl"),M.value==="rtl"),S});return function(){var S;return c(ht,{insertExtraNode:!0},{default:function(){return[c("button",_(_(_({},Ge(e,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),o),{},{id:(S=e.id)!==null&&S!==void 0?S:l.id.value,onKeydown:E,onClick:z,onBlur:T,onMouseup:C,type:"button",role:"switch","aria-checked":f.value,disabled:e.disabled||e.loading,class:[o.class,R.value],ref:I}),[c("div",{class:"".concat(r.value,"-handle")},[e.loading?c(pt,{class:"".concat(r.value,"-loading-icon")},null):null]),c("span",{class:"".concat(r.value,"-inner")},[v.value?$e(m,e,"checkedChildren"):$e(m,e,"unCheckedChildren")])])]}})}}});const Lt=dt(Gt);const Xt={class:"panel"},Yt={class:"lang-select-wrap"},Jt={class:"col"},Zt={class:"col"},Qt=le({__name:"globalSetting",setup(n){const e=bt(),t=B(!1),o=async()=>{window.location.reload()},m=[{value:"en",text:"English"},{value:"zh",text:"中文"},{value:"de",text:"Deutsch"}],p=(i,l)=>{const f=[];i.shiftKey&&f.push("Shift"),i.ctrlKey&&f.push("Ctrl"),(i.code.startsWith("Key")||i.code.startsWith("Digit"))&&(f.push(i.code),e.shortcut[l]=f.join(" + "))};return(i,l)=>{const f=Lt,v=_t,b=Ht,r=wt,M=kt,V=xt;return fe(),Be("div",Xt,[Ve("",!0),c(V,null,{default:F(()=>{var I;return[c(v,{label:i.$t("useThumbnailPreview")},{default:F(()=>[c(f,{checked:N(e).enableThumbnail,"onUpdate:checked":l[0]||(l[0]=s=>N(e).enableThumbnail=s)},null,8,["checked"])]),_:1},8,["label"]),c(v,{label:i.$t("defaultSortingMethod")},{default:F(()=>[c(N(ye),{value:N(e).defaultSortingMethod,"onUpdate:value":l[1]||(l[1]=s=>N(e).defaultSortingMethod=s),conv:N(yt),options:N(St)},null,8,["value","conv","options"])]),_:1},8,["label"]),c(v,{label:i.$t("defaultViewMode")},{default:F(()=>[c(N(ye),{value:N(e).defaultViewMode,"onUpdate:value":l[2]||(l[2]=s=>N(e).defaultViewMode=s),conv:{value:s=>s,text:s=>i.$t(s)},options:N(Et)},null,8,["value","conv","options"])]),_:1},8,["label"]),c(v,{label:i.$t("gridThumbnailWidth")},{default:F(()=>[c(b,{value:N(e).gridThumbnailSize,"onUpdate:value":l[3]||(l[3]=s=>N(e).gridThumbnailSize=s),min:256,max:1024},null,8,["value"]),ne(" (px) ")]),_:1},8,["label"]),c(v,{label:i.$t("largeGridThumbnailWidth")},{default:F(()=>[c(b,{value:N(e).largeGridThumbnailSize,"onUpdate:value":l[4]||(l[4]=s=>N(e).largeGridThumbnailSize=s),min:256,max:1024},null,8,["value"]),ne(" (px) ")]),_:1},8,["label"]),c(v,{label:i.$t("longPressOpenContextMenu")},{default:F(()=>[c(f,{checked:N(e).longPressOpenContextMenu,"onUpdate:checked":l[5]||(l[5]=s=>N(e).longPressOpenContextMenu=s)},null,8,["checked"])]),_:1},8,["label"]),c(v,{label:i.$t("onlyFoldersAndImages")},{default:F(()=>[c(f,{checked:N(e).onlyFoldersAndImages,"onUpdate:checked":l[6]||(l[6]=s=>N(e).onlyFoldersAndImages=s)},null,8,["checked"])]),_:1},8,["label"]),c(v,{label:i.$t("lang")},{default:F(()=>[me("div",Yt,[c(N(ye),{options:m,value:N(e).lang,"onUpdate:value":l[7]||(l[7]=s=>N(e).lang=s),onChange:l[8]||(l[8]=s=>t.value=!0)},null,8,["value"])]),t.value?(fe(),Fe(r,{key:0,type:"primary",onClick:o,ghost:""},{default:F(()=>[ne(ge(N(Ae)("langChangeReload")),1)]),_:1})):Ve("",!0)]),_:1},8,["label"]),me("h2",null,ge(N(Ae)("shortcutKey")),1),c(v,{label:i.$t("deleteSelected")},{default:F(()=>[me("div",Jt,[c(M,{value:N(e).shortcut.delete,onKeydown:l[9]||(l[9]=Te(s=>p(s,"delete"),["stop","prevent"])),placeholder:i.$t("shortcutKeyDescription")},null,8,["value","placeholder"]),c(r,{onClick:l[10]||(l[10]=s=>N(e).shortcut.delete=""),class:"clear-btn"},{default:F(()=>[ne(ge(i.$t("clear")),1)]),_:1})])]),_:1},8,["label"]),(fe(!0),Be(Nt,null,Ct(((I=N(e).conf)==null?void 0:I.all_custom_tags)??[],s=>(fe(),Fe(v,{label:i.$t("toggleTagSelection",{tag:s.name}),key:s.id},{default:F(()=>[me("div",Zt,[c(M,{value:N(e).shortcut[`toggle_tag_${s.name}`],onKeydown:Te(A=>p(A,`toggle_tag_${s.name}`),["stop","prevent"]),placeholder:i.$t("shortcutKeyDescription")},null,8,["value","onKeydown","placeholder"]),c(r,{onClick:A=>N(e).shortcut[`toggle_tag_${s.name}`]="",class:"clear-btn"},{default:F(()=>[ne(ge(i.$t("clear")),1)]),_:2},1032,["onClick"])])]),_:2},1032,["label"]))),128))]}),_:1})])}}});const on=It(Qt,[["__scopeId","data-v-e085f84b"]]);export{on as default}; diff --git a/vue/dist/assets/hook-7125bc0b.js b/vue/dist/assets/hook-7125bc0b.js deleted file mode 100644 index ac4675f..0000000 --- a/vue/dist/assets/hook-7125bc0b.js +++ /dev/null @@ -1 +0,0 @@ -import{r as c,bp as F,b3 as S}from"./index-d77bcb54.js";import{u as y,b as q,f as P,c as z,d as E,e as G,h as Q}from"./hook-b7fce3b0.js";const A=()=>{const e=c(),l=F(),n=c(),t={tabIdx:-1,target:"local",paneIdx:-1,walkMode:!1},{stackViewEl:r,multiSelectedIdxs:u,stack:m}=y({images:e}).toRefs(),{itemSize:f,gridItems:p}=q(t),{showMenuIdx:v}=P();z();const{showGenInfo:I,imageGenInfo:d,q:w,onContextMenuClick:o,onFileItemClick:g}=E(t,{openNext:S}),{previewIdx:x,previewing:k,onPreviewVisibleChange:h,previewImgMove:M,canPreview:b}=G(t,{scroller:n,files:e}),C=async(a,s,i)=>{m.value=[{curr:"",files:e.value}],await o(a,s,i)};return Q("removeFiles",async({paths:a})=>{var s;e.value=(s=e.value)==null?void 0:s.filter(i=>!a.includes(i.fullpath))}),{scroller:n,queue:l,images:e,onContextMenuClickU:C,stackViewEl:r,previewIdx:x,previewing:k,onPreviewVisibleChange:h,previewImgMove:M,canPreview:b,itemSize:f,gridItems:p,showGenInfo:I,imageGenInfo:d,q:w,onContextMenuClick:o,onFileItemClick:g,showMenuIdx:v,multiSelectedIdxs:u}};export{A as u}; diff --git a/vue/dist/assets/hook-93ddaeff.js b/vue/dist/assets/hook-93ddaeff.js new file mode 100644 index 0000000..a6fda88 --- /dev/null +++ b/vue/dist/assets/hook-93ddaeff.js @@ -0,0 +1 @@ +import{r as c,bp as S,b3 as y}from"./index-2ccb5782.js";import{u as q,b as P,f as z,c as D,d as E,e as G,h as Q}from"./hook-dadee24a.js";const A=()=>{const e=c(),l=S(),o=c(),t={tabIdx:-1,target:"local",paneIdx:-1,walkMode:!1},{stackViewEl:r,multiSelectedIdxs:u,stack:m}=q({images:e}).toRefs(),{itemSize:f,gridItems:p}=P(t),{showMenuIdx:v}=z(),{onFileDragStart:I}=D(),{showGenInfo:d,imageGenInfo:w,q:g,onContextMenuClick:i,onFileItemClick:x}=E(t,{openNext:y}),{previewIdx:k,previewing:h,onPreviewVisibleChange:M,previewImgMove:b,canPreview:C}=G(t,{scroller:o,files:e}),F=async(a,s,n)=>{m.value=[{curr:"",files:e.value}],await i(a,s,n)};return Q("removeFiles",async({paths:a})=>{var s;e.value=(s=e.value)==null?void 0:s.filter(n=>!a.includes(n.fullpath))}),{scroller:o,queue:l,images:e,onContextMenuClickU:F,stackViewEl:r,previewIdx:k,previewing:h,onPreviewVisibleChange:M,previewImgMove:b,canPreview:C,itemSize:f,gridItems:p,showGenInfo:d,imageGenInfo:w,q:g,onContextMenuClick:i,onFileItemClick:x,showMenuIdx:v,multiSelectedIdxs:u,onFileDragStart:I}};export{A as u}; diff --git a/vue/dist/assets/hook-b7fce3b0.js b/vue/dist/assets/hook-dadee24a.js similarity index 58% rename from vue/dist/assets/hook-b7fce3b0.js rename to vue/dist/assets/hook-dadee24a.js index ebaebc4..0f6118f 100644 --- a/vue/dist/assets/hook-b7fce3b0.js +++ b/vue/dist/assets/hook-dadee24a.js @@ -1,2 +1,2 @@ -import{c2 as ke,c3 as Se,aK as xe,c4 as Pe,c5 as Ie,c6 as Fe,ao as de,c7 as Me,ai as Y,bd as Ee,c8 as Te,c as _e,ae as Le,c9 as ae,ca as De,cb as Ce,x as Ne,cc as ve,ag as A,bu as D,af as L,cd as V,r as _,y as Z,be as ee,ax as Oe,ce as $,cf as Ae,cg as ne,ch as oe,aj as pe,bq as le,br as $e,ci as B,cj as qe,aB as ze,bp as Re,ck as We,bZ as O,cl as U,B as ge,cm as Ue,v as he,L as Ge,c0 as Ve,ah as j,cn as je,co as He,cp as Be,cq as Ke,cr as Qe,cs as Je}from"./index-d77bcb54.js";import{b as Xe,h as Ye,i as Ze,t as et}from"./db-f752a0b1.js";var ce=1/0,tt=17976931348623157e292;function J(s){if(!s)return s===0?s:0;if(s=ke(s),s===ce||s===-ce){var r=s<0?-1:1;return r*tt}return s===s?s:0}function z(s){var r=s==null?0:s.length;return r?s[r-1]:void 0}function at(s,r,a){if(!Se(a))return!1;var i=typeof r;return(i=="number"?xe(a)&&Pe(r,a.length):i=="string"&&r in a)?Ie(a[r],s):!1}var nt=Math.ceil,st=Math.max;function rt(s,r,a,i){for(var u=-1,g=st(nt((r-s)/(a||1)),0),h=Array(g);g--;)h[i?g:++u]=s,s+=a;return h}function it(s){return function(r,a,i){return i&&typeof i!="number"&&at(r,a,i)&&(a=i=void 0),r=J(r),a===void 0?(a=r,r=0):a=J(a),i=i===void 0?r{document.addEventListener(...s),de(()=>document.removeEventListener(...s))},H=new WeakMap;function ut(s,r){return{useHookShareState:i=>{const u=Me();Y(u),H.has(u)||(H.set(u,Ee(s(u,i??(r==null?void 0:r())))),de(()=>{H.delete(u)}));const g=H.get(u);return Y(g),{state:g,toRefs(){return Te(g)}}}}}var ft={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 dt=ft;function ue(s){for(var r=1;r(await ae.get("/files",{params:{folder_path:s}})).data,gt=async s=>(await ae.post("/delete_files",{file_paths:s})).data,me=async(s,r)=>(await ae.post("/move_files",{file_paths:s,dest:r})).data;var we={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress - * @license MIT */(function(s,r){(function(a,i){s.exports=i})(De,function(){var a={};a.version="0.3.5";var i=a.settings={minimum:.08,easing:"linear",positionUsing:"",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};a.configure=function(t){var e,n;for(e in t)n=t[e],n!==void 0&&t.hasOwnProperty(e)&&(i[e]=n);return this},a.status=null,a.set=function(t){var e=a.isStarted();t=u(t,i.minimum,1),a.status=t===1?null:t;var n=a.render(!e),l=n.querySelector(i.barSelector),m=i.speed,w=i.easing;return n.offsetWidth,b(function(p){i.positionUsing===""&&(i.positionUsing=a.getPositioningCSS()),I(l,h(t,m,w)),t===1?(I(n,{transition:"none",opacity:1}),n.offsetWidth,setTimeout(function(){I(n,{transition:"all "+m+"ms linear",opacity:0}),setTimeout(function(){a.remove(),p()},m)},m)):setTimeout(p,m)}),this},a.isStarted=function(){return typeof a.status=="number"},a.start=function(){a.status||a.set(0);var t=function(){setTimeout(function(){a.status&&(a.trickle(),t())},i.trickleSpeed)};return i.trickle&&t(),this},a.done=function(t){return!t&&!a.status?this:a.inc(.3+.5*Math.random()).set(1)},a.inc=function(t){var e=a.status;return e?e>1?void 0:(typeof t!="number"&&(e>=0&&e<.2?t=.1:e>=.2&&e<.5?t=.04:e>=.5&&e<.8?t=.02:e>=.8&&e<.99?t=.005:t=0),e=u(e+t,0,.994),a.set(e)):a.start()},a.trickle=function(){return a.inc()},function(){var t=0,e=0;a.promise=function(n){return!n||n.state()==="resolved"?this:(e===0&&a.start(),t++,e++,n.always(function(){e--,e===0?(t=0,a.done()):a.set((t-e)/t)}),this)}}(),a.getElement=function(){var t=a.getParent();if(t){var e=Array.prototype.slice.call(t.querySelectorAll(".nprogress")).filter(function(n){return n.parentElement===t});if(e.length>0)return e[0]}return null},a.getParent=function(){if(i.parent instanceof HTMLElement)return i.parent;if(typeof i.parent=="string")return document.querySelector(i.parent)},a.render=function(t){if(a.isRendered())return a.getElement();T(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.className="nprogress",e.innerHTML=i.template;var n=e.querySelector(i.barSelector),l=t?"-100":g(a.status||0),m=a.getParent(),w;return I(n,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),i.showSpinner||(w=e.querySelector(i.spinnerSelector),w&&F(w)),m!=document.body&&T(m,"nprogress-custom-parent"),m.appendChild(e),e},a.remove=function(){a.status=null,M(document.documentElement,"nprogress-busy"),M(a.getParent(),"nprogress-custom-parent");var t=a.getElement();t&&F(t)},a.isRendered=function(){return!!a.getElement()},a.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};function u(t,e,n){return tn?n:t}function g(t){return(-1+t)*100}function h(t,e,n){var l;return i.positionUsing==="translate3d"?l={transform:"translate3d("+g(t)+"%,0,0)"}:i.positionUsing==="translate"?l={transform:"translate("+g(t)+"%,0)"}:l={"margin-left":g(t)+"%"},l.transition="all "+e+"ms "+n,l}var b=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),t.length==1&&e()}}(),I=function(){var t=["Webkit","O","Moz","ms"],e={};function n(p){return p.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(x,o){return o.toUpperCase()})}function l(p){var x=document.body.style;if(p in x)return p;for(var o=t.length,c=p.charAt(0).toUpperCase()+p.slice(1),v;o--;)if(v=t[o]+c,v in x)return v;return p}function m(p){return p=n(p),e[p]||(e[p]=l(p))}function w(p,x,o){x=m(x),p.style[x]=o}return function(p,x){var o=arguments,c,v;if(o.length==2)for(c in x)v=x[c],v!==void 0&&x.hasOwnProperty(c)&&w(p,c,v);else w(p,o[1],o[2])}}();function y(t,e){var n=typeof t=="string"?t:E(t);return n.indexOf(" "+e+" ")>=0}function T(t,e){var n=E(t),l=n+e;y(n,e)||(t.className=l.substring(1))}function M(t,e){var n=E(t),l;y(t,e)&&(l=n.replace(" "+e+" "," "),t.className=l.substring(1,l.length-1))}function E(t){return(" "+(t&&t.className||"")+" ").replace(/\s+/gi," ")}function F(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return a})})(we);var ht=we.exports;const mt=Ce(ht),X=new Map,S=Ne(),fe=new BroadcastChannel("iib-image-transfer-bus"),G=encodeURIComponent,R=(s,r=!1)=>`/infinite_image_browsing/file?path=${G(s.fullpath)}&t=${G(s.date)}${r?`&disposition=${G(s.name)}`:""}`,bt=(s,r)=>`/infinite_image_browsing/image-thumbnail?path=${G(s.fullpath)}&size=${r}&t=${G(s.date)}`,{eventEmitter:K,useEventListen:te}=ve(),{useHookShareState:q}=ut((s,{images:r})=>{const a=_({tabIdx:-1,paneIdx:-1}),i=A(()=>z(u.value)),u=_([]),g=A(()=>{var e;return u.value.map(n=>n.curr).slice((e=S.conf)!=null&&e.is_win?1:0)}),h=A(()=>ne(...g.value)),b=_(S.defaultSortingMethod),I=A(()=>{var w;if(r.value)return r.value;if(!i.value)return[];const e=((w=i.value)==null?void 0:w.files)??[],n=b.value,{walkFiles:l}=i.value,m=p=>S.onlyFoldersAndImages?p.filter(x=>x.type==="dir"||O(x.name)):p;return a.value.walkModePath?l?l.map(p=>U(m(p),n)).flat():U(m(e),n):U(m(e),n)}),y=_([]),T=_(-1),M=_(!0),E=_(!1),F=_(!1),t=()=>S.tabList[a.value.tabIdx].panes[a.value.paneIdx];return{previewing:F,spinning:E,canLoadNext:M,multiSelectedIdxs:y,previewIdx:T,basePath:g,currLocation:h,currPage:i,stack:u,sortMethod:b,sortedFiles:I,scroller:_(),stackViewEl:_(),props:a,getPane:t,...ve()}},()=>({images:_()})),kt=["detailList","largePreviewGrid","previewGrid"];function St(s,r){const{previewIdx:a,eventEmitter:i,canLoadNext:u,previewing:g}=q().toRefs(),{state:h}=q(),b=A(()=>(r==null?void 0:r.files.value)??h.sortedFiles),I=A(()=>(r==null?void 0:r.scroller.value)??h.scroller);let y=null;const T=(t,e)=>{var n;g.value=t,y!=null&&!t&&e&&((n=I.value)==null||n.scrollToItem(y),y=null)},M=()=>{s.walkModePath&&!F("next")&&u&&(D.info(L("loadingNextFolder")),i.value.emit("loadNextDir",!0))};Q("keydown",t=>{var e;if(g.value){let n=a.value;if(["ArrowDown","ArrowRight"].includes(t.key))for(n++;b.value[n]&&!O(b.value[n].name);)n++;else if(["ArrowUp","ArrowLeft"].includes(t.key))for(n--;b.value[n]&&!O(b.value[n].name);)n--;if(O((e=b.value[n])==null?void 0:e.name)??""){a.value=n;const l=I.value;l&&!(n>=l.$_startIndex&&n<=l.$_endIndex)&&(y=n)}M()}});const E=t=>{var n;let e=a.value;if(t==="next")for(e++;b.value[e]&&!O(b.value[e].name);)e++;else if(t==="prev")for(e--;b.value[e]&&!O(b.value[e].name);)e--;if(O((n=b.value[e])==null?void 0:n.name)??""){a.value=e;const l=I.value;l&&!(e>=l.$_startIndex&&e<=l.$_endIndex)&&(y=e)}M()},F=t=>{var n;let e=a.value;if(t==="next")for(e++;b.value[e]&&!O(b.value[e].name);)e++;else if(t==="prev")for(e--;b.value[e]&&!O(b.value[e].name);)e--;return O((n=b.value[e])==null?void 0:n.name)??""};return te("removeFiles",async()=>{var t;g.value&&!h.sortedFiles[a.value]&&(D.info(L("manualExitFullScreen"),5),await V(500),(t=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||t.click(),a.value=-1)}),{previewIdx:a,onPreviewVisibleChange:T,previewing:g,previewImgMove:E,canPreview:F}}function xt(s){const r=_(),{scroller:a,stackViewEl:i,stack:u,currPage:g,currLocation:h,sortMethod:b,useEventListen:I,eventEmitter:y,getPane:T}=q().toRefs();Z(()=>u.value.length,ee((o,c)=>{var v;o!==c&&((v=a.value)==null||v.scrollToItem(0))},300));const M=async o=>{if(await n(o),s.walkModePath){await V();const[c]=U(g.value.files,b.value).filter(v=>v.type==="dir");c&&await n(c.fullpath),await y.value.emit("loadNextDir")}};Oe(async()=>{var o;if(!u.value.length){const c=await W("/");u.value.push({files:c.files,curr:"/"})}r.value=new mt,r.value.configure({parent:i.value}),s.path&&s.path!=="/"?await M(s.walkModePath??s.path):(o=S.conf)!=null&&o.home&&n(S.conf.home)}),Z(h,ee(o=>{const c=T.value();c.path=o;const v=c.path.split("/").pop(),f=(()=>{var k;if(!s.walkModePath){const P=B(o);for(const[C,N]of Object.entries(S.pathAliasMap))if(P.startsWith(N))return P.replace(N,C);return v}return"Walk: "+(((k=S.quickMovePaths.find(P=>P.dir===c.walkModePath))==null?void 0:k.zh)??v)})();c.name=$("div",{style:"display:flex;align-items:center"},[$(pt),$("span",{class:"line-clamp-1",style:"max-width: 256px"},f)]),c.nameFallbackStr=f,S.recent=S.recent.filter(k=>k.key!==c.key),S.recent.unshift({path:o,key:c.key}),S.recent.length>20&&(S.recent=S.recent.slice(0,20))},300));const E=()=>ge(h.value),F=async o=>{var c,v;if(o.type==="dir")try{(c=r.value)==null||c.start();const{files:d}=await W(o.fullpath);u.value.push({files:d,curr:o.name})}finally{(v=r.value)==null||v.done()}},t=o=>{for(;o(Y(S.conf,"global.conf load failed"),S.conf.is_win?o.toLowerCase()==c.toLowerCase():o==c),n=async o=>{var v,d;const c=u.value.slice();try{Ae(o)||(o=ne(((v=S.conf)==null?void 0:v.sd_cwd)??"/",o));const f=oe(o),k=u.value.map(P=>P.curr);for(k.shift();k[0]&&f[0]&&e(k[0],f[0]);)k.shift(),f.shift();for(let P=0;Pe(N.name,P));if(!C)throw console.error({frags:f,frag:P,stack:pe(u.value)}),new Error(`${P} not found`);await F(C)}}catch(f){throw D.error(L("moveFailedCheckPath")+(f instanceof Error?f.message:"")),console.error(o,oe(o),g.value),u.value=c,f}},l=le(async()=>{var o,c,v;try{if((o=r.value)==null||o.start(),s.walkModePath)t(0),await M(s.walkModePath);else{const{files:d}=await W(u.value.length===1?"/":h.value);z(u.value).files=d}(c=a.value)==null||c.scrollToItem(0),D.success(L("refreshCompleted"))}finally{(v=r.value)==null||v.done()}});$e("return-to-iib",le(async()=>{var o,c;if(!s.walkModePath)try{(o=r.value)==null||o.start();const{files:v}=await W(u.value.length===1?"/":h.value);z(u.value).files.map(f=>f.date).join()!==v.map(f=>f.date).join()&&(z(u.value).files=v,D.success(L("autoUpdate")))}finally{(c=r.value)==null||c.done()}})),I.value("refresh",l);const m=o=>{s.walkModePath&&(T.value().walkModePath=o),M(o)},w=A(()=>S.quickMovePaths.map(o=>({...o,path:B(o.dir)}))),p=A(()=>{const o=B(h.value);return w.value.find(v=>v.path===o)});return{addToSearchScanPathAndQuickMove:async()=>{const o=p.value;if(o){if(!o.can_delete)return;await Ye(h.value),D.success(L("removeComplete"))}else await Ze(h.value),D.success(L("addComplete"));await Ue.emit("updateGlobalSetting")},searchPathInfo:p,refresh:l,copyLocation:E,back:t,openNext:F,currPage:g,currLocation:h,to:n,stack:u,scroller:a,quickMoveTo:m}}function Pt(s){const{scroller:r,sortedFiles:a,stack:i,sortMethod:u,currLocation:g,currPage:h,stackViewEl:b,canLoadNext:I,previewIdx:y}=q().toRefs(),{state:T}=q(),M=_(!1),E=_(S.defaultViewMode),F=272,t=64,e=F*2,{width:n}=qe(b),l=A(()=>{const c=n.value;if(!(E.value==="detailList"||!c))return~~(c/(E.value==="previewGrid"?F:e))}),m=A(()=>{const c=E.value;if(c==="detailList")return{first:80,second:void 0};const v=c==="previewGrid"?F:e;return{first:v+t,second:v}}),w=_(!1),p=async()=>{var c;if(!(w.value||!s.walkModePath||!I.value))try{w.value=!0;const v=i.value[i.value.length-2],d=U(v.files,u.value),f=d.findIndex(k=>{var P;return k.name===((P=h.value)==null?void 0:P.curr)});if(f!==-1){const k=d[f+1],P=ne(g.value,"../",k.name),C=await W(P),N=h.value;N.curr=k.name,N.walkFiles||(N.walkFiles=[N.files]),N.walkFiles.push(C.files),console.log("curr page files length",(c=h.value)==null?void 0:c.files.length)}}catch(v){console.error("loadNextDir",v),I.value=!1}finally{w.value=!1}},x=async(c=!1)=>{const v=r.value,d=()=>c?y.value:(v==null?void 0:v.$_endIndex)??0;for(;!a.value.length||d()>a.value.length-20&&I.value;)await V(100),await p()};T.useEventListen("loadNextDir",x);const o=ee(()=>x(),300);return{gridItems:l,sortedFiles:a,sortMethodConv:ze,moreActionsDropdownShow:M,viewMode:E,gridSize:F,sortMethod:u,largeGridSize:e,onScroll:o,loadNextDir:p,loadNextDirLoading:w,canLoadNext:I,itemSize:m}}function It(){const{currLocation:s,sortedFiles:r,currPage:a,multiSelectedIdxs:i,eventEmitter:u}=q().toRefs(),g=()=>{i.value=[]};return Q("click",g),Q("blur",g),Z(a,g),{onFileDragStart:(I,y)=>{const T=pe(r.value[y]);console.log("onFileDragStart set drag file ",I,y,T);const M=[T];let E=T.type==="dir";if(i.value.includes(y)){const F=i.value.map(t=>r.value[t]);M.push(...F),E=F.some(t=>t.type==="dir")}I.dataTransfer.setData("text/plain",JSON.stringify({includeDir:E,loc:s.value,path:ct(M,"fullpath").map(F=>F.fullpath)}))},onDrop:async I=>{var T;const y=JSON.parse(((T=I.dataTransfer)==null?void 0:T.getData("text"))||"{}");if(console.log(y),y.path&&typeof y.includeDir<"u"&&y.loc){const M=s.value;if(y.loc===M)return;const E=$("div",[$("div",`${L("moveSelectedFilesTo")}${M}`),$("ol",y.path.map(F=>F.split(/[/\\]/).pop()).map(F=>$("li",F)))]);he.confirm({title:L("confirm"),content:E,maskClosable:!0,async onOk(){await me(y.path,M),K.emit("removeFiles",{paths:y.path,loc:y.loc}),await u.value.emit("refresh")}})}},multiSelectedIdxs:i}}function Ft(s,{openNext:r}){const a=_(!1),i=_(""),{sortedFiles:u,previewIdx:g,multiSelectedIdxs:h,stack:b,currLocation:I,spinning:y,previewing:T}=q().toRefs(),M=B;te("removeFiles",({paths:e,loc:n})=>{if(M(n)!==M(I.value))return;const l=z(b.value);l&&(l.files=l.files.filter(m=>!e.includes(m.fullpath)),l.walkFiles&&(l.walkFiles=l.walkFiles.map(m=>m.filter(w=>!e.includes(w.fullpath)))))}),te("addFiles",({files:e,loc:n})=>{if(M(n)!==M(I.value))return;const l=z(b.value);l&&l.files.unshift(...e)});const E=Re(),F=async(e,n,l)=>{g.value=l,S.fullscreenPreviewInitialUrl=R(n);const m=h.value.indexOf(l);if(e.shiftKey){if(m!==-1)h.value.splice(m,1);else{h.value.push(l),h.value.sort((x,o)=>x-o);const w=h.value[0],p=h.value[h.value.length-1];h.value=lt(w,p+1)}e.stopPropagation()}else e.ctrlKey||e.metaKey?(m!==-1?h.value.splice(m,1):h.value.push(l),e.stopPropagation()):await r(n)},t=async(e,n,l)=>{var o,c,v;const m=R(n),w=I.value,p=()=>{let d=[];return h.value.includes(l)?d=h.value.map(f=>u.value[f]):d.push(n),d},x=async d=>{if(!y.value)try{y.value=!0,await Be(n.fullpath),fe.postMessage("iib_hidden_img_update_trigger");const f=setTimeout(()=>Ke.warn({message:L("long_loading"),duration:20}),5e3);await Qe(),clearTimeout(f),fe.postMessage(`iib_hidden_tab_${d}`)}catch(f){console.error(f),D.error("发送图像失败,请携带console的错误消息找开发者")}finally{y.value=!1}};if(`${e.key}`.startsWith("toggle-tag-")){const d=+`${e.key}`.split("toggle-tag-")[1],{is_remove:f}=await et({tag_id:d,img_path:n.fullpath}),k=(c=(o=S.conf)==null?void 0:o.all_custom_tags.find(P=>P.id===d))==null?void 0:c.name;D.success(L(f?"removedTagFromImage":"addedTagToImage",{tag:k}));return}switch(e.key){case"previewInNewWindow":return window.open(m);case"download":return window.open(R(n,!0));case"copyPreviewUrl":return ge(parent.document.location.origin+m);case"send2txt2img":return x("txt2img");case"send2img2img":return x("img2img");case"send2inpaint":return x("inpaint");case"send2extras":return x("extras");case"send2savedDir":{const d=S.quickMovePaths.find(P=>P.key==="outdir_save");if(!d)return D.error(L("unknownSavedDir"));const f=He(d.dir,(v=S.conf)==null?void 0:v.sd_cwd),k=p();await me(k.map(P=>P.fullpath),f),K.emit("removeFiles",{paths:k.map(P=>P.fullpath),loc:I.value}),K.emit("addFiles",{files:k,loc:f});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const d=je(),f=Je(),k=e.key.split("-")[1];k==="img2img"?f.switch_to_img2img():f.switch_to_txt2img(),await V(100);const C=d.querySelector(`#${k}_controlnet`).querySelector(".label-wrap");C.className.includes("open")||(C.click(),await V(100)),C.scrollIntoView();const re=await(await fetch(R(n))).blob(),ye=new File([re],"image.jpg",{type:re.type,lastModified:Date.now()}),ie=new DataTransfer;ie.items.add(ye);const be=new ClipboardEvent("paste",{clipboardData:ie,bubbles:!0});C.dispatchEvent(be);break}case"openWithWalkMode":{X.set(w,b.value);const d=S.tabList[s.tabIdx],f={type:"local",key:j(),path:n.fullpath,name:L("local"),stackKey:w,walkModePath:n.fullpath};d.panes.push(f),d.key=f.key;break}case"openInNewTab":{X.set(w,b.value);const d=S.tabList[s.tabIdx],f={type:"local",key:j(),path:n.fullpath,name:L("local"),stackKey:w};d.panes.push(f),d.key=f.key;break}case"openOnTheRight":{X.set(w,b.value);let d=S.tabList[s.tabIdx+1];d||(d={panes:[],key:"",id:j()},S.tabList[s.tabIdx+1]=d);const f={type:"local",key:j(),path:n.fullpath,name:L("local"),stackKey:w};d.panes.push(f),d.key=f.key;break}case"viewGenInfo":{a.value=!0,i.value=await E.pushAction(()=>Ve(n.fullpath)).res;break}case"openWithLocalFileBrowser":{await Ge(n.fullpath);break}case"deleteFiles":{const d=p();await new Promise(f=>{he.confirm({title:L("confirmDelete"),maskClosable:!0,content:$("ol",{style:"max-height:50vh;overflow:auto;"},d.map(k=>k.fullpath.split(/[/\\]/).pop()).map(k=>$("li",k))),async onOk(){const k=d.map(P=>P.fullpath);await gt(k),D.success(L("deleteSuccess")),K.emit("removeFiles",{paths:k,loc:I.value}),f()}})});break}}return{}};return Q("keydown",e=>{var n,l,m;if(T.value){const w=[];if(e.shiftKey&&w.push("Shift"),e.ctrlKey&&w.push("Ctrl"),e.code.startsWith("Key")||e.code.startsWith("Digit")){w.push(e.code);const p=w.join(" + "),x=(n=Object.entries(S.shortcut).find(o=>o[1]===p))==null?void 0:n[0];if(x){e.stopPropagation(),e.preventDefault();const o=g.value,c=u.value[o];switch(x){case"delete":return R(c)===S.fullscreenPreviewInitialUrl?D.warn(L("fullscreenRestriction")):t({key:"deleteFiles"},c,o);default:{const v=(l=/^toggle_tag_(.*)$/.exec(x))==null?void 0:l[1],d=(m=S.conf)==null?void 0:m.all_custom_tags.find(f=>f.name===v);return d?t({key:`toggle-tag-${d.id}`},c,o):void 0}}}}}}),{onFileItemClick:F,onContextMenuClick:t,showGenInfo:a,imageGenInfo:i,q:E}}const Mt=()=>{const{stackViewEl:s}=q().toRefs(),r=_(-1);return We(s,a=>{var u;let i=a.target;for(;i.parentElement;)if(i=i.parentElement,i.tagName.toLowerCase()==="li"&&i.classList.contains("file-item-trigger")){const g=(u=i.dataset)==null?void 0:u.idx;g&&Number.isSafeInteger(+g)&&(r.value=+g);return}}),{showMenuIdx:r}};export{xt as a,Pt as b,It as c,Ft as d,St as e,Mt as f,J as g,te as h,bt as i,z as l,X as s,R as t,q as u,kt as v}; +import{c2 as ke,c3 as Se,aK as xe,c4 as Pe,c5 as Ie,c6 as Fe,ao as de,c7 as Me,ai as Y,bd as Ee,c8 as Te,c as _e,ae as Le,c9 as ae,ca as De,cb as Ce,x as Ne,cc as ve,ag as A,bu as D,af as L,cd as V,r as _,y as Z,be as ee,ax as Oe,ce as $,cf as Ae,cg as ne,ch as oe,aj as pe,bq as le,br as $e,ci as B,cj as qe,aB as ze,bp as Re,ck as We,bZ as O,cl as U,B as he,cm as Ue,v as ge,L as Ge,c0 as Ve,ah as j,cn as je,co as He,cp as Be,cq as Ke,cr as Qe,cs as Je}from"./index-2ccb5782.js";import{b as Xe,h as Ye,i as Ze,t as et}from"./db-89fdf46d.js";var ce=1/0,tt=17976931348623157e292;function J(s){if(!s)return s===0?s:0;if(s=ke(s),s===ce||s===-ce){var r=s<0?-1:1;return r*tt}return s===s?s:0}function z(s){var r=s==null?0:s.length;return r?s[r-1]:void 0}function at(s,r,a){if(!Se(a))return!1;var i=typeof r;return(i=="number"?xe(a)&&Pe(r,a.length):i=="string"&&r in a)?Ie(a[r],s):!1}var nt=Math.ceil,st=Math.max;function rt(s,r,a,i){for(var u=-1,h=st(nt((r-s)/(a||1)),0),g=Array(h);h--;)g[i?h:++u]=s,s+=a;return g}function it(s){return function(r,a,i){return i&&typeof i!="number"&&at(r,a,i)&&(a=i=void 0),r=J(r),a===void 0?(a=r,r=0):a=J(a),i=i===void 0?r{document.addEventListener(...s),de(()=>document.removeEventListener(...s))},H=new WeakMap;function ut(s,r){return{useHookShareState:i=>{const u=Me();Y(u),H.has(u)||(H.set(u,Ee(s(u,i??(r==null?void 0:r())))),de(()=>{H.delete(u)}));const h=H.get(u);return Y(h),{state:h,toRefs(){return Te(h)}}}}}var ft={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 dt=ft;function ue(s){for(var r=1;r(await ae.get("/files",{params:{folder_path:s}})).data,ht=async s=>(await ae.post("/delete_files",{file_paths:s})).data,me=async(s,r)=>(await ae.post("/move_files",{file_paths:s,dest:r})).data;var we={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT */(function(s,r){(function(a,i){s.exports=i})(De,function(){var a={};a.version="0.3.5";var i=a.settings={minimum:.08,easing:"linear",positionUsing:"",speed:200,trickle:!0,trickleSpeed:200,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};a.configure=function(t){var e,n;for(e in t)n=t[e],n!==void 0&&t.hasOwnProperty(e)&&(i[e]=n);return this},a.status=null,a.set=function(t){var e=a.isStarted();t=u(t,i.minimum,1),a.status=t===1?null:t;var n=a.render(!e),l=n.querySelector(i.barSelector),m=i.speed,w=i.easing;return n.offsetWidth,b(function(p){i.positionUsing===""&&(i.positionUsing=a.getPositioningCSS()),I(l,g(t,m,w)),t===1?(I(n,{transition:"none",opacity:1}),n.offsetWidth,setTimeout(function(){I(n,{transition:"all "+m+"ms linear",opacity:0}),setTimeout(function(){a.remove(),p()},m)},m)):setTimeout(p,m)}),this},a.isStarted=function(){return typeof a.status=="number"},a.start=function(){a.status||a.set(0);var t=function(){setTimeout(function(){a.status&&(a.trickle(),t())},i.trickleSpeed)};return i.trickle&&t(),this},a.done=function(t){return!t&&!a.status?this:a.inc(.3+.5*Math.random()).set(1)},a.inc=function(t){var e=a.status;return e?e>1?void 0:(typeof t!="number"&&(e>=0&&e<.2?t=.1:e>=.2&&e<.5?t=.04:e>=.5&&e<.8?t=.02:e>=.8&&e<.99?t=.005:t=0),e=u(e+t,0,.994),a.set(e)):a.start()},a.trickle=function(){return a.inc()},function(){var t=0,e=0;a.promise=function(n){return!n||n.state()==="resolved"?this:(e===0&&a.start(),t++,e++,n.always(function(){e--,e===0?(t=0,a.done()):a.set((t-e)/t)}),this)}}(),a.getElement=function(){var t=a.getParent();if(t){var e=Array.prototype.slice.call(t.querySelectorAll(".nprogress")).filter(function(n){return n.parentElement===t});if(e.length>0)return e[0]}return null},a.getParent=function(){if(i.parent instanceof HTMLElement)return i.parent;if(typeof i.parent=="string")return document.querySelector(i.parent)},a.render=function(t){if(a.isRendered())return a.getElement();T(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.className="nprogress",e.innerHTML=i.template;var n=e.querySelector(i.barSelector),l=t?"-100":h(a.status||0),m=a.getParent(),w;return I(n,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),i.showSpinner||(w=e.querySelector(i.spinnerSelector),w&&F(w)),m!=document.body&&T(m,"nprogress-custom-parent"),m.appendChild(e),e},a.remove=function(){a.status=null,M(document.documentElement,"nprogress-busy"),M(a.getParent(),"nprogress-custom-parent");var t=a.getElement();t&&F(t)},a.isRendered=function(){return!!a.getElement()},a.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};function u(t,e,n){return tn?n:t}function h(t){return(-1+t)*100}function g(t,e,n){var l;return i.positionUsing==="translate3d"?l={transform:"translate3d("+h(t)+"%,0,0)"}:i.positionUsing==="translate"?l={transform:"translate("+h(t)+"%,0)"}:l={"margin-left":h(t)+"%"},l.transition="all "+e+"ms "+n,l}var b=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),t.length==1&&e()}}(),I=function(){var t=["Webkit","O","Moz","ms"],e={};function n(p){return p.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(x,o){return o.toUpperCase()})}function l(p){var x=document.body.style;if(p in x)return p;for(var o=t.length,c=p.charAt(0).toUpperCase()+p.slice(1),v;o--;)if(v=t[o]+c,v in x)return v;return p}function m(p){return p=n(p),e[p]||(e[p]=l(p))}function w(p,x,o){x=m(x),p.style[x]=o}return function(p,x){var o=arguments,c,v;if(o.length==2)for(c in x)v=x[c],v!==void 0&&x.hasOwnProperty(c)&&w(p,c,v);else w(p,o[1],o[2])}}();function y(t,e){var n=typeof t=="string"?t:E(t);return n.indexOf(" "+e+" ")>=0}function T(t,e){var n=E(t),l=n+e;y(n,e)||(t.className=l.substring(1))}function M(t,e){var n=E(t),l;y(t,e)&&(l=n.replace(" "+e+" "," "),t.className=l.substring(1,l.length-1))}function E(t){return(" "+(t&&t.className||"")+" ").replace(/\s+/gi," ")}function F(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return a})})(we);var gt=we.exports;const mt=Ce(gt),X=new Map,S=Ne(),fe=new BroadcastChannel("iib-image-transfer-bus"),G=encodeURIComponent,R=(s,r=!1)=>`/infinite_image_browsing/file?path=${G(s.fullpath)}&t=${G(s.date)}${r?`&disposition=${G(s.name)}`:""}`,bt=(s,r)=>`/infinite_image_browsing/image-thumbnail?path=${G(s.fullpath)}&size=${r}&t=${G(s.date)}`,{eventEmitter:K,useEventListen:te}=ve(),{useHookShareState:q}=ut((s,{images:r})=>{const a=_({tabIdx:-1,paneIdx:-1}),i=A(()=>z(u.value)),u=_([]),h=A(()=>{var e;return u.value.map(n=>n.curr).slice((e=S.conf)!=null&&e.is_win?1:0)}),g=A(()=>ne(...h.value)),b=_(S.defaultSortingMethod),I=A(()=>{var w;if(r.value)return r.value;if(!i.value)return[];const e=((w=i.value)==null?void 0:w.files)??[],n=b.value,{walkFiles:l}=i.value,m=p=>S.onlyFoldersAndImages?p.filter(x=>x.type==="dir"||O(x.name)):p;return a.value.walkModePath?l?l.map(p=>U(m(p),n)).flat():U(m(e),n):U(m(e),n)}),y=_([]),T=_(-1),M=_(!0),E=_(!1),F=_(!1),t=()=>S.tabList[a.value.tabIdx].panes[a.value.paneIdx];return{previewing:F,spinning:E,canLoadNext:M,multiSelectedIdxs:y,previewIdx:T,basePath:h,currLocation:g,currPage:i,stack:u,sortMethod:b,sortedFiles:I,scroller:_(),stackViewEl:_(),props:a,getPane:t,...ve()}},()=>({images:_()})),kt=["detailList","largePreviewGrid","previewGrid"];function St(s,r){const{previewIdx:a,eventEmitter:i,canLoadNext:u,previewing:h}=q().toRefs(),{state:g}=q(),b=A(()=>(r==null?void 0:r.files.value)??g.sortedFiles),I=A(()=>(r==null?void 0:r.scroller.value)??g.scroller);let y=null;const T=(t,e)=>{var n;h.value=t,y!=null&&!t&&e&&((n=I.value)==null||n.scrollToItem(y),y=null)},M=()=>{s.walkModePath&&!F("next")&&u&&(D.info(L("loadingNextFolder")),i.value.emit("loadNextDir",!0))};Q("keydown",t=>{var e;if(h.value){let n=a.value;if(["ArrowDown","ArrowRight"].includes(t.key))for(n++;b.value[n]&&!O(b.value[n].name);)n++;else if(["ArrowUp","ArrowLeft"].includes(t.key))for(n--;b.value[n]&&!O(b.value[n].name);)n--;if(O((e=b.value[n])==null?void 0:e.name)??""){a.value=n;const l=I.value;l&&!(n>=l.$_startIndex&&n<=l.$_endIndex)&&(y=n)}M()}});const E=t=>{var n;let e=a.value;if(t==="next")for(e++;b.value[e]&&!O(b.value[e].name);)e++;else if(t==="prev")for(e--;b.value[e]&&!O(b.value[e].name);)e--;if(O((n=b.value[e])==null?void 0:n.name)??""){a.value=e;const l=I.value;l&&!(e>=l.$_startIndex&&e<=l.$_endIndex)&&(y=e)}M()},F=t=>{var n;let e=a.value;if(t==="next")for(e++;b.value[e]&&!O(b.value[e].name);)e++;else if(t==="prev")for(e--;b.value[e]&&!O(b.value[e].name);)e--;return O((n=b.value[e])==null?void 0:n.name)??""};return te("removeFiles",async()=>{var t;h.value&&!g.sortedFiles[a.value]&&(D.info(L("manualExitFullScreen"),5),await V(500),(t=document.querySelector(".ant-image-preview-operations-operation .anticon-close"))==null||t.click(),a.value=-1)}),{previewIdx:a,onPreviewVisibleChange:T,previewing:h,previewImgMove:E,canPreview:F}}function xt(s){const r=_(),{scroller:a,stackViewEl:i,stack:u,currPage:h,currLocation:g,sortMethod:b,useEventListen:I,eventEmitter:y,getPane:T}=q().toRefs();Z(()=>u.value.length,ee((o,c)=>{var v;o!==c&&((v=a.value)==null||v.scrollToItem(0))},300));const M=async o=>{if(await n(o),s.walkModePath){await V();const[c]=U(h.value.files,b.value).filter(v=>v.type==="dir");c&&await n(c.fullpath),await y.value.emit("loadNextDir")}};Oe(async()=>{var o;if(!u.value.length){const c=await W("/");u.value.push({files:c.files,curr:"/"})}r.value=new mt,r.value.configure({parent:i.value}),s.path&&s.path!=="/"?await M(s.walkModePath??s.path):(o=S.conf)!=null&&o.home&&n(S.conf.home)}),Z(g,ee(o=>{const c=T.value();c.path=o;const v=c.path.split("/").pop(),f=(()=>{var k;if(!s.walkModePath){const P=B(o);for(const[C,N]of Object.entries(S.pathAliasMap))if(P.startsWith(N))return P.replace(N,C);return v}return"Walk: "+(((k=S.quickMovePaths.find(P=>P.dir===c.walkModePath))==null?void 0:k.zh)??v)})();c.name=$("div",{style:"display:flex;align-items:center"},[$(pt),$("span",{class:"line-clamp-1",style:"max-width: 256px"},f)]),c.nameFallbackStr=f,S.recent=S.recent.filter(k=>k.key!==c.key),S.recent.unshift({path:o,key:c.key}),S.recent.length>20&&(S.recent=S.recent.slice(0,20))},300));const E=()=>he(g.value),F=async o=>{var c,v;if(o.type==="dir")try{(c=r.value)==null||c.start();const{files:d}=await W(o.fullpath);u.value.push({files:d,curr:o.name})}finally{(v=r.value)==null||v.done()}},t=o=>{for(;o(Y(S.conf,"global.conf load failed"),S.conf.is_win?o.toLowerCase()==c.toLowerCase():o==c),n=async o=>{var v,d;const c=u.value.slice();try{Ae(o)||(o=ne(((v=S.conf)==null?void 0:v.sd_cwd)??"/",o));const f=oe(o),k=u.value.map(P=>P.curr);for(k.shift();k[0]&&f[0]&&e(k[0],f[0]);)k.shift(),f.shift();for(let P=0;Pe(N.name,P));if(!C)throw console.error({frags:f,frag:P,stack:pe(u.value)}),new Error(`${P} not found`);await F(C)}}catch(f){throw D.error(L("moveFailedCheckPath")+(f instanceof Error?f.message:"")),console.error(o,oe(o),h.value),u.value=c,f}},l=le(async()=>{var o,c,v;try{if((o=r.value)==null||o.start(),s.walkModePath)t(0),await M(s.walkModePath);else{const{files:d}=await W(u.value.length===1?"/":g.value);z(u.value).files=d}(c=a.value)==null||c.scrollToItem(0),D.success(L("refreshCompleted"))}finally{(v=r.value)==null||v.done()}});$e("return-to-iib",le(async()=>{var o,c;if(!s.walkModePath)try{(o=r.value)==null||o.start();const{files:v}=await W(u.value.length===1?"/":g.value);z(u.value).files.map(f=>f.date).join()!==v.map(f=>f.date).join()&&(z(u.value).files=v,D.success(L("autoUpdate")))}finally{(c=r.value)==null||c.done()}})),I.value("refresh",l);const m=o=>{s.walkModePath&&(T.value().walkModePath=o),M(o)},w=A(()=>S.quickMovePaths.map(o=>({...o,path:B(o.dir)}))),p=A(()=>{const o=B(g.value);return w.value.find(v=>v.path===o)});return{addToSearchScanPathAndQuickMove:async()=>{const o=p.value;if(o){if(!o.can_delete)return;await Ye(g.value),D.success(L("removeComplete"))}else await Ze(g.value),D.success(L("addComplete"));await Ue.emit("updateGlobalSetting")},searchPathInfo:p,refresh:l,copyLocation:E,back:t,openNext:F,currPage:h,currLocation:g,to:n,stack:u,scroller:a,quickMoveTo:m}}function Pt(s){const{scroller:r,sortedFiles:a,stack:i,sortMethod:u,currLocation:h,currPage:g,stackViewEl:b,canLoadNext:I,previewIdx:y}=q().toRefs(),{state:T}=q(),M=_(!1),E=_(S.defaultViewMode),F=272,t=64,e=F*2,{width:n}=qe(b),l=A(()=>{const c=n.value;if(!(E.value==="detailList"||!c))return~~(c/(E.value==="previewGrid"?F:e))}),m=A(()=>{const c=E.value;if(c==="detailList")return{first:80,second:void 0};const v=c==="previewGrid"?F:e;return{first:v+t,second:v}}),w=_(!1),p=async()=>{var c;if(!(w.value||!s.walkModePath||!I.value))try{w.value=!0;const v=i.value[i.value.length-2],d=U(v.files,u.value),f=d.findIndex(k=>{var P;return k.name===((P=g.value)==null?void 0:P.curr)});if(f!==-1){const k=d[f+1],P=ne(h.value,"../",k.name),C=await W(P),N=g.value;N.curr=k.name,N.walkFiles||(N.walkFiles=[N.files]),N.walkFiles.push(C.files),console.log("curr page files length",(c=g.value)==null?void 0:c.files.length)}}catch(v){console.error("loadNextDir",v),I.value=!1}finally{w.value=!1}},x=async(c=!1)=>{const v=r.value,d=()=>c?y.value:(v==null?void 0:v.$_endIndex)??0;for(;!a.value.length||d()>a.value.length-20&&I.value;)await V(100),await p()};T.useEventListen("loadNextDir",x);const o=ee(()=>x(),300);return{gridItems:l,sortedFiles:a,sortMethodConv:ze,moreActionsDropdownShow:M,viewMode:E,gridSize:F,sortMethod:u,largeGridSize:e,onScroll:o,loadNextDir:p,loadNextDirLoading:w,canLoadNext:I,itemSize:m}}function It(){const{currLocation:s,sortedFiles:r,currPage:a,multiSelectedIdxs:i,eventEmitter:u}=q().toRefs(),h=()=>{i.value=[]};return Q("click",h),Q("blur",h),Z(a,h),{onFileDragStart:(I,y)=>{const T=pe(r.value[y]);console.log("onFileDragStart set drag file ",I,y,T);const M=[T];let E=T.type==="dir";if(i.value.includes(y)){const F=i.value.map(t=>r.value[t]);M.push(...F),E=F.some(t=>t.type==="dir")}I.dataTransfer.setData("text/plain",JSON.stringify({includeDir:E,loc:s.value||"search-result",path:ct(M,"fullpath").map(F=>F.fullpath)}))},onDrop:async I=>{var T;const y=JSON.parse(((T=I.dataTransfer)==null?void 0:T.getData("text"))||"{}");if(console.log(y),y.path&&typeof y.includeDir<"u"&&y.loc){const M=s.value;if(y.loc===M)return;const E=$("div",[$("div",`${L("moveSelectedFilesTo")}${M}`),$("ol",y.path.map(F=>F.split(/[/\\]/).pop()).map(F=>$("li",F)))]);ge.confirm({title:L("confirm"),content:E,maskClosable:!0,async onOk(){await me(y.path,M),K.emit("removeFiles",{paths:y.path,loc:y.loc}),await u.value.emit("refresh")}})}},multiSelectedIdxs:i}}function Ft(s,{openNext:r}){const a=_(!1),i=_(""),{sortedFiles:u,previewIdx:h,multiSelectedIdxs:g,stack:b,currLocation:I,spinning:y,previewing:T}=q().toRefs(),M=B;te("removeFiles",({paths:e,loc:n})=>{if(M(n)!==M(I.value))return;const l=z(b.value);l&&(l.files=l.files.filter(m=>!e.includes(m.fullpath)),l.walkFiles&&(l.walkFiles=l.walkFiles.map(m=>m.filter(w=>!e.includes(w.fullpath)))))}),te("addFiles",({files:e,loc:n})=>{if(M(n)!==M(I.value))return;const l=z(b.value);l&&l.files.unshift(...e)});const E=Re(),F=async(e,n,l)=>{h.value=l,S.fullscreenPreviewInitialUrl=R(n);const m=g.value.indexOf(l);if(e.shiftKey){if(m!==-1)g.value.splice(m,1);else{g.value.push(l),g.value.sort((x,o)=>x-o);const w=g.value[0],p=g.value[g.value.length-1];g.value=lt(w,p+1)}e.stopPropagation()}else e.ctrlKey||e.metaKey?(m!==-1?g.value.splice(m,1):g.value.push(l),e.stopPropagation()):await r(n)},t=async(e,n,l)=>{var o,c,v;const m=R(n),w=I.value,p=()=>{let d=[];return g.value.includes(l)?d=g.value.map(f=>u.value[f]):d.push(n),d},x=async d=>{if(!y.value)try{y.value=!0,await Be(n.fullpath),fe.postMessage("iib_hidden_img_update_trigger");const f=setTimeout(()=>Ke.warn({message:L("long_loading"),duration:20}),5e3);await Qe(),clearTimeout(f),fe.postMessage(`iib_hidden_tab_${d}`)}catch(f){console.error(f),D.error("发送图像失败,请携带console的错误消息找开发者")}finally{y.value=!1}};if(`${e.key}`.startsWith("toggle-tag-")){const d=+`${e.key}`.split("toggle-tag-")[1],{is_remove:f}=await et({tag_id:d,img_path:n.fullpath}),k=(c=(o=S.conf)==null?void 0:o.all_custom_tags.find(P=>P.id===d))==null?void 0:c.name;D.success(L(f?"removedTagFromImage":"addedTagToImage",{tag:k}));return}switch(e.key){case"previewInNewWindow":return window.open(m);case"download":return window.open(R(n,!0));case"copyPreviewUrl":return he(parent.document.location.origin+m);case"send2txt2img":return x("txt2img");case"send2img2img":return x("img2img");case"send2inpaint":return x("inpaint");case"send2extras":return x("extras");case"send2savedDir":{const d=S.quickMovePaths.find(P=>P.key==="outdir_save");if(!d)return D.error(L("unknownSavedDir"));const f=He(d.dir,(v=S.conf)==null?void 0:v.sd_cwd),k=p();await me(k.map(P=>P.fullpath),f),K.emit("removeFiles",{paths:k.map(P=>P.fullpath),loc:I.value}),K.emit("addFiles",{files:k,loc:f});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const d=je(),f=Je(),k=e.key.split("-")[1];k==="img2img"?f.switch_to_img2img():f.switch_to_txt2img(),await V(100);const C=d.querySelector(`#${k}_controlnet`).querySelector(".label-wrap");C.className.includes("open")||(C.click(),await V(100)),C.scrollIntoView();const re=await(await fetch(R(n))).blob(),ye=new File([re],"image.jpg",{type:re.type,lastModified:Date.now()}),ie=new DataTransfer;ie.items.add(ye);const be=new ClipboardEvent("paste",{clipboardData:ie,bubbles:!0});C.dispatchEvent(be);break}case"openWithWalkMode":{X.set(w,b.value);const d=S.tabList[s.tabIdx],f={type:"local",key:j(),path:n.fullpath,name:L("local"),stackKey:w,walkModePath:n.fullpath};d.panes.push(f),d.key=f.key;break}case"openInNewTab":{X.set(w,b.value);const d=S.tabList[s.tabIdx],f={type:"local",key:j(),path:n.fullpath,name:L("local"),stackKey:w};d.panes.push(f),d.key=f.key;break}case"openOnTheRight":{X.set(w,b.value);let d=S.tabList[s.tabIdx+1];d||(d={panes:[],key:"",id:j()},S.tabList[s.tabIdx+1]=d);const f={type:"local",key:j(),path:n.fullpath,name:L("local"),stackKey:w};d.panes.push(f),d.key=f.key;break}case"viewGenInfo":{a.value=!0,i.value=await E.pushAction(()=>Ve(n.fullpath)).res;break}case"openWithLocalFileBrowser":{await Ge(n.fullpath);break}case"deleteFiles":{const d=p();await new Promise(f=>{ge.confirm({title:L("confirmDelete"),maskClosable:!0,content:$("ol",{style:"max-height:50vh;overflow:auto;"},d.map(k=>k.fullpath.split(/[/\\]/).pop()).map(k=>$("li",k))),async onOk(){const k=d.map(P=>P.fullpath);await ht(k),D.success(L("deleteSuccess")),K.emit("removeFiles",{paths:k,loc:I.value}),f()}})});break}}return{}};return Q("keydown",e=>{var n,l,m;if(T.value){const w=[];if(e.shiftKey&&w.push("Shift"),e.ctrlKey&&w.push("Ctrl"),e.code.startsWith("Key")||e.code.startsWith("Digit")){w.push(e.code);const p=w.join(" + "),x=(n=Object.entries(S.shortcut).find(o=>o[1]===p))==null?void 0:n[0];if(x){e.stopPropagation(),e.preventDefault();const o=h.value,c=u.value[o];switch(x){case"delete":return R(c)===S.fullscreenPreviewInitialUrl?D.warn(L("fullscreenRestriction")):t({key:"deleteFiles"},c,o);default:{const v=(l=/^toggle_tag_(.*)$/.exec(x))==null?void 0:l[1],d=(m=S.conf)==null?void 0:m.all_custom_tags.find(f=>f.name===v);return d?t({key:`toggle-tag-${d.id}`},c,o):void 0}}}}}}),{onFileItemClick:F,onContextMenuClick:t,showGenInfo:a,imageGenInfo:i,q:E}}const Mt=()=>{const{stackViewEl:s}=q().toRefs(),r=_(-1);return We(s,a=>{var u;let i=a.target;for(;i.parentElement;)if(i=i.parentElement,i.tagName.toLowerCase()==="li"&&i.classList.contains("file-item-trigger")){const h=(u=i.dataset)==null?void 0:u.idx;h&&Number.isSafeInteger(+h)&&(r.value=+h);return}}),{showMenuIdx:r}};export{xt as a,Pt as b,It as c,Ft as d,St as e,Mt as f,J as g,te as h,bt as i,z as l,X as s,R as t,q as u,kt as v}; diff --git a/vue/dist/assets/index-d77bcb54.js b/vue/dist/assets/index-2ccb5782.js similarity index 99% rename from vue/dist/assets/index-d77bcb54.js rename to vue/dist/assets/index-2ccb5782.js index 0d830e9..061d294 100644 --- a/vue/dist/assets/index-d77bcb54.js +++ b/vue/dist/assets/index-2ccb5782.js @@ -181,4 +181,4 @@ PERFORMANCE OF THIS SOFTWARE. * pinia v2.1.3 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let T1;const Ns=e=>T1=e,P1=Symbol();function kc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var jo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(jo||(jo={}));function o3(){const e=zc(!0),t=e.run(()=>V({}));let n=[],r=[];const a=ql({install(o){Ns(a),a._a=o,o.provide(P1,a),o.config.globalProperties.$pinia=a,r.forEach(i=>n.push(i)),r=[]},use(o){return!this._a&&!a3?r.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}const I1=()=>{};function mg(e,t,n,r=I1){e.push(t);const a=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),r())};return!n&&Hc()&&$g(a),a}function Sa(e,...t){e.slice().forEach(n=>{n(...t)})}const i3=e=>e();function $c(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],a=e[n];kc(a)&&kc(r)&&e.hasOwnProperty(n)&&!tt(r)&&!Ir(r)?e[n]=$c(a,r):e[n]=r}return e}const l3=Symbol();function s3(e){return!kc(e)||!e.hasOwnProperty(l3)}const{assign:_r}=Object;function u3(e){return!!(tt(e)&&e.effect)}function c3(e,t,n,r){const{state:a,actions:o,getters:i}=t,l=n.state.value[e];let s;function u(){l||(n.state.value[e]=a?a():{});const c=Yg(n.state.value[e]);return _r(c,o,Object.keys(i||{}).reduce((f,d)=>(f[d]=ql(G(()=>{Ns(n);const v=n._s.get(e);return i[d].call(v,v)})),f),{}))}return s=A1(e,u,t,n,r,!0),s}function A1(e,t,n={},r,a,o){let i;const l=_r({actions:{}},n),s={deep:!0};let u,c,f=[],d=[],v;const p=r.state.value[e];!o&&!p&&(r.state.value[e]={}),V({});let h;function y(A){let O;u=c=!1,typeof A=="function"?(A(r.state.value[e]),O={type:jo.patchFunction,storeId:e,events:v}):($c(r.state.value[e],A),O={type:jo.patchObject,payload:A,storeId:e,events:v});const R=h=Symbol();Ke().then(()=>{h===R&&(u=!0)}),c=!0,Sa(f,O,r.state.value[e])}const m=o?function(){const{state:O}=n,R=O?O():{};this.$patch(j=>{_r(j,R)})}:I1;function b(){i.stop(),f=[],d=[],r._s.delete(e)}function E(A,O){return function(){Ns(r);const R=Array.from(arguments),j=[],W=[];function B(I){j.push(I)}function H(I){W.push(I)}Sa(d,{args:R,name:A,store:x,after:B,onError:H});let k;try{k=O.apply(this&&this.$id===e?this:x,R)}catch(I){throw Sa(W,I),I}return k instanceof Promise?k.then(I=>(Sa(j,I),I)).catch(I=>(Sa(W,I),Promise.reject(I))):(Sa(j,k),k)}}const C={_p:r,$id:e,$onAction:mg.bind(null,d),$patch:y,$reset:m,$subscribe(A,O={}){const R=mg(f,A,O.detached,()=>j()),j=i.run(()=>ve(()=>r.state.value[e],W=>{(O.flush==="sync"?c:u)&&A({storeId:e,type:jo.direct,events:v},W)},_r({},s,O)));return R},$dispose:b},x=mt(C);r._s.set(e,x);const S=r._a&&r._a.runWithContext||i3,T=r._e.run(()=>(i=zc(),S(()=>i.run(t))));for(const A in T){const O=T[A];if(tt(O)&&!u3(O)||Ir(O))o||(p&&s3(O)&&(tt(O)?O.value=p[A]:$c(O,p[A])),r.state.value[e][A]=O);else if(typeof O=="function"){const R=E(A,O);T[A]=R,l.actions[A]=O}}return _r(x,T),_r(Me(x),T),Object.defineProperty(x,"$state",{get:()=>r.state.value[e],set:A=>{y(O=>{_r(O,A)})}}),r._p.forEach(A=>{_r(x,i.run(()=>A({store:x,app:r._a,pinia:r,options:l})))}),p&&o&&n.hydrate&&n.hydrate(x.$state,p),u=!0,c=!0,x}function f3(e,t,n){let r,a;const o=typeof t=="function";typeof e=="string"?(r=e,a=o?n:t):(a=e,r=e.id);function i(l,s){const u=S_();return l=l||(u?qe(P1,null):null),l&&Ns(l),l=T1,l._s.has(r)||(o?A1(r,t,a,l):c3(r,a,l)),l._s.get(r)}return i.$id=r,i}const d3=e=>hc({...e,name:typeof e.name=="string"?e.name:e.nameFallbackStr??""}),v3=e=>({...e,panes:e.panes.map(d3)}),Fd=f3("useGlobalStore",()=>{const e=V(),t=V([]),n=V(!0),r=V(50),a=()=>({type:"empty",name:De("emptyStartPage"),key:ra()}),o=V([]);Le(()=>{const C=a();o.value.push({panes:[C],key:C.key,id:ra()})});const i=V(),l=V(new Array),s=Date.now(),u=V(),c=()=>{var x;const C=Me(o.value).map(v3);((x=u.value)==null?void 0:x[0].time)!==s?u.value=[{tabs:C,time:s},...u.value??[]]:u.value[0].tabs=C,u.value=u.value.slice(0,2)},f=async(C,x,S)=>{let T=o.value.map(O=>O.panes).flat().find(O=>O.type==="tag-search-matched-image-grid"&&O.id===x);if(T){T.selectedTagIds=hc(S);return}else T={type:"tag-search-matched-image-grid",id:x,selectedTagIds:hc(S),key:ra(),name:De("searchResults")};const A=o.value[C+1];A?(A.key=T.key,A.panes.push(T)):o.value.push({panes:[T],key:T.key,id:ra()})},d=V(256),v=V(512),p=V(Ld.CREATED_TIME_DESC),h=V("previewGrid"),y=V(y1());ve(y,C=>Md.global.locale.value=C);const m=V(!1),b=V({delete:""}),E=G(()=>{if(!e.value)return{};const{global_setting:C,sd_cwd:x}=e.value,S={[De("extra")]:C.outdir_extras_samples,[De("saveButtonSavesTo")]:C.outdir_save,[De("t2i")]:C.outdir_txt2img_samples,[De("i2i")]:C.outdir_img2img_samples,[De("i2i-grid")]:C.outdir_img2img_grids,[De("t2i-grid")]:C.outdir_txt2img_grids},T=t.value.map(O=>O.dir),A=Object.keys(S).filter(O=>T.includes(S[O])).map(O=>[O,E1(S[O])?xn(S[O]):O1(x,S[O])]);return Object.fromEntries(A)});return{defaultSortingMethod:p,defaultViewMode:h,pathAliasMap:E,createEmptyPane:a,lang:y,tabList:o,conf:e,quickMovePaths:t,enableThumbnail:n,stackViewSplit:r,dragingTab:i,saveRecord:c,recent:l,tabListHistoryRecord:u,gridThumbnailSize:d,largeGridThumbnailSize:v,longPressOpenContextMenu:m,openTagSearchMatchedImageGridInRight:f,onlyFoldersAndImages:V(!0),fullscreenPreviewInitialUrl:V(""),shortcut:b,dontShowAgain:V(!1)}},{persist:{paths:["defaultSortingMethod","defaultViewMode","dontShowAgain","lang","enableThumbnail","tabListHistoryRecord","stackViewSplit","recent","gridThumbnailSize","largeGridThumbnailSize","longPressOpenContextMenu","onlyFoldersAndImages","shortcut"]}}),aB=()=>parent.window;function oB(){try{return parent.window.gradioApp()}catch{}const e=parent.document.getElementsByTagName("gradio-app"),t=e.length==0?null:e[0].shadowRoot;return t||document}const p3=async(e,t=100,n=1e3)=>new Promise(r=>{const a=(o=0)=>{const i=e();i!=null||o>n/t?r(i):setTimeout(()=>a(++o),t)};a()}),h3=(e,...t)=>t.reduce((n,r)=>(n[r]=e==null?void 0:e[r],n),{});function iB(e){var r;if(typeof e!="string")return!1;const t=[".jpg",".jpeg",".png",".gif",".bmp",".webp"],n=(r=e.split(".").pop())==null?void 0:r.toLowerCase();return n!==void 0&&t.includes(`.${n}`)}const m3=()=>mt(new ci(-1,0,-1,"throw")),lB=async e=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e);else{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}Pl.success(De("copied"))}catch{Pl.error("copy failed. maybe it's non-secure environment")}},{useEventListen:g3,eventEmitter:M1}=w1();function sB(e){let t=null,n=!1;return async function(...r){if(n)return t;n=!0;try{return t=e.apply(this,r),await t}finally{n=!1}}}const b3=async({global_setting:e,sd_cwd:t,home:n,extra_paths:r,cwd:a})=>{const o=h3(e,"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"),i={...o,cwd:t,home:n},l=await t3(Object.values(i).filter(f=>f)),s={outdir_txt2img_samples:De("t2i"),outdir_img2img_samples:De("i2i"),outdir_save:De("saveButtonSavesTo"),outdir_extras_samples:De("extra"),outdir_grids:De("gridImage"),outdir_img2img_grids:De("i2i-grid"),outdir_samples:De("image"),outdir_txt2img_grids:De("t2i-grid"),cwd:De("workingFolder"),home:"home"},u={home:xn(n),[De("workingFolder")]:xn(a),[De("t2i")]:o.outdir_txt2img_samples&&xn(o.outdir_txt2img_samples),[De("i2i")]:o.outdir_img2img_samples&&xn(o.outdir_img2img_samples)},c=f=>{f=xn(f);const d=[];for(const[v,p]of Object.entries(u))v&&p&&d.push(f.replace(p,"$"+v));return d.sort((v,p)=>v.length-p.length)[0]};return Object.keys(s).filter(f=>l[i[f]]).map(f=>{const d=f;return{key:d,zh:s[d],dir:i[d],can_delete:!1}}).concat(r.map(f=>({key:f.path,zh:c(f.path),dir:f.path,can_delete:!0})))};const y3={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((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.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(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((r,a)=>(r.size=a===t?r.max:r.min,a!==t&&(n+=r.min),r)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t]),this.$emit("resized",this.panes.map(r=>({min:r.min,max:r.max,size:r.size})))},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:r}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:r-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),e*100/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const r=0+(this.pushOtherPanes?0:n.prevPanesSize),a=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(e),a),r);let i=[t,t+1],l=this.panes[i[0]]||null,s=this.panes[i[1]]||null;const u=l.max<100&&o>=l.max+n.prevPanesSize,c=s.max<100&&o<=100-(s.max+this.sumNextPanesSize(t+1));if(u||c){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(t+1),0),s.size=s.max);return}if(this.pushOtherPanes){const f=this.doPushOtherPanes(n,o);if(!f)return;({sums:n,panesToResize:i}=f),l=this.panes[i[0]]||null,s=this.panes[i[1]]||null}l!==null&&(l.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),s!==null&&(s.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,s.min),s.max))},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,r=[n,n+1];return t{o>r[0]&&o<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),e.prevPanesSize=this.sumPrevPanesSize(r[0]),r[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((a,o)=>{o>0&&o<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),this.panes[r[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach((a,o)=>{o>n&&o{o=n+1&&(a.size=a.min,e.nextReachedMinPanes+=a.min)}),this.panes[r[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:r}},sumPrevPanesSize(e){return this.panes.reduce((t,n,r)=>t+(rt+(r>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.indext.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");!t&&!n&&(e.parentNode.removeChild(e),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))})},addSplitter(e,t,n=!1){const r=e-1,a=document.createElement("div");a.classList.add("splitpanes__splitter"),n||(a.onmousedown=o=>this.onMouseDown(o,r),typeof window<"u"&&"ontouchstart"in window&&(a.ontouchstart=o=>this.onMouseDown(o,r)),a.onclick=o=>this.onSplitterClick(o,r+1)),this.dblClickSplitter&&(a.ondblclick=o=>this.onSplitterDblClick(o,r+1)),t.parentNode.insertBefore(a,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([r,a])=>n[r]=a)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(a=>(a.className.includes("splitpanes__pane")&&t++,a===e.$el));const n=parseFloat(e.minSize),r=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((a,o)=>a.index=o),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(a=>({min:a.min,max:a.max,size:a.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(r=>r.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((r,a)=>r.index=a),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},resetPaneSizes(e={}){!e.addedPane&&!e.removedPane?this.initialPanesSizing():this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],r=[];this.panes.forEach(a=>{a.size=Math.max(Math.min(e,a.max),a.min),t-=a.size,a.size>=a.max&&n.push(a.id),a.size<=a.min&&r.push(a.id)}),t>.1&&this.readjustSizes(t,n,r)},initialPanesSizing(){let e=100;const t=[],n=[];let r=0;this.panes.forEach(o=>{e-=o.size,o.size!==null&&r++,o.size>=o.max&&t.push(o.id),o.size<=o.min&&n.push(o.id)});let a=100;e>.1&&(this.panes.forEach(o=>{o.size===null&&(o.size=Math.max(Math.min(e/(this.panesCount-r),o.max),o.min)),a-=o.size}),a>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e,removedPane:t}={}){let n=100/this.panesCount,r=0;const a=[],o=[];e&&e.givenSize!==null&&(n=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(i=>{r-=i.size,i.size>=i.max&&a.push(i.id),i.size<=i.min&&o.push(i.id)}),!(Math.abs(r)<.1)&&(this.panes.forEach(i=>{e&&e.givenSize!==null&&e.id===i.id||(i.size=Math.max(Math.min(n,i.max),i.min)),r-=i.size,i.size>=i.max&&a.push(i.id),i.size<=i.min&&o.push(i.id)}),r>.1&&this.readjustSizes(r,a,o))},readjustSizes(e,t,n){let r;e>0?r=e/(this.panesCount-t.length):r=e/(this.panesCount-n.length),this.panes.forEach((a,o)=>{if(e>0&&!t.includes(a.id)){const i=Math.max(Math.min(a.size+r,a.max),a.min),l=i-a.size;e-=l,a.size=i}else if(!n.includes(a.id)){const i=Math.max(Math.min(a.size+r,a.max),a.min),l=i-a.size;e-=l,a.size=i}a.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[a.id].size}%`})}),Math.abs(e)>.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(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?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 ia("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},C3=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},w3={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(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};function _3(e,t,n,r,a,o){return Yt(),No("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=i=>o.onPaneClick(i,e._.uid)),style:fi(e.style)},[bl(e.$slots,"default")],4)}const S3=C3(w3,[["render",_3]]);function Dd(e){return Hc()?($g(e),!0):!1}function Bd(e){return typeof e=="function"?e():rn(e)}const N1=typeof window<"u",R1=()=>{};function x3(e,t){function n(...r){return new Promise((a,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(o)})}return n}const k1=e=>e();function E3(e=k1){const t=V(!0);function n(){t.value=!1}function r(){t.value=!0}const a=(...o)=>{t.value&&e(...o)};return{isActive:Gl(t),pause:n,resume:r,eventFilter:a}}function O3(...e){if(e.length!==1)return Kt(...e);const t=e[0];return typeof t=="function"?Gl(Lw(()=>({get:t,set:R1}))):V(t)}function T3(e,t=!0){gt()?Le(e):t?e():Ke(e)}var gg=Object.getOwnPropertySymbols,P3=Object.prototype.hasOwnProperty,I3=Object.prototype.propertyIsEnumerable,A3=(e,t)=>{var n={};for(var r in e)P3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gg)for(var r of gg(e))t.indexOf(r)<0&&I3.call(e,r)&&(n[r]=e[r]);return n};function M3(e,t,n={}){const r=n,{eventFilter:a=k1}=r,o=A3(r,["eventFilter"]);return ve(e,x3(a,t),o)}var N3=Object.defineProperty,R3=Object.defineProperties,k3=Object.getOwnPropertyDescriptors,zl=Object.getOwnPropertySymbols,$1=Object.prototype.hasOwnProperty,L1=Object.prototype.propertyIsEnumerable,bg=(e,t,n)=>t in e?N3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$3=(e,t)=>{for(var n in t||(t={}))$1.call(t,n)&&bg(e,n,t[n]);if(zl)for(var n of zl(t))L1.call(t,n)&&bg(e,n,t[n]);return e},L3=(e,t)=>R3(e,k3(t)),F3=(e,t)=>{var n={};for(var r in e)$1.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zl)for(var r of zl(e))t.indexOf(r)<0&&L1.call(e,r)&&(n[r]=e[r]);return n};function D3(e,t,n={}){const r=n,{eventFilter:a}=r,o=F3(r,["eventFilter"]),{eventFilter:i,pause:l,resume:s,isActive:u}=E3(a);return{stop:M3(e,t,L3($3({},o),{eventFilter:i})),pause:l,resume:s,isActive:u}}function Rr(e){var t;const n=Bd(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ur=N1?window:void 0,B3=N1?window.document:void 0;function mn(...e){let t,n,r,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,a]=e,t=ur):[t,n,r,a]=e,!t)return R1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],i=()=>{o.forEach(c=>c()),o.length=0},l=(c,f,d,v)=>(c.addEventListener(f,d,v),()=>c.removeEventListener(f,d,v)),s=ve(()=>[Rr(t),Bd(a)],([c,f])=>{i(),c&&o.push(...n.flatMap(d=>r.map(v=>l(c,d,v,f))))},{immediate:!0,flush:"post"}),u=()=>{s(),i()};return Dd(u),u}const j3=500;function uB(e,t,n){var r,a;const o=G(()=>Rr(e));let i;function l(){i&&(clearTimeout(i),i=void 0)}function s(c){var f,d,v,p;(f=n==null?void 0:n.modifiers)!=null&&f.self&&c.target!==o.value||(l(),(d=n==null?void 0:n.modifiers)!=null&&d.prevent&&c.preventDefault(),(v=n==null?void 0:n.modifiers)!=null&&v.stop&&c.stopPropagation(),i=setTimeout(()=>t(c),(p=n==null?void 0:n.delay)!=null?p:j3))}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};mn(o,"pointerdown",s,u),mn(o,"pointerup",l,u),mn(o,"pointerleave",l,u)}function z3(){const e=V(!1);return gt()&&Le(()=>{e.value=!0}),e}function F1(e){const t=z3();return G(()=>(t.value,!!e()))}function H3(e,t={}){const{window:n=ur}=t,r=F1(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let a;const o=V(!1),i=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",l):a.removeListener(l))},l=()=>{r.value&&(i(),a=n.matchMedia(O3(e).value),o.value=!!(a!=null&&a.matches),a&&("addEventListener"in a?a.addEventListener("change",l):a.addListener(l)))};return lt(l),Dd(()=>i()),o}const Qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zi="__vueuse_ssr_handlers__",V3=W3();function W3(){return Zi in Qi||(Qi[Zi]=Qi[Zi]||{}),Qi[Zi]}function U3(e,t){return V3[e]||t}function K3(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var G3=Object.defineProperty,yg=Object.getOwnPropertySymbols,q3=Object.prototype.hasOwnProperty,Y3=Object.prototype.propertyIsEnumerable,Cg=(e,t,n)=>t in e?G3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wg=(e,t)=>{for(var n in t||(t={}))q3.call(t,n)&&Cg(e,n,t[n]);if(yg)for(var n of yg(t))Y3.call(t,n)&&Cg(e,n,t[n]);return e};const X3={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},_g="vueuse-storage";function J3(e,t,n,r={}){var a;const{flush:o="pre",deep:i=!0,listenToStorageChanges:l=!0,writeDefaults:s=!0,mergeDefaults:u=!1,shallow:c,window:f=ur,eventFilter:d,onError:v=A=>{console.error(A)}}=r,p=(c?Fn:V)(t);if(!n)try{n=U3("getDefaultStorage",()=>{var A;return(A=ur)==null?void 0:A.localStorage})()}catch(A){v(A)}if(!n)return p;const h=Bd(t),y=K3(h),m=(a=r.serializer)!=null?a:X3[y],{pause:b,resume:E}=D3(p,()=>C(p.value),{flush:o,deep:i,eventFilter:d});return f&&l&&(mn(f,"storage",T),mn(f,_g,S)),T(),p;function C(A){try{if(A==null)n.removeItem(e);else{const O=m.write(A),R=n.getItem(e);R!==O&&(n.setItem(e,O),f&&f.dispatchEvent(new CustomEvent(_g,{detail:{key:e,oldValue:R,newValue:O,storageArea:n}})))}}catch(O){v(O)}}function x(A){const O=A?A.newValue:n.getItem(e);if(O==null)return s&&h!==null&&n.setItem(e,m.write(h)),h;if(!A&&u){const R=m.read(O);return typeof u=="function"?u(R,h):y==="object"&&!Array.isArray(R)?wg(wg({},h),R):R}else return typeof O!="string"?O:m.read(O)}function S(A){T(A.detail)}function T(A){if(!(A&&A.storageArea!==n)){if(A&&A.key==null){p.value=h;return}if(!(A&&A.key!==e)){b();try{p.value=x(A)}catch(O){v(O)}finally{A?Ke(E):E()}}}}}function Q3(e){return H3("(prefers-color-scheme: dark)",e)}function Z3({document:e=B3}={}){if(!e)return V("visible");const t=V(e.visibilityState);return mn(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var Sg=Object.getOwnPropertySymbols,e8=Object.prototype.hasOwnProperty,t8=Object.prototype.propertyIsEnumerable,n8=(e,t)=>{var n={};for(var r in e)e8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sg)for(var r of Sg(e))t.indexOf(r)<0&&t8.call(e,r)&&(n[r]=e[r]);return n};function r8(e,t,n={}){const r=n,{window:a=ur}=r,o=n8(r,["window"]);let i;const l=F1(()=>a&&"ResizeObserver"in a),s=()=>{i&&(i.disconnect(),i=void 0)},u=G(()=>Array.isArray(e)?e.map(d=>Rr(d)):[Rr(e)]),c=ve(u,d=>{if(s(),l.value&&a){i=new ResizeObserver(t);for(const v of d)v&&i.observe(v,o)}},{immediate:!0,flush:"post",deep:!0}),f=()=>{s(),c()};return Dd(f),{isSupported:l,stop:f}}function cB(e,t={width:0,height:0},n={}){const{window:r=ur,box:a="content-box"}=n,o=G(()=>{var s,u;return(u=(s=Rr(e))==null?void 0:s.namespaceURI)==null?void 0:u.includes("svg")}),i=V(t.width),l=V(t.height);return r8(e,([s])=>{const u=a==="border-box"?s.borderBoxSize:a==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;if(r&&o.value){const c=Rr(e);if(c){const f=r.getComputedStyle(c);i.value=parseFloat(f.width),l.value=parseFloat(f.height)}}else if(u){const c=Array.isArray(u)?u:[u];i.value=c.reduce((f,{inlineSize:d})=>f+d,0),l.value=c.reduce((f,{blockSize:d})=>f+d,0)}else i.value=s.contentRect.width,l.value=s.contentRect.height},n),ve(()=>Rr(e),s=>{i.value=s?t.width:0,l.value=s?t.height:0}),{width:i,height:l}}function fB(e,t,n={}){const{window:r=ur}=n;return J3(e,t,r==null?void 0:r.localStorage,n)}const a8={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function o8(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:r=!1,initialValue:a={x:0,y:0},window:o=ur,target:i=o,eventFilter:l}=e,s=V(a.x),u=V(a.y),c=V(null),f=typeof t=="function"?t:a8[t],d=m=>{const b=f(m);b&&([s.value,u.value]=b,c.value="mouse")},v=m=>{if(m.touches.length>0){const b=f(m.touches[0]);b&&([s.value,u.value]=b,c.value="touch")}},p=()=>{s.value=a.x,u.value=a.y},h=l?m=>l(()=>d(m),{}):m=>d(m),y=l?m=>l(()=>v(m),{}):m=>v(m);return i&&(mn(i,"mousemove",h,{passive:!0}),mn(i,"dragover",h,{passive:!0}),n&&t!=="movement"&&(mn(i,"touchstart",y,{passive:!0}),mn(i,"touchmove",y,{passive:!0}),r&&mn(i,"touchend",p,{passive:!0}))),{x:s,y:u,sourceType:c}}function xg(e,t={}){const{handleOutside:n=!0,window:r=ur}=t,{x:a,y:o,sourceType:i}=o8(t),l=V(e??(r==null?void 0:r.document.body)),s=V(0),u=V(0),c=V(0),f=V(0),d=V(0),v=V(0),p=V(!0);let h=()=>{};return r&&(h=ve([l,a,o],()=>{const y=Rr(l);if(!y)return;const{left:m,top:b,width:E,height:C}=y.getBoundingClientRect();c.value=m+r.pageXOffset,f.value=b+r.pageYOffset,d.value=C,v.value=E;const x=a.value-c.value,S=o.value-f.value;p.value=E===0||C===0||x<0||S<0||x>E||S>C,(n||!p.value)&&(s.value=x,u.value=S)},{immediate:!0}),mn(document,"mouseleave",()=>{p.value=!0})),{x:a,y:o,sourceType:i,elementX:s,elementY:u,elementPositionX:c,elementPositionY:f,elementHeight:d,elementWidth:v,isOutside:p,stop:h}}const i8={style:{position:"relative"}},l8=ce({__name:"edgeTrigger",props:{tabIdx:{}},setup(e){const t=e,n=Fd(),r=V(),a=V(),{isOutside:o}=xg(a),{isOutside:i}=xg(r),l=G(()=>!o.value&&!!n.dragingTab),s=G(()=>!i.value&&!!n.dragingTab&&!l.value),u=(c,f)=>{var v,p,h,y;const d=JSON.parse(((v=c.dataTransfer)==null?void 0:v.getData("text"))??"{}");if(console.log("on-drop",f,d),(d==null?void 0:d.from)==="tab-drag"){if(c.stopPropagation(),n.dragingTab=void 0,f==="insert"&&d.tabIdx===t.tabIdx)return;const m=n.tabList,b=m[d.tabIdx].panes[d.paneIdx];m[d.tabIdx].panes.splice(d.paneIdx,1),f==="add-right"?(m[t.tabIdx].key=((p=m[t.tabIdx].panes[d.paneIdx-1])==null?void 0:p.key)??m[t.tabIdx].panes[0].key,m.splice(t.tabIdx+1,0,{panes:[b],key:b.key,id:ra()})):(m[d.tabIdx].key=((h=m[d.tabIdx].panes[d.paneIdx-1])==null?void 0:h.key)??((y=m[d.tabIdx].panes[0])==null?void 0:y.key),m[t.tabIdx].panes.push(b),m[t.tabIdx].key=b.key),m[d.tabIdx].panes.length===0&&m.splice(d.tabIdx,1)}};return(c,f)=>(Yt(),No("div",{class:za(["wrap",{accept:s.value}]),ref_key:"trigger",ref:r,onDragover:f[2]||(f[2]=Pa(()=>{},["prevent"])),onDrop:f[3]||(f[3]=Pa(d=>u(d,"insert"),["prevent"]))},[Cl("div",{class:za(["trigger",{accept:l.value}]),ref_key:"edgeTrigger",ref:a,onDragover:f[0]||(f[0]=Pa(()=>{},["prevent"])),onDrop:f[1]||(f[1]=Pa(d=>u(d,"add-right"),["prevent"]))},null,34),Cl("div",i8,[bl(c.$slots,"default",{},void 0,!0)])],34))}});const D1=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},s8=D1(l8,[["__scopeId","data-v-10c5aba4"]]),u8=ce({__name:"SplitViewTab",setup(e){const t=Fd(),n={local:ma(()=>Kr(()=>import("./stackView-0e934d10.js"),["assets/stackView-0e934d10.js","assets/fullScreenContextMenu-c0cd1bbd.js","assets/hook-b7fce3b0.js","assets/db-f752a0b1.js","assets/hook-9fed83c2.css","assets/fullScreenContextMenu-44c49813.css","assets/index-7ab29b41.js","assets/index-1225633f.css","assets/stackView-16848e93.css","assets/index-d55a76b1.css","assets/index-f4bbe4b8.css"])),empty:ma(()=>Kr(()=>import("./emptyStartup-508527f1.js"),["assets/emptyStartup-508527f1.js","assets/emptyStartup-65da9687.css"])),"global-setting":ma(()=>Kr(()=>import("./globalSetting-f5336043.js"),["assets/globalSetting-f5336043.js","assets/index-7ab29b41.js","assets/db-f752a0b1.js","assets/hook-b7fce3b0.js","assets/hook-9fed83c2.css","assets/index-1225633f.css","assets/globalSetting-e10283bc.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"tag-search-matched-image-grid":ma(()=>Kr(()=>import("./MatchedImageGrid-c6dd7328.js"),["assets/MatchedImageGrid-c6dd7328.js","assets/fullScreenContextMenu-c0cd1bbd.js","assets/hook-b7fce3b0.js","assets/db-f752a0b1.js","assets/hook-9fed83c2.css","assets/fullScreenContextMenu-44c49813.css","assets/hook-7125bc0b.js","assets/MatchedImageGrid-a6088856.css"])),"tag-search":ma(()=>Kr(()=>import("./TagSearch-b60ab014.js"),["assets/TagSearch-b60ab014.js","assets/db-f752a0b1.js","assets/TagSearch-5251ccaa.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"fuzzy-search":ma(()=>Kr(()=>import("./SubstrSearch-d97a6e0c.js"),["assets/SubstrSearch-d97a6e0c.js","assets/fullScreenContextMenu-c0cd1bbd.js","assets/hook-b7fce3b0.js","assets/db-f752a0b1.js","assets/hook-9fed83c2.css","assets/fullScreenContextMenu-44c49813.css","assets/hook-7125bc0b.js","assets/SubstrSearch-50945367.css","assets/index-f4bbe4b8.css"]))},r=(i,l,s)=>{var c,f;const u=t.tabList[i];if(s==="add"){const d={type:"empty",key:ra(),name:De("emptyStartPage")};u.panes.push(d),u.key=d.key}else{const d=u.panes.findIndex(v=>v.key===l);if(u.key===l&&(u.key=((c=u.panes[d-1])==null?void 0:c.key)??((f=u.panes[0])==null?void 0:f.key)),u.panes.splice(d,1),u.panes.length===0&&t.tabList.splice(i,1),t.tabList.length===0){const v=t.createEmptyPane();t.tabList.push({panes:[v],key:v.key,id:ra()})}}},a=V();ve(()=>t.tabList,async()=>{var i;await Ke(),t.saveRecord(),Array.from(((i=a.value)==null?void 0:i.querySelectorAll(".splitpanes__pane"))??[]).forEach((l,s)=>{Array.from(l.querySelectorAll(".ant-tabs-tab")??[]).forEach((u,c)=>{const f=u;f.setAttribute("draggable","true"),f.setAttribute("tabIdx",s.toString()),f.setAttribute("paneIdx",c.toString()),f.ondragend=()=>{t.dragingTab=void 0},f.ondragstart=d=>{t.dragingTab={tabIdx:s,paneIdx:c},d.dataTransfer.setData("text/plain",JSON.stringify({tabIdx:s,paneIdx:c,from:"tab-drag"}))}})})},{immediate:!0,deep:!0});const o=pc(()=>M1.emit("return-to-iib"),100);return T3(async()=>{const i=window.parent;if(!await p3(()=>i==null?void 0:i.onUiTabChange,200,3e4)){console.log("watch tab change failed");return}i.onUiTabChange(()=>{const l=i.get_uiCurrentTabContent();l!=null&&l.id.includes("infinite-image-browsing")&&o()})}),ve(Z3(),i=>i&&o()),(i,l)=>{const s=Bl,u=$o;return Yt(),No("div",{ref_key:"container",ref:a},[_(rn(y3),{class:"default-theme"},{default:xr(()=>[(Yt(!0),No(ze,null,nv(rn(t).tabList,(c,f)=>(Yt(),rr(rn(S3),{key:c.id},{default:xr(()=>[_(s8,{tabIdx:f},{default:xr(()=>[_(u,{type:"editable-card",activeKey:c.key,"onUpdate:activeKey":d=>c.key=d,onEdit:(d,v)=>r(f,d,v)},{default:xr(()=>[(Yt(!0),No(ze,null,nv(c.panes,(d,v)=>(Yt(),rr(s,{key:d.key,tab:d.name,class:"pane"},{default:xr(()=>[(Yt(),rr(v_(n[d.type]),cf({tabIdx:f,paneIdx:v},d),null,16,["tabIdx","paneIdx"]))]),_:2},1032,["tab"]))),128))]),_:2},1032,["activeKey","onUpdate:activeKey","onEdit"])]),_:2},1032,["tabIdx"])]),_:2},1024))),128))]),_:1})],512)}}});const c8=D1(u8,[["__scopeId","data-v-57f7fa82"]]),f8=ce({__name:"App",setup(e){const t=Fd(),n=m3();return g3("updateGlobalSetting",async()=>{const r=await e3();t.conf=r;const a=await b3(r);t.quickMovePaths=a.filter(o=>{var i,l;return(l=(i=o==null?void 0:o.dir)==null?void 0:i.trim)==null?void 0:l.call(i)})}),Le(async()=>{M1.emit("updateGlobalSetting")}),(r,a)=>{const o=qt;return Yt(),rr(o,{loading:!rn(n).isIdle},{default:xr(()=>[_(c8)]),_:1},8,["loading"])}}});function d8(e){return typeof e=="object"&&e!==null}function Eg(e,t){return e=d8(e)?e:Object.create(null),new Proxy(e,{get(n,r,a){return r==="key"?Reflect.get(n,r,a):Reflect.get(n,r,a)||Reflect.get(t,r,a)}})}function v8(e,t){return t.reduce((n,r)=>n==null?void 0:n[r],e)}function p8(e,t,n){return t.slice(0,-1).reduce((r,a)=>/^(__proto__)$/.test(a)?{}:r[a]=r[a]||{},e)[t[t.length-1]]=n,e}function h8(e,t){return t.reduce((n,r)=>{const a=r.split(".");return p8(n,a,v8(e,a))},{})}function Og(e,{storage:t,serializer:n,key:r,debug:a}){try{const o=t==null?void 0:t.getItem(r);o&&e.$patch(n==null?void 0:n.deserialize(o))}catch(o){a&&console.error(o)}}function Tg(e,{storage:t,serializer:n,key:r,paths:a,debug:o}){try{const i=Array.isArray(a)?h8(e,a):e;t.setItem(r,n.serialize(i))}catch(i){o&&console.error(i)}}function m8(e={}){return t=>{const{auto:n=!1}=e,{options:{persist:r=n},store:a}=t;if(!r)return;const o=(Array.isArray(r)?r.map(i=>Eg(i,e)):[Eg(r,e)]).map(({storage:i=localStorage,beforeRestore:l=null,afterRestore:s=null,serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},key:c=a.$id,paths:f=null,debug:d=!1})=>{var v;return{storage:i,beforeRestore:l,afterRestore:s,serializer:u,key:((v=e.key)!=null?v:p=>p)(c),paths:f,debug:d}});a.$persist=()=>{o.forEach(i=>{Tg(a.$state,i)})},a.$hydrate=({runHooks:i=!0}={})=>{o.forEach(l=>{const{beforeRestore:s,afterRestore:u}=l;i&&(s==null||s(t)),Og(a,l),i&&(u==null||u(t))})},o.forEach(i=>{const{beforeRestore:l,afterRestore:s}=i;l==null||l(t),Og(a,i),s==null||s(t),a.$subscribe((u,c)=>{Tg(c,i)},{detached:!0})})}}var g8=m8();const B1=o3();B1.use(g8);OS(f8).use(B1).use(Md).mount("#zanllp_dev_gradio_fe");const b8=Q3(),y8=()=>{try{return parent.location.search.includes("theme=dark")}catch{}return!1};ve([b8,y8],async([e,t])=>{await $d();const n=document.getElementsByTagName("html")[0];if(e||t){document.body.classList.add("dark");const r=document.createElement("style"),{default:a}=await Kr(()=>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{ss as $,Pa as A,lB as B,Va as C,y2 as D,nv as E,I8 as F,C8 as G,F_ as H,Et as I,Z8 as J,x8 as K,Q8 as L,Nr as M,_8 as N,za as O,J as P,Ll as Q,qt as R,S1 as S,H2 as T,ii as U,Mr as V,D1 as W,as as X,rs as Y,ge as Z,yt as _,P as a,bN as a$,Hn as a0,ft as a1,ls as a2,Kn as a3,ts as a4,dr as a5,pO as a6,bO as a7,_f as a8,lO as a9,X2 as aA,eB as aB,qe as aC,M8 as aD,st as aE,ch as aF,A8 as aG,fT as aH,TO as aI,up as aJ,m0 as aK,Gf as aL,vN as aM,mf as aN,xl as aO,$N as aP,uE as aQ,gS as aR,Fn as aS,lt as aT,P8 as aU,no as aV,Me as aW,jN as aX,Uf as aY,ri as aZ,l0 as a_,$y as aa,Ly as ab,Fy as ac,If as ad,vt as ae,De as af,G as ag,ra as ah,F6 as ai,hc as aj,Gw as ak,qw as al,j0 as am,z0 as an,Ye as ao,O0 as ap,iE as aq,Ne as ar,Ee as as,Ce as at,kt as au,Nt as av,tf as aw,Le as ax,Ke as ay,Ol as az,We as b,li as b$,gN as b0,HR as b1,NR as b2,kR as b3,zn as b4,yR as b5,bs as b6,sd as b7,xx as b8,VR as b9,K2 as bA,Rl as bB,gL as bC,gd as bD,Ia as bE,fr as bF,wL as bG,mm as bH,lk as bI,Jo as bJ,aL as bK,cT as bL,Gb as bM,sr as bN,Px as bO,Yw as bP,ql as bQ,Nw as bR,sb as bS,p_ as bT,bl as bU,v_ as bV,cf as bW,S8 as bX,fi as bY,iB as bZ,vc as b_,ys as ba,_k as bb,ul as bc,mt as bd,pc as be,kA as bf,sn as bg,T8 as bh,cc as bi,O8 as bj,qb as bk,sN as bl,ar as bm,Un as bn,lC as bo,m3 as bp,sB as bq,g3 as br,S2 as bs,XR as bt,Pl as bu,H$ as bv,E8 as bw,Q2 as bx,H0 as by,D2 as bz,_ as c,J8 as c0,fB as c1,$h as c2,Wn as c3,Vf as c4,Df as c5,SN as c6,gt as c7,Yg as c8,ha as c9,PO as ca,Ny as cb,w1 as cc,$d as cd,ia as ce,E1 as cf,O1 as cg,rB as ch,xn as ci,cB as cj,uB as ck,tB as cl,M1 as cm,oB as cn,nB as co,Y8 as cp,ZO as cq,X8 as cr,aB as cs,or as ct,g0 as cu,cR as cv,TR as cw,ce as d,jn as e,on as f,Yo as g,Y as h,je as i,nd as j,j6 as k,No as l,xr as m,rn as n,Yt as o,tt as p,Cl as q,V as r,ze as s,w8 as t,nt as u,bn as v,is as w,Fd as x,ve as y,rr as z}; + */let T1;const Ns=e=>T1=e,P1=Symbol();function kc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var jo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(jo||(jo={}));function o3(){const e=zc(!0),t=e.run(()=>V({}));let n=[],r=[];const a=ql({install(o){Ns(a),a._a=o,o.provide(P1,a),o.config.globalProperties.$pinia=a,r.forEach(i=>n.push(i)),r=[]},use(o){return!this._a&&!a3?r.push(o):n.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}const I1=()=>{};function mg(e,t,n,r=I1){e.push(t);const a=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),r())};return!n&&Hc()&&$g(a),a}function Sa(e,...t){e.slice().forEach(n=>{n(...t)})}const i3=e=>e();function $c(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],a=e[n];kc(a)&&kc(r)&&e.hasOwnProperty(n)&&!tt(r)&&!Ir(r)?e[n]=$c(a,r):e[n]=r}return e}const l3=Symbol();function s3(e){return!kc(e)||!e.hasOwnProperty(l3)}const{assign:_r}=Object;function u3(e){return!!(tt(e)&&e.effect)}function c3(e,t,n,r){const{state:a,actions:o,getters:i}=t,l=n.state.value[e];let s;function u(){l||(n.state.value[e]=a?a():{});const c=Yg(n.state.value[e]);return _r(c,o,Object.keys(i||{}).reduce((f,d)=>(f[d]=ql(G(()=>{Ns(n);const v=n._s.get(e);return i[d].call(v,v)})),f),{}))}return s=A1(e,u,t,n,r,!0),s}function A1(e,t,n={},r,a,o){let i;const l=_r({actions:{}},n),s={deep:!0};let u,c,f=[],d=[],v;const p=r.state.value[e];!o&&!p&&(r.state.value[e]={}),V({});let h;function y(A){let O;u=c=!1,typeof A=="function"?(A(r.state.value[e]),O={type:jo.patchFunction,storeId:e,events:v}):($c(r.state.value[e],A),O={type:jo.patchObject,payload:A,storeId:e,events:v});const R=h=Symbol();Ke().then(()=>{h===R&&(u=!0)}),c=!0,Sa(f,O,r.state.value[e])}const m=o?function(){const{state:O}=n,R=O?O():{};this.$patch(j=>{_r(j,R)})}:I1;function b(){i.stop(),f=[],d=[],r._s.delete(e)}function E(A,O){return function(){Ns(r);const R=Array.from(arguments),j=[],W=[];function B(I){j.push(I)}function H(I){W.push(I)}Sa(d,{args:R,name:A,store:x,after:B,onError:H});let k;try{k=O.apply(this&&this.$id===e?this:x,R)}catch(I){throw Sa(W,I),I}return k instanceof Promise?k.then(I=>(Sa(j,I),I)).catch(I=>(Sa(W,I),Promise.reject(I))):(Sa(j,k),k)}}const C={_p:r,$id:e,$onAction:mg.bind(null,d),$patch:y,$reset:m,$subscribe(A,O={}){const R=mg(f,A,O.detached,()=>j()),j=i.run(()=>ve(()=>r.state.value[e],W=>{(O.flush==="sync"?c:u)&&A({storeId:e,type:jo.direct,events:v},W)},_r({},s,O)));return R},$dispose:b},x=mt(C);r._s.set(e,x);const S=r._a&&r._a.runWithContext||i3,T=r._e.run(()=>(i=zc(),S(()=>i.run(t))));for(const A in T){const O=T[A];if(tt(O)&&!u3(O)||Ir(O))o||(p&&s3(O)&&(tt(O)?O.value=p[A]:$c(O,p[A])),r.state.value[e][A]=O);else if(typeof O=="function"){const R=E(A,O);T[A]=R,l.actions[A]=O}}return _r(x,T),_r(Me(x),T),Object.defineProperty(x,"$state",{get:()=>r.state.value[e],set:A=>{y(O=>{_r(O,A)})}}),r._p.forEach(A=>{_r(x,i.run(()=>A({store:x,app:r._a,pinia:r,options:l})))}),p&&o&&n.hydrate&&n.hydrate(x.$state,p),u=!0,c=!0,x}function f3(e,t,n){let r,a;const o=typeof t=="function";typeof e=="string"?(r=e,a=o?n:t):(a=e,r=e.id);function i(l,s){const u=S_();return l=l||(u?qe(P1,null):null),l&&Ns(l),l=T1,l._s.has(r)||(o?A1(r,t,a,l):c3(r,a,l)),l._s.get(r)}return i.$id=r,i}const d3=e=>hc({...e,name:typeof e.name=="string"?e.name:e.nameFallbackStr??""}),v3=e=>({...e,panes:e.panes.map(d3)}),Fd=f3("useGlobalStore",()=>{const e=V(),t=V([]),n=V(!0),r=V(50),a=()=>({type:"empty",name:De("emptyStartPage"),key:ra()}),o=V([]);Le(()=>{const C=a();o.value.push({panes:[C],key:C.key,id:ra()})});const i=V(),l=V(new Array),s=Date.now(),u=V(),c=()=>{var x;const C=Me(o.value).map(v3);((x=u.value)==null?void 0:x[0].time)!==s?u.value=[{tabs:C,time:s},...u.value??[]]:u.value[0].tabs=C,u.value=u.value.slice(0,2)},f=async(C,x,S)=>{let T=o.value.map(O=>O.panes).flat().find(O=>O.type==="tag-search-matched-image-grid"&&O.id===x);if(T){T.selectedTagIds=hc(S);return}else T={type:"tag-search-matched-image-grid",id:x,selectedTagIds:hc(S),key:ra(),name:De("searchResults")};const A=o.value[C+1];A?(A.key=T.key,A.panes.push(T)):o.value.push({panes:[T],key:T.key,id:ra()})},d=V(256),v=V(512),p=V(Ld.CREATED_TIME_DESC),h=V("previewGrid"),y=V(y1());ve(y,C=>Md.global.locale.value=C);const m=V(!1),b=V({delete:""}),E=G(()=>{if(!e.value)return{};const{global_setting:C,sd_cwd:x}=e.value,S={[De("extra")]:C.outdir_extras_samples,[De("saveButtonSavesTo")]:C.outdir_save,[De("t2i")]:C.outdir_txt2img_samples,[De("i2i")]:C.outdir_img2img_samples,[De("i2i-grid")]:C.outdir_img2img_grids,[De("t2i-grid")]:C.outdir_txt2img_grids},T=t.value.map(O=>O.dir),A=Object.keys(S).filter(O=>T.includes(S[O])).map(O=>[O,E1(S[O])?xn(S[O]):O1(x,S[O])]);return Object.fromEntries(A)});return{defaultSortingMethod:p,defaultViewMode:h,pathAliasMap:E,createEmptyPane:a,lang:y,tabList:o,conf:e,quickMovePaths:t,enableThumbnail:n,stackViewSplit:r,dragingTab:i,saveRecord:c,recent:l,tabListHistoryRecord:u,gridThumbnailSize:d,largeGridThumbnailSize:v,longPressOpenContextMenu:m,openTagSearchMatchedImageGridInRight:f,onlyFoldersAndImages:V(!0),fullscreenPreviewInitialUrl:V(""),shortcut:b,dontShowAgain:V(!1)}},{persist:{paths:["defaultSortingMethod","defaultViewMode","dontShowAgain","lang","enableThumbnail","tabListHistoryRecord","stackViewSplit","recent","gridThumbnailSize","largeGridThumbnailSize","longPressOpenContextMenu","onlyFoldersAndImages","shortcut"]}}),aB=()=>parent.window;function oB(){try{return parent.window.gradioApp()}catch{}const e=parent.document.getElementsByTagName("gradio-app"),t=e.length==0?null:e[0].shadowRoot;return t||document}const p3=async(e,t=100,n=1e3)=>new Promise(r=>{const a=(o=0)=>{const i=e();i!=null||o>n/t?r(i):setTimeout(()=>a(++o),t)};a()}),h3=(e,...t)=>t.reduce((n,r)=>(n[r]=e==null?void 0:e[r],n),{});function iB(e){var r;if(typeof e!="string")return!1;const t=[".jpg",".jpeg",".png",".gif",".bmp",".webp"],n=(r=e.split(".").pop())==null?void 0:r.toLowerCase();return n!==void 0&&t.includes(`.${n}`)}const m3=()=>mt(new ci(-1,0,-1,"throw")),lB=async e=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(e);else{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}Pl.success(De("copied"))}catch{Pl.error("copy failed. maybe it's non-secure environment")}},{useEventListen:g3,eventEmitter:M1}=w1();function sB(e){let t=null,n=!1;return async function(...r){if(n)return t;n=!0;try{return t=e.apply(this,r),await t}finally{n=!1}}}const b3=async({global_setting:e,sd_cwd:t,home:n,extra_paths:r,cwd:a})=>{const o=h3(e,"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"),i={...o,cwd:t,home:n},l=await t3(Object.values(i).filter(f=>f)),s={outdir_txt2img_samples:De("t2i"),outdir_img2img_samples:De("i2i"),outdir_save:De("saveButtonSavesTo"),outdir_extras_samples:De("extra"),outdir_grids:De("gridImage"),outdir_img2img_grids:De("i2i-grid"),outdir_samples:De("image"),outdir_txt2img_grids:De("t2i-grid"),cwd:De("workingFolder"),home:"home"},u={home:xn(n),[De("workingFolder")]:xn(a),[De("t2i")]:o.outdir_txt2img_samples&&xn(o.outdir_txt2img_samples),[De("i2i")]:o.outdir_img2img_samples&&xn(o.outdir_img2img_samples)},c=f=>{f=xn(f);const d=[];for(const[v,p]of Object.entries(u))v&&p&&d.push(f.replace(p,"$"+v));return d.sort((v,p)=>v.length-p.length)[0]};return Object.keys(s).filter(f=>l[i[f]]).map(f=>{const d=f;return{key:d,zh:s[d],dir:i[d],can_delete:!1}}).concat(r.map(f=>({key:f.path,zh:c(f.path),dir:f.path,can_delete:!0})))};const y3={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((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.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(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((r,a)=>(r.size=a===t?r.max:r.min,a!==t&&(n+=r.min),r)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t]),this.$emit("resized",this.panes.map(r=>({min:r.min,max:r.max,size:r.size})))},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:r}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:r-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),e*100/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const r=0+(this.pushOtherPanes?0:n.prevPanesSize),a=100-(this.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(this.getCurrentDragPercentage(e),a),r);let i=[t,t+1],l=this.panes[i[0]]||null,s=this.panes[i[1]]||null;const u=l.max<100&&o>=l.max+n.prevPanesSize,c=s.max<100&&o<=100-(s.max+this.sumNextPanesSize(t+1));if(u||c){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(t+1),0),s.size=s.max);return}if(this.pushOtherPanes){const f=this.doPushOtherPanes(n,o);if(!f)return;({sums:n,panesToResize:i}=f),l=this.panes[i[0]]||null,s=this.panes[i[1]]||null}l!==null&&(l.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),s!==null&&(s.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,s.min),s.max))},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,r=[n,n+1];return t{o>r[0]&&o<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),e.prevPanesSize=this.sumPrevPanesSize(r[0]),r[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((a,o)=>{o>0&&o<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),this.panes[r[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[r[1]].min&&(r[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&this.panes.forEach((a,o)=>{o>n&&o{o=n+1&&(a.size=a.min,e.nextReachedMinPanes+=a.min)}),this.panes[r[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:r}},sumPrevPanesSize(e){return this.panes.reduce((t,n,r)=>t+(rt+(r>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.indext.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");!t&&!n&&(e.parentNode.removeChild(e),console.warn("Splitpanes: Only elements are allowed at the root of . One of your DOM nodes was removed."))})},addSplitter(e,t,n=!1){const r=e-1,a=document.createElement("div");a.classList.add("splitpanes__splitter"),n||(a.onmousedown=o=>this.onMouseDown(o,r),typeof window<"u"&&"ontouchstart"in window&&(a.ontouchstart=o=>this.onMouseDown(o,r)),a.onclick=o=>this.onSplitterClick(o,r+1)),this.dblClickSplitter&&(a.ondblclick=o=>this.onSplitterDblClick(o,r+1)),t.parentNode.insertBefore(a,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([r,a])=>n[r]=a)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(a=>(a.className.includes("splitpanes__pane")&&t++,a===e.$el));const n=parseFloat(e.minSize),r=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(r)?100:r,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((a,o)=>a.index=o),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(a=>({min:a.min,max:a.max,size:a.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(r=>r.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((r,a)=>r.index=a),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(r=>({min:r.min,max:r.max,size:r.size}))})})},resetPaneSizes(e={}){!e.addedPane&&!e.removedPane?this.initialPanesSizing():this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],r=[];this.panes.forEach(a=>{a.size=Math.max(Math.min(e,a.max),a.min),t-=a.size,a.size>=a.max&&n.push(a.id),a.size<=a.min&&r.push(a.id)}),t>.1&&this.readjustSizes(t,n,r)},initialPanesSizing(){let e=100;const t=[],n=[];let r=0;this.panes.forEach(o=>{e-=o.size,o.size!==null&&r++,o.size>=o.max&&t.push(o.id),o.size<=o.min&&n.push(o.id)});let a=100;e>.1&&(this.panes.forEach(o=>{o.size===null&&(o.size=Math.max(Math.min(e/(this.panesCount-r),o.max),o.min)),a-=o.size}),a>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e,removedPane:t}={}){let n=100/this.panesCount,r=0;const a=[],o=[];e&&e.givenSize!==null&&(n=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(i=>{r-=i.size,i.size>=i.max&&a.push(i.id),i.size<=i.min&&o.push(i.id)}),!(Math.abs(r)<.1)&&(this.panes.forEach(i=>{e&&e.givenSize!==null&&e.id===i.id||(i.size=Math.max(Math.min(n,i.max),i.min)),r-=i.size,i.size>=i.max&&a.push(i.id),i.size<=i.min&&o.push(i.id)}),r>.1&&this.readjustSizes(r,a,o))},readjustSizes(e,t,n){let r;e>0?r=e/(this.panesCount-t.length):r=e/(this.panesCount-n.length),this.panes.forEach((a,o)=>{if(e>0&&!t.includes(a.id)){const i=Math.max(Math.min(a.size+r,a.max),a.min),l=i-a.size;e-=l,a.size=i}else if(!n.includes(a.id)){const i=Math.max(Math.min(a.size+r,a.max),a.min),l=i-a.size;e-=l,a.size=i}a.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[a.id].size}%`})}),Math.abs(e)>.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(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?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 ia("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},C3=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},w3={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(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};function _3(e,t,n,r,a,o){return Yt(),No("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=i=>o.onPaneClick(i,e._.uid)),style:fi(e.style)},[bl(e.$slots,"default")],4)}const S3=C3(w3,[["render",_3]]);function Dd(e){return Hc()?($g(e),!0):!1}function Bd(e){return typeof e=="function"?e():rn(e)}const N1=typeof window<"u",R1=()=>{};function x3(e,t){function n(...r){return new Promise((a,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(a).catch(o)})}return n}const k1=e=>e();function E3(e=k1){const t=V(!0);function n(){t.value=!1}function r(){t.value=!0}const a=(...o)=>{t.value&&e(...o)};return{isActive:Gl(t),pause:n,resume:r,eventFilter:a}}function O3(...e){if(e.length!==1)return Kt(...e);const t=e[0];return typeof t=="function"?Gl(Lw(()=>({get:t,set:R1}))):V(t)}function T3(e,t=!0){gt()?Le(e):t?e():Ke(e)}var gg=Object.getOwnPropertySymbols,P3=Object.prototype.hasOwnProperty,I3=Object.prototype.propertyIsEnumerable,A3=(e,t)=>{var n={};for(var r in e)P3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gg)for(var r of gg(e))t.indexOf(r)<0&&I3.call(e,r)&&(n[r]=e[r]);return n};function M3(e,t,n={}){const r=n,{eventFilter:a=k1}=r,o=A3(r,["eventFilter"]);return ve(e,x3(a,t),o)}var N3=Object.defineProperty,R3=Object.defineProperties,k3=Object.getOwnPropertyDescriptors,zl=Object.getOwnPropertySymbols,$1=Object.prototype.hasOwnProperty,L1=Object.prototype.propertyIsEnumerable,bg=(e,t,n)=>t in e?N3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$3=(e,t)=>{for(var n in t||(t={}))$1.call(t,n)&&bg(e,n,t[n]);if(zl)for(var n of zl(t))L1.call(t,n)&&bg(e,n,t[n]);return e},L3=(e,t)=>R3(e,k3(t)),F3=(e,t)=>{var n={};for(var r in e)$1.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&zl)for(var r of zl(e))t.indexOf(r)<0&&L1.call(e,r)&&(n[r]=e[r]);return n};function D3(e,t,n={}){const r=n,{eventFilter:a}=r,o=F3(r,["eventFilter"]),{eventFilter:i,pause:l,resume:s,isActive:u}=E3(a);return{stop:M3(e,t,L3($3({},o),{eventFilter:i})),pause:l,resume:s,isActive:u}}function Rr(e){var t;const n=Bd(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ur=N1?window:void 0,B3=N1?window.document:void 0;function mn(...e){let t,n,r,a;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,a]=e,t=ur):[t,n,r,a]=e,!t)return R1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],i=()=>{o.forEach(c=>c()),o.length=0},l=(c,f,d,v)=>(c.addEventListener(f,d,v),()=>c.removeEventListener(f,d,v)),s=ve(()=>[Rr(t),Bd(a)],([c,f])=>{i(),c&&o.push(...n.flatMap(d=>r.map(v=>l(c,d,v,f))))},{immediate:!0,flush:"post"}),u=()=>{s(),i()};return Dd(u),u}const j3=500;function uB(e,t,n){var r,a;const o=G(()=>Rr(e));let i;function l(){i&&(clearTimeout(i),i=void 0)}function s(c){var f,d,v,p;(f=n==null?void 0:n.modifiers)!=null&&f.self&&c.target!==o.value||(l(),(d=n==null?void 0:n.modifiers)!=null&&d.prevent&&c.preventDefault(),(v=n==null?void 0:n.modifiers)!=null&&v.stop&&c.stopPropagation(),i=setTimeout(()=>t(c),(p=n==null?void 0:n.delay)!=null?p:j3))}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};mn(o,"pointerdown",s,u),mn(o,"pointerup",l,u),mn(o,"pointerleave",l,u)}function z3(){const e=V(!1);return gt()&&Le(()=>{e.value=!0}),e}function F1(e){const t=z3();return G(()=>(t.value,!!e()))}function H3(e,t={}){const{window:n=ur}=t,r=F1(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let a;const o=V(!1),i=()=>{a&&("removeEventListener"in a?a.removeEventListener("change",l):a.removeListener(l))},l=()=>{r.value&&(i(),a=n.matchMedia(O3(e).value),o.value=!!(a!=null&&a.matches),a&&("addEventListener"in a?a.addEventListener("change",l):a.addListener(l)))};return lt(l),Dd(()=>i()),o}const Qi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Zi="__vueuse_ssr_handlers__",V3=W3();function W3(){return Zi in Qi||(Qi[Zi]=Qi[Zi]||{}),Qi[Zi]}function U3(e,t){return V3[e]||t}function K3(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var G3=Object.defineProperty,yg=Object.getOwnPropertySymbols,q3=Object.prototype.hasOwnProperty,Y3=Object.prototype.propertyIsEnumerable,Cg=(e,t,n)=>t in e?G3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wg=(e,t)=>{for(var n in t||(t={}))q3.call(t,n)&&Cg(e,n,t[n]);if(yg)for(var n of yg(t))Y3.call(t,n)&&Cg(e,n,t[n]);return e};const X3={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},_g="vueuse-storage";function J3(e,t,n,r={}){var a;const{flush:o="pre",deep:i=!0,listenToStorageChanges:l=!0,writeDefaults:s=!0,mergeDefaults:u=!1,shallow:c,window:f=ur,eventFilter:d,onError:v=A=>{console.error(A)}}=r,p=(c?Fn:V)(t);if(!n)try{n=U3("getDefaultStorage",()=>{var A;return(A=ur)==null?void 0:A.localStorage})()}catch(A){v(A)}if(!n)return p;const h=Bd(t),y=K3(h),m=(a=r.serializer)!=null?a:X3[y],{pause:b,resume:E}=D3(p,()=>C(p.value),{flush:o,deep:i,eventFilter:d});return f&&l&&(mn(f,"storage",T),mn(f,_g,S)),T(),p;function C(A){try{if(A==null)n.removeItem(e);else{const O=m.write(A),R=n.getItem(e);R!==O&&(n.setItem(e,O),f&&f.dispatchEvent(new CustomEvent(_g,{detail:{key:e,oldValue:R,newValue:O,storageArea:n}})))}}catch(O){v(O)}}function x(A){const O=A?A.newValue:n.getItem(e);if(O==null)return s&&h!==null&&n.setItem(e,m.write(h)),h;if(!A&&u){const R=m.read(O);return typeof u=="function"?u(R,h):y==="object"&&!Array.isArray(R)?wg(wg({},h),R):R}else return typeof O!="string"?O:m.read(O)}function S(A){T(A.detail)}function T(A){if(!(A&&A.storageArea!==n)){if(A&&A.key==null){p.value=h;return}if(!(A&&A.key!==e)){b();try{p.value=x(A)}catch(O){v(O)}finally{A?Ke(E):E()}}}}}function Q3(e){return H3("(prefers-color-scheme: dark)",e)}function Z3({document:e=B3}={}){if(!e)return V("visible");const t=V(e.visibilityState);return mn(e,"visibilitychange",()=>{t.value=e.visibilityState}),t}var Sg=Object.getOwnPropertySymbols,e8=Object.prototype.hasOwnProperty,t8=Object.prototype.propertyIsEnumerable,n8=(e,t)=>{var n={};for(var r in e)e8.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sg)for(var r of Sg(e))t.indexOf(r)<0&&t8.call(e,r)&&(n[r]=e[r]);return n};function r8(e,t,n={}){const r=n,{window:a=ur}=r,o=n8(r,["window"]);let i;const l=F1(()=>a&&"ResizeObserver"in a),s=()=>{i&&(i.disconnect(),i=void 0)},u=G(()=>Array.isArray(e)?e.map(d=>Rr(d)):[Rr(e)]),c=ve(u,d=>{if(s(),l.value&&a){i=new ResizeObserver(t);for(const v of d)v&&i.observe(v,o)}},{immediate:!0,flush:"post",deep:!0}),f=()=>{s(),c()};return Dd(f),{isSupported:l,stop:f}}function cB(e,t={width:0,height:0},n={}){const{window:r=ur,box:a="content-box"}=n,o=G(()=>{var s,u;return(u=(s=Rr(e))==null?void 0:s.namespaceURI)==null?void 0:u.includes("svg")}),i=V(t.width),l=V(t.height);return r8(e,([s])=>{const u=a==="border-box"?s.borderBoxSize:a==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;if(r&&o.value){const c=Rr(e);if(c){const f=r.getComputedStyle(c);i.value=parseFloat(f.width),l.value=parseFloat(f.height)}}else if(u){const c=Array.isArray(u)?u:[u];i.value=c.reduce((f,{inlineSize:d})=>f+d,0),l.value=c.reduce((f,{blockSize:d})=>f+d,0)}else i.value=s.contentRect.width,l.value=s.contentRect.height},n),ve(()=>Rr(e),s=>{i.value=s?t.width:0,l.value=s?t.height:0}),{width:i,height:l}}function fB(e,t,n={}){const{window:r=ur}=n;return J3(e,t,r==null?void 0:r.localStorage,n)}const a8={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof Touch?null:[e.movementX,e.movementY]};function o8(e={}){const{type:t="page",touch:n=!0,resetOnTouchEnds:r=!1,initialValue:a={x:0,y:0},window:o=ur,target:i=o,eventFilter:l}=e,s=V(a.x),u=V(a.y),c=V(null),f=typeof t=="function"?t:a8[t],d=m=>{const b=f(m);b&&([s.value,u.value]=b,c.value="mouse")},v=m=>{if(m.touches.length>0){const b=f(m.touches[0]);b&&([s.value,u.value]=b,c.value="touch")}},p=()=>{s.value=a.x,u.value=a.y},h=l?m=>l(()=>d(m),{}):m=>d(m),y=l?m=>l(()=>v(m),{}):m=>v(m);return i&&(mn(i,"mousemove",h,{passive:!0}),mn(i,"dragover",h,{passive:!0}),n&&t!=="movement"&&(mn(i,"touchstart",y,{passive:!0}),mn(i,"touchmove",y,{passive:!0}),r&&mn(i,"touchend",p,{passive:!0}))),{x:s,y:u,sourceType:c}}function xg(e,t={}){const{handleOutside:n=!0,window:r=ur}=t,{x:a,y:o,sourceType:i}=o8(t),l=V(e??(r==null?void 0:r.document.body)),s=V(0),u=V(0),c=V(0),f=V(0),d=V(0),v=V(0),p=V(!0);let h=()=>{};return r&&(h=ve([l,a,o],()=>{const y=Rr(l);if(!y)return;const{left:m,top:b,width:E,height:C}=y.getBoundingClientRect();c.value=m+r.pageXOffset,f.value=b+r.pageYOffset,d.value=C,v.value=E;const x=a.value-c.value,S=o.value-f.value;p.value=E===0||C===0||x<0||S<0||x>E||S>C,(n||!p.value)&&(s.value=x,u.value=S)},{immediate:!0}),mn(document,"mouseleave",()=>{p.value=!0})),{x:a,y:o,sourceType:i,elementX:s,elementY:u,elementPositionX:c,elementPositionY:f,elementHeight:d,elementWidth:v,isOutside:p,stop:h}}const i8={style:{position:"relative"}},l8=ce({__name:"edgeTrigger",props:{tabIdx:{}},setup(e){const t=e,n=Fd(),r=V(),a=V(),{isOutside:o}=xg(a),{isOutside:i}=xg(r),l=G(()=>!o.value&&!!n.dragingTab),s=G(()=>!i.value&&!!n.dragingTab&&!l.value),u=(c,f)=>{var v,p,h,y;const d=JSON.parse(((v=c.dataTransfer)==null?void 0:v.getData("text"))??"{}");if(console.log("on-drop",f,d),(d==null?void 0:d.from)==="tab-drag"){if(c.stopPropagation(),n.dragingTab=void 0,f==="insert"&&d.tabIdx===t.tabIdx)return;const m=n.tabList,b=m[d.tabIdx].panes[d.paneIdx];m[d.tabIdx].panes.splice(d.paneIdx,1),f==="add-right"?(m[t.tabIdx].key=((p=m[t.tabIdx].panes[d.paneIdx-1])==null?void 0:p.key)??m[t.tabIdx].panes[0].key,m.splice(t.tabIdx+1,0,{panes:[b],key:b.key,id:ra()})):(m[d.tabIdx].key=((h=m[d.tabIdx].panes[d.paneIdx-1])==null?void 0:h.key)??((y=m[d.tabIdx].panes[0])==null?void 0:y.key),m[t.tabIdx].panes.push(b),m[t.tabIdx].key=b.key),m[d.tabIdx].panes.length===0&&m.splice(d.tabIdx,1)}};return(c,f)=>(Yt(),No("div",{class:za(["wrap",{accept:s.value}]),ref_key:"trigger",ref:r,onDragover:f[2]||(f[2]=Pa(()=>{},["prevent"])),onDrop:f[3]||(f[3]=Pa(d=>u(d,"insert"),["prevent"]))},[Cl("div",{class:za(["trigger",{accept:l.value}]),ref_key:"edgeTrigger",ref:a,onDragover:f[0]||(f[0]=Pa(()=>{},["prevent"])),onDrop:f[1]||(f[1]=Pa(d=>u(d,"add-right"),["prevent"]))},null,34),Cl("div",i8,[bl(c.$slots,"default",{},void 0,!0)])],34))}});const D1=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},s8=D1(l8,[["__scopeId","data-v-10c5aba4"]]),u8=ce({__name:"SplitViewTab",setup(e){const t=Fd(),n={local:ma(()=>Kr(()=>import("./stackView-91ffbd75.js"),["assets/stackView-91ffbd75.js","assets/fullScreenContextMenu-01ffa640.js","assets/hook-dadee24a.js","assets/db-89fdf46d.js","assets/hook-9fed83c2.css","assets/fullScreenContextMenu-44c49813.css","assets/index-6f28cdca.js","assets/index-1225633f.css","assets/stackView-16848e93.css","assets/index-d55a76b1.css","assets/index-f4bbe4b8.css"])),empty:ma(()=>Kr(()=>import("./emptyStartup-54657ab7.js"),["assets/emptyStartup-54657ab7.js","assets/emptyStartup-65da9687.css"])),"global-setting":ma(()=>Kr(()=>import("./globalSetting-b4392f4a.js"),["assets/globalSetting-b4392f4a.js","assets/index-6f28cdca.js","assets/db-89fdf46d.js","assets/hook-dadee24a.js","assets/hook-9fed83c2.css","assets/index-1225633f.css","assets/globalSetting-e10283bc.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"tag-search-matched-image-grid":ma(()=>Kr(()=>import("./MatchedImageGrid-c3669272.js"),["assets/MatchedImageGrid-c3669272.js","assets/fullScreenContextMenu-01ffa640.js","assets/hook-dadee24a.js","assets/db-89fdf46d.js","assets/hook-9fed83c2.css","assets/fullScreenContextMenu-44c49813.css","assets/hook-93ddaeff.js","assets/MatchedImageGrid-d5ef6daf.css"])),"tag-search":ma(()=>Kr(()=>import("./TagSearch-436869c8.js"),["assets/TagSearch-436869c8.js","assets/db-89fdf46d.js","assets/TagSearch-5251ccaa.css","assets/index-f4bbe4b8.css","assets/index-d55a76b1.css"])),"fuzzy-search":ma(()=>Kr(()=>import("./SubstrSearch-66ef0359.js"),["assets/SubstrSearch-66ef0359.js","assets/fullScreenContextMenu-01ffa640.js","assets/hook-dadee24a.js","assets/db-89fdf46d.js","assets/hook-9fed83c2.css","assets/fullScreenContextMenu-44c49813.css","assets/hook-93ddaeff.js","assets/SubstrSearch-e138ba8f.css","assets/index-f4bbe4b8.css"]))},r=(i,l,s)=>{var c,f;const u=t.tabList[i];if(s==="add"){const d={type:"empty",key:ra(),name:De("emptyStartPage")};u.panes.push(d),u.key=d.key}else{const d=u.panes.findIndex(v=>v.key===l);if(u.key===l&&(u.key=((c=u.panes[d-1])==null?void 0:c.key)??((f=u.panes[0])==null?void 0:f.key)),u.panes.splice(d,1),u.panes.length===0&&t.tabList.splice(i,1),t.tabList.length===0){const v=t.createEmptyPane();t.tabList.push({panes:[v],key:v.key,id:ra()})}}},a=V();ve(()=>t.tabList,async()=>{var i;await Ke(),t.saveRecord(),Array.from(((i=a.value)==null?void 0:i.querySelectorAll(".splitpanes__pane"))??[]).forEach((l,s)=>{Array.from(l.querySelectorAll(".ant-tabs-tab")??[]).forEach((u,c)=>{const f=u;f.setAttribute("draggable","true"),f.setAttribute("tabIdx",s.toString()),f.setAttribute("paneIdx",c.toString()),f.ondragend=()=>{t.dragingTab=void 0},f.ondragstart=d=>{t.dragingTab={tabIdx:s,paneIdx:c},d.dataTransfer.setData("text/plain",JSON.stringify({tabIdx:s,paneIdx:c,from:"tab-drag"}))}})})},{immediate:!0,deep:!0});const o=pc(()=>M1.emit("return-to-iib"),100);return T3(async()=>{const i=window.parent;if(!await p3(()=>i==null?void 0:i.onUiTabChange,200,3e4)){console.log("watch tab change failed");return}i.onUiTabChange(()=>{const l=i.get_uiCurrentTabContent();l!=null&&l.id.includes("infinite-image-browsing")&&o()})}),ve(Z3(),i=>i&&o()),(i,l)=>{const s=Bl,u=$o;return Yt(),No("div",{ref_key:"container",ref:a},[_(rn(y3),{class:"default-theme"},{default:xr(()=>[(Yt(!0),No(ze,null,nv(rn(t).tabList,(c,f)=>(Yt(),rr(rn(S3),{key:c.id},{default:xr(()=>[_(s8,{tabIdx:f},{default:xr(()=>[_(u,{type:"editable-card",activeKey:c.key,"onUpdate:activeKey":d=>c.key=d,onEdit:(d,v)=>r(f,d,v)},{default:xr(()=>[(Yt(!0),No(ze,null,nv(c.panes,(d,v)=>(Yt(),rr(s,{key:d.key,tab:d.name,class:"pane"},{default:xr(()=>[(Yt(),rr(v_(n[d.type]),cf({tabIdx:f,paneIdx:v},d),null,16,["tabIdx","paneIdx"]))]),_:2},1032,["tab"]))),128))]),_:2},1032,["activeKey","onUpdate:activeKey","onEdit"])]),_:2},1032,["tabIdx"])]),_:2},1024))),128))]),_:1})],512)}}});const c8=D1(u8,[["__scopeId","data-v-57f7fa82"]]),f8=ce({__name:"App",setup(e){const t=Fd(),n=m3();return g3("updateGlobalSetting",async()=>{const r=await e3();t.conf=r;const a=await b3(r);t.quickMovePaths=a.filter(o=>{var i,l;return(l=(i=o==null?void 0:o.dir)==null?void 0:i.trim)==null?void 0:l.call(i)})}),Le(async()=>{M1.emit("updateGlobalSetting")}),(r,a)=>{const o=qt;return Yt(),rr(o,{loading:!rn(n).isIdle},{default:xr(()=>[_(c8)]),_:1},8,["loading"])}}});function d8(e){return typeof e=="object"&&e!==null}function Eg(e,t){return e=d8(e)?e:Object.create(null),new Proxy(e,{get(n,r,a){return r==="key"?Reflect.get(n,r,a):Reflect.get(n,r,a)||Reflect.get(t,r,a)}})}function v8(e,t){return t.reduce((n,r)=>n==null?void 0:n[r],e)}function p8(e,t,n){return t.slice(0,-1).reduce((r,a)=>/^(__proto__)$/.test(a)?{}:r[a]=r[a]||{},e)[t[t.length-1]]=n,e}function h8(e,t){return t.reduce((n,r)=>{const a=r.split(".");return p8(n,a,v8(e,a))},{})}function Og(e,{storage:t,serializer:n,key:r,debug:a}){try{const o=t==null?void 0:t.getItem(r);o&&e.$patch(n==null?void 0:n.deserialize(o))}catch(o){a&&console.error(o)}}function Tg(e,{storage:t,serializer:n,key:r,paths:a,debug:o}){try{const i=Array.isArray(a)?h8(e,a):e;t.setItem(r,n.serialize(i))}catch(i){o&&console.error(i)}}function m8(e={}){return t=>{const{auto:n=!1}=e,{options:{persist:r=n},store:a}=t;if(!r)return;const o=(Array.isArray(r)?r.map(i=>Eg(i,e)):[Eg(r,e)]).map(({storage:i=localStorage,beforeRestore:l=null,afterRestore:s=null,serializer:u={serialize:JSON.stringify,deserialize:JSON.parse},key:c=a.$id,paths:f=null,debug:d=!1})=>{var v;return{storage:i,beforeRestore:l,afterRestore:s,serializer:u,key:((v=e.key)!=null?v:p=>p)(c),paths:f,debug:d}});a.$persist=()=>{o.forEach(i=>{Tg(a.$state,i)})},a.$hydrate=({runHooks:i=!0}={})=>{o.forEach(l=>{const{beforeRestore:s,afterRestore:u}=l;i&&(s==null||s(t)),Og(a,l),i&&(u==null||u(t))})},o.forEach(i=>{const{beforeRestore:l,afterRestore:s}=i;l==null||l(t),Og(a,i),s==null||s(t),a.$subscribe((u,c)=>{Tg(c,i)},{detached:!0})})}}var g8=m8();const B1=o3();B1.use(g8);OS(f8).use(B1).use(Md).mount("#zanllp_dev_gradio_fe");const b8=Q3(),y8=()=>{try{return parent.location.search.includes("theme=dark")}catch{}return!1};ve([b8,y8],async([e,t])=>{await $d();const n=document.getElementsByTagName("html")[0];if(e||t){document.body.classList.add("dark");const r=document.createElement("style"),{default:a}=await Kr(()=>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{ss as $,Pa as A,lB as B,Va as C,y2 as D,nv as E,I8 as F,C8 as G,F_ as H,Et as I,Z8 as J,x8 as K,Q8 as L,Nr as M,_8 as N,za as O,J as P,Ll as Q,qt as R,S1 as S,H2 as T,ii as U,Mr as V,D1 as W,as as X,rs as Y,ge as Z,yt as _,P as a,bN as a$,Hn as a0,ft as a1,ls as a2,Kn as a3,ts as a4,dr as a5,pO as a6,bO as a7,_f as a8,lO as a9,X2 as aA,eB as aB,qe as aC,M8 as aD,st as aE,ch as aF,A8 as aG,fT as aH,TO as aI,up as aJ,m0 as aK,Gf as aL,vN as aM,mf as aN,xl as aO,$N as aP,uE as aQ,gS as aR,Fn as aS,lt as aT,P8 as aU,no as aV,Me as aW,jN as aX,Uf as aY,ri as aZ,l0 as a_,$y as aa,Ly as ab,Fy as ac,If as ad,vt as ae,De as af,G as ag,ra as ah,F6 as ai,hc as aj,Gw as ak,qw as al,j0 as am,z0 as an,Ye as ao,O0 as ap,iE as aq,Ne as ar,Ee as as,Ce as at,kt as au,Nt as av,tf as aw,Le as ax,Ke as ay,Ol as az,We as b,li as b$,gN as b0,HR as b1,NR as b2,kR as b3,zn as b4,yR as b5,bs as b6,sd as b7,xx as b8,VR as b9,K2 as bA,Rl as bB,gL as bC,gd as bD,Ia as bE,fr as bF,wL as bG,mm as bH,lk as bI,Jo as bJ,aL as bK,cT as bL,Gb as bM,sr as bN,Px as bO,Yw as bP,ql as bQ,Nw as bR,sb as bS,p_ as bT,bl as bU,v_ as bV,cf as bW,S8 as bX,fi as bY,iB as bZ,vc as b_,ys as ba,_k as bb,ul as bc,mt as bd,pc as be,kA as bf,sn as bg,T8 as bh,cc as bi,O8 as bj,qb as bk,sN as bl,ar as bm,Un as bn,lC as bo,m3 as bp,sB as bq,g3 as br,S2 as bs,XR as bt,Pl as bu,H$ as bv,E8 as bw,Q2 as bx,H0 as by,D2 as bz,_ as c,J8 as c0,fB as c1,$h as c2,Wn as c3,Vf as c4,Df as c5,SN as c6,gt as c7,Yg as c8,ha as c9,PO as ca,Ny as cb,w1 as cc,$d as cd,ia as ce,E1 as cf,O1 as cg,rB as ch,xn as ci,cB as cj,uB as ck,tB as cl,M1 as cm,oB as cn,nB as co,Y8 as cp,ZO as cq,X8 as cr,aB as cs,or as ct,g0 as cu,cR as cv,TR as cw,ce as d,jn as e,on as f,Yo as g,Y as h,je as i,nd as j,j6 as k,No as l,xr as m,rn as n,Yt as o,tt as p,Cl as q,V as r,ze as s,w8 as t,nt as u,bn as v,is as w,Fd as x,ve as y,rr as z}; diff --git a/vue/dist/assets/index-7ab29b41.js b/vue/dist/assets/index-6f28cdca.js similarity index 99% rename from vue/dist/assets/index-7ab29b41.js rename to vue/dist/assets/index-6f28cdca.js index c6d03d0..52580d9 100644 --- a/vue/dist/assets/index-7ab29b41.js +++ b/vue/dist/assets/index-6f28cdca.js @@ -1,4 +1,4 @@ -import{ag as C,aC as $e,r as ee,ax as vr,aD as Rr,aE as Ue,Y as de,d as me,u as be,aF as Qe,b as ue,ao as mr,aG as Je,Z as ve,h as I,c as H,a as _,aH as Nr,i as re,aI as Ee,aJ as ae,a0 as Ir,e as Mr,aK as gr,aL as kr,aM as Lr,aN as Tr,as as Dr,s as je,aO as Wr,y as ce,aP as Br,aQ as Gr,aR as Hr,a6 as Kr,a9 as zr,a8 as Ur,az as Yr,aS as hr,aT as pr,aq as Zr,aj as Pe,aU as Xr,aV as Qr,P as oe,aW as Me,ay as yr,aX as Ye,aY as Jr,aZ as en,a_ as er,a$ as rn,b0 as nn,b1 as tn,b2 as an,b3 as ln,b4 as un,b5 as on,b6 as br,b7 as sn,b8 as fn,b9 as cn,ba as dn,bb as vn,bc as mn,n as le,bd as gn,au as Oe,be as hn,bf as Fr,bg as pn,bh as yn,w as Ve}from"./index-d77bcb54.js";import{b as wr}from"./db-f752a0b1.js";import{g as bn,l as Fn}from"./hook-b7fce3b0.js";var wn=Symbol("SizeProvider"),xn=function(e){var r=e?C(function(){return e.size}):$e(wn,C(function(){return"default"}));return r};function On(n,e,r){var t=-1,a=n.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(a);++t0?"".concat(d[0]/-2,"px"):void 0,b=d[1]>0?"".concat(d[1]/-2,"px"):void 0;return o&&(h.marginLeft=o,h.marginRight=o),w.value?h.rowGap="".concat(d[1],"px"):b&&(h.marginTop=b,h.marginBottom=b),h});return function(){var d;return H("div",{class:y.value,style:x.value},[(d=t.default)===null||d===void 0?void 0:d.call(t)])}}});const Sn=En;function Vn(n){return typeof n=="number"?"".concat(n," ").concat(n," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(n)?"0 0 ".concat(n):n}var _n=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 Or=me({compatConfig:{MODE:3},name:"ACol",props:_n(),setup:function(e,r){var t=r.slots,a=An(),i=a.gutter,l=a.supportFlexGap,u=a.wrap,s=be("col",e),w=s.prefixCls,g=s.direction,y=C(function(){var d,h=e.span,o=e.order,b=e.offset,c=e.push,P=e.pull,m=w.value,f={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(p){var F,O={},$=e[p];typeof $=="number"?O.span=$:ue($)==="object"&&(O=$||{}),f=_(_({},f),{},(F={},I(F,"".concat(m,"-").concat(p,"-").concat(O.span),O.span!==void 0),I(F,"".concat(m,"-").concat(p,"-order-").concat(O.order),O.order||O.order===0),I(F,"".concat(m,"-").concat(p,"-offset-").concat(O.offset),O.offset||O.offset===0),I(F,"".concat(m,"-").concat(p,"-push-").concat(O.push),O.push||O.push===0),I(F,"".concat(m,"-").concat(p,"-pull-").concat(O.pull),O.pull||O.pull===0),I(F,"".concat(m,"-rtl"),g.value==="rtl"),F))}),ve(m,(d={},I(d,"".concat(m,"-").concat(h),h!==void 0),I(d,"".concat(m,"-order-").concat(o),o),I(d,"".concat(m,"-offset-").concat(b),b),I(d,"".concat(m,"-push-").concat(c),c),I(d,"".concat(m,"-pull-").concat(P),P),d),f)}),x=C(function(){var d=e.flex,h=i.value,o={};if(h&&h[0]>0){var b="".concat(h[0]/2,"px");o.paddingLeft=b,o.paddingRight=b}if(h&&h[1]>0&&!l.value){var c="".concat(h[1]/2,"px");o.paddingTop=c,o.paddingBottom=c}return d&&(o.flex=Vn(d),u.value===!1&&!o.minWidth&&(o.minWidth=0)),o});return function(){var d;return H("div",{class:y.value,style:x.value},[(d=t.default)===null||d===void 0?void 0:d.call(t)])}}});function se(){return se=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 Ae(n,e,r){return Nn()?Ae=Reflect.construct.bind():Ae=function(a,i,l){var u=[null];u.push.apply(u,i);var s=Function.bind.apply(a,u),w=new s;return l&&ye(w,l.prototype),w},Ae.apply(null,arguments)}function In(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function Le(n){var e=typeof Map=="function"?new Map:void 0;return Le=function(t){if(t===null||!In(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return Ae(t,arguments,ke(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),ye(a,t)},Le(n)}var Mn=/%[sdj%]/g,kn=function(){};typeof process<"u"&&process.env;function Te(n){if(!n||!n.length)return null;var e={};return n.forEach(function(r){var t=r.field;e[t]=e[t]||[],e[t].push(r)}),e}function Q(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),t=1;t=i)return u;switch(u){case"%s":return String(r[a++]);case"%d":return Number(r[a++]);case"%j":try{return JSON.stringify(r[a++])}catch{return"[Circular]"}break;default:return u}});return l}return n}function Ln(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}function U(n,e){return!!(n==null||e==="array"&&Array.isArray(n)&&!n.length||Ln(e)&&typeof n=="string"&&!n)}function Tn(n,e,r){var t=[],a=0,i=n.length;function l(u){t.push.apply(t,u||[]),a++,a===i&&r(t)}n.forEach(function(u){e(u,l)})}function rr(n,e,r){var t=0,a=n.length;function i(l){if(l&&l.length){r(l);return}var u=t;t=t+1,ua?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(a);++t0?"".concat(d[0]/-2,"px"):void 0,b=d[1]>0?"".concat(d[1]/-2,"px"):void 0;return o&&(h.marginLeft=o,h.marginRight=o),w.value?h.rowGap="".concat(d[1],"px"):b&&(h.marginTop=b,h.marginBottom=b),h});return function(){var d;return H("div",{class:y.value,style:x.value},[(d=t.default)===null||d===void 0?void 0:d.call(t)])}}});const Sn=En;function Vn(n){return typeof n=="number"?"".concat(n," ").concat(n," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(n)?"0 0 ".concat(n):n}var _n=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 Or=me({compatConfig:{MODE:3},name:"ACol",props:_n(),setup:function(e,r){var t=r.slots,a=An(),i=a.gutter,l=a.supportFlexGap,u=a.wrap,s=be("col",e),w=s.prefixCls,g=s.direction,y=C(function(){var d,h=e.span,o=e.order,b=e.offset,c=e.push,P=e.pull,m=w.value,f={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(p){var F,O={},$=e[p];typeof $=="number"?O.span=$:ue($)==="object"&&(O=$||{}),f=_(_({},f),{},(F={},I(F,"".concat(m,"-").concat(p,"-").concat(O.span),O.span!==void 0),I(F,"".concat(m,"-").concat(p,"-order-").concat(O.order),O.order||O.order===0),I(F,"".concat(m,"-").concat(p,"-offset-").concat(O.offset),O.offset||O.offset===0),I(F,"".concat(m,"-").concat(p,"-push-").concat(O.push),O.push||O.push===0),I(F,"".concat(m,"-").concat(p,"-pull-").concat(O.pull),O.pull||O.pull===0),I(F,"".concat(m,"-rtl"),g.value==="rtl"),F))}),ve(m,(d={},I(d,"".concat(m,"-").concat(h),h!==void 0),I(d,"".concat(m,"-order-").concat(o),o),I(d,"".concat(m,"-offset-").concat(b),b),I(d,"".concat(m,"-push-").concat(c),c),I(d,"".concat(m,"-pull-").concat(P),P),d),f)}),x=C(function(){var d=e.flex,h=i.value,o={};if(h&&h[0]>0){var b="".concat(h[0]/2,"px");o.paddingLeft=b,o.paddingRight=b}if(h&&h[1]>0&&!l.value){var c="".concat(h[1]/2,"px");o.paddingTop=c,o.paddingBottom=c}return d&&(o.flex=Vn(d),u.value===!1&&!o.minWidth&&(o.minWidth=0)),o});return function(){var d;return H("div",{class:y.value,style:x.value},[(d=t.default)===null||d===void 0?void 0:d.call(t)])}}});function se(){return se=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 Ae(n,e,r){return Nn()?Ae=Reflect.construct.bind():Ae=function(a,i,l){var u=[null];u.push.apply(u,i);var s=Function.bind.apply(a,u),w=new s;return l&&ye(w,l.prototype),w},Ae.apply(null,arguments)}function In(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function Le(n){var e=typeof Map=="function"?new Map:void 0;return Le=function(t){if(t===null||!In(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(t))return e.get(t);e.set(t,a)}function a(){return Ae(t,arguments,ke(this).constructor)}return a.prototype=Object.create(t.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),ye(a,t)},Le(n)}var Mn=/%[sdj%]/g,kn=function(){};typeof process<"u"&&process.env;function Te(n){if(!n||!n.length)return null;var e={};return n.forEach(function(r){var t=r.field;e[t]=e[t]||[],e[t].push(r)}),e}function Q(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),t=1;t=i)return u;switch(u){case"%s":return String(r[a++]);case"%d":return Number(r[a++]);case"%j":try{return JSON.stringify(r[a++])}catch{return"[Circular]"}break;default:return u}});return l}return n}function Ln(n){return n==="string"||n==="url"||n==="hex"||n==="email"||n==="date"||n==="pattern"}function U(n,e){return!!(n==null||e==="array"&&Array.isArray(n)&&!n.length||Ln(e)&&typeof n=="string"&&!n)}function Tn(n,e,r){var t=[],a=0,i=n.length;function l(u){t.push.apply(t,u||[]),a++,a===i&&r(t)}n.forEach(function(u){e(u,l)})}function rr(n,e,r){var t=0,a=n.length;function i(l){if(l&&l.length){r(l);return}var u=t;t=t+1,u0?b=h({routes:f,params:S,separator:P,itemRender:B}):E.length&&(b=E.map(function(I,M){return Ue(Le(I.type)==="object"&&(I.type.__ANT_BREADCRUMB_ITEM||I.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),qe(I,{separator:P,key:M})}));var T=(s={},_e(s,g.value,!0),_e(s,"".concat(g.value,"-rtl"),_.value==="rtl"),s);return a("div",{class:T},[b])}}});var Rt=["separator","class"],Bt=function(){return{prefixCls:String}};const ae=K({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Bt(),setup:function(o,k){var u=k.slots,d=k.attrs,g=oe("breadcrumb",o),_=g.prefixCls;return function(){var v;d.separator;var w=d.class,h=Ce(d,Rt),l=we((v=u.default)===null||v===void 0?void 0:v.call(u));return a("span",ee({class:["".concat(_.value,"-separator"),w]},h),[l.length>0?l:"/"])}}});V.Item=q;V.Separator=ae;V.install=function(r){return r.component(V.name,V),r.component(q.name,q),r.component(ae.name,ae),r};R.useInjectFormItemContext=Ge;R.ItemRest=ne;R.install=function(r){return r.component(R.name,R),r.component(R.Item.name,R.Item),r.component(ne.name,ne),r};L.setDefaultIndicator=dt;L.install=function(r){return r.component(L.name,L),r};const Nt=K({__name:"folderNavigator",props:{loc:{}},emits:["to"],setup(r,{emit:o}){const k=r,u=Qe(()=>k.loc),d=We(!1),g=()=>{d.value=!1,o("to",u.value)};return(_,v)=>{const w=He,h=he;return C(),A(J,null,[a(h,{visible:d.value,"onUpdate:visible":v[1]||(v[1]=l=>d.value=l),title:_.$t("inputAddressAndPressEnter"),onOk:g},{default:i(()=>[a(w,{onPressEnter:g,value:e(u),"onUpdate:value":v[0]||(v[0]=l=>j(u)?u.value=l:null),style:{width:"100%"},"allow-clear":""},null,8,["value"])]),_:1},8,["visible","title"]),p("a",{onClick:v[2]||(v[2]=l=>d.value=!0)},y(_.$t("go")),1)],64)}}}),Dt={class:"hint"},Ft={class:"location-bar"},Et={class:"breadcrumb"},Tt=["onClick"],Ot={class:"actions"},zt=["onClick"],jt={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)"}},Vt={style:{padding:"4px"}},Ut={style:{padding:"4px"}},Lt={style:{padding:"4px"}},qt={style:{padding:"4px"}},Kt={key:0,class:"view"},Gt={key:0,class:"preview-switch"},Qt=K({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},walkModePath:{},stackKey:{}},setup(r){const o=r,k=Je(),{scroller:u,stackViewEl:d,props:g,multiSelectedIdxs:_,spinning:v}=bt().toRefs(),{currLocation:w,currPage:h,refresh:l,copyLocation:s,back:b,openNext:f,stack:m,to:S,quickMoveTo:E,addToSearchScanPathAndQuickMove:P,searchPathInfo:B}=kt(o),{gridItems:T,sortMethodConv:I,moreActionsDropdownShow:M,sortedFiles:N,sortMethod:O,viewMode:z,itemSize:D,loadNextDir:re,loadNextDirLoading:xe,canLoadNext:Se,onScroll:Pe}=gt(o),{onDrop:Me,onFileDragStart:$e}=Ct(),{onFileItemClick:Ae,onContextMenuClick:se,showGenInfo:G,imageGenInfo:le,q:Re}=yt(o,{openNext:f}),{previewIdx:Q,onPreviewVisibleChange:Be,previewing:ie,previewImgMove:ue,canPreview:de}=wt(o),{showMenuIdx:Y}=ht();return Xe(()=>o,()=>{g.value=o;const c=It.get(o.stackKey??"");c&&(m.value=c.slice())},{immediate:!0}),(c,t)=>{const Ne=ot,De=rt,Fe=he,ce=q,pe=V,Ee=st,Te=lt,Oe=te,me=Ie,ve=_t,ze=R,je=it,Ve=L;return C(),F(Ve,{spinning:e(v),size:"large"},{default:i(()=>[a(Ne,{style:{display:"none"}}),p("div",{ref_key:"stackViewEl",ref:d,onDragover:t[18]||(t[18]=x(()=>{},["prevent"])),onDrop:t[19]||(t[19]=x(n=>e(Me)(n),["prevent"])),class:"container"},[a(Fe,{visible:e(G),"onUpdate:visible":t[1]||(t[1]=n=>j(G)?G.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>G.value=!1)},{cancelText:i(()=>[]),default:i(()=>[a(De,{active:"",loading:!e(Re).isIdle},{default:i(()=>[p("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(Ye)(e(le)))},[p("div",Dt,y(c.$t("doubleClickToCopy")),1),W(" "+y(e(le)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),p("div",Ft,[p("div",Et,[o.walkModePath?(C(),F(Ee,{key:0},{title:i(()=>[W(y(c.$t("walk-mode-move-message")),1)]),default:i(()=>[a(pe,{style:{flex:"1"}},{default:i(()=>[(C(!0),A(J,null,Z(e(m),(n,$)=>(C(),F(ce,{key:$},{default:i(()=>[p("span",null,y(n.curr==="/"?c.$t("root"):n.curr.replace(/:\/$/,c.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})):(C(),F(pe,{key:1,style:{flex:"1"}},{default:i(()=>[(C(!0),A(J,null,Z(e(m),(n,$)=>(C(),F(ce,{key:$},{default:i(()=>[p("a",{onClick:x(fe=>e(b)($),["prevent"])},y(n.curr==="/"?c.$t("root"):n.curr.replace(/:\/$/,c.$t("drive"))),9,Tt)]),_:2},1024))),128))]),_:1}))]),p("div",Ot,[p("a",{class:"opt",onClick:t[3]||(t[3]=x((...n)=>e(l)&&e(l)(...n),["prevent"]))},y(c.$t("refresh")),1),a(me,null,{overlay:i(()=>[a(Oe,null,{default:i(()=>[(C(!0),A(J,null,Z(e(k).quickMovePaths,n=>(C(),F(Te,{key:n.dir},{default:i(()=>[p("a",{onClick:x($=>e(E)(n.dir),["prevent"])},y(n.zh),9,zt)]),_:2},1024))),128))]),_:1})]),default:i(()=>[p("a",{class:"opt",onClick:t[4]||(t[4]=x(()=>{},["prevent"]))},[W(y(c.$t("quickMove"))+" ",1),a(e(ye))])]),_:1}),a(me,{trigger:["click"],visible:e(M),"onUpdate:visible":t[14]||(t[14]=n=>j(M)?M.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:i(()=>[p("div",jt,[a(ze,Ze(et({labelCol:{span:6},wrapperCol:{span:18}})),{default:i(()=>[a(ve,{label:c.$t("viewMode")},{default:i(()=>[a(e(be),{value:e(z),"onUpdate:value":t[6]||(t[6]=n=>j(z)?z.value=n:null),onClick:t[7]||(t[7]=x(()=>{},["stop"])),conv:{value:n=>n,text:n=>c.$t(n)},options:e(xt)},null,8,["value","conv","options"])]),_:1},8,["label"]),a(ve,{label:c.$t("sortingMethod")},{default:i(()=>[a(e(be),{value:e(O),"onUpdate:value":t[8]||(t[8]=n=>j(O)?O.value=n:null),onClick:t[9]||(t[9]=x(()=>{},["stop"])),conv:e(I),options:e(tt)},null,8,["value","conv","options"])]),_:1},8,["label"]),p("div",Vt,[p("a",{onClick:t[10]||(t[10]=x((...n)=>e(s)&&e(s)(...n),["prevent"]))},y(c.$t("copyPath")),1)]),p("div",Ut,[a(Nt,{loc:e(w),onTo:e(S)},null,8,["loc","onTo"])]),p("div",Lt,[e(B)?e(B).can_delete?(C(),A("a",{key:1,onClick:t[12]||(t[12]=x((...n)=>e(P)&&e(P)(...n),["prevent"]))},y(c.$t("removeFromSearchScanPathAndQuickMove")),1)):H("",!0):(C(),A("a",{key:0,onClick:t[11]||(t[11]=x((...n)=>e(P)&&e(P)(...n),["prevent"]))},y(c.$t("addToSearchScanPathAndQuickMove")),1))]),p("div",qt,[p("a",{onClick:t[13]||(t[13]=x(n=>e(nt)(e(w)+"/"),["prevent"]))},y(c.$t("openWithLocalFileBrowser")),1)])]),_:1},16)])]),default:i(()=>[p("a",{class:"opt",onClick:t[5]||(t[5]=x(()=>{},["prevent"]))},y(c.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(h)?(C(),A("div",Kt,[a(e(ct),{class:"file-list",items:e(N),ref_key:"scroller",ref:u,onScroll:e(Pe),"item-size":e(D).first,"key-field":"fullpath","item-secondary-size":e(D).second,gridItems:e(T)},at({default:i(({item:n,index:$})=>[a(pt,{idx:$,file:n,"full-screen-preview-image-url":e(N)[e(Q)]?e(St)(e(N)[e(Q)]):"","show-menu-idx":e(Y),"onUpdate:showMenuIdx":t[15]||(t[15]=fe=>j(Y)?Y.value=fe:null),selected:e(_).includes($),"view-mode":e(z),onFileItemClick:e(Ae),onDragstart:e($e),onPreviewVisibleChange:e(Be),onContextMenuClick:e(se)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","view-mode","onFileItemClick","onDragstart","onPreviewVisibleChange","onContextMenuClick"])]),_:2},[o.walkModePath?{name:"after",fn:i(()=>[a(je,{onClick:e(re),loading:e(xe),block:"",type:"primary",disabled:!e(Se),ghost:""},{default:i(()=>[W(y(c.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])]),key:"0"}:void 0]),1032,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(ie)?(C(),A("div",Gt,[a(e(mt),{onClick:t[16]||(t[16]=n=>e(ue)("prev")),class:ke({disable:!e(de)("prev")})},null,8,["class"]),a(e(vt),{onClick:t[17]||(t[17]=n=>e(ue)("next")),class:ke({disable:!e(de)("next")})},null,8,["class"])])):H("",!0)])):H("",!0)],544),e(ie)?(C(),F(ft,{key:0,file:e(N)[e(Q)],idx:e(Q),onContextMenuClick:e(se)},null,8,["file","idx","onContextMenuClick"])):H("",!0)]),_:1},8,["spinning"])}}});const tn=ut(Qt,[["__scopeId","data-v-316d8b15"]]);export{tn as default}; +import{d as K,u as oe,g as U,_ as Ce,c as a,a as ee,P as X,D as ye,f as we,w as Ue,b as Le,e as qe,h as _e,M as te,i as Ke,j as Ge,F as ne,k as Qe,r as We,o as C,l as A,m as i,n as e,p as j,q as p,t as y,s as J,I as He,v as he,x as Je,y as Xe,z as F,A as x,B as Ye,C as W,E as Z,G as Ze,H as et,S as be,J as tt,K as H,L as nt,N as at,O as ke,Q as ot,R as rt,T as st,U as lt,V as it,W as ut}from"./index-2ccb5782.js";import{D as Ie,S as L,s as dt,a as ct,f as pt,L as mt,R as vt,b as ft}from"./fullScreenContextMenu-01ffa640.js";import{F as R,_ as _t}from"./index-6f28cdca.js";import{u as bt,a as kt,b as gt,c as Ct,d as yt,e as wt,f as ht,s as It,v as xt,t as St}from"./hook-dadee24a.js";/* empty css *//* empty css */import"./db-89fdf46d.js";var Pt=["class","style"],Mt=function(){return{prefixCls:String,href:String,separator:X.any,overlay:X.any,onClick:Function}};const q=K({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:Mt(),slots:["separator","overlay"],setup:function(o,k){var u=k.slots,d=k.attrs,g=oe("breadcrumb",o),_=g.prefixCls,v=function(h,l){var s=U(u,o,"overlay");return s?a(Ie,{overlay:s,placement:"bottom"},{default:function(){return[a("span",{class:"".concat(l,"-overlay-link")},[h,a(ye,null,null)])]}}):h};return function(){var w,h=(w=U(u,o,"separator"))!==null&&w!==void 0?w:"/",l=U(u,o),s=d.class,b=d.style,f=Ce(d,Pt),m;return o.href!==void 0?m=a("a",ee({class:"".concat(_.value,"-link"),onClick:o.onClick},f),[l]):m=a("span",ee({class:"".concat(_.value,"-link"),onClick:o.onClick},f),[l]),m=v(m,_.value),l?a("span",{class:s,style:b},[m,h&&a("span",{class:"".concat(_.value,"-separator")},[h])]):null}}});var $t=function(){return{prefixCls:String,routes:{type:Array},params:X.any,separator:X.any,itemRender:{type:Function}}};function At(r,o){if(!r.breadcrumbName)return null;var k=Object.keys(o).join("|"),u=r.breadcrumbName.replace(new RegExp(":(".concat(k,")"),"g"),function(d,g){return o[g]||d});return u}function ge(r){var o=r.route,k=r.params,u=r.routes,d=r.paths,g=u.indexOf(o)===u.length-1,_=At(o,k);return g?a("span",null,[_]):a("a",{href:"#/".concat(d.join("/"))},[_])}const V=K({compatConfig:{MODE:3},name:"ABreadcrumb",props:$t(),slots:["separator","itemRender"],setup:function(o,k){var u=k.slots,d=oe("breadcrumb",o),g=d.prefixCls,_=d.direction,v=function(s,b){return s=(s||"").replace(/^\//,""),Object.keys(b).forEach(function(f){s=s.replace(":".concat(f),b[f])}),s},w=function(s,b,f){var m=Ke(s),S=v(b||"",f);return S&&m.push(S),m},h=function(s){var b=s.routes,f=b===void 0?[]:b,m=s.params,S=m===void 0?{}:m,E=s.separator,P=s.itemRender,B=P===void 0?ge:P,T=[];return f.map(function(I){var M=v(I.path,S);M&&T.push(M);var N=[].concat(T),O=null;return I.children&&I.children.length&&(O=a(te,null,{default:function(){return[I.children.map(function(D){return a(te.Item,{key:D.path||D.breadcrumbName},{default:function(){return[B({route:D,params:S,routes:f,paths:w(N,D.path,S)})]}})})]}})),a(q,{overlay:O,separator:E,key:M||I.breadcrumbName},{default:function(){return[B({route:I,params:S,routes:f,paths:N})]}})})};return function(){var l,s,b,f=o.routes,m=o.params,S=m===void 0?{}:m,E=we(U(u,o)),P=(l=U(u,o,"separator"))!==null&&l!==void 0?l:"/",B=o.itemRender||u.itemRender||ge;f&&f.length>0?b=h({routes:f,params:S,separator:P,itemRender:B}):E.length&&(b=E.map(function(I,M){return Ue(Le(I.type)==="object"&&(I.type.__ANT_BREADCRUMB_ITEM||I.type.__ANT_BREADCRUMB_SEPARATOR),"Breadcrumb","Only accepts Breadcrumb.Item and Breadcrumb.Separator as it's children"),qe(I,{separator:P,key:M})}));var T=(s={},_e(s,g.value,!0),_e(s,"".concat(g.value,"-rtl"),_.value==="rtl"),s);return a("div",{class:T},[b])}}});var Rt=["separator","class"],Bt=function(){return{prefixCls:String}};const ae=K({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Bt(),setup:function(o,k){var u=k.slots,d=k.attrs,g=oe("breadcrumb",o),_=g.prefixCls;return function(){var v;d.separator;var w=d.class,h=Ce(d,Rt),l=we((v=u.default)===null||v===void 0?void 0:v.call(u));return a("span",ee({class:["".concat(_.value,"-separator"),w]},h),[l.length>0?l:"/"])}}});V.Item=q;V.Separator=ae;V.install=function(r){return r.component(V.name,V),r.component(q.name,q),r.component(ae.name,ae),r};R.useInjectFormItemContext=Ge;R.ItemRest=ne;R.install=function(r){return r.component(R.name,R),r.component(R.Item.name,R.Item),r.component(ne.name,ne),r};L.setDefaultIndicator=dt;L.install=function(r){return r.component(L.name,L),r};const Nt=K({__name:"folderNavigator",props:{loc:{}},emits:["to"],setup(r,{emit:o}){const k=r,u=Qe(()=>k.loc),d=We(!1),g=()=>{d.value=!1,o("to",u.value)};return(_,v)=>{const w=He,h=he;return C(),A(J,null,[a(h,{visible:d.value,"onUpdate:visible":v[1]||(v[1]=l=>d.value=l),title:_.$t("inputAddressAndPressEnter"),onOk:g},{default:i(()=>[a(w,{onPressEnter:g,value:e(u),"onUpdate:value":v[0]||(v[0]=l=>j(u)?u.value=l:null),style:{width:"100%"},"allow-clear":""},null,8,["value"])]),_:1},8,["visible","title"]),p("a",{onClick:v[2]||(v[2]=l=>d.value=!0)},y(_.$t("go")),1)],64)}}}),Dt={class:"hint"},Ft={class:"location-bar"},Et={class:"breadcrumb"},Tt=["onClick"],Ot={class:"actions"},zt=["onClick"],jt={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)"}},Vt={style:{padding:"4px"}},Ut={style:{padding:"4px"}},Lt={style:{padding:"4px"}},qt={style:{padding:"4px"}},Kt={key:0,class:"view"},Gt={key:0,class:"preview-switch"},Qt=K({__name:"stackView",props:{tabIdx:{},paneIdx:{},path:{},walkModePath:{},stackKey:{}},setup(r){const o=r,k=Je(),{scroller:u,stackViewEl:d,props:g,multiSelectedIdxs:_,spinning:v}=bt().toRefs(),{currLocation:w,currPage:h,refresh:l,copyLocation:s,back:b,openNext:f,stack:m,to:S,quickMoveTo:E,addToSearchScanPathAndQuickMove:P,searchPathInfo:B}=kt(o),{gridItems:T,sortMethodConv:I,moreActionsDropdownShow:M,sortedFiles:N,sortMethod:O,viewMode:z,itemSize:D,loadNextDir:re,loadNextDirLoading:xe,canLoadNext:Se,onScroll:Pe}=gt(o),{onDrop:Me,onFileDragStart:$e}=Ct(),{onFileItemClick:Ae,onContextMenuClick:se,showGenInfo:G,imageGenInfo:le,q:Re}=yt(o,{openNext:f}),{previewIdx:Q,onPreviewVisibleChange:Be,previewing:ie,previewImgMove:ue,canPreview:de}=wt(o),{showMenuIdx:Y}=ht();return Xe(()=>o,()=>{g.value=o;const c=It.get(o.stackKey??"");c&&(m.value=c.slice())},{immediate:!0}),(c,t)=>{const Ne=ot,De=rt,Fe=he,ce=q,pe=V,Ee=st,Te=lt,Oe=te,me=Ie,ve=_t,ze=R,je=it,Ve=L;return C(),F(Ve,{spinning:e(v),size:"large"},{default:i(()=>[a(Ne,{style:{display:"none"}}),p("div",{ref_key:"stackViewEl",ref:d,onDragover:t[18]||(t[18]=x(()=>{},["prevent"])),onDrop:t[19]||(t[19]=x(n=>e(Me)(n),["prevent"])),class:"container"},[a(Fe,{visible:e(G),"onUpdate:visible":t[1]||(t[1]=n=>j(G)?G.value=n:null),width:"70vw","mask-closable":"",onOk:t[2]||(t[2]=n=>G.value=!1)},{cancelText:i(()=>[]),default:i(()=>[a(De,{active:"",loading:!e(Re).isIdle},{default:i(()=>[p("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(Ye)(e(le)))},[p("div",Dt,y(c.$t("doubleClickToCopy")),1),W(" "+y(e(le)),1)],32)]),_:1},8,["loading"])]),_:1},8,["visible"]),p("div",Ft,[p("div",Et,[o.walkModePath?(C(),F(Ee,{key:0},{title:i(()=>[W(y(c.$t("walk-mode-move-message")),1)]),default:i(()=>[a(pe,{style:{flex:"1"}},{default:i(()=>[(C(!0),A(J,null,Z(e(m),(n,$)=>(C(),F(ce,{key:$},{default:i(()=>[p("span",null,y(n.curr==="/"?c.$t("root"):n.curr.replace(/:\/$/,c.$t("drive"))),1)]),_:2},1024))),128))]),_:1})]),_:1})):(C(),F(pe,{key:1,style:{flex:"1"}},{default:i(()=>[(C(!0),A(J,null,Z(e(m),(n,$)=>(C(),F(ce,{key:$},{default:i(()=>[p("a",{onClick:x(fe=>e(b)($),["prevent"])},y(n.curr==="/"?c.$t("root"):n.curr.replace(/:\/$/,c.$t("drive"))),9,Tt)]),_:2},1024))),128))]),_:1}))]),p("div",Ot,[p("a",{class:"opt",onClick:t[3]||(t[3]=x((...n)=>e(l)&&e(l)(...n),["prevent"]))},y(c.$t("refresh")),1),a(me,null,{overlay:i(()=>[a(Oe,null,{default:i(()=>[(C(!0),A(J,null,Z(e(k).quickMovePaths,n=>(C(),F(Te,{key:n.dir},{default:i(()=>[p("a",{onClick:x($=>e(E)(n.dir),["prevent"])},y(n.zh),9,zt)]),_:2},1024))),128))]),_:1})]),default:i(()=>[p("a",{class:"opt",onClick:t[4]||(t[4]=x(()=>{},["prevent"]))},[W(y(c.$t("quickMove"))+" ",1),a(e(ye))])]),_:1}),a(me,{trigger:["click"],visible:e(M),"onUpdate:visible":t[14]||(t[14]=n=>j(M)?M.value=n:null),placement:"bottomLeft",getPopupContainer:n=>n.parentNode},{overlay:i(()=>[p("div",jt,[a(ze,Ze(et({labelCol:{span:6},wrapperCol:{span:18}})),{default:i(()=>[a(ve,{label:c.$t("viewMode")},{default:i(()=>[a(e(be),{value:e(z),"onUpdate:value":t[6]||(t[6]=n=>j(z)?z.value=n:null),onClick:t[7]||(t[7]=x(()=>{},["stop"])),conv:{value:n=>n,text:n=>c.$t(n)},options:e(xt)},null,8,["value","conv","options"])]),_:1},8,["label"]),a(ve,{label:c.$t("sortingMethod")},{default:i(()=>[a(e(be),{value:e(O),"onUpdate:value":t[8]||(t[8]=n=>j(O)?O.value=n:null),onClick:t[9]||(t[9]=x(()=>{},["stop"])),conv:e(I),options:e(tt)},null,8,["value","conv","options"])]),_:1},8,["label"]),p("div",Vt,[p("a",{onClick:t[10]||(t[10]=x((...n)=>e(s)&&e(s)(...n),["prevent"]))},y(c.$t("copyPath")),1)]),p("div",Ut,[a(Nt,{loc:e(w),onTo:e(S)},null,8,["loc","onTo"])]),p("div",Lt,[e(B)?e(B).can_delete?(C(),A("a",{key:1,onClick:t[12]||(t[12]=x((...n)=>e(P)&&e(P)(...n),["prevent"]))},y(c.$t("removeFromSearchScanPathAndQuickMove")),1)):H("",!0):(C(),A("a",{key:0,onClick:t[11]||(t[11]=x((...n)=>e(P)&&e(P)(...n),["prevent"]))},y(c.$t("addToSearchScanPathAndQuickMove")),1))]),p("div",qt,[p("a",{onClick:t[13]||(t[13]=x(n=>e(nt)(e(w)+"/"),["prevent"]))},y(c.$t("openWithLocalFileBrowser")),1)])]),_:1},16)])]),default:i(()=>[p("a",{class:"opt",onClick:t[5]||(t[5]=x(()=>{},["prevent"]))},y(c.$t("more")),1)]),_:1},8,["visible","getPopupContainer"])])]),e(h)?(C(),A("div",Kt,[a(e(ct),{class:"file-list",items:e(N),ref_key:"scroller",ref:u,onScroll:e(Pe),"item-size":e(D).first,"key-field":"fullpath","item-secondary-size":e(D).second,gridItems:e(T)},at({default:i(({item:n,index:$})=>[a(pt,{idx:$,file:n,"full-screen-preview-image-url":e(N)[e(Q)]?e(St)(e(N)[e(Q)]):"","show-menu-idx":e(Y),"onUpdate:showMenuIdx":t[15]||(t[15]=fe=>j(Y)?Y.value=fe:null),selected:e(_).includes($),"view-mode":e(z),onFileItemClick:e(Ae),onDragstart:e($e),onPreviewVisibleChange:e(Be),onContextMenuClick:e(se)},null,8,["idx","file","full-screen-preview-image-url","show-menu-idx","selected","view-mode","onFileItemClick","onDragstart","onPreviewVisibleChange","onContextMenuClick"])]),_:2},[o.walkModePath?{name:"after",fn:i(()=>[a(je,{onClick:e(re),loading:e(xe),block:"",type:"primary",disabled:!e(Se),ghost:""},{default:i(()=>[W(y(c.$t("loadNextPage")),1)]),_:1},8,["onClick","loading","disabled"])]),key:"0"}:void 0]),1032,["items","onScroll","item-size","item-secondary-size","gridItems"]),e(ie)?(C(),A("div",Gt,[a(e(mt),{onClick:t[16]||(t[16]=n=>e(ue)("prev")),class:ke({disable:!e(de)("prev")})},null,8,["class"]),a(e(vt),{onClick:t[17]||(t[17]=n=>e(ue)("next")),class:ke({disable:!e(de)("next")})},null,8,["class"])])):H("",!0)])):H("",!0)],544),e(ie)?(C(),F(ft,{key:0,file:e(N)[e(Q)],idx:e(Q),onContextMenuClick:e(se)},null,8,["file","idx","onContextMenuClick"])):H("",!0)]),_:1},8,["spinning"])}}});const tn=ut(Qt,[["__scopeId","data-v-316d8b15"]]);export{tn as default}; diff --git a/vue/dist/index.html b/vue/dist/index.html index df18c64..6721de2 100644 --- a/vue/dist/index.html +++ b/vue/dist/index.html @@ -7,7 +7,7 @@ Infinite Image Browsing - + diff --git a/vue/src/page/TagSearch/MatchedImageGrid.vue b/vue/src/page/TagSearch/MatchedImageGrid.vue index dd9b526..1ffa997 100644 --- a/vue/src/page/TagSearch/MatchedImageGrid.vue +++ b/vue/src/page/TagSearch/MatchedImageGrid.vue @@ -28,7 +28,8 @@ const { multiSelectedIdxs, onFileItemClick, scroller, - showMenuIdx + showMenuIdx, + onFileDragStart } = useImageSearch() const props = defineProps<{ @@ -85,6 +86,7 @@ watch( :idx="idx" :file="file" v-model:show-menu-idx="showMenuIdx" + @dragstart="onFileDragStart" @file-item-click="onFileItemClick" :full-screen-preview-image-url=" images[previewIdx] ? toRawFileUrl(images[previewIdx]) : '' diff --git a/vue/src/page/TagSearch/SubstrSearch.vue b/vue/src/page/TagSearch/SubstrSearch.vue index 7a17f71..d878885 100644 --- a/vue/src/page/TagSearch/SubstrSearch.vue +++ b/vue/src/page/TagSearch/SubstrSearch.vue @@ -30,7 +30,9 @@ const { multiSelectedIdxs, onFileItemClick, scroller, - showMenuIdx } = useImageSearch() + showMenuIdx, + onFileDragStart +} = useImageSearch() const substr = ref('') const info = ref() @@ -97,6 +99,7 @@ useGlobalEventListen('return-to-iib', async () => { diff --git a/vue/src/page/TagSearch/hook.ts b/vue/src/page/TagSearch/hook.ts index 5890248..f5fdda6 100644 --- a/vue/src/page/TagSearch/hook.ts +++ b/vue/src/page/TagSearch/hook.ts @@ -21,7 +21,7 @@ export const useImageSearch = () => { const { stackViewEl, multiSelectedIdxs, stack } = useHookShareState({ images }).toRefs() const { itemSize, gridItems } = useFilesDisplay(propsMock) const { showMenuIdx } = useMobileOptimization() - useFileTransfer() // for reset selected + const { onFileDragStart } = useFileTransfer() // for reset selected const { showGenInfo, imageGenInfo, @@ -63,5 +63,6 @@ export const useImageSearch = () => { onFileItemClick, showMenuIdx, multiSelectedIdxs, + onFileDragStart } } diff --git a/vue/src/page/fileTransfer/hook.ts b/vue/src/page/fileTransfer/hook.ts index 1f5eeb5..6a92294 100644 --- a/vue/src/page/fileTransfer/hook.ts +++ b/vue/src/page/fileTransfer/hook.ts @@ -640,7 +640,7 @@ export function useFileTransfer() { 'text/plain', JSON.stringify({ includeDir, - loc: currLocation.value, + loc: currLocation.value || 'search-result', path: uniqBy(files, 'fullpath').map((f) => f.fullpath) }) )