sd-webui-infinite-image-bro.../vue/dist/assets/fullScreenContextMenu-64797...

3 lines
21 KiB
JavaScript

import{d as ye,br as Oe,aJ as Le,bY as Ee,ay as $e,aD as q,bZ as Se,b_ as ie,e as ae,c as o,_ as Pe,h as N,a as re,bA as xe,P as le,ag as B,ax as Ce,aN as Me,l as _e,k as ke,$ as V,ap as H,bP as De,b$ as oe,c0 as ze,c1 as Ne,ai as T,o as p,y as h,p as y,r as c,m as X,n as m,L as se,c2 as Ae,C as L,z as I,x as w,v as g,t as ue,A as G,N as ce,B as je,q as Te,V as de,W as Ie,c3 as We,M as Be,au as Fe,av as Ue,X as Ve}from"./index-e958a380.js";import{D as He}from"./index-75af9b9c.js";/* empty css */import{i as Xe,j as Ye,_ as Ge}from"./FileItem-caf7e020.js";var qe=["class","style"],Je=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:le.any,delay:Number,indicator:le.any}},Y=null;function Qe(e,t){return!!e&&!!t&&!isNaN(Number(t))}function Qt(e){var t=e.indicator;Y=typeof t=="function"?t:function(){return o(t,null,null)}}const Zt=ye({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:Oe(Je(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:Le("configProvider",Ee)}},data:function(){var t=this.spinning,i=this.delay,n=Qe(t,i);return{sSpinning:t&&!n}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var t=this;$e(function(){t.debouncifyUpdateSpinning(),t.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(t){var i=t||this.$props,n=i.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=q(this.originalUpdateSpinning,n))},updateSpinning:function(){var t=this.spinning,i=this.sSpinning;i!==t&&(this.sSpinning=t)},cancelExistingSpin:function(){var t=this.updateSpinning;t&&t.cancel&&t.cancel()},renderIndicator:function(t){var i="".concat(t,"-dot"),n=Se(this,"indicator");return n===null?null:(Array.isArray(n)&&(n=n.length===1?n[0]:n),ie(n)?ae(n,{class:i}):Y&&ie(Y())?ae(Y(),{class:i}):o("span",{class:"".concat(i," ").concat(t,"-dot-spin")},[o("i",{class:"".concat(t,"-dot-item")},null),o("i",{class:"".concat(t,"-dot-item")},null),o("i",{class:"".concat(t,"-dot-item")},null),o("i",{class:"".concat(t,"-dot-item")},null)]))}},render:function(){var t,i,n,l=this.$props,x=l.size,j=l.prefixCls,C=l.tip,M=C===void 0?(t=(i=this.$slots).tip)===null||t===void 0?void 0:t.call(i):C,O=l.wrapperClassName,k=this.$attrs,E=k.class,$=k.style,S=Pe(k,qe),D=this.configProvider,P=D.getPrefixCls,u=D.direction,_=P("spin",j),r=this.sSpinning,f=(n={},N(n,_,!0),N(n,"".concat(_,"-sm"),x==="small"),N(n,"".concat(_,"-lg"),x==="large"),N(n,"".concat(_,"-spinning"),r),N(n,"".concat(_,"-show-text"),!!M),N(n,"".concat(_,"-rtl"),u==="rtl"),N(n,E,!!E),n),v=o("div",re(re({},S),{},{style:$,class:f}),[this.renderIndicator(_),M?o("div",{class:"".concat(_,"-text")},[M]):null]),a=xe(this);if(a&&a.length){var s,A=(s={},N(s,"".concat(_,"-container"),!0),N(s,"".concat(_,"-blur"),r),s);return o("div",{class:["".concat(_,"-nested-loading"),O]},[r&&o("div",{key:"loading"},[v]),o("div",{class:A,key:"container"},[a])])}return v}});var Ze={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 Ke=Ze;function fe(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),n.forEach(function(l){Re(e,l,i[l])})}return e}function Re(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var J=function(t,i){var n=fe({},t,i.attrs);return o(B,fe({},n,{icon:Ke}),null)};J.displayName="ArrowsAltOutlined";J.inheritAttrs=!1;const et=J;var tt={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 nt=tt;function ve(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),n.forEach(function(l){it(e,l,i[l])})}return e}function it(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var Q=function(t,i){var n=ve({},t,i.attrs);return o(B,ve({},n,{icon:nt}),null)};Q.displayName="DragOutlined";Q.inheritAttrs=!1;const at=Q;var rt={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 lt=rt;function pe(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),n.forEach(function(l){ot(e,l,i[l])})}return e}function ot(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var Z=function(t,i){var n=pe({},t,i.attrs);return o(B,pe({},n,{icon:lt}),null)};Z.displayName="FullscreenExitOutlined";Z.inheritAttrs=!1;const st=Z;var ut={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 ct=ut;function me(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),n.forEach(function(l){dt(e,l,i[l])})}return e}function dt(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var K=function(t,i){var n=me({},t,i.attrs);return o(B,me({},n,{icon:ct}),null)};K.displayName="FullscreenOutlined";K.inheritAttrs=!1;const ft=K;var vt={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 pt=vt;function ge(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),n.forEach(function(l){mt(e,l,i[l])})}return e}function mt(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var R=function(t,i){var n=ge({},t,i.attrs);return o(B,ge({},n,{icon:pt}),null)};R.displayName="LeftCircleOutlined";R.inheritAttrs=!1;const Kt=R;var gt={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 ht=gt;function he(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),n.forEach(function(l){yt(e,l,i[l])})}return e}function yt(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var ee=function(t,i){var n=he({},t,i.attrs);return o(B,he({},n,{icon:ht}),null)};ee.displayName="RightCircleOutlined";ee.inheritAttrs=!1;const Rt=ee;function _t(e,t,i,n){let l=0,x=0,j=typeof(n==null?void 0:n.width)=="number"?n.width:0,C=typeof(n==null?void 0:n.height)=="number"?n.height:0,M=typeof(n==null?void 0:n.left)=="number"?n.left:0,O=typeof(n==null?void 0:n.top)=="number"?n.top:0,k=!1;const E=r=>{r.stopPropagation(),r.preventDefault(),!(!e.value||!t.value)&&(l=r instanceof MouseEvent?r.clientX:r.touches[0].clientX,x=r instanceof MouseEvent?r.clientY:r.touches[0].clientY,j=e.value.offsetWidth,C=e.value.offsetHeight,t.value.offsetLeft,t.value.offsetTop,document.documentElement.addEventListener("mousemove",$),document.documentElement.addEventListener("touchmove",$),document.documentElement.addEventListener("mouseup",S),document.documentElement.addEventListener("touchend",S))},$=r=>{if(!e.value||!t.value)return;let f=j+((r instanceof MouseEvent?r.clientX:r.touches[0].clientX)-l),v=C+((r instanceof MouseEvent?r.clientY:r.touches[0].clientY)-x);e.value.offsetLeft+f>window.innerWidth&&(f=window.innerWidth-e.value.offsetLeft),e.value.offsetTop+v>window.innerHeight&&(v=window.innerHeight-e.value.offsetTop),e.value.style.width=`${f}px`,e.value.style.height=`${v}px`,n!=null&&n.onResize&&n.onResize(f,v)},S=()=>{document.documentElement.removeEventListener("mousemove",$),document.documentElement.removeEventListener("touchmove",$),document.documentElement.removeEventListener("mouseup",S),document.documentElement.removeEventListener("touchend",S)},D=r=>{r.stopPropagation(),r.preventDefault(),!(!e.value||!i.value)&&(k=!0,M=e.value.offsetLeft,O=e.value.offsetTop,l=r instanceof MouseEvent?r.clientX:r.touches[0].clientX,x=r instanceof MouseEvent?r.clientY:r.touches[0].clientY,document.documentElement.addEventListener("mousemove",P),document.documentElement.addEventListener("touchmove",P),document.documentElement.addEventListener("mouseup",u),document.documentElement.addEventListener("touchend",u))},P=r=>{if(!e.value||!i.value||!k)return;const f=M+((r instanceof MouseEvent?r.clientX:r.touches[0].clientX)-l),v=O+((r instanceof MouseEvent?r.clientY:r.touches[0].clientY)-x);f<0?e.value.style.left="0px":f+e.value.offsetWidth>window.innerWidth?e.value.style.left=`${window.innerWidth-e.value.offsetWidth}px`:e.value.style.left=`${f}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`,n!=null&&n.onDrag&&n.onDrag(f,v)},u=()=>{k=!1,document.documentElement.removeEventListener("mousemove",P),document.documentElement.removeEventListener("touchmove",P),document.documentElement.removeEventListener("mouseup",u),document.documentElement.removeEventListener("touchend",u)},_=()=>{if(!e.value||!t.value)return;let r=e.value.offsetLeft,f=e.value.offsetTop,v=e.value.offsetWidth,a=e.value.offsetHeight;r+v>window.innerWidth&&(r=window.innerWidth-v,r<0&&(r=0,v=window.innerWidth)),f+a>window.innerHeight&&(f=window.innerHeight-a,f<0&&(f=0,a=window.innerHeight)),e.value.style.left=`${r}px`,e.value.style.top=`${f}px`,e.value.style.width=`${v}px`,e.value.style.height=`${a}px`};return Ce(()=>{!e.value||!n||(typeof n.width=="number"&&(e.value.style.width=`${n.width}px`),typeof n.height=="number"&&(e.value.style.height=`${n.height}px`),typeof n.left=="number"&&(e.value.style.left=`${n.left}px`),typeof n.top=="number"&&(e.value.style.top=`${n.top}px`),_(),window.addEventListener("resize",_))}),Me(()=>{document.documentElement.removeEventListener("mousemove",$),document.documentElement.removeEventListener("touchmove",$),document.documentElement.removeEventListener("mouseup",S),document.documentElement.removeEventListener("touchend",S),document.documentElement.removeEventListener("mousemove",P),document.documentElement.removeEventListener("touchmove",P),document.documentElement.removeEventListener("mouseup",u),document.documentElement.removeEventListener("touchend",u),window.removeEventListener("resize",_)}),_e(()=>[e.value,t.value,i.value],([r,f,v])=>{r&&f&&(f.addEventListener("mousedown",E),f.addEventListener("touchstart",E)),r&&v&&(v.addEventListener("mousedown",D),v.addEventListener("touchstart",D))}),{handleResizeMouseDown:E,handleDragMouseDown:D}}const F=e=>(Fe("data-v-de1424eb"),e=e(),Ue(),e),bt={class:"container"},wt={class:"action-bar"},Ot=["title"],Lt=["title"],Et={key:0,class:"icon",style:{cursor:"pointer"}},$t={key:0,"flex-placeholder":""},St={key:1,class:"action-bar"},Pt={key:0,class:"gen-info"},xt={class:"info-tags"},Ct={class:"name"},Mt={class:"value"},kt={key:0,class:"tags-container"},Dt=["onClick"],zt=F(()=>y("br",null,null,-1)),Nt=F(()=>y("h3",null,"Prompt",-1)),At=["innerHTML"],jt=F(()=>y("br",null,null,-1)),Tt=F(()=>y("h3",null,"Negative Prompt",-1)),It=["innerHTML"],Wt=F(()=>y("br",null,null,-1)),Bt=F(()=>y("h3",null,"Params",-1)),Ft={style:{"font-weight":"600","text-transform":"capitalize"}},Ut={key:0},Vt={key:1},Ht=["title"],Xt=ye({__name:"fullScreenContextMenu",props:{file:{},idx:{}},emits:["contextMenuClick"],setup(e,{emit:t}){const i=e,n=ke(),l=Xe(),x=V(),j=H(()=>l.tagMap.get(i.file.fullpath)??[]),C=V(""),M=De(),O=V(""),k=H(()=>O.value.split(`
`)),E=H(()=>oe(O.value)),$=H(()=>{let a=oe(O.value);return delete a.prompt,delete a.negativePrompt,a});_e(()=>{var a;return(a=i==null?void 0:i.file)==null?void 0:a.fullpath},async a=>{a&&(M.tasks.forEach(s=>s.cancel()),M.pushAction(()=>ze(a)).res.then(s=>{O.value=s}))},{immediate:!0});const S=V(),D=V(),P={left:100,top:100,width:512,height:384,expanded:!0},u=Ne("fullScreenContextMenu.vue-drag",P);u.value&&(u.value.left<0||u.value.top<0)&&(u.value={...P}),_t(x,S,D,{...u.value,onDrag:q(function(a,s){u.value={...u.value,left:a,top:s}},300),onResize:q(function(a,s){u.value={...u.value,width:a,height:s}},300)});function _(a){return a.parentNode}function r(a){if(!a)return"";let s="";const A=a.split(/[\n,]+/);let z=!1;for(let b=0;b<A.length;b++){const U=A[b].trim();z||(z=U.includes("(")),s+=`<span class="${z?"has-parentheses":""}">${U}</span>`,b<A.length-1&&(s+=","),z&&(z=!U.includes(")"))}return s}Ye("load",a=>{const s=a.target;s.className==="ant-image-preview-img"&&(C.value=`${s.naturalWidth} x ${s.naturalHeight}`)},{capture:!0});const f=H(()=>{const a=[{name:T("fileName"),val:i.file.name},{name:T("fileSize"),val:i.file.size}];return C.value&&a.push({name:T("resolution"),val:C.value}),a}),v=()=>{const a="Negative prompt:",s=O.value.includes(a)?O.value.split(a)[0]:k.value[0]??"";ue(s.trim())};return(a,s)=>{var ne;const A=He,z=de,b=Ie,U=We,te=Be,be=de;return p(),h("div",{ref_key:"el",ref:x,class:ce(["full-screen-menu",{"unset-size":!c(u).expanded}]),onWheelCapture:s[5]||(s[5]=Te(()=>{},["stop"]))},[y("div",bt,[y("div",wt,[y("div",{ref_key:"dragHandle",ref:D,class:"icon",style:{cursor:"grab"},title:c(T)("dragToMovePanel")},[o(c(at))],8,Ot),y("div",{class:"icon",style:{cursor:"pointer"},onClick:s[0]||(s[0]=d=>c(u).expanded=!c(u).expanded),title:c(T)("clickToToggleMaximizeMinimize")},[c(u).expanded?(p(),X(c(st),{key:0})):(p(),X(c(ft),{key:1}))],8,Lt),o(A,{"get-popup-container":_},{overlay:m(()=>[o(Ge,{file:a.file,idx:a.idx,"selected-tag":j.value,"disable-delete":c(se)(a.file)===c(n).fullscreenPreviewInitialUrl,onContextMenuClick:s[1]||(s[1]=(d,W,we)=>t("contextMenuClick",d,W,we))},null,8,["file","idx","selected-tag","disable-delete"])]),default:m(()=>[c(u).expanded?L("",!0):(p(),h("div",Et,[o(c(Ae))]))]),_:1}),c(u).expanded?(p(),h("div",$t)):L("",!0),c(u).expanded?(p(),h("div",St,[o(A,{trigger:["hover"],"get-popup-container":_},{overlay:m(()=>[o(te,{onClick:s[2]||(s[2]=d=>t("contextMenuClick",d,a.file,a.idx))},{default:m(()=>{var d;return[((d=c(n).conf)==null?void 0:d.launch_mode)!=="server"?(p(),h(I,{key:0},[o(b,{key:"send2txt2img"},{default:m(()=>[w(g(a.$t("sendToTxt2img")),1)]),_:1}),o(b,{key:"send2img2img"},{default:m(()=>[w(g(a.$t("sendToImg2img")),1)]),_:1}),o(b,{key:"send2inpaint"},{default:m(()=>[w(g(a.$t("sendToInpaint")),1)]),_:1}),o(b,{key:"send2extras"},{default:m(()=>[w(g(a.$t("sendToExtraFeatures")),1)]),_:1}),o(U,{key:"sendToThirdPartyExtension",title:a.$t("sendToThirdPartyExtension")},{default:m(()=>[o(b,{key:"send2controlnet-txt2img"},{default:m(()=>[w("ControlNet - "+g(a.$t("t2i")),1)]),_:1}),o(b,{key:"send2controlnet-img2img"},{default:m(()=>[w("ControlNet - "+g(a.$t("i2i")),1)]),_:1}),o(b,{key:"send2outpaint"},{default:m(()=>[w("openOutpaint")]),_:1})]),_:1},8,["title"])],64)):L("",!0),o(b,{key:"send2BatchDownload"},{default:m(()=>[w(g(a.$t("sendToBatchDownload")),1)]),_:1}),o(b,{key:"send2savedDir"},{default:m(()=>[w(g(a.$t("send2savedDir")),1)]),_:1}),o(b,{key:"deleteFiles",disabled:c(se)(a.file)===c(n).fullscreenPreviewInitialUrl},{default:m(()=>[w(g(a.$t("deleteSelected")),1)]),_:1},8,["disabled"]),o(b,{key:"previewInNewWindow"},{default:m(()=>[w(g(a.$t("previewInNewWindow")),1)]),_:1}),o(b,{key:"copyPreviewUrl"},{default:m(()=>[w(g(a.$t("copySourceFilePreviewLink")),1)]),_:1})]}),_:1})]),default:m(()=>[o(z,null,{default:m(()=>[w(g(c(T)("openContextMenu")),1)]),_:1})]),_:1}),o(be,{onClick:s[3]||(s[3]=d=>t("contextMenuClick",{key:"download"},i.file,i.idx))},{default:m(()=>[w(g(a.$t("download")),1)]),_:1}),O.value?(p(),X(z,{key:0,onClick:s[4]||(s[4]=d=>c(ue)(O.value))},{default:m(()=>[w(g(a.$t("copyPrompt")),1)]),_:1})):L("",!0),O.value?(p(),X(z,{key:1,onClick:v},{default:m(()=>[w(g(a.$t("copyPositivePrompt")),1)]),_:1})):L("",!0)])):L("",!0)]),c(u).expanded?(p(),h("div",Pt,[y("div",xt,[(p(!0),h(I,null,G(f.value,d=>(p(),h("span",{class:"info-tag",key:d.name},[y("span",Ct,g(d.name),1),y("span",Mt,g(d.val),1)]))),128))]),(ne=c(n).conf)!=null&&ne.all_custom_tags?(p(),h("div",kt,[(p(!0),h(I,null,G(c(n).conf.all_custom_tags,d=>(p(),h("div",{class:ce(["tag",{selected:j.value.some(W=>W.id===d.id)}]),onClick:W=>t("contextMenuClick",{key:`toggle-tag-${d.id}`},a.file,a.idx),key:d.id,style:je({"--tag-color":c(l).getColor(d.name)})},g(d.name),15,Dt))),128))])):L("",!0),y("div",null,[E.value.prompt?(p(),h(I,{key:0},[zt,Nt,y("code",{innerHTML:r(E.value.prompt??"")},null,8,At)],64)):L("",!0),E.value.negativePrompt?(p(),h(I,{key:1},[jt,Tt,y("code",{innerHTML:r(E.value.negativePrompt??"")},null,8,It)],64)):L("",!0)]),Object.keys($.value).length?(p(),h(I,{key:1},[Wt,Bt,y("table",null,[(p(!0),h(I,null,G($.value,(d,W)=>(p(),h("tr",{key:d,class:"gen-info-frag"},[y("td",Ft,g(W),1),typeof d=="object"?(p(),h("td",Ut,[y("code",null,g(d),1)])):(p(),h("td",Vt,g(d),1))]))),128))])],64)):L("",!0)])):L("",!0)]),c(u).expanded?(p(),h("div",{key:0,class:"mouse-sensor",ref_key:"resizeHandle",ref:S,title:c(T)("dragToResizePanel")},[o(c(et))],8,Ht)):L("",!0)],34)}}});const en=Ve(Xt,[["__scopeId","data-v-de1424eb"]]);export{Kt as L,Rt as R,Zt as S,en as f,Qt as s};