sd-webui-infinite-image-bro.../vue/dist/assets/MultiSelectKeep-5288fb9e.js

4 lines
36 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{bP as kt,n as ye,bf as ct,c as r,A as de,cm as Y,y as R,z,m as ue,x as Ce,cn as Ye,co as Ot,c6 as Ne,R as he,ai as re,cp as Et,r as Z,N as xe,cq as dt,G as Je,ad as oe,cr as Lt,cs as $t,V as M,ac as Pt,ct as Ie,O as we,K as Ft,cu as St,J as le,cv as Ct,cw as xt,cl as It,cx as Mt,cy as Dt,q as Me,cz as Tt,cA as De,o as ft,ax as At,$ as je,I as Oe,ak as zt,E as Q,cB as Nt,cC as jt,Q as vt,d as pt,cD as Wt,c3 as Bt,S as E,T as I,a2 as p,Y as V,U as C,a0 as ie,a1 as k,cE as Qe,X as J,W as O,a6 as ge,a5 as Ze,ae as Re,a4 as be,cF as $e,a3 as Ht,aj as Vt,cG as Ut,cH as qt,M as Gt,aL as Xt,cI as Kt,cJ as Yt,aN as Jt,aO as Qt,Z as mt}from"./index-88696ff1.js";import{u as _e,e as Te,g as H,f as et,h as ne,r as Zt,t as Pe,i as Rt,s as tt,j as ke,_ as en}from"./FileItem-63d6b211.js";import{M as gt,c as ht,m as Ae,b as ze,d as tn,e as nn,f as ln}from"./functionalCallableComp-9f5127f2.js";import{C as an,g as sn}from"./shortcut-72d414cf.js";/* empty css */import{_ as on}from"./index-452ed97b.js";import{D as rn}from"./index-2e1fe183.js";var un="Expected a function";function cn(e,t,n){var l=!0,o=!0;if(typeof e!="function")throw new TypeError(un);return kt(n)&&(l="leading"in n?!!n.leading:l,o="trailing"in n?!!n.trailing:o),ye(e,t,{leading:l,maxWait:t,trailing:o})}const ce=(...e)=>{document.addEventListener(...e),ct(()=>document.removeEventListener(...e))};var dn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 000 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0013.5-4.7L863.9 169a7.9 7.9 0 00-8.9-8.9zM416.6 562.3a8.03 8.03 0 00-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 00-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"}}]},name:"arrows-alt",theme:"outlined"};const fn=dn;function nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),l.forEach(function(o){vn(e,o,n[o])})}return e}function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var We=function(t,n){var l=nt({},t,n.attrs);return r(de,nt({},l,{icon:fn}),null)};We.displayName="ArrowsAltOutlined";We.inheritAttrs=!1;const pn=We;var mn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.3 506.3L781.7 405.6a7.23 7.23 0 00-11.7 5.7V476H548V254h64.8c6 0 9.4-7 5.7-11.7L517.7 114.7a7.14 7.14 0 00-11.3 0L405.6 242.3a7.23 7.23 0 005.7 11.7H476v222H254v-64.8c0-6-7-9.4-11.7-5.7L114.7 506.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h222v222h-64.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V548h222v64.8c0 6 7 9.4 11.7 5.7l127.5-100.8a7.3 7.3 0 00.1-11.4z"}}]},name:"drag",theme:"outlined"};const gn=mn;function lt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),l.forEach(function(o){hn(e,o,n[o])})}return e}function hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Be=function(t,n){var l=lt({},t,n.attrs);return r(de,lt({},l,{icon:gn}),null)};Be.displayName="DragOutlined";Be.inheritAttrs=!1;const yn=Be;var _n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"}}]},name:"fullscreen-exit",theme:"outlined"};const wn=_n;function at(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),l.forEach(function(o){bn(e,o,n[o])})}return e}function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var He=function(t,n){var l=at({},t,n.attrs);return r(de,at({},l,{icon:wn}),null)};He.displayName="FullscreenExitOutlined";He.inheritAttrs=!1;const kn=He;var On={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"}}]},name:"fullscreen",theme:"outlined"};const En=On;function st(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),l.forEach(function(o){Ln(e,o,n[o])})}return e}function Ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ve=function(t,n){var l=st({},t,n.attrs);return r(de,st({},l,{icon:En}),null)};Ve.displayName="FullscreenOutlined";Ve.inheritAttrs=!1;const $n=Ve;var Pn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M603.3 327.5l-246 178a7.95 7.95 0 000 12.9l246 178c5.3 3.8 12.7 0 12.7-6.5V643c0-10.2-4.9-19.9-13.2-25.9L457.4 512l145.4-105.2c8.3-6 13.2-15.6 13.2-25.9V334c0-6.5-7.4-10.3-12.7-6.5z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"left-circle",theme:"outlined"};const Fn=Pn;function ot(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),l.forEach(function(o){Sn(e,o,n[o])})}return e}function Sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ue=function(t,n){var l=ot({},t,n.attrs);return r(de,ot({},l,{icon:Fn}),null)};Ue.displayName="LeftCircleOutlined";Ue.inheritAttrs=!1;const Il=Ue;var Cn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M666.7 505.5l-246-178A8 8 0 00408 334v46.9c0 10.2 4.9 19.9 13.2 25.9L566.6 512 421.2 617.2c-8.3 6-13.2 15.6-13.2 25.9V690c0 6.5 7.4 10.3 12.7 6.5l246-178c4.4-3.2 4.4-9.8 0-13z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"right-circle",theme:"outlined"};const xn=Cn;function it(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},l=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(l=l.concat(Object.getOwnPropertySymbols(n).filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),l.forEach(function(o){In(e,o,n[o])})}return e}function In(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qe=function(t,n){var l=it({},t,n.attrs);return r(de,it({},l,{icon:xn}),null)};qe.displayName="RightCircleOutlined";qe.inheritAttrs=!1;const Ml=qe,Mn="/infinite_image_browsing/fe-static/assets/fullscreen-7f54b926.svg",Ee=()=>{const e=Array.from(document.querySelectorAll(".ant-image-preview-wrap")).find(t=>t.style.display!=="none");e?(console.log("closeImageFullscreenPreview success"),Dn(e)):console.log("closeImageFullscreenPreview not found")};function Dn(e){if(!(e instanceof HTMLElement))throw new Error("The provided value is not an HTMLElement.");const t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0,target:e});e.dispatchEvent(t)}const Tn=(e,t)=>{const n=t.querySelector(`.idx-${e} .ant-image-img`);n?n.click():console.log("openImageFullscreenPreview error: not found",e,t)};function Dl(e){const{previewIdx:t,eventEmitter:n,canLoadNext:l,previewing:o,sortedFiles:u,scroller:F,props:D}=_e().toRefs(),{state:S}=_e();let _=null;const w=(b,c)=>{var i;o.value=b,_!=null&&!b&&c&&((i=F.value)==null||i.scrollToItem(_),_=null)},x=()=>{if(!$("next")){if(e!=null&&e.loadNext)return e.loadNext();D.value.mode==="walk"&&l.value&&(R.info(z("loadingNextFolder")),n.value.emit("loadNextDir",!0))}};ce("keydown",b=>{var c;if(o.value){let i=t.value;if(["ArrowDown","ArrowRight"].includes(b.key))for(i++;u.value[i]&&!Y(u.value[i].name);)i++;else if(["ArrowUp","ArrowLeft"].includes(b.key))for(i--;u.value[i]&&!Y(u.value[i].name);)i--;if(Y((c=u.value[i])==null?void 0:c.name)??""){t.value=i;const P=F.value;P&&!(i>=P.$_startIndex&&i<=P.$_endIndex)&&(_=i)}x()}});const h=b=>{var i;let c=t.value;if(b==="next")for(c++;u.value[c]&&!Y(u.value[c].name);)c++;else if(b==="prev")for(c--;u.value[c]&&!Y(u.value[c].name);)c--;if(Y((i=u.value[c])==null?void 0:i.name)??""){t.value=c;const P=F.value;P&&!(c>=P.$_startIndex&&c<=P.$_endIndex)&&(_=c)}x()},$=b=>{var i;let c=t.value;if(b==="next")for(c++;u.value[c]&&!Y(u.value[c].name);)c++;else if(b==="prev")for(c--;u.value[c]&&!Y(u.value[c].name);)c--;return Y((i=u.value[c])==null?void 0:i.name)};return Te("removeFiles",async()=>{o.value&&!S.sortedFiles[t.value]&&Ee()}),{previewIdx:t,onPreviewVisibleChange:w,previewing:o,previewImgMove:h,canPreview:$}}function Fe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Et(e)}function Tl(){const{currLocation:e,sortedFiles:t,currPage:n,multiSelectedIdxs:l,eventEmitter:o,walker:u}=_e().toRefs(),F=()=>{l.value=[]};return ce("click",()=>{H.keepMultiSelect||F()}),ce("blur",()=>{H.keepMultiSelect||F()}),ue(n,F),{onFileDragStart:(w,x)=>{const h=Ce(t.value[x]);et.fileDragging=!0,console.log("onFileDragStart set drag file ",w,x,h);const $=[h];let b=h.type==="dir";if(l.value.includes(x)){const i=l.value.map(P=>t.value[P]);$.push(...i),b=i.some(P=>P.type==="dir")}const c={includeDir:b,loc:e.value||"search-result",path:Ye($,"fullpath").map(i=>i.fullpath),nodes:Ye($,"fullpath"),__id:"FileTransferData"};w.dataTransfer.setData("text/plain",JSON.stringify(c))},onDrop:async w=>{if(u.value)return;const x=Ot(w);if(!x)return;const h=e.value;if(x.loc===h)return;const $=Ne(),b=async()=>$.pushAction(async()=>{await ht(x.path,h),o.value.emit("refresh"),he.destroyAll()}),c=()=>$.pushAction(async()=>{await Ae(x.path,h),ne.emit("removeFiles",{paths:x.path,loc:x.loc}),o.value.emit("refresh"),he.destroyAll()});he.confirm({title:z("confirm")+"?",width:"60vw",content:()=>{let i,P,T;return r("div",null,[r("div",null,[`${z("moveSelectedFilesTo")} ${h}`,r("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[x.path.map(L=>r("li",null,[L.split(/[/\\]/).pop()]))])]),r(gt,null,null),r("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end"},class:"actions"},[r(re,{onClick:he.destroyAll},Fe(i=z("cancel"))?i:{default:()=>[i]}),r(re,{type:"primary",loading:!$.isIdle,onClick:b},Fe(P=z("copy"))?P:{default:()=>[P]}),r(re,{type:"primary",loading:!$.isIdle,onClick:c},Fe(T=z("move"))?T:{default:()=>[T]})])])},maskClosable:!0,wrapClassName:"hidden-antd-btns-modal"})},multiSelectedIdxs:l,onFileDragEnd:()=>{et.fileDragging=!1}}}function Al({openNext:e}){const t=Z(!1),n=Z(""),{sortedFiles:l,previewIdx:o,multiSelectedIdxs:u,stack:F,currLocation:D,spinning:S,previewing:_,stackViewEl:w,eventEmitter:x,props:h,deletedFiles:$}=_e().toRefs(),b=Je;Te("removeFiles",({paths:L,loc:a})=>{b(a)!==b(D.value)||!xe(F.value)||(L.forEach(v=>$.value.add(v)),L.filter(Y).forEach(v=>$.value.add(v.replace(/\.\w+$/,".txt"))))}),Te("addFiles",({files:L,loc:a})=>{if(b(a)!==b(D.value))return;const g=xe(F.value);g&&g.files.unshift(...L)});const c=Ne(),i=async(L,a,g)=>{o.value=g,H.fullscreenPreviewInitialUrl=oe(a);const v=u.value.indexOf(g);if(L.shiftKey){if(v!==-1)u.value.splice(v,1);else{u.value.push(g),u.value.sort((j,G)=>j-G);const B=u.value[0],X=u.value[u.value.length-1];u.value=Zt(B,X+1)}L.stopPropagation()}else L.ctrlKey||L.metaKey?(v!==-1?u.value.splice(v,1):u.value.push(g),L.stopPropagation()):await e(a)},P=async(L,a,g)=>{var ee,ae,ve;const v=oe(a),B=D.value,X={IIB_container_id:parent.IIB_container_id},j=()=>{let d=[];return u.value.includes(g)?d=u.value.map(m=>l.value[m]):d.push(a),d},G=async d=>{if(!S.value)try{S.value=!0,await Mt(a.fullpath),ke.postMessage({...X,event:"click_hidden_button",btnEleId:"iib_hidden_img_update_trigger"}),await Dt(),ke.postMessage({...X,event:"click_hidden_button",btnEleId:`iib_hidden_tab_${d}`})}catch(m){console.error(m),R.error("发送图像失败请携带console的错误消息找开发者")}finally{S.value=!1}},U=`${L.key}`;if(U.startsWith("toggle-tag-")){const d=+U.split("toggle-tag-")[1],{is_remove:m}=await Lt({tag_id:d,img_path:a.fullpath}),N=(ae=(ee=H.conf)==null?void 0:ee.all_custom_tags.find(A=>A.id===d))==null?void 0:ae.name;await Pe.refreshTags([a.fullpath]),R.success(z(m?"removedTagFromImage":"addedTagToImage",{tag:N}));return}else if(U==="add-custom-tag")ze();else if(U.startsWith("batch-add-tag-")||U.startsWith("batch-remove-tag-")){const d=+U.split("-tag-")[1],m=U.includes("add")?"add":"remove",N=j().map(A=>A.fullpath);await $t({tag_id:d,img_paths:N,action:m}),await Pe.refreshTags(N),R.success(z(m==="add"?"addCompleted":"removeCompleted"));return}else if(U.startsWith("copy-to-")){const d=U.split("copy-to-")[1],m=j(),N=m.map(A=>A.fullpath);await ht(N,d,!0),ne.emit("addFiles",{files:m,loc:d}),R.success(z("copySuccess"));return}else if(U.startsWith("move-to-")){const d=U.split("move-to-")[1],m=j(),N=m.map(A=>A.fullpath);await Ae(N,d,!0),ne.emit("removeFiles",{paths:N,loc:D.value}),ne.emit("addFiles",{files:m,loc:d}),R.success(z("moveSuccess"));return}switch(L.key){case"previewInNewWindow":return window.open(v);case"copyFilePath":return le(a.fullpath);case"saveSelectedAsJson":return It(j());case"openWithDefaultApp":return xt(a.fullpath);case"download":{const d=j();Ct(d.map(m=>oe(m,!0)));break}case"copyPreviewUrl":return le(parent.document.location.origin+v);case"rename":{let d=await tn(a.fullpath);d=Je(d);const m=Pe.tagMap;m.set(d,m.get(a.fullpath)??[]),m.delete(a.fullpath),a.fullpath=d,a.name=d.split(/[\\/]/).pop()??"";return}case"send2txt2img":return G("txt2img");case"send2img2img":return G("img2img");case"send2inpaint":return G("inpaint");case"send2extras":return G("extras");case"send2savedDir":{const d=H.quickMovePaths.find(A=>A.key==="outdir_save");if(!d)return R.error(z("unknownSavedDir"));const m=St(d.dir,(ve=H.conf)==null?void 0:ve.sd_cwd),N=j();await Ae(N.map(A=>A.fullpath),m,!0),ne.emit("removeFiles",{paths:N.map(A=>A.fullpath),loc:D.value}),ne.emit("addFiles",{files:N,loc:m});break}case"send2controlnet-img2img":case"send2controlnet-txt2img":{const d=L.key.split("-")[1];ke.postMessage({...X,event:"send_to_control_net",type:d,url:oe(a)});break}case"send2outpaint":{n.value=await c.pushAction(()=>Ie(a.fullpath)).res;const[d,m]=(n.value||"").split(`
`);ke.postMessage({...X,event:"send_to_outpaint",url:oe(a),prompt:d,negPrompt:m.slice(17)});break}case"openWithWalkMode":{tt.set(B,F.value);const d=H.tabList[h.value.tabIdx],m={type:"local",key:we(),path:a.fullpath,name:z("local"),stackKey:B,mode:"walk"};d.panes.push(m),d.key=m.key;break}case"openFileLocationInNewTab":case"openInNewTab":{const d=H.tabList[h.value.tabIdx],m={type:"local",key:we(),path:L.key==="openInNewTab"?a.fullpath:Ft(a.fullpath),name:z("local"),mode:"scanned-fixed"};d.panes.push(m),d.key=m.key;break}case"openOnTheRight":{tt.set(B,F.value);let d=H.tabList[h.value.tabIdx+1];d||(d={panes:[],key:"",id:we()},H.tabList[h.value.tabIdx+1]=d);const m={type:"local",key:we(),path:a.fullpath,name:z("local"),stackKey:B};d.panes.push(m),d.key=m.key;break}case"send2BatchDownload":{Rt.addFiles(j());break}case"viewGenInfo":{t.value=!0,n.value=await c.pushAction(()=>Ie(a.fullpath)).res;break}case"openWithLocalFileBrowser":{await Pt(a.fullpath);break}case"deleteFiles":{const d=j(),m=async()=>{const N=d.map(A=>A.fullpath);if(await nn(N),R.success(z("deleteSuccess")),_.value){const A=oe(a)===H.fullscreenPreviewInitialUrl,s=o.value===l.value.length-1;if((A||s)&&(Ee(),await Me(100),A&&l.value.length>1)){const f=o.value;Me(0).then(()=>Tn(f,w.value))}}ne.emit("removeFiles",{paths:N,loc:D.value})};if(d.length===1&&H.ignoredConfirmActions.deleteOneOnly)return m();await new Promise(N=>{he.confirm({title:z("confirmDelete"),maskClosable:!0,width:"60vw",content:()=>r("div",null,[r("ol",{style:{maxHeight:"50vh",overflow:"auto"}},[d.map(A=>r("li",null,[A.fullpath.split(/[/\\]/).pop()]))]),r(gt,null,null),r(an,{checked:H.ignoredConfirmActions.deleteOneOnly,"onUpdate:checked":A=>H.ignoredConfirmActions.deleteOneOnly=A},{default:()=>[z("deleteOneOnlySkipConfirm"),M(" ("),z("resetOnGlobalSettingsPage"),M(")")]})]),async onOk(){await m(),N()}})});break}}return{}},{isOutside:T}=dt(w);return ce("keydown",L=>{var g,v,B;const a=sn(L);if(_.value){a==="Esc"&&Ee();const X=(g=Object.entries(H.shortcut).find(j=>j[1]===a&&j[1]))==null?void 0:g[0];if(X){L.stopPropagation(),L.preventDefault();const j=o.value,G=l.value[j];switch(X){case"delete":return P({key:"deleteFiles"},G,j);case"download":return P({key:"download"},G,j);default:{const U=(v=/^toggle_tag_(.*)$/.exec(X))==null?void 0:v[1],ee=(B=H.conf)==null?void 0:B.all_custom_tags.find(ae=>ae.name===U);return ee?P({key:`toggle-tag-${ee.id}`},G,j):void 0}}}}else!T.value&&["Ctrl + KeyA","Cmd + KeyA"].includes(a)&&(L.preventDefault(),L.stopPropagation(),x.value.emit("selectAll"))}),{onFileItemClick:i,onContextMenuClick:P,showGenInfo:t,imageGenInfo:n,q:c}}const Se=new Map,zl=()=>{const{useEventListen:e,sortedFiles:t,getViewableAreaFiles:n}=_e().toRefs(),l=Z(H.defaultChangeIndchecked),o=Z(H.defaultSeedChangeChecked),u=async()=>{if(await Me(100),!l.value)return;const S=n.value().filter(w=>Y(w.fullpath)&&!w.gen_info_obj);if(!S.length)return;const _=await Tt(S.map(w=>w.fullpath).filter(w=>!Se.has(w)));S.forEach(w=>{const x=_[w.fullpath]||Se.get(w.fullpath)||"";Se.set(w.fullpath,x),w.gen_info_obj=De(x),w.gen_info_raw=x})};e.value("viewableAreaFilesChange",u);const F=S=>{const _=t.value;return[S,o.value,_[S-1],_[S],_[S+1]]};function D(S,_,w,x){const h={diff:{},empty:!0,ownFile:"",otherFile:""};if(_+w<0||_+w>=t.value.length||t.value[_]==null||!("gen_info_obj"in t.value[_])||!("gen_info_obj"in t.value[_+w]))return h;const $=S,b=t.value[_+w].gen_info_obj;if(b==null)return h;const c=["hashes","resources"];h.diff={},h.ownFile=x.name,h.otherFile=t.value[_+w].name,h.empty=!1,o.value||c.push("seed");for(const i in $)if(!c.includes(i)){if(!(i in b)){h.diff[i]="+";continue}if($[i]!=b[i])if(i.includes("rompt")&&$[i]!=""&&b[i]!=""){const P=$[i].split(","),T=b[i].split(",");let L=0;for(const a in P)P[a]!=T[a]&&L++;h.diff[i]=L}else h.diff[i]=[$[i],b[i]]}return h}return{getGenDiff:D,changeIndchecked:l,seedChangeChecked:o,getRawGenParams:()=>u(),getGenDiffWatchDep:F}};function An(e,t,n,l){let o=0,u=0,F=typeof(l==null?void 0:l.width)=="number"?l.width:0,D=typeof(l==null?void 0:l.height)=="number"?l.height:0,S=typeof(l==null?void 0:l.left)=="number"?l.left:0,_=typeof(l==null?void 0:l.top)=="number"?l.top:0,w=!1;const x=a=>{a.stopPropagation(),a.preventDefault(),!(!e.value||!t.value)&&(o=a instanceof MouseEvent?a.clientX:a.touches[0].clientX,u=a instanceof MouseEvent?a.clientY:a.touches[0].clientY,F=e.value.offsetWidth,D=e.value.offsetHeight,t.value.offsetLeft,t.value.offsetTop,document.documentElement.addEventListener("mousemove",h),document.documentElement.addEventListener("touchmove",h),document.documentElement.addEventListener("mouseup",$),document.documentElement.addEventListener("touchend",$))},h=a=>{if(!e.value||!t.value)return;let g=F+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-o),v=D+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-u);e.value.offsetLeft+g>window.innerWidth&&(g=window.innerWidth-e.value.offsetLeft),e.value.offsetTop+v>window.innerHeight&&(v=window.innerHeight-e.value.offsetTop),e.value.style.width=`${g}px`,e.value.style.height=`${v}px`,l!=null&&l.onResize&&l.onResize(g,v)},$=()=>{document.documentElement.removeEventListener("mousemove",h),document.documentElement.removeEventListener("touchmove",h),document.documentElement.removeEventListener("mouseup",$),document.documentElement.removeEventListener("touchend",$)},b=a=>{a.stopPropagation(),a.preventDefault(),!(!e.value||!n.value)&&(w=!0,S=e.value.offsetLeft,_=e.value.offsetTop,o=a instanceof MouseEvent?a.clientX:a.touches[0].clientX,u=a instanceof MouseEvent?a.clientY:a.touches[0].clientY,document.documentElement.addEventListener("mousemove",c),document.documentElement.addEventListener("touchmove",c),document.documentElement.addEventListener("mouseup",i),document.documentElement.addEventListener("touchend",i))},c=a=>{if(!e.value||!n.value||!w)return;const g=S+((a instanceof MouseEvent?a.clientX:a.touches[0].clientX)-o),v=_+((a instanceof MouseEvent?a.clientY:a.touches[0].clientY)-u);g<0?e.value.style.left="0px":g+e.value.offsetWidth>window.innerWidth?e.value.style.left=`${window.innerWidth-e.value.offsetWidth}px`:e.value.style.left=`${g}px`,v<0?e.value.style.top="0px":v+e.value.offsetHeight>window.innerHeight?e.value.style.top=`${window.innerHeight-e.value.offsetHeight}px`:e.value.style.top=`${v}px`,l!=null&&l.onDrag&&l.onDrag(g,v)},i=()=>{w=!1,document.documentElement.removeEventListener("mousemove",c),document.documentElement.removeEventListener("touchmove",c),document.documentElement.removeEventListener("mouseup",i),document.documentElement.removeEventListener("touchend",i)},P=()=>{if(!e.value||!t.value)return;let a=e.value.offsetLeft,g=e.value.offsetTop,v=e.value.offsetWidth,B=e.value.offsetHeight;a+v>window.innerWidth&&(a=window.innerWidth-v,a<0&&(a=0,v=window.innerWidth)),g+B>window.innerHeight&&(g=window.innerHeight-B,g<0&&(g=0,B=window.innerHeight)),e.value.style.left=`${a}px`,e.value.style.top=`${g}px`,e.value.style.width=`${v}px`,e.value.style.height=`${B}px`},T=()=>{!e.value||!l||(typeof l.width=="number"&&(e.value.style.width=`${l.width}px`),typeof l.height=="number"&&(e.value.style.height=`${l.height}px`),typeof l.left=="number"&&(e.value.style.left=`${l.left}px`),typeof l.top=="number"&&(e.value.style.top=`${l.top}px`),P(),window.addEventListener("resize",P))},L=()=>{document.documentElement.removeEventListener("mousemove",h),document.documentElement.removeEventListener("touchmove",h),document.documentElement.removeEventListener("mouseup",$),document.documentElement.removeEventListener("touchend",$),document.documentElement.removeEventListener("mousemove",c),document.documentElement.removeEventListener("touchmove",c),document.documentElement.removeEventListener("mouseup",i),document.documentElement.removeEventListener("touchend",i),window.removeEventListener("resize",P)};return ft(T),ct(L),ue(()=>l==null?void 0:l.disbaled,async a=>{await At(),a!==void 0&&(a?L():T())}),ue(()=>[e.value,t.value,n.value],([a,g,v])=>{a&&g&&(g.addEventListener("mousedown",x),g.addEventListener("touchstart",x)),a&&v&&(v.addEventListener("mousedown",b),v.addEventListener("touchstart",b))}),{handleResizeMouseDown:x,handleDragMouseDown:b}}let rt=null;const zn=()=>{var S,_;const e=je(),t=Oe(vt+"fullscreen_layout",{enable:!1,panelWidth:384,alwaysOn:!0}),n=zt(rt??((_=(S=e.conf)==null?void 0:S.app_fe_setting)==null?void 0:_.fullscreen_layout)??Ce(t.value)),l="--iib-lr-layout-info-panel-width",o=Q(()=>n.alwaysOn&&n.enable?n.panelWidth:0);ue(n,w=>{t.value=Ce(w),ut(n,l,o),Nn(n),rt=n},{deep:!0}),ft(()=>ut(n,l,o));const{enable:u,panelWidth:F,alwaysOn:D}=Nt(n);return{state:n,isLeftRightLayout:u,panelwidtrhStyleVarName:l,lrLayoutInfoPanelWidth:F,lrMenuAlwaysOn:D}},Nn=ye(e=>jt("fullscreen_layout",e),300),ut=ye((e,t,n)=>{e.enable?(document.body.classList.add("fullscreen-lr-layout"),document.documentElement.style.setProperty(t,`${e.panelWidth}px`),document.documentElement.style.setProperty("--iib-lr-layout-container-offset",`${n.value}px`)):(document.documentElement.style.removeProperty(t),document.documentElement.style.removeProperty("--iib-lr-layout-container-offset"),document.body.classList.remove("fullscreen-lr-layout"))},300),fe=e=>(Jt("data-v-875e80cb"),e=e(),Qt(),e),jn={key:0},Wn={class:"container"},Bn={class:"action-bar"},Hn=["title"],Vn=["title"],Un=["title"],qn=["src"],Gn={key:0,class:"icon",style:{cursor:"pointer"}},Xn={key:2,"flex-placeholder":""},Kn={key:3,class:"action-bar"},Yn={key:0,class:"gen-info"},Jn={class:"info-tags"},Qn={class:"info-tag"},Zn={class:"name"},Rn=["title"],el={class:"name"},tl=["title","onDblclick"],nl={key:0,class:"tags-container"},ll=["onClick"],al={class:"lr-layout-control"},sl={class:"ctrl-item"},ol={class:"ctrl-item"},il={class:"ctrl-item"},rl=fe(()=>C("br",null,null,-1)),ul=fe(()=>C("h3",null,"Prompt",-1)),cl=["innerHTML"],dl=fe(()=>C("br",null,null,-1)),fl=fe(()=>C("h3",null,"Negative Prompt",-1)),vl=["innerHTML"],pl=fe(()=>C("br",null,null,-1)),ml=fe(()=>C("h3",null,"Params",-1)),gl={style:{"font-weight":"600","text-transform":"capitalize"}},hl=["onDblclick"],yl=["onDblclick"],_l=["title"],wl=pt({__name:"fullScreenContextMenu",props:{file:{},idx:{}},emits:["contextMenuClick"],setup(e,{emit:t}){const n=e;Wt(s=>({"1f6454de":p(g)?0:"46px","3ac8f35e":p(a)+"px","10cf9255":`calc(100vw - ${p(a)}px)`}));const l=je(),o=Bt(),u=Z(),F=Q(()=>o.tagMap.get(n.file.fullpath)??[]),D=Z(""),S=Ne(),_=Z(""),w=Q(()=>_.value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")),x=Q(()=>w.value.split(`
`)),h=Q(()=>De(w.value)),$=Q(()=>{let s=De(w.value);return delete s.prompt,delete s.negativePrompt,s});ue(()=>{var s;return(s=n==null?void 0:n.file)==null?void 0:s.fullpath},async s=>{s&&(S.tasks.forEach(f=>f.cancel()),S.pushAction(()=>Ie(s)).res.then(f=>{_.value=f}))},{immediate:!0});const b=Oe("iib@fullScreenContextMenu.prompt-tab","structedData"),c=Z(),i=Z(),P={left:100,top:100,width:512,height:384,expanded:!0},T=Oe("fullScreenContextMenu.vue-drag",P);T.value&&(T.value.left<0||T.value.top<0)&&(T.value={...P});const{isLeftRightLayout:L,lrLayoutInfoPanelWidth:a,lrMenuAlwaysOn:g}=zn(),v=L;An(u,c,i,{disbaled:v,...T.value,onDrag:ye(function(s,f){T.value={...T.value,left:s,top:f}},300),onResize:ye(function(s,f){T.value={...T.value,width:s,height:f}},300)});const B=Z(!1),{isOutside:X}=dt(Q(()=>!v.value||g.value?null:B.value?u.value:xe(document.querySelectorAll(".iib-tab-edge-trigger"))));ue(X,cn(s=>{B.value=!s},300));function j(s){return s.parentNode}function G(s){if(!s)return"";const f=[],pe="BREAK",te=s.replace(/&gt;\s/g,"> ,").replace(/\sBREAK\s/g,","+pe+",").split(/[\n,]+/).map(K=>K.trim()).filter(K=>K);let W=!1;for(let K=0;K<te.length;K++){if(te[K]===pe){f.push('<br><span class="tag" style="color:var(--zp-secondary)">BREAK</span><br>');continue}const se=te[K];W||(W=se.includes("("));const me=["tag"];W&&me.push("has-parentheses"),se.length<32&&me.push("short-tag"),f.push(`<span class="${me.join(" ")}">${se}</span>`),W&&(W=!se.includes(")"))}return f.join(l.showCommaInInfoPanel?",":" ")}ce("load",s=>{const f=s.target;f.className==="ant-image-preview-img"&&(D.value=`${f.naturalWidth} x ${f.naturalHeight}`)},{capture:!0});const U=Q(()=>{const s=[{name:z("fileSize"),val:n.file.size}];return D.value&&s.push({name:z("resolution"),val:D.value}),s}),ee=()=>{const s="Negative prompt:",f=_.value.includes(s)?_.value.split(s)[0]:x.value[0]??"";le($e(f.trim()))},ae=()=>document.body.requestFullscreen(),ve=s=>{le(typeof s=="object"?JSON.stringify(s,null,4):s)},d=s=>{s.key.startsWith("Arrow")?(s.stopPropagation(),s.preventDefault(),document.dispatchEvent(new KeyboardEvent("keydown",s))):s.key==="Escape"&&document.fullscreenElement&&document.exitFullscreen()};ce("dblclick",s=>{var f;((f=s.target)==null?void 0:f.className)==="ant-image-preview-img"&&Ee()});const m=Q(()=>v.value||T.value.expanded),N=Oe(vt+"contextShowFullPath",!1),A=Q(()=>N.value?n.file.fullpath:n.file.name);return(s,f)=>{var Ke;const pe=rn,te=re,W=Vt,K=Ut,se=qt,me=Gt,yt=re,Ge=on,_t=ln,wt=Xt,Xe=Kt,bt=Yt;return E(),I("div",{ref_key:"el",ref:u,class:Re(["full-screen-menu",{"unset-size":!p(T).expanded,lr:p(v),"always-on":p(g),"mouse-in":B.value}]),onWheelCapture:f[12]||(f[12]=Ht(()=>{},["stop"])),onKeydownCapture:d},[p(v)?(E(),I("div",jn)):V("",!0),C("div",Wn,[C("div",Bn,[p(v)?V("",!0):(E(),I("div",{key:0,ref_key:"dragHandle",ref:i,class:"icon",style:{cursor:"grab"},title:p(z)("dragToMovePanel")},[r(p(yn))],8,Hn)),p(v)?V("",!0):(E(),I("div",{key:1,class:"icon",style:{cursor:"pointer"},onClick:f[0]||(f[0]=y=>p(T).expanded=!p(T).expanded),title:p(z)("clickToToggleMaximizeMinimize")},[m.value?(E(),ie(p(kn),{key:0})):(E(),ie(p($n),{key:1}))],8,Vn)),C("div",{style:{display:"flex","flex-direction":"column","align-items":"center",cursor:"grab"},class:"icon",title:p(z)("fullscreenview"),onClick:ae},[C("img",{src:p(Mn),style:{width:"21px",height:"21px","padding-bottom":"2px"},alt:""},null,8,qn)],8,Un),r(pe,{"get-popup-container":j},{overlay:k(()=>[r(en,{file:s.file,idx:s.idx,"selected-tag":F.value,onContextMenuClick:f[1]||(f[1]=(y,q,Le)=>t("contextMenuClick",y,q,Le))},null,8,["file","idx","selected-tag"])]),default:k(()=>[p(T).expanded?V("",!0):(E(),I("div",Gn,[r(p(Qe))]))]),_:1}),m.value?(E(),I("div",Xn)):V("",!0),m.value?(E(),I("div",Kn,[r(pe,{trigger:["hover"],"get-popup-container":j},{overlay:k(()=>[r(me,{onClick:f[2]||(f[2]=y=>t("contextMenuClick",y,s.file,s.idx))},{default:k(()=>{var y;return[((y=p(l).conf)==null?void 0:y.launch_mode)!=="server"?(E(),I(J,{key:0},[r(W,{key:"send2txt2img"},{default:k(()=>[M(O(s.$t("sendToTxt2img")),1)]),_:1}),r(W,{key:"send2img2img"},{default:k(()=>[M(O(s.$t("sendToImg2img")),1)]),_:1}),r(W,{key:"send2inpaint"},{default:k(()=>[M(O(s.$t("sendToInpaint")),1)]),_:1}),r(W,{key:"send2extras"},{default:k(()=>[M(O(s.$t("sendToExtraFeatures")),1)]),_:1}),r(K,{key:"sendToThirdPartyExtension",title:s.$t("sendToThirdPartyExtension")},{default:k(()=>[r(W,{key:"send2controlnet-txt2img"},{default:k(()=>[M("ControlNet - "+O(s.$t("t2i")),1)]),_:1}),r(W,{key:"send2controlnet-img2img"},{default:k(()=>[M("ControlNet - "+O(s.$t("i2i")),1)]),_:1}),r(W,{key:"send2outpaint"},{default:k(()=>[M("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):V("",!0),r(W,{key:"send2BatchDownload"},{default:k(()=>[M(O(s.$t("sendToBatchDownload")),1)]),_:1}),r(K,{key:"copy2target",title:s.$t("copyTo")},{default:k(()=>[(E(!0),I(J,null,ge(p(l).quickMovePaths,q=>(E(),ie(W,{key:`copy-to-${q.dir}`},{default:k(()=>[M(O(q.zh),1)]),_:2},1024))),128))]),_:1},8,["title"]),r(K,{key:"move2target",title:s.$t("moveTo")},{default:k(()=>[(E(!0),I(J,null,ge(p(l).quickMovePaths,q=>(E(),ie(W,{key:`move-to-${q.dir}`},{default:k(()=>[M(O(q.zh),1)]),_:2},1024))),128))]),_:1},8,["title"]),r(se),r(W,{key:"deleteFiles"},{default:k(()=>[M(O(s.$t("deleteSelected")),1)]),_:1}),r(W,{key:"previewInNewWindow"},{default:k(()=>[M(O(s.$t("previewInNewWindow")),1)]),_:1}),r(W,{key:"copyPreviewUrl"},{default:k(()=>[M(O(s.$t("copySourceFilePreviewLink")),1)]),_:1}),r(W,{key:"copyFilePath"},{default:k(()=>[M(O(s.$t("copyFilePath")),1)]),_:1})]}),_:1})]),default:k(()=>[r(te,null,{default:k(()=>[M(O(p(z)("openContextMenu")),1)]),_:1})]),_:1}),r(yt,{onClick:f[3]||(f[3]=y=>t("contextMenuClick",{key:"download"},n.file,n.idx))},{default:k(()=>[M(O(s.$t("download")),1)]),_:1}),_.value?(E(),ie(te,{key:0,onClick:f[4]||(f[4]=y=>p(le)(_.value))},{default:k(()=>[M(O(s.$t("copyPrompt")),1)]),_:1})):V("",!0),_.value?(E(),ie(te,{key:1,onClick:ee},{default:k(()=>[M(O(s.$t("copyPositivePrompt")),1)]),_:1})):V("",!0)])):V("",!0)]),m.value?(E(),I("div",Yn,[C("div",Jn,[C("span",Qn,[C("span",Zn,O(s.$t("fileName")),1),C("span",{class:"value",title:A.value,onDblclick:f[5]||(f[5]=y=>p(le)(A.value))},O(A.value),41,Rn),C("span",{style:{margin:"0 8px",cursor:"pointer"},title:"Click to expand full path",onClick:f[6]||(f[6]=y=>N.value=!p(N))},[r(p(Qe))])]),(E(!0),I(J,null,ge(U.value,y=>(E(),I("span",{class:"info-tag",key:y.name},[C("span",el,O(y.name),1),C("span",{class:"value",title:y.val,onDblclick:q=>p(le)(y.val)},O(y.val),41,tl)]))),128))]),(Ke=p(l).conf)!=null&&Ke.all_custom_tags?(E(),I("div",nl,[C("div",{class:"tag",onClick:f[7]||(f[7]=(...y)=>p(ze)&&p(ze)(...y)),style:Ze({"--tag-color":"var(--zp-luminous)"})},"+ "+O(s.$t("add")),5),(E(!0),I(J,null,ge(p(l).conf.all_custom_tags,y=>(E(),I("div",{class:Re(["tag",{selected:F.value.some(q=>q.id===y.id)}]),onClick:q=>t("contextMenuClick",{key:`toggle-tag-${y.id}`},s.file,s.idx),key:y.id,style:Ze({"--tag-color":p(o).getColor(y)})},O(y.name),15,ll))),128))])):V("",!0),C("div",al,[C("div",sl,[M(O(s.$t("experimentalLRLayout"))+" ",1),r(Ge,{checked:p(v),"onUpdate:checked":f[8]||(f[8]=y=>be(v)?v.value=y:null),size:"small"},null,8,["checked"])]),p(v)?(E(),I(J,{key:0},[C("div",ol,[M(O(s.$t("width"))+": ",1),r(_t,{value:p(a),"onUpdate:value":f[9]||(f[9]=y=>be(a)?a.value=y:null),style:{width:"64px"},step:16,min:128,max:1024},null,8,["value"])]),r(wt,{title:s.$t("alwaysOnTooltipInfo")},{default:k(()=>[C("div",il,[M(O(s.$t("alwaysOn"))+" ",1),r(Ge,{checked:p(g),"onUpdate:checked":f[10]||(f[10]=y=>be(g)?g.value=y:null),size:"small"},null,8,["checked"])])]),_:1},8,["title"])],64)):V("",!0)]),r(bt,{activeKey:p(b),"onUpdate:activeKey":f[11]||(f[11]=y=>be(b)?b.value=y:null)},{default:k(()=>[r(Xe,{key:"structedData",tab:s.$t("structuredData")},{default:k(()=>[C("div",null,[h.value.prompt?(E(),I(J,{key:0},[rl,ul,C("code",{innerHTML:G(h.value.prompt??"")},null,8,cl)],64)):V("",!0),h.value.negativePrompt?(E(),I(J,{key:1},[dl,fl,C("code",{innerHTML:G(h.value.negativePrompt??"")},null,8,vl)],64)):V("",!0)]),Object.keys($.value).length?(E(),I(J,{key:0},[pl,ml,C("table",null,[(E(!0),I(J,null,ge($.value,(y,q)=>(E(),I("tr",{key:q,class:"gen-info-frag"},[C("td",gl,O(q),1),typeof y=="object"?(E(),I("td",{key:0,style:{cursor:"pointer"},onDblclick:Le=>ve(y)},[C("code",null,O(y),1)],40,hl)):(E(),I("td",{key:1,style:{cursor:"pointer"},onDblclick:Le=>ve(p($e)(y))},O(p($e)(y)),41,yl))]))),128))])],64)):V("",!0)]),_:1},8,["tab"]),r(Xe,{key:"sourceText",tab:s.$t("sourceText")},{default:k(()=>[C("code",null,O(_.value),1)]),_:1},8,["tab"])]),_:1},8,["activeKey"])])):V("",!0)]),p(T).expanded&&!p(v)?(E(),I("div",{key:1,class:"mouse-sensor",ref_key:"resizeHandle",ref:c,title:p(z)("dragToResizePanel")},[r(p(pn))],8,_l)):V("",!0)],34)}}});const Nl=mt(wl,[["__scopeId","data-v-875e80cb"]]),bl={key:0,class:"float-panel"},kl={key:0,class:"select-actions"},Ol={key:1},El=pt({__name:"MultiSelectKeep",props:{show:{type:Boolean}},emits:["selectAll","reverseSelect","clearAllSelected"],setup(e,{emit:t}){const n=je(),l=()=>{t("clearAllSelected"),n.keepMultiSelect=!1},o=()=>{n.keepMultiSelect=!0};return(u,F)=>{const D=re;return u.show?(E(),I("div",bl,[p(n).keepMultiSelect?(E(),I("div",kl,[r(D,{size:"small",onClick:F[0]||(F[0]=S=>t("selectAll"))},{default:k(()=>[M(O(u.$t("select-all")),1)]),_:1}),r(D,{size:"small",onClick:F[1]||(F[1]=S=>t("reverseSelect"))},{default:k(()=>[M(O(u.$t("rerverse-select")),1)]),_:1}),r(D,{size:"small",onClick:F[2]||(F[2]=S=>t("clearAllSelected"))},{default:k(()=>[M(O(u.$t("clear-all-selected")),1)]),_:1}),r(D,{size:"small",onClick:l},{default:k(()=>[M(O(u.$t("exit")),1)]),_:1})])):(E(),I("div",Ol,[r(D,{size:"small",type:"primary",onClick:o},{default:k(()=>[M(O(u.$t("keep-multi-selected")),1)]),_:1})]))])):V("",!0)}}});const jl=mt(El,[["__scopeId","data-v-b04c3508"]]);export{Il as L,jl as M,Ml as R,Tl as a,Al as b,Dl as c,zl as d,Nl as f,ce as u};